@spectrum-web-components/picker 0.10.0 → 0.10.3-express.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,18 @@
17
17
  }
18
18
  ]
19
19
  },
20
+ {
21
+ "kind": "javascript-module",
22
+ "path": "sync/index.ts",
23
+ "declarations": [],
24
+ "exports": []
25
+ },
26
+ {
27
+ "kind": "javascript-module",
28
+ "path": "sync/sp-picker.ts",
29
+ "declarations": [],
30
+ "exports": []
31
+ },
20
32
  {
21
33
  "kind": "javascript-module",
22
34
  "path": "src/Picker.ts",
@@ -1727,18 +1739,6 @@
1727
1739
  }
1728
1740
  }
1729
1741
  ]
1730
- },
1731
- {
1732
- "kind": "javascript-module",
1733
- "path": "sync/index.ts",
1734
- "declarations": [],
1735
- "exports": []
1736
- },
1737
- {
1738
- "kind": "javascript-module",
1739
- "path": "sync/sp-picker.ts",
1740
- "declarations": [],
1741
- "exports": []
1742
1742
  }
1743
1743
  ]
1744
1744
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/picker",
3
- "version": "0.10.0",
3
+ "version": "0.10.3-express.9+abfee7409",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -48,21 +48,21 @@
48
48
  "lit-html"
49
49
  ],
50
50
  "dependencies": {
51
- "@spectrum-web-components/base": "^0.5.1",
52
- "@spectrum-web-components/button": "^0.16.3",
53
- "@spectrum-web-components/icon": "^0.11.2",
54
- "@spectrum-web-components/icons-ui": "^0.8.2",
55
- "@spectrum-web-components/icons-workflow": "^0.8.2",
56
- "@spectrum-web-components/menu": "^0.12.0",
57
- "@spectrum-web-components/overlay": "^0.14.0",
58
- "@spectrum-web-components/popover": "^0.11.5",
51
+ "@spectrum-web-components/base": "^0.5.2",
52
+ "@spectrum-web-components/button": "^0.16.5-express.9+abfee7409",
53
+ "@spectrum-web-components/icon": "^0.11.4-express.9+abfee7409",
54
+ "@spectrum-web-components/icons-ui": "^0.8.4-express.9+abfee7409",
55
+ "@spectrum-web-components/icons-workflow": "^0.8.4-express.9+abfee7409",
56
+ "@spectrum-web-components/menu": "^0.12.2-express.9+abfee7409",
57
+ "@spectrum-web-components/overlay": "^0.14.2-express.9+abfee7409",
58
+ "@spectrum-web-components/popover": "^0.11.7-express.9+abfee7409",
59
59
  "@spectrum-web-components/reactive-controllers": "^0.2.0",
60
- "@spectrum-web-components/shared": "^0.13.3",
61
- "@spectrum-web-components/tray": "^0.3.0",
60
+ "@spectrum-web-components/shared": "^0.13.4",
61
+ "@spectrum-web-components/tray": "^0.3.3-express.9+abfee7409",
62
62
  "tslib": "^2.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@spectrum-css/picker": "^1.1.7"
65
+ "@spectrum-css/picker": "^1.1.11"
66
66
  },
67
67
  "types": "./src/index.d.ts",
68
68
  "customElements": "custom-elements.json",
@@ -71,5 +71,5 @@
71
71
  "./sync/index.js",
72
72
  "./sync/sp-*.js"
73
73
  ],
74
- "gitHead": "f23b15ec952d7450272a8275524c905e028b4ddc"
74
+ "gitHead": "abfee740957976448a3e4cf90df17d6165f857d6"
75
75
  }
