@italia/globals 1.0.0-alpha.9 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/README.md +5 -67
  2. package/custom-elements.json +319 -3
  3. package/dist/src/base-component/base-component.d.ts +2 -0
  4. package/dist/src/base-component/base-component.d.ts.map +1 -1
  5. package/dist/src/base-component/base-component.js +20 -0
  6. package/dist/src/base-component/base-component.js.map +1 -1
  7. package/dist/src/controllers/aria-keyboard-list-controller.d.ts +0 -0
  8. package/dist/src/controllers/aria-keyboard-list-controller.d.ts.map +0 -0
  9. package/dist/src/controllers/aria-keyboard-list-controller.js +0 -0
  10. package/dist/src/controllers/aria-keyboard-list-controller.js.map +0 -0
  11. package/dist/src/controllers/focus-trap-controller.d.ts +16 -2
  12. package/dist/src/controllers/focus-trap-controller.d.ts.map +1 -1
  13. package/dist/src/controllers/focus-trap-controller.js +265 -22
  14. package/dist/src/controllers/focus-trap-controller.js.map +1 -1
  15. package/dist/src/directives/setAttributes.d.ts +0 -0
  16. package/dist/src/directives/setAttributes.d.ts.map +1 -1
  17. package/dist/src/directives/setAttributes.js +69 -3
  18. package/dist/src/directives/setAttributes.js.map +1 -1
  19. package/dist/src/form/form-control.d.ts +0 -0
  20. package/dist/src/form/form-control.d.ts.map +0 -0
  21. package/dist/src/form/form-control.js +1 -1
  22. package/dist/src/form/form-control.js.map +1 -1
  23. package/dist/src/form/form-controller.d.ts +0 -0
  24. package/dist/src/form/form-controller.d.ts.map +0 -0
  25. package/dist/src/form/form-controller.js +0 -0
  26. package/dist/src/form/form-controller.js.map +0 -0
  27. package/dist/src/index.d.ts +2 -0
  28. package/dist/src/index.d.ts.map +1 -1
  29. package/dist/src/index.js +3 -1
  30. package/dist/src/index.js.map +1 -1
  31. package/dist/src/stories/formControlReusableStories.d.ts +0 -0
  32. package/dist/src/stories/formControlReusableStories.d.ts.map +0 -0
  33. package/dist/src/stories/formControlReusableStories.js +0 -0
  34. package/dist/src/stories/formControlReusableStories.js.map +0 -0
  35. package/dist/src/stories/reusableUsageGuidelinesStories.d.ts +13 -0
  36. package/dist/src/stories/reusableUsageGuidelinesStories.d.ts.map +1 -0
  37. package/dist/src/stories/reusableUsageGuidelinesStories.js +39 -0
  38. package/dist/src/stories/reusableUsageGuidelinesStories.js.map +1 -0
  39. package/dist/src/utils/cookies.d.ts +0 -0
  40. package/dist/src/utils/cookies.d.ts.map +0 -0
  41. package/dist/src/utils/cookies.js +0 -0
  42. package/dist/src/utils/cookies.js.map +0 -0
  43. package/dist/src/utils/dispatch-cancelable.d.ts +31 -0
  44. package/dist/src/utils/dispatch-cancelable.d.ts.map +1 -0
  45. package/dist/src/utils/dispatch-cancelable.js +43 -0
  46. package/dist/src/utils/dispatch-cancelable.js.map +1 -0
  47. package/dist/src/utils/focus-fallback.d.ts +27 -0
  48. package/dist/src/utils/focus-fallback.d.ts.map +1 -0
  49. package/dist/src/utils/focus-fallback.js +63 -0
  50. package/dist/src/utils/focus-fallback.js.map +1 -0
  51. package/dist/src/utils/logger.d.ts +0 -0
  52. package/dist/src/utils/logger.d.ts.map +0 -0
  53. package/dist/src/utils/logger.js +0 -0
  54. package/dist/src/utils/logger.js.map +0 -0
  55. package/dist/src/utils/track-focus.d.ts +0 -0
  56. package/dist/src/utils/track-focus.d.ts.map +0 -0
  57. package/dist/src/utils/track-focus.js +0 -0
  58. package/dist/src/utils/track-focus.js.map +0 -0
  59. package/package.json +19 -19
