@spectrum-web-components/swatch 1.0.0 → 1.1.0-beta.1

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/swatch",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-beta.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -69,12 +69,12 @@
69
69
  ],
70
70
  "dependencies": {
71
71
  "@lit-labs/observers": "^2.0.2",
72
- "@spectrum-web-components/base": "^1.0.0",
73
- "@spectrum-web-components/icon": "^1.0.0",
74
- "@spectrum-web-components/icons-ui": "^1.0.0",
75
- "@spectrum-web-components/opacity-checkerboard": "^1.0.0",
76
- "@spectrum-web-components/reactive-controllers": "^1.0.0",
77
- "@spectrum-web-components/shared": "^1.0.0"
72
+ "@spectrum-web-components/base": "^1.1.0-beta.1",
73
+ "@spectrum-web-components/icon": "^1.1.0-beta.1",
74
+ "@spectrum-web-components/icons-ui": "^1.1.0-beta.1",
75
+ "@spectrum-web-components/opacity-checkerboard": "^1.1.0-beta.1",
76
+ "@spectrum-web-components/reactive-controllers": "^1.1.0-beta.1",
77
+ "@spectrum-web-components/shared": "^1.1.0-beta.1"
78
78
  },
79
79
  "devDependencies": {
80
80
  "@spectrum-css/swatch": "^7.0.0-s2-foundations.17",
@@ -86,5 +86,5 @@
86
86
  "./sp-*.js",
87
87
  "./**/*.dev.js"
88
88
  ],
89
- "gitHead": "5cf5d34645bf9494ebd20f64c42d1619523d2d84"
89
+ "gitHead": "3a50fd95f2aa2e05d05ae3e5307dfac05b19aba1"
90
90
  }
