@italia/globals 0.1.0-alpha.1 → 1.0.0-alpha.4

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.
Files changed (58) hide show
  1. package/custom-elements.json +1655 -168
  2. package/dist/src/base-component/base-component.d.ts +28 -13
  3. package/dist/src/base-component/base-component.d.ts.map +1 -1
  4. package/dist/src/base-component/base-component.js +27 -17
  5. package/dist/src/base-component/base-component.js.map +1 -1
  6. package/dist/src/controllers/aria-keyboard-accordion-controller.d.ts +15 -0
  7. package/dist/src/controllers/aria-keyboard-accordion-controller.d.ts.map +1 -0
  8. package/dist/src/controllers/aria-keyboard-accordion-controller.js +52 -0
  9. package/dist/src/controllers/aria-keyboard-accordion-controller.js.map +1 -0
  10. package/dist/src/controllers/aria-keyboard-list-controller.d.ts +18 -0
  11. package/dist/src/controllers/aria-keyboard-list-controller.d.ts.map +1 -0
  12. package/dist/src/controllers/aria-keyboard-list-controller.js +58 -0
  13. package/dist/src/controllers/aria-keyboard-list-controller.js.map +1 -0
  14. package/dist/src/controllers/collapse-controller.d.ts +12 -0
  15. package/dist/src/controllers/collapse-controller.d.ts.map +1 -0
  16. package/dist/src/controllers/collapse-controller.js +95 -0
  17. package/dist/src/controllers/collapse-controller.js.map +1 -0
  18. package/dist/src/controllers/roving-tabindex-controller.d.ts +85 -0
  19. package/dist/src/controllers/roving-tabindex-controller.d.ts.map +1 -0
  20. package/dist/src/controllers/roving-tabindex-controller.js +200 -0
  21. package/dist/src/controllers/roving-tabindex-controller.js.map +1 -0
  22. package/dist/src/form/form-control.d.ts +61 -0
  23. package/dist/src/form/form-control.d.ts.map +1 -0
  24. package/dist/src/form/form-control.js +259 -0
  25. package/dist/src/form/form-control.js.map +1 -0
  26. package/dist/src/form/form-controller.d.ts +68 -0
  27. package/dist/src/form/form-controller.d.ts.map +1 -0
  28. package/dist/src/form/form-controller.js +398 -0
  29. package/dist/src/form/form-controller.js.map +1 -0
  30. package/dist/src/form/locales/it.d.ts +4 -0
  31. package/dist/src/form/locales/it.d.ts.map +1 -0
  32. package/dist/src/form/locales/it.js +12 -0
  33. package/dist/src/form/locales/it.js.map +1 -0
  34. package/dist/src/index.d.ts +20 -4
  35. package/dist/src/index.d.ts.map +1 -1
  36. package/dist/src/index.js +18 -4
  37. package/dist/src/index.js.map +1 -1
  38. package/dist/src/mixins/validity.d.ts +19 -19
  39. package/dist/src/mixins/validity.d.ts.map +1 -1
  40. package/dist/src/mixins/validity.js +6 -68
  41. package/dist/src/mixins/validity.js.map +1 -1
  42. package/dist/src/stories/formControlReusableStories.d.ts +19 -0
  43. package/dist/src/stories/formControlReusableStories.d.ts.map +1 -0
  44. package/dist/src/stories/formControlReusableStories.js +64 -0
  45. package/dist/src/stories/formControlReusableStories.js.map +1 -0
  46. package/dist/src/stories/reusableUsageGuidelinesStories.d.ts +13 -0
  47. package/dist/src/stories/reusableUsageGuidelinesStories.d.ts.map +1 -0
  48. package/dist/src/stories/reusableUsageGuidelinesStories.js +39 -0
  49. package/dist/src/stories/reusableUsageGuidelinesStories.js.map +1 -0
  50. package/dist/src/window-manager.d.ts +20 -0
  51. package/dist/src/window-manager.d.ts.map +1 -0
  52. package/dist/src/window-manager.js +47 -0
  53. package/dist/src/window-manager.js.map +1 -0
  54. package/package.json +10 -8
  55. package/dist/src/mixins/form.d.ts +0 -363
  56. package/dist/src/mixins/form.d.ts.map +0 -1
  57. package/dist/src/mixins/form.js +0 -36
  58. package/dist/src/mixins/form.js.map +0 -1
@@ -17,26 +17,42 @@
17
17
  },
18
18
  {
19
19
  "kind": "js",
20
- "name": "FormMixin",
20
+ "name": "setAttributes",
21
21
  "declaration": {
22
- "name": "FormMixin",
22
+ "name": "setAttributes",
23
23
  "module": "src/index.ts"
24
24
  }
25
25
  },
26
26
  {
27
27
  "kind": "js",
28
- "name": "ValidityMixin",
28
+ "name": "AriaKeyboardListController",
29
29
  "declaration": {
30
- "name": "ValidityMixin",
30
+ "name": "AriaKeyboardListController",
31
31
  "module": "src/index.ts"
32
32
  }
33
33
  },
34
34
  {
35
35
  "kind": "js",
36
- "name": "setAttributes",
36
+ "name": "AriaKeyboardConfig",
37
37
  "declaration": {
38
- "name": "setAttributes",
39
- "module": "src/index.ts"
38
+ "name": "AriaKeyboardConfig",
39
+ "module": "./controllers/aria-keyboard-list-controller.js"
40
+ }
41
+ },
42
+ {
43
+ "kind": "js",
44
+ "name": "RovingTabindexController",
45
+ "declaration": {
46
+ "name": "RovingTabindexController",
47
+ "module": "./controllers/roving-tabindex-controller.js"
48
+ }
49
+ },
50
+ {
51
+ "kind": "js",
52
+ "name": "RovingTabindexConfig",
53
+ "declaration": {
54
+ "name": "RovingTabindexConfig",
55
+ "module": "./controllers/roving-tabindex-controller.js"
40
56
  }
41
57
  },
42
58
  {
@@ -73,10 +89,58 @@
73
89
  },
74
90
  {
75
91
  "kind": "js",
76
- "name": "VALIDATION_STATUS",
92
+ "name": "AriaKeyboardAccordionController",
93
+ "declaration": {
94
+ "name": "AriaKeyboardAccordionController",
95
+ "module": "./controllers/aria-keyboard-accordion-controller.js"
96
+ }
97
+ },
98
+ {
99
+ "kind": "js",
100
+ "name": "AriaKeyboardAccordionConfig",
101
+ "declaration": {
102
+ "name": "AriaKeyboardAccordionConfig",
103
+ "module": "./controllers/aria-keyboard-accordion-controller.js"
104
+ }
105
+ },
106
+ {
107
+ "kind": "js",
108
+ "name": "CollapseAnimationController",
109
+ "declaration": {
110
+ "name": "CollapseAnimationController",
111
+ "module": "./controllers/collapse-controller.js"
112
+ }
113
+ },
114
+ {
115
+ "kind": "js",
116
+ "name": "FormControl",
77
117
  "declaration": {
78
- "name": "VALIDATION_STATUS",
79
- "module": "./mixins/validity.js"
118
+ "name": "FormControl",
119
+ "module": "./form/form-control.js"
120
+ }
121
+ },
122
+ {
123
+ "kind": "js",
124
+ "name": "formCollections",
125
+ "declaration": {
126
+ "name": "formCollections",
127
+ "module": "./form/form-controller.js"
128
+ }
129
+ },
130
+ {
131
+ "kind": "js",
132
+ "name": "FormControlControllerOptions",
133
+ "declaration": {
134
+ "name": "FormControlControllerOptions",
135
+ "module": "./form/form-controller.js"
136
+ }
137
+ },
138
+ {
139
+ "kind": "js",
140
+ "name": "FormControlController",
141
+ "declaration": {
142
+ "name": "FormControlController",
143
+ "module": "./form/form-controller.js"
80
144
  }
81
145
  },
