@spectrum-web-components/radio 0.48.0 → 0.49.0-beta.0
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 +7 -7
- package/custom-elements.json +0 -452
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spectrum-web-components/radio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.49.0-beta.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
"lit-html"
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@spectrum-web-components/base": "^0.
|
|
69
|
-
"@spectrum-web-components/field-group": "^0.
|
|
70
|
-
"@spectrum-web-components/help-text": "^0.
|
|
71
|
-
"@spectrum-web-components/reactive-controllers": "^0.
|
|
72
|
-
"@spectrum-web-components/shared": "^0.
|
|
68
|
+
"@spectrum-web-components/base": "^0.49.0-beta.0",
|
|
69
|
+
"@spectrum-web-components/field-group": "^0.49.0-beta.0",
|
|
70
|
+
"@spectrum-web-components/help-text": "^0.49.0-beta.0",
|
|
71
|
+
"@spectrum-web-components/reactive-controllers": "^0.49.0-beta.0",
|
|
72
|
+
"@spectrum-web-components/shared": "^0.49.0-beta.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@spectrum-css/radio": "^9.2.3"
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"./sp-*.js",
|
|
81
81
|
"./**/*.dev.js"
|
|
82
82
|
],
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "1aa9165b6529e70339c9c632d47335a2c0894f0b"
|
|
84
84
|
}
|
package/custom-elements.json
DELETED
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "1.0.0",
|
|
3
|
-
"readme": "",
|
|
4
|
-
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "sp-radio-group.js",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": [
|
|
10
|
-
{
|
|
11
|
-
"kind": "custom-element-definition",
|
|
12
|
-
"name": "sp-radio-group",
|
|
13
|
-
"declaration": {
|
|
14
|
-
"name": "RadioGroup",
|
|
15
|
-
"module": "/src/RadioGroup.js"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"kind": "javascript-module",
|
|
22
|
-
"path": "sp-radio.js",
|
|
23
|
-
"declarations": [],
|
|
24
|
-
"exports": [
|
|
25
|
-
{
|
|
26
|
-
"kind": "custom-element-definition",
|
|
27
|
-
"name": "sp-radio",
|
|
28
|
-
"declaration": {
|
|
29
|
-
"name": "Radio",
|
|
30
|
-
"module": "/src/Radio.js"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"kind": "javascript-module",
|
|
37
|
-
"path": "src/Radio.js",
|
|
38
|
-
"declarations": [
|
|
39
|
-
{
|
|
40
|
-
"kind": "class",
|
|
41
|
-
"description": "",
|
|
42
|
-
"name": "Radio",
|
|
43
|
-
"slots": [
|
|
44
|
-
{
|
|
45
|
-
"description": "text label of the Radio button",
|
|
46
|
-
"name": ""
|
|
47
|
-
}
|
|
48
|
-
],
|
|
49
|
-
"members": [
|
|
50
|
-
{
|
|
51
|
-
"kind": "field",
|
|
52
|
-
"name": "autofocus",
|
|
53
|
-
"type": {
|
|
54
|
-
"text": "boolean"
|
|
55
|
-
},
|
|
56
|
-
"privacy": "private",
|
|
57
|
-
"default": "false",
|
|
58
|
-
"description": "When this control is rendered, focus it automatically",
|
|
59
|
-
"attribute": "autofocus"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"kind": "field",
|
|
63
|
-
"name": "value",
|
|
64
|
-
"type": {
|
|
65
|
-
"text": "string"
|
|
66
|
-
},
|
|
67
|
-
"privacy": "public",
|
|
68
|
-
"default": "''",
|
|
69
|
-
"attribute": "value",
|
|
70
|
-
"reflects": true
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"kind": "field",
|
|
74
|
-
"name": "checked",
|
|
75
|
-
"type": {
|
|
76
|
-
"text": "boolean"
|
|
77
|
-
},
|
|
78
|
-
"privacy": "public",
|
|
79
|
-
"default": "false",
|
|
80
|
-
"attribute": "checked",
|
|
81
|
-
"reflects": true
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"kind": "field",
|
|
85
|
-
"name": "disabled",
|
|
86
|
-
"type": {
|
|
87
|
-
"text": "boolean"
|
|
88
|
-
},
|
|
89
|
-
"privacy": "public",
|
|
90
|
-
"default": "false",
|
|
91
|
-
"attribute": "disabled",
|
|
92
|
-
"reflects": true
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"kind": "field",
|
|
96
|
-
"name": "emphasized",
|
|
97
|
-
"type": {
|
|
98
|
-
"text": "boolean"
|
|
99
|
-
},
|
|
100
|
-
"privacy": "public",
|
|
101
|
-
"default": "false",
|
|
102
|
-
"attribute": "emphasized",
|
|
103
|
-
"reflects": true
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"kind": "field",
|
|
107
|
-
"name": "invalid",
|
|
108
|
-
"type": {
|
|
109
|
-
"text": "boolean"
|
|
110
|
-
},
|
|
111
|
-
"privacy": "public",
|
|
112
|
-
"default": "false",
|
|
113
|
-
"attribute": "invalid",
|
|
114
|
-
"reflects": true
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"kind": "field",
|
|
118
|
-
"name": "readonly",
|
|
119
|
-
"type": {
|
|
120
|
-
"text": "boolean"
|
|
121
|
-
},
|
|
122
|
-
"privacy": "public",
|
|
123
|
-
"default": "false",
|
|
124
|
-
"attribute": "readonly",
|
|
125
|
-
"reflects": true
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
"kind": "method",
|
|
129
|
-
"name": "click",
|
|
130
|
-
"privacy": "public",
|
|
131
|
-
"return": {
|
|
132
|
-
"type": {
|
|
133
|
-
"text": "void"
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"kind": "method",
|
|
139
|
-
"name": "manageAutoFocus",
|
|
140
|
-
"privacy": "protected",
|
|
141
|
-
"return": {
|
|
142
|
-
"type": {
|
|
143
|
-
"text": "void"
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"kind": "method",
|
|
149
|
-
"name": "activate",
|
|
150
|
-
"privacy": "protected",
|
|
151
|
-
"return": {
|
|
152
|
-
"type": {
|
|
153
|
-
"text": "void"
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"kind": "method",
|
|
159
|
-
"name": "handleKeyup",
|
|
160
|
-
"privacy": "protected",
|
|
161
|
-
"return": {
|
|
162
|
-
"type": {
|
|
163
|
-
"text": "void"
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
"parameters": [
|
|
167
|
-
{
|
|
168
|
-
"name": "event",
|
|
169
|
-
"type": {
|
|
170
|
-
"text": "KeyboardEvent"
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
"events": [
|
|
177
|
-
{
|
|
178
|
-
"name": "keydown",
|
|
179
|
-
"type": {
|
|
180
|
-
"text": "KeyboardEvent"
|
|
181
|
-
},
|
|
182
|
-
"description": "Trick :focus-visible polyfill into thinking keyboard based focus"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"name": "change",
|
|
186
|
-
"type": {
|
|
187
|
-
"text": "Event"
|
|
188
|
-
},
|
|
189
|
-
"description": "When the input is interacted with and its state is changed"
|
|
190
|
-
}
|
|
191
|
-
],
|
|
192
|
-
"attributes": [
|
|
193
|
-
{
|
|
194
|
-
"description": "Uses the invalid style",
|
|
195
|
-
"name": "invalid",
|
|
196
|
-
"type": {
|
|
197
|
-
"text": "boolean"
|
|
198
|
-
},
|
|
199
|
-
"default": "false",
|
|
200
|
-
"fieldName": "invalid"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"description": "Uses the disabled style",
|
|
204
|
-
"name": "disabled",
|
|
205
|
-
"type": {
|
|
206
|
-
"text": "boolean"
|
|
207
|
-
},
|
|
208
|
-
"default": "false",
|
|
209
|
-
"fieldName": "disabled"
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"description": "Represents when the input is checked",
|
|
213
|
-
"name": "checked",
|
|
214
|
-
"type": {
|
|
215
|
-
"text": "boolean"
|
|
216
|
-
},
|
|
217
|
-
"default": "false",
|
|
218
|
-
"fieldName": "checked"
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
"description": "Identifies this radio button within its radio group",
|
|
222
|
-
"name": "value",
|
|
223
|
-
"type": {
|
|
224
|
-
"text": "string"
|
|
225
|
-
},
|
|
226
|
-
"default": "''",
|
|
227
|
-
"fieldName": "value"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"name": "autofocus",
|
|
231
|
-
"type": {
|
|
232
|
-
"text": "boolean"
|
|
233
|
-
},
|
|
234
|
-
"default": "false",
|
|
235
|
-
"description": "When this control is rendered, focus it automatically",
|
|
236
|
-
"fieldName": "autofocus"
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
"name": "emphasized",
|
|
240
|
-
"type": {
|
|
241
|
-
"text": "boolean"
|
|
242
|
-
},
|
|
243
|
-
"default": "false",
|
|
244
|
-
"fieldName": "emphasized"
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
"name": "readonly",
|
|
248
|
-
"type": {
|
|
249
|
-
"text": "boolean"
|
|
250
|
-
},
|
|
251
|
-
"default": "false",
|
|
252
|
-
"fieldName": "readonly"
|
|
253
|
-
}
|
|
254
|
-
],
|
|
255
|
-
"mixins": [
|
|
256
|
-
{
|
|
257
|
-
"name": "SizedMixin",
|
|
258
|
-
"package": "@spectrum-web-components/base"
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
"name": "FocusVisiblePolyfillMixin",
|
|
262
|
-
"package": "@spectrum-web-components/shared/src/focus-visible.js"
|
|
263
|
-
}
|
|
264
|
-
],
|
|
265
|
-
"superclass": {
|
|
266
|
-
"name": "SpectrumElement",
|
|
267
|
-
"package": "@spectrum-web-components/base"
|
|
268
|
-
},
|
|
269
|
-
"tagName": "sp-radio",
|
|
270
|
-
"customElement": true
|
|
271
|
-
}
|
|
272
|
-
],
|
|
273
|
-
"exports": [
|
|
274
|
-
{
|
|
275
|
-
"kind": "js",
|
|
276
|
-
"name": "Radio",
|
|
277
|
-
"declaration": {
|
|
278
|
-
"name": "Radio",
|
|
279
|
-
"module": "src/Radio.js"
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
]
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"kind": "javascript-module",
|
|
286
|
-
"path": "src/RadioGroup.js",
|
|
287
|
-
"declarations": [
|
|
288
|
-
{
|
|
289
|
-
"kind": "class",
|
|
290
|
-
"description": "",
|
|
291
|
-
"name": "RadioGroup",
|
|
292
|
-
"slots": [
|
|
293
|
-
{
|
|
294
|
-
"description": "The `sp-radio` elements to display/manage in the group.",
|
|
295
|
-
"name": ""
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"description": "default or non-negative help text to associate to your form element",
|
|
299
|
-
"name": "help-text"
|
|
300
|
-
},
|
|
301
|
-
{
|
|
302
|
-
"description": "negative help text to associate to your form element when `invalid`",
|
|
303
|
-
"name": "negative-help-text"
|
|
304
|
-
}
|
|
305
|
-
],
|
|
306
|
-
"members": [
|
|
307
|
-
{
|
|
308
|
-
"kind": "field",
|
|
309
|
-
"name": "name",
|
|
310
|
-
"type": {
|
|
311
|
-
"text": "string"
|
|
312
|
-
},
|
|
313
|
-
"privacy": "public",
|
|
314
|
-
"default": "''",
|
|
315
|
-
"attribute": "name"
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"kind": "field",
|
|
319
|
-
"name": "defaultNodes",
|
|
320
|
-
"type": {
|
|
321
|
-
"text": "Node[]"
|
|
322
|
-
},
|
|
323
|
-
"privacy": "public"
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
"kind": "field",
|
|
327
|
-
"name": "buttons",
|
|
328
|
-
"type": {
|
|
329
|
-
"text": "Radio[]"
|
|
330
|
-
},
|
|
331
|
-
"privacy": "public",
|
|
332
|
-
"readonly": true
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
"kind": "field",
|
|
336
|
-
"name": "rovingTabindexController",
|
|
337
|
-
"default": "new RovingTabindexController<Radio>(this, {\n focusInIndex: (elements: Radio[]) => {\n return elements.findIndex((el) => {\n return this.selected\n ? !el.disabled && el.value === this.selected\n : !el.disabled;\n });\n },\n elementEnterAction: (el: Radio) => {\n this._setSelected(el.value);\n },\n elements: () => this.buttons,\n isFocusableElement: (el: Radio) => !el.disabled,\n })"
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
"kind": "method",
|
|
341
|
-
"name": "focus",
|
|
342
|
-
"privacy": "public",
|
|
343
|
-
"return": {
|
|
344
|
-
"type": {
|
|
345
|
-
"text": "void"
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
{
|
|
350
|
-
"kind": "method",
|
|
351
|
-
"name": "_setSelected",
|
|
352
|
-
"privacy": "private",
|
|
353
|
-
"return": {
|
|
354
|
-
"type": {
|
|
355
|
-
"text": "void"
|
|
356
|
-
}
|
|
357
|
-
},
|
|
358
|
-
"parameters": [
|
|
359
|
-
{
|
|
360
|
-
"name": "value",
|
|
361
|
-
"type": {
|
|
362
|
-
"text": "string"
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
]
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"kind": "field",
|
|
369
|
-
"name": "selected",
|
|
370
|
-
"type": {
|
|
371
|
-
"text": "string"
|
|
372
|
-
},
|
|
373
|
-
"privacy": "public",
|
|
374
|
-
"default": "''",
|
|
375
|
-
"attribute": "selected",
|
|
376
|
-
"reflects": true
|
|
377
|
-
},
|
|
378
|
-
{
|
|
379
|
-
"kind": "method",
|
|
380
|
-
"name": "validateRadios",
|
|
381
|
-
"privacy": "private",
|
|
382
|
-
"return": {
|
|
383
|
-
"type": {
|
|
384
|
-
"text": "Promise<void>"
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"kind": "method",
|
|
390
|
-
"name": "handleSlotchange",
|
|
391
|
-
"privacy": "protected",
|
|
392
|
-
"return": {
|
|
393
|
-
"type": {
|
|
394
|
-
"text": "void"
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
],
|
|
399
|
-
"events": [
|
|
400
|
-
{
|
|
401
|
-
"name": "change",
|
|
402
|
-
"type": {
|
|
403
|
-
"text": "Event"
|
|
404
|
-
},
|
|
405
|
-
"description": "An alteration to the value of the element has been committed by the user."
|
|
406
|
-
}
|
|
407
|
-
],
|
|
408
|
-
"attributes": [
|
|
409
|
-
{
|
|
410
|
-
"name": "name",
|
|
411
|
-
"type": {
|
|
412
|
-
"text": "string"
|
|
413
|
-
},
|
|
414
|
-
"default": "''",
|
|
415
|
-
"fieldName": "name"
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
"name": "selected",
|
|
419
|
-
"type": {
|
|
420
|
-
"text": "string"
|
|
421
|
-
},
|
|
422
|
-
"default": "''",
|
|
423
|
-
"fieldName": "selected"
|
|
424
|
-
}
|
|
425
|
-
],
|
|
426
|
-
"mixins": [
|
|
427
|
-
{
|
|
428
|
-
"name": "FocusVisiblePolyfillMixin",
|
|
429
|
-
"package": "@spectrum-web-components/shared/src/focus-visible.js"
|
|
430
|
-
}
|
|
431
|
-
],
|
|
432
|
-
"superclass": {
|
|
433
|
-
"name": "FieldGroup",
|
|
434
|
-
"package": "@spectrum-web-components/field-group"
|
|
435
|
-
},
|
|
436
|
-
"tagName": "sp-radio-group",
|
|
437
|
-
"customElement": true
|
|
438
|
-
}
|
|
439
|
-
],
|
|
440
|
-
"exports": [
|
|
441
|
-
{
|
|
442
|
-
"kind": "js",
|
|
443
|
-
"name": "RadioGroup",
|
|
444
|
-
"declaration": {
|
|
445
|
-
"name": "RadioGroup",
|
|
446
|
-
"module": "src/RadioGroup.js"
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
]
|
|
450
|
-
}
|
|
451
|
-
]
|
|
452
|
-
}
|