@aurodesignsystem/auro-formkit 5.9.4 → 5.11.0

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 (93) hide show
  1. package/CHANGELOG.md +62 -2
  2. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +16 -0
  3. package/components/bibtemplate/dist/buttonVersion.d.ts +1 -1
  4. package/components/bibtemplate/dist/headerVersion.d.ts +1 -1
  5. package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
  6. package/components/bibtemplate/dist/index.js +38 -16
  7. package/components/bibtemplate/dist/registered.js +38 -16
  8. package/components/checkbox/demo/api.md +7 -0
  9. package/components/checkbox/demo/api.min.js +19 -16
  10. package/components/checkbox/demo/index.min.js +19 -16
  11. package/components/checkbox/dist/auro-checkbox-group.d.ts +4 -3
  12. package/components/checkbox/dist/auro-checkbox.d.ts +2 -0
  13. package/components/checkbox/dist/index.js +10 -7
  14. package/components/checkbox/dist/registered.js +10 -7
  15. package/components/combobox/demo/api.js +2 -2
  16. package/components/combobox/demo/api.md +80 -0
  17. package/components/combobox/demo/api.min.js +1676 -645
  18. package/components/combobox/demo/index.min.js +1657 -640
  19. package/components/combobox/dist/auro-combobox.d.ts +25 -2
  20. package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +6 -0
  21. package/components/combobox/dist/index.js +1500 -501
  22. package/components/combobox/dist/registered.js +1500 -501
  23. package/components/counter/demo/api.min.js +1014 -427
  24. package/components/counter/demo/index.min.js +1014 -427
  25. package/components/counter/dist/auro-counter-button.d.ts +11 -2
  26. package/components/counter/dist/auro-counter.d.ts +8 -0
  27. package/components/counter/dist/buttonVersion.d.ts +1 -1
  28. package/components/counter/dist/iconVersion.d.ts +1 -1
  29. package/components/counter/dist/index.js +972 -389
  30. package/components/counter/dist/registered.js +972 -389
  31. package/components/datepicker/demo/api.md +110 -87
  32. package/components/datepicker/demo/api.min.js +1457 -665
  33. package/components/datepicker/demo/index.md +18 -12
  34. package/components/datepicker/demo/index.min.js +1457 -665
  35. package/components/datepicker/dist/auro-calendar.d.ts +6 -0
  36. package/components/datepicker/dist/auro-datepicker.d.ts +12 -2
  37. package/components/datepicker/dist/buttonVersion.d.ts +1 -1
  38. package/components/datepicker/dist/iconVersion.d.ts +1 -1
  39. package/components/datepicker/dist/index.js +1249 -461
  40. package/components/datepicker/dist/popoverVersion.d.ts +1 -1
  41. package/components/datepicker/dist/registered.js +1249 -461
  42. package/components/dropdown/demo/api.md +16 -18
  43. package/components/dropdown/demo/api.min.js +892 -378
  44. package/components/dropdown/demo/index.min.js +892 -378
  45. package/components/dropdown/dist/auro-dropdown.d.ts +27 -1
  46. package/components/dropdown/dist/auro-dropdownBib.d.ts +87 -0
  47. package/components/dropdown/dist/iconVersion.d.ts +1 -1
  48. package/components/dropdown/dist/index.js +862 -348
  49. package/components/dropdown/dist/keyboardUtils.d.ts +18 -0
  50. package/components/dropdown/dist/registered.js +862 -348
  51. package/components/form/README.md +47 -2
  52. package/components/form/demo/api.js +2 -0
  53. package/components/form/demo/api.md +303 -30
  54. package/components/form/demo/api.min.js +69263 -67
  55. package/components/form/demo/index.html +0 -1
  56. package/components/form/demo/index.js +1 -0
  57. package/components/form/demo/index.md +1 -275
  58. package/components/form/demo/index.min.js +69262 -67
  59. package/components/form/demo/readme.md +47 -2
  60. package/components/form/demo/working.html +123 -32
  61. package/components/form/dist/auro-form.d.ts +106 -61
  62. package/components/form/dist/index.js +143 -57
  63. package/components/form/dist/registered.js +143 -57
  64. package/components/input/demo/api.md +6 -1
  65. package/components/input/demo/api.min.js +164 -103
  66. package/components/input/demo/index.min.js +164 -103
  67. package/components/input/dist/auro-input.d.ts +23 -0
  68. package/components/input/dist/base-input.d.ts +36 -18
  69. package/components/input/dist/buttonVersion.d.ts +1 -1
  70. package/components/input/dist/iconVersion.d.ts +1 -1
  71. package/components/input/dist/index.js +119 -58
  72. package/components/input/dist/registered.js +119 -58
  73. package/components/menu/demo/api.md +4 -10
  74. package/components/menu/demo/api.min.js +36 -22
  75. package/components/menu/demo/index.min.js +36 -22
  76. package/components/menu/dist/auro-menuoption.d.ts +0 -7
  77. package/components/menu/dist/iconVersion.d.ts +1 -1
  78. package/components/menu/dist/index.js +25 -11
  79. package/components/menu/dist/registered.js +25 -11
  80. package/components/radio/demo/api.min.js +13 -13
  81. package/components/radio/demo/index.min.js +13 -13
  82. package/components/radio/dist/index.js +4 -4
  83. package/components/radio/dist/registered.js +4 -4
  84. package/components/select/demo/api.js +2 -0
  85. package/components/select/demo/api.md +333 -78
  86. package/components/select/demo/api.min.js +1339 -505
  87. package/components/select/demo/index.min.js +1327 -505
  88. package/components/select/dist/auro-select.d.ts +26 -0
  89. package/components/select/dist/index.js +1266 -462
  90. package/components/select/dist/registered.js +1266 -462
  91. package/components/select/dist/selectKeyboardStrategy.d.ts +8 -0
  92. package/custom-elements.json +18655 -0
  93. package/package.json +47 -13
