@italia/globals 0.0.1-alpha.0 → 0.1.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/custom-elements.json +1665 -143
  2. package/dist/src/base-component/base-component.d.ts +9 -6
  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 +60 -0
  23. package/dist/src/form/form-control.d.ts.map +1 -0
  24. package/dist/src/form/form-control.js +251 -0
  25. package/dist/src/form/form-control.js.map +1 -0
  26. package/dist/src/form/form-controller.d.ts +66 -0
  27. package/dist/src/form/form-controller.d.ts.map +1 -0
  28. package/dist/src/form/form-controller.js +364 -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 +11 -0
  33. package/dist/src/form/locales/it.js.map +1 -0
  34. package/dist/src/index.d.ts +12 -4
  35. package/dist/src/index.d.ts.map +1 -1
  36. package/dist/src/index.js +10 -4
  37. package/dist/src/index.js.map +1 -1
  38. package/dist/src/mixins/validity.d.ts +36 -16
  39. package/dist/src/mixins/validity.d.ts.map +1 -1
  40. package/dist/src/mixins/validity.js +46 -29
  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 +63 -0
  45. package/dist/src/stories/formControlReusableStories.js.map +1 -0
  46. package/dist/src/window-manager.d.ts +20 -0
  47. package/dist/src/window-manager.d.ts.map +1 -0
  48. package/dist/src/window-manager.js +47 -0
  49. package/dist/src/window-manager.js.map +1 -0
  50. package/package.json +10 -8
  51. package/dist/src/mixins/form.d.ts +0 -363
  52. package/dist/src/mixins/form.d.ts.map +0 -1
  53. package/dist/src/mixins/form.js +0 -36
  54. 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,175 @@
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
+ },
188
+ {
189
+ "kind": "javascript-module",
190
+ "path": "src/window-manager.ts",
191
+ "declarations": [
192
+ {
193
+ "kind": "class",
194
+ "description": "",
195
+ "name": "WindowManager",
196
+ "members": [
197
+ {
198
+ "kind": "field",
199
+ "name": "initialized",
200
+ "type": {
201
+ "text": "boolean"
202
+ },
203
+ "privacy": "private",
204
+ "static": true,
205
+ "default": "false"
206
+ },
207
+ {
208
+ "kind": "field",
209
+ "name": "subscribers",
210
+ "privacy": "private",
211
+ "static": true,
212
+ "default": "new Set<ScrollCallback>()"
213
+ },
214
+ {
215
+ "kind": "field",
216
+ "name": "lastScrollY",
217
+ "type": {
218
+ "text": "number"
219
+ },
220
+ "privacy": "private",
221
+ "static": true,
222
+ "default": "0"
223
+ },
224
+ {
225
+ "kind": "field",
226
+ "name": "lastWidth",
227
+ "type": {
228
+ "text": "number"
229
+ },
230
+ "privacy": "private",
231
+ "static": true,
232
+ "default": "0"
233
+ },
234
+ {
235
+ "kind": "field",
236
+ "name": "lastHeight",
237
+ "type": {
238
+ "text": "number"
239
+ },
240
+ "privacy": "private",
241
+ "static": true,
242
+ "default": "0"
243
+ },
244
+ {
245
+ "kind": "field",
246
+ "name": "ticking",
247
+ "type": {
248
+ "text": "boolean"
249
+ },
250
+ "privacy": "private",
251
+ "static": true,
252
+ "default": "false"
253
+ },
254
+ {
255
+ "kind": "method",
256
+ "name": "init",
257
+ "static": true
258
+ },
259
+ {
260
+ "kind": "method",
261
+ "name": "requestTick",
262
+ "privacy": "private",
263
+ "static": true,
264
+ "parameters": [
265
+ {
266
+ "name": "forceRecalc",
267
+ "default": "false"
268
+ }
269
+ ]
270
+ },
271
+ {
272
+ "kind": "method",
273
+ "name": "tick",
274
+ "privacy": "private",
275
+ "static": true,
276
+ "parameters": [
277
+ {
278
+ "name": "forceRecalc",
279
+ "type": {
280
+ "text": "boolean"
281
+ }
282
+ }
283
+ ]
284
+ },
285
+ {
286
+ "kind": "method",
287
+ "name": "subscribe",
288
+ "static": true,
289
+ "parameters": [
290
+ {
291
+ "name": "cb",
292
+ "type": {
293
+ "text": "ScrollCallback"
294
+ }
295
+ }
296
+ ]
297
+ },
298
+ {
299
+ "kind": "method",
300
+ "name": "unsubscribe",
301
+ "static": true,
302
+ "parameters": [
303
+ {
304
+ "name": "cb",
305
+ "type": {
306
+ "text": "ScrollCallback"
307
+ }
308
+ }
309
+ ]
310
+ }
311
+ ]
312
+ }
313
+ ],
314
+ "exports": [
315
+ {
316
+ "kind": "js",
317
+ "name": "WindowManager",
318
+ "declaration": {
319
+ "name": "WindowManager",
320
+ "module": "src/window-manager.ts"
321
+ }
89
322
  }
90
323
  ]
91
324
  },
@@ -109,148 +342,1312 @@
109
342
  },
