@spectrum-web-components/picker 0.10.5 → 0.10.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/picker",
3
- "version": "0.10.5",
3
+ "version": "0.10.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -49,16 +49,16 @@
49
49
  ],
50
50
  "dependencies": {
51
51
  "@spectrum-web-components/base": "^0.5.4",
52
- "@spectrum-web-components/button": "^0.17.1",
52
+ "@spectrum-web-components/button": "^0.17.2",
53
53
  "@spectrum-web-components/icon": "^0.11.5",
54
54
  "@spectrum-web-components/icons-ui": "^0.8.5",
55
55
  "@spectrum-web-components/icons-workflow": "^0.8.5",
56
- "@spectrum-web-components/menu": "^0.12.4",
57
- "@spectrum-web-components/overlay": "^0.15.2",
58
- "@spectrum-web-components/popover": "^0.11.9",
56
+ "@spectrum-web-components/menu": "^0.12.5",
57
+ "@spectrum-web-components/overlay": "^0.15.3",
58
+ "@spectrum-web-components/popover": "^0.11.10",
59
59
  "@spectrum-web-components/reactive-controllers": "^0.2.2",
60
- "@spectrum-web-components/shared": "^0.13.6",
61
- "@spectrum-web-components/tray": "^0.3.4",
60
+ "@spectrum-web-components/shared": "^0.13.7",
61
+ "@spectrum-web-components/tray": "^0.3.5",
62
62
  "tslib": "^2.0.0"
63
63
  },
64
64
  "devDependencies": {
@@ -71,5 +71,5 @@
71
71
  "./sync/index.js",
72
72
  "./sync/sp-*.js"
73
73
  ],
74
- "gitHead": "caf12727e7f91dcf961e1fadacc727eea9ece27b"
74
+ "gitHead": "dd76f9532fdea946880147cc7645f113b998c326"
75
75
  }