package/README.md CHANGED
@@ -1,24 +1,18 @@
1
- # Globals
1
+ # `@italia/globals`
2
2
 
3
3
  This package contains extendable BaseComponent and BaseLocalizedComponent, utils and mixins, reusable in all web-components packages.
4
4
 
5
+ It is the foundation of all the Web Components in [`@italia/dev-kit-italia`](https://italia.github.io/dev-kit-italia).
6
+
5
7
  ## Installation
6
8
 
7
9
  ```bash
8
- npm i globals
9
- ```
10
-
11
- ## Usage
12
-
13
- ```html
14
- <script type="module">
15
- import '@italia/globals';
16
- </script>
10
+ npm i @italia/globals
17
11
  ```
18
12
 
19
13
  ### BaseComponent
20
14
 
21
- Base web-component
15
+ Web Component with basic functionality, used for all the components that don't required translation functionalities.
22
16
 
23
17
  Example:
24
18
 
@@ -71,59 +65,3 @@ export class MyElement extends BaseLocalizedComponent {
71
65
  }
72
66
  }
73
67
  ```
74
-
75
- ## Linting and formatting
76
-
77
- To scan the project for linting and formatting errors, run
78
-
79
- ```bash
80
- npm run lint
81
- ```
82
-
83
- To automatically fix linting and formatting errors, run
84
-
85
- ```bash
86
- npm run format
87
- ```
88
-
89
- ## Testing with Web Test Runner
90
-
91
- To execute a single test run:
92
-
93
- ```bash
94
- npm run test
95
- ```
96
-
97
- To run the tests in interactive watch mode run:
98
-
99
- ```bash
100
- npm run test:watch
101
- ```
102
-
103
- ## Demoing with Storybook
104
-
105
- To run a local instance of Storybook for your component, run
106
-
107
- ```bash
108
- npm run storybook
109
- ```
110
-
111
- To build a production version of Storybook, run
112
-
113
- ```bash
114
- npm run storybook:build
115
- ```
116
-
117
- ## Tooling configs
118
-
119
- For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
120
-
121
- If you customize the configuration a lot, you can consider moving them to individual files.
122
-
123
- ## Local Demo with `web-dev-server`
124
-
125
- ```bash
126
- npm start
127
- ```
128
-
129
- To run a local development server that serves the basic demo located in `demo/index.html`
@@ -167,6 +167,30 @@
167
167
  "module": "./utils/cookies.js"
168
168
  }
169
169
  },
170
+ {
171
+ "kind": "js",
172
+ "name": "dispatchCancelable",
173
+ "declaration": {
174
+ "name": "dispatchCancelable",
175
+ "module": "./utils/dispatch-cancelable.js"
176
+ }
177
+ },
178
+ {
179
+ "kind": "js",
180
+ "name": "focusableFallbackAncestor",
181
+ "declaration": {
182
+ "name": "focusableFallbackAncestor",
183
+ "module": "./utils/focus-fallback.js"
184
+ }
185
+ },
186
+ {
187
+ "kind": "js",
188
+ "name": "nearestFocusableInDocument",
189
+ "declaration": {
190
+ "name": "nearestFocusableInDocument",
191
+ "module": "./utils/focus-fallback.js"
192
+ }
193
+ },
170
194
  {
171
195
  "kind": "js",
172
196
  "name": "WindowManager",
@@ -423,6 +447,14 @@
423
447
  },
424
448
  "privacy": "protected"
425
449
  },
450
+ {
451
+ "kind": "field",
452
+ "name": "ariaAttributesObserver",
453
+ "type": {
454
+ "text": "MutationObserver | undefined"
455
+ },
456
+ "privacy": "protected"
457
+ },
426
458
  {
427
459
  "kind": "field",
428
460
  "name": "_ariaAttributes",
@@ -862,7 +894,7 @@
862
894
  "kind": "field",
863
895
  "name": "_focusableElements",
864
896
  "type": {
865
- "text": "any[]"
897
+ "text": "HTMLElement[]"
866
898
  },
867
899
  "privacy": "private",
868
900
  "default": "[]"
@@ -871,7 +903,7 @@
871
903
  "kind": "field",
872
904
  "name": "_first",
873
905
  "type": {
874
- "text": "any"
906
+ "text": "HTMLElement | undefined"
875
907
  },
876
908
  "privacy": "private"
877
909
  },
@@ -879,10 +911,20 @@
879
911
  "kind": "field",
880
912
  "name": "_last",
881
913
  "type": {
882
- "text": "any"
914
+ "text": "HTMLElement | undefined"
883
915
  },
884
916
  "privacy": "private"
885
917
  },
918
+ {
919
+ "kind": "field",
920
+ "name": "_lastKnownFocusIndex",
921
+ "type": {
922
+ "text": "number"
923
+ },
924
+ "privacy": "private",
925
+ "default": "-1",
926
+ "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."
927
+ },
886
928
  {
887
929
  "kind": "field",
888
930
  "name": "_pendingFocusTimer",
@@ -900,6 +942,159 @@
900
942
  "static": true,
901
943
  "readonly": true
902
944
  },
945
+ {
946
+ "kind": "field",
947
+ "name": "NATIVE_FOCUSABLE_SELECTORS",
948
+ "privacy": "private",
949
+ "static": true,
950
+ "readonly": true
951
+ },
952
+ {
953
+ "kind": "field",
954
+ "name": "MANAGED_HOST_SELECTORS",
955
+ "privacy": "private",
956
+ "static": true,
957
+ "readonly": true
958
+ },
959
+ {
960
+ "kind": "field",
961
+ "name": "MANAGED_MENU_HOST_SELECTORS",
962
+ "privacy": "private",
963
+ "static": true,
964
+ "readonly": true
965
+ },
966
+ {
967
+ "kind": "method",
968
+ "name": "getManagedHostAncestor",
969
+ "privacy": "private",
970
+ "static": true,
971
+ "return": {
972
+ "type": {
973
+ "text": "HTMLElement | null"
974
+ }
975
+ },
976
+ "parameters": [
977
+ {
978
+ "name": "element",
979
+ "type": {
980
+ "text": "HTMLElement"
981
+ }
982
+ }
983
+ ]
984
+ },
985
+ {
986
+ "kind": "method",
987
+ "name": "isInsideManagedHost",
988
+ "privacy": "private",
989
+ "static": true,
990
+ "return": {
991
+ "type": {
992
+ "text": "boolean"
993
+ }
994
+ },
995
+ "parameters": [
996
+ {
997
+ "name": "element",
998
+ "type": {
999
+ "text": "HTMLElement"
1000
+ }
1001
+ }
1002
+ ]
1003
+ },
1004
+ {
1005
+ "kind": "method",
1006
+ "name": "getManagedMenuHostAncestor",
1007
+ "privacy": "private",
1008
+ "static": true,
1009
+ "return": {
1010
+ "type": {
1011
+ "text": "HTMLElement | null"
1012
+ }
1013
+ },
1014
+ "parameters": [
1015
+ {
1016
+ "name": "element",
1017
+ "type": {
1018
+ "text": "HTMLElement"
1019
+ }
1020
+ }
1021
+ ]
1022
+ },
1023
+ {
1024
+ "kind": "method",
1025
+ "name": "collectFocusableCandidates",
1026
+ "privacy": "private",
1027
+ "static": true,
1028
+ "return": {
1029
+ "type": {
1030
+ "text": "void"
1031
+ }
1032
+ },
1033
+ "parameters": [
1034
+ {
1035
+ "name": "root",
1036
+ "type": {
1037
+ "text": "ParentNode"
1038
+ }
1039
+ },
1040
+ {
1041
+ "name": "candidates",
1042
+ "type": {
1043
+ "text": "HTMLElement[]"
1044
+ }
1045
+ },
1046
+ {
1047
+ "name": "trigger",
1048
+ "type": {
1049
+ "text": "HTMLElement | ShadowRoot | null"
1050
+ }
1051
+ },
1052
+ {
1053
+ "name": "visited",
1054
+ "type": {
1055
+ "text": "Set<Node>"
1056
+ }
1057
+ }
1058
+ ]
1059
+ },
1060
+ {
1061
+ "kind": "method",
1062
+ "name": "getFirstFocusableInShadow",
1063
+ "privacy": "private",
1064
+ "static": true,
1065
+ "return": {
1066
+ "type": {
1067
+ "text": "HTMLElement | null"
1068
+ }
1069
+ },
1070
+ "parameters": [
1071
+ {
1072
+ "name": "host",
1073
+ "type": {
1074
+ "text": "HTMLElement"
1075
+ }
1076
+ }
1077
+ ]
1078
+ },
1079
+ {
1080
+ "kind": "method",
1081
+ "name": "focusCandidate",
1082
+ "privacy": "private",
1083
+ "static": true,
1084
+ "return": {
1085
+ "type": {
1086
+ "text": "void"
1087
+ }
1088
+ },
1089
+ "parameters": [
1090
+ {
1091
+ "name": "target",
1092
+ "type": {
1093
+ "text": "HTMLElement | undefined"
1094
+ }
1095
+ }
1096
+ ]
1097
+ },
903
1098
  {
904
1099
  "kind": "method",
905
1100
  "name": "isFocusable",
@@ -1009,6 +1204,11 @@
1009
1204
  "name": "_handleKeyDown",
1010
1205
  "privacy": "private"
1011
1206
  },
1207
+ {
1208
+ "kind": "field",
1209
+ "name": "_handleFocusIn",
1210
+ "privacy": "private"
1211
+ },
1012
1212
  {
1013
1213
  "kind": "method",
1014
1214
  "name": "_handleTab",
@@ -2268,6 +2468,122 @@
2268
2468
  }
2269
2469
  ]
2270
2470
  },
2471
+ {
2472
+ "kind": "javascript-module",
2473
+ "path": "src/utils/dispatch-cancelable.ts",
2474
+ "declarations": [
2475
+ {
2476
+ "kind": "function",
2477
+ "name": "dispatchCancelable",
2478
+ "return": {
2479
+ "type": {
2480
+ "text": ""
2481
+ }
2482
+ },
2483
+ "parameters": [
2484
+ {
2485
+ "name": "host",
2486
+ "type": {
2487
+ "text": "HTMLElement"
2488
+ },
2489
+ "description": "the element dispatching the event"
2490
+ },
2491
+ {
2492
+ "name": "name",
2493
+ "type": {
2494
+ "text": "string"
2495
+ },
2496
+ "description": "the event name (kebab-case, `it-` prefixed)"
2497
+ },
2498
+ {
2499
+ "name": "detail",
2500
+ "type": {
2501
+ "text": "T"
2502
+ },
2503
+ "description": "the event `detail` payload"
2504
+ },
2505
+ {
2506
+ "name": "defaultAction",
2507
+ "type": {
2508
+ "text": "() => void"
2509
+ },
2510
+ "description": "the behavior executed when the event is not prevented"
2511
+ }
2512
+ ],
2513
+ "description": "Dispatches a cancelable custom event and runs the provided default action\nonly if the consumer did not call `event.preventDefault()`.\n\nThis is the shared convention used across components (Tabs, Modal, Chip, Alert,\nForward, Back) to provide a sensible default JavaScript behavior out of the box\nwhile letting consumers intercept and override it. Notification deliberately does\nNOT use this: its show/close are always caller-initiated (no default markup-driven\ntrigger to override), so there was no real use case for blocking them — see\nit-notification.ts for the plain (non-cancelable) events it fires instead.\n\n```js\nel.addEventListener('it-alert-close', (e) => {\n e.preventDefault(); // block the default removal\n fetchConfirmation().then((ok) => { // async logic runs after prevention\n if (ok) e.target.close();\n });\n});\n```\n\nNote: `preventDefault()` must be called synchronously inside the listener.\nAsync code can run afterward; call the component's public method when ready."
2514
+ }
2515
+ ],
2516
+ "exports": [
2517
+ {
2518
+ "kind": "js",
2519
+ "name": "dispatchCancelable",
2520
+ "declaration": {
2521
+ "name": "dispatchCancelable",
2522
+ "module": "src/utils/dispatch-cancelable.ts"
2523
+ }
2524
+ }
2525
+ ]
2526
+ },
2527
+ {
2528
+ "kind": "javascript-module",
2529
+ "path": "src/utils/focus-fallback.ts",
2530
+ "declarations": [
2531
+ {
2532
+ "kind": "function",
2533
+ "name": "focusableFallbackAncestor",
2534
+ "return": {
2535
+ "type": {
2536
+ "text": "HTMLElement | null"
2537
+ }
2538
+ },
2539
+ "parameters": [
2540
+ {
2541
+ "name": "el",
2542
+ "type": {
2543
+ "text": "HTMLElement"
2544
+ }
2545
+ }
2546
+ ],
2547
+ "description": "Returns the nearest focusable ancestor of `el` by walking up parentElement.\nUsed as the last-resort fallback when a self-removing component (chip, alert)\nhas no adjacent sibling of the same type to shift focus to.\n\n\"Focusable ancestor\" means an element with tabindex >= 0. The container that\nwraps a chip group or alert list is the expected target; authors following the\nWAI-ARIA pattern should give it tabindex=\"0\"."
2548
+ },
2549
+ {
2550
+ "kind": "function",
2551
+ "name": "nearestFocusableInDocument",
2552
+ "return": {
2553
+ "type": {
2554
+ "text": "HTMLElement | null"
2555
+ }
2556
+ },
2557
+ "parameters": [
2558
+ {
2559
+ "name": "el",
2560
+ "type": {
2561
+ "text": "HTMLElement"
2562
+ }
2563
+ }
2564
+ ],
2565
+ "description": "True last-resort fallback for when a self-removing component (alert, chip,\nnotification) has neither an adjacent sibling of the same type nor a\n`focusableFallbackAncestor` (i.e. no author-provided `tabindex=\"0\"` wrapper) —\nthe common case in practice, since most real usages don't add that wrapper.\nWithout this, focus silently drops to `<body>` with no way for a keyboard/AT\nuser to tell where they ended up.\n\nFinds the closest focusable element to `el` anywhere in the document, walking\noutward in document order: the nearest one that comes before `el` (closer to\nwhere the user's attention already was), falling back to the nearest one after.\nThis is a coarse, page-wide search — it may land focus on something not\nvisually adjacent — but it is deterministic and strictly better than silently\nlosing focus."
2566
+ }
2567
+ ],
2568
+ "exports": [
2569
+ {
2570
+ "kind": "js",
2571
+ "name": "focusableFallbackAncestor",
2572
+ "declaration": {
2573
+ "name": "focusableFallbackAncestor",
2574
+ "module": "src/utils/focus-fallback.ts"
2575
+ }
2576
+ },
2577
+ {
2578
+ "kind": "js",
2579
+ "name": "nearestFocusableInDocument",
2580
+ "declaration": {
2581
+ "name": "nearestFocusableInDocument",
2582
+ "module": "src/utils/focus-fallback.ts"
2583
+ }
2584
+ }
2585
+ ]
2586
+ },
2271
2587
  {
2272
2588
  "kind": "javascript-module",
2273
2589
  "path": "src/utils/logger.ts",
@@ -15,6 +15,7 @@ export declare class BaseComponent extends LitElement {
15
15
  protected logger: Logger;
16
16
  protected composeClass: typeof clsx;
17
17
  protected _id?: string;
18
+ protected ariaAttributesObserver?: MutationObserver;
18
19
  constructor();
19
20
  protected get _ariaAttributes(): Record<string, string>;
20
21
  generateId(prefix: string): string;
@@ -23,6 +24,7 @@ export declare class BaseComponent extends LitElement {
23
24
  get focusElement(): HTMLElement | null;
24
25
  protected get prefersReducedMotion(): boolean;
25
26
  connectedCallback(): void;
27
+ disconnectedCallback(): void;
26
28
  }
27
29
  export declare const BaseLocalizedComponent: (new (...args: any[]) => {
28
30
  localize: import("@italia/i18n").LocalizeController;
@@ -1 +1 @@
1
- {"version":3,"file":"base-component.d.ts","sourceRoot":"","sources":["../../../src/base-component/base-component.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAI5C,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IACrC,YAAY,EAAE,OAAO,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,UAAU,GAAG,WAAW,CAAC,sBAAsB,CAAC,CAAC;AAExF;;;GAGG;AAEH,qBAAa,aAAc,SAAQ,UAAU;IAC3C,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzB,SAAS,CAAC,YAAY,cAAQ;IAE9B,SAAS,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;;IAOvB,SAAS,KAAK,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUtD;IAGD,UAAU,CAAC,MAAM,EAAE,MAAM;IAKzB,QAAQ,CAAC,OAAO,EAAE,WAAW;IAK7B,SAAS,CAAC,gBAAgB,CAAC,CAAC,SAAS,WAAW,KAAK,CAAC,GAAG,IAAI;IAQ7D,IAAI,YAAY,IAAI,WAAW,GAAG,IAAI,CAErC;IAGD,SAAS,KAAK,oBAAoB,IAAI,OAAO,CAE5C;IAED,iBAAiB;CAOlB;AAED,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oD,GAAG;WAAgD,GAAG;;gBAA6E,GAAG;;;;;;;WAA4V,GAAG;YAAiD,GAAG;;;;;;;;;;;oBAAupC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAiiO,CAAC;cAA6F,CAAC;eAA8F,CAAC;gBAA+F,CAAC;;;;;;;;;;;;;;SAAulC,CAAC;;;iBAA+E,CAAC;yBADjyrB,CAAC"}
@@ -52,6 +52,26 @@ export class BaseComponent extends LitElement {
52
52
  // generate internal _id
53
53
  const prefix = this.id?.length > 0 ? this.id : this.tagName.toLowerCase();
54
54
  this._id = this.generateId(prefix);
55
+ this.ariaAttributesObserver = new MutationObserver((mutations) => {
56
+ const shouldUpdate = mutations.some((mutation) => {
57
+ if (mutation.type !== 'attributes' || !mutation.attributeName) {
58
+ return false;
59
+ }
60
+ return mutation.attributeName === 'it-role' || mutation.attributeName.startsWith('it-aria-');
61
+ });
62
+ if (shouldUpdate) {
63
+ this.requestUpdate();
64
+ }
65
+ });
66
+ this.ariaAttributesObserver.observe(this, {
67
+ attributes: true,
68
+ attributeOldValue: true,
69
+ });
70
+ }
71
+ disconnectedCallback() {
72
+ this.ariaAttributesObserver?.disconnect();
73
+ this.ariaAttributesObserver = undefined;
74
+ super.disconnectedCallback();
55
75
  }
56
76
  }
57
77
  export const BaseLocalizedComponent = LocalizeMixin(BaseComponent);
@@ -1 +1 @@
1
- {"version":3,"file":"base-component.js","sourceRoot":"","sources":["../../../src/base-component/base-component.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAW5C;;;GAGG;AAEH,MAAM,OAAO,aAAc,SAA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;IACd,CAAC;IAED,kDAAkD;IAClD,IAAc,oBAAoB;QAChC,OAAO,MAAM,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC,OAAO,CAAC;IACvE,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,wBAAwB;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAC1E,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACrC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import clsx from 'clsx';\nimport { LitElement } from 'lit';\nimport { LocalizeMixin } from '@italia/i18n';\nimport { Constructor } from '../index.js';\nimport { Logger } from '../utils/logger.js';\n\n// import TrackFocus from '../utils/track-focus.js';\n\nexport interface BaseComponentInterface {\n addFocus(element: HTMLElement): void;\n composeClass: typeof clsx;\n}\n\nexport type BaseComponentType = typeof LitElement & Constructor<BaseComponentInterface>;\n\n/**\n * Factory function per creare una base class estendibile\n * con stili personalizzati.\n */\n\nexport class BaseComponent extends LitElement {\n protected logger: Logger;\n\n protected composeClass = clsx;\n\n protected _id?: string; // id interno del componente, da usare sui veri elementi HTML\n\n constructor() {\n super();\n this.logger = new Logger(this.tagName.toLowerCase());\n }\n\n protected get _ariaAttributes(): Record<string, string> {\n const attributes: Record<string, string> = {};\n for (const attr of this.getAttributeNames()) {\n if (attr === 'it-role') {\n attributes.role = this.getAttribute(attr)!;\n } else if (attr.startsWith('it-aria-')) {\n attributes[attr.replace(/^it-/, '')] = this.getAttribute(attr)!;\n }\n }\n return attributes;\n }\n\n // eslint-disable-next-line class-methods-use-this\n generateId(prefix: string) {\n return `${prefix}-${Math.random().toString(36).slice(2)}`;\n }\n\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n addFocus(element: HTMLElement) {\n // new TrackFocus(element); // per il momento è stato disattivato perchè ci sono le pseudo classi ::focus-visible per fare quello che fa TrackFocus. Si possono aggiungere regole css in bsi-italia 3 dato che stiamo facendo una breaking release di bsi.\n }\n\n // eslint-disable-next-line class-methods-use-this\n protected getActiveElement<T extends HTMLElement>(): T | null {\n let active = document.activeElement;\n while (active && active.shadowRoot && active.shadowRoot.activeElement) {\n active = active.shadowRoot.activeElement;\n }\n return active as T | null;\n }\n\n get focusElement(): HTMLElement | null {\n return this;\n }\n\n // eslint-disable-next-line class-methods-use-this\n protected get prefersReducedMotion(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n // generate internal _id\n const prefix = this.id?.length > 0 ? this.id : this.tagName.toLowerCase();\n this._id = this.generateId(prefix);\n }\n}\n\nexport const BaseLocalizedComponent = LocalizeMixin(BaseComponent);\n"]}
1
+ {"version":3,"file":"base-component.js","sourceRoot":"","sources":["../../../src/base-component/base-component.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAW5C;;;GAGG;AAEH,MAAM,OAAO,aAAc,SAAQ,UAAU;IAS3C;QACE,KAAK,EAAE,CAAC;QAPA,iBAAY,GAAG,IAAI,CAAC;QAQ5B,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;IACvD,CAAC;IAED,IAAc,eAAe;QAC3B,MAAM,UAAU,GAA2B,EAAE,CAAC;QAC9C,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,iBAA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CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;QAC1E,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAEnC,IAAI,CAAC,sBAAsB,GAAG,IAAI,gBAAgB,CAAC,CAAC,SAAS,EAAE,EAAE;YAC/D,MAAM,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC/C,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;oBAC9D,OAAO,KAAK,CAAC;gBACf,CAAC;gBAED,OAAO,QAAQ,CAAC,aAAa,KAAK,SAAS,IAAI,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;YAC/F,CAAC,CAAC,CAAC;YAEH,IAAI,YAAY,EAAE,CAAC;gBACjB,IAAI,CAAC,aAAa,EAAE,CAAC;YACvB,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,sBAAsB,CAAC,OAAO,CAAC,IAAI,EAAE;YACxC,UAAU,EAAE,IAAI;YAChB,iBAAiB,EAAE,IAAI;SACxB,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,sBAAsB,EAAE,UAAU,EAAE,CAAC;QAC1C,IAAI,CAAC,sBAAsB,GAAG,SAAS,CAAC;QACxC,KAAK,CAAC,oBAAoB,EAAE,CAAC;IAC/B,CAAC;CACF;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAC,aAAa,CAAC,CAAC","sourcesContent":["import clsx from 'clsx';\nimport { LitElement } from 'lit';\nimport { LocalizeMixin } from '@italia/i18n';\nimport { Constructor } from '../index.js';\nimport { Logger } from '../utils/logger.js';\n\n// import TrackFocus from '../utils/track-focus.js';\n\nexport interface BaseComponentInterface {\n addFocus(element: HTMLElement): void;\n composeClass: typeof clsx;\n}\n\nexport type BaseComponentType = typeof LitElement & Constructor<BaseComponentInterface>;\n\n/**\n * Factory function per creare una base class estendibile\n * con stili personalizzati.\n */\n\nexport class BaseComponent extends LitElement {\n protected logger: Logger;\n\n protected composeClass = clsx;\n\n protected _id?: string; // id interno del componente, da usare sui veri elementi HTML\n\n protected ariaAttributesObserver?: MutationObserver;\n\n constructor() {\n super();\n this.logger = new Logger(this.tagName.toLowerCase());\n }\n\n protected get _ariaAttributes(): Record<string, string> {\n const attributes: Record<string, string> = {};\n for (const attr of this.getAttributeNames()) {\n if (attr === 'it-role') {\n attributes.role = this.getAttribute(attr)!;\n } else if (attr.startsWith('it-aria-')) {\n attributes[attr.replace(/^it-/, '')] = this.getAttribute(attr)!;\n }\n }\n return attributes;\n }\n\n // eslint-disable-next-line class-methods-use-this\n generateId(prefix: string) {\n return `${prefix}-${Math.random().toString(36).slice(2)}`;\n }\n\n // eslint-disable-next-line class-methods-use-this, @typescript-eslint/no-unused-vars\n addFocus(element: HTMLElement) {\n // new TrackFocus(element); // per il momento è stato disattivato perchè ci sono le pseudo classi ::focus-visible per fare quello che fa TrackFocus. Si possono aggiungere regole css in bsi-italia 3 dato che stiamo facendo una breaking release di bsi.\n }\n\n // eslint-disable-next-line class-methods-use-this\n protected getActiveElement<T extends HTMLElement>(): T | null {\n let active = document.activeElement;\n while (active && active.shadowRoot && active.shadowRoot.activeElement) {\n active = active.shadowRoot.activeElement;\n }\n return active as T | null;\n }\n\n get focusElement(): HTMLElement | null {\n return this;\n }\n\n // eslint-disable-next-line class-methods-use-this\n protected get prefersReducedMotion(): boolean {\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n // generate internal _id\n const prefix = this.id?.length > 0 ? this.id : this.tagName.toLowerCase();\n this._id = this.generateId(prefix);\n\n this.ariaAttributesObserver = new MutationObserver((mutations) => {\n const shouldUpdate = mutations.some((mutation) => {\n if (mutation.type !== 'attributes' || !mutation.attributeName) {\n return false;\n }\n\n return mutation.attributeName === 'it-role' || mutation.attributeName.startsWith('it-aria-');\n });\n\n if (shouldUpdate) {\n this.requestUpdate();\n }\n });\n\n this.ariaAttributesObserver.observe(this, {\n attributes: true,\n attributeOldValue: true,\n });\n }\n\n disconnectedCallback() {\n this.ariaAttributesObserver?.disconnect();\n this.ariaAttributesObserver = undefined;\n super.disconnectedCallback();\n }\n}\n\nexport const BaseLocalizedComponent = LocalizeMixin(BaseComponent);\n"]}
@@ -41,12 +41,25 @@ export declare class FocusTrapController implements ReactiveController {
41
41
  private _isActive;
42
42
  private _previousActiveElement;
43
43
  private _focusableElements;
44
- private _first;
45
- private _last;
44
+ private _first?;
45
+ private _last?;
46
+ /** Last known index resolved from real focusin events inside the trap.
47
+ * Used as a fallback when assistive tech retargeting makes activeElement
48
+ * temporarily unmappable during Tab navigation. */
49
+ private _lastKnownFocusIndex;
46
50
  /** Timer ID for the focus call scheduled inside activate(). Cancelled by deactivate()
47
51
  * to prevent focus firing after the trap has been torn down (fast open/close, unmount). */
48
52
  private _pendingFocusTimer;
49
53
  private static readonly FOCUSABLE_SELECTORS;
54
+ private static readonly NATIVE_FOCUSABLE_SELECTORS;
55
+ private static readonly MANAGED_HOST_SELECTORS;
56
+ private static readonly MANAGED_MENU_HOST_SELECTORS;
57
+ private static getManagedHostAncestor;
58
+ private static isInsideManagedHost;
59
+ private static getManagedMenuHostAncestor;
60
+ private static collectFocusableCandidates;
61
+ private static getFirstFocusableInShadow;
62
+ private static focusCandidate;
50
63
  /**
51
64
  * Verifica se un elemento è effettivamente focusabile e tabbabile.
52
65
  * Elementi con tabindex="-1" sono focusabili programmaticamente ma non tabbabili.
@@ -72,6 +85,7 @@ export declare class FocusTrapController implements ReactiveController {
72
85
  /** Ritorna l'elemento attivo corrente, attraversando shadow DOM e slot */
73
86
  static getActiveElement(): HTMLElement | null;
74
87
  private _handleKeyDown;
88
+ private _handleFocusIn;
75
89
  private _handleTab;
76
90
  private _restoreFocus;
77
91
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