110
343
  {
111
344
  "kind": "field",
112
- "name": "_ariaAttributes",
113
- "type": {
114
- "text": "Record<string, string>"
115
- },
116
- "privacy": "protected",
117
- "default": "{}"
345
+ "name": "composeClass",
346
+ "privacy": "protected",
347
+ "default": "clsx"
348
+ },
349
+ {
350
+ "kind": "field",
351
+ "name": "_id",
352
+ "type": {
353
+ "text": "string | undefined"
354
+ },
355
+ "privacy": "protected"
356
+ },
357
+ {
358
+ "kind": "field",
359
+ "name": "_ariaAttributes",
360
+ "type": {
361
+ "text": "Record<string, string>"
362
+ },
363
+ "privacy": "protected",
364
+ "readonly": true
365
+ },
366
+ {
367
+ "kind": "method",
368
+ "name": "generateId",
369
+ "parameters": [
370
+ {
371
+ "name": "prefix",
372
+ "type": {
373
+ "text": "string"
374
+ }
375
+ }
376
+ ]
377
+ },
378
+ {
379
+ "kind": "method",
380
+ "name": "addFocus",
381
+ "parameters": [
382
+ {
383
+ "name": "element",
384
+ "type": {
385
+ "text": "HTMLElement"
386
+ }
387
+ }
388
+ ]
389
+ },
390
+ {
391
+ "kind": "method",
392
+ "name": "getActiveElement",
393
+ "privacy": "protected",
394
+ "return": {
395
+ "type": {
396
+ "text": "T | null"
397
+ }
398
+ }
399
+ },
400
+ {
401
+ "kind": "field",
402
+ "name": "focusElement",
403
+ "type": {
404
+ "text": "HTMLElement | null"
405
+ },
406
+ "readonly": true
407
+ },
408
+ {
409
+ "kind": "field",
410
+ "name": "prefersReducedMotion",
411
+ "type": {
412
+ "text": "boolean"
413
+ },
414
+ "privacy": "protected",
415
+ "readonly": true
416
+ }
417
+ ],
418
+ "superclass": {
419
+ "name": "LitElement",
420
+ "package": "lit"
421
+ },
422
+ "customElement": true
423
+ },
424
+ {
425
+ "kind": "variable",
426
+ "name": "BaseLocalizedComponent"
427
+ }
428
+ ],
429
+ "exports": [
430
+ {
431
+ "kind": "js",
432
+ "name": "BaseComponent",
433
+ "declaration": {
434
+ "name": "BaseComponent",
435
+ "module": "src/base-component/base-component.ts"
436
+ }
437
+ },
438
+ {
439
+ "kind": "js",
440
+ "name": "BaseLocalizedComponent",
441
+ "declaration": {
442
+ "name": "BaseLocalizedComponent",
443
+ "module": "src/base-component/base-component.ts"
444
+ }
445
+ }
446
+ ]
447
+ },
448
+ {
449
+ "kind": "javascript-module",
450
+ "path": "src/controllers/aria-keyboard-accordion-controller.ts",
451
+ "declarations": [
452
+ {
453
+ "kind": "class",
454
+ "description": "",
455
+ "name": "AriaKeyboardAccordionController",
456
+ "members": [
457
+ {
458
+ "kind": "field",
459
+ "name": "host",
460
+ "type": {
461
+ "text": "ReactiveControllerHost"
462
+ },
463
+ "privacy": "private",
464
+ "default": "host"
465
+ },
466
+ {
467
+ "kind": "field",
468
+ "name": "config",
469
+ "type": {
470
+ "text": "AriaKeyboardAccordionConfig"
471
+ },
472
+ "privacy": "private"
473
+ },
474
+ {
475
+ "kind": "method",
476
+ "name": "setConfig",
477
+ "parameters": [
478
+ {
479
+ "name": "config",
480
+ "type": {
481
+ "text": "AriaKeyboardAccordionConfig"
482
+ }
483
+ }
484
+ ]
485
+ },
486
+ {
487
+ "kind": "method",
488
+ "name": "hostDisconnected"
489
+ },
490
+ {
491
+ "kind": "method",
492
+ "name": "getActiveElement",
493
+ "privacy": "private",
494
+ "return": {
495
+ "type": {
496
+ "text": "HTMLElement | null"
497
+ }
498
+ }
499
+ },
500
+ {
501
+ "kind": "method",
502
+ "name": "handleKeyDown",
503
+ "parameters": [
504
+ {
505
+ "name": "event",
506
+ "type": {
507
+ "text": "KeyboardEvent"
508
+ }
509
+ }
510
+ ]
511
+ }
512
+ ]
513
+ }
514
+ ],
515
+ "exports": [
516
+ {
517
+ "kind": "js",
518
+ "name": "AriaKeyboardAccordionController",
519
+ "declaration": {
520
+ "name": "AriaKeyboardAccordionController",
521
+ "module": "src/controllers/aria-keyboard-accordion-controller.ts"
522
+ }
523
+ }
524
+ ]
525
+ },
526
+ {
527
+ "kind": "javascript-module",
528
+ "path": "src/controllers/aria-keyboard-list-controller.ts",
529
+ "declarations": [
530
+ {
531
+ "kind": "class",
532
+ "description": "",
533
+ "name": "AriaKeyboardListController",
534
+ "members": [
535
+ {
536
+ "kind": "field",
537
+ "name": "host",
538
+ "type": {
539
+ "text": "ReactiveControllerHost"
540
+ },
541
+ "privacy": "private",
542
+ "default": "host"
543
+ },
544
+ {
545
+ "kind": "field",
546
+ "name": "config",
547
+ "type": {
548
+ "text": "AriaKeyboardConfig"
549
+ },
550
+ "privacy": "private"
551
+ },
552
+ {
553
+ "kind": "method",
554
+ "name": "setConfig",
555
+ "parameters": [
556
+ {
557
+ "name": "config",
558
+ "type": {
559
+ "text": "AriaKeyboardConfig"
560
+ }
561
+ }
562
+ ]
563
+ },
564
+ {
565
+ "kind": "method",
566
+ "name": "hostDisconnected"
567
+ },
568
+ {
569
+ "kind": "method",
570
+ "name": "getActiveElement",
571
+ "privacy": "private",
572
+ "return": {
573
+ "type": {
574
+ "text": "HTMLElement | null"
575
+ }
576
+ }
577
+ },
578
+ {
579
+ "kind": "method",
580
+ "name": "handleKeyDown",
581
+ "parameters": [
582
+ {
583
+ "name": "event",
584
+ "type": {
585
+ "text": "KeyboardEvent"
586
+ }
587
+ }
588
+ ]
589
+ }
590
+ ]
591
+ }
592
+ ],
593
+ "exports": [
594
+ {
595
+ "kind": "js",
596
+ "name": "default",
597
+ "declaration": {
598
+ "name": "AriaKeyboardListController",
599
+ "module": "src/controllers/aria-keyboard-list-controller.ts"
600
+ }
601
+ }
602
+ ]
603
+ },
604
+ {
605
+ "kind": "javascript-module",
606
+ "path": "src/controllers/collapse-controller.ts",
607
+ "declarations": [
608
+ {
609
+ "kind": "class",
610
+ "description": "",
611
+ "name": "CollapseAnimationController",
612
+ "members": [
613
+ {
614
+ "kind": "field",
615
+ "name": "host",
616
+ "type": {
617
+ "text": "ReactiveControllerHost"
618
+ },
619
+ "privacy": "private",
620
+ "default": "host"
621
+ },
622
+ {
623
+ "kind": "field",
624
+ "name": "animating",
625
+ "type": {
626
+ "text": "WeakSet<HTMLElement>"
627
+ },
628
+ "privacy": "private",
629
+ "default": "new WeakSet()"
630
+ },
631
+ {
632
+ "kind": "method",
633
+ "name": "hostDisconnected"
634
+ },
635
+ {
636
+ "kind": "method",
637
+ "name": "toggle",
638
+ "return": {
639
+ "type": {
640
+ "text": "void"
641
+ }
642
+ },
643
+ "parameters": [
644
+ {
645
+ "name": "element",
646
+ "type": {
647
+ "text": "HTMLElement"
648
+ }
649
+ },
650
+ {
651
+ "name": "triggerElement",
652
+ "optional": true,
653
+ "type": {
654
+ "text": "HTMLElement"
655
+ }
656
+ }
657
+ ]
658
+ },
659
+ {
660
+ "kind": "method",
661
+ "name": "show",
662
+ "return": {
663
+ "type": {
664
+ "text": "void"
665
+ }
666
+ },
667
+ "parameters": [
668
+ {
669
+ "name": "element",
670
+ "type": {
671
+ "text": "HTMLElement"
672
+ }
673
+ },
674
+ {
675
+ "name": "triggerElement",
676
+ "optional": true,
677
+ "type": {
678
+ "text": "HTMLElement"
679
+ }
680
+ }
681
+ ]
682
+ },
683
+ {
684
+ "kind": "method",
685
+ "name": "hide",
686
+ "return": {
687
+ "type": {
688
+ "text": "void"
689
+ }
690
+ },
691
+ "parameters": [
692
+ {
693
+ "name": "element",
694
+ "type": {
695
+ "text": "HTMLElement"
696
+ }
697
+ },
698
+ {
699
+ "name": "triggerElement",
700
+ "optional": true,
701
+ "type": {
702
+ "text": "HTMLElement"
703
+ }
704
+ }
705
+ ]
706
+ },
707
+ {
708
+ "kind": "method",
709
+ "name": "isOpen",
710
+ "return": {
711
+ "type": {
712
+ "text": "boolean"
713
+ }
714
+ },
715
+ "parameters": [
716
+ {
717
+ "name": "element",
718
+ "type": {
719
+ "text": "HTMLElement"
720
+ }
721
+ }
722
+ ]
723
+ }
724
+ ]
725
+ }
726
+ ],
727
+ "exports": [
728
+ {
729
+ "kind": "js",
730
+ "name": "CollapseAnimationController",
731
+ "declaration": {
732
+ "name": "CollapseAnimationController",
733
+ "module": "src/controllers/collapse-controller.ts"
734
+ }
735
+ }
736
+ ]
737
+ },
738
+ {
739
+ "kind": "javascript-module",
740
+ "path": "src/controllers/roving-tabindex-controller.ts",
741
+ "declarations": [
742
+ {
743
+ "kind": "class",
744
+ "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```",
745
+ "name": "RovingTabindexController",
746
+ "members": [
747
+ {
748
+ "kind": "field",
749
+ "name": "host",
750
+ "type": {
751
+ "text": "ReactiveControllerHost"
752
+ },
753
+ "privacy": "private",
754
+ "default": "host"
755
+ },
756
+ {
757
+ "kind": "field",
758
+ "name": "config",
759
+ "type": {
760
+ "text": "RovingTabindexConfig<T> & {\n wrap: boolean;\n direction: 'horizontal' | 'vertical' | 'both';\n selectOnFocus: boolean;\n skipItem: (item: T) => boolean;\n }"
761
+ },
762
+ "privacy": "private",
763
+ "default": "{ wrap: true, direction: 'both', selectOnFocus: false, skipItem: (item) => item.hasAttribute('disabled') || (item as any).disabled === true, ...config, }"
764
+ },
765
+ {
766
+ "kind": "method",
767
+ "name": "hostConnected",
768
+ "return": {
769
+ "type": {
770
+ "text": "void"
771
+ }
772
+ }
773
+ },
774
+ {
775
+ "kind": "method",
776
+ "name": "hostDisconnected",
777
+ "return": {
778
+ "type": {
779
+ "text": "void"
780
+ }
781
+ }
782
+ },
783
+ {
784
+ "kind": "method",
785
+ "name": "updateTabindices",
786
+ "return": {
787
+ "type": {
788
+ "text": "void"
789
+ }
790
+ },
791
+ "parameters": [
792
+ {
793
+ "name": "activeIndex",
794
+ "optional": true,
795
+ "type": {
796
+ "text": "number"
797
+ },
798
+ "description": "Index of the item that should be tabbable (default: 0 or first non-disabled)"
799
+ }
800
+ ],
801
+ "description": "Update tabindex values for all items"
802
+ },
803
+ {
804
+ "kind": "method",
805
+ "name": "handleKeydown",
806
+ "return": {
807
+ "type": {
808
+ "text": ""
809
+ }
810
+ },
811
+ "parameters": [
812
+ {
813
+ "name": "currentItem",
814
+ "type": {
815
+ "text": "T"
816
+ },
817
+ "description": "The currently focused item"
818
+ },
819
+ {
820
+ "name": "event",
821
+ "type": {
822
+ "text": "KeyboardEvent"
823
+ },
824
+ "description": "The keyboard event"
825
+ }
826
+ ],
827
+ "description": "Handle keyboard navigation"
828
+ },
829
+ {
830
+ "kind": "method",
831
+ "name": "getNextIndex",
832
+ "privacy": "private",
833
+ "return": {
834
+ "type": {
835
+ "text": "number"
836
+ }
837
+ },
838
+ "parameters": [
839
+ {
840
+ "name": "items",
841
+ "type": {
842
+ "text": "T[]"
843
+ }
844
+ },
845
+ {
846
+ "name": "currentIndex",
847
+ "type": {
848
+ "text": "number"
849
+ }
850
+ },
851
+ {
852
+ "name": "direction",
853
+ "type": {
854
+ "text": "1 | -1"
855
+ }
856
+ }
857
+ ],
858
+ "description": "Get the next index based on direction"
859
+ },
860
+ {
861
+ "kind": "method",
862
+ "name": "findNextValidIndex",
863
+ "privacy": "private",
864
+ "return": {
865
+ "type": {
866
+ "text": "number"
867
+ }
868
+ },
869
+ "parameters": [
870
+ {
871
+ "name": "items",
872
+ "type": {
873
+ "text": "T[]"
874
+ }
875
+ },
876
+ {
877
+ "name": "startIndex",
878
+ "type": {
879
+ "text": "number"
880
+ }
881
+ },
882
+ {
883
+ "name": "direction",
884
+ "type": {
885
+ "text": "1 | -1"
886
+ }
887
+ }
888
+ ],
889
+ "description": "Find the next valid (non-disabled) index"
890
+ },
891
+ {
892
+ "kind": "method",
893
+ "name": "focusItem",
894
+ "return": {
895
+ "type": {
896
+ "text": "void"
897
+ }
898
+ },
899
+ "parameters": [
900
+ {
901
+ "name": "item",
902
+ "type": {
903
+ "text": "T"
904
+ }
905
+ }
906
+ ],
907
+ "description": "Set focus to a specific item"
908
+ },
909
+ {
910
+ "kind": "method",
911
+ "name": "focusFirst",
912
+ "return": {
913
+ "type": {
914
+ "text": "void"
915
+ }
916
+ },
917
+ "description": "Set focus to the first non-disabled item"
918
+ },
919
+ {
920
+ "kind": "method",
921
+ "name": "focusLast",
922
+ "return": {
923
+ "type": {
924
+ "text": "void"
925
+ }
926
+ },
927
+ "description": "Set focus to the last non-disabled item"
928
+ }
929
+ ]
930
+ }
931
+ ],
932
+ "exports": [
933
+ {
934
+ "kind": "js",
935
+ "name": "RovingTabindexController",
936
+ "declaration": {
937
+ "name": "RovingTabindexController",
938
+ "module": "src/controllers/roving-tabindex-controller.ts"
939
+ }
940
+ }
941
+ ]
942
+ },
943
+ {
944
+ "kind": "javascript-module",
945
+ "path": "src/directives/setAttributes.ts",
946
+ "declarations": [
947
+ {
948
+ "kind": "variable",
949
+ "name": "setAttributes"
950
+ }
951
+ ],
952
+ "exports": [
953
+ {
954
+ "kind": "js",
955
+ "name": "default",
956
+ "declaration": {
957
+ "name": "setAttributes",
958
+ "module": "src/directives/setAttributes.ts"
959
+ }
960
+ }
961
+ ]
962
+ },
963
+ {
964
+ "kind": "javascript-module",
965
+ "path": "src/form/form-control.ts",
966
+ "declarations": [
967
+ {
968
+ "kind": "class",
969
+ "description": "",
970
+ "name": "FormControl",
971
+ "members": [
972
+ {
973
+ "kind": "field",
974
+ "name": "formControlController",
975
+ "privacy": "protected",
976
+ "readonly": true,
977
+ "default": "new FormControlController(this, { assumeInteractionOn: ['it-input', 'it-blur', 'it-change'], })"
978
+ },
979
+ {
980
+ "kind": "field",
981
+ "name": "_touched",
982
+ "type": {
983
+ "text": "boolean"
984
+ },
985
+ "default": "false"
986
+ },
987
+ {
988
+ "kind": "field",
989
+ "name": "inputElement",
990
+ "type": {
991
+ "text": "HTMLInputElement"
992
+ }
993
+ },
994
+ {
995
+ "kind": "field",
996
+ "name": "name",
997
+ "type": {
998
+ "text": "string"
999
+ },
1000
+ "default": "''",
1001
+ "description": "The name of the input, submitted as a name/value pair with form data.",
1002
+ "attribute": "name",
1003
+ "reflects": true
1004
+ },
1005
+ {
1006
+ "kind": "field",
1007
+ "name": "value",
1008
+ "type": {
1009
+ "text": "string"
1010
+ },
1011
+ "default": "''",
1012
+ "description": "The current value of the input, submitted as a name/value pair with form data.",
1013
+ "attribute": "value",
1014
+ "reflects": true
1015
+ },
1016
+ {
1017
+ "kind": "field",
1018
+ "name": "disabled",
1019
+ "type": {
1020
+ "text": "boolean"
1021
+ },
1022
+ "default": "false",
1023
+ "description": "If the input is disabled.",
1024
+ "attribute": "disabled",
1025
+ "reflects": true
1026
+ },
1027
+ {
1028
+ "kind": "field",
1029
+ "name": "form",
1030
+ "type": {
1031
+ "text": "string"
1032
+ },
1033
+ "default": "''",
1034
+ "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.",
1035
+ "attribute": "form",
1036
+ "reflects": true
1037
+ },
1038
+ {
1039
+ "kind": "field",
1040
+ "name": "customValidation",
1041
+ "type": {
1042
+ "text": "boolean"
1043
+ },
1044
+ "default": "false",
1045
+ "description": "If you implement your custom validation and you won't to trigger default validation",
1046
+ "attribute": "custom-validation",
1047
+ "reflects": true
1048
+ },
1049
+ {
1050
+ "kind": "field",
1051
+ "name": "validationText",
1052
+ "type": {
1053
+ "text": "string"
1054
+ },
1055
+ "default": "''",
1056
+ "description": "If your input is invalid from your custom validition, set this attribute with message validation",
1057
+ "attribute": "validity-message",
1058
+ "reflects": true
1059
+ },
1060
+ {
1061
+ "kind": "field",
1062
+ "name": "pattern",
1063
+ "type": {
1064
+ "text": "string | undefined"
1065
+ },
1066
+ "description": "Pattern the `value` must match to be valid",
1067
+ "attribute": "pattern"
1068
+ },
1069
+ {
1070
+ "kind": "field",
1071
+ "name": "min",
1072
+ "type": {
1073
+ "text": "number | string | Date | undefined"
1074
+ },
1075
+ "description": "The input's minimum value. Only applies to date and number input types.",
1076
+ "attribute": "min"
1077
+ },
1078
+ {
1079
+ "kind": "field",
1080
+ "name": "max",
1081
+ "type": {
1082
+ "text": "number | string | Date | undefined"
1083
+ },
1084
+ "description": "The input's maximum value. Only applies to date and number input types.",
1085
+ "attribute": "max"
1086
+ },
1087
+ {
1088
+ "kind": "field",
1089
+ "name": "step",
1090
+ "type": {
1091
+ "text": "number | 'any'"
1092
+ },
1093
+ "default": "'any'",
1094
+ "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.",
1095
+ "attribute": "step"
1096
+ },
1097
+ {
1098
+ "kind": "field",
1099
+ "name": "minlength",
1100
+ "type": {
1101
+ "text": "number"
1102
+ },
1103
+ "default": "-1",
1104
+ "description": "The input's minimum length.",
1105
+ "attribute": "minlength"
1106
+ },
1107
+ {
1108
+ "kind": "field",
1109
+ "name": "maxlength",
1110
+ "type": {
1111
+ "text": "number"
1112
+ },
1113
+ "default": "-1",
1114
+ "description": "The input's maximum length.",
1115
+ "attribute": "maxlength"
1116
+ },
1117
+ {
1118
+ "kind": "field",
1119
+ "name": "required",
1120
+ "type": {
1121
+ "text": "boolean"
1122
+ },
1123
+ "default": "false",
1124
+ "description": "If the input is required.",
1125
+ "attribute": "required",
1126
+ "reflects": true
1127
+ },
1128
+ {
1129
+ "kind": "field",
1130
+ "name": "validity",
1131
+ "type": {
1132
+ "text": "ValidityState"
1133
+ },
1134
+ "privacy": "public",
1135
+ "description": "Gets the validity state object",
1136
+ "readonly": true
1137
+ },
1138
+ {
1139
+ "kind": "field",
1140
+ "name": "validationMessage",
1141
+ "type": {
1142
+ "text": "string"
1143
+ },
1144
+ "privacy": "public",
1145
+ "default": "''"
1146
+ },
1147
+ {
1148
+ "kind": "method",
1149
+ "name": "checkValidity",
1150
+ "privacy": "public",
1151
+ "return": {
1152
+ "type": {
1153
+ "text": "boolean"
1154
+ }
1155
+ }
1156
+ },
1157
+ {
1158
+ "kind": "method",
1159
+ "name": "getForm",
1160
+ "privacy": "public",
1161
+ "return": {
1162
+ "type": {
1163
+ "text": "HTMLFormElement | null"
1164
+ }
1165
+ },
1166
+ "description": "Gets the associated form, if one exists."
1167
+ },
1168
+ {
1169
+ "kind": "method",
1170
+ "name": "reportValidity",
1171
+ "privacy": "public",
1172
+ "description": "Checks for validity and shows the browser's validation message if the control is invalid."
1173
+ },
1174
+ {
1175
+ "kind": "method",
1176
+ "name": "setCustomValidity",
1177
+ "privacy": "public",
1178
+ "parameters": [
1179
+ {
1180
+ "name": "message",
1181
+ "type": {
1182
+ "text": "string"
1183
+ }
1184
+ }
1185
+ ],
1186
+ "description": "Sets a custom validation message. Pass an empty string to restore validity."
1187
+ },
1188
+ {
1189
+ "kind": "method",
1190
+ "name": "_handleReady",
1191
+ "privacy": "protected"
1192
+ },
1193
+ {
1194
+ "kind": "method",
1195
+ "name": "_handleInput",
1196
+ "privacy": "protected",
1197
+ "parameters": [
1198
+ {
1199
+ "name": "e",
1200
+ "type": {
1201
+ "text": "Event"
1202
+ }
1203
+ }
1204
+ ]
1205
+ },
1206
+ {
1207
+ "kind": "method",
1208
+ "name": "_handleBlur",
1209
+ "privacy": "protected",
1210
+ "parameters": [
1211
+ {
1212
+ "name": "e",
1213
+ "type": {
1214
+ "text": "Event"
1215
+ }
1216
+ }
1217
+ ]
1218
+ },
1219
+ {
1220
+ "kind": "method",
1221
+ "name": "_handleFocus",
1222
+ "privacy": "protected",
1223
+ "parameters": [
1224
+ {
1225
+ "name": "e",
1226
+ "type": {
1227
+ "text": "Event"
1228
+ }
1229
+ }
1230
+ ]
1231
+ },
1232
+ {
1233
+ "kind": "method",
1234
+ "name": "_handleClick",
1235
+ "privacy": "protected",
1236
+ "parameters": [
1237
+ {
1238
+ "name": "e",
1239
+ "type": {
1240
+ "text": "Event"
1241
+ }
1242
+ }
1243
+ ]
1244
+ },
1245
+ {
1246
+ "kind": "method",
1247
+ "name": "handleValidationMessages",
1248
+ "privacy": "protected"
1249
+ },
1250
+ {
1251
+ "kind": "method",
1252
+ "name": "_handleInvalid",
1253
+ "privacy": "protected",
1254
+ "parameters": [
1255
+ {
1256
+ "name": "event",
1257
+ "type": {
1258
+ "text": "Event"
1259
+ }
1260
+ }
1261
+ ]
1262
+ },
1263
+ {
1264
+ "kind": "method",
1265
+ "name": "_handleChange",
1266
+ "privacy": "protected",
1267
+ "parameters": [
1268
+ {
1269
+ "name": "e",
1270
+ "type": {
1271
+ "text": "Event"
1272
+ }
1273
+ }
1274
+ ]
1275
+ }
1276
+ ],
1277
+ "events": [
1278
+ {
1279
+ "name": "it-input-ready",
1280
+ "type": {
1281
+ "text": "CustomEvent"
1282
+ }
1283
+ },
1284
+ {
1285
+ "name": "it-input",
1286
+ "type": {
1287
+ "text": "CustomEvent"
1288
+ }
1289
+ },
1290
+ {
1291
+ "name": "it-blur",
1292
+ "type": {
1293
+ "text": "FocusEvent"
1294
+ }
1295
+ },
1296
+ {
1297
+ "name": "it-focus",
1298
+ "type": {
1299
+ "text": "FocusEvent"
1300
+ }
1301
+ },
1302
+ {
1303
+ "name": "it-click",
1304
+ "type": {
1305
+ "text": "MouseEvent"
1306
+ }
1307
+ },
1308
+ {
1309
+ "name": "it-change",
1310
+ "type": {
1311
+ "text": "CustomEvent"
1312
+ }
1313
+ }
1314
+ ],
1315
+ "attributes": [
1316
+ {
1317
+ "name": "name",
1318
+ "type": {
1319
+ "text": "string"
1320
+ },
1321
+ "default": "''",
1322
+ "description": "The name of the input, submitted as a name/value pair with form data.",
1323
+ "fieldName": "name"
1324
+ },
1325
+ {
1326
+ "name": "value",
1327
+ "type": {
1328
+ "text": "string"
1329
+ },
1330
+ "default": "''",
1331
+ "description": "The current value of the input, submitted as a name/value pair with form data.",
1332
+ "fieldName": "value"
1333
+ },
1334
+ {
1335
+ "name": "disabled",
1336
+ "type": {
1337
+ "text": "boolean"
1338
+ },
1339
+ "default": "false",
1340
+ "description": "If the input is disabled.",
1341
+ "fieldName": "disabled"
1342
+ },
1343
+ {
1344
+ "name": "form",
1345
+ "type": {
1346
+ "text": "string"
1347
+ },
1348
+ "default": "''",
1349
+ "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.",
1350
+ "fieldName": "form"
1351
+ },
1352
+ {
1353
+ "name": "custom-validation",
1354
+ "type": {
1355
+ "text": "boolean"
1356
+ },
1357
+ "default": "false",
1358
+ "description": "If you implement your custom validation and you won't to trigger default validation",
1359
+ "fieldName": "customValidation"
1360
+ },
1361
+ {
1362
+ "name": "validity-message",
1363
+ "type": {
1364
+ "text": "string"
1365
+ },
1366
+ "default": "''",
1367
+ "description": "If your input is invalid from your custom validition, set this attribute with message validation",
1368
+ "fieldName": "validationText"
1369
+ },
1370
+ {
1371
+ "name": "pattern",
1372
+ "type": {
1373
+ "text": "string | undefined"
1374
+ },
1375
+ "description": "Pattern the `value` must match to be valid",
1376
+ "fieldName": "pattern"
1377
+ },
1378
+ {
1379
+ "name": "min",
1380
+ "type": {
1381
+ "text": "number | string | Date | undefined"
1382
+ },
1383
+ "description": "The input's minimum value. Only applies to date and number input types.",
1384
+ "fieldName": "min"
1385
+ },
1386
+ {
1387
+ "name": "max",
1388
+ "type": {
1389
+ "text": "number | string | Date | undefined"
1390
+ },
1391
+ "description": "The input's maximum value. Only applies to date and number input types.",
1392
+ "fieldName": "max"
1393
+ },
1394
+ {
1395
+ "name": "step",
1396
+ "type": {
1397
+ "text": "number | 'any'"
1398
+ },
1399
+ "default": "'any'",
1400
+ "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.",
1401
+ "fieldName": "step"
1402
+ },
1403
+ {
1404
+ "name": "minlength",
1405
+ "type": {
1406
+ "text": "number"
1407
+ },
1408
+ "default": "-1",
1409
+ "description": "The input's minimum length.",
1410
+ "fieldName": "minlength"
1411
+ },
1412
+ {
1413
+ "name": "maxlength",
1414
+ "type": {
1415
+ "text": "number"
1416
+ },
1417
+ "default": "-1",
1418
+ "description": "The input's maximum length.",
1419
+ "fieldName": "maxlength"
1420
+ },
1421
+ {
1422
+ "name": "required",
1423
+ "type": {
1424
+ "text": "boolean"
1425
+ },
1426
+ "default": "false",
1427
+ "description": "If the input is required.",
1428
+ "fieldName": "required"
1429
+ }
1430
+ ],
1431
+ "superclass": {
1432
+ "name": "BaseLocalizedComponent",
1433
+ "module": "/src/base-component/base-component.js"
1434
+ }
1435
+ }
1436
+ ],
1437
+ "exports": [
1438
+ {
1439
+ "kind": "js",
1440
+ "name": "FormControl",
1441
+ "declaration": {
1442
+ "name": "FormControl",
1443
+ "module": "src/form/form-control.ts"
1444
+ }
1445
+ }
1446
+ ]
1447
+ },
1448
+ {
1449
+ "kind": "javascript-module",
1450
+ "path": "src/form/form-controller.ts",
1451
+ "declarations": [
1452
+ {
1453
+ "kind": "variable",
1454
+ "name": "formCollections",
1455
+ "type": {
1456
+ "text": "WeakMap<HTMLFormElement, Set<FormControl>>"
1457
+ },
1458
+ "default": "new WeakMap()"
1459
+ },
1460
+ {
1461
+ "kind": "class",
1462
+ "description": "A reactive controller to allow form controls to participate in form submission, validation, etc.",
1463
+ "name": "FormControlController",
1464
+ "members": [
1465
+ {
1466
+ "kind": "field",
1467
+ "name": "host",
1468
+ "type": {
1469
+ "text": "FormControl & ReactiveControllerHost"
1470
+ }
1471
+ },
1472
+ {
1473
+ "kind": "field",
1474
+ "name": "form",
1475
+ "type": {
1476
+ "text": "HTMLFormElement | null | undefined"
1477
+ }
1478
+ },
1479
+ {
1480
+ "kind": "field",
1481
+ "name": "options",
1482
+ "type": {
1483
+ "text": "FormControlControllerOptions"
1484
+ },
1485
+ "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, }"
1486
+ },
1487
+ {
1488
+ "kind": "method",
1489
+ "name": "hostConnected"
1490
+ },
1491
+ {
1492
+ "kind": "method",
1493
+ "name": "hostDisconnected"
1494
+ },
1495
+ {
1496
+ "kind": "method",
1497
+ "name": "hostUpdated"
1498
+ },
1499
+ {
1500
+ "kind": "method",
1501
+ "name": "attachForm",
1502
+ "privacy": "private",
1503
+ "parameters": [
1504
+ {
1505
+ "name": "form",
1506
+ "optional": true,
1507
+ "type": {
1508
+ "text": "HTMLFormElement"
1509
+ }
1510
+ }
1511
+ ]
1512
+ },
1513
+ {
1514
+ "kind": "method",
1515
+ "name": "detachForm",
1516
+ "privacy": "private"
1517
+ },
1518
+ {
1519
+ "kind": "field",
1520
+ "name": "handleFormData",
1521
+ "privacy": "private"
1522
+ },
1523
+ {
1524
+ "kind": "field",
1525
+ "name": "handleFormSubmit",
1526
+ "privacy": "private"
1527
+ },
1528
+ {
1529
+ "kind": "field",
1530
+ "name": "handleFormReset",
1531
+ "privacy": "private"
1532
+ },
1533
+ {
1534
+ "kind": "field",
1535
+ "name": "handleInteraction",
1536
+ "privacy": "private"
1537
+ },
1538
+ {
1539
+ "kind": "field",
1540
+ "name": "checkFormValidity",
1541
+ "privacy": "private"
118
1542
  },
119
1543
  {
120
1544
  "kind": "field",
121
- "name": "_id",
122
- "type": {
123
- "text": "string | undefined"
124
- },
125
- "privacy": "protected"
1545
+ "name": "reportFormValidity",
1546
+ "privacy": "private"
126
1547
  },
127
1548
  {
128
1549
  "kind": "method",
129
- "name": "generateId",
1550
+ "name": "setUserInteracted",
1551
+ "privacy": "private",
130
1552
  "parameters": [
131
1553
  {
132
- "name": "prefix",
1554
+ "name": "el",
133
1555
  "type": {
134
- "text": "string"
1556
+ "text": "FormControl"
1557
+ }
1558
+ },
1559
+ {
1560
+ "name": "hasInteracted",
1561
+ "type": {
1562
+ "text": "boolean"
135
1563
  }
136
1564
  }
137
1565
  ]
138
1566
  },
139
1567
  {
140
1568
  "kind": "method",
141
- "name": "addFocus",
1569
+ "name": "doAction",
1570
+ "privacy": "private",
142
1571
  "parameters": [
143
1572
  {
144
- "name": "element",
1573
+ "name": "type",
145
1574
  "type": {
146
- "text": "HTMLElement"
1575
+ "text": "'submit' | 'reset'"
1576
+ }
1577
+ },
1578
+ {
1579
+ "name": "submitter",
1580
+ "optional": true,
1581
+ "type": {
1582
+ "text": "HTMLInputElement | any"
147
1583
  }
148
1584
  }
149
1585
  ]
150
1586
  },
151
1587
  {
152
1588
  "kind": "method",
153
- "name": "composeClass",
1589
+ "name": "getForm",
1590
+ "description": "Returns the associated `<form>` element, if one exists."
1591
+ },
1592
+ {
1593
+ "kind": "method",
1594
+ "name": "reset",
154
1595
  "parameters": [
155
1596
  {
156
- "name": "classes",
1597
+ "name": "submitter",
1598
+ "optional": true,
157
1599
  "type": {
158
- "text": "any"
1600
+ "text": "HTMLInputElement | any"
159
1601
  }
160
1602
  }
161
- ]
1603
+ ],
1604
+ "description": "Resets the form, restoring all the control to their default value"
162
1605
  },
163
1606
  {
164
1607
  "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": [
1608
+ "name": "submit",
1609
+ "parameters": [
1610
+ {
1611
+ "name": "submitter",
1612
+ "optional": true,
1613
+ "type": {
1614
+ "text": "HTMLInputElement | any"
1615
+ }
1616
+ }
1617
+ ],
1618
+ "description": "Submits the form, triggering validation and form data injection."
1619
+ },
227
1620
  {
228
1621
  "kind": "method",
229
- "name": "_handleFormdata",
230
- "return": {
231
- "type": {
232
- "text": "void"
1622
+ "name": "setValidity",
1623
+ "parameters": [
1624
+ {
1625
+ "name": "isValid",
1626
+ "type": {
1627
+ "text": "boolean"
1628
+ }
233
1629
  }
234
- },
1630
+ ],
1631
+ "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."
1632
+ },
1633
+ {
1634
+ "kind": "method",
1635
+ "name": "updateValidity",
1636
+ "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."
1637
+ },
1638
+ {
1639
+ "kind": "method",
1640
+ "name": "emitInvalidEvent",
235
1641
  "parameters": [
236
1642
  {
237
- "name": "event",
1643
+ "name": "originalInvalidEvent",
1644
+ "optional": true,
238
1645
  "type": {
239
1646
  "text": "Event"
240
- },
241
- "description": "The event."
1647
+ }
242
1648
  }
243
1649
  ],
244
- "description": "Handles `formdata` event."
245
- }
246
- ],
247
- "parameters": [
248
- {
249
- "name": "Base",
250
- "type": {
251
- "text": "TBase"
252
- },
253
- "description": "The base class."
1650
+ "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
1651
  }
255
1652
  ]
256
1653
  }
@@ -258,10 +1655,18 @@
258
1655
  "exports": [
259
1656
  {
260
1657
  "kind": "js",
261
- "name": "default",
1658
+ "name": "formCollections",
1659
+ "declaration": {
1660
+ "name": "formCollections",
1661
+ "module": "src/form/form-controller.ts"
1662
+ }
1663
+ },
1664
+ {
1665
+ "kind": "js",
1666
+ "name": "FormControlController",
262
1667
  "declaration": {
263
- "name": "FormMixin",
264
- "module": "src/mixins/form.ts"
1668
+ "name": "FormControlController",
1669
+ "module": "src/form/form-controller.ts"
265
1670
  }
266
1671
  }
267
1672
  ]
@@ -285,6 +1690,12 @@
285
1690
  "text": "string"
286
1691
  },
287
1692
  "description": "The form validation status."
1693
+ },
1694
+ {
1695
+ "name": "translations",
1696
+ "type": {
1697
+ "text": "Record<string, string>"
1698
+ }
288
1699
  }