82
146
  {
@@ -86,6 +150,183 @@
86
150
  "name": "cookies",
87
151
  "module": "./utils/cookies.js"
88
152
  }
153
+ },
154
+ {
155
+ "kind": "js",
156
+ "name": "WindowManager",
157
+ "declaration": {
158
+ "name": "WindowManager",
159
+ "module": "./window-manager.js"
160
+ }
161
+ },
162
+ {
163
+ "kind": "js",
164
+ "name": "ScrollCallback",
165
+ "declaration": {
166
+ "name": "ScrollCallback",
167
+ "module": "./window-manager.js"
168
+ }
169
+ },
170
+ {
171
+ "kind": "js",
172
+ "name": "ScrollState",
173
+ "declaration": {
174
+ "name": "ScrollState",
175
+ "module": "./window-manager.js"
176
+ }
177
+ },
178
+ {
179
+ "kind": "js",
180
+ "name": "StoryFormControlMethodAndProps",
181
+ "declaration": {
182
+ "name": "StoryFormControlMethodAndProps",
183
+ "module": "src/index.ts"
184
+ }
185
+ },
186
+ {
187
+ "kind": "js",
188
+ "name": "CollapsibleOrHiddenContentGuidelines",
189
+ "declaration": {
190
+ "name": "CollapsibleOrHiddenContentGuidelines",
191
+ "module": "src/index.ts"
192
+ }
193
+ }
194
+ ]
195
+ },
196
+ {
197
+ "kind": "javascript-module",
198
+ "path": "src/window-manager.ts",
199
+ "declarations": [
200
+ {
201
+ "kind": "class",
202
+ "description": "",
203
+ "name": "WindowManager",
204
+ "members": [
205
+ {
206
+ "kind": "field",
207
+ "name": "initialized",
208
+ "type": {
209
+ "text": "boolean"
210
+ },
211
+ "privacy": "private",
212
+ "static": true,
213
+ "default": "false"
214
+ },
215
+ {
216
+ "kind": "field",
217
+ "name": "subscribers",
218
+ "privacy": "private",
219
+ "static": true,
220
+ "default": "new Set<ScrollCallback>()"
221
+ },
222
+ {
223
+ "kind": "field",
224
+ "name": "lastScrollY",
225
+ "type": {
226
+ "text": "number"
227
+ },
228
+ "privacy": "private",
229
+ "static": true,
230
+ "default": "0"
231
+ },
232
+ {
233
+ "kind": "field",
234
+ "name": "lastWidth",
235
+ "type": {
236
+ "text": "number"
237
+ },
238
+ "privacy": "private",
239
+ "static": true,
240
+ "default": "0"
241
+ },
242
+ {
243
+ "kind": "field",
244
+ "name": "lastHeight",
245
+ "type": {
246
+ "text": "number"
247
+ },
248
+ "privacy": "private",
249
+ "static": true,
250
+ "default": "0"
251
+ },
252
+ {
253
+ "kind": "field",
254
+ "name": "ticking",
255
+ "type": {
256
+ "text": "boolean"
257
+ },
258
+ "privacy": "private",
259
+ "static": true,
260
+ "default": "false"
261
+ },
262
+ {
263
+ "kind": "method",
264
+ "name": "init",
265
+ "static": true
266
+ },
267
+ {
268
+ "kind": "method",
269
+ "name": "requestTick",
270
+ "privacy": "private",
271
+ "static": true,
272
+ "parameters": [
273
+ {
274
+ "name": "forceRecalc",
275
+ "default": "false"
276
+ }
277
+ ]
278
+ },
279
+ {
280
+ "kind": "method",
281
+ "name": "tick",
282
+ "privacy": "private",
283
+ "static": true,
284
+ "parameters": [
285
+ {
286
+ "name": "forceRecalc",
287
+ "type": {
288
+ "text": "boolean"
289
+ }
290
+ }
291
+ ]
292
+ },
293
+ {
294
+ "kind": "method",
295
+ "name": "subscribe",
296
+ "static": true,
297
+ "parameters": [
298
+ {
299
+ "name": "cb",
300
+ "type": {
301
+ "text": "ScrollCallback"
302
+ }
303
+ }
304
+ ]
305
+ },
306
+ {
307
+ "kind": "method",
308
+ "name": "unsubscribe",
309
+ "static": true,
310
+ "parameters": [
311
+ {
312
+ "name": "cb",
313
+ "type": {
314
+ "text": "ScrollCallback"
315
+ }
316
+ }
317
+ ]
318
+ }
319
+ ]
320
+ }
321
+ ],
322
+ "exports": [
323
+ {
324
+ "kind": "js",
325
+ "name": "WindowManager",
326
+ "declaration": {
327
+ "name": "WindowManager",
328
+ "module": "src/window-manager.ts"
329
+ }
89
330
  }
90
331
  ]
91
332
  },
@@ -107,6 +348,20 @@
107
348
  "privacy": "protected",
108
349
  "default": "new Logger(this.tagName.toLowerCase())"
109
350
  },
351
+ {
352
+ "kind": "field",
353
+ "name": "composeClass",
354
+ "privacy": "protected",
355
+ "default": "clsx"
356
+ },
357
+ {
358
+ "kind": "field",
359
+ "name": "_id",
360
+ "type": {
361
+ "text": "string | undefined"
362
+ },
363
+ "privacy": "protected"
364
+ },
110
365
  {
111
366
  "kind": "field",
112
367
  "name": "_ariaAttributes",
@@ -114,143 +369,1323 @@
114
369
  "text": "Record<string, string>"
115
370
  },
116
371
  "privacy": "protected",
