@italia/checkbox 1.0.0-alpha.6 → 1.0.0-alpha.7

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.
@@ -25,6 +25,478 @@
25
25
  }
26
26
  ]
27
27
  },
28
+ {
29
+ "kind": "javascript-module",
30
+ "path": "src/it-checkbox-base.ts",
31
+ "declarations": [
32
+ {
33
+ "kind": "class",
34
+ "description": "",
35
+ "name": "ItCheckboxBase",
36
+ "members": [
37
+ {
38
+ "kind": "field",
39
+ "name": "formControlController",
40
+ "type": {
41
+ "text": "FormControlController"
42
+ },
43
+ "privacy": "protected",
44
+ "readonly": true,
45
+ "default": "new FormControlController(this, { value: (control: FormControl) => (control as ItCheckboxBase).checked ? (control as ItCheckboxBase).value || 'true' : undefined, setValue: (control: FormControl, value: unknown) => { const checkbox = control as ItCheckboxBase; checkbox.checked = Boolean(value); }, })"
46
+ },
47
+ {
48
+ "kind": "field",
49
+ "name": "type",
50
+ "type": {
51
+ "text": "string"
52
+ },
53
+ "default": "'checkbox'",
54
+ "description": "The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\nto `text`."
55
+ },
56
+ {
57
+ "kind": "field",
58
+ "name": "checked",
59
+ "type": {
60
+ "text": "boolean"
61
+ },
62
+ "default": "false",
63
+ "description": "Draws the checkbox in a checked state.",
64
+ "attribute": "checked",
65
+ "reflects": true
66
+ },
67
+ {
68
+ "kind": "field",
69
+ "name": "inline",
70
+ "type": {
71
+ "text": "boolean"
72
+ },
73
+ "default": "false",
74
+ "description": "Draws checkboxes inline, side by side.",
75
+ "attribute": "inline",
76
+ "reflects": true
77
+ },
78
+ {
79
+ "kind": "field",
80
+ "name": "group",
81
+ "type": {
82
+ "text": "boolean"
83
+ },
84
+ "default": "false",
85
+ "description": "Draws checkboxes in groups.",
86
+ "attribute": "group",
87
+ "reflects": true
88
+ },
89
+ {
90
+ "kind": "field",
91
+ "name": "indeterminate",
92
+ "type": {
93
+ "text": "boolean"
94
+ },
95
+ "default": "false",
96
+ "description": "Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\nall/none\" behavior when associated checkboxes have a mix of checked and unchecked states.",
97
+ "attribute": "indeterminate",
98
+ "reflects": true
99
+ },
100
+ {
101
+ "kind": "field",
102
+ "name": "labelElements",
103
+ "type": {
104
+ "text": "HTMLElement[]"
105
+ }
106
+ },
107
+ {
108
+ "kind": "field",
109
+ "name": "label",
110
+ "type": {
111
+ "text": "string"
112
+ },
113
+ "readonly": true
114
+ },
115
+ {
116
+ "kind": "field",
117
+ "name": "supportText",
118
+ "type": {
119
+ "text": "string"
120
+ },
121
+ "default": "''",
122
+ "description": "The input's help text.",
123
+ "attribute": "support-text"
124
+ },
125
+ {
126
+ "kind": "method",
127
+ "name": "click",
128
+ "description": "Simulates a click on the checkbox."
129
+ },
130
+ {
131
+ "kind": "method",
132
+ "name": "_handleClick",
133
+ "privacy": "protected",
134
+ "return": {
135
+ "type": {
136
+ "text": "void"
137
+ }
138
+ },
139
+ "parameters": [
140
+ {
141
+ "name": "e",
142
+ "type": {
143
+ "text": "Event"
144
+ }
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "kind": "method",
150
+ "name": "_renderInput",
151
+ "privacy": "protected",
152
+ "parameters": [
153
+ {
154
+ "name": "supportTextId",
155
+ "type": {
156
+ "text": "string"
157
+ }
158
+ },
159
+ {
160
+ "name": "invalid",
161
+ "type": {
162
+ "text": "boolean"
163
+ }
164
+ },
165
+ {
166
+ "name": "validityMessage",
167
+ "type": {
168
+ "text": "string"
169
+ }
170
+ }
171
+ ]
172
+ },
173
+ {
174
+ "kind": "method",
175
+ "name": "getWrapperClasses",
176
+ "privacy": "protected"
177
+ },
178
+ {
179
+ "kind": "method",
180
+ "name": "getSupportTextRender",
181
+ "privacy": "protected",
182
+ "parameters": [
183
+ {
184
+ "name": "supportTextId",
185
+ "type": {
186
+ "text": "string"
187
+ }
188
+ }
189
+ ]
190
+ },
191
+ {
192
+ "kind": "method",
193
+ "name": "getValidityMessageRender",
194
+ "privacy": "protected",
195
+ "parameters": [
196
+ {
197
+ "name": "validityMessage",
198
+ "type": {
199
+ "text": "string"
200
+ }
201
+ }
202
+ ]
203
+ }
204
+ ],
205
+ "events": [
206
+ {
207
+ "name": "change",
208
+ "type": {
209
+ "text": "Event"
210
+ }
211
+ }
212
+ ],
213
+ "attributes": [
214
+ {
215
+ "name": "checked",
216
+ "type": {
217
+ "text": "boolean"
218
+ },
219
+ "default": "false",
220
+ "description": "Draws the checkbox in a checked state.",
221
+ "fieldName": "checked"
222
+ },
223
+ {
224
+ "name": "inline",
225
+ "type": {
226
+ "text": "boolean"
227
+ },
228
+ "default": "false",
229
+ "description": "Draws checkboxes inline, side by side.",
230
+ "fieldName": "inline"
231
+ },
232
+ {
233
+ "name": "group",
234
+ "type": {
235
+ "text": "boolean"
236
+ },
237
+ "default": "false",
238
+ "description": "Draws checkboxes in groups.",
239
+ "fieldName": "group"
240
+ },
241
+ {
242
+ "name": "indeterminate",
243
+ "type": {
244
+ "text": "boolean"
245
+ },
246
+ "default": "false",
247
+ "description": "Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\nall/none\" behavior when associated checkboxes have a mix of checked and unchecked states.",
248
+ "fieldName": "indeterminate"
249
+ },
250
+ {
251
+ "name": "support-text",
252
+ "type": {
253
+ "text": "string"
254
+ },
255
+ "default": "''",
256
+ "description": "The input's help text.",
257
+ "fieldName": "supportText"
258
+ }
259
+ ],
260
+ "superclass": {
261
+ "name": "FormControl",
262
+ "package": "@italia/globals"
263
+ }
264
+ }
265
+ ],
266
+ "exports": [
267
+ {
268
+ "kind": "js",
269
+ "name": "ItCheckboxBase",
270
+ "declaration": {
271
+ "name": "ItCheckboxBase",
272
+ "module": "src/it-checkbox-base.ts"
273
+ }
274
+ }
275
+ ]
276
+ },
277
+ {
278
+ "kind": "javascript-module",
279
+ "path": "src/it-checkbox-group-base.ts",
280
+ "declarations": [
281
+ {
282
+ "kind": "class",
283
+ "description": "",
284
+ "name": "ItCheckboxGroupBase",
285
+ "members": [
286
+ {
287
+ "kind": "field",
288
+ "name": "required",
289
+ "type": {
290
+ "text": "boolean"
291
+ },
292
+ "default": "false",
293
+ "attribute": "required",
294
+ "reflects": true
295
+ },
296
+ {
297
+ "kind": "field",
298
+ "name": "inline",
299
+ "type": {
300
+ "text": "boolean"
301
+ },
302
+ "default": "false",
303
+ "description": "Draws checkboxes inline, side by side.",
304
+ "attribute": "inline",
305
+ "reflects": true
306
+ },
307
+ {
308
+ "kind": "field",
309
+ "name": "group",
310
+ "type": {
311
+ "text": "boolean"
312
+ },
313
+ "default": "false",
314
+ "description": "Draws checkboxes in groups.",
315
+ "attribute": "group",
316
+ "reflects": true
317
+ },
318
+ {
319
+ "kind": "field",
320
+ "name": "name",
321
+ "type": {
322
+ "text": "string"
323
+ },
324
+ "default": "''",
325
+ "attribute": "name",
326
+ "reflects": true
327
+ },
328
+ {
329
+ "kind": "field",
330
+ "name": "checkboxes",
331
+ "type": {
332
+ "text": "ItCheckboxBase[]"
333
+ }
334
+ },
335
+ {
336
+ "kind": "field",
337
+ "name": "_label",
338
+ "type": {
339
+ "text": "HTMLElement[]"
340
+ },
341
+ "privacy": "private"
342
+ },
343
+ {
344
+ "kind": "field",
345
+ "name": "formControlController",
346
+ "type": {
347
+ "text": "FormControlController"
348
+ },
349
+ "privacy": "protected",
350
+ "readonly": true,
351
+ "default": "new FormControlController(this, { // Il valore è un array dei valori delle checkbox selezionate value: (control: FormControl) => (control as ItCheckboxGroupBase).checkboxes.filter((cb) => cb.checked).map((cb) => cb.value || 'true'), // Il name è quello del gruppo name: (control: FormControl) => (control as ItCheckboxGroupBase).name, // La validità è gestita da noi con checkValidity di gruppo checkValidity: (control: FormControl) => (control as ItCheckboxGroupBase).checkValidity(), reportValidity: (control: FormControl) => (control as ItCheckboxGroupBase).reportValidity(), // Non implementiamo setValue qui, gestito dalle singole checkbox setValue: () => {}, // Ascoltiamo l'input su tutti i cambi di stato delle checkbox assumeInteractionOn: ['it-change'], })"
352
+ },
353
+ {
354
+ "kind": "field",
355
+ "name": "_groupValid",
356
+ "type": {
357
+ "text": "boolean"
358
+ },
359
+ "privacy": "private",
360
+ "default": "true"
361
+ },
362
+ {
363
+ "kind": "field",
364
+ "name": "selectedValues",
365
+ "type": {
366
+ "text": "string[]"
367
+ }
368
+ },
369
+ {
370
+ "kind": "method",
371
+ "name": "has",
372
+ "privacy": "public",
373
+ "parameters": [
374
+ {
375
+ "name": "v",
376
+ "type": {
377
+ "text": "string"
378
+ }
379
+ }
380
+ ]
381
+ },
382
+ {
383
+ "kind": "field",
384
+ "name": "validity",
385
+ "type": {
386
+ "text": "ValidityState"
387
+ },
388
+ "description": "Override: Custom validity check for radio group",
389
+ "readonly": true
390
+ },
391
+ {
392
+ "kind": "method",
393
+ "name": "_handleGroupChange",
394
+ "privacy": "private"
395
+ },
396
+ {
397
+ "kind": "method",
398
+ "name": "checkValidity",
399
+ "return": {
400
+ "type": {
401
+ "text": "boolean"
402
+ }
403
+ },
404
+ "description": "Override di checkValidity per la logica di gruppo."
405
+ },
406
+ {
407
+ "kind": "method",
408
+ "name": "reportValidity",
409
+ "return": {
410
+ "type": {
411
+ "text": "boolean"
412
+ }
413
+ },
414
+ "description": "Override di reportValidity per mostrare l'errore a livello di gruppo."
415
+ },
416
+ {
417
+ "kind": "method",
418
+ "name": "handleValidationMessages",
419
+ "privacy": "protected",
420
+ "description": "Il tuo FormControl ha già un handleValidationMessages che\nsetta this.validationMessage. Aggiorniamolo per la logica di gruppo."
421
+ },
422
+ {
423
+ "kind": "method",
424
+ "name": "_syncGroupStateToChildren",
425
+ "privacy": "private",
426
+ "description": "Sync group state (name, grouped, inline, required, disabled, checked) to child checkboxes\nThis replaces the need for requestUpdate() calls"
427
+ },
428
+ {
429
+ "kind": "method",
430
+ "name": "setCustomValidity",
431
+ "privacy": "public",
432
+ "parameters": [
433
+ {
434
+ "name": "message",
435
+ "type": {
436
+ "text": "string"
437
+ }
438
+ }
439
+ ]
440
+ },
441
+ {
442
+ "kind": "method",
443
+ "name": "_handleSlotChange",
444
+ "privacy": "private"
445
+ }
446
+ ],
447
+ "attributes": [
448
+ {
449
+ "name": "required",
450
+ "type": {
451
+ "text": "boolean"
452
+ },
453
+ "default": "false",
454
+ "fieldName": "required"
455
+ },
456
+ {
457
+ "name": "inline",
458
+ "type": {
459
+ "text": "boolean"
460
+ },
461
+ "default": "false",
462
+ "description": "Draws checkboxes inline, side by side.",
463
+ "fieldName": "inline"
464
+ },
465
+ {
466
+ "name": "group",
467
+ "type": {
468
+ "text": "boolean"
469
+ },
470
+ "default": "false",
471
+ "description": "Draws checkboxes in groups.",
472
+ "fieldName": "group"
473
+ },
474
+ {
475
+ "name": "name",
476
+ "type": {
477
+ "text": "string"
478
+ },
479
+ "default": "''",
480
+ "fieldName": "name"
481
+ }
482
+ ],
483
+ "superclass": {
484
+ "name": "FormControl",
485
+ "package": "@italia/globals"
486
+ }
487
+ }
488
+ ],
489
+ "exports": [
490
+ {
491
+ "kind": "js",
492
+ "name": "ItCheckboxGroupBase",
493
+ "declaration": {
494
+ "name": "ItCheckboxGroupBase",
495
+ "module": "src/it-checkbox-group-base.ts"
496
+ }
497
+ }
498
+ ]
499
+ },
28
500
  {
29
501
  "kind": "javascript-module",
30
502
  "path": "src/it-checkbox-group.ts",
@@ -33,6 +505,64 @@
33
505
  "kind": "class",
34
506
  "description": "",
35
507
  "name": "ItCheckboxGroup",
508
+ "superclass": {
509
+ "name": "ItCheckboxGroupBase",
510
+ "module": "/src/it-checkbox-group-base.js"
511
+ },
512
+ "tagName": "it-checkbox-group",
513
+ "customElement": true,
514
+ "attributes": [
515
+ {
516
+ "name": "required",
517
+ "type": {
518
+ "text": "boolean"
519
+ },
520
+ "default": "false",
521
+ "fieldName": "required",
522
+ "inheritedFrom": {
523
+ "name": "ItCheckboxGroupBase",
524
+ "module": "src/it-checkbox-group-base.ts"
525
+ }
526
+ },
527
+ {
528
+ "name": "inline",
529
+ "type": {
530
+ "text": "boolean"
531
+ },
532
+ "default": "false",
533
+ "description": "Draws checkboxes inline, side by side.",
534
+ "fieldName": "inline",
535
+ "inheritedFrom": {
536
+ "name": "ItCheckboxGroupBase",
537
+ "module": "src/it-checkbox-group-base.ts"
538
+ }
539
+ },
540
+ {
541
+ "name": "group",
542
+ "type": {
543
+ "text": "boolean"
544
+ },
545
+ "default": "false",
546
+ "description": "Draws checkboxes in groups.",
547
+ "fieldName": "group",
548
+ "inheritedFrom": {
549
+ "name": "ItCheckboxGroupBase",
550
+ "module": "src/it-checkbox-group-base.ts"
551
+ }
552
+ },
553
+ {
554
+ "name": "name",
555
+ "type": {
556
+ "text": "string"
557
+ },
558
+ "default": "''",
559
+ "fieldName": "name",
560
+ "inheritedFrom": {
561
+ "name": "ItCheckboxGroupBase",
562
+ "module": "src/it-checkbox-group-base.ts"
563
+ }
564
+ }
565
+ ],
36
566
  "members": [
37
567
  {
38
568
  "kind": "field",
@@ -42,7 +572,11 @@
42
572
  },
43
573
  "default": "false",
44
574
  "attribute": "required",
45
- "reflects": true
575
+ "reflects": true,
576
+ "inheritedFrom": {
577
+ "name": "ItCheckboxGroupBase",
578
+ "module": "src/it-checkbox-group-base.ts"
579
+ }
46
580
  },
47
581
  {
48
582
  "kind": "field",
@@ -53,7 +587,11 @@
53
587
  "default": "false",
54
588
  "description": "Draws checkboxes inline, side by side.",
55
589
  "attribute": "inline",
56
- "reflects": true
590
+ "reflects": true,
591
+ "inheritedFrom": {
592
+ "name": "ItCheckboxGroupBase",
593
+ "module": "src/it-checkbox-group-base.ts"
594
+ }
57
595
  },
58
596
  {
59
597
  "kind": "field",
@@ -64,7 +602,11 @@
64
602
  "default": "false",
65
603
  "description": "Draws checkboxes in groups.",
66
604
  "attribute": "group",
67
- "reflects": true
605
+ "reflects": true,
606
+ "inheritedFrom": {
607
+ "name": "ItCheckboxGroupBase",
608
+ "module": "src/it-checkbox-group-base.ts"
609
+ }
68
610
  },
69
611
  {
70
612
  "kind": "field",
@@ -74,13 +616,21 @@
74
616
  },
75
617
  "default": "''",
76
618
  "attribute": "name",
77
- "reflects": true
619
+ "reflects": true,
620
+ "inheritedFrom": {
621
+ "name": "ItCheckboxGroupBase",
622
+ "module": "src/it-checkbox-group-base.ts"
623
+ }
78
624
  },
79
625
  {
80
626
  "kind": "field",
81
627
  "name": "checkboxes",
82
628
  "type": {
83
- "text": "ItCheckbox[]"
629
+ "text": "ItCheckboxBase[]"
630
+ },
631
+ "inheritedFrom": {
632
+ "name": "ItCheckboxGroupBase",
633
+ "module": "src/it-checkbox-group-base.ts"
84
634
  }
85
635
  },
86
636
  {
@@ -89,7 +639,11 @@
89
639
  "type": {
90
640
  "text": "HTMLElement[]"
91
641
  },
92
- "privacy": "private"
642
+ "privacy": "private",
643
+ "inheritedFrom": {
644
+ "name": "ItCheckboxGroupBase",
645
+ "module": "src/it-checkbox-group-base.ts"
646
+ }
93
647
  },
94
648
  {
95
649
  "kind": "field",
@@ -99,7 +653,11 @@
99
653
  },
100
654
  "privacy": "protected",
101
655
  "readonly": true,
102
- "default": "new FormControlController(this, { // Il valore è un array dei valori delle checkbox selezionate value: (control: FormControl) => (control as ItCheckboxGroup).checkboxes.filter((cb) => cb.checked).map((cb) => cb.value || 'true'), // Il name è quello del gruppo name: (control: FormControl) => (control as ItCheckboxGroup).name, // La validità è gestita da noi con checkValidity di gruppo checkValidity: (control: FormControl) => (control as ItCheckboxGroup).checkValidity(), reportValidity: (control: FormControl) => (control as ItCheckboxGroup).reportValidity(), // Non implementiamo setValue qui, gestito dalle singole checkbox setValue: () => {}, // Ascoltiamo l'input su tutti i cambi di stato delle checkbox assumeInteractionOn: ['it-change'], })"
656
+ "default": "new FormControlController(this, { // Il valore è un array dei valori delle checkbox selezionate value: (control: FormControl) => (control as ItCheckboxGroupBase).checkboxes.filter((cb) => cb.checked).map((cb) => cb.value || 'true'), // Il name è quello del gruppo name: (control: FormControl) => (control as ItCheckboxGroupBase).name, // La validità è gestita da noi con checkValidity di gruppo checkValidity: (control: FormControl) => (control as ItCheckboxGroupBase).checkValidity(), reportValidity: (control: FormControl) => (control as ItCheckboxGroupBase).reportValidity(), // Non implementiamo setValue qui, gestito dalle singole checkbox setValue: () => {}, // Ascoltiamo l'input su tutti i cambi di stato delle checkbox assumeInteractionOn: ['it-change'], })",
657
+ "inheritedFrom": {
658
+ "name": "ItCheckboxGroupBase",
659
+ "module": "src/it-checkbox-group-base.ts"
660
+ }
103
661
  },
104
662
  {
105
663
  "kind": "field",
@@ -108,13 +666,21 @@
108
666
  "text": "boolean"
109
667
  },
110
668
  "privacy": "private",
111
- "default": "true"
669
+ "default": "true",
670
+ "inheritedFrom": {
671
+ "name": "ItCheckboxGroupBase",
672
+ "module": "src/it-checkbox-group-base.ts"
673
+ }
112
674
  },