289
1700
  ],
290
1701
  "return": {
@@ -294,17 +1705,6 @@
294
1705
  },
295
1706
  "privacy": "protected"
296
1707
  },
297
- {
298
- "kind": "method",
299
- "name": "_testValidity",
300
- "return": {
301
- "type": {
302
- "text": ""
303
- }
304
- },
305
- "description": "Checks if the value meets the constraints.",
306
- "privacy": "protected"
307
- },
308
1708
  {
309
1709
  "kind": "field",
310
1710
  "name": "invalid",
@@ -323,37 +1723,84 @@
323
1723
  },
324
1724
  {
325
1725
  "kind": "field",
326
- "name": "requiredValidityMessage",
1726
+ "name": "validityMessage",
327
1727
  "type": {
328
1728
  "text": "string"
329
1729
  },
330
- "description": "The special validity message for `required`."
1730
+ "description": "The validity message."
331
1731
  },
332
1732
  {
333
1733
  "kind": "field",
334
- "name": "validityMessage",
1734
+ "name": "_value",
335
1735
  "type": {
336
1736
  "text": "string"
337
1737
  },
338
- "description": "The validity message."
1738
+ "description": "The value."
339
1739
  },
340
1740
  {
341
1741
  "kind": "field",
342
- "name": "value",
1742
+ "name": "pattern",
343
1743
  "type": {
344
- "text": "string"
1744
+ "text": "string | undefined"
345
1745
  },
346
- "description": "The value."
1746
+ "description": "The pattern to match to be valid."
1747
+ },
1748
+ {
1749
+ "kind": "field",
1750
+ "name": "disabled",
1751
+ "type": {
1752
+ "text": "boolean"
1753
+ },
1754
+ "description": "`true` if the element is disabled."
1755
+ },
1756
+ {
1757
+ "kind": "field",
1758
+ "name": "minlength",
1759
+ "type": {
1760
+ "text": "number"
1761
+ },
1762
+ "description": "The minimum length of the value."
1763
+ },
1764
+ {
1765
+ "kind": "field",
1766
+ "name": "maxlength",
1767
+ "type": {
1768
+ "text": "number"
1769
+ },
1770
+ "description": "The maximum length of the value."
1771
+ },
1772
+ {
1773
+ "kind": "field",
1774
+ "name": "customValidation",
1775
+ "type": {
1776
+ "text": "boolean"
1777
+ },
1778
+ "description": "External validation."
347
1779
  },