@@ -0,0 +1,274 @@
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 '@spectrum-web-components/picker/sp-picker.js';
13
+ import '@spectrum-web-components/menu/sp-menu-item.js';
14
+ import { html } from 'lit';
15
+ import { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';
16
+ const countryList = [
17
+ 'Afghanistan',
18
+ 'Albania',
19
+ 'Algeria',
20
+ 'American Samoa',
21
+ 'Andorra',
22
+ 'Angola',
23
+ 'Anguilla',
24
+ 'Antarctica',
25
+ 'Antigua and Barbuda',
26
+ 'Argentina',
27
+ 'Armenia',
28
+ 'Aruba',
29
+ 'Australia',
30
+ 'Austria',
31
+ 'Azerbaijan',
32
+ 'Bahamas (the)',
33
+ 'Bahrain',
34
+ 'Bangladesh',
35
+ 'Barbados',
36
+ 'Belarus',
37
+ 'Belgium',
38
+ 'Belize',
39
+ 'Benin',
40
+ 'Bermuda',
41
+ 'Bhutan',
42
+ 'Bolivia (Plurinational State of)',
43
+ 'Bonaire, Sint Eustatius and Saba',
44
+ 'Bosnia and Herzegovina',
45
+ 'Botswana',
46
+ 'Bouvet Island',
47
+ 'Brazil',
48
+ 'British Indian Ocean Territory (the)',
49
+ 'Brunei Darussalam',
50
+ 'Bulgaria',
51
+ 'Burkina Faso',
52
+ 'Burundi',
53
+ 'Cabo Verde',
54
+ 'Cambodia',
55
+ 'Cameroon',
56
+ 'Canada',
57
+ 'Cayman Islands (the)',
58
+ 'Central African Republic (the)',
59
+ 'Chad',
60
+ 'Chile',
61
+ 'China',
62
+ 'Christmas Island',
63
+ 'Cocos (Keeling) Islands (the)',
64
+ 'Colombia',
65
+ 'Comoros (the)',
66
+ 'Congo (the Democratic Republic of the)',
67
+ 'Congo (the)',
68
+ 'Cook Islands (the)',
69
+ 'Costa Rica',
70
+ 'Croatia',
71
+ 'Cuba',
72
+ 'Curaçao',
73
+ 'Cyprus',
74
+ 'Czechia',
75
+ "Côte d'Ivoire",
76
+ 'Denmark',
77
+ 'Djibouti',
78
+ 'Dominica',
79
+ 'Dominican Republic (the)',
80
+ 'Ecuador',
81
+ 'Egypt',
82
+ 'El Salvador',
83
+ 'Equatorial Guinea',
84
+ 'Eritrea',
85
+ 'Estonia',
86
+ 'Eswatini',
87
+ 'Ethiopia',
88
+ 'Falkland Islands (the) [Malvinas]',
89
+ 'Faroe Islands (the)',
90
+ 'Fiji',
91
+ 'Finland',
92
+ 'France',
93
+ 'French Guiana',
94
+ 'French Polynesia',
95
+ 'French Southern Territories (the)',
96
+ 'Gabon',
97
+ 'Gambia (the)',
98
+ 'Georgia',
99
+ 'Germany',
100
+ 'Ghana',
101
+ 'Gibraltar',
102
+ 'Greece',
103
+ 'Greenland',
104
+ 'Grenada',
105
+ 'Guadeloupe',
106
+ 'Guam',
107
+ 'Guatemala',
108
+ 'Guernsey',
109
+ 'Guinea',
110
+ 'Guinea-Bissau',
111
+ 'Guyana',
112
+ 'Haiti',
113
+ 'Heard Island and McDonald Islands',
114
+ 'Holy See (the)',
115
+ 'Honduras',
116
+ 'Hong Kong',
117
+ 'Hungary',
118
+ 'Iceland',
119
+ 'India',
120
+ 'Indonesia',
121
+ 'Iran (Islamic Republic of)',
122
+ 'Iraq',
123
+ 'Ireland',
124
+ 'Isle of Man',
125
+ 'Israel',
126
+ 'Italy',
127
+ 'Jamaica',
128
+ 'Japan',
129
+ 'Jersey',
130
+ 'Jordan',
131
+ 'Kazakhstan',
132
+ 'Kenya',
133
+ 'Kiribati',
134
+ "Korea (the Democratic People's Republic of)",
135
+ 'Korea (the Republic of)',
136
+ 'Kuwait',
137
+ 'Kyrgyzstan',
138
+ "Lao People's Democratic Republic (the)",
139
+ 'Latvia',
140
+ 'Lebanon',
141
+ 'Lesotho',
142
+ 'Liberia',
143
+ 'Libya',
144
+ 'Liechtenstein',
145
+ 'Lithuania',
146
+ 'Luxembourg',
147
+ 'Macao',
148
+ 'Madagascar',
149
+ 'Malawi',
150
+ 'Malaysia',
151
+ 'Maldives',
152
+ 'Mali',
153
+ 'Malta',
154
+ 'Marshall Islands (the)',
155
+ 'Martinique',
156
+ 'Mauritania',
157
+ 'Mauritius',
158
+ 'Mayotte',
159
+ 'Mexico',
160
+ 'Micronesia (Federated States of)',
161
+ 'Moldova (the Republic of)',
162
+ 'Monaco',
163
+ 'Mongolia',
164
+ 'Montenegro',
165
+ 'Montserrat',
166
+ 'Morocco',
167
+ 'Mozambique',
168
+ 'Myanmar',
169
+ 'Namibia',
170
+ 'Nauru',
171
+ 'Nepal',
172
+ 'Netherlands (the)',
173
+ 'New Caledonia',
174
+ 'New Zealand',
175
+ 'Nicaragua',
176
+ 'Niger (the)',
177
+ 'Nigeria',
178
+ 'Niue',
179
+ 'Norfolk Island',
180
+ 'Northern Mariana Islands (the)',
181
+ 'Norway',
182
+ 'Oman',
183
+ 'Pakistan',
184
+ 'Palau',
185
+ 'Palestine, State of',
186
+ 'Panama',
187
+ 'Papua New Guinea',
188
+ 'Paraguay',
189
+ 'Peru',
190
+ 'Philippines (the)',
191
+ 'Pitcairn',
192
+ 'Poland',
193
+ 'Portugal',
194
+ 'Puerto Rico',
195
+ 'Qatar',
196
+ 'Republic of North Macedonia',
197
+ 'Romania',
198
+ 'Russian Federation (the)',
199
+ 'Rwanda',
200
+ 'Réunion',
201
+ 'Saint Barthélemy',
202
+ 'Saint Helena, Ascension and Tristan da Cunha',
203
+ 'Saint Kitts and Nevis',
204
+ 'Saint Lucia',
205
+ 'Saint Martin (French part)',
206
+ 'Saint Pierre and Miquelon',
207
+ 'Saint Vincent and the Grenadines',
208
+ 'Samoa',
209
+ 'San Marino',
210
+ 'Sao Tome and Principe',
211
+ 'Saudi Arabia',
212
+ 'Senegal',
213
+ 'Serbia',
214
+ 'Seychelles',
215
+ 'Sierra Leone',
216
+ 'Singapore',
217
+ 'Sint Maarten (Dutch part)',
218
+ 'Slovakia',
219
+ 'Slovenia',
220
+ 'Solomon Islands',
221
+ 'Somalia',
222
+ 'South Africa',
223
+ 'South Georgia and the South Sandwich Islands',
224
+ 'South Sudan',
225
+ 'Spain',
226
+ 'Sri Lanka',
227
+ 'Sudan (the)',
228
+ 'Suriname',
229
+ 'Svalbard and Jan Mayen',
230
+ 'Sweden',
231
+ 'Switzerland',
232
+ 'Syrian Arab Republic',
233
+ 'Taiwan',
234
+ 'Tajikistan',
235
+ 'Tanzania, United Republic of',
236
+ 'Thailand',
237
+ 'Timor-Leste',
238
+ 'Togo',
239
+ 'Tokelau',
240
+ 'Tonga',
241
+ 'Trinidad and Tobago',
242
+ 'Tunisia',
243
+ 'Turkey',
244
+ 'Turkmenistan',
245
+ 'Turks and Caicos Islands (the)',
246
+ 'Tuvalu',
247
+ 'Uganda',
248
+ 'Ukraine',
249
+ 'United Arab Emirates (the)',
250
+ 'United Kingdom of Great Britain and Northern Ireland (the)',
251
+ 'United States Minor Outlying Islands (the)',
252
+ 'United States of America (the)',
253
+ 'Uruguay',
254
+ 'Uzbekistan',
255
+ 'Vanuatu',
256
+ 'Venezuela (Bolivarian Republic of)',
257
+ 'Viet Nam',
258
+ 'Virgin Islands (British)',
259
+ 'Virgin Islands (U.S.)',
260
+ 'Wallis and Futuna',
261
+ 'Western Sahara',
262
+ 'Yemen',
263
+ 'Zambia',
264
+ 'Zimbabwe',
265
+ 'Åland Islands',
266
+ ];
267
+ measureFixtureCreation(html `
268
+ <sp-picker value="Zimbabwe">
269
+ ${countryList.map((country) => html `
270
+ <sp-menu-item>${country}</sp-menu-item>
271
+ `)}
272
+ </sp-picker>
273
+ `, { numRenders: 20 });
274
+ //# sourceMappingURL=basic-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic-test.js","sourceRoot":"","sources":["basic-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,8CAA8C,CAAC;AACtD,OAAO,+CAA+C,CAA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S;IACT,QAAQ;IACR,YAAY;IACZ,cAAc;IACd,WAAW;IACX,2BAA2B;IAC3B,UAAU;IACV,UAAU;IACV,iBAAiB;IACjB,SAAS;IACT,cAAc;IACd,8CAA8C;IAC9C,aAAa;IACb,OAAO;IACP,WAAW;IACX,aAAa;IACb,UAAU;IACV,wBAAwB;IACxB,QAAQ;IACR,aAAa;IACb,sBAAsB;IACtB,QAAQ;IACR,YAAY;IACZ,8BAA8B;IAC9B,UAAU;IACV,aAAa;IACb,MAAM;IACN,SAAS;IACT,OAAO;IACP,qBAAqB;IACrB,SAAS;IACT,QAAQ;IACR,cAAc;IACd,gCAAgC;IAChC,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,4BAA4B;IAC5B,4DAA4D;IAC5D,4CAA4C;IAC5C,gCAAgC;IAChC,SAAS;IACT,YAAY;IACZ,SAAS;IACT,oCAAoC;IACpC,UAAU;IACV,0BAA0B;IAC1B,uBAAuB;IACvB,mBAAmB;IACnB,gBAAgB;IAChB,OAAO;IACP,QAAQ;IACR,UAAU;IACV,eAAe;CAClB,CAAC;AAEF,sBAAsB,CAClB,IAAI,CAAA;;cAEM,WAAW,CAAC,GAAG,CACb,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAA;oCACG,OAAO;iBAC1B,CACJ;;KAER,EACD,EAAE,UAAU,EAAE,EAAE,EAAE,CACrB,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 '@spectrum-web-components/picker/sp-picker.js';\nimport '@spectrum-web-components/menu/sp-menu-item.js';\nimport { html } from 'lit';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nconst countryList = [\n 'Afghanistan',\n 'Albania',\n 'Algeria',\n 'American Samoa',\n 'Andorra',\n 'Angola',\n 'Anguilla',\n 'Antarctica',\n 'Antigua and Barbuda',\n 'Argentina',\n 'Armenia',\n 'Aruba',\n 'Australia',\n 'Austria',\n 'Azerbaijan',\n 'Bahamas (the)',\n 'Bahrain',\n 'Bangladesh',\n 'Barbados',\n 'Belarus',\n 'Belgium',\n 'Belize',\n 'Benin',\n 'Bermuda',\n 'Bhutan',\n 'Bolivia (Plurinational State of)',\n 'Bonaire, Sint Eustatius and Saba',\n 'Bosnia and Herzegovina',\n 'Botswana',\n 'Bouvet Island',\n 'Brazil',\n 'British Indian Ocean Territory (the)',\n 'Brunei Darussalam',\n 'Bulgaria',\n 'Burkina Faso',\n 'Burundi',\n 'Cabo Verde',\n 'Cambodia',\n 'Cameroon',\n 'Canada',\n 'Cayman Islands (the)',\n 'Central African Republic (the)',\n 'Chad',\n 'Chile',\n 'China',\n 'Christmas Island',\n 'Cocos (Keeling) Islands (the)',\n 'Colombia',\n 'Comoros (the)',\n 'Congo (the Democratic Republic of the)',\n 'Congo (the)',\n 'Cook Islands (the)',\n 'Costa Rica',\n 'Croatia',\n 'Cuba',\n 'Curaçao',\n 'Cyprus',\n 'Czechia',\n \"Côte d'Ivoire\",\n 'Denmark',\n 'Djibouti',\n 'Dominica',\n 'Dominican Republic (the)',\n 'Ecuador',\n 'Egypt',\n 'El Salvador',\n 'Equatorial Guinea',\n 'Eritrea',\n 'Estonia',\n 'Eswatini',\n 'Ethiopia',\n 'Falkland Islands (the) [Malvinas]',\n 'Faroe Islands (the)',\n 'Fiji',\n 'Finland',\n 'France',\n 'French Guiana',\n 'French Polynesia',\n 'French Southern Territories (the)',\n 'Gabon',\n 'Gambia (the)',\n 'Georgia',\n 'Germany',\n 'Ghana',\n 'Gibraltar',\n 'Greece',\n 'Greenland',\n 'Grenada',\n 'Guadeloupe',\n 'Guam',\n 'Guatemala',\n 'Guernsey',\n 'Guinea',\n 'Guinea-Bissau',\n 'Guyana',\n 'Haiti',\n 'Heard Island and McDonald Islands',\n 'Holy See (the)',\n 'Honduras',\n 'Hong Kong',\n 'Hungary',\n 'Iceland',\n 'India',\n 'Indonesia',\n 'Iran (Islamic Republic of)',\n 'Iraq',\n 'Ireland',\n 'Isle of Man',\n 'Israel',\n 'Italy',\n 'Jamaica',\n 'Japan',\n 'Jersey',\n 'Jordan',\n 'Kazakhstan',\n 'Kenya',\n 'Kiribati',\n \"Korea (the Democratic People's Republic of)\",\n 'Korea (the Republic of)',\n 'Kuwait',\n 'Kyrgyzstan',\n \"Lao People's Democratic Republic (the)\",\n 'Latvia',\n 'Lebanon',\n 'Lesotho',\n 'Liberia',\n 'Libya',\n 'Liechtenstein',\n 'Lithuania',\n 'Luxembourg',\n 'Macao',\n 'Madagascar',\n 'Malawi',\n 'Malaysia',\n 'Maldives',\n 'Mali',\n 'Malta',\n 'Marshall Islands (the)',\n 'Martinique',\n 'Mauritania',\n 'Mauritius',\n 'Mayotte',\n 'Mexico',\n 'Micronesia (Federated States of)',\n 'Moldova (the Republic of)',\n 'Monaco',\n 'Mongolia',\n 'Montenegro',\n 'Montserrat',\n 'Morocco',\n 'Mozambique',\n 'Myanmar',\n 'Namibia',\n 'Nauru',\n 'Nepal',\n 'Netherlands (the)',\n 'New Caledonia',\n 'New Zealand',\n 'Nicaragua',\n 'Niger (the)',\n 'Nigeria',\n 'Niue',\n 'Norfolk Island',\n 'Northern Mariana Islands (the)',\n 'Norway',\n 'Oman',\n 'Pakistan',\n 'Palau',\n 'Palestine, State of',\n 'Panama',\n 'Papua New Guinea',\n 'Paraguay',\n 'Peru',\n 'Philippines (the)',\n 'Pitcairn',\n 'Poland',\n 'Portugal',\n 'Puerto Rico',\n 'Qatar',\n 'Republic of North Macedonia',\n 'Romania',\n 'Russian Federation (the)',\n 'Rwanda',\n 'Réunion',\n 'Saint Barthélemy',\n 'Saint Helena, Ascension and Tristan da Cunha',\n 'Saint Kitts and Nevis',\n 'Saint Lucia',\n 'Saint Martin (French part)',\n 'Saint Pierre and Miquelon',\n 'Saint Vincent and the Grenadines',\n 'Samoa',\n 'San Marino',\n 'Sao Tome and Principe',\n 'Saudi Arabia',\n 'Senegal',\n 'Serbia',\n 'Seychelles',\n 'Sierra Leone',\n 'Singapore',\n 'Sint Maarten (Dutch part)',\n 'Slovakia',\n 'Slovenia',\n 'Solomon Islands',\n 'Somalia',\n 'South Africa',\n 'South Georgia and the South Sandwich Islands',\n 'South Sudan',\n 'Spain',\n 'Sri Lanka',\n 'Sudan (the)',\n 'Suriname',\n 'Svalbard and Jan Mayen',\n 'Sweden',\n 'Switzerland',\n 'Syrian Arab Republic',\n 'Taiwan',\n 'Tajikistan',\n 'Tanzania, United Republic of',\n 'Thailand',\n 'Timor-Leste',\n 'Togo',\n 'Tokelau',\n 'Tonga',\n 'Trinidad and Tobago',\n 'Tunisia',\n 'Turkey',\n 'Turkmenistan',\n 'Turks and Caicos Islands (the)',\n 'Tuvalu',\n 'Uganda',\n 'Ukraine',\n 'United Arab Emirates (the)',\n 'United Kingdom of Great Britain and Northern Ireland (the)',\n 'United States Minor Outlying Islands (the)',\n 'United States of America (the)',\n 'Uruguay',\n 'Uzbekistan',\n 'Vanuatu',\n 'Venezuela (Bolivarian Republic of)',\n 'Viet Nam',\n 'Virgin Islands (British)',\n 'Virgin Islands (U.S.)',\n 'Wallis and Futuna',\n 'Western Sahara',\n 'Yemen',\n 'Zambia',\n 'Zimbabwe',\n 'Åland Islands',\n];\n\nmeasureFixtureCreation(\n html`\n <sp-picker value=\"Zimbabwe\">\n ${countryList.map(\n (country) => html`\n <sp-menu-item>${country}</sp-menu-item>\n `\n )}\n </sp-picker>\n `,\n { numRenders: 20 }\n);\n"]}
@@ -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"]}