@italia/globals 0.1.0-alpha.2 → 1.0.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +524 -10
- package/dist/src/base-component/base-component.d.ts +19 -7
- package/dist/src/base-component/base-component.d.ts.map +1 -1
- package/dist/src/controllers/focus-trap-controller.d.ts +92 -0
- package/dist/src/controllers/focus-trap-controller.d.ts.map +1 -0
- package/dist/src/controllers/focus-trap-controller.js +497 -0
- package/dist/src/controllers/focus-trap-controller.js.map +1 -0
- package/dist/src/controllers/roving-tabindex-controller.d.ts +9 -2
- package/dist/src/controllers/roving-tabindex-controller.d.ts.map +1 -1
- package/dist/src/controllers/roving-tabindex-controller.js +11 -5
- package/dist/src/controllers/roving-tabindex-controller.js.map +1 -1
- package/dist/src/form/form-control.d.ts +2 -1
- package/dist/src/form/form-control.d.ts.map +1 -1
- package/dist/src/form/form-control.js +15 -7
- package/dist/src/form/form-control.js.map +1 -1
- package/dist/src/form/form-controller.d.ts +2 -0
- package/dist/src/form/form-controller.d.ts.map +1 -1
- package/dist/src/form/form-controller.js +45 -1
- package/dist/src/form/form-controller.js.map +1 -1
- package/dist/src/form/locales/it.d.ts.map +1 -1
- package/dist/src/form/locales/it.js +1 -0
- package/dist/src/form/locales/it.js.map +1 -1
- package/dist/src/index.d.ts +8 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/mixins/validity.d.ts +18 -6
- package/dist/src/mixins/validity.d.ts.map +1 -1
- package/dist/src/stories/formControlReusableStories.d.ts.map +1 -1
- package/dist/src/stories/formControlReusableStories.js +5 -4
- package/dist/src/stories/formControlReusableStories.js.map +1 -1
- package/dist/src/window-manager.d.ts +13 -0
- package/dist/src/window-manager.d.ts.map +1 -1
- package/dist/src/window-manager.js +31 -0
- package/dist/src/window-manager.js.map +1 -1
- package/package.json +2 -2
package/custom-elements.json
CHANGED
|
@@ -111,6 +111,22 @@
|
|
|
111
111
|
"module": "./controllers/collapse-controller.js"
|
|
112
112
|
}
|
|
113
113
|
},
|
|
114
|
+
{
|
|
115
|
+
"kind": "js",
|
|
116
|
+
"name": "FocusTrapController",
|
|
117
|
+
"declaration": {
|
|
118
|
+
"name": "FocusTrapController",
|
|
119
|
+
"module": "./controllers/focus-trap-controller.js"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"kind": "js",
|
|
124
|
+
"name": "FocusTrapConfig",
|
|
125
|
+
"declaration": {
|
|
126
|
+
"name": "FocusTrapConfig",
|
|
127
|
+
"module": "./controllers/focus-trap-controller.js"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
114
130
|
{
|
|
115
131
|
"kind": "js",
|
|
116
132
|
"name": "FormControl",
|
|
@@ -251,6 +267,26 @@
|
|
|
251
267
|
"static": true,
|
|
252
268
|
"default": "false"
|
|
253
269
|
},
|
|
270
|
+
{
|
|
271
|
+
"kind": "field",
|
|
272
|
+
"name": "scrollLockCount",
|
|
273
|
+
"type": {
|
|
274
|
+
"text": "number"
|
|
275
|
+
},
|
|
276
|
+
"privacy": "private",
|
|
277
|
+
"static": true,
|
|
278
|
+
"default": "0"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"kind": "field",
|
|
282
|
+
"name": "scrollbarWidth",
|
|
283
|
+
"type": {
|
|
284
|
+
"text": "number"
|
|
285
|
+
},
|
|
286
|
+
"privacy": "private",
|
|
287
|
+
"static": true,
|
|
288
|
+
"default": "0"
|
|
289
|
+
},
|
|
254
290
|
{
|
|
255
291
|
"kind": "method",
|
|
256
292
|
"name": "init",
|
|
@@ -307,6 +343,39 @@
|
|
|
307
343
|
}
|
|
308
344
|
}
|
|
309
345
|
]
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"kind": "method",
|
|
349
|
+
"name": "lockBodyScroll",
|
|
350
|
+
"static": true,
|
|
351
|
+
"return": {
|
|
352
|
+
"type": {
|
|
353
|
+
"text": "void"
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
"description": "Blocca lo scroll del body. Usa ref counting per gestire modal nested.\nChiamare unlockBodyScroll() per ogni lockBodyScroll()."
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"kind": "method",
|
|
360
|
+
"name": "unlockBodyScroll",
|
|
361
|
+
"static": true,
|
|
362
|
+
"return": {
|
|
363
|
+
"type": {
|
|
364
|
+
"text": "void"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"description": "Sblocca lo scroll del body. Rimuove il lock solo quando tutti i consumer hanno chiamato unlock."
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"kind": "method",
|
|
371
|
+
"name": "getScrollbarWidth",
|
|
372
|
+
"static": true,
|
|
373
|
+
"return": {
|
|
374
|
+
"type": {
|
|
375
|
+
"text": "number"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"description": "Ritorna la larghezza della scrollbar (utile per compensazioni)"
|
|
310
379
|
}
|
|
311
380
|
]
|
|
312
381
|
}
|
|
@@ -735,6 +804,421 @@
|
|
|
735
804
|
}
|
|
736
805
|
]
|
|
737
806
|
},
|
|
807
|
+
{
|
|
808
|
+
"kind": "javascript-module",
|
|
809
|
+
"path": "src/controllers/focus-trap-controller.ts",
|
|
810
|
+
"declarations": [
|
|
811
|
+
{
|
|
812
|
+
"kind": "class",
|
|
813
|
+
"description": "Safari/VoiceOver iOS workarounds catalogue — why timers exist here:\n\n1. `activate()` rAF + setTimeout(50): Safari does not reliably update the VoiceOver\n accessibility tree synchronously. rAF ensures the element is painted before we\n attempt to focus it. setTimeout(50) yields 50ms so VoiceOver can settle its\n accessibility tree before announcing the newly focused element.\n Empirically, VoiceOver iOS needs 100–300ms; the animated path in it-modal already\n provides ~316ms naturally via animation.finished, so the 50ms here only truly\n matters for the no-animation / prefers-reduced-motion path.\n\n2. `_restoreFocus()` setTimeout(0): Same settle reason on close. The caller\n (it-modal finishHide) adds a belt-and-suspenders 20ms setTimeout; _restoreFocus\n is skipped via { skipFocusRestore: true } in that case to avoid double-focus.\n\n3. `activate()` iOS body-focus fallback: On iOS Safari, tapping a button does not\n reliably move document.activeElement away from body. We fall back to getTrigger()\n so _previousActiveElement is always a real DOM element to restore focus to on close.\n\nThere is no WebKit/Safari API to detect when VoiceOver has settled its accessibility\ntree. setTimeout-based workarounds are the same pattern used by Bootstrap 5, the\nfocus-trap npm package, and a11y-dialog.",
|
|
814
|
+
"name": "FocusTrapController",
|
|
815
|
+
"members": [
|
|
816
|
+
{
|
|
817
|
+
"kind": "field",
|
|
818
|
+
"name": "host",
|
|
819
|
+
"type": {
|
|
820
|
+
"text": "ReactiveControllerHost & HTMLElement"
|
|
821
|
+
},
|
|
822
|
+
"privacy": "private",
|
|
823
|
+
"default": "host"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"kind": "field",
|
|
827
|
+
"name": "config",
|
|
828
|
+
"type": {
|
|
829
|
+
"text": "FocusTrapConfig"
|
|
830
|
+
},
|
|
831
|
+
"privacy": "private",
|
|
832
|
+
"default": "config"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"kind": "field",
|
|
836
|
+
"name": "observer",
|
|
837
|
+
"type": {
|
|
838
|
+
"text": "MutationObserver | null"
|
|
839
|
+
},
|
|
840
|
+
"privacy": "private",
|
|
841
|
+
"default": "null"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"kind": "field",
|
|
845
|
+
"name": "_isActive",
|
|
846
|
+
"type": {
|
|
847
|
+
"text": "boolean"
|
|
848
|
+
},
|
|
849
|
+
"privacy": "private",
|
|
850
|
+
"default": "false"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"kind": "field",
|
|
854
|
+
"name": "_previousActiveElement",
|
|
855
|
+
"type": {
|
|
856
|
+
"text": "HTMLElement | null"
|
|
857
|
+
},
|
|
858
|
+
"privacy": "private",
|
|
859
|
+
"default": "null"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"kind": "field",
|
|
863
|
+
"name": "_focusableElements",
|
|
864
|
+
"type": {
|
|
865
|
+
"text": "HTMLElement[]"
|
|
866
|
+
},
|
|
867
|
+
"privacy": "private",
|
|
868
|
+
"default": "[]"
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
"kind": "field",
|
|
872
|
+
"name": "_first",
|
|
873
|
+
"type": {
|
|
874
|
+
"text": "HTMLElement | undefined"
|
|
875
|
+
},
|
|
876
|
+
"privacy": "private"
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
"kind": "field",
|
|
880
|
+
"name": "_last",
|
|
881
|
+
"type": {
|
|
882
|
+
"text": "HTMLElement | undefined"
|
|
883
|
+
},
|
|
884
|
+
"privacy": "private"
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"kind": "field",
|
|
888
|
+
"name": "_lastKnownFocusIndex",
|
|
889
|
+
"type": {
|
|
890
|
+
"text": "number"
|
|
891
|
+
},
|
|
892
|
+
"privacy": "private",
|
|
893
|
+
"default": "-1",
|
|
894
|
+
"description": "Last known index resolved from real focusin events inside the trap.\nUsed as a fallback when assistive tech retargeting makes activeElement\ntemporarily unmappable during Tab navigation."
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
"kind": "field",
|
|
898
|
+
"name": "_pendingFocusTimer",
|
|
899
|
+
"type": {
|
|
900
|
+
"text": "ReturnType<typeof setTimeout> | null"
|
|
901
|
+
},
|
|
902
|
+
"privacy": "private",
|
|
903
|
+
"default": "null",
|
|
904
|
+
"description": "Timer ID for the focus call scheduled inside activate(). Cancelled by deactivate()\nto prevent focus firing after the trap has been torn down (fast open/close, unmount)."
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"kind": "field",
|
|
908
|
+
"name": "FOCUSABLE_SELECTORS",
|
|
909
|
+
"privacy": "private",
|
|
910
|
+
"static": true,
|
|
911
|
+
"readonly": true
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
"kind": "field",
|
|
915
|
+
"name": "NATIVE_FOCUSABLE_SELECTORS",
|
|
916
|
+
"privacy": "private",
|
|
917
|
+
"static": true,
|
|
918
|
+
"readonly": true
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"kind": "field",
|
|
922
|
+
"name": "MANAGED_HOST_SELECTORS",
|
|
923
|
+
"privacy": "private",
|
|
924
|
+
"static": true,
|
|
925
|
+
"readonly": true
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"kind": "field",
|
|
929
|
+
"name": "MANAGED_MENU_HOST_SELECTORS",
|
|
930
|
+
"privacy": "private",
|
|
931
|
+
"static": true,
|
|
932
|
+
"readonly": true
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"kind": "method",
|
|
936
|
+
"name": "getManagedHostAncestor",
|
|
937
|
+
"privacy": "private",
|
|
938
|
+
"static": true,
|
|
939
|
+
"return": {
|
|
940
|
+
"type": {
|
|
941
|
+
"text": "HTMLElement | null"
|
|
942
|
+
}
|
|
943
|
+
},
|
|
944
|
+
"parameters": [
|
|
945
|
+
{
|
|
946
|
+
"name": "element",
|
|
947
|
+
"type": {
|
|
948
|
+
"text": "HTMLElement"
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
]
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"kind": "method",
|
|
955
|
+
"name": "isInsideManagedHost",
|
|
956
|
+
"privacy": "private",
|
|
957
|
+
"static": true,
|
|
958
|
+
"return": {
|
|
959
|
+
"type": {
|
|
960
|
+
"text": "boolean"
|
|
961
|
+
}
|
|
962
|
+
},
|
|
963
|
+
"parameters": [
|
|
964
|
+
{
|
|
965
|
+
"name": "element",
|
|
966
|
+
"type": {
|
|
967
|
+
"text": "HTMLElement"
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
]
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"kind": "method",
|
|
974
|
+
"name": "getManagedMenuHostAncestor",
|
|
975
|
+
"privacy": "private",
|
|
976
|
+
"static": true,
|
|
977
|
+
"return": {
|
|
978
|
+
"type": {
|
|
979
|
+
"text": "HTMLElement | null"
|
|
980
|
+
}
|
|
981
|
+
},
|
|
982
|
+
"parameters": [
|
|
983
|
+
{
|
|
984
|
+
"name": "element",
|
|
985
|
+
"type": {
|
|
986
|
+
"text": "HTMLElement"
|
|
987
|
+
}
|
|
988
|
+
}
|
|
989
|
+
]
|
|
990
|
+
},
|
|
991
|
+
{
|
|
992
|
+
"kind": "method",
|
|
993
|
+
"name": "collectFocusableCandidates",
|
|
994
|
+
"privacy": "private",
|
|
995
|
+
"static": true,
|
|
996
|
+
"return": {
|
|
997
|
+
"type": {
|
|
998
|
+
"text": "void"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"parameters": [
|
|
1002
|
+
{
|
|
1003
|
+
"name": "root",
|
|
1004
|
+
"type": {
|
|
1005
|
+
"text": "ParentNode"
|
|
1006
|
+
}
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
"name": "candidates",
|
|
1010
|
+
"type": {
|
|
1011
|
+
"text": "HTMLElement[]"
|
|
1012
|
+
}
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"name": "trigger",
|
|
1016
|
+
"type": {
|
|
1017
|
+
"text": "HTMLElement | ShadowRoot | null"
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
{
|
|
1021
|
+
"name": "visited",
|
|
1022
|
+
"type": {
|
|
1023
|
+
"text": "Set<Node>"
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
]
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"kind": "method",
|
|
1030
|
+
"name": "getFirstFocusableInShadow",
|
|
1031
|
+
"privacy": "private",
|
|
1032
|
+
"static": true,
|
|
1033
|
+
"return": {
|
|
1034
|
+
"type": {
|
|
1035
|
+
"text": "HTMLElement | null"
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
"parameters": [
|
|
1039
|
+
{
|
|
1040
|
+
"name": "host",
|
|
1041
|
+
"type": {
|
|
1042
|
+
"text": "HTMLElement"
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
]
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
"kind": "method",
|
|
1049
|
+
"name": "focusCandidate",
|
|
1050
|
+
"privacy": "private",
|
|
1051
|
+
"static": true,
|
|
1052
|
+
"return": {
|
|
1053
|
+
"type": {
|
|
1054
|
+
"text": "void"
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
"parameters": [
|
|
1058
|
+
{
|
|
1059
|
+
"name": "target",
|
|
1060
|
+
"type": {
|
|
1061
|
+
"text": "HTMLElement | undefined"
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
]
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"kind": "method",
|
|
1068
|
+
"name": "isFocusable",
|
|
1069
|
+
"privacy": "private",
|
|
1070
|
+
"static": true,
|
|
1071
|
+
"return": {
|
|
1072
|
+
"type": {
|
|
1073
|
+
"text": "boolean"
|
|
1074
|
+
}
|
|
1075
|
+
},
|
|
1076
|
+
"parameters": [
|
|
1077
|
+
{
|
|
1078
|
+
"name": "el",
|
|
1079
|
+
"type": {
|
|
1080
|
+
"text": "HTMLElement"
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
],
|
|
1084
|
+
"description": "Verifica se un elemento è effettivamente focusabile e tabbabile.\nElementi con tabindex=\"-1\" sono focusabili programmaticamente ma non tabbabili."
|
|
1085
|
+
},
|
|
1086
|
+
{
|
|
1087
|
+
"kind": "method",
|
|
1088
|
+
"name": "hostConnected"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"kind": "method",
|
|
1092
|
+
"name": "hostDisconnected"
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"kind": "field",
|
|
1096
|
+
"name": "isActive",
|
|
1097
|
+
"type": {
|
|
1098
|
+
"text": "boolean"
|
|
1099
|
+
},
|
|
1100
|
+
"readonly": true
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
"kind": "method",
|
|
1104
|
+
"name": "activate",
|
|
1105
|
+
"return": {
|
|
1106
|
+
"type": {
|
|
1107
|
+
"text": "void"
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"kind": "method",
|
|
1113
|
+
"name": "deactivate",
|
|
1114
|
+
"return": {
|
|
1115
|
+
"type": {
|
|
1116
|
+
"text": "void"
|
|
1117
|
+
}
|
|
1118
|
+
},
|
|
1119
|
+
"parameters": [
|
|
1120
|
+
{
|
|
1121
|
+
"name": "options",
|
|
1122
|
+
"optional": true,
|
|
1123
|
+
"type": {
|
|
1124
|
+
"text": "{ skipFocusRestore?: boolean }"
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
]
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"kind": "method",
|
|
1131
|
+
"name": "updateFocusableElements",
|
|
1132
|
+
"return": {
|
|
1133
|
+
"type": {
|
|
1134
|
+
"text": "void"
|
|
1135
|
+
}
|
|
1136
|
+
},
|
|
1137
|
+
"description": "Aggiorna la lista degli elementi focusabili.\nChiamare dopo modifiche al DOM."
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
"kind": "method",
|
|
1141
|
+
"name": "focusFirst",
|
|
1142
|
+
"return": {
|
|
1143
|
+
"type": {
|
|
1144
|
+
"text": "void"
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
"description": "Sposta il focus sul primo elemento focusabile"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"kind": "method",
|
|
1151
|
+
"name": "focusLast",
|
|
1152
|
+
"return": {
|
|
1153
|
+
"type": {
|
|
1154
|
+
"text": "void"
|
|
1155
|
+
}
|
|
1156
|
+
},
|
|
1157
|
+
"description": "Sposta il focus sull'ultimo elemento focusabile"
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
"kind": "method",
|
|
1161
|
+
"name": "getActiveElement",
|
|
1162
|
+
"static": true,
|
|
1163
|
+
"return": {
|
|
1164
|
+
"type": {
|
|
1165
|
+
"text": "HTMLElement | null"
|
|
1166
|
+
}
|
|
1167
|
+
},
|
|
1168
|
+
"description": "Ritorna l'elemento attivo corrente, attraversando shadow DOM e slot"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"kind": "field",
|
|
1172
|
+
"name": "_handleKeyDown",
|
|
1173
|
+
"privacy": "private"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
"kind": "field",
|
|
1177
|
+
"name": "_handleFocusIn",
|
|
1178
|
+
"privacy": "private"
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
"kind": "method",
|
|
1182
|
+
"name": "_handleTab",
|
|
1183
|
+
"privacy": "private",
|
|
1184
|
+
"return": {
|
|
1185
|
+
"type": {
|
|
1186
|
+
"text": "void"
|
|
1187
|
+
}
|
|
1188
|
+
},
|
|
1189
|
+
"parameters": [
|
|
1190
|
+
{
|
|
1191
|
+
"name": "event",
|
|
1192
|
+
"type": {
|
|
1193
|
+
"text": "KeyboardEvent"
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
]
|
|
1197
|
+
},
|
|
1198
|
+
{
|
|
1199
|
+
"kind": "method",
|
|
1200
|
+
"name": "_restoreFocus",
|
|
1201
|
+
"privacy": "private",
|
|
1202
|
+
"return": {
|
|
1203
|
+
"type": {
|
|
1204
|
+
"text": "void"
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
]
|
|
1209
|
+
}
|
|
1210
|
+
],
|
|
1211
|
+
"exports": [
|
|
1212
|
+
{
|
|
1213
|
+
"kind": "js",
|
|
1214
|
+
"name": "FocusTrapController",
|
|
1215
|
+
"declaration": {
|
|
1216
|
+
"name": "FocusTrapController",
|
|
1217
|
+
"module": "src/controllers/focus-trap-controller.ts"
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
]
|
|
1221
|
+
},
|
|
738
1222
|
{
|
|
739
1223
|
"kind": "javascript-module",
|
|
740
1224
|
"path": "src/controllers/roving-tabindex-controller.ts",
|
|
@@ -757,10 +1241,10 @@
|
|
|
757
1241
|
"kind": "field",
|
|
758
1242
|
"name": "config",
|
|
759
1243
|
"type": {
|
|
760
|
-
"text": "RovingTabindexConfig<T> & {\n wrap: boolean;\n direction: 'horizontal' | 'vertical' | 'both';\n selectOnFocus: boolean;\n skipItem: (item: T) => boolean;\n }"
|
|
1244
|
+
"text": "RovingTabindexConfig<T> & {\n wrap: boolean;\n direction: 'horizontal' | 'vertical' | 'both' | (() => 'horizontal' | 'vertical' | 'both');\n selectOnFocus: boolean;\n selectOnHomeEnd: boolean;\n skipItem: (item: T) => boolean;\n }"
|
|
761
1245
|
},
|
|
762
1246
|
"privacy": "private",
|
|
763
|
-
"default": "{ wrap: true, direction: 'both', selectOnFocus: false, skipItem: (item) => item.hasAttribute('disabled') || (item as any).disabled === true, ...config, }"
|
|
1247
|
+
"default": "{ wrap: true, direction: 'both', selectOnFocus: false, selectOnHomeEnd: false, skipItem: (item) => item.hasAttribute('disabled') || (item as any).disabled === true, ...config, }"
|
|
764
1248
|
},
|
|
765
1249
|
{
|
|
766
1250
|
"kind": "method",
|
|
@@ -1125,6 +1609,16 @@
|
|
|
1125
1609
|
"attribute": "required",
|
|
1126
1610
|
"reflects": true
|
|
1127
1611
|
},
|
|
1612
|
+
{
|
|
1613
|
+
"kind": "field",
|
|
1614
|
+
"name": "isInGroup",
|
|
1615
|
+
"type": {
|
|
1616
|
+
"text": "boolean"
|
|
1617
|
+
},
|
|
1618
|
+
"privacy": "protected",
|
|
1619
|
+
"default": "false",
|
|
1620
|
+
"attribute": "isInGroup"
|
|
1621
|
+
},
|
|
1128
1622
|
{
|
|
1129
1623
|
"kind": "field",
|
|
1130
1624
|
"name": "validity",
|
|
@@ -1146,24 +1640,24 @@
|
|
|
1146
1640
|
},
|
|
1147
1641
|
{
|
|
1148
1642
|
"kind": "method",
|
|
1149
|
-
"name": "
|
|
1643
|
+
"name": "getForm",
|
|
1150
1644
|
"privacy": "public",
|
|
1151
1645
|
"return": {
|
|
1152
1646
|
"type": {
|
|
1153
|
-
"text": "
|
|
1647
|
+
"text": "HTMLFormElement | null"
|
|
1154
1648
|
}
|
|
1155
|
-
}
|
|
1649
|
+
},
|
|
1650
|
+
"description": "Gets the associated form, if one exists."
|
|
1156
1651
|
},
|
|
1157
1652
|
{
|
|
1158
1653
|
"kind": "method",
|
|
1159
|
-
"name": "
|
|
1654
|
+
"name": "checkValidity",
|
|
1160
1655
|
"privacy": "public",
|
|
1161
1656
|
"return": {
|
|
1162
1657
|
"type": {
|
|
1163
|
-
"text": "
|
|
1658
|
+
"text": "boolean"
|
|
1164
1659
|
}
|
|
1165
|
-
}
|
|
1166
|
-
"description": "Gets the associated form, if one exists."
|
|
1660
|
+
}
|
|
1167
1661
|
},
|
|
1168
1662
|
{
|
|
1169
1663
|
"kind": "method",
|
|
@@ -1426,6 +1920,14 @@
|
|
|
1426
1920
|
"default": "false",
|
|
1427
1921
|
"description": "If the input is required.",
|
|
1428
1922
|
"fieldName": "required"
|
|
1923
|
+
},
|
|
1924
|
+
{
|
|
1925
|
+
"name": "isInGroup",
|
|
1926
|
+
"type": {
|
|
1927
|
+
"text": "boolean"
|
|
1928
|
+
},
|
|
1929
|
+
"default": "false",
|
|
1930
|
+
"fieldName": "isInGroup"
|
|
1429
1931
|
}
|
|
1430
1932
|
],
|
|
1431
1933
|
"superclass": {
|
|
@@ -1484,6 +1986,14 @@
|
|
|
1484
1986
|
},
|
|
1485
1987
|
"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
1988
|
},
|
|
1989
|
+
{
|
|
1990
|
+
"kind": "field",
|
|
1991
|
+
"name": "submittedOnce",
|
|
1992
|
+
"type": {
|
|
1993
|
+
"text": "boolean"
|
|
1994
|
+
},
|
|
1995
|
+
"default": "false"
|
|
1996
|
+
},
|
|
1487
1997
|
{
|
|
1488
1998
|
"kind": "method",
|
|
1489
1999
|
"name": "hostConnected"
|
|
@@ -1630,6 +2140,10 @@
|
|
|
1630
2140
|
],
|
|
1631
2141
|
"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
2142
|
},
|
|
2143
|
+
{
|
|
2144
|
+
"kind": "method",
|
|
2145
|
+
"name": "userInteracted"
|
|
2146
|
+
},
|
|
1633
2147
|
{
|
|
1634
2148
|
"kind": "method",
|
|
1635
2149
|
"name": "updateValidity",
|
|
@@ -2070,7 +2584,7 @@
|
|
|
2070
2584
|
"type": {
|
|
2071
2585
|
"text": "DefaultTranslation"
|
|
2072
2586
|
},
|
|
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.', }"
|
|
2587
|
+
"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.', }"
|
|
2074
2588
|
}
|
|
2075
2589
|
],
|
|
2076
2590
|
"exports": [
|