113
675
  {
114
676
  "kind": "field",
115
677
  "name": "selectedValues",
116
678
  "type": {
117
679
  "text": "string[]"
680
+ },
681
+ "inheritedFrom": {
682
+ "name": "ItCheckboxGroupBase",
683
+ "module": "src/it-checkbox-group-base.ts"
118
684
  }
119
685
  },
120
686
  {
@@ -128,7 +694,11 @@
128
694
  "text": "string"
129
695
  }
130
696
  }
131
- ]
697
+ ],
698
+ "inheritedFrom": {
699
+ "name": "ItCheckboxGroupBase",
700
+ "module": "src/it-checkbox-group-base.ts"
701
+ }
132
702
  },
133
703
  {
134
704
  "kind": "field",
@@ -137,12 +707,20 @@
137
707
  "text": "ValidityState"
138
708
  },
139
709
  "description": "Override: Custom validity check for radio group",
140
- "readonly": true
710
+ "readonly": true,
711
+ "inheritedFrom": {
712
+ "name": "ItCheckboxGroupBase",
713
+ "module": "src/it-checkbox-group-base.ts"
714
+ }
141
715
  },
142
716
  {
143
717
  "kind": "method",
144
718
  "name": "_handleGroupChange",
145
- "privacy": "private"
719
+ "privacy": "private",
720
+ "inheritedFrom": {
721
+ "name": "ItCheckboxGroupBase",
722
+ "module": "src/it-checkbox-group-base.ts"
723
+ }
146
724
  },
