@spectrum-web-components/swatch 0.31.1-overlay.29 → 0.31.1-react.21

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.
@@ -0,0 +1,618 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "sp-swatch-group.ts",
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.ts",
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.ts",
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.ts"
364
+ }
365
+ }
366
+ ]
367
+ },
368
+ {
369
+ "kind": "javascript-module",
370
+ "path": "src/SwatchGroup.ts",
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": "rounding",
396
+ "type": {
397
+ "text": "SwatchRounding"
398
+ },
399
+ "privacy": "public",
400
+ "attribute": "rounding",
401
+ "reflects": true
402
+ },
403
+ {
404
+ "kind": "field",
405
+ "name": "selected",
406
+ "type": {
407
+ "text": "string[]"
408
+ },
409
+ "privacy": "public",
410
+ "attribute": "selected"
411
+ },
412
+ {
413
+ "kind": "field",
414
+ "name": "_selected",
415
+ "type": {
416
+ "text": "string[]"
417
+ },
418
+ "privacy": "private",
419
+ "default": "[]"
420
+ },
421
+ {
422
+ "kind": "field",
423
+ "name": "selects",
424
+ "type": {
425
+ "text": "'single' | 'multiple' | undefined"
426
+ },
427
+ "privacy": "public",
428
+ "attribute": "selects"
429
+ },
430
+ {
431
+ "kind": "field",
432
+ "name": "selectedSet",
433
+ "privacy": "private",
434
+ "default": "new Set<string>()"
435
+ },
436
+ {
437
+ "kind": "field",
438
+ "name": "shape",
439
+ "type": {
440
+ "text": "SwatchShape"
441
+ },
442
+ "privacy": "public",
443
+ "attribute": "shape",
444
+ "reflects": true
445
+ },
446
+ {
447
+ "kind": "field",
448
+ "name": "density",
449
+ "type": {
450
+ "text": "'compact' | 'spacious' | undefined"
451
+ },
452
+ "privacy": "public",
453
+ "attribute": "density",
454
+ "reflects": true
455
+ },
456
+ {
457
+ "kind": "field",
458
+ "name": "rovingTabindexController",
459
+ "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.children] as Swatch[],\n isFocusableElement: (el: Swatch) => !el.disabled,\n })"
460
+ },
461
+ {
462
+ "kind": "method",
463
+ "name": "focus",
464
+ "privacy": "public",
465
+ "return": {
466
+ "type": {
467
+ "text": "void"
468
+ }
469
+ },
470
+ "parameters": [
471
+ {
472
+ "name": "options",
473
+ "optional": true,
474
+ "type": {
475
+ "text": "FocusOptions"
476
+ }
477
+ }
478
+ ]
479
+ },
480
+ {
481
+ "kind": "method",
482
+ "name": "handleChange",
483
+ "privacy": "protected",
484
+ "return": {
485
+ "type": {
486
+ "text": "void"
487
+ }
488
+ },
489
+ "parameters": [
490
+ {
491
+ "name": "event",
492
+ "type": {
493
+ "text": "Event & { target: Swatch }"
494
+ }
495
+ }
496
+ ]
497
+ },
498
+ {
499
+ "kind": "field",
500
+ "name": "manageChange",
501
+ "privacy": "private"
502
+ },
503
+ {
504
+ "kind": "method",
505
+ "name": "getPassthroughSwatchActions",
506
+ "privacy": "private",
507
+ "return": {
508
+ "type": {
509
+ "text": "((swatch: Swatch) => void)[]"
510
+ }
511
+ },
512
+ "parameters": [
513
+ {
514
+ "name": "changes",
515
+ "type": {
516
+ "text": "PropertyValues"
517
+ }
518
+ }
519
+ ]
520
+ },
521
+ {
522
+ "kind": "method",
523
+ "name": "getSelectionSwatchActions",
524
+ "privacy": "private",
525
+ "return": {
526
+ "type": {
527
+ "text": "((swatch: Swatch) => void)[]"
528
+ }
529
+ },
530
+ "parameters": [
531
+ {
532
+ "name": "changes",
533
+ "type": {
534
+ "text": "PropertyValues"
535
+ }
536
+ }
537
+ ]
538
+ }
539
+ ],
540
+ "events": [
541
+ {
542
+ "name": "change",
543
+ "type": {
544
+ "text": "Event"
545
+ }
546
+ }
547
+ ],
548
+ "attributes": [
549
+ {
550
+ "name": "border",
551
+ "type": {
552
+ "text": "SwatchBorder"
553
+ },
554
+ "fieldName": "border"
555
+ },
556
+ {
557
+ "name": "rounding",
558
+ "type": {
559
+ "text": "SwatchRounding"
560
+ },
561
+ "fieldName": "rounding"
562
+ },
563
+ {
564
+ "name": "selected",
565
+ "type": {
566
+ "text": "string[]"
567
+ },
568
+ "fieldName": "selected"
569
+ },
570
+ {
571
+ "name": "selects",
572
+ "type": {
573
+ "text": "'single' | 'multiple' | undefined"
574
+ },
575
+ "fieldName": "selects"
576
+ },
577
+ {
578
+ "name": "shape",
579
+ "type": {
580
+ "text": "SwatchShape"
581
+ },
582
+ "fieldName": "shape"
583
+ },
584
+ {
585
+ "name": "density",
586
+ "type": {
587
+ "text": "'compact' | 'spacious' | undefined"
588
+ },
589
+ "fieldName": "density"
590
+ }
591
+ ],
592
+ "mixins": [
593
+ {
594
+ "name": "SizedMixin",
595
+ "package": "@spectrum-web-components/base"
596
+ }
597
+ ],
598
+ "superclass": {
599
+ "name": "SpectrumElement",
600
+ "package": "@spectrum-web-components/base"
601
+ },
602
+ "tagName": "sp-swatch-group",
603
+ "customElement": true
604
+ }
605
+ ],
606
+ "exports": [
607
+ {
608
+ "kind": "js",
609
+ "name": "SwatchGroup",
610
+ "declaration": {
611
+ "name": "SwatchGroup",
612
+ "module": "src/SwatchGroup.ts"
613
+ }
614
+ }
615
+ ]
616
+ }
617
+ ]
618
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/swatch",
3
- "version": "0.31.1-overlay.29+93d3f11dd",
3
+ "version": "0.31.1-react.21+44f0b1df9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -67,15 +67,15 @@
67
67
  ],