@@ -0,0 +1,76 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import '../sync/sp-picker.js';
13
+ import '@spectrum-web-components/field-label/sp-field-label.js';
14
+ import { elementUpdated, expect, fixture, html, nextFrame, oneEvent, waitUntil, } from '@open-wc/testing';
15
+ import { setViewport } from '@web/test-runner-commands';
16
+ describe('Picker, responsive', () => {
17
+ let el;
18
+ const pickerFixture = async () => {
19
+ const test = await fixture(html `
20
+ <div>
21
+ <sp-field-label for="picker">
22
+ Where do you live?
23
+ </sp-field-label>
24
+ <sp-picker
25
+ id="picker"
26
+ style="width: 200px; --spectrum-alias-ui-icon-chevron-size-100: 10px;"
27
+ >
28
+ <sp-menu-item>Deselect</sp-menu-item>
29
+ <sp-menu-item value="option-2">
30
+ Select Inverse
31
+ </sp-menu-item>
32
+ <sp-menu-item>Feather...</sp-menu-item>
33
+ <sp-menu-item>Select and Mask...</sp-menu-item>
34
+ <sp-menu-divider></sp-menu-divider>
35
+ <sp-menu-item>Save Selection</sp-menu-item>
36
+ <sp-menu-item disabled>Make Work Path</sp-menu-item>
37
+ </sp-picker>
38
+ </div>
39
+ `);
40
+ await waitUntil(() => !!window.applyFocusVisiblePolyfill, 'polyfill loaded');
41
+ return test.querySelector('sp-picker');
42
+ };
43
+ describe('container', () => {
44
+ beforeEach(async () => {
45
+ el = await pickerFixture();
46
+ await elementUpdated(el);
47
+ });
48
+ xit('is a Tray in mobile', async () => {
49
+ /**
50
+ * While we can set the view port, but not `(hover: none) and (pointer: coarse)`
51
+ * which prevents us from testing this at unit time. Hopefully there will be
52
+ * a future version of Playwright and/or @web/test-runner that does allow this.
53
+ * See: https://github.com/microsoft/playwright/issues/11781
54
+ **/
55
+ await setViewport({ width: 360, height: 640 });
56
+ // Allow viewport update to propagate.
57
+ await nextFrame();
58
+ const opened = oneEvent(el, 'sp-opened');
59
+ el.open = true;
60
+ await opened;
61
+ const tray = document.querySelector('sp-tray');
62
+ expect(tray).to.not.be.null;
63
+ });
64
+ it('is a Popover in desktop', async () => {
65
+ await setViewport({ width: 701, height: 640 });
66
+ // Allow viewport update to propagate.
67
+ await nextFrame();
68
+ const opened = oneEvent(el, 'sp-opened');
69
+ el.open = true;
70
+ await opened;
71
+ const popover = document.querySelector('sp-popover');
72
+ expect(popover).to.not.be.null;
73
+ });
74
+ });
75
+ });
76
+ //# sourceMappingURL=picker-responsive.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picker-responsive.test.js","sourceRoot":"","sources":["picker-responsive.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,sBAAsB,CAAC;AAC9B,OAAO,wDAAwD,CAAC;AAEhE,OAAO,EACH,cAAc,EACd,MAAM,EACN,OAAO,EACP,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,SAAS,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAChC,IAAI,EAAU,CAAC;IACf,MAAM,aAAa,GAAG,KAAK,IAAqB,EAAE;QAC9C,MAAM,IAAI,GAAG,MAAM,OAAO,CACtB,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;aAoBH,CACJ,CAAC;QAEF,MAAM,SAAS,CACX,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,yBAAyB,EACxC,iBAAiB,CACpB,CAAC;QAEF,OAAO,IAAI,CAAC,aAAa,CAAC,WAAW,CAAW,CAAC;IACrD,CAAC,CAAC;IAEF,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QACvB,UAAU,CAAC,KAAK,IAAI,EAAE;YAClB,EAAE,GAAG,MAAM,aAAa,EAAE,CAAC;YAC3B,MAAM,cAAc,CAAC,EAAE,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAC;QAEH,GAAG,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;YAClC;;;;;gBAKI;YACJ,MAAM,WAAW,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YAC/C,sCAAsC;YACtC,MAAM,SAAS,EAAE,CAAC;YAElB,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;YACzC,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC;YACf,MAAM,MAAM,CAAC;YAEb,MAAM,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;YAE/C,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QAChC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,yBAAyB,EAAE,KAAK,IAAI,EAAE;YACrC,MAAM,WAAW,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;YAC/C,sCAAsC;YACtC,MAAM,SAAS,EAAE,CAAC;YAElB,MAAM,MAAM,GAAG,QAAQ,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;YACzC,EAAE,CAAC,IAAI,GAAG,IAAI,CAAC;YACf,MAAM,MAAM,CAAC;YAEb,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;YAErD,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC;QACnC,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport '../sync/sp-picker.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport { Picker } from '..';\nimport {\n elementUpdated,\n expect,\n fixture,\n html,\n nextFrame,\n oneEvent,\n waitUntil,\n} from '@open-wc/testing';\nimport { setViewport } from '@web/test-runner-commands';\n\ndescribe('Picker, responsive', () => {\n let el: Picker;\n const pickerFixture = async (): Promise<Picker> => {\n const test = await fixture<HTMLDivElement>(\n html`\n <div>\n <sp-field-label for=\"picker\">\n Where do you live?\n </sp-field-label>\n <sp-picker\n id=\"picker\"\n style=\"width: 200px; --spectrum-alias-ui-icon-chevron-size-100: 10px;\"\n >\n <sp-menu-item>Deselect</sp-menu-item>\n <sp-menu-item value=\"option-2\">\n Select Inverse\n </sp-menu-item>\n <sp-menu-item>Feather...</sp-menu-item>\n <sp-menu-item>Select and Mask...</sp-menu-item>\n <sp-menu-divider></sp-menu-divider>\n <sp-menu-item>Save Selection</sp-menu-item>\n <sp-menu-item disabled>Make Work Path</sp-menu-item>\n </sp-picker>\n </div>\n `\n );\n\n await waitUntil(\n () => !!window.applyFocusVisiblePolyfill,\n 'polyfill loaded'\n );\n\n return test.querySelector('sp-picker') as Picker;\n };\n\n describe('container', () => {\n beforeEach(async () => {\n el = await pickerFixture();\n await elementUpdated(el);\n });\n\n xit('is a Tray in mobile', async () => {\n /**\n * While we can set the view port, but not `(hover: none) and (pointer: coarse)`\n * which prevents us from testing this at unit time. Hopefully there will be\n * a future version of Playwright and/or @web/test-runner that does allow this.\n * See: https://github.com/microsoft/playwright/issues/11781\n **/\n await setViewport({ width: 360, height: 640 });\n // Allow viewport update to propagate.\n await nextFrame();\n\n const opened = oneEvent(el, 'sp-opened');\n el.open = true;\n await opened;\n\n const tray = document.querySelector('sp-tray');\n\n expect(tray).to.not.be.null;\n });\n\n it('is a Popover in desktop', async () => {\n await setViewport({ width: 701, height: 640 });\n // Allow viewport update to propagate.\n await nextFrame();\n\n const opened = oneEvent(el, 'sp-opened');\n el.open = true;\n await opened;\n\n const popover = document.querySelector('sp-popover');\n\n expect(popover).to.not.be.null;\n });\n });\n});\n"]}
@@ -0,0 +1,15 @@
1
+ /*
2
+ Copyright 2020 Adobe. All rights reserved.
3
+ This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License. You may obtain a copy
5
+ of the License at http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under
8
+ the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
+ OF ANY KIND, either express or implied. See the License for the specific language
10
+ governing permissions and limitations under the License.
11
+ */
12
+ import * as stories from '../stories/picker-sizes.stories.js';
13
+ import { regressVisuals } from '../../../test/visual/test.js';
14
+ regressVisuals('PickerSizesStories', stories);
15
+ //# sourceMappingURL=picker-sizes.test-vrt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"picker-sizes.test-vrt.js","sourceRoot":"","sources":["picker-sizes.test-vrt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,KAAK,OAAO,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,cAAc,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC","sourcesContent":["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\nimport * as stories from '../stories/picker-sizes.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\n\nregressVisuals('PickerSizesStories', stories);\n"]}