147
725
  {
148
726
  "kind": "method",
@@ -152,7 +730,11 @@
152
730
  "text": "boolean"
153
731
  }
154
732
  },
155
- "description": "Override di checkValidity per la logica di gruppo."
733
+ "description": "Override di checkValidity per la logica di gruppo.",
734
+ "inheritedFrom": {
735
+ "name": "ItCheckboxGroupBase",
736
+ "module": "src/it-checkbox-group-base.ts"
737
+ }
156
738
  },
157
739
  {
158
740
  "kind": "method",
@@ -162,19 +744,31 @@
162
744
  "text": "boolean"
163
745
  }
164
746
  },
165
- "description": "Override di reportValidity per mostrare l'errore a livello di gruppo."
747
+ "description": "Override di reportValidity per mostrare l'errore a livello di gruppo.",
748
+ "inheritedFrom": {
749
+ "name": "ItCheckboxGroupBase",
750
+ "module": "src/it-checkbox-group-base.ts"
751
+ }
166
752
  },
167
753
  {
168
754
  "kind": "method",
169
755
  "name": "handleValidationMessages",
170
756
  "privacy": "protected",
171
- "description": "Il tuo FormControl ha già un handleValidationMessages che\nsetta this.validationMessage. Aggiorniamolo per la logica di gruppo."
757
+ "description": "Il tuo FormControl ha già un handleValidationMessages che\nsetta this.validationMessage. Aggiorniamolo per la logica di gruppo.",
758
+ "inheritedFrom": {
759
+ "name": "ItCheckboxGroupBase",
760
+ "module": "src/it-checkbox-group-base.ts"
761
+ }
172
762
  },