68
68
  "dependencies": {
69
69
  "@lit-labs/observers": "^2.0.0",
70
- "@spectrum-web-components/base": "^0.31.1-overlay.29+93d3f11dd",
71
- "@spectrum-web-components/icon": "^0.31.1-overlay.29+93d3f11dd",
72
- "@spectrum-web-components/icons-ui": "^0.31.1-overlay.29+93d3f11dd",
73
- "@spectrum-web-components/reactive-controllers": "^0.31.1-overlay.29+93d3f11dd",
74
- "@spectrum-web-components/shared": "^0.31.1-overlay.29+93d3f11dd"
70
+ "@spectrum-web-components/base": "^0.31.1-react.21+44f0b1df9",
71
+ "@spectrum-web-components/icon": "^0.31.1-react.21+44f0b1df9",
72
+ "@spectrum-web-components/icons-ui": "^0.31.1-react.21+44f0b1df9",
73
+ "@spectrum-web-components/reactive-controllers": "^0.31.1-react.21+44f0b1df9",
74
+ "@spectrum-web-components/shared": "^0.31.1-react.21+44f0b1df9"
75
75
  },
76
76
  "devDependencies": {
77
- "@spectrum-css/swatch": "^4.0.14",
78
- "@spectrum-css/swatchgroup": "^2.0.35"
77
+ "@spectrum-css/swatch": "^4.0.19",
78
+ "@spectrum-css/swatchgroup": "^2.0.43"
79
79
  },
80
80
  "types": "./src/index.d.ts",
81
81
  "customElements": "custom-elements.json",
@@ -83,5 +83,5 @@
83
83
  "./sp-*.js",
84
84
  "./**/*.dev.js"
85
85
  ],
86
- "gitHead": "93d3f11dde0f578bd1ddcf7fbb78b02916fdfbe0"
86
+ "gitHead": "44f0b1df9e1ea77d9e931629a63918ceee2744c2"
87
87
  }