├── .eslintrc.json ├── .gemini.yml ├── .github ├── ISSUE_TEMPLATE │ └── config.yml └── workflows │ ├── unit-tests.yml │ └── visual-tests.yml.disabled ├── .gitignore ├── .stylelintrc ├── @types └── interfaces.d.ts ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── bower.json ├── demo ├── .eslintrc.json ├── demos.json ├── index.html ├── split-layout-basic-demos.html ├── split-layout-demo.js ├── split-layout-height-demos.html ├── split-layout-integration-demos.html └── split-layout-theme-demos.html ├── gen-tsd.json ├── index.html ├── magi-p3-post.js ├── package-lock-p3.json ├── package-lock.json ├── package.json ├── screenshot.png ├── src └── vaadin-split-layout.html ├── test ├── .eslintrc.json ├── index.html ├── observer-component.html ├── style-scope.html ├── test-suites.js ├── vaadin-split-layout_test.html └── visual │ ├── customized.html │ ├── default.html │ ├── screens │ └── vaadin-split-layout │ │ ├── customized-lumo │ │ └── customized │ │ │ ├── chrome.png │ │ │ └── firefox.png │ │ ├── customized-material │ │ └── customized │ │ │ ├── chrome.png │ │ │ └── firefox.png │ │ ├── default-lumo │ │ └── default │ │ │ ├── chrome.png │ │ │ └── firefox.png │ │ └── default-material │ │ └── default │ │ ├── chrome.png │ │ └── firefox.png │ └── test.js ├── theme ├── lumo │ ├── vaadin-split-layout-styles.html │ └── vaadin-split-layout.html └── material │ ├── vaadin-split-layout-styles.html │ └── vaadin-split-layout.html ├── vaadin-directory-description.md ├── vaadin-split-layout.html └── wct.conf.js /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "vaadin", 3 | "env": { 4 | "browser": true, 5 | "es6": true, 6 | "node": true 7 | }, 8 | "plugins": [ 9 | "html" 10 | ], 11 | "globals": { 12 | "Polymer": false, 13 | "Vaadin": false 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /.gemini.yml: -------------------------------------------------------------------------------- 1 | rootUrl: http://localhost:8080/components/vaadin-split-layout/test/visual/ 2 | gridUrl: http://localhost:4444/wd/hub 3 | screenshotsDir: ./test/visual/screens 4 | 5 | system: 6 | plugins: 7 | polyserve: 8 | port: 8080 9 | sauce: true 10 | 11 | browsers: 12 | chrome: 13 | desiredCapabilities: 14 | browserName: "chrome" 15 | version: "67.0" 16 | platform: "Windows 10" 17 | 18 | firefox: 19 | desiredCapabilities: 20 | browserName: "firefox" 21 | version: "47.0" 22 | platform: "Windows 10" 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: "Web Components: Bugs and Feature Requests" 4 | url: https://github.com/vaadin/web-components/issues/new/choose 5 | about: Please report issues related to the TypeScript and HTML API of Vaadin components here. 6 | - name: "Flow Components: Bugs and Feature Requests" 7 | url: https://github.com/vaadin/flow-components/issues/new/choose 8 | about: Please report issues related to the Java API of Vaadin components here. 9 | -------------------------------------------------------------------------------- /.github/workflows/unit-tests.yml: -------------------------------------------------------------------------------- 1 | name: Unit Tests 2 | 3 | # all pull requests 4 | on: pull_request 5 | 6 | jobs: 7 | # Running local tests is disabled due to outdated dependencies 8 | # see https://github.com/vaadin/components-team-tasks/issues/628 9 | # unit-tests-p2: 10 | # name: Polymer 2 on the CI agent 11 | # runs-on: ubuntu-latest 12 | # steps: 13 | # - name: Set up Node 16.x 14 | # uses: actions/setup-node@v4 15 | # with: 16 | # node-version: 16.x 17 | # 18 | # - name: Check out the source code 19 | # uses: actions/checkout@v2 20 | # 21 | # - name: Install global npm dependencies 22 | # # bower is needed to run 'bower install' 23 | # # polymer-cli is needed to run the lint step 24 | # run: "npm install --quiet --no-progress --global bower polymer-cli" 25 | # 26 | # - name: Install project npm dependencies 27 | # run: "npm ci" 28 | # 29 | # - name: Install project Bower dependencies 30 | # run: "bower install --quiet" 31 | # 32 | # - name: Run automated magi-cli checks 33 | # run: "npm run check" 34 | # 35 | # - name: Run a linter 36 | # run: "npm run lint" 37 | # 38 | # # the full set of environments is tested with Polymer 3 below 39 | # - name: Run unit tests locally (in the VM instance running this job) 40 | # run: "xvfb-run -s '-screen 0 1024x768x24' npm test" 41 | 42 | unit-tests-p3: 43 | name: Polymer 3 on SauceLabs 44 | runs-on: ubuntu-latest 45 | steps: 46 | - name: Set up Node 16.x 47 | uses: actions/setup-node@v4 48 | with: 49 | node-version: 16.x 50 | 51 | - name: Check out the (Polymer 2) source code 52 | uses: actions/checkout@v2 53 | 54 | - name: Install global npm dependencies 55 | # bower and polymer-modulizer are needed to run the Polymer 3 conversion step 56 | run: "npm install --quiet --no-progress --global bower magi-cli polymer-modulizer" 57 | 58 | - name: Convert the source code to Polymer 3 59 | run: | 60 | git config --local user.email "github-actions[bot]@users.noreply.github.com" 61 | git config --local user.name "github-actions[bot]" 62 | magi p3-convert --out . --import-style=name 63 | 64 | # workaround for running tests on Android on SauceLabs (see wct.conf.js) 65 | - name: Add 'localhost-for-saucelabs' to /etc/hosts 66 | run: echo "127.0.0.1 localhost-for-saucelabs" | sudo tee -a /etc/hosts 67 | 68 | - name: Run unit tests on SauceLabs 69 | run: "npm test -- --env saucelabs" 70 | env: 71 | SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} 72 | SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} 73 | -------------------------------------------------------------------------------- /.github/workflows/visual-tests.yml.disabled: -------------------------------------------------------------------------------- 1 | name: Visual Tests 2 | 3 | # all pull requests 4 | on: pull_request 5 | 6 | jobs: 7 | visual-tests: 8 | name: Polymer 2 on SauceLabs 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Set up Node 12.x 12 | uses: actions/setup-node@v2 13 | with: 14 | node-version: 12.x 15 | 16 | - name: Check out the source code 17 | uses: actions/checkout@v2 18 | 19 | - name: Install latest npm 20 | # magi-cli 1.0 requires npm 7 or higher 21 | run: "npm install -g npm@8" 22 | 23 | - name: Install global npm dependencies 24 | # bower is needed to run 'bower install' 25 | # gemini is needed to run the visual tests step 26 | run: "npm install --quiet --no-progress --global bower gemini@^4.0.0 gemini-sauce gemini-polyserve" 27 | 28 | - name: Install project npm dependencies 29 | run: "npm ci" 30 | 31 | - name: Install project Bower dependencies 32 | run: "bower install --quiet" 33 | 34 | - name: Run visual tests on SauceLabs 35 | run: "gemini test --reporter html --reporter flat test/visual" 36 | env: 37 | SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }} 38 | SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} 39 | 40 | - name: Publish the Visual Tests failures report as an Artifact for this Workflow run 41 | if: ${{ failure() }} 42 | uses: actions/upload-artifact@v2 43 | with: 44 | name: Visual tests failures report 45 | path: gemini-report/ 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bower_components 2 | node_modules 3 | yarn.lock 4 | coverage 5 | analysis.json 6 | -------------------------------------------------------------------------------- /.stylelintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "stylelint-config-vaadin" 3 | } 4 | -------------------------------------------------------------------------------- /@types/interfaces.d.ts: -------------------------------------------------------------------------------- 1 | export type SplitLayoutOrientation = 'horizontal' | 'vertical'; 2 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | 3 | 4 | ### Expected outcome 5 | 6 | 7 | ### Actual outcome 8 | 9 | 10 | ### Live Demo 11 | 12 | 13 | ### Steps to reproduce 14 | 18 | 19 | ### Browsers Affected 20 | 21 | - [ ] Chrome 22 | - [ ] Firefox 23 | - [ ] Safari 24 | - [ ] Edge 25 | - [ ] IE 11 26 | - [ ] iOS Safari 27 | - [ ] Android Chrome 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | Copyright 2015-2016 Vaadin Ltd. 179 | 180 | Licensed under the Apache License, Version 2.0 (the "License"); 181 | you may not use this file except in compliance with the License. 182 | You may obtain a copy of the License at 183 | 184 | http://www.apache.org/licenses/LICENSE-2.0 185 | 186 | Unless required by applicable law or agreed to in writing, software 187 | distributed under the License is distributed on an "AS IS" BASIS, 188 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 189 | See the License for the specific language governing permissions and 190 | limitations under the License. 191 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # <vaadin-split-layout> 2 | 3 | > ⚠️ Starting from Vaadin 20, the source code and issues for this component are migrated to the [`vaadin/web-components`](https://github.com/vaadin/web-components/tree/master/packages/vaadin-split-layout) monorepository. 4 | > This repository contains the source code and releases of `` for the Vaadin versions 10 to 19. 5 | 6 | [<vaadin-split-layout>](https://vaadin.com/components/vaadin-split-layout) is a Web Component implementing a split layout for two content elements with a draggable splitter between them, part of the [Vaadin components](https://vaadin.com/components). 7 | 8 | [Live Demo ↗](https://vaadin.com/components/vaadin-split-layout/html-examples) 9 | | 10 | [API documentation ↗](https://vaadin.com/components/vaadin-split-layout/html-api) 11 | 12 | [![npm version](https://badgen.net/npm/v/@vaadin/vaadin-split-layout)](https://www.npmjs.com/package/@vaadin/vaadin-split-layout) 13 | [![Bower version](https://badgen.net/github/release/vaadin/vaadin-split-layout)](https://github.com/vaadin/vaadin-split-layout/releases) 14 | [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/vaadin/vaadin-split-layout) 15 | [![Build status](https://travis-ci.org/vaadin/vaadin-split-layout.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-split-layout) 16 | [![Coverage Status](https://coveralls.io/repos/github/vaadin/vaadin-split-layout/badge.svg?branch=master)](https://coveralls.io/github/vaadin/vaadin-split-layout?branch=master) 17 | [![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-split-layout) 18 | [![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-split-layout.svg)](https://vaadin.com/directory/component/vaadinvaadin-split-layout) 19 | 20 | 42 | ```html 43 | 44 | 45 |
First layout content
46 |
Second layout content
47 |
48 | 49 |
Third layout content
50 |
Fourth layout content
51 |
52 |
53 | ``` 54 | 55 | [Screenshot of vaadin-split-layout](https://vaadin.com/components/vaadin-split-layout) 56 | 57 | ## Installation 58 | 59 | The Vaadin components are distributed as Bower and npm packages. 60 | Please note that the version range is the same, as the API has not changed. 61 | You should not mix Bower and npm versions in the same application, though. 62 | 63 | Unlike the official Polymer Elements, the converted Polymer 3 compatible Vaadin components 64 | are only published on npm, not pushed to GitHub repositories. 65 | 66 | ### Polymer 2 and HTML Imports Compatible Version 67 | 68 | Install `vaadin-split-layout`: 69 | 70 | ```sh 71 | bower i vaadin/vaadin-split-layout --save 72 | ``` 73 | 74 | Once installed, import it in your application: 75 | 76 | ```html 77 | 78 | ``` 79 | ### Polymer 3 and ES Modules Compatible Version 80 | 81 | Install `vaadin-split-layout`: 82 | 83 | ```sh 84 | npm i @vaadin/vaadin-split-layout --save 85 | ``` 86 | 87 | Once installed, import it in your application: 88 | 89 | ```js 90 | import '@vaadin/vaadin-split-layout/vaadin-split-layout.js'; 91 | ``` 92 | 93 | ## Getting started 94 | 95 | Vaadin components use the Lumo theme by default. 96 | 97 | To use the Material theme, import the correspondent file from the `theme/material` folder. 98 | 99 | ## Entry points 100 | 101 | - The component with the Lumo theme: 102 | 103 | `theme/lumo/vaadin-split-layout.html` 104 | 105 | - The component with the Material theme: 106 | 107 | `theme/material/vaadin-split-layout.html` 108 | 109 | - Alias for `theme/lumo/vaadin-split-layout.html`: 110 | 111 | `vaadin-split-layout.html` 112 | 113 | 114 | ## Running demos and tests in a browser 115 | 116 | 1. Fork the `vaadin-split-layout` repository and clone it locally. 117 | 118 | 1. Make sure you have [npm](https://www.npmjs.com/) and [Bower](https://bower.io) installed. 119 | 120 | 1. When in the `vaadin-split-layout` directory, run `npm install` and then `bower install` to install dependencies. 121 | 122 | 1. Make sure you have [polymer-cli](https://www.npmjs.com/package/polymer-cli) installed globally: `npm i -g polymer-cli`. 123 | 124 | 1. Run `npm start`, browser will automatically open the component API documentation. 125 | 126 | 1. You can also open demo or in-browser tests by adding **demo** or **test** to the URL, for example: 127 | 128 | - http://127.0.0.1:3000/components/vaadin-split-layout/demo 129 | - http://127.0.0.1:3000/components/vaadin-split-layout/test 130 | 131 | 132 | ## Running tests from the command line 133 | 134 | > [!WARNING] 135 | > Running tests locally from the CLI does not work due to outdated dependencies. Run tests via SauceLabs or in the browser instead. 136 | 137 | 1. When in the `vaadin-split-layout` directory, run `polymer test` 138 | 139 | 140 | ## Following the coding style 141 | 142 | We are using [ESLint](http://eslint.org/) for linting JavaScript code. You can check if your code is following our standards by running `npm run lint`, which will automatically lint all `.js` files as well as JavaScript snippets inside `.html` files. 143 | 144 | 145 | ## Big Thanks 146 | 147 | Cross-browser Testing Platform and Open Source <3 Provided by [Sauce Labs](https://saucelabs.com). 148 | 149 | 150 | ## Contributing 151 | 152 | To contribute to the component, please read [the guideline](https://github.com/vaadin/vaadin-core/blob/master/CONTRIBUTING.md) first. 153 | 154 | 155 | ## License 156 | 157 | Apache License 2.0 158 | 159 | Vaadin collects development time usage statistics to improve this product. For details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics. 160 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vaadin-split-layout", 3 | "homepage": "https://vaadin.com/components", 4 | "description": "Polymer element for partitioning a layout into resizeable areas", 5 | "authors": [ 6 | "Vaadin Ltd" 7 | ], 8 | "keywords": [ 9 | "web-components", 10 | "web-component", 11 | "polymer", 12 | "Vaadin", 13 | "split-panel", 14 | "split-layout" 15 | ], 16 | "main": [ 17 | "vaadin-split-layout.html", 18 | "theme/material/vaadin-split-layout.html" 19 | ], 20 | "license": "Apache-2.0", 21 | "repository": { 22 | "type": "git", 23 | "url": "git://github.com/vaadin/vaadin-split-layout" 24 | }, 25 | "ignore": [ 26 | "**/.*", 27 | "node_modules", 28 | "bower_components", 29 | "package-lock.json", 30 | "wct.conf.js" 31 | ], 32 | "dependencies": { 33 | "polymer": "^2.0.0", 34 | "iron-resizable-behavior": "^2.0.0", 35 | "vaadin-themable-mixin": "vaadin/vaadin-themable-mixin#^1.6.1", 36 | "vaadin-lumo-styles": "vaadin/vaadin-lumo-styles#^1.1.0", 37 | "vaadin-material-styles": "vaadin/vaadin-material-styles#^1.1.0", 38 | "vaadin-element-mixin": "vaadin/vaadin-element-mixin#^2.4.1" 39 | }, 40 | "devDependencies": { 41 | "iron-component-page": "^3.0.0", 42 | "iron-test-helpers": "^2.0.0", 43 | "webcomponentsjs": "^1.0.0", 44 | "web-component-tester": "^6.1.5", 45 | "vaadin-demo-helpers": "vaadin/vaadin-demo-helpers#^3.0.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /demo/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-console": 0 4 | }, 5 | "globals": { 6 | "SplitLayoutDemo": false, 7 | "DemoReadyEventEmitter": false 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /demo/demos.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Vaadin Split Layout", 3 | "pages": [ 4 | { 5 | "name": "Basics", 6 | "url": "split-layout-basic-demos", 7 | "src": "split-layout-basic-demos.html", 8 | "meta": { 9 | "title": "vaadin-split-layout Basic Examples", 10 | "description": "", 11 | "image": "" 12 | } 13 | } 14 | , 15 | { 16 | "name": "Height", 17 | "url": "split-layout-height-demos", 18 | "src": "split-layout-height-demos.html", 19 | "meta": { 20 | "title": "vaadin-split-layout Height Examples", 21 | "description": "", 22 | "image": "" 23 | } 24 | } 25 | , 26 | { 27 | "name": "Integration", 28 | "url": "split-layout-integration-demos", 29 | "src": "split-layout-integration-demos.html", 30 | "meta": { 31 | "title": "vaadin-split-layout Integration", 32 | "description": "", 33 | "image": "" 34 | } 35 | } 36 | , 37 | { 38 | "name": "Theme Variants", 39 | "url": "split-layout-theme-demos", 40 | "src": "split-layout-theme-demos.html", 41 | "meta": { 42 | "title": "vaadin-split-layout Theme Variants", 43 | "description": "", 44 | "image": "" 45 | } 46 | } 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | vaadin-split-layout Examples 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /demo/split-layout-basic-demos.html: -------------------------------------------------------------------------------- 1 | 2 | 69 | 77 | 78 | -------------------------------------------------------------------------------- /demo/split-layout-demo.js: -------------------------------------------------------------------------------- 1 | /* @polymerMixin */ 2 | window.SplitLayoutDemo = superClass => { 3 | return class extends superClass { 4 | static get properties() { 5 | return { 6 | }; 7 | } 8 | }; 9 | }; 10 | -------------------------------------------------------------------------------- /demo/split-layout-height-demos.html: -------------------------------------------------------------------------------- 1 | 2 | 46 | 54 | 55 | -------------------------------------------------------------------------------- /demo/split-layout-integration-demos.html: -------------------------------------------------------------------------------- 1 | 2 | 29 | 37 | 38 | -------------------------------------------------------------------------------- /demo/split-layout-theme-demos.html: -------------------------------------------------------------------------------- 1 | 2 | 58 | 66 | 67 | -------------------------------------------------------------------------------- /gen-tsd.json: -------------------------------------------------------------------------------- 1 | { 2 | "excludeFiles": [ 3 | "wct.conf.js", 4 | "index.html", 5 | "demo/**/*", 6 | "test/**/*", 7 | "theme/**/*" 8 | ], 9 | "autoImport": { 10 | "./@types/interfaces": [ 11 | "SplitLayoutOrientation" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | vaadin-split-layout 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /magi-p3-post.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | files: [ 3 | 'vaadin-split-layout.js' 4 | ], 5 | from: [ 6 | /import '\.\/theme\/lumo\/vaadin-(.+)\.js';/ 7 | ], 8 | to: [ 9 | `import './theme/lumo/vaadin-$1.js';\nexport * from './src/vaadin-$1.js';` 10 | ] 11 | }; 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vaadin/vaadin-split-layout", 3 | "version": "4.3.1", 4 | "description": "Polymer element for partitioning a layout into resizeable areas", 5 | "main": "vaadin-split-layout.html", 6 | "repository": "vaadin/vaadin-split-layout", 7 | "keywords": [ 8 | "Vaadin", 9 | "split layout", 10 | "web-components", 11 | "web-component", 12 | "polymer" 13 | ], 14 | "author": "Vaadin Ltd", 15 | "license": "Apache-2.0", 16 | "bugs": { 17 | "url": "https://github.com/vaadin/vaadin-split-layout/issues" 18 | }, 19 | "homepage": "https://vaadin.com/components", 20 | "files": [ 21 | "vaadin-*.d.ts", 22 | "vaadin-*.js", 23 | "@types", 24 | "src", 25 | "theme" 26 | ], 27 | "husky": { 28 | "hooks": { 29 | "pre-commit": "npm run lint" 30 | } 31 | }, 32 | "scripts": { 33 | "test": "wct", 34 | "check": "npm-run-all --parallel check:*", 35 | "check:bower": "magi check-bower", 36 | "check:version": "magi check-version", 37 | "lint": "npm-run-all --parallel lint:*", 38 | "lint:css": "stylelint *.html src/*.html demo/*.html theme/**/*.html test/*html", 39 | "lint:html": "eslint *.html src demo test --ext .html", 40 | "lint:js": "eslint *.js test", 41 | "lint:polymer": "polymer lint --rules polymer-2 --input ./src/*.html ./theme/**/*.html", 42 | "prestart": "polymer analyze vaadin-* > analysis.json", 43 | "start": "polymer serve --port 3000 --open", 44 | "preversion": "magi update-version" 45 | }, 46 | "devDependencies": { 47 | "@vaadin/vaadin-component-dev-dependencies": "^3.2.0" 48 | }, 49 | "overrides": { 50 | "wct-sauce": { 51 | "sauce-connect-launcher": "vaadin/sauce-connect-launcher#upgrade-sauce-connect-5" 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/screenshot.png -------------------------------------------------------------------------------- /src/vaadin-split-layout.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 74 | 75 | 389 | 390 | -------------------------------------------------------------------------------- /test/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "globals": { 3 | "sinon": false, 4 | "WCT": false, 5 | "describe": false, 6 | "expect": false, 7 | "it": false, 8 | "beforeEach": false, 9 | "fixture": false, 10 | "MockInteractions": false, 11 | "gemini": false 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | vaadin-split-layout tests 8 | 9 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/observer-component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | 38 | -------------------------------------------------------------------------------- /test/style-scope.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | vaadin-split-layout test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |
Bar
21 |
Baz
22 |
23 | 24 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /test/test-suites.js: -------------------------------------------------------------------------------- 1 | window.VaadinSplitLayoutSuites = [ 2 | 'vaadin-split-layout_test.html', 3 | 'style-scope.html', 4 | ]; 5 | -------------------------------------------------------------------------------- /test/vaadin-split-layout_test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | vaadin-split-layout test 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 420 | 421 | 422 | -------------------------------------------------------------------------------- /test/visual/customized.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 38 | 39 | 40 | 41 |
First
42 | 43 |
Second
44 |
Third
45 |
46 |
47 | 48 | -------------------------------------------------------------------------------- /test/visual/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 | 31 | -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/customized-lumo/customized/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/customized-lumo/customized/chrome.png -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/customized-lumo/customized/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/customized-lumo/customized/firefox.png -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/customized-material/customized/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/customized-material/customized/chrome.png -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/customized-material/customized/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/customized-material/customized/firefox.png -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/default-lumo/default/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/default-lumo/default/chrome.png -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/default-lumo/default/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/default-lumo/default/firefox.png -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/default-material/default/chrome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/default-material/default/chrome.png -------------------------------------------------------------------------------- /test/visual/screens/vaadin-split-layout/default-material/default/firefox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vaadin/vaadin-split-layout/f76e42cb0dc4e1a69234b0b436b90305d0bf8247/test/visual/screens/vaadin-split-layout/default-material/default/firefox.png -------------------------------------------------------------------------------- /test/visual/test.js: -------------------------------------------------------------------------------- 1 | gemini.suite('vaadin-split-layout', function(rootSuite) { 2 | function wait(actions, find) { 3 | actions.wait(5000); 4 | } 5 | 6 | function goToAboutBlank(actions, find) { 7 | // Firefox stops responding on socket after a test, workaround: 8 | return actions.executeJS(function(window) { 9 | window.location.href = 'about:blank'; // just go away, please! 10 | }); 11 | } 12 | 13 | rootSuite 14 | .before(wait) 15 | .after(goToAboutBlank); 16 | ['lumo', 'material'].forEach(theme => { 17 | gemini.suite(`default-${theme}`, function(suite) { 18 | suite 19 | .setUrl(`default.html?theme=${theme}`) 20 | .setCaptureElements('#default') 21 | .capture('default'); 22 | }); 23 | 24 | gemini.suite(`customized-${theme}`, function(suite) { 25 | suite 26 | .setUrl(`customized.html?theme=${theme}`) 27 | .setCaptureElements('#customized') 28 | .capture('customized'); 29 | }); 30 | }); 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /theme/lumo/vaadin-split-layout-styles.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 104 | 105 | -------------------------------------------------------------------------------- /theme/lumo/vaadin-split-layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /theme/material/vaadin-split-layout-styles.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 31 | 32 | -------------------------------------------------------------------------------- /theme/material/vaadin-split-layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /vaadin-directory-description.md: -------------------------------------------------------------------------------- 1 | 2 | # <vaadin-split-layout> 3 | 4 | [![Available in Vaadin_Directory](https://img.shields.io/vaadin-directory/v/vaadinvaadin-split-layout.svg)](https://vaadin.com/directory/component/vaadinvaadin-split-layout) 5 | 6 | [<vaadin-split-layout>](https://vaadin.com/components/vaadin-split-layout) is a Web Component implementing a split layout for two content elements with a draggable splitter between them, part of the [Vaadin components](https://vaadin.com/components). 7 | 8 | 9 | [Screenshot of vaadin-split-layout](https://vaadin.com/components/vaadin-split-layout) 10 | 11 | ## Example Usage 12 | ```html 13 | 14 | 15 |
First layout content
16 |
Second layout content
17 |
18 | 19 |
Third layout content
20 |
Fourth layout content
21 |
22 |
23 | ``` 24 | -------------------------------------------------------------------------------- /vaadin-split-layout.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /wct.conf.js: -------------------------------------------------------------------------------- 1 | var envIndex = process.argv.indexOf('--env') + 1; 2 | var env = envIndex ? process.argv[envIndex] : undefined; 3 | 4 | // workaround for Android 7+ blocking all HTTP traffic 5 | // see https://wiki.saucelabs.com/display/DOCS/Known+Issues 6 | // add it to your own local `/etc/hosts` to run SauceLabs tests locally 7 | var tunneledLocalhost = 'localhost-for-saucelabs'; 8 | 9 | module.exports = { 10 | testTimeout: 180 * 1000, 11 | verbose: false, 12 | plugins: { 13 | local: { 14 | browserOptions: { 15 | chrome: [ 16 | 'headless', 17 | 'disable-gpu', 18 | 'no-sandbox' 19 | ] 20 | } 21 | }, 22 | }, 23 | 24 | registerHooks: function(context) { 25 | const testBrowsers = [ 26 | { 27 | deviceName: 'Android GoogleAPI Emulator', 28 | platformName: 'Android', 29 | platformVersion: '11.0', 30 | browserName: 'Chrome', 31 | }, 32 | 'iOS Simulator/iphone@10.3', // should be 9.x, but SauceLabs does not provide that 33 | 'macOS 11/safari@latest', 34 | 'Windows 10/microsoftedge@latest', 35 | 'Windows 10/internet explorer@11', 36 | 'Windows 10/chrome@latest', 37 | 'Windows 10/firefox@latest', 38 | ]; 39 | 40 | if (env === 'saucelabs') { 41 | context.options.webserver = context.options.webserver || {}; 42 | context.options.webserver.hostname = tunneledLocalhost; 43 | context.options.plugins.sauce.tunnelOptions = { 44 | tunnelDomains: tunneledLocalhost 45 | }; 46 | 47 | context.options.plugins.sauce.browsers = testBrowsers; 48 | } 49 | 50 | // Map legacy tunnel-identifier option to new tunnel-name option 51 | context.hookLate('prepare', (done) => { 52 | context.options.activeBrowsers.forEach((browser) => { 53 | browser['tunnel-name'] = browser['tunnel-identifier']; 54 | delete browser['tunnel-identifier']; 55 | }); 56 | done(); 57 | }); 58 | } 59 | }; 60 | --------------------------------------------------------------------------------