173
763
  {
174
764
  "kind": "method",
175
765
  "name": "_syncGroupStateToChildren",
176
766
  "privacy": "private",
177
- "description": "Sync group state (name, grouped, inline, required, disabled, checked) to child checkboxes\nThis replaces the need for requestUpdate() calls"
767
+ "description": "Sync group state (name, grouped, inline, required, disabled, checked) to child checkboxes\nThis replaces the need for requestUpdate() calls",
768
+ "inheritedFrom": {
769
+ "name": "ItCheckboxGroupBase",
770
+ "module": "src/it-checkbox-group-base.ts"
771
+ }
178
772
  },
179
773
  {
180
774
  "kind": "method",
@@ -187,22 +781,70 @@
187
781
  "text": "string"
188
782
  }
189
783
  }
190
- ]
784
+ ],
785
+ "inheritedFrom": {
786
+ "name": "ItCheckboxGroupBase",
787
+ "module": "src/it-checkbox-group-base.ts"
788
+ }
191
789
  },
192
790
  {
193
791
  "kind": "method",
194
792
  "name": "_handleSlotChange",
195
- "privacy": "private"
793
+ "privacy": "private",
794
+ "inheritedFrom": {
795
+ "name": "ItCheckboxGroupBase",
796
+ "module": "src/it-checkbox-group-base.ts"
797
+ }
196
798
  }