348
1780
  {
349
1781
  "kind": "method",
350
- "name": "checkValidity",
351
- "description": "Checks if the value meets the constraints.\nFires cancelable `invalid` event if it doesn't.",
1782
+ "name": "_checkValidity",
352
1783
  "return": {
353
1784
  "type": {
354
1785
  "text": ""
355
1786
  }
356
- }
1787
+ },
1788
+ "parameters": [
1789
+ {
1790
+ "name": "translations",
1791
+ "type": {
1792
+ "text": "Record<string, string>"
1793
+ }
1794
+ },
1795
+ {
1796
+ "name": "htmlValidity",
1797
+ "default": "true",
1798
+ "type": {
1799
+ "text": "boolean"
1800
+ }
1801
+ }
1802
+ ],
1803
+ "description": "Checks if the value meets the constraints."
357
1804
  },
358
1805
  {
359
1806
  "kind": "method",
@@ -370,14 +1817,6 @@
370
1817
  "description": "Sets the given custom validity message."
371
1818
  }
372
1819
  ],
373
- "events": [
374
- {
375
- "name": "invalid",
376
- "type": {
377
- "text": "CustomEvent"
378
- }
379
- }
380
- ],
381
1820
  "parameters": [
382
1821
  {
383
1822
  "name": "Base",
@@ -400,10 +1839,69 @@
400
1839
  }
401
1840
  ]