117
- "default": "{}"
372
+ "readonly": true
373
+ },
374
+ {
375
+ "kind": "method",
376
+ "name": "generateId",
377
+ "parameters": [
378
+ {
379
+ "name": "prefix",
380
+ "type": {
381
+ "text": "string"
382
+ }
383
+ }
384
+ ]
385
+ },
386
+ {
387
+ "kind": "method",
388
+ "name": "addFocus",
389
+ "parameters": [
390
+ {
391
+ "name": "element",
392
+ "type": {
393
+ "text": "HTMLElement"
394
+ }
395
+ }
396
+ ]
397
+ },
398
+ {
399
+ "kind": "method",
400
+ "name": "getActiveElement",
401
+ "privacy": "protected",
402
+ "return": {
403
+ "type": {
404
+ "text": "T | null"
405
+ }
406
+ }
407
+ },
408
+ {
409
+ "kind": "field",
410
+ "name": "focusElement",
411
+ "type": {
412
+ "text": "HTMLElement | null"
413
+ },
414
+ "readonly": true
415
+ },
416
+ {
417
+ "kind": "field",
418
+ "name": "prefersReducedMotion",
419
+ "type": {
420
+ "text": "boolean"
421
+ },
422
+ "privacy": "protected",
423
+ "readonly": true
424
+ }
425
+ ],
426
+ "superclass": {
427
+ "name": "LitElement",
428
+ "package": "lit"
429
+ },
430
+ "customElement": true
431
+ },
432
+ {
433
+ "kind": "variable",
434
+ "name": "BaseLocalizedComponent"
435
+ }
436
+ ],
437
+ "exports": [
438
+ {
439
+ "kind": "js",
440
+ "name": "BaseComponent",
441
+ "declaration": {
442
+ "name": "BaseComponent",
443
+ "module": "src/base-component/base-component.ts"
444
+ }
445
+ },
446
+ {
447
+ "kind": "js",
448
+ "name": "BaseLocalizedComponent",
449
+ "declaration": {
450
+ "name": "BaseLocalizedComponent",
451
+ "module": "src/base-component/base-component.ts"
452
+ }
453
+ }
454
+ ]
455
+ },
456
+ {
457
+ "kind": "javascript-module",
458
+ "path": "src/controllers/aria-keyboard-accordion-controller.ts",
459
+ "declarations": [
460
+ {
461
+ "kind": "class",
462
+ "description": "",
463
+ "name": "AriaKeyboardAccordionController",
464
+ "members": [
465
+ {
466
+ "kind": "field",
467
+ "name": "host",
468
+ "type": {
469
+ "text": "ReactiveControllerHost"
470
+ },
471
+ "privacy": "private",
472
+ "default": "host"
473
+ },
474
+ {
475
+ "kind": "field",
476
+ "name": "config",
477
+ "type": {
478
+ "text": "AriaKeyboardAccordionConfig"
479
+ },
480
+ "privacy": "private"
481
+ },
482
+ {
483
+ "kind": "method",
484
+ "name": "setConfig",
485
+ "parameters": [
486
+ {
487
+ "name": "config",
488
+ "type": {
489
+ "text": "AriaKeyboardAccordionConfig"
490
+ }
491
+ }
492
+ ]
493
+ },
494
+ {
495
+ "kind": "method",
496
+ "name": "hostDisconnected"
497
+ },
498
+ {
499
+ "kind": "method",
500
+ "name": "getActiveElement",
501
+ "privacy": "private",
502
+ "return": {
503
+ "type": {
504
+ "text": "HTMLElement | null"
505
+ }
506
+ }
507
+ },
508
+ {
509
+ "kind": "method",
510
+ "name": "handleKeyDown",
511
+ "parameters": [
512
+ {
513
+ "name": "event",
514
+ "type": {
515
+ "text": "KeyboardEvent"
516
+ }
517
+ }
518
+ ]
519
+ }
520
+ ]
521
+ }
522
+ ],
523
+ "exports": [
524
+ {
525
+ "kind": "js",
526
+ "name": "AriaKeyboardAccordionController",
527
+ "declaration": {
528
+ "name": "AriaKeyboardAccordionController",
529
+ "module": "src/controllers/aria-keyboard-accordion-controller.ts"
530
+ }
531
+ }
532
+ ]
533
+ },
534
+ {
535
+ "kind": "javascript-module",
536
+ "path": "src/controllers/aria-keyboard-list-controller.ts",
537
+ "declarations": [
538
+ {
539
+ "kind": "class",
540
+ "description": "",
541
+ "name": "AriaKeyboardListController",
542
+ "members": [
543
+ {
544
+ "kind": "field",
545
+ "name": "host",
546
+ "type": {
547
+ "text": "ReactiveControllerHost"
548
+ },
549
+ "privacy": "private",
550
+ "default": "host"
551
+ },
552
+ {
553
+ "kind": "field",
554
+ "name": "config",
555
+ "type": {
556
+ "text": "AriaKeyboardConfig"
557
+ },
558
+ "privacy": "private"
559
+ },
560
+ {
561
+ "kind": "method",
562
+ "name": "setConfig",
563
+ "parameters": [
564
+ {
565
+ "name": "config",
566
+ "type": {
567
+ "text": "AriaKeyboardConfig"
568
+ }
569
+ }
570
+ ]
571
+ },
572
+ {
573
+ "kind": "method",
574
+ "name": "hostDisconnected"
575
+ },
576
+ {
577
+ "kind": "method",
578
+ "name": "getActiveElement",
579
+ "privacy": "private",
580
+ "return": {
581
+ "type": {
582
+ "text": "HTMLElement | null"
583
+ }
584
+ }
585
+ },
586
+ {
587
+ "kind": "method",
588
+ "name": "handleKeyDown",
589
+ "parameters": [
590
+ {
591
+ "name": "event",
592
+ "type": {
593
+ "text": "KeyboardEvent"
594
+ }
595
+ }
596
+ ]
597
+ }
598
+ ]
599
+ }
600
+ ],
601
+ "exports": [
602
+ {
603
+ "kind": "js",
604
+ "name": "default",
605
+ "declaration": {
606
+ "name": "AriaKeyboardListController",
607
+ "module": "src/controllers/aria-keyboard-list-controller.ts"
608
+ }
609
+ }
610
+ ]
611
+ },
612
+ {
613
+ "kind": "javascript-module",
614
+ "path": "src/controllers/collapse-controller.ts",
615
+ "declarations": [
616
+ {
617
+ "kind": "class",
618
+ "description": "",
619
+ "name": "CollapseAnimationController",
620
+ "members": [
621
+ {
622
+ "kind": "field",
623
+ "name": "host",
624
+ "type": {
625
+ "text": "ReactiveControllerHost"
626
+ },
627
+ "privacy": "private",
628
+ "default": "host"
629
+ },
630
+ {
631
+ "kind": "field",
632
+ "name": "animating",
633
+ "type": {
634
+ "text": "WeakSet<HTMLElement>"
635
+ },
636
+ "privacy": "private",
637
+ "default": "new WeakSet()"
638
+ },
639
+ {
640
+ "kind": "method",
641
+ "name": "hostDisconnected"
642
+ },
643
+ {
644
+ "kind": "method",
645
+ "name": "toggle",
646
+ "return": {
647
+ "type": {
648
+ "text": "void"
649
+ }
650
+ },
651
+ "parameters": [
652
+ {
653
+ "name": "element",
654
+ "type": {
655
+ "text": "HTMLElement"
656
+ }
657
+ },
658
+ {
659
+ "name": "triggerElement",
660
+ "optional": true,
661
+ "type": {
662
+ "text": "HTMLElement"
663
+ }
664
+ }
665
+ ]
666
+ },
667
+ {
668
+ "kind": "method",
669
+ "name": "show",
670
+ "return": {
671
+ "type": {
672
+ "text": "void"
673
+ }
674
+ },
675
+ "parameters": [
676
+ {
677
+ "name": "element",
678
+ "type": {
679
+ "text": "HTMLElement"
680
+ }
681
+ },
682
+ {
683
+ "name": "triggerElement",
684
+ "optional": true,
685
+ "type": {
686
+ "text": "HTMLElement"
687
+ }
688
+ }
689
+ ]
690
+ },
691
+ {
692
+ "kind": "method",
693
+ "name": "hide",
694
+ "return": {
695
+ "type": {
696
+ "text": "void"
697
+ }
698
+ },
699
+ "parameters": [
700
+ {
701
+ "name": "element",
702
+ "type": {
703
+ "text": "HTMLElement"
704
+ }
705
+ },
706
+ {
707
+ "name": "triggerElement",
708
+ "optional": true,
709
+ "type": {
710
+ "text": "HTMLElement"
711
+ }
712
+ }
713
+ ]
714
+ },
715
+ {
716
+ "kind": "method",
717
+ "name": "isOpen",
718
+ "return": {
719
+ "type": {
720
+ "text": "boolean"
721
+ }
722
+ },
723
+ "parameters": [
724
+ {
725
+ "name": "element",
726
+ "type": {
727
+ "text": "HTMLElement"
728
+ }
729
+ }
730
+ ]
731
+ }
732
+ ]
733
+ }
734
+ ],
735
+ "exports": [
736
+ {
737
+ "kind": "js",
738
+ "name": "CollapseAnimationController",
739
+ "declaration": {
740
+ "name": "CollapseAnimationController",
741
+ "module": "src/controllers/collapse-controller.ts"
742
+ }
743
+ }
744
+ ]
745
+ },
746
+ {
747
+ "kind": "javascript-module",
748
+ "path": "src/controllers/roving-tabindex-controller.ts",
749
+ "declarations": [
750
+ {
751
+ "kind": "class",
752
+ "description": "Roving Tabindex Controller\n\nImplements the ARIA roving tabindex pattern for keyboard navigation.\nSee: https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_roving_tabindex\n\nUsage:\n```ts\nprivate rovingTabindex = new RovingTabindexController(this, {\n getItems: () => Array.from(this.querySelectorAll('my-item')),\n onSelect: (item) => this.selectItem(item),\n});\n```",
753
+ "name": "RovingTabindexController",
754
+ "members": [
755
+ {
756
+ "kind": "field",
757
+ "name": "host",
758
+ "type": {
759
+ "text": "ReactiveControllerHost"
760
+ },
761
+ "privacy": "private",
762
+ "default": "host"
763
+ },
764
+ {
765
+ "kind": "field",
766
+ "name": "config",
767
+ "type": {
768
+ "text": "RovingTabindexConfig<T> & {\n wrap: boolean;\n direction: 'horizontal' | 'vertical' | 'both';\n selectOnFocus: boolean;\n skipItem: (item: T) => boolean;\n }"
769
+ },
770
+ "privacy": "private",
771
+ "default": "{ wrap: true, direction: 'both', selectOnFocus: false, skipItem: (item) => item.hasAttribute('disabled') || (item as any).disabled === true, ...config, }"
772
+ },
773
+ {
774
+ "kind": "method",
775
+ "name": "hostConnected",
776
+ "return": {
777
+ "type": {
778
+ "text": "void"
779
+ }
780
+ }
781
+ },
782
+ {
783
+ "kind": "method",
784
+ "name": "hostDisconnected",
785
+ "return": {
786
+ "type": {
787
+ "text": "void"
788
+ }
789
+ }
790
+ },
791
+ {
792
+ "kind": "method",
793
+ "name": "updateTabindices",
794
+ "return": {
795
+ "type": {
796
+ "text": "void"
797
+ }
798
+ },
799
+ "parameters": [
800
+ {
801
+ "name": "activeIndex",
802
+ "optional": true,
803
+ "type": {
804
+ "text": "number"
805
+ },
806
+ "description": "Index of the item that should be tabbable (default: 0 or first non-disabled)"
807
+ }
808
+ ],
809
+ "description": "Update tabindex values for all items"
810
+ },
811
+ {
812
+ "kind": "method",
813
+ "name": "handleKeydown",
814
+ "return": {
815
+ "type": {
816
+ "text": ""
817
+ }
818
+ },
819
+ "parameters": [
820
+ {
821
+ "name": "currentItem",
822
+ "type": {
823
+ "text": "T"
824
+ },
825
+ "description": "The currently focused item"
826
+ },
827
+ {
828
+ "name": "event",
829
+ "type": {
830
+ "text": "KeyboardEvent"
831
+ },
832
+ "description": "The keyboard event"
833
+ }
834
+ ],
835
+ "description": "Handle keyboard navigation"
836
+ },
837
+ {
838
+ "kind": "method",
839
+ "name": "getNextIndex",
840
+ "privacy": "private",
841
+ "return": {
842
+ "type": {
843
+ "text": "number"
844
+ }
845
+ },
846
+ "parameters": [
847
+ {
848
+ "name": "items",
849
+ "type": {
850
+ "text": "T[]"
851
+ }
852
+ },
853
+ {
854
+ "name": "currentIndex",
855
+ "type": {
856
+ "text": "number"
857
+ }
858
+ },
859
+ {
860
+ "name": "direction",
861
+ "type": {
862
+ "text": "1 | -1"
863
+ }
864
+ }
865
+ ],
866
+ "description": "Get the next index based on direction"
867
+ },
868
+ {
869
+ "kind": "method",
870
+ "name": "findNextValidIndex",
871
+ "privacy": "private",
872
+ "return": {
873
+ "type": {
874
+ "text": "number"
875
+ }
876
+ },
877
+ "parameters": [
878
+ {
879
+ "name": "items",
880
+ "type": {
881
+ "text": "T[]"
882
+ }
883
+ },
884
+ {
885
+ "name": "startIndex",
886
+ "type": {
887
+ "text": "number"
888
+ }
889
+ },
890
+ {
891
+ "name": "direction",
892
+ "type": {
893
+ "text": "1 | -1"
894
+ }
895
+ }
896
+ ],
897
+ "description": "Find the next valid (non-disabled) index"
898
+ },
899
+ {
900
+ "kind": "method",
901
+ "name": "focusItem",
902
+ "return": {
903
+ "type": {
904
+ "text": "void"
905
+ }
906
+ },
907
+ "parameters": [
908
+ {
909
+ "name": "item",
910
+ "type": {
911
+ "text": "T"
912
+ }
913
+ }
914
+ ],
915
+ "description": "Set focus to a specific item"
916
+ },
917
+ {
918
+ "kind": "method",
919
+ "name": "focusFirst",
920
+ "return": {
921
+ "type": {
922
+ "text": "void"
923
+ }
924
+ },
925
+ "description": "Set focus to the first non-disabled item"
926
+ },
927
+ {
928
+ "kind": "method",
929
+ "name": "focusLast",
930
+ "return": {
931
+ "type": {
932
+ "text": "void"
933
+ }
934
+ },
935
+ "description": "Set focus to the last non-disabled item"
936
+ }
937
+ ]
938
+ }
939
+ ],
940
+ "exports": [
941
+ {
942
+ "kind": "js",
943
+ "name": "RovingTabindexController",
944
+ "declaration": {
945
+ "name": "RovingTabindexController",
946
+ "module": "src/controllers/roving-tabindex-controller.ts"
947
+ }
948
+ }
949
+ ]
950
+ },
951
+ {
952
+ "kind": "javascript-module",
953
+ "path": "src/directives/setAttributes.ts",
954
+ "declarations": [
955
+ {
956
+ "kind": "variable",
957
+ "name": "setAttributes"
958
+ }
959
+ ],
960
+ "exports": [
961
+ {
962
+ "kind": "js",
963
+ "name": "default",
964
+ "declaration": {
965
+ "name": "setAttributes",
966
+ "module": "src/directives/setAttributes.ts"
967
+ }
968
+ }
969
+ ]
970
+ },
971
+ {
972
+ "kind": "javascript-module",
973
+ "path": "src/form/form-control.ts",
974
+ "declarations": [
975
+ {
976
+ "kind": "class",
977
+ "description": "",
978
+ "name": "FormControl",
979
+ "members": [
980
+ {
981
+ "kind": "field",
982
+ "name": "formControlController",
983
+ "privacy": "protected",
984
+ "readonly": true,
985
+ "default": "new FormControlController(this, { assumeInteractionOn: ['it-input', 'it-blur', 'it-change'], })"
986
+ },
987
+ {
988
+ "kind": "field",
989
+ "name": "_touched",
990
+ "type": {
991
+ "text": "boolean"
992
+ },
993
+ "default": "false"
994
+ },
995
+ {
996
+ "kind": "field",
997
+ "name": "inputElement",
998
+ "type": {
999
+ "text": "HTMLInputElement"
1000
+ }
1001
+ },
1002
+ {
1003
+ "kind": "field",
1004
+ "name": "name",
1005
+ "type": {
1006
+ "text": "string"
1007
+ },
1008
+ "default": "''",
1009
+ "description": "The name of the input, submitted as a name/value pair with form data.",
1010
+ "attribute": "name",
1011
+ "reflects": true
1012
+ },
1013
+ {
1014
+ "kind": "field",
1015
+ "name": "value",
1016
+ "type": {
1017
+ "text": "string"
1018
+ },
1019
+ "default": "''",
1020
+ "description": "The current value of the input, submitted as a name/value pair with form data.",
1021
+ "attribute": "value",
1022
+ "reflects": true
1023
+ },
1024
+ {
1025
+ "kind": "field",
1026
+ "name": "disabled",
1027
+ "type": {
1028
+ "text": "boolean"
1029
+ },
1030
+ "default": "false",
1031
+ "description": "If the input is disabled.",
1032
+ "attribute": "disabled",
1033
+ "reflects": true
1034
+ },
1035
+ {
1036
+ "kind": "field",
1037
+ "name": "form",
1038
+ "type": {
1039
+ "text": "string"
1040
+ },
1041
+ "default": "''",
1042
+ "description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
1043
+ "attribute": "form",
1044
+ "reflects": true
1045
+ },
1046
+ {
1047
+ "kind": "field",
1048
+ "name": "customValidation",
1049
+ "type": {
1050
+ "text": "boolean"
1051
+ },
1052
+ "default": "false",
1053
+ "description": "If you implement your custom validation and you won't to trigger default validation",
1054
+ "attribute": "custom-validation",
1055
+ "reflects": true
1056
+ },
1057
+ {
1058
+ "kind": "field",
1059
+ "name": "validationText",
1060
+ "type": {
1061
+ "text": "string"
1062
+ },
1063
+ "default": "''",
1064
+ "description": "If your input is invalid from your custom validition, set this attribute with message validation",
1065
+ "attribute": "validity-message",
1066
+ "reflects": true
1067
+ },
1068
+ {
1069
+ "kind": "field",
1070
+ "name": "pattern",
1071
+ "type": {
1072
+ "text": "string | undefined"
1073
+ },
1074
+ "description": "Pattern the `value` must match to be valid",
1075
+ "attribute": "pattern"
1076
+ },
1077
+ {
1078
+ "kind": "field",
1079
+ "name": "min",
1080
+ "type": {
1081
+ "text": "number | string | Date | undefined"
1082
+ },
1083
+ "description": "The input's minimum value. Only applies to date and number input types.",
1084
+ "attribute": "min"
1085
+ },
1086
+ {
1087
+ "kind": "field",
1088
+ "name": "max",
1089
+ "type": {
1090
+ "text": "number | string | Date | undefined"
1091
+ },
1092
+ "description": "The input's maximum value. Only applies to date and number input types.",
1093
+ "attribute": "max"
1094
+ },
1095
+ {
1096
+ "kind": "field",
1097
+ "name": "step",
1098
+ "type": {
1099
+ "text": "number | 'any'"
1100
+ },
1101
+ "default": "'any'",
1102
+ "description": "Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\nimplied, allowing any numeric value. Only applies to date and number input types.",
1103
+ "attribute": "step"
1104
+ },
1105
+ {
1106
+ "kind": "field",
1107
+ "name": "minlength",
1108
+ "type": {
1109
+ "text": "number"
1110
+ },
1111
+ "default": "-1",
1112
+ "description": "The input's minimum length.",
1113
+ "attribute": "minlength"
1114
+ },
1115
+ {
1116
+ "kind": "field",
1117
+ "name": "maxlength",
1118
+ "type": {
1119
+ "text": "number"
1120
+ },
1121
+ "default": "-1",
1122
+ "description": "The input's maximum length.",
1123
+ "attribute": "maxlength"
1124
+ },
1125
+ {
1126
+ "kind": "field",
1127
+ "name": "required",
1128
+ "type": {
1129
+ "text": "boolean"
1130
+ },
1131
+ "default": "false",
1132
+ "description": "If the input is required.",
1133
+ "attribute": "required",
1134
+ "reflects": true
1135
+ },
1136
+ {
1137
+ "kind": "field",
1138
+ "name": "isInGroup",
1139
+ "type": {
1140
+ "text": "boolean"
1141
+ },
1142
+ "privacy": "protected",
1143
+ "default": "false",
1144
+ "attribute": "isInGroup"
1145
+ },
1146
+ {
1147
+ "kind": "field",
1148
+ "name": "validity",
1149
+ "type": {
1150
+ "text": "ValidityState"
1151
+ },
1152
+ "privacy": "public",
1153
+ "description": "Gets the validity state object",
1154
+ "readonly": true
1155
+ },
1156
+ {
1157
+ "kind": "field",
1158
+ "name": "validationMessage",
1159
+ "type": {
1160
+ "text": "string"
1161
+ },
1162
+ "privacy": "public",
1163
+ "default": "''"
1164
+ },
1165
+ {
1166
+ "kind": "method",
1167
+ "name": "getForm",
1168
+ "privacy": "public",
1169
+ "return": {
1170
+ "type": {
1171
+ "text": "HTMLFormElement | null"
1172
+ }
1173
+ },
1174
+ "description": "Gets the associated form, if one exists."
1175
+ },
1176
+ {
1177
+ "kind": "method",
1178
+ "name": "checkValidity",
1179
+ "privacy": "public",
1180
+ "return": {
1181
+ "type": {
1182
+ "text": "boolean"
1183
+ }
1184
+ }
1185
+ },
1186
+ {
1187
+ "kind": "method",
1188
+ "name": "reportValidity",
1189
+ "privacy": "public",
1190
+ "description": "Checks for validity and shows the browser's validation message if the control is invalid."
1191
+ },
1192
+ {
1193
+ "kind": "method",
1194
+ "name": "setCustomValidity",
1195
+ "privacy": "public",
1196
+ "parameters": [
1197
+ {
1198
+ "name": "message",
1199
+ "type": {
1200
+ "text": "string"
1201
+ }
1202
+ }
1203
+ ],
1204
+ "description": "Sets a custom validation message. Pass an empty string to restore validity."
1205
+ },
1206
+ {
1207
+ "kind": "method",
1208
+ "name": "_handleReady",
1209
+ "privacy": "protected"
1210
+ },
1211
+ {
1212
+ "kind": "method",
1213
+ "name": "_handleInput",
1214
+ "privacy": "protected",
1215
+ "parameters": [
1216
+ {
1217
+ "name": "e",
1218
+ "type": {
1219
+ "text": "Event"
1220
+ }
1221
+ }
1222
+ ]
1223
+ },
1224
+ {
1225
+ "kind": "method",
1226
+ "name": "_handleBlur",
1227
+ "privacy": "protected",
1228
+ "parameters": [
1229
+ {
1230
+ "name": "e",
1231
+ "type": {
1232
+ "text": "Event"
1233
+ }
1234
+ }
1235
+ ]
1236
+ },
1237
+ {
1238
+ "kind": "method",
1239
+ "name": "_handleFocus",
1240
+ "privacy": "protected",
1241
+ "parameters": [
1242
+ {
1243
+ "name": "e",
1244
+ "type": {
1245
+ "text": "Event"
1246
+ }
1247
+ }
1248
+ ]
1249
+ },
1250
+ {
1251
+ "kind": "method",
1252
+ "name": "_handleClick",
1253
+ "privacy": "protected",
1254
+ "parameters": [
1255
+ {
1256
+ "name": "e",
1257
+ "type": {
1258
+ "text": "Event"
1259
+ }
1260
+ }
1261
+ ]
1262
+ },
1263
+ {
1264
+ "kind": "method",
1265
+ "name": "handleValidationMessages",
1266
+ "privacy": "protected"
1267
+ },
1268
+ {
1269
+ "kind": "method",
1270
+ "name": "_handleInvalid",
1271
+ "privacy": "protected",
1272
+ "parameters": [
1273
+ {
1274
+ "name": "event",
1275
+ "type": {
1276
+ "text": "Event"
1277
+ }
1278
+ }
1279
+ ]
1280
+ },
1281
+ {
1282
+ "kind": "method",
1283
+ "name": "_handleChange",
1284
+ "privacy": "protected",
1285
+ "parameters": [
1286
+ {
1287
+ "name": "e",
1288
+ "type": {
1289
+ "text": "Event"
1290
+ }
1291
+ }
1292
+ ]
1293
+ }
1294
+ ],
1295
+ "events": [
1296
+ {
1297
+ "name": "it-input-ready",
1298
+ "type": {
1299
+ "text": "CustomEvent"
1300
+ }
1301
+ },
1302
+ {
1303
+ "name": "it-input",
1304
+ "type": {
1305
+ "text": "CustomEvent"
1306
+ }
1307
+ },
1308
+ {
1309
+ "name": "it-blur",
1310
+ "type": {
1311
+ "text": "FocusEvent"
1312
+ }
1313
+ },
1314
+ {
1315
+ "name": "it-focus",
1316
+ "type": {
1317
+ "text": "FocusEvent"
1318
+ }
1319
+ },
1320
+ {
1321
+ "name": "it-click",
1322
+ "type": {
1323
+ "text": "MouseEvent"
1324
+ }
1325
+ },
1326
+ {
1327
+ "name": "it-change",
1328
+ "type": {
1329
+ "text": "CustomEvent"
1330
+ }
1331
+ }
1332
+ ],
1333
+ "attributes": [
1334
+ {
1335
+ "name": "name",
1336
+ "type": {
1337
+ "text": "string"
1338
+ },
1339
+ "default": "''",
1340
+ "description": "The name of the input, submitted as a name/value pair with form data.",
1341
+ "fieldName": "name"
1342
+ },
1343
+ {
1344
+ "name": "value",
1345
+ "type": {
1346
+ "text": "string"
1347
+ },
1348
+ "default": "''",
1349
+ "description": "The current value of the input, submitted as a name/value pair with form data.",
1350
+ "fieldName": "value"
1351
+ },
1352
+ {
1353
+ "name": "disabled",
1354
+ "type": {
1355
+ "text": "boolean"
1356
+ },
1357
+ "default": "false",
1358
+ "description": "If the input is disabled.",
1359
+ "fieldName": "disabled"
1360
+ },
1361
+ {
1362
+ "name": "form",
1363
+ "type": {
1364
+ "text": "string"
1365
+ },
1366
+ "default": "''",
1367
+ "description": "By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\nto place the form control outside of a form and associate it with the form that has this `id`. The form must be in\nthe same document or shadow root for this to work.",
1368
+ "fieldName": "form"
1369
+ },
1370
+ {
1371
+ "name": "custom-validation",
1372
+ "type": {
1373
+ "text": "boolean"
1374
+ },
1375
+ "default": "false",
1376
+ "description": "If you implement your custom validation and you won't to trigger default validation",
1377
+ "fieldName": "customValidation"
1378
+ },
1379
+ {
1380
+ "name": "validity-message",
1381
+ "type": {
1382
+ "text": "string"
1383
+ },
1384
+ "default": "''",
1385
+ "description": "If your input is invalid from your custom validition, set this attribute with message validation",
1386
+ "fieldName": "validationText"
1387
+ },
1388
+ {
1389
+ "name": "pattern",
1390
+ "type": {
1391
+ "text": "string | undefined"
1392
+ },
1393
+ "description": "Pattern the `value` must match to be valid",
1394
+ "fieldName": "pattern"
1395
+ },
1396
+ {
1397
+ "name": "min",
1398
+ "type": {
1399
+ "text": "number | string | Date | undefined"
1400
+ },
1401
+ "description": "The input's minimum value. Only applies to date and number input types.",
1402
+ "fieldName": "min"
1403
+ },
1404
+ {
1405
+ "name": "max",
1406
+ "type": {
1407
+ "text": "number | string | Date | undefined"
1408
+ },
1409
+ "description": "The input's maximum value. Only applies to date and number input types.",
1410
+ "fieldName": "max"
1411
+ },
1412
+ {
1413
+ "name": "step",
1414
+ "type": {
1415
+ "text": "number | 'any'"
1416
+ },
1417
+ "default": "'any'",
1418
+ "description": "Specifies the granularity that the value must adhere to, or the special value `any` which means no stepping is\nimplied, allowing any numeric value. Only applies to date and number input types.",
1419
+ "fieldName": "step"
1420
+ },
1421
+ {
1422
+ "name": "minlength",
1423
+ "type": {
1424
+ "text": "number"
1425
+ },
1426
+ "default": "-1",
1427
+ "description": "The input's minimum length.",
1428
+ "fieldName": "minlength"
1429
+ },
1430
+ {
1431
+ "name": "maxlength",
1432
+ "type": {
1433
+ "text": "number"
1434
+ },
1435
+ "default": "-1",
1436
+ "description": "The input's maximum length.",
1437
+ "fieldName": "maxlength"
1438
+ },
1439
+ {
1440
+ "name": "required",
1441
+ "type": {
1442
+ "text": "boolean"
1443
+ },
1444
+ "default": "false",
1445
+ "description": "If the input is required.",
1446
+ "fieldName": "required"
1447
+ },
1448
+ {
1449
+ "name": "isInGroup",
1450
+ "type": {
1451
+ "text": "boolean"
1452
+ },
1453
+ "default": "false",
1454
+ "fieldName": "isInGroup"
1455
+ }
1456
+ ],
1457
+ "superclass": {
1458
+ "name": "BaseLocalizedComponent",
1459
+ "module": "/src/base-component/base-component.js"
1460
+ }
1461
+ }
1462
+ ],
1463
+ "exports": [
1464
+ {
1465
+ "kind": "js",
1466
+ "name": "FormControl",
1467
+ "declaration": {
1468
+ "name": "FormControl",
1469
+ "module": "src/form/form-control.ts"
1470
+ }
1471
+ }
1472
+ ]
1473
+ },
1474
+ {
1475
+ "kind": "javascript-module",
1476
+ "path": "src/form/form-controller.ts",
1477
+ "declarations": [
1478
+ {
1479
+ "kind": "variable",
1480
+ "name": "formCollections",
1481
+ "type": {
1482
+ "text": "WeakMap<HTMLFormElement, Set<FormControl>>"
1483
+ },
1484
+ "default": "new WeakMap()"
1485
+ },
1486
+ {
1487
+ "kind": "class",
1488
+ "description": "A reactive controller to allow form controls to participate in form submission, validation, etc.",
1489
+ "name": "FormControlController",
1490
+ "members": [
1491
+ {
1492
+ "kind": "field",
1493
+ "name": "host",
1494
+ "type": {
1495
+ "text": "FormControl & ReactiveControllerHost"
1496
+ }
1497
+ },
1498
+ {
1499
+ "kind": "field",
1500
+ "name": "form",
1501
+ "type": {
1502
+ "text": "HTMLFormElement | null | undefined"
1503
+ }
1504
+ },
1505
+ {
1506
+ "kind": "field",
1507
+ "name": "options",
1508
+ "type": {
1509
+ "text": "FormControlControllerOptions"
1510
+ },
1511
+ "default": "{ form: (input) => { // If there's a form attribute, use it to find the target form by id // Controls may not always reflect the 'form' property. For example, `<it-button>` doesn't reflect. const formId = input.form; if (formId) { const root = input.getRootNode() as Document | ShadowRoot | HTMLElement; const form = root.querySelector(`#${formId}`); if (form) { return form as HTMLFormElement; } } return input.closest('form'); }, name: (input) => input.name, value: (input) => input.value, disabled: (input) => input.disabled ?? false, reportValidity: (input: FormControl) => typeof input.reportValidity === 'function' ? input.reportValidity() : true, checkValidity: (input: FormControl) => (typeof input.checkValidity === 'function' ? input.checkValidity() : true), setValue: (input, value) => { // eslint-disable-next-line no-param-reassign input.value = value as string; }, assumeInteractionOn: ['it-input'], ...options, }"
1512
+ },
1513
+ {
1514
+ "kind": "field",
1515
+ "name": "submittedOnce",
1516
+ "type": {
1517
+ "text": "boolean"
1518
+ },
1519
+ "default": "false"
1520
+ },
1521
+ {
1522
+ "kind": "method",
1523
+ "name": "hostConnected"
1524
+ },
1525
+ {
1526
+ "kind": "method",
1527
+ "name": "hostDisconnected"
1528
+ },
1529
+ {
1530
+ "kind": "method",
1531
+ "name": "hostUpdated"
1532
+ },
1533
+ {
1534
+ "kind": "method",
1535
+ "name": "attachForm",
1536
+ "privacy": "private",
1537
+ "parameters": [
1538
+ {
1539
+ "name": "form",
1540
+ "optional": true,
1541
+ "type": {
1542
+ "text": "HTMLFormElement"
1543
+ }
1544
+ }
1545
+ ]
1546
+ },
1547
+ {
1548
+ "kind": "method",
1549
+ "name": "detachForm",
1550
+ "privacy": "private"
1551
+ },
1552
+ {
1553
+ "kind": "field",
1554
+ "name": "handleFormData",
1555
+ "privacy": "private"
1556
+ },
1557
+ {
1558
+ "kind": "field",
1559
+ "name": "handleFormSubmit",
1560
+ "privacy": "private"
1561
+ },
1562
+ {
1563
+ "kind": "field",
1564
+ "name": "handleFormReset",
1565
+ "privacy": "private"
1566
+ },
1567
+ {
1568
+ "kind": "field",
1569
+ "name": "handleInteraction",
1570
+ "privacy": "private"
1571
+ },
1572
+ {
1573
+ "kind": "field",
1574
+ "name": "checkFormValidity",
1575
+ "privacy": "private"
118
1576
  },
119
1577
  {
120
1578
  "kind": "field",
121
- "name": "_id",
122
- "type": {
123
- "text": "string | undefined"
124
- },
125
- "privacy": "protected"
1579
+ "name": "reportFormValidity",
1580
+ "privacy": "private"
126
1581
  },
127
1582
  {
128
1583
  "kind": "method",
129
- "name": "generateId",
1584
+ "name": "setUserInteracted",
1585
+ "privacy": "private",
130
1586
  "parameters": [
131
1587
  {
132
- "name": "prefix",
1588
+ "name": "el",
133
1589
  "type": {
134
- "text": "string"
1590
+ "text": "FormControl"
1591
+ }
1592
+ },
1593
+ {
1594
+ "name": "hasInteracted",
1595
+ "type": {
1596
+ "text": "boolean"
135
1597
  }
136
1598
  }
137
1599
  ]
138
1600
  },
139
1601
  {
140
1602
  "kind": "method",
141
- "name": "addFocus",
1603
+ "name": "doAction",
1604
+ "privacy": "private",
142
1605
  "parameters": [
143
1606
  {
144
- "name": "element",
1607
+ "name": "type",
145
1608
  "type": {
146
- "text": "HTMLElement"
1609
+ "text": "'submit' | 'reset'"
1610
+ }
1611
+ },
1612
+ {
1613
+ "name": "submitter",
1614
+ "optional": true,
1615
+ "type": {
1616
+ "text": "HTMLInputElement | any"
147
1617
  }
148
1618
  }
149
1619
  ]
150
1620
  },
151
1621
  {
152
1622
  "kind": "method",
153
- "name": "composeClass",
1623
+ "name": "getForm",
1624
+ "description": "Returns the associated `<form>` element, if one exists."
1625
+ },
1626
+ {
1627
+ "kind": "method",
1628
+ "name": "reset",
154
1629
  "parameters": [
155
1630
  {
156
- "name": "classes",
1631
+ "name": "submitter",
1632
+ "optional": true,
157
1633
  "type": {
158
- "text": "any"
1634
+ "text": "HTMLInputElement | any"
159
1635
  }
160
1636
  }
161
- ]
1637
+ ],
1638
+ "description": "Resets the form, restoring all the control to their default value"
162
1639
  },
163
1640
  {
164
1641
  "kind": "method",
165
- "name": "getAriaAttributes"
166
- }
167
- ],
168
- "superclass": {
169
- "name": "LitElement",
170
- "package": "lit"
171
- },
172
- "customElement": true
173
- },
174
- {
175
- "kind": "variable",
176
- "name": "BaseLocalizedComponent"
177
- }
178
- ],
179
- "exports": [
180
- {
181
- "kind": "js",
182
- "name": "BaseComponent",
183
- "declaration": {
184
- "name": "BaseComponent",
185
- "module": "src/base-component/base-component.ts"
186
- }
187
- },
188
- {
189
- "kind": "js",
190
- "name": "BaseLocalizedComponent",
191
- "declaration": {
192
- "name": "BaseLocalizedComponent",
193
- "module": "src/base-component/base-component.ts"
194
- }
195
- }
196
- ]
197
- },
198
- {
199
- "kind": "javascript-module",
200
- "path": "src/directives/setAttributes.ts",
201
- "declarations": [
202
- {
203
- "kind": "variable",
204
- "name": "setAttributes"
205
- }
206
- ],
207
- "exports": [
208
- {
209
- "kind": "js",
210
- "name": "default",
211
- "declaration": {
212
- "name": "setAttributes",
213
- "module": "src/directives/setAttributes.ts"
214
- }
215
- }
216
- ]
217
- },
218
- {
219
- "kind": "javascript-module",
220
- "path": "src/mixins/form.ts",
221
- "declarations": [
222
- {
223
- "kind": "mixin",
224
- "description": "",
225
- "name": "FormMixin",
226
- "members": [
1642
+ "name": "submit",
1643
+ "parameters": [
1644
+ {
1645
+ "name": "submitter",
1646
+ "optional": true,
1647
+ "type": {
1648
+ "text": "HTMLInputElement | any"
1649
+ }
1650
+ }
1651
+ ],
1652
+ "description": "Submits the form, triggering validation and form data injection."
1653
+ },
227
1654
  {
228
1655
  "kind": "method",
229
- "name": "_handleFormdata",
230
- "return": {
231
- "type": {
232
- "text": "void"
1656
+ "name": "setValidity",
1657
+ "parameters": [
1658
+ {
1659
+ "name": "isValid",
1660
+ "type": {
1661
+ "text": "boolean"
1662
+ }
233
1663
  }
234
- },
1664
+ ],
1665
+ "description": "Synchronously sets the form control's validity. Call this when you know the future validity but need to update\nthe host element immediately, i.e. before Lit updates the component in the next update."
1666
+ },
1667
+ {
1668
+ "kind": "method",
1669
+ "name": "userInteracted"
1670
+ },
1671
+ {
1672
+ "kind": "method",
1673
+ "name": "updateValidity",
1674
+ "description": "Updates the form control's validity based on the current value of `host.validity.valid`. Call this when anything\nthat affects constraint validation changes so the component receives the correct validity states."
1675
+ },
1676
+ {
1677
+ "kind": "method",
1678
+ "name": "emitInvalidEvent",
235
1679
  "parameters": [
236
1680
  {
237
- "name": "event",
1681
+ "name": "originalInvalidEvent",
1682
+ "optional": true,
238
1683
  "type": {
239
1684
  "text": "Event"
240
- },
241
- "description": "The event."
1685
+ }
242
1686
  }
243
1687
  ],
244
- "description": "Handles `formdata` event."
245
- }
246
- ],
247
- "parameters": [
248
- {
249
- "name": "Base",
250
- "type": {
251
- "text": "TBase"
252
- },
253
- "description": "The base class."
1688
+ "description": "Dispatches a non-bubbling, cancelable custom event of type `it-invalid`.\nIf the `it-invalid` event will be cancelled then the original `invalid`\nevent (which may have been passed as argument) will also be cancelled.\nIf no original `invalid` event has been passed then the `it-invalid`\nevent will be cancelled before being dispatched."
254
1689
  }
255
1690
  ]
256
1691
  }
@@ -258,10 +1693,18 @@
258
1693
  "exports": [
259
1694
  {
260
1695
  "kind": "js",
261
- "name": "default",
1696
+ "name": "formCollections",
1697
+ "declaration": {
1698
+ "name": "formCollections",
1699
+ "module": "src/form/form-controller.ts"
1700
+ }
1701
+ },
1702
+ {
1703
+ "kind": "js",
1704
+ "name": "FormControlController",
262
1705
  "declaration": {
263
- "name": "FormMixin",
264
- "module": "src/mixins/form.ts"
1706
+ "name": "FormControlController",
1707
+ "module": "src/form/form-controller.ts"
265
1708
  }
266
1709
  }
267
1710
  ]
@@ -372,15 +1815,6 @@
372
1815
  },