197
- ],
799
+ ]
800
+ }
801
+ ],
802
+ "exports": [
803
+ {
804
+ "kind": "js",
805
+ "name": "ItCheckboxGroup",
806
+ "declaration": {
807
+ "name": "ItCheckboxGroup",
808
+ "module": "src/it-checkbox-group.ts"
809
+ }
810
+ },
811
+ {
812
+ "kind": "custom-element-definition",
813
+ "name": "it-checkbox-group",
814
+ "declaration": {
815
+ "name": "ItCheckboxGroup",
816
+ "module": "src/it-checkbox-group.ts"
817
+ }
818
+ }
819
+ ]
820
+ },
821
+ {
822
+ "kind": "javascript-module",
823
+ "path": "src/it-checkbox.ts",
824
+ "declarations": [
825
+ {
826
+ "kind": "class",
827
+ "description": "",
828
+ "name": "ItCheckbox",
829
+ "superclass": {
830
+ "name": "ItCheckboxBase",
831
+ "module": "/src/it-checkbox-base.js"
832
+ },
833
+ "tagName": "it-checkbox",
834
+ "customElement": true,
198
835
  "attributes": [
199
836
  {
200
- "name": "required",
837
+ "name": "checked",
201
838
  "type": {
202
839
  "text": "boolean"
203
840
  },
204
841
  "default": "false",
205
- "fieldName": "required"
842
+ "description": "Draws the checkbox in a checked state.",
843
+ "fieldName": "checked",
844
+ "inheritedFrom": {
845
+ "name": "ItCheckboxBase",
846
+ "module": "src/it-checkbox-base.ts"
847
+ }
206
848
  },
207
849
  {
208
850
  "name": "inline",
@@ -211,7 +853,11 @@
211
853
  },
212
854
  "default": "false",
213
855
  "description": "Draws checkboxes inline, side by side.",
214
- "fieldName": "inline"
856
+ "fieldName": "inline",
857
+ "inheritedFrom": {
858
+ "name": "ItCheckboxBase",
859
+ "module": "src/it-checkbox-base.ts"
860
+ }
215
861
  },
216
862
  {
217
863
  "name": "group",
@@ -220,52 +866,39 @@
220
866
  },
221
867
  "default": "false",
222
868
  "description": "Draws checkboxes in groups.",
223
- "fieldName": "group"
869
+ "fieldName": "group",
870
+ "inheritedFrom": {
871
+ "name": "ItCheckboxBase",
872
+ "module": "src/it-checkbox-base.ts"
873
+ }
224
874
  },
225
875
  {
226
- "name": "name",
876
+ "name": "indeterminate",
877
+ "type": {
878
+ "text": "boolean"
879
+ },
880
+ "default": "false",
881
+ "description": "Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\nall/none\" behavior when associated checkboxes have a mix of checked and unchecked states.",
882
+ "fieldName": "indeterminate",
883
+ "inheritedFrom": {
884
+ "name": "ItCheckboxBase",
885
+ "module": "src/it-checkbox-base.ts"
886
+ }
887
+ },
888
+ {
889
+ "name": "support-text",
227
890
  "type": {
228
891
  "text": "string"
229
892
  },
230
893
  "default": "''",
231
- "fieldName": "name"
894
+ "description": "The input's help text.",
895
+ "fieldName": "supportText",
896
+ "inheritedFrom": {
897
+ "name": "ItCheckboxBase",
898
+ "module": "src/it-checkbox-base.ts"
899
+ }
232
900
  }
233
901
  ],
234
- "superclass": {
235
- "name": "FormControl",
236
- "package": "@italia/globals"
237
- },
238
- "tagName": "it-checkbox-group",
239
- "customElement": true
240
- }
241
- ],
242
- "exports": [
243
- {
244
- "kind": "js",
245
- "name": "ItCheckboxGroup",
246
- "declaration": {
247
- "name": "ItCheckboxGroup",
248
- "module": "src/it-checkbox-group.ts"
249
- }
250
- },
251
- {
252
- "kind": "custom-element-definition",
253
- "name": "it-checkbox-group",
254
- "declaration": {
255
- "name": "ItCheckboxGroup",
256
- "module": "src/it-checkbox-group.ts"
257
- }
258
- }
259
- ]
260
- },
261
- {
262
- "kind": "javascript-module",
263
- "path": "src/it-checkbox.ts",
264
- "declarations": [
265
- {
266
- "kind": "class",
267
- "description": "",
268
- "name": "ItCheckbox",
269
902
  "members": [
270
903
  {
271
904
  "kind": "field",
@@ -275,7 +908,11 @@
275
908
  },
276
909
  "privacy": "protected",
277
910
  "readonly": true,
278
- "default": "new FormControlController(this, { value: (control: FormControl) => (control as ItCheckbox).checked ? (control as ItCheckbox).value || 'true' : undefined, setValue: (control: FormControl, value: unknown) => { const checkbox = control as ItCheckbox; checkbox.checked = Boolean(value); }, })"
911
+ "default": "new FormControlController(this, { value: (control: FormControl) => (control as ItCheckboxBase).checked ? (control as ItCheckboxBase).value || 'true' : undefined, setValue: (control: FormControl, value: unknown) => { const checkbox = control as ItCheckboxBase; checkbox.checked = Boolean(value); }, })",
912
+ "inheritedFrom": {
913
+ "name": "ItCheckboxBase",
914
+ "module": "src/it-checkbox-base.ts"
915
+ }
279
916
  },
280
917
  {
281
918
  "kind": "field",
@@ -284,7 +921,11 @@
284
921
  "text": "string"
285
922
  },
286
923
  "default": "'checkbox'",
287
- "description": "The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\nto `text`."
924
+ "description": "The type of input. Works the same as a native `<input>` element, but only a subset of types are supported. Defaults\nto `text`.",
925
+ "inheritedFrom": {
926
+ "name": "ItCheckboxBase",
927
+ "module": "src/it-checkbox-base.ts"
928
+ }
288
929
  },
289
930
  {
290
931
  "kind": "field",
@@ -295,7 +936,11 @@
295
936
  "default": "false",
296
937
  "description": "Draws the checkbox in a checked state.",
297
938
  "attribute": "checked",
298
- "reflects": true
939
+ "reflects": true,
940
+ "inheritedFrom": {
941
+ "name": "ItCheckboxBase",
942
+ "module": "src/it-checkbox-base.ts"
943
+ }
299
944
  },
300
945
  {
301
946
  "kind": "field",
@@ -306,7 +951,11 @@
306
951
  "default": "false",
307
952
  "description": "Draws checkboxes inline, side by side.",
308
953
  "attribute": "inline",
309
- "reflects": true
954
+ "reflects": true,
955
+ "inheritedFrom": {
956
+ "name": "ItCheckboxBase",
957
+ "module": "src/it-checkbox-base.ts"
958
+ }
310
959
  },
311
960
  {
312
961
  "kind": "field",
@@ -317,7 +966,11 @@
317
966
  "default": "false",
318
967
  "description": "Draws checkboxes in groups.",
319
968
  "attribute": "group",
320
- "reflects": true
969
+ "reflects": true,
970
+ "inheritedFrom": {
971
+ "name": "ItCheckboxBase",
972
+ "module": "src/it-checkbox-base.ts"
973
+ }
321
974
  },
322
975
  {
323
976
  "kind": "field",
@@ -328,13 +981,21 @@
328
981
  "default": "false",
329
982
  "description": "Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\nall/none\" behavior when associated checkboxes have a mix of checked and unchecked states.",
330
983
  "attribute": "indeterminate",
331
- "reflects": true
984
+ "reflects": true,
985
+ "inheritedFrom": {
986
+ "name": "ItCheckboxBase",
987
+ "module": "src/it-checkbox-base.ts"
988
+ }
332
989
  },
333
990
  {
334
991
  "kind": "field",
335
992
  "name": "labelElements",
336
993
  "type": {
337
994
  "text": "HTMLElement[]"
995
+ },
996
+ "inheritedFrom": {
997
+ "name": "ItCheckboxBase",
998
+ "module": "src/it-checkbox-base.ts"
338
999
  }
339
1000
  },
340
1001
  {
@@ -343,7 +1004,11 @@
343
1004
  "type": {
344
1005
  "text": "string"
345
1006
  },
346
- "readonly": true
1007
+ "readonly": true,
1008
+ "inheritedFrom": {
1009
+ "name": "ItCheckboxBase",
1010
+ "module": "src/it-checkbox-base.ts"
1011
+ }
347
1012
  },
348
1013
  {
349
1014
  "kind": "field",
@@ -353,12 +1018,20 @@
353
1018
  },
354
1019
  "default": "''",
355
1020
  "description": "The input's help text.",
356
- "attribute": "support-text"
1021
+ "attribute": "support-text",
1022
+ "inheritedFrom": {
1023
+ "name": "ItCheckboxBase",
1024
+ "module": "src/it-checkbox-base.ts"
1025
+ }
357
1026
  },
358
1027
  {
359
1028
  "kind": "method",
360
1029
  "name": "click",
361
- "description": "Simulates a click on the checkbox."
1030
+ "description": "Simulates a click on the checkbox.",
1031
+ "inheritedFrom": {
1032
+ "name": "ItCheckboxBase",
1033
+ "module": "src/it-checkbox-base.ts"
1034
+ }
362
1035
  },
363
1036
  {
364
1037
  "kind": "method",
@@ -376,12 +1049,16 @@
376
1049
  "text": "Event"
377
1050
  }
378
1051
  }