@@ -2,7 +2,7 @@
2
2
  * The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
3
3
  * @customElement auro-dropdown
4
4
  *
5
- * @slot - Default slot for the popover content.
5
+ * @slot - Default slot for the dropdown bib content.
6
6
  * @slot helpText - Defines the content of the helpText.
7
7
  * @slot trigger - Defines the content of the trigger.
8
8
  * @csspart trigger - The trigger content container.
@@ -14,6 +14,14 @@
14
14
  * @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
15
15
  */
16
16
  export class AuroDropdown extends AuroElement {
17
+ static get shadowRootOptions(): {
18
+ delegatesFocus: boolean;
19
+ clonable?: boolean;
20
+ customElementRegistry?: CustomElementRegistry;
21
+ mode: ShadowRootMode;
22
+ serializable?: boolean;
23
+ slotAssignment?: SlotAssignmentMode;
24
+ };
17
25
  static get properties(): {
18
26
  /**
19
27
  * The value for the role attribute of the trigger element.
@@ -228,6 +236,15 @@ export class AuroDropdown extends AuroElement {
228
236
  tabIndex: {
229
237
  type: NumberConstructor;
230
238
  };
239
+ /**
240
+ * Accessible label for the dropdown bib dialog element.
241
+ * @private
242
+ */
243
+ bibDialogLabel: {
244
+ type: StringConstructor;
245
+ attribute: boolean;
246
+ reflect: boolean;
247
+ };
231
248
  };
232
249
  static get styles(): import("lit").CSSResult[];
233
250
  /**
@@ -341,6 +358,15 @@ export class AuroDropdown extends AuroElement {
341
358
  * If not, trigger element will get focus.
342
359
  */
343
360
  focus(): void;
361
+ /**
362
+ * Sets the active descendant element for accessibility.
363
+ * Uses ariaActiveDescendantElement to cross shadow DOM boundaries.
364
+ * This function is used in components that contain `auro-dropdown` to set the active descendant.
365
+ * @private
366
+ * @param {HTMLElement|null} element - The element to set as the active descendant, or null to clear.
367
+ * @returns {void}
368
+ */
369
+ private setActiveDescendant;
344
370
  /**
345
371
  * Accessor for reusing the focusable entity query string.
346
372
  * @private
@@ -51,6 +51,26 @@ export class AuroDropdownBib extends LitElement {
51
51
  type: StringConstructor;
52
52
  reflect: boolean;
53
53
  };
54
+ /**
55
+ * Accessible label for the dialog element, used when displayed as a modal.
56
+ * Applied via aria-labelledby on a visually hidden element rather than
57
+ * aria-label because iOS VoiceOver does not reliably read aria-label
58
+ * on <dialog> elements.
59
+ * @private
60
+ */
61
+ dialogLabel: {
62
+ type: StringConstructor;
63
+ };
64
+ /**
65
+ * Overrides the native role of the dialog element.
66
+ * For example, set to `"presentation"` on desktop combobox to prevent
67
+ * VoiceOver from announcing "listbox inside of a dialog".
68
+ * When `undefined`, the dialog keeps its native role.
69
+ * @private
70
+ */
71
+ dialogRole: {
72
+ type: StringConstructor;
73
+ };
54
74
  };