373
1816
  "description": "External validation."
374
1817
  },
375
- {
376
- "kind": "field",
377
- "name": "_touched",
378
- "type": {
379
- "text": "boolean"
380
- },
381
- "default": "false",
382
- "description": "Field is touched"
383
- },
384
1818
  {
385
1819
  "kind": "method",
386
1820
  "name": "_checkValidity",
@@ -419,56 +1853,6 @@
419
1853
  }
420
1854
  ],
421
1855
  "description": "Sets the given custom validity message."
422
- },
423
- {
424
- "kind": "method",
425
- "name": "_handleBlur"
426
- },
427
- {
428
- "kind": "method",
429
- "name": "_handleFocus"
430
- },
431
- {
432
- "kind": "method",
433
- "name": "_handleClick"
434
- },
435
- {
436
- "kind": "method",
437
- "name": "_handleChange",
438
- "parameters": [
439
- {
440
- "name": "e",
441
- "type": {
442
- "text": "Event"
443
- }
444
- }
445
- ]
446
- }
447
- ],
448
- "events": [
449
- {
450
- "name": "blur",
451
- "type": {
452
- "text": "FocusEvent"
453
- }
454
- },
455
- {
456
- "name": "focus",
457
- "type": {
458
- "text": "FocusEvent"
459
- }
460
- },
461
- {
462
- "name": "click",
463
- "type": {
464
- "text": "MouseEvent"
465
- }
466
- },
467
- {
468
- "name": "change",
469
- "type": {
470
- "text": "CustomEvent"
471
- }
472
1856
  }
473
1857
  ],