379
- ]
1052
+ ],
1053
+ "inheritedFrom": {
1054
+ "name": "ItCheckboxBase",
1055
+ "module": "src/it-checkbox-base.ts"
1056
+ }
380
1057
  },
381
1058
  {
382
1059
  "kind": "method",
383
1060
  "name": "_renderInput",
384
- "privacy": "private",
1061
+ "privacy": "protected",
385
1062
  "parameters": [
386
1063
  {
387
1064
  "name": "supportTextId",
@@ -401,70 +1078,68 @@
401
1078
  "text": "string"
402
1079
  }
403
1080
  }
404
- ]
405
- }
406
- ],
407
- "events": [
408
- {
409
- "name": "change",
410
- "type": {
411
- "text": "Event"
1081
+ ],
1082
+ "inheritedFrom": {
1083
+ "name": "ItCheckboxBase",
1084
+ "module": "src/it-checkbox-base.ts"
412
1085
  }
413
- }
414
- ],
415
- "attributes": [
416
- {
417
- "name": "checked",
418
- "type": {
419
- "text": "boolean"
420
- },
421
- "default": "false",
422
- "description": "Draws the checkbox in a checked state.",
423
- "fieldName": "checked"
424
1086
  },
425
1087
  {
426
- "name": "inline",
427
- "type": {
428
- "text": "boolean"
429
- },
430
- "default": "false",
431
- "description": "Draws checkboxes inline, side by side.",
432
- "fieldName": "inline"
1088
+ "kind": "method",
1089
+ "name": "getWrapperClasses",
1090
+ "privacy": "protected",
1091
+ "inheritedFrom": {
1092
+ "name": "ItCheckboxBase",
1093
+ "module": "src/it-checkbox-base.ts"
1094
+ }
433
1095
  },
434
1096
  {
435
- "name": "group",
436
- "type": {
437
- "text": "boolean"
438
- },
439
- "default": "false",
440
- "description": "Draws checkboxes in groups.",
441
- "fieldName": "group"
1097
+ "kind": "method",
1098
+ "name": "getSupportTextRender",
1099
+ "privacy": "protected",
1100
+ "parameters": [
1101
+ {
1102
+ "name": "supportTextId",
1103
+ "type": {
1104
+ "text": "string"
1105
+ }
1106
+ }
1107
+ ],
1108
+ "inheritedFrom": {
1109
+ "name": "ItCheckboxBase",
1110
+ "module": "src/it-checkbox-base.ts"
1111
+ }
442
1112
  },
443
1113
  {
444
- "name": "indeterminate",
445
- "type": {
446
- "text": "boolean"
447
- },
448
- "default": "false",
449
- "description": "Draws the checkbox in an indeterminate state. This is usually applied to checkboxes that represents a \"select\nall/none\" behavior when associated checkboxes have a mix of checked and unchecked states.",
450
- "fieldName": "indeterminate"
451
- },
1114
+ "kind": "method",
1115
+ "name": "getValidityMessageRender",
1116
+ "privacy": "protected",
1117
+ "parameters": [
1118
+ {
1119
+ "name": "validityMessage",
1120
+ "type": {
1121
+ "text": "string"
1122
+ }
1123
+ }
1124
+ ],
1125
+ "inheritedFrom": {
1126
+ "name": "ItCheckboxBase",
1127
+ "module": "src/it-checkbox-base.ts"
1128
+ }
1129
+ }
1130
+ ],
1131
+ "events": [
452
1132
  {
453
- "name": "support-text",
1133
+ "name": "change",
454
1134
  "type": {
455
- "text": "string"
1135
+ "text": "Event"
456
1136
  },
457
- "default": "''",
458
- "description": "The input's help text.",
459
- "fieldName": "supportText"
1137
+ "inheritedFrom": {
1138
+ "name": "ItCheckboxBase",
1139
+ "module": "src/it-checkbox-base.ts"
1140
+ }
460
1141
  }
461
- ],
462
- "superclass": {
463
- "name": "FormControl",
464
- "package": "@italia/globals"
465
- },
466
- "tagName": "it-checkbox",
467
- "customElement": true
1142
+ ]
468
1143
  }