55
75
  /**
56
76
  * @private
@@ -63,6 +83,73 @@ export class AuroDropdownBib extends LitElement {
63
83
  updated(changedProperties: any): void;
64
84
  bibTemplate: any;
65
85
  firstUpdated(changedProperties: any): void;
86
+ /**
87
+ * Forwards the dialog's native `cancel` event (fired on ESC) as
88
+ * an `auro-bib-cancel` custom event so parent components can close.
89
+ * @param {HTMLDialogElement} dialog
90
+ * @private
91
+ */
92
+ private _setupCancelHandler;
93
+ /**
94
+ * showModal() creates a closed focus scope — keyboard events inside
95
+ * the dialog's shadow DOM do NOT bubble out to the combobox/select
96
+ * keydown handlers in the parent shadow DOM. This handler bridges
97
+ * that gap by re-dispatching navigation keys so they cross the
98
+ * shadow boundary and reach the menu navigation logic in the parent
99
+ * component.
100
+ *
101
+ * The trade-off: intercepting these keys means native keyboard
102
+ * behaviors that would normally "just work" must be manually
103
+ * re-implemented here:
104
+ *
105
+ * - Enter on buttons: Custom elements (auro-button) don't get the
106
+ * native Enter→click that <button> provides, so we call .click()
107
+ * directly when Enter is pressed on a button-like element.
108
+ *
109
+ * - Tab: Intercepted and re-dispatched so parent components
110
+ * (select/combobox) can select the active option and close the
111
+ * dialog. The <dialog> provides containment and isolation
112
+ * (inert background, VoiceOver focus trapping, top layer), while
113
+ * the content inside is a role="listbox" navigated via
114
+ * aria-activedescendant (options are not focusable). Tab keyboard
115
+ * behavior follows listbox conventions (select + close) because
116
+ * the dialog's native Tab trap only cycles between the close
117
+ * button and browser chrome.
118
+ *
119
+ * - Escape: The native <dialog> fires a `cancel` event on ESC
120
+ * (handled by _setupCancelHandler), so the re-dispatched Escape
121
+ * is a secondary path for parent components that also listen for
122
+ * Escape keydown.
123
+ *
124
+ * @param {HTMLDialogElement} dialog
125
+ * @private
126
+ */
127
+ private _setupKeyboardBridge;
128
+ /**
129
+ * Blocks touch-driven page scroll while a fullscreen modal dialog is open.
130
+ *
131
+ * The showModal() function places the dialog in the browser's **top layer**,
132
+ * which is a separate rendering layer above the normal DOM. On mobile, the
133
+ * compositor processes visual-viewport panning before top-layer touch
134
+ * handling. This means the entire viewport — including the top-layer dialog
135
+ * — can be panned by a touch gesture, causing the page behind the dialog to
136
+ * scroll into view. To prevent this, we add a touchmove listener that cancels
137
+ * the event if the touch started outside the dialog or any scrollable child within it.
138
+ *
139
+ * @private
140
+ */
141
+ private _lockTouchScroll;
142
+ _touchMoveHandler: (event: any) => void;
143
+ /**
144
+ * Removes the touchmove listener added by _lockTouchScroll().
145
+ * @private
146
+ */
147
+ private _unlockTouchScroll;
148
+ open(modal?: boolean): void;
149
+ /**
150
+ * Closes the dialog.
151
+ */
152
+ close(): void;
66
153
  render(): import("lit-html").TemplateResult;
67
154
  }
68
155
  import { LitElement } from "lit";
@@ -1,2 +1,2 @@
1
- declare const _default: "9.1.1";
1
+ declare const _default: "9.1.2";
2
2
  export default _default;