474
1858
  "parameters": [
@@ -493,10 +1877,89 @@
493
1877
  }
494
1878
  ]
495
1879
  },
1880
+ {
1881
+ "kind": "javascript-module",
1882
+ "path": "src/stories/formControlReusableStories.ts",
1883
+ "declarations": [
1884
+ {
1885
+ "kind": "function",
1886
+ "name": "StoryFormControlMethodAndProps",
1887
+ "parameters": [
1888
+ {
1889
+ "name": "{\n otherProps = '',\n otherMethods = '',\n otherEvents = '',\n componentName = 'it-input',\n}"
1890
+ }
1891
+ ]
1892
+ }
1893
+ ],
1894
+ "exports": [
1895
+ {
1896
+ "kind": "js",
1897
+ "name": "StoryFormControlMethodAndProps",
1898
+ "declaration": {
1899
+ "name": "StoryFormControlMethodAndProps",
1900
+ "module": "src/stories/formControlReusableStories.ts"
1901
+ }
1902
+ }
1903
+ ]
1904
+ },
1905
+ {
1906
+ "kind": "javascript-module",
1907
+ "path": "src/stories/reusableUsageGuidelinesStories.ts",
1908
+ "declarations": [
1909
+ {
1910
+ "kind": "function",
1911
+ "name": "CollapsibleOrHiddenContentGuidelines"
1912
+ }
1913
+ ],
1914
+ "exports": [
1915
+ {
1916
+ "kind": "js",
1917
+ "name": "CollapsibleOrHiddenContentGuidelines",
1918
+ "declaration": {
1919
+ "name": "CollapsibleOrHiddenContentGuidelines",
1920
+ "module": "src/stories/reusableUsageGuidelinesStories.ts"
1921
+ }
1922
+ }
1923
+ ]
1924
+ },
496
1925
  {
497
1926
  "kind": "javascript-module",
498
1927
  "path": "src/utils/cookies.ts",
499
1928
  "declarations": [
1929
+ {
1930
+ "kind": "function",
1931
+ "name": "rememberChoice",
1932
+ "parameters": [
1933
+ {
1934
+ "name": "service",
1935
+ "type": {
1936
+ "text": "string"
1937
+ }
1938
+ },
1939
+ {
1940
+ "name": "remember",
1941
+ "type": {
1942
+ "text": "boolean"
1943
+ }
1944
+ }
1945
+ ]
1946
+ },
1947
+ {
1948
+ "kind": "function",
1949
+ "name": "isChoiceRemembered",
1950
+ "parameters": [
1951
+ {
1952
+ "name": "service",
1953
+ "type": {
1954
+ "text": "string"
1955
+ }
1956
+ }
1957
+ ]
1958
+ },
1959
+ {
1960
+ "kind": "function",
1961
+ "name": "clearAllRememberedChoices"
1962
+ },
500
1963
  {
501
1964
  "kind": "variable",
502
1965
  "name": "cookies",
@@ -654,6 +2117,30 @@
654
2117
  }
655
2118
  }
656
2119
  ]
2120
+ },
2121
+ {
2122
+ "kind": "javascript-module",
2123
+ "path": "src/form/locales/it.ts",
2124
+ "declarations": [
2125
+ {
2126
+ "kind": "variable",
2127
+ "name": "translation",
2128
+ "type": {
2129
+ "text": "DefaultTranslation"
2130
+ },
2131
+ "default": "{ $code: 'it', $name: 'Italiano', $dir: 'ltr', validityRequired: 'Questo campo è obbligatorio.', validityGroupRequired: \"Scegli almeno un'opzione\", validityPattern: 'Il valore non corrisponde al formato richiesto.', validityMinlength: 'Il valore deve essere lungo almeno {minlength} caratteri.', validityMaxlength: 'Il valore deve essere lungo al massimo {maxlength} caratteri.', }"
2132
+ }
2133
+ ],
2134
+ "exports": [
2135
+ {
2136
+ "kind": "js",
2137
+ "name": "default",
2138
+ "declaration": {
2139
+ "name": "translation",
2140
+ "module": "src/form/locales/it.ts"
2141
+ }
2142
+ }
2143
+ ]
657
2144
  }
658
2145
  ]
659
2146
  }