469
1144
  ],
470
1145
  "exports": [
@@ -493,7 +1168,7 @@
493
1168
  {
494
1169
  "kind": "variable",
495
1170
  "name": "meta",
496
- "default": "{ title: 'Componenti/Form/Checkbox', tags: ['new', 'a11y-ok', 'web-component'], component: 'it-checkbox', args: { id: '', label: 'Checkbox di esempio', name: 'esempio', value: undefined, checked: false, indeterminate: false, disabled: false, form: undefined, customValidation: false, validityMessage: '', required: false, inline: false, group: false, supportText: '', }, argTypes: { id: { control: 'text', description: 'ID del campo', type: 'string', }, label: { control: 'text', description: 'Etichetta del campo', type: 'string', }, name: { control: 'text', type: 'string', }, value: { control: 'text', description: 'Valore del campo', type: 'string', }, checked: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, indeterminate: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, disabled: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, form: { control: 'text', type: 'string', description: \"ID html del form a cui è associato il campo, se il campo non si trova all'interno di una form \", }, customValidation: { name: 'custom-validation', control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: 'Se la validazione del campo è fatta esternamente (lato server o con plugin js - validazione custom), impostare questo attributo a `true`.', }, validityMessage: { name: 'validity-message', control: 'text', type: 'string', description: \"Messaggio da mostrare quando il campo è invalido nel caso di validazione esterna (validazione custom). Se impostato a '' (stringa vuota) il campo viene considerato valido.\", }, required: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, inline: { control: 'boolean', type: 'boolean', description: 'Se si vogliono mostrare più checkbox affiancate orizzontalmente', table: { defaultValue: { summary: 'false' } }, }, group: { control: 'boolean', type: 'boolean', description: 'Se si vogliono mostrare più checkbox raggruppate visivamente', table: { defaultValue: { summary: 'false' } }, }, supportText: { name: 'support-text', control: 'text', description: 'Testo di supporto', type: 'string', }, }, } satisfies Meta<CheckboxProps>"
1171
+ "default": "{ title: 'Componenti/Form/Checkbox', tags: ['a11y-ok', 'web-component'], component: 'it-checkbox', args: { id: '', label: 'Checkbox di esempio', name: 'esempio', value: undefined, checked: false, indeterminate: false, disabled: false, form: undefined, customValidation: false, validityMessage: '', required: false, inline: false, group: false, supportText: '', }, argTypes: { id: { control: 'text', description: 'ID del campo', type: 'string', }, label: { control: 'text', description: 'Etichetta del campo', type: 'string', }, name: { control: 'text', type: 'string', }, value: { control: 'text', description: 'Valore del campo', type: 'string', }, checked: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, indeterminate: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, disabled: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, form: { control: 'text', type: 'string', description: \"ID html del form a cui è associato il campo, se il campo non si trova all'interno di una form \", }, customValidation: { name: 'custom-validation', control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, description: 'Se la validazione del campo è fatta esternamente (lato server o con plugin js - validazione custom), impostare questo attributo a `true`.', }, validityMessage: { name: 'validity-message', control: 'text', type: 'string', description: \"Messaggio da mostrare quando il campo è invalido nel caso di validazione esterna (validazione custom). Se impostato a '' (stringa vuota) il campo viene considerato valido.\", }, required: { control: 'boolean', type: 'boolean', table: { defaultValue: { summary: 'false' } }, }, inline: { control: 'boolean', type: 'boolean', description: 'Se si vogliono mostrare più checkbox affiancate orizzontalmente', table: { defaultValue: { summary: 'false' } }, }, group: { control: 'boolean', type: 'boolean', description: 'Se si vogliono mostrare più checkbox raggruppate visivamente', table: { defaultValue: { summary: 'false' } }, }, supportText: { name: 'support-text', control: 'text', description: 'Testo di supporto', type: 'string', }, }, } satisfies Meta<CheckboxProps>"
497
1172
  },
498
1173
  {
499
1174
  "kind": "variable",
@@ -533,7 +1208,7 @@
533
1208
  "type": {
534
1209
  "text": "Story"
535
1210
  },
536
- "default": "{ ...meta, name: 'Gruppo di checkbox', args: { group: true }, render: (params) => html` <div class=\"row\"> <it-checkbox-group name=${params.name} ?required=${params.required} ?group=${params.group} ?inline=${params.inline} ?disabled=${params.disabled} class=\"col-12 col-md-6\" > <span slot=\"legend\">Gruppo di checkbox</span> ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox selezionato', checked: true, })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox non selezionato', })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, disabled: true, label: 'Checkbox disabilitato non selezionato', })} </it-checkbox-group> <it-checkbox-group name=${params.name} ?required=${params.required} ?group=${params.group} ?inline=${params.inline} ?disabled=${Group.disabled} class=\"col-12 col-md-6\" > <span slot=\"legend\">Gruppo di checkbox</span> ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox selezionato', checked: true, supportText: \"Testo descrittivo di supporto per l'opzione selezionabile\", })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox non selezionato', supportText: \"Testo descrittivo di supporto per l'opzione selezionabile\", })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, disabled: true, label: 'Checkbox disabilitato non selezionato', supportText: \"Testo descrittivo di supporto per l'opzione selezionabile\", })} </it-checkbox-group> </div> `, }"
1211
+ "default": "{ ...meta, name: 'Gruppo di checkbox', args: { group: true }, render: (params) => html` <div class=\"row\"> <it-checkbox-group name=${params.name} ?required=${params.required} ?group=${params.group} ?inline=${params.inline} ?disabled=${params.disabled} class=\"col-12 col-md-6\" > <span slot=\"legend\">Gruppo di checkbox</span> ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox selezionato', checked: true, })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox non selezionato', })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, disabled: true, label: 'Checkbox disabilitato non selezionato', })} </it-checkbox-group> <it-checkbox-group name=${`${params.name}-1`} ?required=${params.required} ?group=${params.group} ?inline=${params.inline} ?disabled=${params.disabled} class=\"col-12 col-md-6\" > <span slot=\"legend\">Gruppo di checkbox</span> ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox selezionato', checked: true, supportText: \"Testo descrittivo di supporto per l'opzione selezionabile\", })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, label: 'Checkbox non selezionato', supportText: \"Testo descrittivo di supporto per l'opzione selezionabile\", })} ${renderComponent({ ...params, required: undefined, name: undefined, group: undefined, inline: undefined, disabled: true, label: 'Checkbox disabilitato non selezionato', supportText: \"Testo descrittivo di supporto per l'opzione selezionabile\", })} </it-checkbox-group> </div> `, }"
537
1212
  },
538
1213
  {
539
1214
  "kind": "variable",