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

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