@spectrum-web-components/picker 0.10.1 → 0.10.3
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 +14 -14
- package/sp-picker.d.ts +0 -6
- package/sp-picker.js +0 -14
- package/sp-picker.js.map +0 -1
- package/src/Picker.d.ts +0 -102
- package/src/Picker.js +0 -529
- package/src/Picker.js.map +0 -1
- package/src/index.d.ts +0 -1
- package/src/index.js +0 -13
- package/src/index.js.map +0 -1
- package/src/picker.css.d.ts +0 -2
- package/src/picker.css.js +0 -299
- package/src/picker.css.js.map +0 -1
- package/src/spectrum-picker.css.d.ts +0 -2
- package/src/spectrum-picker.css.js +0 -295
- package/src/spectrum-picker.css.js.map +0 -1
- package/stories/picker-sizes.stories.js +0 -51
- package/stories/picker-sizes.stories.js.map +0 -1
- package/stories/picker.stories.js +0 -381
- package/stories/picker.stories.js.map +0 -1
- package/stories/states.js +0 -238
- package/stories/states.js.map +0 -1
- package/sync/index.d.ts +0 -1
- package/sync/index.js +0 -17
- package/sync/index.js.map +0 -1
- package/sync/sp-picker.d.ts +0 -2
- package/sync/sp-picker.js +0 -14
- package/sync/sp-picker.js.map +0 -1
|
@@ -1,381 +0,0 @@
|
|
|
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 { html } from '@spectrum-web-components/base';
|
|
13
|
-
import '../sp-picker.js';
|
|
14
|
-
import '@spectrum-web-components/menu/sp-menu-item.js';
|
|
15
|
-
import '@spectrum-web-components/menu/sp-menu-divider.js';
|
|
16
|
-
import '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';
|
|
17
|
-
import '@spectrum-web-components/icons-workflow/icons/sp-icon-copy.js';
|
|
18
|
-
import '@spectrum-web-components/icons-workflow/icons/sp-icon-delete.js';
|
|
19
|
-
import { states } from './states.js';
|
|
20
|
-
import '@spectrum-web-components/field-label/sp-field-label.js';
|
|
21
|
-
import { spreadProps } from '../../../test/lit-helpers.js';
|
|
22
|
-
export default {
|
|
23
|
-
title: 'Picker',
|
|
24
|
-
component: 'sp-picker',
|
|
25
|
-
args: {
|
|
26
|
-
disabled: false,
|
|
27
|
-
invalid: false,
|
|
28
|
-
open: false,
|
|
29
|
-
quiet: false,
|
|
30
|
-
},
|
|
31
|
-
argTypes: {
|
|
32
|
-
onChange: { action: 'change' },
|
|
33
|
-
disabled: {
|
|
34
|
-
name: 'disabled',
|
|
35
|
-
type: { name: 'boolean', required: false },
|
|
36
|
-
description: 'Disable this control. It will not receive focus or events.',
|
|
37
|
-
table: {
|
|
38
|
-
type: { summary: 'boolean' },
|
|
39
|
-
defaultValue: { summary: false },
|
|
40
|
-
},
|
|
41
|
-
control: {
|
|
42
|
-
type: 'boolean',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
invalid: {
|
|
46
|
-
name: 'invalid',
|
|
47
|
-
type: { name: 'boolean', required: false },
|
|
48
|
-
table: {
|
|
49
|
-
type: { summary: 'boolean' },
|
|
50
|
-
defaultValue: { summary: false },
|
|
51
|
-
},
|
|
52
|
-
control: {
|
|
53
|
-
type: 'boolean',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
open: {
|
|
57
|
-
name: 'open',
|
|
58
|
-
type: { name: 'boolean', required: false },
|
|
59
|
-
description: 'Whether the menu is open or not.',
|
|
60
|
-
table: {
|
|
61
|
-
type: { summary: 'boolean' },
|
|
62
|
-
defaultValue: { summary: false },
|
|
63
|
-
},
|
|
64
|
-
control: 'boolean',
|
|
65
|
-
},
|
|
66
|
-
quiet: {
|
|
67
|
-
name: 'quiet',
|
|
68
|
-
type: { name: 'boolean', required: false },
|
|
69
|
-
table: {
|
|
70
|
-
type: { summary: 'boolean' },
|
|
71
|
-
defaultValue: { summary: false },
|
|
72
|
-
},
|
|
73
|
-
control: {
|
|
74
|
-
type: 'boolean',
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
const handleChange = ({ onChange }) => (event) => {
|
|
80
|
-
const picker = event.target;
|
|
81
|
-
if (onChange)
|
|
82
|
-
onChange(picker.value);
|
|
83
|
-
};
|
|
84
|
-
export const Default = (args) => {
|
|
85
|
-
return html `
|
|
86
|
-
<sp-field-label for="picker-1">Where do you live?</sp-field-label>
|
|
87
|
-
<sp-picker
|
|
88
|
-
id="picker-1"
|
|
89
|
-
@change=${handleChange(args)}
|
|
90
|
-
label="Select a Country with a very long label, too long, in fact"
|
|
91
|
-
${spreadProps(args)}
|
|
92
|
-
>
|
|
93
|
-
<sp-menu-item>Deselect</sp-menu-item>
|
|
94
|
-
<sp-menu-item>Select Inverse</sp-menu-item>
|
|
95
|
-
<sp-menu-item>Feather...</sp-menu-item>
|
|
96
|
-
<sp-menu-item>Select and Mask...</sp-menu-item>
|
|
97
|
-
<sp-menu-divider></sp-menu-divider>
|
|
98
|
-
<sp-menu-item>Save Selection</sp-menu-item>
|
|
99
|
-
<sp-menu-item disabled>Make Work Path</sp-menu-item>
|
|
100
|
-
</sp-picker>
|
|
101
|
-
<p>This is some text.</p>
|
|
102
|
-
<p>This is some text.</p>
|
|
103
|
-
<p>
|
|
104
|
-
This is a
|
|
105
|
-
<a href="#anchor">link</a>
|
|
106
|
-
.
|
|
107
|
-
</p>
|
|
108
|
-
`;
|
|
109
|
-
};
|
|
110
|
-
export const quiet = (args) => {
|
|
111
|
-
return html `
|
|
112
|
-
<sp-field-label for="picker-quiet">Where do you live?</sp-field-label>
|
|
113
|
-
<sp-picker
|
|
114
|
-
${spreadProps(args)}
|
|
115
|
-
id="picker-quiet"
|
|
116
|
-
@change=${handleChange(args)}
|
|
117
|
-
label="Pick an item"
|
|
118
|
-
>
|
|
119
|
-
<sp-menu-item value="1">Item 1</sp-menu-item>
|
|
120
|
-
<sp-menu-item value="2">Item 2</sp-menu-item>
|
|
121
|
-
<sp-menu-item value="3">Item 3</sp-menu-item>
|
|
122
|
-
<sp-menu-item value="4">Item 4</sp-menu-item>
|
|
123
|
-
</sp-picker>
|
|
124
|
-
<p>This is some text.</p>
|
|
125
|
-
<p>This is some text.</p>
|
|
126
|
-
<p>
|
|
127
|
-
This is a
|
|
128
|
-
<a href="#anchor">link</a>
|
|
129
|
-
.
|
|
130
|
-
</p>
|
|
131
|
-
`;
|
|
132
|
-
};
|
|
133
|
-
quiet.args = {
|
|
134
|
-
quiet: true,
|
|
135
|
-
};
|
|
136
|
-
export const icons = (args) => {
|
|
137
|
-
return html `
|
|
138
|
-
<sp-field-label for="picker-quiet">
|
|
139
|
-
Choose an action type...
|
|
140
|
-
</sp-field-label>
|
|
141
|
-
<sp-picker
|
|
142
|
-
...=${spreadProps(args)}
|
|
143
|
-
id="picker-quiet"
|
|
144
|
-
@change=${handleChange(args)}
|
|
145
|
-
label="Pick an action"
|
|
146
|
-
value="1"
|
|
147
|
-
>
|
|
148
|
-
<sp-menu-item value="1">
|
|
149
|
-
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
150
|
-
Edit
|
|
151
|
-
</sp-menu-item>
|
|
152
|
-
<sp-menu-item value="2">
|
|
153
|
-
<sp-icon-copy slot="icon"></sp-icon-copy>
|
|
154
|
-
Copy
|
|
155
|
-
</sp-menu-item>
|
|
156
|
-
<sp-menu-item value="3">
|
|
157
|
-
<sp-icon-delete slot="icon"></sp-icon-delete>
|
|
158
|
-
Delete
|
|
159
|
-
</sp-menu-item>
|
|
160
|
-
</sp-picker>
|
|
161
|
-
`;
|
|
162
|
-
};
|
|
163
|
-
export const iconsNone = (args) => {
|
|
164
|
-
return html `
|
|
165
|
-
<sp-field-label for="picker-quiet">
|
|
166
|
-
Choose an action type...
|
|
167
|
-
</sp-field-label>
|
|
168
|
-
<sp-picker
|
|
169
|
-
...=${spreadProps(args)}
|
|
170
|
-
id="picker-quiet"
|
|
171
|
-
@change=${handleChange(args)}
|
|
172
|
-
label="Pick an action"
|
|
173
|
-
value="1"
|
|
174
|
-
icons="none"
|
|
175
|
-
>
|
|
176
|
-
<sp-menu-item value="1">
|
|
177
|
-
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
178
|
-
Edit
|
|
179
|
-
</sp-menu-item>
|
|
180
|
-
<sp-menu-item value="2">
|
|
181
|
-
<sp-icon-copy slot="icon"></sp-icon-copy>
|
|
182
|
-
Copy
|
|
183
|
-
</sp-menu-item>
|
|
184
|
-
<sp-menu-item value="3">
|
|
185
|
-
<sp-icon-delete slot="icon"></sp-icon-delete>
|
|
186
|
-
Delete
|
|
187
|
-
</sp-menu-item>
|
|
188
|
-
</sp-picker>
|
|
189
|
-
`;
|
|
190
|
-
};
|
|
191
|
-
iconsNone.args = {
|
|
192
|
-
open: true,
|
|
193
|
-
};
|
|
194
|
-
export const iconValue = (args) => {
|
|
195
|
-
return html `
|
|
196
|
-
<sp-field-label for="picker-quiet">
|
|
197
|
-
Choose an action type...
|
|
198
|
-
</sp-field-label>
|
|
199
|
-
<sp-picker
|
|
200
|
-
...=${spreadProps(args)}
|
|
201
|
-
id="picker-quiet"
|
|
202
|
-
@change=${handleChange(args)}
|
|
203
|
-
label="Pick an action"
|
|
204
|
-
icons="only"
|
|
205
|
-
style="--spectrum-picker-width: 100px"
|
|
206
|
-
value="2"
|
|
207
|
-
>
|
|
208
|
-
<sp-menu-item value="1">
|
|
209
|
-
<sp-icon-edit slot="icon"></sp-icon-edit>
|
|
210
|
-
Edit
|
|
211
|
-
</sp-menu-item>
|
|
212
|
-
<sp-menu-item value="2">
|
|
213
|
-
<sp-icon-copy slot="icon"></sp-icon-copy>
|
|
214
|
-
Copy
|
|
215
|
-
</sp-menu-item>
|
|
216
|
-
<sp-menu-item value="3">
|
|
217
|
-
<sp-icon-delete slot="icon"></sp-icon-delete>
|
|
218
|
-
Delete
|
|
219
|
-
</sp-menu-item>
|
|
220
|
-
</sp-picker>
|
|
221
|
-
`;
|
|
222
|
-
};
|
|
223
|
-
export const iconsOnly = (args) => {
|
|
224
|
-
return html `
|
|
225
|
-
<sp-field-label for="picker-quiet">
|
|
226
|
-
Choose an action type...
|
|
227
|
-
</sp-field-label>
|
|
228
|
-
<sp-picker
|
|
229
|
-
...=${spreadProps(args)}
|
|
230
|
-
id="picker-quiet"
|
|
231
|
-
@change=${handleChange(args)}
|
|
232
|
-
label="Pick an action"
|
|
233
|
-
style="--spectrum-picker-width: 100px"
|
|
234
|
-
value="3"
|
|
235
|
-
>
|
|
236
|
-
<sp-menu-item value="1">
|
|
237
|
-
<sp-icon-edit slot="icon" label="Edit"></sp-icon-edit>
|
|
238
|
-
</sp-menu-item>
|
|
239
|
-
<sp-menu-item value="2">
|
|
240
|
-
<sp-icon-copy slot="icon" label="Copy"></sp-icon-copy>
|
|
241
|
-
</sp-menu-item>
|
|
242
|
-
<sp-menu-item value="3">
|
|
243
|
-
<sp-icon-delete slot="icon" label="Delete"></sp-icon-delete>
|
|
244
|
-
</sp-menu-item>
|
|
245
|
-
</sp-picker>
|
|
246
|
-
`;
|
|
247
|
-
};
|
|
248
|
-
iconsOnly.args = {
|
|
249
|
-
open: true,
|
|
250
|
-
};
|
|
251
|
-
export const Open = (args) => {
|
|
252
|
-
return html `
|
|
253
|
-
<style>
|
|
254
|
-
fieldset {
|
|
255
|
-
float: left;
|
|
256
|
-
clear: left;
|
|
257
|
-
margin-bottom: 15px;
|
|
258
|
-
}
|
|
259
|
-
</style>
|
|
260
|
-
<fieldset>
|
|
261
|
-
<sp-field-label for="picker-open">
|
|
262
|
-
Where do you live?
|
|
263
|
-
</sp-field-label>
|
|
264
|
-
<sp-picker
|
|
265
|
-
id="picker-open"
|
|
266
|
-
label="Open picker"
|
|
267
|
-
${spreadProps(args)}
|
|
268
|
-
@change=${handleChange(args)}
|
|
269
|
-
>
|
|
270
|
-
<span slot="label">
|
|
271
|
-
Select a Country with a very long label, too long, in fact
|
|
272
|
-
</span>
|
|
273
|
-
<sp-menu-item>Deselect</sp-menu-item>
|
|
274
|
-
<sp-menu-item>Select Inverse</sp-menu-item>
|
|
275
|
-
<sp-menu-item>Feather...</sp-menu-item>
|
|
276
|
-
<sp-menu-item>Select and Mask...</sp-menu-item>
|
|
277
|
-
<sp-menu-divider></sp-menu-divider>
|
|
278
|
-
<sp-menu-item>Save Selection</sp-menu-item>
|
|
279
|
-
<sp-menu-item disabled>Make Work Path</sp-menu-item>
|
|
280
|
-
</sp-picker>
|
|
281
|
-
</fieldset>
|
|
282
|
-
<fieldset>
|
|
283
|
-
<sp-field-label for="picker-closed">
|
|
284
|
-
Where do you live?
|
|
285
|
-
</sp-field-label>
|
|
286
|
-
<sp-picker
|
|
287
|
-
id="picker-closed"
|
|
288
|
-
label="Picker that displays below the options"
|
|
289
|
-
@change=${handleChange(args)}
|
|
290
|
-
>
|
|
291
|
-
<span slot="label">
|
|
292
|
-
Other menu that goes behind the open one
|
|
293
|
-
</span>
|
|
294
|
-
<sp-menu-item>Not so many options...</sp-menu-item>
|
|
295
|
-
</sp-picker>
|
|
296
|
-
</fieldset>
|
|
297
|
-
`;
|
|
298
|
-
};
|
|
299
|
-
Open.args = {
|
|
300
|
-
open: true,
|
|
301
|
-
};
|
|
302
|
-
export const initialValue = (args) => {
|
|
303
|
-
return html `
|
|
304
|
-
<sp-field-label for="picker-initial">Where do you live?</sp-field-label>
|
|
305
|
-
<sp-picker
|
|
306
|
-
id="picker-initial"
|
|
307
|
-
@change=${handleChange(args)}
|
|
308
|
-
value="item-2"
|
|
309
|
-
${spreadProps(args)}
|
|
310
|
-
>
|
|
311
|
-
<span slot="label">
|
|
312
|
-
Select a Country with a very long label, too long in fact
|
|
313
|
-
</span>
|
|
314
|
-
<sp-menu-item value="item-1">Deselect</sp-menu-item>
|
|
315
|
-
<sp-menu-item value="item-2">Select Inverse</sp-menu-item>
|
|
316
|
-
<sp-menu-item value="item-3">Feather...</sp-menu-item>
|
|
317
|
-
<sp-menu-item value="item-4">Select and Mask...</sp-menu-item>
|
|
318
|
-
<sp-menu-divider></sp-menu-divider>
|
|
319
|
-
<sp-menu-item value="item-5">Save Selection</sp-menu-item>
|
|
320
|
-
<sp-menu-item disabled value="item-6">Make Work Path</sp-menu-item>
|
|
321
|
-
</sp-picker>
|
|
322
|
-
`;
|
|
323
|
-
};
|
|
324
|
-
export const readonly = (args) => {
|
|
325
|
-
return html `
|
|
326
|
-
<sp-picker
|
|
327
|
-
@change=${handleChange(args)}
|
|
328
|
-
readonly
|
|
329
|
-
value="item-2"
|
|
330
|
-
${spreadProps(args)}
|
|
331
|
-
>
|
|
332
|
-
<span slot="label">
|
|
333
|
-
Select a Country with a very long label, too long in fact
|
|
334
|
-
</span>
|
|
335
|
-
<sp-menu-item value="item-1">Deselect</sp-menu-item>
|
|
336
|
-
<sp-menu-item value="item-2">Select Inverse</sp-menu-item>
|
|
337
|
-
<sp-menu-item value="item-3">Feather...</sp-menu-item>
|
|
338
|
-
<sp-menu-item value="item-4">Select and Mask...</sp-menu-item>
|
|
339
|
-
<sp-menu-divider></sp-menu-divider>
|
|
340
|
-
<sp-menu-item value="item-5">Save Selection</sp-menu-item>
|
|
341
|
-
<sp-menu-item disabled value="item-6">Make Work Path</sp-menu-item>
|
|
342
|
-
</sp-picker>
|
|
343
|
-
`;
|
|
344
|
-
};
|
|
345
|
-
export const custom = (args) => {
|
|
346
|
-
const initialState = 'lb1-mo';
|
|
347
|
-
return html `
|
|
348
|
-
<sp-field-label for="picker-state">
|
|
349
|
-
What state do you live in?
|
|
350
|
-
</sp-field-label>
|
|
351
|
-
<sp-picker
|
|
352
|
-
style="width: 400px;"
|
|
353
|
-
@change=${handleChange(args)}
|
|
354
|
-
id="picker-state"
|
|
355
|
-
label="Pick a state"
|
|
356
|
-
${spreadProps(args)}
|
|
357
|
-
value=${initialState}
|
|
358
|
-
>
|
|
359
|
-
${states.map((state) => html `
|
|
360
|
-
<sp-menu-item
|
|
361
|
-
id=${state.id}
|
|
362
|
-
value=${state.id}
|
|
363
|
-
?selected=${state.id === initialState}
|
|
364
|
-
>
|
|
365
|
-
${state.label}
|
|
366
|
-
</sp-menu-item>
|
|
367
|
-
`)}
|
|
368
|
-
</sp-picker>
|
|
369
|
-
<p>This is some text.</p>
|
|
370
|
-
<p>This is some text.</p>
|
|
371
|
-
<p>
|
|
372
|
-
This is a
|
|
373
|
-
<a href="#anchor">link</a>
|
|
374
|
-
.
|
|
375
|
-
</p>
|
|
376
|
-
`;
|
|
377
|
-
};
|
|
378
|
-
custom.args = {
|
|
379
|
-
open: true,
|
|
380
|
-
};
|
|
381
|
-
//# sourceMappingURL=picker.stories.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"picker.stories.js","sourceRoot":"","sources":["picker.stories.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AAEF,OAAO,EAAE,IAAI,EAAkB,MAAM,+BAA+B,CAAC;AAErE,OAAO,iBAAiB,CAAC;AAEzB,OAAO,+CAA+C,CAAC;AACvD,OAAO,kDAAkD,CAAC;AAC1D,OAAO,+DAA+D,CAAC;AACvE,OAAO,+DAA+D,CAAC;AACvE,OAAO,iEAAiE,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,wDAAwD,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAe;IACX,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE;QACF,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,KAAK;QACX,KAAK,EAAE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E;IACtD,MAAM,YAAY,GAAG,QAAQ,CAAC;IAC9B,OAAO,IAAI,CAAA;;;;;;sBAMO,YAAY,CAAC,IAAI,CAAC;;;cAG1B,WAAW,CAAC,IAAI,CAAC;oBACX,YAAY;;cAElB,MAAM,CAAC,GAAG,CACR,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAA;;6BAEF,KAAK,CAAC,EAAE;gCACL,KAAK,CAAC,EAAE;oCACJ,KAAK,CAAC,EAAE,KAAK,YAAY;;0BAEnC,KAAK,CAAC,KAAK;;iBAEpB,CACJ;;;;;;;;;KASR,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,IAAI,GAAG;IACV,IAAI,EAAE,IAAI;CACb,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 { html, TemplateResult } from '@spectrum-web-components/base';\n\nimport '../sp-picker.js';\nimport { Picker } from '../';\nimport '@spectrum-web-components/menu/sp-menu-item.js';\nimport '@spectrum-web-components/menu/sp-menu-divider.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-edit.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-copy.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-delete.js';\nimport { states } from './states.js';\nimport '@spectrum-web-components/field-label/sp-field-label.js';\nimport { spreadProps } from '../../../test/lit-helpers.js';\n\nexport default {\n title: 'Picker',\n component: 'sp-picker',\n args: {\n disabled: false,\n invalid: false,\n open: false,\n quiet: false,\n },\n argTypes: {\n onChange: { action: 'change' },\n disabled: {\n name: 'disabled',\n type: { name: 'boolean', required: false },\n description:\n 'Disable this control. It will not receive focus or events.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n invalid: {\n name: 'invalid',\n type: { name: 'boolean', required: false },\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n open: {\n name: 'open',\n type: { name: 'boolean', required: false },\n description: 'Whether the menu is open or not.',\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: 'boolean',\n },\n quiet: {\n name: 'quiet',\n type: { name: 'boolean', required: false },\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n },\n};\n\ninterface StoryArgs {\n disabled?: boolean;\n invalid?: boolean;\n open?: boolean;\n quiet?: boolean;\n showText?: boolean;\n onChange?: (val: string) => void;\n [prop: string]: unknown;\n}\n\nconst handleChange =\n ({ onChange }: StoryArgs) =>\n (event: Event): void => {\n const picker = event.target as Picker;\n if (onChange) onChange(picker.value);\n };\n\nexport const Default = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-field-label for=\"picker-1\">Where do you live?</sp-field-label>\n <sp-picker\n id=\"picker-1\"\n @change=${handleChange(args)}\n label=\"Select a Country with a very long label, too long, in fact\"\n ${spreadProps(args)}\n >\n <sp-menu-item>Deselect</sp-menu-item>\n <sp-menu-item>Select Inverse</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 <p>This is some text.</p>\n <p>This is some text.</p>\n <p>\n This is a\n <a href=\"#anchor\">link</a>\n .\n </p>\n `;\n};\n\nexport const quiet = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-field-label for=\"picker-quiet\">Where do you live?</sp-field-label>\n <sp-picker\n ${spreadProps(args)}\n id=\"picker-quiet\"\n @change=${handleChange(args)}\n label=\"Pick an item\"\n >\n <sp-menu-item value=\"1\">Item 1</sp-menu-item>\n <sp-menu-item value=\"2\">Item 2</sp-menu-item>\n <sp-menu-item value=\"3\">Item 3</sp-menu-item>\n <sp-menu-item value=\"4\">Item 4</sp-menu-item>\n </sp-picker>\n <p>This is some text.</p>\n <p>This is some text.</p>\n <p>\n This is a\n <a href=\"#anchor\">link</a>\n .\n </p>\n `;\n};\nquiet.args = {\n quiet: true,\n};\n\nexport const icons = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-field-label for=\"picker-quiet\">\n Choose an action type...\n </sp-field-label>\n <sp-picker\n ...=${spreadProps(args)}\n id=\"picker-quiet\"\n @change=${handleChange(args)}\n label=\"Pick an action\"\n value=\"1\"\n >\n <sp-menu-item value=\"1\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n Edit\n </sp-menu-item>\n <sp-menu-item value=\"2\">\n <sp-icon-copy slot=\"icon\"></sp-icon-copy>\n Copy\n </sp-menu-item>\n <sp-menu-item value=\"3\">\n <sp-icon-delete slot=\"icon\"></sp-icon-delete>\n Delete\n </sp-menu-item>\n </sp-picker>\n `;\n};\n\nexport const iconsNone = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-field-label for=\"picker-quiet\">\n Choose an action type...\n </sp-field-label>\n <sp-picker\n ...=${spreadProps(args)}\n id=\"picker-quiet\"\n @change=${handleChange(args)}\n label=\"Pick an action\"\n value=\"1\"\n icons=\"none\"\n >\n <sp-menu-item value=\"1\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n Edit\n </sp-menu-item>\n <sp-menu-item value=\"2\">\n <sp-icon-copy slot=\"icon\"></sp-icon-copy>\n Copy\n </sp-menu-item>\n <sp-menu-item value=\"3\">\n <sp-icon-delete slot=\"icon\"></sp-icon-delete>\n Delete\n </sp-menu-item>\n </sp-picker>\n `;\n};\niconsNone.args = {\n open: true,\n};\n\nexport const iconValue = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-field-label for=\"picker-quiet\">\n Choose an action type...\n </sp-field-label>\n <sp-picker\n ...=${spreadProps(args)}\n id=\"picker-quiet\"\n @change=${handleChange(args)}\n label=\"Pick an action\"\n icons=\"only\"\n style=\"--spectrum-picker-width: 100px\"\n value=\"2\"\n >\n <sp-menu-item value=\"1\">\n <sp-icon-edit slot=\"icon\"></sp-icon-edit>\n Edit\n </sp-menu-item>\n <sp-menu-item value=\"2\">\n <sp-icon-copy slot=\"icon\"></sp-icon-copy>\n Copy\n </sp-menu-item>\n <sp-menu-item value=\"3\">\n <sp-icon-delete slot=\"icon\"></sp-icon-delete>\n Delete\n </sp-menu-item>\n </sp-picker>\n `;\n};\n\nexport const iconsOnly = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-field-label for=\"picker-quiet\">\n Choose an action type...\n </sp-field-label>\n <sp-picker\n ...=${spreadProps(args)}\n id=\"picker-quiet\"\n @change=${handleChange(args)}\n label=\"Pick an action\"\n style=\"--spectrum-picker-width: 100px\"\n value=\"3\"\n >\n <sp-menu-item value=\"1\">\n <sp-icon-edit slot=\"icon\" label=\"Edit\"></sp-icon-edit>\n </sp-menu-item>\n <sp-menu-item value=\"2\">\n <sp-icon-copy slot=\"icon\" label=\"Copy\"></sp-icon-copy>\n </sp-menu-item>\n <sp-menu-item value=\"3\">\n <sp-icon-delete slot=\"icon\" label=\"Delete\"></sp-icon-delete>\n </sp-menu-item>\n </sp-picker>\n `;\n};\niconsOnly.args = {\n open: true,\n};\n\nexport const Open = (args: StoryArgs): TemplateResult => {\n return html`\n <style>\n fieldset {\n float: left;\n clear: left;\n margin-bottom: 15px;\n }\n </style>\n <fieldset>\n <sp-field-label for=\"picker-open\">\n Where do you live?\n </sp-field-label>\n <sp-picker\n id=\"picker-open\"\n label=\"Open picker\"\n ${spreadProps(args)}\n @change=${handleChange(args)}\n >\n <span slot=\"label\">\n Select a Country with a very long label, too long, in fact\n </span>\n <sp-menu-item>Deselect</sp-menu-item>\n <sp-menu-item>Select Inverse</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 </fieldset>\n <fieldset>\n <sp-field-label for=\"picker-closed\">\n Where do you live?\n </sp-field-label>\n <sp-picker\n id=\"picker-closed\"\n label=\"Picker that displays below the options\"\n @change=${handleChange(args)}\n >\n <span slot=\"label\">\n Other menu that goes behind the open one\n </span>\n <sp-menu-item>Not so many options...</sp-menu-item>\n </sp-picker>\n </fieldset>\n `;\n};\nOpen.args = {\n open: true,\n};\n\nexport const initialValue = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-field-label for=\"picker-initial\">Where do you live?</sp-field-label>\n <sp-picker\n id=\"picker-initial\"\n @change=${handleChange(args)}\n value=\"item-2\"\n ${spreadProps(args)}\n >\n <span slot=\"label\">\n Select a Country with a very long label, too long in fact\n </span>\n <sp-menu-item value=\"item-1\">Deselect</sp-menu-item>\n <sp-menu-item value=\"item-2\">Select Inverse</sp-menu-item>\n <sp-menu-item value=\"item-3\">Feather...</sp-menu-item>\n <sp-menu-item value=\"item-4\">Select and Mask...</sp-menu-item>\n <sp-menu-divider></sp-menu-divider>\n <sp-menu-item value=\"item-5\">Save Selection</sp-menu-item>\n <sp-menu-item disabled value=\"item-6\">Make Work Path</sp-menu-item>\n </sp-picker>\n `;\n};\n\nexport const readonly = (args: StoryArgs): TemplateResult => {\n return html`\n <sp-picker\n @change=${handleChange(args)}\n readonly\n value=\"item-2\"\n ${spreadProps(args)}\n >\n <span slot=\"label\">\n Select a Country with a very long label, too long in fact\n </span>\n <sp-menu-item value=\"item-1\">Deselect</sp-menu-item>\n <sp-menu-item value=\"item-2\">Select Inverse</sp-menu-item>\n <sp-menu-item value=\"item-3\">Feather...</sp-menu-item>\n <sp-menu-item value=\"item-4\">Select and Mask...</sp-menu-item>\n <sp-menu-divider></sp-menu-divider>\n <sp-menu-item value=\"item-5\">Save Selection</sp-menu-item>\n <sp-menu-item disabled value=\"item-6\">Make Work Path</sp-menu-item>\n </sp-picker>\n `;\n};\n\nexport const custom = (args: StoryArgs): TemplateResult => {\n const initialState = 'lb1-mo';\n return html`\n <sp-field-label for=\"picker-state\">\n What state do you live in?\n </sp-field-label>\n <sp-picker\n style=\"width: 400px;\"\n @change=${handleChange(args)}\n id=\"picker-state\"\n label=\"Pick a state\"\n ${spreadProps(args)}\n value=${initialState}\n >\n ${states.map(\n (state) => html`\n <sp-menu-item\n id=${state.id}\n value=${state.id}\n ?selected=${state.id === initialState}\n >\n ${state.label}\n </sp-menu-item>\n `\n )}\n </sp-picker>\n <p>This is some text.</p>\n <p>This is some text.</p>\n <p>\n This is a\n <a href=\"#anchor\">link</a>\n .\n </p>\n `;\n};\n\ncustom.args = {\n open: true,\n};\n"]}
|
package/stories/states.js
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
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
|
-
export const states = [
|
|
13
|
-
{
|
|
14
|
-
id: 'lb1-al',
|
|
15
|
-
label: 'Alabama',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
id: 'lb1-ak',
|
|
19
|
-
label: 'Alaska',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: 'lb1-as',
|
|
23
|
-
label: 'American Samoa',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: 'lb1-az',
|
|
27
|
-
label: 'Arizona',
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
id: 'lb1-ar',
|
|
31
|
-
label: 'Arkansas',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
id: 'lb1-ca',
|
|
35
|
-
label: 'California',
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: 'lb1-co',
|
|
39
|
-
label: 'Colorado',
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: 'lb1-ct',
|
|
43
|
-
label: 'Connecticut',
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
id: 'lb1-de',
|
|
47
|
-
label: 'Delaware',
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
id: 'lb1-dc',
|
|
51
|
-
label: 'District of Columbia',
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: 'lb1-fl',
|
|
55
|
-
label: 'Florida',
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: 'lb1-ga',
|
|
59
|
-
label: 'Georgia',
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: 'lb1-gm',
|
|
63
|
-
label: 'Guam',
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: 'lb1-hi',
|
|
67
|
-
label: 'Hawaii',
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
id: 'lb1-id',
|
|
71
|
-
label: 'Idaho',
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: 'lb1-il',
|
|
75
|
-
label: 'Illinois',
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
id: 'lb1-in',
|
|
79
|
-
label: 'Indiana',
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
id: 'lb1-ia',
|
|
83
|
-
label: 'Iowa',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
id: 'lb1-ks',
|
|
87
|
-
label: 'Kansas',
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: 'lb1-ky',
|
|
91
|
-
label: 'Kentucky',
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
id: 'lb1-la',
|
|
95
|
-
label: 'Louisiana',
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: 'lb1-me',
|
|
99
|
-
label: 'Maine',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
id: 'lb1-md',
|
|
103
|
-
label: 'Maryland',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
id: 'lb1-ma',
|
|
107
|
-
label: 'Massachusetts',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: 'lb1-mi',
|
|
111
|
-
label: 'Michigan',
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: 'lb1-mn',
|
|
115
|
-
label: 'Minnesota',
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
id: 'lb1-ms',
|
|
119
|
-
label: 'Mississippi',
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
id: 'lb1-mo',
|
|
123
|
-
label: 'Missouri',
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: 'lb1-mt',
|
|
127
|
-
label: 'Montana',
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: 'lb1-ne',
|
|
131
|
-
label: 'Nebraska',
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
id: 'lb1-nv',
|
|
135
|
-
label: 'Nevada',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
id: 'lb1-nh',
|
|
139
|
-
label: 'New Hampshire',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: 'lb1-nj',
|
|
143
|
-
label: 'New Jersey',
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
id: 'lb1-nm',
|
|
147
|
-
label: 'New Mexico',
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
id: 'lb1-ny',
|
|
151
|
-
label: 'New York',
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
id: 'lb1-nc',
|
|
155
|
-
label: 'North Carolina',
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: 'lb1-nd',
|
|
159
|
-
label: 'North Dakota',
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
id: 'lb1-mp',
|
|
163
|
-
label: 'Northern Marianas Islands',
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
id: 'lb1-oh',
|
|
167
|
-
label: 'Ohio',
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
id: 'lb1-ok',
|
|
171
|
-
label: 'Oklahoma',
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
id: 'lb1-or',
|
|
175
|
-
label: 'Oregon',
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
id: 'lb1-pa',
|
|
179
|
-
label: 'Pennsylvania',
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
id: 'lb1-pr',
|
|
183
|
-
label: 'Puerto Rico',
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
id: 'lb1-ri',
|
|
187
|
-
label: 'Rhode Island',
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
id: 'lb1-sc',
|
|
191
|
-
label: 'South Carolina',
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
id: 'lb1-sd',
|
|
195
|
-
label: 'South Dakota',
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
id: 'lb1-tn',
|
|
199
|
-
label: 'Tennessee',
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
id: 'lb1-tx',
|
|
203
|
-
label: 'Texas',
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
id: 'lb1-ut',
|
|
207
|
-
label: 'Utah',
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
id: 'lb1-ve',
|
|
211
|
-
label: 'Vermont',
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
id: 'lb1-va',
|
|
215
|
-
label: 'Virginia',
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
id: 'lb1-vi',
|
|
219
|
-
label: 'Virgin Islands',
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
id: 'lb1-wa',
|
|
223
|
-
label: 'Washington',
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
id: 'lb1-wv',
|
|
227
|
-
label: 'West Virginia',
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
id: 'lb1-wi',
|
|
231
|
-
label: 'Wisconsin',
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
id: 'lb1-wy',
|
|
235
|
-
label: 'Wyoming',
|
|
236
|
-
},
|
|
237
|
-
];
|
|
238
|
-
//# sourceMappingURL=states.js.map
|
package/stories/states.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"states.js","sourceRoot":"","sources":["states.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;EAUE;AACF,MAAM,CAAC,MAAM,MAAM,GAGb;IACF;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,SAAS;KACnB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,QAAQ;KAClB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,gBAAgB;KAC1B;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,SAAS;KACnB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,UAAU;KACpB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,YAAY;KACtB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,UAAU;KACpB;IACD;QACI,EAAE,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,MAAM;KAChB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,SAAS;KACnB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,UAAU;KACpB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,gBAAgB;KAC1B;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,YAAY;KACtB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,eAAe;KACzB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,WAAW;KACrB;IACD;QACI,EAAE,EAAE,QAAQ;QACZ,KAAK,EAAE,SAAS;KACnB;CACJ,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*/\nexport const states: {\n id: string;\n label: string;\n}[] = [\n {\n id: 'lb1-al',\n label: 'Alabama',\n },\n {\n id: 'lb1-ak',\n label: 'Alaska',\n },\n {\n id: 'lb1-as',\n label: 'American Samoa',\n },\n {\n id: 'lb1-az',\n label: 'Arizona',\n },\n {\n id: 'lb1-ar',\n label: 'Arkansas',\n },\n {\n id: 'lb1-ca',\n label: 'California',\n },\n {\n id: 'lb1-co',\n label: 'Colorado',\n },\n {\n id: 'lb1-ct',\n label: 'Connecticut',\n },\n {\n id: 'lb1-de',\n label: 'Delaware',\n },\n {\n id: 'lb1-dc',\n label: 'District of Columbia',\n },\n {\n id: 'lb1-fl',\n label: 'Florida',\n },\n {\n id: 'lb1-ga',\n label: 'Georgia',\n },\n {\n id: 'lb1-gm',\n label: 'Guam',\n },\n {\n id: 'lb1-hi',\n label: 'Hawaii',\n },\n {\n id: 'lb1-id',\n label: 'Idaho',\n },\n {\n id: 'lb1-il',\n label: 'Illinois',\n },\n {\n id: 'lb1-in',\n label: 'Indiana',\n },\n {\n id: 'lb1-ia',\n label: 'Iowa',\n },\n {\n id: 'lb1-ks',\n label: 'Kansas',\n },\n {\n id: 'lb1-ky',\n label: 'Kentucky',\n },\n {\n id: 'lb1-la',\n label: 'Louisiana',\n },\n {\n id: 'lb1-me',\n label: 'Maine',\n },\n {\n id: 'lb1-md',\n label: 'Maryland',\n },\n {\n id: 'lb1-ma',\n label: 'Massachusetts',\n },\n {\n id: 'lb1-mi',\n label: 'Michigan',\n },\n {\n id: 'lb1-mn',\n label: 'Minnesota',\n },\n {\n id: 'lb1-ms',\n label: 'Mississippi',\n },\n {\n id: 'lb1-mo',\n label: 'Missouri',\n },\n {\n id: 'lb1-mt',\n label: 'Montana',\n },\n {\n id: 'lb1-ne',\n label: 'Nebraska',\n },\n {\n id: 'lb1-nv',\n label: 'Nevada',\n },\n {\n id: 'lb1-nh',\n label: 'New Hampshire',\n },\n {\n id: 'lb1-nj',\n label: 'New Jersey',\n },\n {\n id: 'lb1-nm',\n label: 'New Mexico',\n },\n {\n id: 'lb1-ny',\n label: 'New York',\n },\n {\n id: 'lb1-nc',\n label: 'North Carolina',\n },\n {\n id: 'lb1-nd',\n label: 'North Dakota',\n },\n {\n id: 'lb1-mp',\n label: 'Northern Marianas Islands',\n },\n {\n id: 'lb1-oh',\n label: 'Ohio',\n },\n {\n id: 'lb1-ok',\n label: 'Oklahoma',\n },\n {\n id: 'lb1-or',\n label: 'Oregon',\n },\n {\n id: 'lb1-pa',\n label: 'Pennsylvania',\n },\n {\n id: 'lb1-pr',\n label: 'Puerto Rico',\n },\n {\n id: 'lb1-ri',\n label: 'Rhode Island',\n },\n {\n id: 'lb1-sc',\n label: 'South Carolina',\n },\n {\n id: 'lb1-sd',\n label: 'South Dakota',\n },\n {\n id: 'lb1-tn',\n label: 'Tennessee',\n },\n {\n id: 'lb1-tx',\n label: 'Texas',\n },\n {\n id: 'lb1-ut',\n label: 'Utah',\n },\n {\n id: 'lb1-ve',\n label: 'Vermont',\n },\n {\n id: 'lb1-va',\n label: 'Virginia',\n },\n {\n id: 'lb1-vi',\n label: 'Virgin Islands',\n },\n {\n id: 'lb1-wa',\n label: 'Washington',\n },\n {\n id: 'lb1-wv',\n label: 'West Virginia',\n },\n {\n id: 'lb1-wi',\n label: 'Wisconsin',\n },\n {\n id: 'lb1-wy',\n label: 'Wyoming',\n },\n];\n"]}
|
package/sync/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|