@m3e/radio-group 1.0.0-rc.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.
@@ -0,0 +1,472 @@
1
+ {
2
+ "schemaVersion": "1.0.0",
3
+ "readme": "",
4
+ "modules": [
5
+ {
6
+ "kind": "javascript-module",
7
+ "path": "src/index.ts",
8
+ "declarations": [],
9
+ "exports": [
10
+ {
11
+ "kind": "js",
12
+ "name": "*",
13
+ "declaration": {
14
+ "name": "*",
15
+ "package": "\"./RadioElement\""
16
+ }
17
+ },
18
+ {
19
+ "kind": "js",
20
+ "name": "*",
21
+ "declaration": {
22
+ "name": "*",
23
+ "package": "\"./RadioGroupElement\""
24
+ }
25
+ }
26
+ ]
27
+ },
28
+ {
29
+ "kind": "javascript-module",
30
+ "path": "src/RadioElement.ts",
31
+ "declarations": [
32
+ {
33
+ "kind": "class",
34
+ "description": "",
35
+ "name": "M3eRadioElement",
36
+ "cssProperties": [
37
+ {
38
+ "description": "Base size of the radio button container.",
39
+ "name": "--m3e-radio-container-size"
40
+ },
41
+ {
42
+ "description": "Size of the radio icon inside the wrapper.",
43
+ "name": "--m3e-radio-icon-size"
44
+ },
45
+ {
46
+ "description": "Hover state layer color when radio is not selected.",
47
+ "name": "--m3e-radio-unselected-hover-color"
48
+ },
49
+ {
50
+ "description": "Focus state layer color when radio is not selected.",
51
+ "name": "--m3e-radio-unselected-focus-color"
52
+ },
53
+ {
54
+ "description": "Ripple color when radio is not selected.",
55
+ "name": "--m3e-radio-unselected-ripple-color"
56
+ },
57
+ {
58
+ "description": "Icon color when radio is not selected.",
59
+ "name": "--m3e-radio-unselected-icon-color"
60
+ },
61
+ {
62
+ "description": "Hover state layer color when radio is selected.",
63
+ "name": "--m3e-radio-selected-hover-color"
64
+ },
65
+ {
66
+ "description": "Focus state layer color when radio is selected.",
67
+ "name": "--m3e-radio-selected-focus-color"
68
+ },
69
+ {
70
+ "description": "Ripple color when radio is selected.",
71
+ "name": "--m3e-radio-selected-ripple-color"
72
+ },
73
+ {
74
+ "description": "Icon color when radio is selected.",
75
+ "name": "--m3e-radio-selected-icon-color"
76
+ },
77
+ {
78
+ "description": "Icon color when radio is disabled.",
79
+ "name": "--m3e-radio-disabled-icon-color"
80
+ }
81
+ ],
82
+ "members": [
83
+ {
84
+ "kind": "field",
85
+ "name": "_focusRing",
86
+ "type": {
87
+ "text": "M3eFocusRingElement | undefined"
88
+ },
89
+ "privacy": "private",
90
+ "readonly": true
91
+ },
92
+ {
93
+ "kind": "field",
94
+ "name": "_stateLayer",
95
+ "type": {
96
+ "text": "M3eStateLayerElement | undefined"
97
+ },
98
+ "privacy": "private",
99
+ "readonly": true
100
+ },
101
+ {
102
+ "kind": "field",
103
+ "name": "_ripple",
104
+ "type": {
105
+ "text": "M3eRippleElement | undefined"
106
+ },
107
+ "privacy": "private",
108
+ "readonly": true
109
+ },
110
+ {
111
+ "kind": "field",
112
+ "name": "#clickHandler",
113
+ "privacy": "private",
114
+ "readonly": true
115
+ },
116
+ {
117
+ "kind": "field",
118
+ "name": "#hoverController",
119
+ "privacy": "private",
120
+ "readonly": true,
121
+ "default": "new HoverController(this, { target: null, callback: (hovering) => { if (this.disabled) return; if (hovering) { this._stateLayer?.show(\"hover\"); } else { this._stateLayer?.hide(\"hover\"); } }, })"
122
+ },
123
+ {
124
+ "kind": "field",
125
+ "name": "#pressedController",
126
+ "privacy": "private",
127
+ "readonly": true,
128
+ "default": "new PressedController(this, { target: null, callback: (pressed) => { if (this.disabled) return; if (pressed) { this._ripple?.show(0, 0, true); } else { this._ripple?.hide(); } }, })"
129
+ },
130
+ {
131
+ "kind": "field",
132
+ "name": "value",
133
+ "type": {
134
+ "text": "string"
135
+ },
136
+ "default": "\"on\"",
137
+ "description": "A string representing the value of the radio.",
138
+ "attribute": "value"
139
+ },
140
+ {
141
+ "kind": "method",
142
+ "name": "#renderIcon",
143
+ "privacy": "private",
144
+ "return": {
145
+ "type": {
146
+ "text": "unknown"
147
+ }
148
+ }
149
+ },
150
+ {
151
+ "kind": "method",
152
+ "name": "#handleClick",
153
+ "privacy": "private",
154
+ "return": {
155
+ "type": {
156
+ "text": "void"
157
+ }
158
+ },
159
+ "parameters": [
160
+ {
161
+ "name": "e",
162
+ "type": {
163
+ "text": "Event"
164
+ }
165
+ }
166
+ ]
167
+ }
168
+ ],
169
+ "events": [
170
+ {
171
+ "name": "input",
172
+ "type": {
173
+ "text": "Event"
174
+ },
175
+ "description": "Emitted when the checked state changes."
176
+ },
177
+ {
178
+ "name": "change",
179
+ "type": {
180
+ "text": "Event"
181
+ },
182
+ "description": "Emitted when the checked state changes."
183
+ }
184
+ ],
185
+ "attributes": [
186
+ {
187
+ "description": "Whether the element is checked.",
188
+ "name": "checked"
189
+ },
190
+ {
191
+ "description": "Whether the element is disabled.",
192
+ "name": "disabled"
193
+ },
194
+ {
195
+ "description": "A string representing the value of the radio.",
196
+ "name": "value",
197
+ "type": {
198
+ "text": "string"
199
+ },
200
+ "default": "\"on\"",
201
+ "fieldName": "value"
202
+ }
203
+ ],
204
+ "mixins": [
205
+ {
206
+ "name": "Dirty",
207
+ "package": "@m3e/core"
208
+ },
209
+ {
210
+ "name": "Touched",
211
+ "package": "@m3e/core"
212
+ },
213
+ {
214
+ "name": "Checked",
215
+ "package": "@m3e/core"
216
+ },
217
+ {
218
+ "name": "Labelled",
219
+ "package": "@m3e/core"
220
+ },
221
+ {
222
+ "name": "KeyboardClick",
223
+ "package": "@m3e/core"
224
+ },
225
+ {
226
+ "name": "Focusable",
227
+ "package": "@m3e/core"
228
+ },
229
+ {
230
+ "name": "Disabled",
231
+ "package": "@m3e/core"
232
+ },
233
+ {
234
+ "name": "AttachInternals",
235
+ "package": "@m3e/core"
236
+ },
237
+ {
238
+ "name": "Role",
239
+ "package": "@m3e/core"
240
+ }
241
+ ],
242
+ "superclass": {
243
+ "name": "LitElement",
244
+ "package": "lit"
245
+ },
246
+ "tagName": "m3e-radio",
247
+ "customElement": true,
248
+ "summary": "A radio button that allows a user to select one option from a set of options."
249
+ }
250
+ ],
251
+ "exports": [
252
+ {
253
+ "kind": "js",
254
+ "name": "M3eRadioElement",
255
+ "declaration": {
256
+ "name": "M3eRadioElement",
257
+ "module": "src/RadioElement.ts"
258
+ }
259
+ },
260
+ {
261
+ "kind": "custom-element-definition",
262
+ "name": "m3e-radio",
263
+ "declaration": {
264
+ "name": "M3eRadioElement",
265
+ "module": "src/RadioElement.ts"
266
+ }
267
+ }
268
+ ]
269
+ },
270
+ {
271
+ "kind": "javascript-module",
272
+ "path": "src/RadioGroupElement.ts",
273
+ "declarations": [
274
+ {
275
+ "kind": "class",
276
+ "description": "",
277
+ "name": "M3eRadioGroupElement",
278
+ "cssProperties": [
279
+ {
280
+ "description": "Fallback hover color used when the radio is invalid and touched.",
281
+ "name": "--m3e-radio-error-hover-color"
282
+ },
283
+ {
284
+ "description": "Fallback focus color used when the radio is invalid and touched.",
285
+ "name": "--m3e-radio-error-focus-color"
286
+ },
287
+ {
288
+ "description": "Fallback ripple color used when the radio is invalid and touched.",
289
+ "name": "--m3e-radio-error-ripple-color"
290
+ },
291
+ {
292
+ "description": "Fallback icon color used when the radio is invalid and touched.",
293
+ "name": "--m3e-radio-error-icon-color"
294
+ }
295
+ ],
296
+ "slots": [
297
+ {
298
+ "description": "Renders the radio buttons of the group.",
299
+ "name": ""
300
+ }
301
+ ],
302
+ "members": [
303
+ {
304
+ "kind": "field",
305
+ "name": "#focusOutHandler",
306
+ "privacy": "private",
307
+ "readonly": true
308
+ },
309
+ {
310
+ "kind": "field",
311
+ "name": "radios",
312
+ "type": {
313
+ "text": "readonly M3eRadioElement[]"
314
+ },
315
+ "description": "The radio buttons in the group.",
316
+ "readonly": true
317
+ },
318
+ {
319
+ "kind": "field",
320
+ "name": "selected",
321
+ "type": {
322
+ "text": "M3eRadioElement | null"
323
+ },
324
+ "description": "The selected radio.",
325
+ "readonly": true
326
+ },
327
+ {
328
+ "kind": "field",
329
+ "name": "value",
330
+ "type": {
331
+ "text": "string | null"
332
+ },
333
+ "description": "The selected value of the radio group.",
334
+ "readonly": true
335
+ },
336
+ {
337
+ "kind": "method",
338
+ "name": "#handleSlotChange",
339
+ "privacy": "private"
340
+ },
341
+ {
342
+ "kind": "method",
343
+ "name": "#handleKeyDown",
344
+ "privacy": "private",
345
+ "return": {
346
+ "type": {
347
+ "text": "void"
348
+ }
349
+ },
350
+ "parameters": [
351
+ {
352
+ "name": "e",
353
+ "type": {
354
+ "text": "KeyboardEvent"
355
+ }
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ "kind": "method",
361
+ "name": "#handleChange",
362
+ "privacy": "private",
363
+ "return": {
364
+ "type": {
365
+ "text": "void"
366
+ }
367
+ },
368
+ "parameters": [
369
+ {
370
+ "name": "e",
371
+ "type": {
372
+ "text": "Event"
373
+ }
374
+ }
375
+ ]
376
+ }
377
+ ],
378
+ "events": [
379
+ {
380
+ "name": "change",
381
+ "type": {
382
+ "text": "Event"
383
+ },
384
+ "description": "Emitted when the checked state of a radio button changes."
385
+ }
386
+ ],
387
+ "attributes": [
388
+ {
389
+ "description": "Whether the element is disabled.",
390
+ "name": "disabled"
391
+ },
392
+ {
393
+ "description": "The name that identifies the element when submitting the associated form.",
394
+ "name": "name"
395
+ },
396
+ {
397
+ "description": "Whether the element is required.",
398
+ "name": "required"
399
+ }
400
+ ],
401
+ "mixins": [
402
+ {
403
+ "name": "Labelled",
404
+ "package": "@m3e/core"
405
+ },
406
+ {
407
+ "name": "RequiredConstraintValidation",
408
+ "package": "@m3e/core"
409
+ },
410
+ {
411
+ "name": "Dirty",
412
+ "package": "@m3e/core"
413
+ },
414
+ {
415
+ "name": "Touched",
416
+ "package": "@m3e/core"
417
+ },
418
+ {
419
+ "name": "Required",
420
+ "package": "@m3e/core"
421
+ },
422
+ {
423
+ "name": "ConstraintValidation",
424
+ "package": "@m3e/core"
425
+ },
426
+ {
427
+ "name": "FormAssociated",
428
+ "package": "@m3e/core"
429
+ },
430
+ {
431
+ "name": "Disabled",
432
+ "package": "@m3e/core"
433
+ },
434
+ {
435
+ "name": "AttachInternals",
436
+ "package": "@m3e/core"
437
+ },
438
+ {
439
+ "name": "Role",
440
+ "package": "@m3e/core"
441
+ }
442
+ ],
443
+ "superclass": {
444
+ "name": "LitElement",
445
+ "package": "lit"
446
+ },
447
+ "tagName": "m3e-radio-group",
448
+ "customElement": true,
449
+ "summary": "A container for a set of radio buttons that enforces single selection."
450
+ }
451
+ ],
452
+ "exports": [
453
+ {
454
+ "kind": "js",
455
+ "name": "M3eRadioGroupElement",
456
+ "declaration": {
457
+ "name": "M3eRadioGroupElement",
458
+ "module": "src/RadioGroupElement.ts"
459
+ }
460
+ },
461
+ {
462
+ "kind": "custom-element-definition",
463
+ "name": "m3e-radio-group",
464
+ "declaration": {
465
+ "name": "M3eRadioGroupElement",
466
+ "module": "src/RadioGroupElement.ts"
467
+ }
468
+ }
469
+ ]
470
+ }
471
+ ]
472
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/microsoft/vscode-html-languageservice/main/docs/customData.schema.json",
3
+ "version": 1.1,
4
+ "tags": [
5
+ {
6
+ "name": "m3e-radio",
7
+ "description": "A radio button that allows a user to select one option from a set of options.\n---\n\n\n### **Events:**\n - **input** - Emitted when the checked state changes.\n- **change** - Emitted when the checked state changes.\n\n### **CSS Properties:**\n - **--m3e-radio-container-size** - Base size of the radio button container. _(default: undefined)_\n- **--m3e-radio-icon-size** - Size of the radio icon inside the wrapper. _(default: undefined)_\n- **--m3e-radio-unselected-hover-color** - Hover state layer color when radio is not selected. _(default: undefined)_\n- **--m3e-radio-unselected-focus-color** - Focus state layer color when radio is not selected. _(default: undefined)_\n- **--m3e-radio-unselected-ripple-color** - Ripple color when radio is not selected. _(default: undefined)_\n- **--m3e-radio-unselected-icon-color** - Icon color when radio is not selected. _(default: undefined)_\n- **--m3e-radio-selected-hover-color** - Hover state layer color when radio is selected. _(default: undefined)_\n- **--m3e-radio-selected-focus-color** - Focus state layer color when radio is selected. _(default: undefined)_\n- **--m3e-radio-selected-ripple-color** - Ripple color when radio is selected. _(default: undefined)_\n- **--m3e-radio-selected-icon-color** - Icon color when radio is selected. _(default: undefined)_\n- **--m3e-radio-disabled-icon-color** - Icon color when radio is disabled. _(default: undefined)_",
8
+ "attributes": [
9
+ {
10
+ "name": "checked",
11
+ "description": "Whether the element is checked.",
12
+ "values": []
13
+ },
14
+ {
15
+ "name": "disabled",
16
+ "description": "Whether the element is disabled.",
17
+ "values": []
18
+ },
19
+ {
20
+ "name": "value",
21
+ "description": "A string representing the value of the radio.",
22
+ "values": []
23
+ }
24
+ ],
25
+ "references": []
26
+ },
27
+ {
28
+ "name": "m3e-radio-group",
29
+ "description": "A container for a set of radio buttons that enforces single selection.\n---\n\n\n### **Events:**\n - **change** - Emitted when the checked state of a radio button changes.\n\n### **Slots:**\n - _default_ - Renders the radio buttons of the group.\n\n### **CSS Properties:**\n - **--m3e-radio-error-hover-color** - Fallback hover color used when the radio is invalid and touched. _(default: undefined)_\n- **--m3e-radio-error-focus-color** - Fallback focus color used when the radio is invalid and touched. _(default: undefined)_\n- **--m3e-radio-error-ripple-color** - Fallback ripple color used when the radio is invalid and touched. _(default: undefined)_\n- **--m3e-radio-error-icon-color** - Fallback icon color used when the radio is invalid and touched. _(default: undefined)_",
30
+ "attributes": [
31
+ {
32
+ "name": "disabled",
33
+ "description": "Whether the element is disabled.",
34
+ "values": []
35
+ },
36
+ {
37
+ "name": "name",
38
+ "description": "The name that identifies the element when submitting the associated form.",
39
+ "values": []
40
+ },
41
+ {
42
+ "name": "required",
43
+ "description": "Whether the element is required.",
44
+ "values": []
45
+ }
46
+ ],
47
+ "references": []
48
+ }
49
+ ]
50
+ }