402
1841
  },
1842
+ {
1843
+ "kind": "javascript-module",
1844
+ "path": "src/stories/formControlReusableStories.ts",
1845
+ "declarations": [
1846
+ {
1847
+ "kind": "function",
1848
+ "name": "StoryFormControlMethodAndProps",
1849
+ "parameters": [
1850
+ {
1851
+ "name": "{\n otherProps = '',\n otherMethods = '',\n otherEvents = '',\n componentName = 'it-input',\n}"
1852
+ }
1853
+ ]
1854
+ }
1855
+ ],
1856
+ "exports": [
1857
+ {
1858
+ "kind": "js",
1859
+ "name": "StoryFormControlMethodAndProps",
1860
+ "declaration": {
1861
+ "name": "StoryFormControlMethodAndProps",
1862
+ "module": "src/stories/formControlReusableStories.ts"
1863
+ }
1864
+ }
1865
+ ]
1866
+ },
403
1867
  {
404
1868
  "kind": "javascript-module",
405
1869
  "path": "src/utils/cookies.ts",
406
1870
  "declarations": [
1871
+ {
1872
+ "kind": "function",
1873
+ "name": "rememberChoice",
1874
+ "parameters": [
1875
+ {
1876
+ "name": "service",
1877
+ "type": {
1878
+ "text": "string"
1879
+ }
1880
+ },
1881
+ {
1882
+ "name": "remember",
1883
+ "type": {
1884
+ "text": "boolean"
1885
+ }
1886
+ }
1887
+ ]
1888
+ },
1889
+ {
1890
+ "kind": "function",
1891
+ "name": "isChoiceRemembered",
1892
+ "parameters": [
1893
+ {
1894
+ "name": "service",
1895
+ "type": {
1896
+ "text": "string"
1897
+ }
1898
+ }
1899
+ ]
1900
+ },
1901
+ {
1902
+ "kind": "function",
1903
+ "name": "clearAllRememberedChoices"
1904
+ },
407
1905
  {
408
1906
  "kind": "variable",
409
1907
  "name": "cookies",
@@ -561,6 +2059,30 @@
561
2059
  }
562
2060
  }
563
2061
  ]
2062
+ },
2063
+ {
2064
+ "kind": "javascript-module",
2065
+ "path": "src/form/locales/it.ts",
2066
+ "declarations": [
2067
+ {
2068
+ "kind": "variable",
2069
+ "name": "translation",
2070
+ "type": {
2071
+ "text": "DefaultTranslation"
2072
+ },
2073
+ "default": "{ $code: 'it', $name: 'Italiano', $dir: 'ltr', validityRequired: 'Questo campo è obbligatorio.', 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.', }"
2074
+ }
2075
+ ],
2076
+ "exports": [
2077
+ {
2078
+ "kind": "js",
2079
+ "name": "default",
2080
+ "declaration": {
2081
+ "name": "translation",
2082
+ "module": "src/form/locales/it.ts"
2083
+ }
2084
+ }
2085
+ ]
564
2086
  }
565
2087
  ]
566
2088
  }