@aurodesignsystem-dev/auro-formkit 0.0.0-pr1497.0 → 0.0.0-pr1497.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.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +7 -0
- package/components/bibtemplate/dist/index.js +9 -1
- package/components/bibtemplate/dist/registered.js +9 -1
- package/components/checkbox/demo/css-only.html +57 -0
- package/components/checkbox/demo/css-only.md +146 -0
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/pages.json +1 -1
- package/components/checkbox/demo/styles.min.css +1 -1
- package/components/checkbox/demo/why-checkbox.html +57 -0
- package/components/checkbox/demo/why-checkbox.md +86 -0
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/css-only.html +57 -0
- package/components/combobox/demo/css-only.md +209 -0
- package/components/combobox/demo/customize.min.js +250 -16
- package/components/combobox/demo/getting-started.min.js +250 -16
- package/components/combobox/demo/index.min.js +250 -16
- package/components/combobox/demo/pages.json +1 -1
- package/components/combobox/demo/styles.min.css +1 -1
- package/components/combobox/demo/why-combobox.html +57 -0
- package/components/combobox/demo/why-combobox.md +113 -0
- package/components/combobox/dist/index.js +250 -16
- package/components/combobox/dist/registered.js +250 -16
- package/components/counter/demo/css-only.html +57 -0
- package/components/counter/demo/css-only.md +184 -0
- package/components/counter/demo/customize.min.js +249 -15
- package/components/counter/demo/index.min.js +249 -15
- package/components/counter/demo/keyboard-behavior.md +1 -0
- package/components/counter/demo/pages.json +1 -1
- package/components/counter/demo/styles.min.css +1 -1
- package/components/counter/demo/why-counter.html +57 -0
- package/components/counter/demo/why-counter.md +108 -0
- package/components/counter/dist/index.js +10 -2
- package/components/counter/dist/registered.js +10 -2
- package/components/datepicker/demo/accessibility.md +54 -3
- package/components/datepicker/demo/api.md +63 -53
- package/components/datepicker/demo/css-only.html +57 -0
- package/components/datepicker/demo/css-only.md +151 -0
- package/components/datepicker/demo/customize.html +2 -0
- package/components/datepicker/demo/customize.js +19 -0
- package/components/datepicker/demo/customize.md +56 -0
- package/components/datepicker/demo/customize.min.js +36147 -0
- package/components/datepicker/demo/design.md +3 -1
- package/components/datepicker/demo/index.js +5 -1
- package/components/datepicker/demo/index.md +104 -15
- package/components/datepicker/demo/index.min.js +2485 -261
- package/components/datepicker/demo/keyboard-behavior.md +201 -2
- package/components/datepicker/demo/pages.json +1 -1
- package/components/datepicker/demo/styles.min.css +1 -1
- package/components/datepicker/demo/voiceover.md +21 -12
- package/components/datepicker/demo/why-datepicker.html +57 -0
- package/components/datepicker/demo/why-datepicker.md +133 -0
- package/components/datepicker/dist/index.js +2348 -211
- package/components/datepicker/dist/registered.js +2348 -211
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +113 -13
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +38 -1
- package/components/datepicker/dist/src/auro-calendar.d.ts +258 -0
- package/components/datepicker/dist/src/auro-datepicker.d.ts +141 -41
- package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +5 -3
- package/components/dropdown/demo/accessibility.md +11 -0
- package/components/dropdown/demo/api.md +1 -0
- package/components/dropdown/demo/css-only.html +57 -0
- package/components/dropdown/demo/css-only.md +219 -0
- package/components/dropdown/demo/customize.md +3 -0
- package/components/dropdown/demo/customize.min.js +239 -13
- package/components/dropdown/demo/getting-started.min.js +239 -13
- package/components/dropdown/demo/index.min.js +239 -13
- package/components/dropdown/demo/keyboard-behavior.md +1 -0
- package/components/dropdown/demo/pages.json +1 -1
- package/components/dropdown/demo/styles.min.css +1 -1
- package/components/dropdown/demo/why-dropdown.html +57 -0
- package/components/dropdown/demo/why-dropdown.md +97 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +34 -1
- package/components/dropdown/dist/index.js +239 -13
- package/components/dropdown/dist/registered.js +239 -13
- package/components/form/demo/css-only.html +57 -0
- package/components/form/demo/css-only.md +156 -0
- package/components/form/demo/customize.min.js +3098 -259
- package/components/form/demo/getting-started.min.js +3098 -259
- package/components/form/demo/index.min.js +3098 -259
- package/components/form/demo/pages.json +1 -1
- package/components/form/demo/registerDemoDeps.min.js +3098 -259
- package/components/form/demo/styles.min.css +1 -1
- package/components/form/demo/why-form.html +57 -0
- package/components/form/demo/why-form.md +101 -0
- package/components/input/demo/css-only.html +57 -0
- package/components/input/demo/css-only.md +199 -0
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/demo/pages.json +1 -1
- package/components/input/demo/styles.min.css +1 -1
- package/components/input/demo/why-input.html +57 -0
- package/components/input/demo/why-input.md +121 -0
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/css-only.html +57 -0
- package/components/menu/demo/css-only.md +166 -0
- package/components/menu/demo/pages.json +1 -1
- package/components/menu/demo/styles.min.css +1 -1
- package/components/menu/demo/why-menu.html +57 -0
- package/components/menu/demo/why-menu.md +104 -0
- package/components/radio/demo/css-only.html +57 -0
- package/components/radio/demo/css-only.md +151 -0
- package/components/radio/demo/customize.min.js +1764 -0
- package/components/radio/demo/demo-support.min.js +55807 -0
- package/components/radio/demo/getting-started.js +1 -1
- package/components/radio/demo/getting-started.md +1 -1
- package/components/radio/demo/getting-started.min.js +1783 -0
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/pages.json +1 -1
- package/components/radio/demo/styles.min.css +1 -1
- package/components/radio/demo/why-radio.html +57 -0
- package/components/radio/demo/why-radio.md +92 -0
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/css-only.html +57 -0
- package/components/select/demo/css-only.md +203 -0
- package/components/select/demo/customize.min.js +249 -15
- package/components/select/demo/getting-started.min.js +249 -15
- package/components/select/demo/index.min.js +249 -15
- package/components/select/demo/keyboard-behavior.md +1 -0
- package/components/select/demo/pages.json +1 -1
- package/components/select/demo/styles.min.css +1 -1
- package/components/select/demo/why-select.html +57 -0
- package/components/select/demo/why-select.md +128 -0
- package/components/select/dist/index.js +249 -15
- package/components/select/dist/registered.js +249 -15
- package/custom-elements.json +2700 -1621
- package/package.json +8 -8
|
@@ -1099,7 +1099,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
1099
1099
|
}
|
|
1100
1100
|
};
|
|
1101
1101
|
|
|
1102
|
-
var formkitVersion$1 = '
|
|
1102
|
+
var formkitVersion$1 = '202606081833';
|
|
1103
1103
|
|
|
1104
1104
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1105
1105
|
// See LICENSE in the project root for license information.
|
|
@@ -4814,7 +4814,7 @@ function applyKeyboardStrategy(component, strategy, options = {}) {
|
|
|
4814
4814
|
});
|
|
4815
4815
|
}
|
|
4816
4816
|
|
|
4817
|
-
var styleCss$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host dialog{width:auto;max-width:none;height:auto;max-height:none;padding:0;border:none;margin:0;outline:none;transform:translateZ(0)}:host dialog::backdrop{background:transparent}:host(:not([isfullscreen])) dialog{position:relative;inset:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([isfullscreen]) .container::backdrop{background:var(--ds-color-background-primary, #fff)}:host(:popover-open){position:fixed;overflow:visible;padding:0;border:none;margin:0;background:transparent;inset:unset;outline:none}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}.util_displayHiddenVisually{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip-path:inset(50%);white-space:nowrap}`;
|
|
4817
|
+
var styleCss$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host dialog{width:auto;max-width:none;height:auto;max-height:none;padding:0;border:none;margin:0;outline:none;transform:translateZ(0)}:host dialog::backdrop{background:transparent}:host(:not([isfullscreen])) dialog{position:relative;inset:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}:host(:not([isfullscreen])) .container[class*=shape-rounded]{border-radius:16px}:host([desktopmodal]:popover-open)::backdrop{background:transparent}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([isfullscreen]) .container::backdrop{background:var(--ds-color-background-primary, #fff)}:host(:popover-open){position:fixed;overflow:visible;padding:0;border:none;margin:0;background:transparent;inset:unset;outline:none}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}.util_displayHiddenVisually{position:absolute;overflow:hidden;width:1px;height:1px;padding:0;border:0;margin:-1px;clip-path:inset(50%);white-space:nowrap}`;
|
|
4818
4818
|
|
|
4819
4819
|
var colorCss$2 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
4820
4820
|
|
|
@@ -5445,7 +5445,7 @@ class AuroHelpText extends i$2 {
|
|
|
5445
5445
|
}
|
|
5446
5446
|
}
|
|
5447
5447
|
|
|
5448
|
-
var formkitVersion = '
|
|
5448
|
+
var formkitVersion = '202606081833';
|
|
5449
5449
|
|
|
5450
5450
|
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5451
5451
|
static get properties() {
|
|
@@ -5625,6 +5625,7 @@ class AuroDropdown extends AuroElement$1 {
|
|
|
5625
5625
|
_intializeDefaults() {
|
|
5626
5626
|
this.appearance = 'default';
|
|
5627
5627
|
this.chevron = false;
|
|
5628
|
+
this.desktopModal = false;
|
|
5628
5629
|
this.disabled = false;
|
|
5629
5630
|
this.disableKeyboardHandling = false;
|
|
5630
5631
|
this.error = false;
|
|
@@ -5805,6 +5806,14 @@ class AuroDropdown extends AuroElement$1 {
|
|
|
5805
5806
|
reflect: true
|
|
5806
5807
|
},
|
|
5807
5808
|
|
|
5809
|
+
/**
|
|
5810
|
+
* If declared, the dropdown will behave as a modal dialog when in a desktop viewport size.
|
|
5811
|
+
*/
|
|
5812
|
+
desktopModal: {
|
|
5813
|
+
type: Boolean,
|
|
5814
|
+
reflect: true
|
|
5815
|
+
},
|
|
5816
|
+
|
|
5808
5817
|
/**
|
|
5809
5818
|
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
5810
5819
|
*/
|
|
@@ -6092,6 +6101,15 @@ class AuroDropdown extends AuroElement$1 {
|
|
|
6092
6101
|
|
|
6093
6102
|
disconnectedCallback() {
|
|
6094
6103
|
super.disconnectedCallback();
|
|
6104
|
+
this._clearPageInert();
|
|
6105
|
+
if (this._bibTabHandler) {
|
|
6106
|
+
this.removeEventListener('keydown', this._bibTabHandler);
|
|
6107
|
+
this._bibTabHandler = undefined;
|
|
6108
|
+
}
|
|
6109
|
+
if (this.focusTrap) {
|
|
6110
|
+
this.focusTrap.disconnect();
|
|
6111
|
+
this.focusTrap = undefined;
|
|
6112
|
+
}
|
|
6095
6113
|
if (this.floater) {
|
|
6096
6114
|
this.floater.hideBib('disconnect');
|
|
6097
6115
|
this.floater.disconnect();
|
|
@@ -6119,19 +6137,45 @@ class AuroDropdown extends AuroElement$1 {
|
|
|
6119
6137
|
if (this.isPopoverVisible) {
|
|
6120
6138
|
// Fullscreen: use showModal() for native accessibility (inert outside, focus trap)
|
|
6121
6139
|
// Desktop: use show() for Floating UI positioning + FocusTrap for focus management
|
|
6122
|
-
|
|
6123
|
-
this.
|
|
6140
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
6141
|
+
this.updateFocusTrap();
|
|
6142
|
+
|
|
6143
|
+
// Desktop modal: make siblings inert so content outside is not interactive
|
|
6144
|
+
if (this.desktopModal && !this.isBibFullscreen) {
|
|
6145
|
+
this._setPageInert();
|
|
6146
|
+
}
|
|
6124
6147
|
} else {
|
|
6125
6148
|
this.bibElement.value.close();
|
|
6149
|
+
this._clearPageInert();
|
|
6126
6150
|
}
|
|
6127
6151
|
}
|
|
6128
6152
|
|
|
6129
6153
|
// When fullscreen strategy changes while open, re-open dialog with correct mode
|
|
6130
6154
|
// (e.g. resizing from desktop → mobile while dropdown is open)
|
|
6131
6155
|
if (changedProperties.has('isBibFullscreen') && this.isPopoverVisible && this.bibElement.value) {
|
|
6132
|
-
const useModal = this.isBibFullscreen;
|
|
6133
6156
|
this.bibElement.value.close();
|
|
6134
|
-
this.bibElement.value.open(
|
|
6157
|
+
this.bibElement.value.open(this.isBibFullscreen);
|
|
6158
|
+
|
|
6159
|
+
// Re-initialize focus management for the new strategy
|
|
6160
|
+
this.updateFocusTrap();
|
|
6161
|
+
|
|
6162
|
+
// Toggle inert: desktop modal needs it, fullscreen showModal() handles it natively
|
|
6163
|
+
if (this.desktopModal && !this.isBibFullscreen) {
|
|
6164
|
+
this._setPageInert();
|
|
6165
|
+
} else {
|
|
6166
|
+
this._clearPageInert();
|
|
6167
|
+
}
|
|
6168
|
+
}
|
|
6169
|
+
|
|
6170
|
+
// Handle desktopModal toggled while the dropdown is already open.
|
|
6171
|
+
// Re-initialize focus trapping and page inert state to match the new mode.
|
|
6172
|
+
if (changedProperties.has('desktopModal') && this.isPopoverVisible && !this.isBibFullscreen) {
|
|
6173
|
+
this.updateFocusTrap();
|
|
6174
|
+
if (this.desktopModal) {
|
|
6175
|
+
this._setPageInert();
|
|
6176
|
+
} else {
|
|
6177
|
+
this._clearPageInert();
|
|
6178
|
+
}
|
|
6135
6179
|
}
|
|
6136
6180
|
}
|
|
6137
6181
|
|
|
@@ -6141,8 +6185,14 @@ class AuroDropdown extends AuroElement$1 {
|
|
|
6141
6185
|
* @param {CustomEvent} event - The custom event that contains the dropdown toggle information.
|
|
6142
6186
|
*/
|
|
6143
6187
|
handleDropdownToggle(event) {
|
|
6144
|
-
this.updateFocusTrap();
|
|
6145
6188
|
this.isPopoverVisible = event.detail.expanded;
|
|
6189
|
+
|
|
6190
|
+
// Tear down FocusTrap when closing. Creation happens in updated()
|
|
6191
|
+
// after the dialog is open so getFocusableElements can find content.
|
|
6192
|
+
if (!this.isPopoverVisible) {
|
|
6193
|
+
this.updateFocusTrap();
|
|
6194
|
+
}
|
|
6195
|
+
|
|
6146
6196
|
const eventType = event.detail.eventType || "unknown";
|
|
6147
6197
|
if (!this.isPopoverVisible && this.hasFocus && eventType === "keydown") {
|
|
6148
6198
|
this.trigger.focus();
|
|
@@ -6241,19 +6291,194 @@ class AuroDropdown extends AuroElement$1 {
|
|
|
6241
6291
|
* @private
|
|
6242
6292
|
*/
|
|
6243
6293
|
updateFocusTrap() {
|
|
6294
|
+
// Always clean up existing handlers/traps before setting up new ones
|
|
6295
|
+
// to prevent duplicate listeners on repeated calls.
|
|
6296
|
+
if (this._bibTabHandler) {
|
|
6297
|
+
this.removeEventListener('keydown', this._bibTabHandler);
|
|
6298
|
+
this._bibTabHandler = undefined;
|
|
6299
|
+
}
|
|
6300
|
+
|
|
6301
|
+
if (this.focusTrap) {
|
|
6302
|
+
this.focusTrap.disconnect();
|
|
6303
|
+
this.focusTrap = undefined;
|
|
6304
|
+
}
|
|
6305
|
+
|
|
6244
6306
|
if (this.isPopoverVisible) {
|
|
6245
6307
|
if (!this.isBibFullscreen) {
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6308
|
+
if (this.desktopModal) {
|
|
6309
|
+
// Desktop modal: trap focus only within the bib content.
|
|
6310
|
+
// Can't use FocusTrap on the bib element because keydown events
|
|
6311
|
+
// from slotted content bubble through the dropdown host (light DOM),
|
|
6312
|
+
// not through the bib (shadow projection target). Using FocusTrap
|
|
6313
|
+
// on the dropdown would include the trigger in the tab cycle.
|
|
6314
|
+
// Instead, listen for Tab on the dropdown and manually wrap focus
|
|
6315
|
+
// within the bib's focusable elements.
|
|
6316
|
+
this._bibTabHandler = (event) => {
|
|
6317
|
+
if (event.key !== 'Tab') {
|
|
6318
|
+
return;
|
|
6319
|
+
}
|
|
6320
|
+
|
|
6321
|
+
// Collect focusable elements from the bib content.
|
|
6322
|
+
const focusables = getFocusableElements(this.bibContent);
|
|
6323
|
+
|
|
6324
|
+
// Fallback: try from slotted content directly
|
|
6325
|
+
if (!focusables.length) {
|
|
6326
|
+
const slot = this.shadowRoot.querySelector('.slotContent slot');
|
|
6327
|
+
const assignedNodes = slot ? slot.assignedNodes({ flatten: true }) : [];
|
|
6328
|
+
|
|
6329
|
+
for (const node of assignedNodes) {
|
|
6330
|
+
if (node.nodeType === Node.ELEMENT_NODE) {
|
|
6331
|
+
focusables.push(...getFocusableElements(node));
|
|
6332
|
+
}
|
|
6333
|
+
}
|
|
6334
|
+
}
|
|
6335
|
+
|
|
6336
|
+
if (!focusables.length) {
|
|
6337
|
+
return;
|
|
6338
|
+
}
|
|
6339
|
+
|
|
6340
|
+
event.preventDefault();
|
|
6341
|
+
|
|
6342
|
+
const direction = event.shiftKey ? -1 : 1; // eslint-disable-line no-magic-numbers
|
|
6343
|
+
|
|
6344
|
+
// Walk the active element chain through shadow roots
|
|
6345
|
+
const actives = this._getActiveElements();
|
|
6346
|
+
|
|
6347
|
+
let idx = focusables.findIndex((el) => actives.includes(el));
|
|
6348
|
+
|
|
6349
|
+
if (idx === -1) { // eslint-disable-line no-magic-numbers
|
|
6350
|
+
// Focus is not on a known element — move to first/last
|
|
6351
|
+
idx = direction === 1 ? -1 : focusables.length; // eslint-disable-line no-magic-numbers
|
|
6352
|
+
}
|
|
6353
|
+
|
|
6354
|
+
// Try each element in order, skipping any that can't receive focus
|
|
6355
|
+
// (e.g. hidden elements, elements in collapsed sections)
|
|
6356
|
+
for (let index = 0; index < focusables.length; index++) { // eslint-disable-line no-plusplus
|
|
6357
|
+
let nextIdx = idx + direction;
|
|
6358
|
+
|
|
6359
|
+
// Wrap around
|
|
6360
|
+
if (nextIdx < 0) {
|
|
6361
|
+
nextIdx = focusables.length - 1;
|
|
6362
|
+
} else if (nextIdx >= focusables.length) {
|
|
6363
|
+
nextIdx = 0;
|
|
6364
|
+
}
|
|
6365
|
+
|
|
6366
|
+
focusables[nextIdx].focus();
|
|
6367
|
+
|
|
6368
|
+
// Verify focus actually moved to the target
|
|
6369
|
+
const newActives = this._getActiveElements();
|
|
6370
|
+
|
|
6371
|
+
if (newActives.includes(focusables[nextIdx])) {
|
|
6372
|
+
return;
|
|
6373
|
+
}
|
|
6374
|
+
|
|
6375
|
+
// Focus didn't stick — skip this element and try the next
|
|
6376
|
+
idx = nextIdx;
|
|
6377
|
+
}
|
|
6378
|
+
};
|
|
6379
|
+
this.addEventListener('keydown', this._bibTabHandler);
|
|
6380
|
+
|
|
6381
|
+
// Move initial focus into the bib content, matching FocusTrap behavior
|
|
6382
|
+
requestAnimationFrame(() => {
|
|
6383
|
+
const focusables = getFocusableElements(this.bibContent);
|
|
6384
|
+
if (focusables.length) {
|
|
6385
|
+
focusables[0].focus();
|
|
6386
|
+
}
|
|
6387
|
+
});
|
|
6388
|
+
} else {
|
|
6389
|
+
// Normal desktop: use FocusTrap on the bib element
|
|
6390
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
6391
|
+
this.focusTrap.focusFirstElement();
|
|
6392
|
+
}
|
|
6249
6393
|
}
|
|
6250
6394
|
// Fullscreen: showModal() provides native focus trapping
|
|
6395
|
+
}
|
|
6396
|
+
}
|
|
6397
|
+
|
|
6398
|
+
/**
|
|
6399
|
+
* Returns the chain of active (focused) elements through shadow roots.
|
|
6400
|
+
* @private
|
|
6401
|
+
* @returns {Array<HTMLElement>}
|
|
6402
|
+
*/
|
|
6403
|
+
_getActiveElements() {
|
|
6404
|
+
let { activeElement } = document;
|
|
6405
|
+
const actives = [activeElement];
|
|
6406
|
+
|
|
6407
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
6408
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
6409
|
+
actives.push(activeElement);
|
|
6410
|
+
}
|
|
6411
|
+
|
|
6412
|
+
return actives;
|
|
6413
|
+
}
|
|
6414
|
+
|
|
6415
|
+
/**
|
|
6416
|
+
* Sets `inert` on sibling elements of the dropdown's top-level host
|
|
6417
|
+
* so that content outside the dropdown is not interactive while the modal is open.
|
|
6418
|
+
* Walks up through shadow DOM boundaries to find the outermost host element
|
|
6419
|
+
* in the light DOM, then sets `inert` on siblings at each ancestor level
|
|
6420
|
+
* to ensure all page content outside the host subtree is inert.
|
|
6421
|
+
* @private
|
|
6422
|
+
*/
|
|
6423
|
+
_setPageInert() {
|
|
6424
|
+
if (this._inertSiblings) {
|
|
6251
6425
|
return;
|
|
6252
6426
|
}
|
|
6253
6427
|
|
|
6254
|
-
|
|
6255
|
-
|
|
6256
|
-
|
|
6428
|
+
this._inertSiblings = [];
|
|
6429
|
+
|
|
6430
|
+
// Walk up through shadow DOM boundaries to find the topmost host
|
|
6431
|
+
// element in the light DOM. For example, if this dropdown is inside
|
|
6432
|
+
// auro-datepicker's shadow DOM, we walk up to the datepicker element
|
|
6433
|
+
// so we set inert on its siblings — not on the datepicker itself.
|
|
6434
|
+
let host = this;
|
|
6435
|
+
while (host.getRootNode() instanceof ShadowRoot) {
|
|
6436
|
+
host = host.getRootNode().host;
|
|
6437
|
+
}
|
|
6438
|
+
|
|
6439
|
+
// Walk up the ancestor chain, inerting siblings at each level
|
|
6440
|
+
// to ensure the entire page outside the host subtree is inert.
|
|
6441
|
+
// Uses a reference counter (data-auro-inert-count) so multiple
|
|
6442
|
+
// simultaneous modal dropdowns share inert state safely.
|
|
6443
|
+
let current = host;
|
|
6444
|
+
while (current.parentElement) {
|
|
6445
|
+
const parent = current.parentElement;
|
|
6446
|
+
for (const sibling of parent.children) {
|
|
6447
|
+
if (sibling !== current) {
|
|
6448
|
+
const count = parseInt(sibling.dataset.auroInertCount || '0', 10);
|
|
6449
|
+
if (count === 0) {
|
|
6450
|
+
sibling.dataset.auroInertWas = sibling.inert ? 'true' : 'false';
|
|
6451
|
+
}
|
|
6452
|
+
sibling.dataset.auroInertCount = String(count + 1);
|
|
6453
|
+
sibling.inert = true;
|
|
6454
|
+
this._inertSiblings.push(sibling);
|
|
6455
|
+
}
|
|
6456
|
+
}
|
|
6457
|
+
current = parent;
|
|
6458
|
+
}
|
|
6459
|
+
}
|
|
6460
|
+
|
|
6461
|
+
/**
|
|
6462
|
+
* Restores `inert` state on siblings that were tracked by `_setPageInert`.
|
|
6463
|
+
* Uses reference counting so inert is only cleared when the last modal
|
|
6464
|
+
* dropdown releases a given element. Preserves the original inert state
|
|
6465
|
+
* so externally-inerted elements are not inadvertently re-enabled.
|
|
6466
|
+
* @private
|
|
6467
|
+
*/
|
|
6468
|
+
_clearPageInert() {
|
|
6469
|
+
if (this._inertSiblings) {
|
|
6470
|
+
for (const sibling of this._inertSiblings) {
|
|
6471
|
+
const count = parseInt(sibling.dataset.auroInertCount || '1', 10) - 1;
|
|
6472
|
+
if (count <= 0) {
|
|
6473
|
+
const wasInert = sibling.dataset.auroInertWas === 'true';
|
|
6474
|
+
delete sibling.dataset.auroInertCount;
|
|
6475
|
+
delete sibling.dataset.auroInertWas;
|
|
6476
|
+
sibling.inert = wasInert;
|
|
6477
|
+
} else {
|
|
6478
|
+
sibling.dataset.auroInertCount = String(count);
|
|
6479
|
+
}
|
|
6480
|
+
}
|
|
6481
|
+
this._inertSiblings = undefined;
|
|
6257
6482
|
}
|
|
6258
6483
|
}
|
|
6259
6484
|
|
|
@@ -6492,6 +6717,7 @@ class AuroDropdown extends AuroElement$1 {
|
|
|
6492
6717
|
shape="${this.shape}"
|
|
6493
6718
|
?data-show="${this.isPopoverVisible}"
|
|
6494
6719
|
?isfullscreen="${this.isBibFullscreen}"
|
|
6720
|
+
?desktopmodal="${this.desktopModal}"
|
|
6495
6721
|
.dialogLabel="${this.bibDialogLabel}"
|
|
6496
6722
|
${n$1(this.bibElement)}
|
|
6497
6723
|
>
|
|
@@ -6859,6 +7085,14 @@ class AuroBibtemplate extends i$2 {
|
|
|
6859
7085
|
large: {
|
|
6860
7086
|
type: Boolean,
|
|
6861
7087
|
reflect: true
|
|
7088
|
+
},
|
|
7089
|
+
|
|
7090
|
+
/**
|
|
7091
|
+
* If declared, the footer slot will be rendered even when not in fullscreen mode.
|
|
7092
|
+
*/
|
|
7093
|
+
showFooter: {
|
|
7094
|
+
type: Boolean,
|
|
7095
|
+
reflect: true
|
|
6862
7096
|
}
|
|
6863
7097
|
};
|
|
6864
7098
|
}
|
|
@@ -6961,7 +7195,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
6961
7195
|
<slot></slot>
|
|
6962
7196
|
</div>
|
|
6963
7197
|
|
|
6964
|
-
${this.isFullscreen ? u$5`
|
|
7198
|
+
${this.isFullscreen || this.showFooter ? u$5`
|
|
6965
7199
|
<div id="footerContainer">
|
|
6966
7200
|
<slot name="footer"></slot>
|
|
6967
7201
|
</div>` : null}
|