@@ -1,626 +0,0 @@
1
- {
2
- "schemaVersion": "1.0.0",
3
- "readme": "",
4
- "modules": [
5
- {
6
- "kind": "javascript-module",
7
- "path": "sp-swatch-group.js",
8
- "declarations": [],
9
- "exports": [
10
- {
11
- "kind": "custom-element-definition",
12
- "name": "sp-swatch-group",
13
- "declaration": {
14
- "name": "SwatchGroup",
15
- "module": "/src/SwatchGroup.js"
16
- }
17
- }
18
- ]
19
- },
20
- {
21
- "kind": "javascript-module",
22
- "path": "sp-swatch.js",
23
- "declarations": [],
24
- "exports": [
25
- {
26
- "kind": "custom-element-definition",
27
- "name": "sp-swatch",
28
- "declaration": {
29
- "name": "Swatch",
30
- "module": "/src/Swatch.js"
31
- }
32
- }
33
- ]
34
- },
35
- {
36
- "kind": "javascript-module",
37
- "path": "src/Swatch.js",
38
- "declarations": [
39
- {
40
- "kind": "class",
41
- "description": "",
42
- "name": "Swatch",
43
- "members": [
44
- {
45
- "kind": "field",
46
- "name": "border",
47
- "type": {
48
- "text": "SwatchBorder"
49
- },
50
- "privacy": "public",
51
- "attribute": "border",
52
- "reflects": true
53
- },
54
- {
55
- "kind": "field",
56
- "name": "color",
57
- "type": {
58
- "text": "string"
59
- },
60
- "privacy": "public",
61
- "default": "''",
62
- "attribute": "color"
63
- },
64
- {
65
- "kind": "field",
66
- "name": "label",
67
- "type": {
68
- "text": "string"
69
- },
70
- "privacy": "public",
71
- "default": "''",
72
- "attribute": "label"
73
- },
74
- {
75
- "kind": "field",
76
- "name": "mixedValue",
77
- "type": {
78
- "text": "boolean"
79
- },
80
- "privacy": "public",
81
- "default": "false",
82
- "attribute": "mixed-value",
83
- "reflects": true
84
- },
85
- {
86
- "kind": "field",
87
- "name": "nothing",
88
- "type": {
89
- "text": "boolean"
90
- },
91
- "privacy": "public",
92
- "default": "false",
93
- "attribute": "nothing",
94
- "reflects": true
95
- },
96
- {
97
- "kind": "field",
98
- "name": "role",
99
- "type": {
100
- "text": "string"
101
- },
102
- "privacy": "public",
103
- "default": "'button'",
104
- "attribute": "role",
105
- "reflects": true
106
- },
107
- {
108
- "kind": "field",
109
- "name": "rounding",
110
- "type": {
111
- "text": "SwatchRounding"
112
- },
113
- "privacy": "public",
114
- "attribute": "rounding",
115
- "reflects": true
116
- },
117
- {
118
- "kind": "field",
119
- "name": "selected",
120
- "type": {
121
- "text": "boolean"
122
- },
123
- "privacy": "public",
124
- "default": "false",
125
- "attribute": "selected",
126
- "reflects": true
127
- },
128
- {
129
- "kind": "field",
130
- "name": "shape",
131
- "type": {
132
- "text": "SwatchShape"
133
- },
134
- "privacy": "public",
135
- "attribute": "shape",
136
- "reflects": true
137
- },
138
- {
139
- "kind": "field",
140
- "name": "value",
141
- "type": {
142
- "text": "string"
143
- },
144
- "attribute": "value"
145
- },
146
- {
147
- "kind": "field",
148
- "name": "_value",
149
- "type": {
150
- "text": "string | undefined"
151
- },
152
- "privacy": "private"
153
- },
154
- {
155
- "kind": "field",
156
- "name": "focusElement",
157
- "type": {
158
- "text": "HTMLElement"
159
- },
160
- "privacy": "public",
161
- "readonly": true
162
- },
163
- {
164
- "kind": "method",
165
- "name": "toggle",
166
- "privacy": "public",
167
- "return": {
168
- "type": {
169
- "text": "void"
170
- }
171
- },
172
- "parameters": [
173
- {
174
- "name": "force",
175
- "optional": true,
176
- "type": {
177
- "text": "boolean"
178
- }
179
- }
180
- ]
181
- },
182
- {
183
- "kind": "method",
184
- "name": "handleClick",
185
- "privacy": "private",
186
- "return": {
187
- "type": {
188
- "text": "void"
189
- }
190
- }
191
- },
192
- {
193
- "kind": "method",
194
- "name": "handleKeydown",
195
- "privacy": "protected",
196
- "return": {
197
- "type": {
198
- "text": "void"
199
- }
200
- },
201
- "parameters": [
202
- {
203
- "name": "event",
204
- "type": {
205
- "text": "KeyboardEvent"
206
- }
207
- }
208
- ]
209
- },
210
- {
211
- "kind": "method",
212
- "name": "handleKeypress",
213
- "privacy": "private",
214
- "return": {
215
- "type": {
216
- "text": "void"
217
- }
218
- },
219
- "parameters": [
220
- {
221
- "name": "event",
222
- "type": {
223
- "text": "KeyboardEvent"
224
- }
225
- }
226
- ]
227
- },
228
- {
229
- "kind": "method",
230
- "name": "handleKeyup",
231
- "privacy": "protected",
232
- "return": {
233
- "type": {
234
- "text": "void"
235
- }
236
- },
237
- "parameters": [
238
- {
239
- "name": "event",
240
- "type": {
241
- "text": "KeyboardEvent"
242
- }
243
- }
244
- ]
245
- },
246
- {
247
- "kind": "field",
248
- "name": "renderDisabled",
249
- "privacy": "protected"
250
- },
251
- {
252
- "kind": "field",
253
- "name": "renderMixedValue",
254
- "privacy": "protected"
255
- }
256
- ],
257
- "events": [
258
- {
259
- "name": "change",
260
- "type": {
261
- "text": "Event"
262
- }
263
- }
264
- ],
265
- "attributes": [
266
- {
267
- "name": "border",
268
- "type": {
269
- "text": "SwatchBorder"
270
- },
271
- "fieldName": "border"
272
- },
273
- {
274
- "name": "color",
275
- "type": {
276
- "text": "string"
277
- },
278
- "default": "''",
279
- "fieldName": "color"
280
- },
281
- {
282
- "name": "label",
283
- "type": {
284
- "text": "string"
285
- },
286
- "default": "''",
287
- "fieldName": "label"
288
- },
289
- {
290
- "name": "mixed-value",
291
- "type": {
292
- "text": "boolean"
293
- },
294
- "default": "false",
295
- "fieldName": "mixedValue"
296
- },
297
- {
298
- "name": "nothing",
299
- "type": {
300
- "text": "boolean"
301
- },
302
- "default": "false",
303
- "fieldName": "nothing"
304
- },
305
- {
306
- "name": "role",
307
- "type": {
308
- "text": "string"
309
- },
310
- "default": "'button'",
311
- "fieldName": "role"
312
- },
313
- {
314
- "name": "rounding",
315
- "type": {
316
- "text": "SwatchRounding"
317
- },
318
- "fieldName": "rounding"
319
- },
320
- {
321
- "name": "selected",
322
- "type": {
323
- "text": "boolean"
324
- },
325
- "default": "false",
326
- "fieldName": "selected"
327
- },
328
- {
329
- "name": "shape",
330
- "type": {
331
- "text": "SwatchShape"
332
- },
333
- "fieldName": "shape"
334
- },
335
- {
336
- "name": "value",
337
- "type": {
338
- "text": "string"
339
- },
340
- "fieldName": "value"
341
- }
342
- ],
343
- "mixins": [
344
- {
345
- "name": "SizedMixin",
346
- "package": "@spectrum-web-components/base"
347
- }
348
- ],
349
- "superclass": {
350
- "name": "Focusable",
351
- "package": "@spectrum-web-components/shared/src/focusable.js"
352
- },
353
- "tagName": "sp-swatch",
354
- "customElement": true
355
- }
356
- ],
357
- "exports": [
358
- {
359
- "kind": "js",
360
- "name": "Swatch",
361
- "declaration": {
362
- "name": "Swatch",
363
- "module": "src/Swatch.js"
364
- }
365
- }
366
- ]
367
- },
368
- {
369
- "kind": "javascript-module",
370
- "path": "src/SwatchGroup.js",
371
- "declarations": [
372
- {
373
- "kind": "class",
374
- "description": "",
375
- "name": "SwatchGroup",
376
- "slots": [
377
- {
378
- "description": "Swatch elements to manage as a group",
379
- "name": ""
380
- }
381
- ],
382
- "members": [
383
- {
384
- "kind": "field",
385
- "name": "border",
386
- "type": {
387
- "text": "SwatchBorder"
388
- },
389
- "privacy": "public",
390
- "attribute": "border",
391
- "reflects": true
392
- },
393
- {
394
- "kind": "field",
395
- "name": "density",
396
- "type": {
397
- "text": "'compact' | 'spacious' | undefined"
398
- },
399
- "privacy": "public",
400
- "attribute": "density",
401
- "reflects": true
402
- },
403
- {
404
- "kind": "field",
405
- "name": "rounding",
406
- "type": {
407
- "text": "SwatchRounding"
408
- },
409
- "privacy": "public",
410
- "attribute": "rounding",
411
- "reflects": true
412
- },
413
- {
414
- "kind": "field",
415
- "name": "selected",
416
- "type": {
417
- "text": "string[]"
418
- },
419
- "privacy": "public",
420
- "attribute": "selected"
421
- },
422
- {
423
- "kind": "field",
424
- "name": "_selected",
425
- "type": {
426
- "text": "string[]"
427
- },
428
- "privacy": "private",
429
- "default": "[]"
430
- },
431
- {
432
- "kind": "field",
433
- "name": "selects",
434
- "type": {
435
- "text": "SwatchSelects"
436
- },
437
- "privacy": "public",
438
- "attribute": "selects"
439
- },
440
- {
441
- "kind": "field",
442
- "name": "selectedSet",
443
- "privacy": "private",
444
- "default": "new Set<string>()"
445
- },
446
- {
447
- "kind": "field",
448
- "name": "shape",
449
- "type": {
450
- "text": "SwatchShape"
451
- },
452
- "privacy": "public",
453
- "attribute": "shape",
454
- "reflects": true
455
- },
456
- {
457
- "kind": "field",
458
- "name": "swatches",
459
- "type": {
460
- "text": "Swatch[]"
461
- },
462
- "privacy": "public"
463
- },
464
- {
465
- "kind": "field",
466
- "name": "rovingTabindexController",
467
- "default": "new RovingTabindexController<Swatch>(this, {\n focusInIndex: (elements: Swatch[]) => {\n let firstEnabledIndex = -1;\n const firstSelectedIndex = elements.findIndex((el, index) => {\n if (!elements[firstEnabledIndex] && !el.disabled) {\n firstEnabledIndex = index;\n }\n return el.selected && !el.disabled;\n });\n return elements[firstSelectedIndex]\n ? firstSelectedIndex\n : firstEnabledIndex;\n },\n elements: () => this.swatches,\n isFocusableElement: (el: Swatch) => !el.disabled,\n })"
468
- },
469
- {
470
- "kind": "method",
471
- "name": "focus",
472
- "privacy": "public",
473
- "return": {
474
- "type": {
475
- "text": "void"
476
- }
477
- },
478
- "parameters": [
479
- {
480
- "name": "options",
481
- "optional": true,
482
- "type": {
483
- "text": "FocusOptions"
484
- }
485
- }
486
- ]
487
- },
488
- {
489
- "kind": "method",
490
- "name": "handleChange",
491
- "privacy": "protected",
492
- "return": {
493
- "type": {
494
- "text": "void"
495
- }
496
- },
497
- "parameters": [
498
- {
499
- "name": "event",
500
- "type": {
501
- "text": "Event & { target: Swatch }"
502
- }
503
- }
504
- ]
505
- },
506
- {
507
- "kind": "field",
508
- "name": "manageChange",
509
- "privacy": "private"
510
- },
511
- {
512
- "kind": "method",
513
- "name": "getPassthroughSwatchActions",
514
- "privacy": "private",
515
- "return": {
516
- "type": {
517
- "text": "((swatch: Swatch) => void)[]"
518
- }
519
- },
520
- "parameters": [
521
- {
522
- "name": "changes",
523
- "type": {
524
- "text": "PropertyValues"
525
- }
526
- }
527
- ]
528
- },
529
- {
530
- "kind": "method",
531
- "name": "getSelectionSwatchActions",
532
- "privacy": "private",
533
- "return": {
534
- "type": {
535
- "text": "((swatch: Swatch) => void)[]"
536
- }
537
- },
538
- "parameters": [
539
- {
540
- "name": "changes",
541
- "type": {
542
- "text": "PropertyValues"
543
- }
544
- }
545
- ]
546
- }
547
- ],
548
- "events": [
549
- {
550
- "name": "change",
551
- "type": {
552
- "text": "Event"
553
- }
554
- }
555
- ],
556
- "attributes": [
557
- {
558
- "name": "border",
559
- "type": {
560
- "text": "SwatchBorder"
561
- },
562
- "fieldName": "border"
563
- },
564
- {
565
- "name": "density",
566
- "type": {
567
- "text": "'compact' | 'spacious' | undefined"
568
- },
569
- "fieldName": "density"
570
- },
571
- {
572
- "name": "rounding",
573
- "type": {
574
- "text": "SwatchRounding"
575
- },
576
- "fieldName": "rounding"
577
- },
578
- {
579
- "name": "selected",
580
- "type": {
581
- "text": "string[]"
582
- },
583
- "fieldName": "selected"
584
- },
585
- {
586
- "name": "selects",
587
- "type": {
588
- "text": "SwatchSelects"
589
- },
590
- "fieldName": "selects"
591
- },
592
- {
593
- "name": "shape",
594
- "type": {
595
- "text": "SwatchShape"
596
- },
597
- "fieldName": "shape"
598
- }
599
- ],
600
- "mixins": [
601
- {
602
- "name": "SizedMixin",
603
- "package": "@spectrum-web-components/base"
604
- }
605
- ],
606
- "superclass": {
607
- "name": "SpectrumElement",
608
- "package": "@spectrum-web-components/base"
609
- },
610
- "tagName": "sp-swatch-group",
611
- "customElement": true
612
- }
613
- ],
614
- "exports": [
615
- {
616
- "kind": "js",
617
- "name": "SwatchGroup",
618
- "declaration": {
619
- "name": "SwatchGroup",
620
- "module": "src/SwatchGroup.js"
621
- }
622
- }
623
- ]
624
- }
625
- ]
626
- }