@aurodesignsystem-dev/auro-formkit 0.0.0-pr1424.2 → 0.0.0-pr1424.4
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/CHANGELOG.md +2 -2
- package/README.md +133 -183
- package/components/checkbox/demo/api.min.js +3 -3
- package/components/checkbox/demo/index.min.js +3 -3
- package/components/checkbox/dist/index.js +3 -3
- package/components/checkbox/dist/registered.js +3 -3
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.js +3 -1
- package/components/combobox/demo/api.md +75 -0
- package/components/combobox/demo/api.min.js +314 -172
- package/components/combobox/demo/index.min.js +301 -171
- package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +1 -1
- package/components/combobox/dist/index.js +291 -171
- package/components/combobox/dist/registered.js +291 -171
- package/components/counter/demo/api.html +3 -0
- package/components/counter/demo/api.js +4 -0
- package/components/counter/demo/api.md +130 -0
- package/components/counter/demo/api.min.js +320 -167
- package/components/counter/demo/index.min.js +300 -167
- package/components/counter/dist/counterGroupKeyboardStrategy.d.ts +3 -0
- package/components/counter/dist/index.js +300 -167
- package/components/counter/dist/registered.js +300 -167
- package/components/datepicker/demo/api.html +1 -0
- package/components/datepicker/demo/api.js +2 -0
- package/components/datepicker/demo/api.md +57 -0
- package/components/datepicker/demo/api.min.js +376 -171
- package/components/datepicker/demo/index.min.js +364 -171
- package/components/datepicker/dist/datepickerKeyboardStrategy.d.ts +3 -1
- package/components/datepicker/dist/index.js +364 -171
- package/components/datepicker/dist/registered.js +364 -171
- package/components/dropdown/demo/api.html +1 -0
- package/components/dropdown/demo/api.js +2 -0
- package/components/dropdown/demo/api.md +95 -0
- package/components/dropdown/demo/api.min.js +296 -165
- package/components/dropdown/demo/index.min.js +276 -165
- package/components/dropdown/dist/index.js +276 -165
- package/components/dropdown/dist/registered.js +276 -165
- package/components/form/demo/api.min.js +1254 -684
- package/components/form/demo/index.min.js +1254 -684
- package/components/input/demo/api.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/api.md +1 -0
- package/components/menu/demo/api.min.js +10 -0
- package/components/menu/demo/index.min.js +10 -0
- package/components/menu/dist/auro-menuoption.d.ts +9 -0
- package/components/menu/dist/index.js +10 -0
- package/components/menu/dist/registered.js +10 -0
- package/components/radio/demo/api.min.js +2 -2
- package/components/radio/demo/index.min.js +2 -2
- package/components/radio/dist/index.js +2 -2
- package/components/radio/dist/registered.js +2 -2
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +76 -0
- package/components/select/demo/api.min.js +306 -169
- package/components/select/demo/index.min.js +293 -169
- package/components/select/dist/index.js +283 -169
- package/components/select/dist/registered.js +283 -169
- package/custom-elements.json +48 -3
- package/package.json +5 -3
|
@@ -7470,7 +7470,7 @@ let AuroHelpText$8 = class AuroHelpText extends i$4 {
|
|
|
7470
7470
|
}
|
|
7471
7471
|
};
|
|
7472
7472
|
|
|
7473
|
-
var formkitVersion$8 = '
|
|
7473
|
+
var formkitVersion$8 = '202604091759';
|
|
7474
7474
|
|
|
7475
7475
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7476
7476
|
// See LICENSE in the project root for license information.
|
|
@@ -17392,7 +17392,7 @@ let AuroBibtemplate$3 = class AuroBibtemplate extends i$4 {
|
|
|
17392
17392
|
}
|
|
17393
17393
|
};
|
|
17394
17394
|
|
|
17395
|
-
var formkitVersion$2$1 = '
|
|
17395
|
+
var formkitVersion$2$1 = '202604091759';
|
|
17396
17396
|
|
|
17397
17397
|
let l$1$2 = class l{generateElementName(t,e){let o=t;return o+="-",o+=e.replace(/[.]/g,"_"),o}generateTag(o,s,a){const r=this.generateElementName(o,s),i=i$3`${s$6(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1$2 = class d{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}getSlotText(t,e){const o=t.shadowRoot?.querySelector(`slot[name="${e}"]`),s=(o?.assignedNodes({flatten:true})||[]).map(t=>t.textContent?.trim()).join(" ").trim();return s||null}};let h$1$2 = class h{registerComponent(t,e){customElements.get(t)||customElements.define(t,class extends e{});}closestElement(t,e=this,o=(e,s=e&&e.closest(t))=>e&&e!==document&&e!==window?s||o(e.getRootNode().host):null){return o(e)}handleComponentTagRename(t,e){const o=e.toLowerCase();t.tagName.toLowerCase()!==o&&t.setAttribute(o,true);}elementMatch(t,e){const o=e.toLowerCase();return t.tagName.toLowerCase()===o||t.hasAttribute(o)}};var c$1$3=i$7`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]),:host([appearance=brand]){--ds-auro-loader-color: var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]),:host([appearance=inverse]){--ds-auro-loader-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color: transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color: currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color: currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}
|
|
17398
17398
|
`,u$4$2=i$7`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, .875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, .75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, .625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, .875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, .05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, .05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, .05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, .05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, .05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, .1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(.875rem, 1.1666666667vw, .875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, .1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0;box-sizing:border-box}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin: .375rem;--margin-xs: .2rem;--margin-sm: .5rem;--margin-md: .75rem;--margin-lg: 1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin) * 6);height:calc(1rem + var(--margin) * 2)}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(1.95rem + var(--margin-xs) * 6);height:calc(.65rem + var(--margin-xs) * 2)}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm) * 6);height:calc(2rem + var(--margin-sm) * 2)}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md) * 6);height:calc(3rem + var(--margin-md) * 2)}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg) * 6);height:calc(5rem + var(--margin-lg) * 2)}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-.4s}:host([pulse])>span:nth-child(2){animation-delay:-.2s}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,to{opacity:.1;transform:scale(.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{to{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}to{left:110%}}:host>.no-animation{display:none}@media (prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}
|
|
@@ -19702,11 +19702,19 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19702
19702
|
* This ensures that the bib content has the same dimensions as the sizer element.
|
|
19703
19703
|
*/
|
|
19704
19704
|
mirrorSize() {
|
|
19705
|
+
const element = this.element;
|
|
19706
|
+
if (!element) {
|
|
19707
|
+
return;
|
|
19708
|
+
}
|
|
19709
|
+
|
|
19705
19710
|
// mirror the boxsize from bibSizer
|
|
19706
|
-
if (
|
|
19707
|
-
const sizerStyle = window.getComputedStyle(
|
|
19708
|
-
const bibContent =
|
|
19709
|
-
|
|
19711
|
+
if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
|
|
19712
|
+
const sizerStyle = window.getComputedStyle(element.bibSizer);
|
|
19713
|
+
const bibContent = element.bib.shadowRoot.querySelector(".container");
|
|
19714
|
+
if (!bibContent) {
|
|
19715
|
+
return;
|
|
19716
|
+
}
|
|
19717
|
+
|
|
19710
19718
|
if (sizerStyle.width !== "0px") {
|
|
19711
19719
|
bibContent.style.width = sizerStyle.width;
|
|
19712
19720
|
}
|
|
@@ -19728,9 +19736,14 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19728
19736
|
* @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
|
|
19729
19737
|
*/
|
|
19730
19738
|
getPositioningStrategy() {
|
|
19739
|
+
const element = this.element;
|
|
19740
|
+
if (!element) {
|
|
19741
|
+
return "floating";
|
|
19742
|
+
}
|
|
19743
|
+
|
|
19731
19744
|
const breakpoint =
|
|
19732
|
-
|
|
19733
|
-
|
|
19745
|
+
element.bib?.mobileFullscreenBreakpoint ||
|
|
19746
|
+
element.floaterConfig?.fullscreenBreakpoint;
|
|
19734
19747
|
switch (this.behavior) {
|
|
19735
19748
|
case "tooltip":
|
|
19736
19749
|
return "floating";
|
|
@@ -19741,9 +19754,9 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19741
19754
|
`(max-width: ${breakpoint})`,
|
|
19742
19755
|
).matches;
|
|
19743
19756
|
|
|
19744
|
-
|
|
19757
|
+
element.expanded = smallerThanBreakpoint;
|
|
19745
19758
|
}
|
|
19746
|
-
if (
|
|
19759
|
+
if (element.nested) {
|
|
19747
19760
|
return "cover";
|
|
19748
19761
|
}
|
|
19749
19762
|
return "fullscreen";
|
|
@@ -19773,42 +19786,65 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19773
19786
|
* and applies the calculated position to the bib's style.
|
|
19774
19787
|
*/
|
|
19775
19788
|
position() {
|
|
19789
|
+
const element = this.element;
|
|
19790
|
+
if (!element) {
|
|
19791
|
+
return;
|
|
19792
|
+
}
|
|
19793
|
+
|
|
19776
19794
|
const strategy = this.getPositioningStrategy();
|
|
19777
19795
|
this.configureBibStrategy(strategy);
|
|
19778
19796
|
|
|
19779
19797
|
if (strategy === "floating") {
|
|
19798
|
+
if (!element.trigger || !element.bib) {
|
|
19799
|
+
return;
|
|
19800
|
+
}
|
|
19801
|
+
|
|
19780
19802
|
this.mirrorSize();
|
|
19781
19803
|
// Define the middlware for the floater configuration
|
|
19782
19804
|
const middleware = [
|
|
19783
|
-
offset$4(
|
|
19784
|
-
...(
|
|
19785
|
-
...(
|
|
19786
|
-
...(
|
|
19805
|
+
offset$4(element.floaterConfig?.offset || 0),
|
|
19806
|
+
...(element.floaterConfig?.shift ? [shift$4()] : []), // Add shift middleware if shift is enabled.
|
|
19807
|
+
...(element.floaterConfig?.flip ? [flip$4()] : []), // Add flip middleware if flip is enabled.
|
|
19808
|
+
...(element.floaterConfig?.autoPlacement ? [autoPlacement$4()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
|
|
19787
19809
|
];
|
|
19788
19810
|
|
|
19789
19811
|
// Compute the position of the bib
|
|
19790
|
-
computePosition$4(
|
|
19791
|
-
strategy:
|
|
19792
|
-
placement:
|
|
19812
|
+
computePosition$4(element.trigger, element.bib, {
|
|
19813
|
+
strategy: element.floaterConfig?.strategy || "fixed",
|
|
19814
|
+
placement: element.floaterConfig?.placement,
|
|
19793
19815
|
middleware: middleware || [],
|
|
19794
19816
|
}).then(({ x, y }) => {
|
|
19795
19817
|
// eslint-disable-line id-length
|
|
19796
|
-
|
|
19818
|
+
const currentElement = this.element;
|
|
19819
|
+
if (!currentElement?.bib) {
|
|
19820
|
+
return;
|
|
19821
|
+
}
|
|
19822
|
+
|
|
19823
|
+
Object.assign(currentElement.bib.style, {
|
|
19797
19824
|
left: `${x}px`,
|
|
19798
19825
|
top: `${y}px`,
|
|
19799
19826
|
});
|
|
19800
19827
|
});
|
|
19801
19828
|
} else if (strategy === "cover") {
|
|
19829
|
+
if (!element.parentNode || !element.bib) {
|
|
19830
|
+
return;
|
|
19831
|
+
}
|
|
19832
|
+
|
|
19802
19833
|
// Compute the position of the bib
|
|
19803
|
-
computePosition$4(
|
|
19834
|
+
computePosition$4(element.parentNode, element.bib, {
|
|
19804
19835
|
placement: "bottom-start",
|
|
19805
19836
|
}).then(({ x, y }) => {
|
|
19806
19837
|
// eslint-disable-line id-length
|
|
19807
|
-
|
|
19838
|
+
const currentElement = this.element;
|
|
19839
|
+
if (!currentElement?.bib || !currentElement.parentNode) {
|
|
19840
|
+
return;
|
|
19841
|
+
}
|
|
19842
|
+
|
|
19843
|
+
Object.assign(currentElement.bib.style, {
|
|
19808
19844
|
left: `${x}px`,
|
|
19809
|
-
top: `${y -
|
|
19810
|
-
width: `${
|
|
19811
|
-
height: `${
|
|
19845
|
+
top: `${y - currentElement.parentNode.offsetHeight}px`,
|
|
19846
|
+
width: `${currentElement.parentNode.offsetWidth}px`,
|
|
19847
|
+
height: `${currentElement.parentNode.offsetHeight}px`,
|
|
19812
19848
|
});
|
|
19813
19849
|
});
|
|
19814
19850
|
}
|
|
@@ -19820,11 +19856,17 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19820
19856
|
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
19821
19857
|
*/
|
|
19822
19858
|
lockScroll(lock = true) {
|
|
19859
|
+
const element = this.element;
|
|
19860
|
+
|
|
19823
19861
|
if (lock) {
|
|
19862
|
+
if (!element?.bib) {
|
|
19863
|
+
return;
|
|
19864
|
+
}
|
|
19865
|
+
|
|
19824
19866
|
document.body.style.overflow = "hidden"; // hide body's scrollbar
|
|
19825
19867
|
|
|
19826
19868
|
// Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
|
|
19827
|
-
|
|
19869
|
+
element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
|
|
19828
19870
|
} else {
|
|
19829
19871
|
document.body.style.overflow = "";
|
|
19830
19872
|
}
|
|
@@ -19840,20 +19882,24 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19840
19882
|
* @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
|
|
19841
19883
|
*/
|
|
19842
19884
|
configureBibStrategy(value) {
|
|
19885
|
+
const element = this.element;
|
|
19886
|
+
if (!element?.bib) {
|
|
19887
|
+
return;
|
|
19888
|
+
}
|
|
19889
|
+
|
|
19843
19890
|
if (value === "fullscreen") {
|
|
19844
|
-
|
|
19891
|
+
element.isBibFullscreen = true;
|
|
19845
19892
|
// reset the prev position
|
|
19846
|
-
|
|
19847
|
-
|
|
19848
|
-
|
|
19849
|
-
|
|
19850
|
-
|
|
19851
|
-
|
|
19852
|
-
|
|
19893
|
+
element.bib.setAttribute("isfullscreen", "");
|
|
19894
|
+
element.bib.style.position = "fixed";
|
|
19895
|
+
element.bib.style.top = "0px";
|
|
19896
|
+
element.bib.style.left = "0px";
|
|
19897
|
+
element.bib.style.width = "";
|
|
19898
|
+
element.bib.style.height = "";
|
|
19899
|
+
element.style.contain = "";
|
|
19853
19900
|
|
|
19854
19901
|
// reset the size that was mirroring `size` css-part
|
|
19855
|
-
const bibContent =
|
|
19856
|
-
this.element.bib.shadowRoot.querySelector(".container");
|
|
19902
|
+
const bibContent = element.bib.shadowRoot?.querySelector(".container");
|
|
19857
19903
|
if (bibContent) {
|
|
19858
19904
|
bibContent.style.width = "";
|
|
19859
19905
|
bibContent.style.height = "";
|
|
@@ -19868,14 +19914,14 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19868
19914
|
}, 0);
|
|
19869
19915
|
}
|
|
19870
19916
|
|
|
19871
|
-
if (
|
|
19917
|
+
if (element.isPopoverVisible) {
|
|
19872
19918
|
this.lockScroll(true);
|
|
19873
19919
|
}
|
|
19874
19920
|
} else {
|
|
19875
|
-
|
|
19876
|
-
|
|
19877
|
-
|
|
19878
|
-
|
|
19921
|
+
element.bib.style.position = "";
|
|
19922
|
+
element.bib.removeAttribute("isfullscreen");
|
|
19923
|
+
element.isBibFullscreen = false;
|
|
19924
|
+
element.style.contain = "layout";
|
|
19879
19925
|
}
|
|
19880
19926
|
|
|
19881
19927
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -19893,16 +19939,21 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19893
19939
|
},
|
|
19894
19940
|
);
|
|
19895
19941
|
|
|
19896
|
-
|
|
19942
|
+
element.dispatchEvent(event);
|
|
19897
19943
|
}
|
|
19898
19944
|
}
|
|
19899
19945
|
|
|
19900
19946
|
updateState() {
|
|
19901
|
-
const
|
|
19947
|
+
const element = this.element;
|
|
19948
|
+
if (!element) {
|
|
19949
|
+
return;
|
|
19950
|
+
}
|
|
19951
|
+
|
|
19952
|
+
const isVisible = element.isPopoverVisible;
|
|
19902
19953
|
if (!isVisible) {
|
|
19903
19954
|
this.cleanupHideHandlers();
|
|
19904
19955
|
try {
|
|
19905
|
-
|
|
19956
|
+
element.cleanup?.();
|
|
19906
19957
|
} catch (error) {
|
|
19907
19958
|
// Do nothing
|
|
19908
19959
|
}
|
|
@@ -19918,28 +19969,30 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19918
19969
|
* If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
|
|
19919
19970
|
*/
|
|
19920
19971
|
handleFocusLoss() {
|
|
19972
|
+
const element = this.element;
|
|
19973
|
+
if (!element?.bib) {
|
|
19974
|
+
return;
|
|
19975
|
+
}
|
|
19976
|
+
|
|
19921
19977
|
// if mouse is being pressed, skip and let click event to handle the action
|
|
19922
19978
|
if (AuroFloatingUI.isMousePressed) {
|
|
19923
19979
|
return;
|
|
19924
19980
|
}
|
|
19925
19981
|
|
|
19926
19982
|
if (
|
|
19927
|
-
|
|
19928
|
-
|
|
19983
|
+
element.noHideOnThisFocusLoss ||
|
|
19984
|
+
element.hasAttribute("noHideOnThisFocusLoss")
|
|
19929
19985
|
) {
|
|
19930
19986
|
return;
|
|
19931
19987
|
}
|
|
19932
19988
|
|
|
19933
19989
|
// if focus is still inside of trigger or bib, do not close
|
|
19934
|
-
if (
|
|
19935
|
-
this.element.matches(":focus") ||
|
|
19936
|
-
this.element.matches(":focus-within")
|
|
19937
|
-
) {
|
|
19990
|
+
if (element.matches(":focus") || element.matches(":focus-within")) {
|
|
19938
19991
|
return;
|
|
19939
19992
|
}
|
|
19940
19993
|
|
|
19941
19994
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
19942
|
-
if (
|
|
19995
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
19943
19996
|
return;
|
|
19944
19997
|
}
|
|
19945
19998
|
|
|
@@ -19947,23 +20000,33 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19947
20000
|
}
|
|
19948
20001
|
|
|
19949
20002
|
setupHideHandlers() {
|
|
20003
|
+
const element = this.element;
|
|
20004
|
+
if (!element) {
|
|
20005
|
+
return;
|
|
20006
|
+
}
|
|
20007
|
+
|
|
19950
20008
|
// Define handlers & store references
|
|
19951
20009
|
this.focusHandler = () => this.handleFocusLoss();
|
|
19952
20010
|
|
|
19953
20011
|
this.clickHandler = (evt) => {
|
|
20012
|
+
const element = this.element;
|
|
20013
|
+
if (!element?.bib) {
|
|
20014
|
+
return;
|
|
20015
|
+
}
|
|
20016
|
+
|
|
19954
20017
|
// When the bib is fullscreen (modal dialog), don't close on outside
|
|
19955
20018
|
// clicks. VoiceOver's synthetic click events inside a top-layer modal
|
|
19956
20019
|
// <dialog> may not include the bib in composedPath(), causing false
|
|
19957
20020
|
// positives. This mirrors the fullscreen guard in handleFocusLoss().
|
|
19958
|
-
if (
|
|
20021
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
19959
20022
|
return;
|
|
19960
20023
|
}
|
|
19961
20024
|
|
|
19962
20025
|
if (
|
|
19963
|
-
(!evt.composedPath().includes(
|
|
19964
|
-
!evt.composedPath().includes(
|
|
19965
|
-
(
|
|
19966
|
-
evt.composedPath().includes(
|
|
20026
|
+
(!evt.composedPath().includes(element.trigger) &&
|
|
20027
|
+
!evt.composedPath().includes(element.bib)) ||
|
|
20028
|
+
(element.bib.backdrop &&
|
|
20029
|
+
evt.composedPath().includes(element.bib.backdrop))
|
|
19967
20030
|
) {
|
|
19968
20031
|
const existedVisibleFloatingUI =
|
|
19969
20032
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -19984,7 +20047,12 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
19984
20047
|
|
|
19985
20048
|
// ESC key handler
|
|
19986
20049
|
this.keyDownHandler = (evt) => {
|
|
19987
|
-
|
|
20050
|
+
const element = this.element;
|
|
20051
|
+
if (!element) {
|
|
20052
|
+
return;
|
|
20053
|
+
}
|
|
20054
|
+
|
|
20055
|
+
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
19988
20056
|
const existedVisibleFloatingUI =
|
|
19989
20057
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
19990
20058
|
if (
|
|
@@ -20041,6 +20109,10 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20041
20109
|
}
|
|
20042
20110
|
|
|
20043
20111
|
updateCurrentExpandedDropdown() {
|
|
20112
|
+
if (!this.element) {
|
|
20113
|
+
return;
|
|
20114
|
+
}
|
|
20115
|
+
|
|
20044
20116
|
// Close any other dropdown that is already open
|
|
20045
20117
|
const existedVisibleFloatingUI =
|
|
20046
20118
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -20057,25 +20129,34 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20057
20129
|
}
|
|
20058
20130
|
|
|
20059
20131
|
showBib() {
|
|
20060
|
-
|
|
20132
|
+
const element = this.element;
|
|
20133
|
+
if (!element) {
|
|
20134
|
+
return;
|
|
20135
|
+
}
|
|
20136
|
+
|
|
20137
|
+
if (!element.bib || (!element.trigger && !element.parentNode)) {
|
|
20138
|
+
return;
|
|
20139
|
+
}
|
|
20140
|
+
|
|
20141
|
+
if (!element.disabled && !this.showing) {
|
|
20061
20142
|
this.updateCurrentExpandedDropdown();
|
|
20062
|
-
|
|
20143
|
+
element.triggerChevron?.setAttribute("data-expanded", true);
|
|
20063
20144
|
|
|
20064
20145
|
// prevent double showing: isPopovervisible gets first and showBib gets called later
|
|
20065
20146
|
if (!this.showing) {
|
|
20066
|
-
if (!
|
|
20147
|
+
if (!element.modal) {
|
|
20067
20148
|
this.setupHideHandlers();
|
|
20068
20149
|
}
|
|
20069
20150
|
this.showing = true;
|
|
20070
|
-
|
|
20151
|
+
element.isPopoverVisible = true;
|
|
20071
20152
|
this.position();
|
|
20072
20153
|
this.dispatchEventDropdownToggle();
|
|
20073
20154
|
}
|
|
20074
20155
|
|
|
20075
20156
|
// Setup auto update to handle resize and scroll
|
|
20076
|
-
|
|
20077
|
-
|
|
20078
|
-
|
|
20157
|
+
element.cleanup = autoUpdate$3(
|
|
20158
|
+
element.trigger || element.parentNode,
|
|
20159
|
+
element.bib,
|
|
20079
20160
|
() => {
|
|
20080
20161
|
this.position();
|
|
20081
20162
|
},
|
|
@@ -20088,22 +20169,27 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20088
20169
|
* @param {String} eventType - The event type that triggered the hiding action.
|
|
20089
20170
|
*/
|
|
20090
20171
|
hideBib(eventType = "unknown") {
|
|
20091
|
-
|
|
20172
|
+
const element = this.element;
|
|
20173
|
+
if (!element) {
|
|
20174
|
+
return;
|
|
20175
|
+
}
|
|
20176
|
+
|
|
20177
|
+
if (element.disabled) {
|
|
20092
20178
|
return;
|
|
20093
20179
|
}
|
|
20094
20180
|
|
|
20095
20181
|
// noToggle dropdowns should not close when the trigger is clicked (the
|
|
20096
20182
|
// "toggle" behavior), but they CAN still close via other interactions like
|
|
20097
20183
|
// Escape key or focus loss.
|
|
20098
|
-
if (
|
|
20184
|
+
if (element.noToggle && eventType === "click") {
|
|
20099
20185
|
return;
|
|
20100
20186
|
}
|
|
20101
20187
|
|
|
20102
20188
|
this.lockScroll(false);
|
|
20103
|
-
|
|
20189
|
+
element.triggerChevron?.removeAttribute("data-expanded");
|
|
20104
20190
|
|
|
20105
|
-
if (
|
|
20106
|
-
|
|
20191
|
+
if (element.isPopoverVisible) {
|
|
20192
|
+
element.isPopoverVisible = false;
|
|
20107
20193
|
}
|
|
20108
20194
|
if (this.showing) {
|
|
20109
20195
|
this.cleanupHideHandlers();
|
|
@@ -20123,6 +20209,11 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20123
20209
|
* @param {String} eventType - The event type that triggered the toggle action.
|
|
20124
20210
|
*/
|
|
20125
20211
|
dispatchEventDropdownToggle(eventType) {
|
|
20212
|
+
const element = this.element;
|
|
20213
|
+
if (!element) {
|
|
20214
|
+
return;
|
|
20215
|
+
}
|
|
20216
|
+
|
|
20126
20217
|
const event = new CustomEvent(
|
|
20127
20218
|
this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
|
|
20128
20219
|
{
|
|
@@ -20134,11 +20225,16 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20134
20225
|
},
|
|
20135
20226
|
);
|
|
20136
20227
|
|
|
20137
|
-
|
|
20228
|
+
element.dispatchEvent(event);
|
|
20138
20229
|
}
|
|
20139
20230
|
|
|
20140
20231
|
handleClick() {
|
|
20141
|
-
|
|
20232
|
+
const element = this.element;
|
|
20233
|
+
if (!element) {
|
|
20234
|
+
return;
|
|
20235
|
+
}
|
|
20236
|
+
|
|
20237
|
+
if (element.isPopoverVisible) {
|
|
20142
20238
|
this.hideBib("click");
|
|
20143
20239
|
} else {
|
|
20144
20240
|
this.showBib();
|
|
@@ -20149,63 +20245,66 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20149
20245
|
{
|
|
20150
20246
|
composed: true,
|
|
20151
20247
|
detail: {
|
|
20152
|
-
expanded:
|
|
20248
|
+
expanded: element.isPopoverVisible,
|
|
20153
20249
|
},
|
|
20154
20250
|
},
|
|
20155
20251
|
);
|
|
20156
20252
|
|
|
20157
|
-
|
|
20253
|
+
element.dispatchEvent(event);
|
|
20158
20254
|
}
|
|
20159
20255
|
|
|
20160
20256
|
handleEvent(event) {
|
|
20161
|
-
|
|
20162
|
-
|
|
20163
|
-
|
|
20164
|
-
|
|
20165
|
-
|
|
20166
|
-
|
|
20167
|
-
|
|
20168
|
-
|
|
20169
|
-
|
|
20170
|
-
|
|
20171
|
-
|
|
20172
|
-
|
|
20173
|
-
|
|
20174
|
-
|
|
20175
|
-
|
|
20176
|
-
|
|
20177
|
-
case "mouseenter":
|
|
20178
|
-
if (this.element.hoverToggle) {
|
|
20179
|
-
this.showBib();
|
|
20180
|
-
}
|
|
20181
|
-
break;
|
|
20182
|
-
case "mouseleave":
|
|
20183
|
-
if (this.element.hoverToggle) {
|
|
20184
|
-
this.hideBib("mouseleave");
|
|
20185
|
-
}
|
|
20186
|
-
break;
|
|
20187
|
-
case "focus":
|
|
20188
|
-
if (this.element.focusShow) {
|
|
20189
|
-
/*
|
|
20190
|
-
This needs to better handle clicking that gives focus -
|
|
20191
|
-
currently it shows and then immediately hides the bib
|
|
20192
|
-
*/
|
|
20193
|
-
this.showBib();
|
|
20194
|
-
}
|
|
20195
|
-
break;
|
|
20196
|
-
case "blur":
|
|
20197
|
-
// send this task 100ms later queue to
|
|
20198
|
-
// wait a frame in case focus moves within the floating element/bib
|
|
20199
|
-
setTimeout(() => this.handleFocusLoss(), 0);
|
|
20200
|
-
break;
|
|
20201
|
-
case "click":
|
|
20202
|
-
if (document.activeElement === document.body) {
|
|
20203
|
-
event.currentTarget.focus();
|
|
20204
|
-
}
|
|
20257
|
+
const element = this.element;
|
|
20258
|
+
if (!element || element.disableEventShow) {
|
|
20259
|
+
return;
|
|
20260
|
+
}
|
|
20261
|
+
|
|
20262
|
+
switch (event.type) {
|
|
20263
|
+
case "keydown": {
|
|
20264
|
+
// Support both Enter and Space keys for accessibility
|
|
20265
|
+
// Space is included as it's expected behavior for interactive elements
|
|
20266
|
+
|
|
20267
|
+
const origin = event.composedPath()[0];
|
|
20268
|
+
if (
|
|
20269
|
+
event.key === "Enter" ||
|
|
20270
|
+
(event.key === " " && (!origin || origin.tagName !== "INPUT"))
|
|
20271
|
+
) {
|
|
20272
|
+
event.preventDefault();
|
|
20205
20273
|
this.handleClick();
|
|
20206
|
-
|
|
20207
|
-
|
|
20274
|
+
}
|
|
20275
|
+
break;
|
|
20208
20276
|
}
|
|
20277
|
+
case "mouseenter":
|
|
20278
|
+
if (element.hoverToggle) {
|
|
20279
|
+
this.showBib();
|
|
20280
|
+
}
|
|
20281
|
+
break;
|
|
20282
|
+
case "mouseleave":
|
|
20283
|
+
if (element.hoverToggle) {
|
|
20284
|
+
this.hideBib("mouseleave");
|
|
20285
|
+
}
|
|
20286
|
+
break;
|
|
20287
|
+
case "focus":
|
|
20288
|
+
if (element.focusShow) {
|
|
20289
|
+
/*
|
|
20290
|
+
This needs to better handle clicking that gives focus -
|
|
20291
|
+
currently it shows and then immediately hides the bib
|
|
20292
|
+
*/
|
|
20293
|
+
this.showBib();
|
|
20294
|
+
}
|
|
20295
|
+
break;
|
|
20296
|
+
case "blur":
|
|
20297
|
+
// send this task 100ms later queue to
|
|
20298
|
+
// wait a frame in case focus moves within the floating element/bib
|
|
20299
|
+
setTimeout(() => this.handleFocusLoss(), 0);
|
|
20300
|
+
break;
|
|
20301
|
+
case "click":
|
|
20302
|
+
if (document.activeElement === document.body) {
|
|
20303
|
+
event.currentTarget.focus();
|
|
20304
|
+
}
|
|
20305
|
+
this.handleClick();
|
|
20306
|
+
break;
|
|
20307
|
+
// Do nothing
|
|
20209
20308
|
}
|
|
20210
20309
|
}
|
|
20211
20310
|
|
|
@@ -20216,6 +20315,11 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20216
20315
|
* This prevents the component itself from being focusable when the trigger element already handles focus.
|
|
20217
20316
|
*/
|
|
20218
20317
|
handleTriggerTabIndex() {
|
|
20318
|
+
const element = this.element;
|
|
20319
|
+
if (!element) {
|
|
20320
|
+
return;
|
|
20321
|
+
}
|
|
20322
|
+
|
|
20219
20323
|
const focusableElementSelectors = [
|
|
20220
20324
|
"a",
|
|
20221
20325
|
"button",
|
|
@@ -20228,7 +20332,7 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20228
20332
|
"auro-hyperlink",
|
|
20229
20333
|
];
|
|
20230
20334
|
|
|
20231
|
-
const triggerNode =
|
|
20335
|
+
const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
|
|
20232
20336
|
if (!triggerNode) {
|
|
20233
20337
|
return;
|
|
20234
20338
|
}
|
|
@@ -20237,13 +20341,13 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20237
20341
|
focusableElementSelectors.forEach((selector) => {
|
|
20238
20342
|
// Check if the trigger node element is focusable
|
|
20239
20343
|
if (triggerNodeTagName === selector) {
|
|
20240
|
-
|
|
20344
|
+
element.tabIndex = -1;
|
|
20241
20345
|
return;
|
|
20242
20346
|
}
|
|
20243
20347
|
|
|
20244
20348
|
// Check if any child is focusable
|
|
20245
20349
|
if (triggerNode.querySelector(selector)) {
|
|
20246
|
-
|
|
20350
|
+
element.tabIndex = -1;
|
|
20247
20351
|
}
|
|
20248
20352
|
});
|
|
20249
20353
|
}
|
|
@@ -20253,13 +20357,18 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20253
20357
|
* @param {*} eventPrefix
|
|
20254
20358
|
*/
|
|
20255
20359
|
regenerateBibId() {
|
|
20256
|
-
|
|
20360
|
+
const element = this.element;
|
|
20361
|
+
if (!element) {
|
|
20362
|
+
return;
|
|
20363
|
+
}
|
|
20364
|
+
|
|
20365
|
+
this.id = element.getAttribute("id");
|
|
20257
20366
|
if (!this.id) {
|
|
20258
20367
|
this.id = window.crypto.randomUUID();
|
|
20259
|
-
|
|
20368
|
+
element.setAttribute("id", this.id);
|
|
20260
20369
|
}
|
|
20261
20370
|
|
|
20262
|
-
|
|
20371
|
+
element.bib?.setAttribute("id", `${this.id}-floater-bib`);
|
|
20263
20372
|
}
|
|
20264
20373
|
|
|
20265
20374
|
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
@@ -20271,67 +20380,69 @@ let AuroFloatingUI$3 = class AuroFloatingUI {
|
|
|
20271
20380
|
this.element = elem;
|
|
20272
20381
|
}
|
|
20273
20382
|
|
|
20274
|
-
|
|
20275
|
-
|
|
20383
|
+
const element = this.element;
|
|
20384
|
+
if (!element) {
|
|
20385
|
+
return;
|
|
20386
|
+
}
|
|
20387
|
+
|
|
20388
|
+
if (this.behavior !== element.behavior) {
|
|
20389
|
+
this.behavior = element.behavior;
|
|
20276
20390
|
}
|
|
20277
20391
|
|
|
20278
|
-
if (
|
|
20392
|
+
if (element.trigger) {
|
|
20279
20393
|
this.disconnect();
|
|
20280
20394
|
}
|
|
20281
|
-
|
|
20282
|
-
|
|
20283
|
-
|
|
20284
|
-
|
|
20285
|
-
|
|
20286
|
-
|
|
20287
|
-
|
|
20288
|
-
|
|
20289
|
-
this.element.shadowRoot.querySelector("#showStateIcon");
|
|
20395
|
+
element.trigger =
|
|
20396
|
+
element.triggerElement ||
|
|
20397
|
+
element.shadowRoot?.querySelector("#trigger") ||
|
|
20398
|
+
element.trigger;
|
|
20399
|
+
element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
|
|
20400
|
+
element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
|
|
20401
|
+
element.triggerChevron =
|
|
20402
|
+
element.shadowRoot?.querySelector("#showStateIcon");
|
|
20290
20403
|
|
|
20291
|
-
if (
|
|
20292
|
-
|
|
20404
|
+
if (element.floaterConfig) {
|
|
20405
|
+
element.hoverToggle = element.floaterConfig.hoverToggle;
|
|
20293
20406
|
}
|
|
20294
20407
|
|
|
20295
20408
|
this.regenerateBibId();
|
|
20296
20409
|
this.handleTriggerTabIndex();
|
|
20297
20410
|
|
|
20298
20411
|
this.handleEvent = this.handleEvent.bind(this);
|
|
20299
|
-
if (
|
|
20412
|
+
if (element.trigger) {
|
|
20300
20413
|
if (this.enableKeyboardHandling) {
|
|
20301
|
-
|
|
20414
|
+
element.trigger.addEventListener("keydown", this.handleEvent);
|
|
20302
20415
|
}
|
|
20303
|
-
|
|
20304
|
-
|
|
20305
|
-
|
|
20306
|
-
|
|
20307
|
-
|
|
20416
|
+
element.trigger.addEventListener("click", this.handleEvent);
|
|
20417
|
+
element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
20418
|
+
element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
20419
|
+
element.trigger.addEventListener("focus", this.handleEvent);
|
|
20420
|
+
element.trigger.addEventListener("blur", this.handleEvent);
|
|
20308
20421
|
}
|
|
20309
20422
|
}
|
|
20310
20423
|
|
|
20311
20424
|
disconnect() {
|
|
20312
20425
|
this.cleanupHideHandlers();
|
|
20313
|
-
if (this.element) {
|
|
20314
|
-
this.element.cleanup?.();
|
|
20315
20426
|
|
|
20316
|
-
|
|
20317
|
-
|
|
20318
|
-
|
|
20427
|
+
const element = this.element;
|
|
20428
|
+
if (!element) {
|
|
20429
|
+
return;
|
|
20430
|
+
}
|
|
20319
20431
|
|
|
20320
|
-
|
|
20321
|
-
|
|
20322
|
-
|
|
20323
|
-
|
|
20324
|
-
|
|
20325
|
-
|
|
20326
|
-
|
|
20327
|
-
|
|
20328
|
-
|
|
20329
|
-
|
|
20330
|
-
|
|
20331
|
-
|
|
20332
|
-
|
|
20333
|
-
|
|
20334
|
-
}
|
|
20432
|
+
element.cleanup?.();
|
|
20433
|
+
|
|
20434
|
+
if (element.bib && element.shadowRoot) {
|
|
20435
|
+
element.shadowRoot.append(element.bib);
|
|
20436
|
+
}
|
|
20437
|
+
|
|
20438
|
+
// Remove event & keyboard listeners
|
|
20439
|
+
if (element.trigger) {
|
|
20440
|
+
element.trigger.removeEventListener("keydown", this.handleEvent);
|
|
20441
|
+
element.trigger.removeEventListener("click", this.handleEvent);
|
|
20442
|
+
element.trigger.removeEventListener("mouseenter", this.handleEvent);
|
|
20443
|
+
element.trigger.removeEventListener("mouseleave", this.handleEvent);
|
|
20444
|
+
element.trigger.removeEventListener("focus", this.handleEvent);
|
|
20445
|
+
element.trigger.removeEventListener("blur", this.handleEvent);
|
|
20335
20446
|
}
|
|
20336
20447
|
}
|
|
20337
20448
|
};
|
|
@@ -20788,7 +20899,7 @@ var iconVersion$2$3 = '9.1.2';
|
|
|
20788
20899
|
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
20789
20900
|
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
20790
20901
|
*/
|
|
20791
|
-
function createDisplayContext$
|
|
20902
|
+
function createDisplayContext$1$3(component, options = {}) {
|
|
20792
20903
|
const dd = options.dropdown || component.dropdown;
|
|
20793
20904
|
// isPopoverVisible reflects as the `open` attribute.
|
|
20794
20905
|
// It reports whether the bib is open in any mode (popover or modal).
|
|
@@ -20818,11 +20929,11 @@ function createDisplayContext$4(component, options = {}) {
|
|
|
20818
20929
|
* @param {Object} strategy - Map of key names to handler functions.
|
|
20819
20930
|
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
20820
20931
|
*/
|
|
20821
|
-
function applyKeyboardStrategy$
|
|
20932
|
+
function applyKeyboardStrategy$1$3(component, strategy, options = {}) {
|
|
20822
20933
|
component.addEventListener('keydown', async (evt) => {
|
|
20823
20934
|
const handler = strategy[evt.key] || strategy.default;
|
|
20824
20935
|
if (typeof handler === 'function') {
|
|
20825
|
-
const ctx = createDisplayContext$
|
|
20936
|
+
const ctx = createDisplayContext$1$3(component, options);
|
|
20826
20937
|
await handler(component, evt, ctx);
|
|
20827
20938
|
}
|
|
20828
20939
|
});
|
|
@@ -21057,7 +21168,7 @@ let AuroDropdownBib$3 = class AuroDropdownBib extends i$4 {
|
|
|
21057
21168
|
|
|
21058
21169
|
const dialog = this.shadowRoot.querySelector('dialog');
|
|
21059
21170
|
this._setupCancelHandler(dialog);
|
|
21060
|
-
applyKeyboardStrategy$
|
|
21171
|
+
applyKeyboardStrategy$1$3(dialog, createDropdownBibKeyboardStrategy$3());
|
|
21061
21172
|
|
|
21062
21173
|
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
21063
21174
|
bubbles: true,
|
|
@@ -21459,7 +21570,7 @@ let AuroHelpText$2$1 = class AuroHelpText extends i$4 {
|
|
|
21459
21570
|
}
|
|
21460
21571
|
};
|
|
21461
21572
|
|
|
21462
|
-
var formkitVersion$1$3 = '
|
|
21573
|
+
var formkitVersion$1$3 = '202604091759';
|
|
21463
21574
|
|
|
21464
21575
|
let AuroElement$2$2 = class AuroElement extends i$4 {
|
|
21465
21576
|
static get properties() {
|
|
@@ -21565,7 +21676,7 @@ let AuroElement$2$2 = class AuroElement extends i$4 {
|
|
|
21565
21676
|
}
|
|
21566
21677
|
};
|
|
21567
21678
|
|
|
21568
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
21679
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
21569
21680
|
// See LICENSE in the project root for license information.
|
|
21570
21681
|
|
|
21571
21682
|
|
|
@@ -29208,7 +29319,7 @@ let AuroHelpText$1$3 = class AuroHelpText extends i$4 {
|
|
|
29208
29319
|
}
|
|
29209
29320
|
};
|
|
29210
29321
|
|
|
29211
|
-
var formkitVersion$7 = '
|
|
29322
|
+
var formkitVersion$7 = '202604091759';
|
|
29212
29323
|
|
|
29213
29324
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
29214
29325
|
// See LICENSE in the project root for license information.
|
|
@@ -30405,7 +30516,88 @@ function guardTouchPassthrough$2(element) {
|
|
|
30405
30516
|
}, { once: true });
|
|
30406
30517
|
}
|
|
30407
30518
|
|
|
30408
|
-
|
|
30519
|
+
/**
|
|
30520
|
+
* Computes display state once per keydown event.
|
|
30521
|
+
* Centralizes null-safety checks and makes the shared/modal/popover branching explicit.
|
|
30522
|
+
*
|
|
30523
|
+
* @param {HTMLElement} component - The component with a dropdown reference.
|
|
30524
|
+
* @param {Object} [options] - Optional config.
|
|
30525
|
+
* @param {HTMLElement} [options.dropdown] - Explicit dropdown reference. Falls back to component.dropdown.
|
|
30526
|
+
* @param {Function} [options.inputResolver] - Called with (component, ctx) to resolve the active input element.
|
|
30527
|
+
* @returns {{isExpanded: boolean, isModal: boolean, isPopover: boolean, activeInput: HTMLElement|null}}
|
|
30528
|
+
* isModal and isPopover reflect the display mode (fullscreen vs not) regardless of expanded state.
|
|
30529
|
+
*/
|
|
30530
|
+
function createDisplayContext$4(component, options = {}) {
|
|
30531
|
+
const dd = options.dropdown || component.dropdown;
|
|
30532
|
+
// isPopoverVisible reflects as the `open` attribute.
|
|
30533
|
+
// It reports whether the bib is open in any mode (popover or modal).
|
|
30534
|
+
const isExpanded = Boolean(dd && dd.isPopoverVisible);
|
|
30535
|
+
const isFullscreen = Boolean(dd && dd.isBibFullscreen);
|
|
30536
|
+
|
|
30537
|
+
const ctx = {
|
|
30538
|
+
isExpanded,
|
|
30539
|
+
isModal: isFullscreen,
|
|
30540
|
+
isPopover: !isFullscreen,
|
|
30541
|
+
activeInput: null,
|
|
30542
|
+
};
|
|
30543
|
+
|
|
30544
|
+
if (options.inputResolver) {
|
|
30545
|
+
const resolvedInput = options.inputResolver(component, ctx);
|
|
30546
|
+
// Guard against resolvers returning undefined or non-HTMLElement values.
|
|
30547
|
+
ctx.activeInput = resolvedInput instanceof HTMLElement ? resolvedInput : null;
|
|
30548
|
+
}
|
|
30549
|
+
|
|
30550
|
+
return ctx;
|
|
30551
|
+
}
|
|
30552
|
+
|
|
30553
|
+
/**
|
|
30554
|
+
* Wires up a keydown listener that dispatches to strategy[evt.key] or strategy.default.
|
|
30555
|
+
* Handles both sync and async handlers.
|
|
30556
|
+
* @param {HTMLElement} component - The component to attach the listener to.
|
|
30557
|
+
* @param {Object} strategy - Map of key names to handler functions.
|
|
30558
|
+
* @param {Object} [options] - Optional config passed to createDisplayContext.
|
|
30559
|
+
*/
|
|
30560
|
+
function applyKeyboardStrategy$4(component, strategy, options = {}) {
|
|
30561
|
+
component.addEventListener('keydown', async (evt) => {
|
|
30562
|
+
const handler = strategy[evt.key] || strategy.default;
|
|
30563
|
+
if (typeof handler === 'function') {
|
|
30564
|
+
const ctx = createDisplayContext$4(component, options);
|
|
30565
|
+
await handler(component, evt, ctx);
|
|
30566
|
+
}
|
|
30567
|
+
});
|
|
30568
|
+
}
|
|
30569
|
+
|
|
30570
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
30571
|
+
// See LICENSE in the project root for license information.
|
|
30572
|
+
|
|
30573
|
+
// Authoritative datepicker keyboard behavior spec:
|
|
30574
|
+
// components/datepicker/docs/partials/keyboardBehavior.md
|
|
30575
|
+
//
|
|
30576
|
+
// Current behavior (transitional — full bib keyboard navigation is planned for a future iteration):
|
|
30577
|
+
// - The bib opens and closes via pointer/touch interaction only.
|
|
30578
|
+
// - Escape closes the bib and prevents the event from reaching parent containers.
|
|
30579
|
+
// - Tab uses the browser's default tabindex sequence across trigger controls.
|
|
30580
|
+
// - Enter and Space do not open or close the bib.
|
|
30581
|
+
//
|
|
30582
|
+
// This file is an intentional placeholder for most keys. When datepicker bib keyboard navigation is
|
|
30583
|
+
// added, handlers should go here following the same strategy pattern used by
|
|
30584
|
+
// auro-select (selectKeyboardStrategy.js) and auro-combobox (comboboxKeyboardStrategy.js).
|
|
30585
|
+
const datepickerKeyboardStrategy = {
|
|
30586
|
+
Escape(component, evt) {
|
|
30587
|
+
if (!component.dropdown || !component.dropdown.isPopoverVisible) {
|
|
30588
|
+
return;
|
|
30589
|
+
}
|
|
30590
|
+
|
|
30591
|
+
// Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups.
|
|
30592
|
+
// Because stopPropagation prevents the document-level floatingUI keydown handler from
|
|
30593
|
+
// seeing this event, we must also close the dropdown explicitly.
|
|
30594
|
+
evt.stopPropagation();
|
|
30595
|
+
|
|
30596
|
+
component.dropdown.hide();
|
|
30597
|
+
},
|
|
30598
|
+
};
|
|
30599
|
+
|
|
30600
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
30409
30601
|
// See LICENSE in the project root for license information.
|
|
30410
30602
|
|
|
30411
30603
|
|
|
@@ -31862,6 +32054,7 @@ class AuroDatePicker extends AuroElement$5 {
|
|
|
31862
32054
|
this.configureCalendar();
|
|
31863
32055
|
this.configureDatepicker();
|
|
31864
32056
|
this.configureClickHandler();
|
|
32057
|
+
applyKeyboardStrategy$4(this, datepickerKeyboardStrategy);
|
|
31865
32058
|
}
|
|
31866
32059
|
|
|
31867
32060
|
connectedCallback() {
|
|
@@ -32464,7 +32657,7 @@ let AuroLibraryRuntimeUtils$4$2 = class AuroLibraryRuntimeUtils {
|
|
|
32464
32657
|
}
|
|
32465
32658
|
};
|
|
32466
32659
|
|
|
32467
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
32660
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
32468
32661
|
// See LICENSE in the project root for license information.
|
|
32469
32662
|
|
|
32470
32663
|
|
|
@@ -33783,9 +33976,9 @@ let AuroHelpText$1$2 = class AuroHelpText extends i$4 {
|
|
|
33783
33976
|
}
|
|
33784
33977
|
};
|
|
33785
33978
|
|
|
33786
|
-
var formkitVersion$1$2 = '
|
|
33979
|
+
var formkitVersion$1$2 = '202604091759';
|
|
33787
33980
|
|
|
33788
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
33981
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
33789
33982
|
// See LICENSE in the project root for license information.
|
|
33790
33983
|
|
|
33791
33984
|
const keyboardStrategy = {
|
|
@@ -36081,11 +36274,19 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36081
36274
|
* This ensures that the bib content has the same dimensions as the sizer element.
|
|
36082
36275
|
*/
|
|
36083
36276
|
mirrorSize() {
|
|
36277
|
+
const element = this.element;
|
|
36278
|
+
if (!element) {
|
|
36279
|
+
return;
|
|
36280
|
+
}
|
|
36281
|
+
|
|
36084
36282
|
// mirror the boxsize from bibSizer
|
|
36085
|
-
if (
|
|
36086
|
-
const sizerStyle = window.getComputedStyle(
|
|
36087
|
-
const bibContent =
|
|
36088
|
-
|
|
36283
|
+
if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
|
|
36284
|
+
const sizerStyle = window.getComputedStyle(element.bibSizer);
|
|
36285
|
+
const bibContent = element.bib.shadowRoot.querySelector(".container");
|
|
36286
|
+
if (!bibContent) {
|
|
36287
|
+
return;
|
|
36288
|
+
}
|
|
36289
|
+
|
|
36089
36290
|
if (sizerStyle.width !== "0px") {
|
|
36090
36291
|
bibContent.style.width = sizerStyle.width;
|
|
36091
36292
|
}
|
|
@@ -36107,9 +36308,14 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36107
36308
|
* @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
|
|
36108
36309
|
*/
|
|
36109
36310
|
getPositioningStrategy() {
|
|
36311
|
+
const element = this.element;
|
|
36312
|
+
if (!element) {
|
|
36313
|
+
return "floating";
|
|
36314
|
+
}
|
|
36315
|
+
|
|
36110
36316
|
const breakpoint =
|
|
36111
|
-
|
|
36112
|
-
|
|
36317
|
+
element.bib?.mobileFullscreenBreakpoint ||
|
|
36318
|
+
element.floaterConfig?.fullscreenBreakpoint;
|
|
36113
36319
|
switch (this.behavior) {
|
|
36114
36320
|
case "tooltip":
|
|
36115
36321
|
return "floating";
|
|
@@ -36120,9 +36326,9 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36120
36326
|
`(max-width: ${breakpoint})`,
|
|
36121
36327
|
).matches;
|
|
36122
36328
|
|
|
36123
|
-
|
|
36329
|
+
element.expanded = smallerThanBreakpoint;
|
|
36124
36330
|
}
|
|
36125
|
-
if (
|
|
36331
|
+
if (element.nested) {
|
|
36126
36332
|
return "cover";
|
|
36127
36333
|
}
|
|
36128
36334
|
return "fullscreen";
|
|
@@ -36152,42 +36358,65 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36152
36358
|
* and applies the calculated position to the bib's style.
|
|
36153
36359
|
*/
|
|
36154
36360
|
position() {
|
|
36361
|
+
const element = this.element;
|
|
36362
|
+
if (!element) {
|
|
36363
|
+
return;
|
|
36364
|
+
}
|
|
36365
|
+
|
|
36155
36366
|
const strategy = this.getPositioningStrategy();
|
|
36156
36367
|
this.configureBibStrategy(strategy);
|
|
36157
36368
|
|
|
36158
36369
|
if (strategy === "floating") {
|
|
36370
|
+
if (!element.trigger || !element.bib) {
|
|
36371
|
+
return;
|
|
36372
|
+
}
|
|
36373
|
+
|
|
36159
36374
|
this.mirrorSize();
|
|
36160
36375
|
// Define the middlware for the floater configuration
|
|
36161
36376
|
const middleware = [
|
|
36162
|
-
offset$3(
|
|
36163
|
-
...(
|
|
36164
|
-
...(
|
|
36165
|
-
...(
|
|
36377
|
+
offset$3(element.floaterConfig?.offset || 0),
|
|
36378
|
+
...(element.floaterConfig?.shift ? [shift$3()] : []), // Add shift middleware if shift is enabled.
|
|
36379
|
+
...(element.floaterConfig?.flip ? [flip$3()] : []), // Add flip middleware if flip is enabled.
|
|
36380
|
+
...(element.floaterConfig?.autoPlacement ? [autoPlacement$3()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
|
|
36166
36381
|
];
|
|
36167
36382
|
|
|
36168
36383
|
// Compute the position of the bib
|
|
36169
|
-
computePosition$3(
|
|
36170
|
-
strategy:
|
|
36171
|
-
placement:
|
|
36384
|
+
computePosition$3(element.trigger, element.bib, {
|
|
36385
|
+
strategy: element.floaterConfig?.strategy || "fixed",
|
|
36386
|
+
placement: element.floaterConfig?.placement,
|
|
36172
36387
|
middleware: middleware || [],
|
|
36173
36388
|
}).then(({ x, y }) => {
|
|
36174
36389
|
// eslint-disable-line id-length
|
|
36175
|
-
|
|
36390
|
+
const currentElement = this.element;
|
|
36391
|
+
if (!currentElement?.bib) {
|
|
36392
|
+
return;
|
|
36393
|
+
}
|
|
36394
|
+
|
|
36395
|
+
Object.assign(currentElement.bib.style, {
|
|
36176
36396
|
left: `${x}px`,
|
|
36177
36397
|
top: `${y}px`,
|
|
36178
36398
|
});
|
|
36179
36399
|
});
|
|
36180
36400
|
} else if (strategy === "cover") {
|
|
36401
|
+
if (!element.parentNode || !element.bib) {
|
|
36402
|
+
return;
|
|
36403
|
+
}
|
|
36404
|
+
|
|
36181
36405
|
// Compute the position of the bib
|
|
36182
|
-
computePosition$3(
|
|
36406
|
+
computePosition$3(element.parentNode, element.bib, {
|
|
36183
36407
|
placement: "bottom-start",
|
|
36184
36408
|
}).then(({ x, y }) => {
|
|
36185
36409
|
// eslint-disable-line id-length
|
|
36186
|
-
|
|
36410
|
+
const currentElement = this.element;
|
|
36411
|
+
if (!currentElement?.bib || !currentElement.parentNode) {
|
|
36412
|
+
return;
|
|
36413
|
+
}
|
|
36414
|
+
|
|
36415
|
+
Object.assign(currentElement.bib.style, {
|
|
36187
36416
|
left: `${x}px`,
|
|
36188
|
-
top: `${y -
|
|
36189
|
-
width: `${
|
|
36190
|
-
height: `${
|
|
36417
|
+
top: `${y - currentElement.parentNode.offsetHeight}px`,
|
|
36418
|
+
width: `${currentElement.parentNode.offsetWidth}px`,
|
|
36419
|
+
height: `${currentElement.parentNode.offsetHeight}px`,
|
|
36191
36420
|
});
|
|
36192
36421
|
});
|
|
36193
36422
|
}
|
|
@@ -36199,11 +36428,17 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36199
36428
|
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
36200
36429
|
*/
|
|
36201
36430
|
lockScroll(lock = true) {
|
|
36431
|
+
const element = this.element;
|
|
36432
|
+
|
|
36202
36433
|
if (lock) {
|
|
36434
|
+
if (!element?.bib) {
|
|
36435
|
+
return;
|
|
36436
|
+
}
|
|
36437
|
+
|
|
36203
36438
|
document.body.style.overflow = "hidden"; // hide body's scrollbar
|
|
36204
36439
|
|
|
36205
36440
|
// Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
|
|
36206
|
-
|
|
36441
|
+
element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
|
|
36207
36442
|
} else {
|
|
36208
36443
|
document.body.style.overflow = "";
|
|
36209
36444
|
}
|
|
@@ -36219,20 +36454,24 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36219
36454
|
* @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
|
|
36220
36455
|
*/
|
|
36221
36456
|
configureBibStrategy(value) {
|
|
36457
|
+
const element = this.element;
|
|
36458
|
+
if (!element?.bib) {
|
|
36459
|
+
return;
|
|
36460
|
+
}
|
|
36461
|
+
|
|
36222
36462
|
if (value === "fullscreen") {
|
|
36223
|
-
|
|
36463
|
+
element.isBibFullscreen = true;
|
|
36224
36464
|
// reset the prev position
|
|
36225
|
-
|
|
36226
|
-
|
|
36227
|
-
|
|
36228
|
-
|
|
36229
|
-
|
|
36230
|
-
|
|
36231
|
-
|
|
36465
|
+
element.bib.setAttribute("isfullscreen", "");
|
|
36466
|
+
element.bib.style.position = "fixed";
|
|
36467
|
+
element.bib.style.top = "0px";
|
|
36468
|
+
element.bib.style.left = "0px";
|
|
36469
|
+
element.bib.style.width = "";
|
|
36470
|
+
element.bib.style.height = "";
|
|
36471
|
+
element.style.contain = "";
|
|
36232
36472
|
|
|
36233
36473
|
// reset the size that was mirroring `size` css-part
|
|
36234
|
-
const bibContent =
|
|
36235
|
-
this.element.bib.shadowRoot.querySelector(".container");
|
|
36474
|
+
const bibContent = element.bib.shadowRoot?.querySelector(".container");
|
|
36236
36475
|
if (bibContent) {
|
|
36237
36476
|
bibContent.style.width = "";
|
|
36238
36477
|
bibContent.style.height = "";
|
|
@@ -36247,14 +36486,14 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36247
36486
|
}, 0);
|
|
36248
36487
|
}
|
|
36249
36488
|
|
|
36250
|
-
if (
|
|
36489
|
+
if (element.isPopoverVisible) {
|
|
36251
36490
|
this.lockScroll(true);
|
|
36252
36491
|
}
|
|
36253
36492
|
} else {
|
|
36254
|
-
|
|
36255
|
-
|
|
36256
|
-
|
|
36257
|
-
|
|
36493
|
+
element.bib.style.position = "";
|
|
36494
|
+
element.bib.removeAttribute("isfullscreen");
|
|
36495
|
+
element.isBibFullscreen = false;
|
|
36496
|
+
element.style.contain = "layout";
|
|
36258
36497
|
}
|
|
36259
36498
|
|
|
36260
36499
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -36272,16 +36511,21 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36272
36511
|
},
|
|
36273
36512
|
);
|
|
36274
36513
|
|
|
36275
|
-
|
|
36514
|
+
element.dispatchEvent(event);
|
|
36276
36515
|
}
|
|
36277
36516
|
}
|
|
36278
36517
|
|
|
36279
36518
|
updateState() {
|
|
36280
|
-
const
|
|
36519
|
+
const element = this.element;
|
|
36520
|
+
if (!element) {
|
|
36521
|
+
return;
|
|
36522
|
+
}
|
|
36523
|
+
|
|
36524
|
+
const isVisible = element.isPopoverVisible;
|
|
36281
36525
|
if (!isVisible) {
|
|
36282
36526
|
this.cleanupHideHandlers();
|
|
36283
36527
|
try {
|
|
36284
|
-
|
|
36528
|
+
element.cleanup?.();
|
|
36285
36529
|
} catch (error) {
|
|
36286
36530
|
// Do nothing
|
|
36287
36531
|
}
|
|
@@ -36297,28 +36541,30 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36297
36541
|
* If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
|
|
36298
36542
|
*/
|
|
36299
36543
|
handleFocusLoss() {
|
|
36544
|
+
const element = this.element;
|
|
36545
|
+
if (!element?.bib) {
|
|
36546
|
+
return;
|
|
36547
|
+
}
|
|
36548
|
+
|
|
36300
36549
|
// if mouse is being pressed, skip and let click event to handle the action
|
|
36301
36550
|
if (AuroFloatingUI.isMousePressed) {
|
|
36302
36551
|
return;
|
|
36303
36552
|
}
|
|
36304
36553
|
|
|
36305
36554
|
if (
|
|
36306
|
-
|
|
36307
|
-
|
|
36555
|
+
element.noHideOnThisFocusLoss ||
|
|
36556
|
+
element.hasAttribute("noHideOnThisFocusLoss")
|
|
36308
36557
|
) {
|
|
36309
36558
|
return;
|
|
36310
36559
|
}
|
|
36311
36560
|
|
|
36312
36561
|
// if focus is still inside of trigger or bib, do not close
|
|
36313
|
-
if (
|
|
36314
|
-
this.element.matches(":focus") ||
|
|
36315
|
-
this.element.matches(":focus-within")
|
|
36316
|
-
) {
|
|
36562
|
+
if (element.matches(":focus") || element.matches(":focus-within")) {
|
|
36317
36563
|
return;
|
|
36318
36564
|
}
|
|
36319
36565
|
|
|
36320
36566
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
36321
|
-
if (
|
|
36567
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
36322
36568
|
return;
|
|
36323
36569
|
}
|
|
36324
36570
|
|
|
@@ -36326,23 +36572,33 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36326
36572
|
}
|
|
36327
36573
|
|
|
36328
36574
|
setupHideHandlers() {
|
|
36575
|
+
const element = this.element;
|
|
36576
|
+
if (!element) {
|
|
36577
|
+
return;
|
|
36578
|
+
}
|
|
36579
|
+
|
|
36329
36580
|
// Define handlers & store references
|
|
36330
36581
|
this.focusHandler = () => this.handleFocusLoss();
|
|
36331
36582
|
|
|
36332
36583
|
this.clickHandler = (evt) => {
|
|
36584
|
+
const element = this.element;
|
|
36585
|
+
if (!element?.bib) {
|
|
36586
|
+
return;
|
|
36587
|
+
}
|
|
36588
|
+
|
|
36333
36589
|
// When the bib is fullscreen (modal dialog), don't close on outside
|
|
36334
36590
|
// clicks. VoiceOver's synthetic click events inside a top-layer modal
|
|
36335
36591
|
// <dialog> may not include the bib in composedPath(), causing false
|
|
36336
36592
|
// positives. This mirrors the fullscreen guard in handleFocusLoss().
|
|
36337
|
-
if (
|
|
36593
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
36338
36594
|
return;
|
|
36339
36595
|
}
|
|
36340
36596
|
|
|
36341
36597
|
if (
|
|
36342
|
-
(!evt.composedPath().includes(
|
|
36343
|
-
!evt.composedPath().includes(
|
|
36344
|
-
(
|
|
36345
|
-
evt.composedPath().includes(
|
|
36598
|
+
(!evt.composedPath().includes(element.trigger) &&
|
|
36599
|
+
!evt.composedPath().includes(element.bib)) ||
|
|
36600
|
+
(element.bib.backdrop &&
|
|
36601
|
+
evt.composedPath().includes(element.bib.backdrop))
|
|
36346
36602
|
) {
|
|
36347
36603
|
const existedVisibleFloatingUI =
|
|
36348
36604
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -36363,7 +36619,12 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36363
36619
|
|
|
36364
36620
|
// ESC key handler
|
|
36365
36621
|
this.keyDownHandler = (evt) => {
|
|
36366
|
-
|
|
36622
|
+
const element = this.element;
|
|
36623
|
+
if (!element) {
|
|
36624
|
+
return;
|
|
36625
|
+
}
|
|
36626
|
+
|
|
36627
|
+
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
36367
36628
|
const existedVisibleFloatingUI =
|
|
36368
36629
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
36369
36630
|
if (
|
|
@@ -36420,6 +36681,10 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36420
36681
|
}
|
|
36421
36682
|
|
|
36422
36683
|
updateCurrentExpandedDropdown() {
|
|
36684
|
+
if (!this.element) {
|
|
36685
|
+
return;
|
|
36686
|
+
}
|
|
36687
|
+
|
|
36423
36688
|
// Close any other dropdown that is already open
|
|
36424
36689
|
const existedVisibleFloatingUI =
|
|
36425
36690
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -36436,25 +36701,34 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36436
36701
|
}
|
|
36437
36702
|
|
|
36438
36703
|
showBib() {
|
|
36439
|
-
|
|
36704
|
+
const element = this.element;
|
|
36705
|
+
if (!element) {
|
|
36706
|
+
return;
|
|
36707
|
+
}
|
|
36708
|
+
|
|
36709
|
+
if (!element.bib || (!element.trigger && !element.parentNode)) {
|
|
36710
|
+
return;
|
|
36711
|
+
}
|
|
36712
|
+
|
|
36713
|
+
if (!element.disabled && !this.showing) {
|
|
36440
36714
|
this.updateCurrentExpandedDropdown();
|
|
36441
|
-
|
|
36715
|
+
element.triggerChevron?.setAttribute("data-expanded", true);
|
|
36442
36716
|
|
|
36443
36717
|
// prevent double showing: isPopovervisible gets first and showBib gets called later
|
|
36444
36718
|
if (!this.showing) {
|
|
36445
|
-
if (!
|
|
36719
|
+
if (!element.modal) {
|
|
36446
36720
|
this.setupHideHandlers();
|
|
36447
36721
|
}
|
|
36448
36722
|
this.showing = true;
|
|
36449
|
-
|
|
36723
|
+
element.isPopoverVisible = true;
|
|
36450
36724
|
this.position();
|
|
36451
36725
|
this.dispatchEventDropdownToggle();
|
|
36452
36726
|
}
|
|
36453
36727
|
|
|
36454
36728
|
// Setup auto update to handle resize and scroll
|
|
36455
|
-
|
|
36456
|
-
|
|
36457
|
-
|
|
36729
|
+
element.cleanup = autoUpdate$2(
|
|
36730
|
+
element.trigger || element.parentNode,
|
|
36731
|
+
element.bib,
|
|
36458
36732
|
() => {
|
|
36459
36733
|
this.position();
|
|
36460
36734
|
},
|
|
@@ -36467,22 +36741,27 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36467
36741
|
* @param {String} eventType - The event type that triggered the hiding action.
|
|
36468
36742
|
*/
|
|
36469
36743
|
hideBib(eventType = "unknown") {
|
|
36470
|
-
|
|
36744
|
+
const element = this.element;
|
|
36745
|
+
if (!element) {
|
|
36746
|
+
return;
|
|
36747
|
+
}
|
|
36748
|
+
|
|
36749
|
+
if (element.disabled) {
|
|
36471
36750
|
return;
|
|
36472
36751
|
}
|
|
36473
36752
|
|
|
36474
36753
|
// noToggle dropdowns should not close when the trigger is clicked (the
|
|
36475
36754
|
// "toggle" behavior), but they CAN still close via other interactions like
|
|
36476
36755
|
// Escape key or focus loss.
|
|
36477
|
-
if (
|
|
36756
|
+
if (element.noToggle && eventType === "click") {
|
|
36478
36757
|
return;
|
|
36479
36758
|
}
|
|
36480
36759
|
|
|
36481
36760
|
this.lockScroll(false);
|
|
36482
|
-
|
|
36761
|
+
element.triggerChevron?.removeAttribute("data-expanded");
|
|
36483
36762
|
|
|
36484
|
-
if (
|
|
36485
|
-
|
|
36763
|
+
if (element.isPopoverVisible) {
|
|
36764
|
+
element.isPopoverVisible = false;
|
|
36486
36765
|
}
|
|
36487
36766
|
if (this.showing) {
|
|
36488
36767
|
this.cleanupHideHandlers();
|
|
@@ -36502,6 +36781,11 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36502
36781
|
* @param {String} eventType - The event type that triggered the toggle action.
|
|
36503
36782
|
*/
|
|
36504
36783
|
dispatchEventDropdownToggle(eventType) {
|
|
36784
|
+
const element = this.element;
|
|
36785
|
+
if (!element) {
|
|
36786
|
+
return;
|
|
36787
|
+
}
|
|
36788
|
+
|
|
36505
36789
|
const event = new CustomEvent(
|
|
36506
36790
|
this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
|
|
36507
36791
|
{
|
|
@@ -36513,11 +36797,16 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36513
36797
|
},
|
|
36514
36798
|
);
|
|
36515
36799
|
|
|
36516
|
-
|
|
36800
|
+
element.dispatchEvent(event);
|
|
36517
36801
|
}
|
|
36518
36802
|
|
|
36519
36803
|
handleClick() {
|
|
36520
|
-
|
|
36804
|
+
const element = this.element;
|
|
36805
|
+
if (!element) {
|
|
36806
|
+
return;
|
|
36807
|
+
}
|
|
36808
|
+
|
|
36809
|
+
if (element.isPopoverVisible) {
|
|
36521
36810
|
this.hideBib("click");
|
|
36522
36811
|
} else {
|
|
36523
36812
|
this.showBib();
|
|
@@ -36528,63 +36817,66 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36528
36817
|
{
|
|
36529
36818
|
composed: true,
|
|
36530
36819
|
detail: {
|
|
36531
|
-
expanded:
|
|
36820
|
+
expanded: element.isPopoverVisible,
|
|
36532
36821
|
},
|
|
36533
36822
|
},
|
|
36534
36823
|
);
|
|
36535
36824
|
|
|
36536
|
-
|
|
36825
|
+
element.dispatchEvent(event);
|
|
36537
36826
|
}
|
|
36538
36827
|
|
|
36539
36828
|
handleEvent(event) {
|
|
36540
|
-
|
|
36541
|
-
|
|
36542
|
-
|
|
36543
|
-
|
|
36544
|
-
|
|
36545
|
-
|
|
36546
|
-
|
|
36547
|
-
|
|
36548
|
-
|
|
36549
|
-
|
|
36550
|
-
|
|
36551
|
-
|
|
36552
|
-
|
|
36553
|
-
|
|
36554
|
-
|
|
36555
|
-
|
|
36556
|
-
case "mouseenter":
|
|
36557
|
-
if (this.element.hoverToggle) {
|
|
36558
|
-
this.showBib();
|
|
36559
|
-
}
|
|
36560
|
-
break;
|
|
36561
|
-
case "mouseleave":
|
|
36562
|
-
if (this.element.hoverToggle) {
|
|
36563
|
-
this.hideBib("mouseleave");
|
|
36564
|
-
}
|
|
36565
|
-
break;
|
|
36566
|
-
case "focus":
|
|
36567
|
-
if (this.element.focusShow) {
|
|
36568
|
-
/*
|
|
36569
|
-
This needs to better handle clicking that gives focus -
|
|
36570
|
-
currently it shows and then immediately hides the bib
|
|
36571
|
-
*/
|
|
36572
|
-
this.showBib();
|
|
36573
|
-
}
|
|
36574
|
-
break;
|
|
36575
|
-
case "blur":
|
|
36576
|
-
// send this task 100ms later queue to
|
|
36577
|
-
// wait a frame in case focus moves within the floating element/bib
|
|
36578
|
-
setTimeout(() => this.handleFocusLoss(), 0);
|
|
36579
|
-
break;
|
|
36580
|
-
case "click":
|
|
36581
|
-
if (document.activeElement === document.body) {
|
|
36582
|
-
event.currentTarget.focus();
|
|
36583
|
-
}
|
|
36829
|
+
const element = this.element;
|
|
36830
|
+
if (!element || element.disableEventShow) {
|
|
36831
|
+
return;
|
|
36832
|
+
}
|
|
36833
|
+
|
|
36834
|
+
switch (event.type) {
|
|
36835
|
+
case "keydown": {
|
|
36836
|
+
// Support both Enter and Space keys for accessibility
|
|
36837
|
+
// Space is included as it's expected behavior for interactive elements
|
|
36838
|
+
|
|
36839
|
+
const origin = event.composedPath()[0];
|
|
36840
|
+
if (
|
|
36841
|
+
event.key === "Enter" ||
|
|
36842
|
+
(event.key === " " && (!origin || origin.tagName !== "INPUT"))
|
|
36843
|
+
) {
|
|
36844
|
+
event.preventDefault();
|
|
36584
36845
|
this.handleClick();
|
|
36585
|
-
|
|
36586
|
-
|
|
36846
|
+
}
|
|
36847
|
+
break;
|
|
36587
36848
|
}
|
|
36849
|
+
case "mouseenter":
|
|
36850
|
+
if (element.hoverToggle) {
|
|
36851
|
+
this.showBib();
|
|
36852
|
+
}
|
|
36853
|
+
break;
|
|
36854
|
+
case "mouseleave":
|
|
36855
|
+
if (element.hoverToggle) {
|
|
36856
|
+
this.hideBib("mouseleave");
|
|
36857
|
+
}
|
|
36858
|
+
break;
|
|
36859
|
+
case "focus":
|
|
36860
|
+
if (element.focusShow) {
|
|
36861
|
+
/*
|
|
36862
|
+
This needs to better handle clicking that gives focus -
|
|
36863
|
+
currently it shows and then immediately hides the bib
|
|
36864
|
+
*/
|
|
36865
|
+
this.showBib();
|
|
36866
|
+
}
|
|
36867
|
+
break;
|
|
36868
|
+
case "blur":
|
|
36869
|
+
// send this task 100ms later queue to
|
|
36870
|
+
// wait a frame in case focus moves within the floating element/bib
|
|
36871
|
+
setTimeout(() => this.handleFocusLoss(), 0);
|
|
36872
|
+
break;
|
|
36873
|
+
case "click":
|
|
36874
|
+
if (document.activeElement === document.body) {
|
|
36875
|
+
event.currentTarget.focus();
|
|
36876
|
+
}
|
|
36877
|
+
this.handleClick();
|
|
36878
|
+
break;
|
|
36879
|
+
// Do nothing
|
|
36588
36880
|
}
|
|
36589
36881
|
}
|
|
36590
36882
|
|
|
@@ -36595,6 +36887,11 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36595
36887
|
* This prevents the component itself from being focusable when the trigger element already handles focus.
|
|
36596
36888
|
*/
|
|
36597
36889
|
handleTriggerTabIndex() {
|
|
36890
|
+
const element = this.element;
|
|
36891
|
+
if (!element) {
|
|
36892
|
+
return;
|
|
36893
|
+
}
|
|
36894
|
+
|
|
36598
36895
|
const focusableElementSelectors = [
|
|
36599
36896
|
"a",
|
|
36600
36897
|
"button",
|
|
@@ -36607,7 +36904,7 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36607
36904
|
"auro-hyperlink",
|
|
36608
36905
|
];
|
|
36609
36906
|
|
|
36610
|
-
const triggerNode =
|
|
36907
|
+
const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
|
|
36611
36908
|
if (!triggerNode) {
|
|
36612
36909
|
return;
|
|
36613
36910
|
}
|
|
@@ -36616,13 +36913,13 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36616
36913
|
focusableElementSelectors.forEach((selector) => {
|
|
36617
36914
|
// Check if the trigger node element is focusable
|
|
36618
36915
|
if (triggerNodeTagName === selector) {
|
|
36619
|
-
|
|
36916
|
+
element.tabIndex = -1;
|
|
36620
36917
|
return;
|
|
36621
36918
|
}
|
|
36622
36919
|
|
|
36623
36920
|
// Check if any child is focusable
|
|
36624
36921
|
if (triggerNode.querySelector(selector)) {
|
|
36625
|
-
|
|
36922
|
+
element.tabIndex = -1;
|
|
36626
36923
|
}
|
|
36627
36924
|
});
|
|
36628
36925
|
}
|
|
@@ -36632,13 +36929,18 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36632
36929
|
* @param {*} eventPrefix
|
|
36633
36930
|
*/
|
|
36634
36931
|
regenerateBibId() {
|
|
36635
|
-
|
|
36932
|
+
const element = this.element;
|
|
36933
|
+
if (!element) {
|
|
36934
|
+
return;
|
|
36935
|
+
}
|
|
36936
|
+
|
|
36937
|
+
this.id = element.getAttribute("id");
|
|
36636
36938
|
if (!this.id) {
|
|
36637
36939
|
this.id = window.crypto.randomUUID();
|
|
36638
|
-
|
|
36940
|
+
element.setAttribute("id", this.id);
|
|
36639
36941
|
}
|
|
36640
36942
|
|
|
36641
|
-
|
|
36943
|
+
element.bib?.setAttribute("id", `${this.id}-floater-bib`);
|
|
36642
36944
|
}
|
|
36643
36945
|
|
|
36644
36946
|
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
@@ -36650,67 +36952,69 @@ let AuroFloatingUI$2 = class AuroFloatingUI {
|
|
|
36650
36952
|
this.element = elem;
|
|
36651
36953
|
}
|
|
36652
36954
|
|
|
36653
|
-
|
|
36654
|
-
|
|
36955
|
+
const element = this.element;
|
|
36956
|
+
if (!element) {
|
|
36957
|
+
return;
|
|
36958
|
+
}
|
|
36959
|
+
|
|
36960
|
+
if (this.behavior !== element.behavior) {
|
|
36961
|
+
this.behavior = element.behavior;
|
|
36655
36962
|
}
|
|
36656
36963
|
|
|
36657
|
-
if (
|
|
36964
|
+
if (element.trigger) {
|
|
36658
36965
|
this.disconnect();
|
|
36659
36966
|
}
|
|
36660
|
-
|
|
36661
|
-
|
|
36662
|
-
|
|
36663
|
-
|
|
36664
|
-
|
|
36665
|
-
|
|
36666
|
-
|
|
36667
|
-
|
|
36668
|
-
this.element.shadowRoot.querySelector("#showStateIcon");
|
|
36967
|
+
element.trigger =
|
|
36968
|
+
element.triggerElement ||
|
|
36969
|
+
element.shadowRoot?.querySelector("#trigger") ||
|
|
36970
|
+
element.trigger;
|
|
36971
|
+
element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
|
|
36972
|
+
element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
|
|
36973
|
+
element.triggerChevron =
|
|
36974
|
+
element.shadowRoot?.querySelector("#showStateIcon");
|
|
36669
36975
|
|
|
36670
|
-
if (
|
|
36671
|
-
|
|
36976
|
+
if (element.floaterConfig) {
|
|
36977
|
+
element.hoverToggle = element.floaterConfig.hoverToggle;
|
|
36672
36978
|
}
|
|
36673
36979
|
|
|
36674
36980
|
this.regenerateBibId();
|
|
36675
36981
|
this.handleTriggerTabIndex();
|
|
36676
36982
|
|
|
36677
36983
|
this.handleEvent = this.handleEvent.bind(this);
|
|
36678
|
-
if (
|
|
36984
|
+
if (element.trigger) {
|
|
36679
36985
|
if (this.enableKeyboardHandling) {
|
|
36680
|
-
|
|
36986
|
+
element.trigger.addEventListener("keydown", this.handleEvent);
|
|
36681
36987
|
}
|
|
36682
|
-
|
|
36683
|
-
|
|
36684
|
-
|
|
36685
|
-
|
|
36686
|
-
|
|
36988
|
+
element.trigger.addEventListener("click", this.handleEvent);
|
|
36989
|
+
element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
36990
|
+
element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
36991
|
+
element.trigger.addEventListener("focus", this.handleEvent);
|
|
36992
|
+
element.trigger.addEventListener("blur", this.handleEvent);
|
|
36687
36993
|
}
|
|
36688
36994
|
}
|
|
36689
36995
|
|
|
36690
36996
|
disconnect() {
|
|
36691
36997
|
this.cleanupHideHandlers();
|
|
36692
|
-
if (this.element) {
|
|
36693
|
-
this.element.cleanup?.();
|
|
36694
36998
|
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36999
|
+
const element = this.element;
|
|
37000
|
+
if (!element) {
|
|
37001
|
+
return;
|
|
37002
|
+
}
|
|
36698
37003
|
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36704
|
-
|
|
36705
|
-
|
|
36706
|
-
|
|
36707
|
-
|
|
36708
|
-
|
|
36709
|
-
|
|
36710
|
-
|
|
36711
|
-
|
|
36712
|
-
|
|
36713
|
-
}
|
|
37004
|
+
element.cleanup?.();
|
|
37005
|
+
|
|
37006
|
+
if (element.bib && element.shadowRoot) {
|
|
37007
|
+
element.shadowRoot.append(element.bib);
|
|
37008
|
+
}
|
|
37009
|
+
|
|
37010
|
+
// Remove event & keyboard listeners
|
|
37011
|
+
if (element.trigger) {
|
|
37012
|
+
element.trigger.removeEventListener("keydown", this.handleEvent);
|
|
37013
|
+
element.trigger.removeEventListener("click", this.handleEvent);
|
|
37014
|
+
element.trigger.removeEventListener("mouseenter", this.handleEvent);
|
|
37015
|
+
element.trigger.removeEventListener("mouseleave", this.handleEvent);
|
|
37016
|
+
element.trigger.removeEventListener("focus", this.handleEvent);
|
|
37017
|
+
element.trigger.removeEventListener("blur", this.handleEvent);
|
|
36714
37018
|
}
|
|
36715
37019
|
}
|
|
36716
37020
|
};
|
|
@@ -37838,7 +38142,7 @@ let AuroHelpText$6 = class AuroHelpText extends i$4 {
|
|
|
37838
38142
|
}
|
|
37839
38143
|
};
|
|
37840
38144
|
|
|
37841
|
-
var formkitVersion$6 = '
|
|
38145
|
+
var formkitVersion$6 = '202604091759';
|
|
37842
38146
|
|
|
37843
38147
|
let AuroElement$1$2 = class AuroElement extends i$4 {
|
|
37844
38148
|
static get properties() {
|
|
@@ -37944,7 +38248,7 @@ let AuroElement$1$2 = class AuroElement extends i$4 {
|
|
|
37944
38248
|
}
|
|
37945
38249
|
};
|
|
37946
38250
|
|
|
37947
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
38251
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
37948
38252
|
// See LICENSE in the project root for license information.
|
|
37949
38253
|
|
|
37950
38254
|
|
|
@@ -39504,6 +39808,24 @@ let AuroElement$4 = class AuroElement extends i$4 {
|
|
|
39504
39808
|
}
|
|
39505
39809
|
};
|
|
39506
39810
|
|
|
39811
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
39812
|
+
// See LICENSE in the project root for license information.
|
|
39813
|
+
|
|
39814
|
+
const counterGroupKeyboardStrategy = {
|
|
39815
|
+
Escape(component, evt) {
|
|
39816
|
+
if (!component.dropdown || !component.dropdown.isPopoverVisible) {
|
|
39817
|
+
return;
|
|
39818
|
+
}
|
|
39819
|
+
|
|
39820
|
+
// Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups.
|
|
39821
|
+
// Because stopPropagation prevents the document-level floatingUI keydown handler from
|
|
39822
|
+
// seeing this event, we must also close the dropdown explicitly.
|
|
39823
|
+
evt.stopPropagation();
|
|
39824
|
+
|
|
39825
|
+
component.dropdown.hide();
|
|
39826
|
+
},
|
|
39827
|
+
};
|
|
39828
|
+
|
|
39507
39829
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions, max-lines, no-underscore-dangle, arrow-parens, no-confusing-arrow, curly, dot-location, no-inline-comments, line-comment-position,
|
|
39508
39830
|
*/
|
|
39509
39831
|
|
|
@@ -40104,6 +40426,10 @@ class AuroCounterGroup extends AuroElement$4 {
|
|
|
40104
40426
|
super.firstUpdated();
|
|
40105
40427
|
this.updateValue();
|
|
40106
40428
|
this.updateValueText();
|
|
40429
|
+
|
|
40430
|
+
if (this.isDropdown) {
|
|
40431
|
+
applyKeyboardStrategy$1$2(this, counterGroupKeyboardStrategy);
|
|
40432
|
+
}
|
|
40107
40433
|
}
|
|
40108
40434
|
|
|
40109
40435
|
/**
|
|
@@ -40422,7 +40748,7 @@ let AuroLibraryRuntimeUtils$1$5 = class AuroLibraryRuntimeUtils {
|
|
|
40422
40748
|
};
|
|
40423
40749
|
|
|
40424
40750
|
/* eslint-disable max-lines, no-underscore-dangle */
|
|
40425
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
40751
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
40426
40752
|
// See LICENSE in the project root for license information.
|
|
40427
40753
|
|
|
40428
40754
|
|
|
@@ -41900,7 +42226,7 @@ let AuroHelpText$5 = class AuroHelpText extends i$4 {
|
|
|
41900
42226
|
}
|
|
41901
42227
|
};
|
|
41902
42228
|
|
|
41903
|
-
var formkitVersion$5 = '
|
|
42229
|
+
var formkitVersion$5 = '202604091759';
|
|
41904
42230
|
|
|
41905
42231
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
41906
42232
|
// See LICENSE in the project root for license information.
|
|
@@ -42531,7 +42857,7 @@ let AuroLibraryRuntimeUtils$1$4 = class AuroLibraryRuntimeUtils {
|
|
|
42531
42857
|
}
|
|
42532
42858
|
};
|
|
42533
42859
|
|
|
42534
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
42860
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
42535
42861
|
// See LICENSE in the project root for license information.
|
|
42536
42862
|
|
|
42537
42863
|
|
|
@@ -44069,9 +44395,9 @@ let AuroHelpText$4 = class AuroHelpText extends i$4 {
|
|
|
44069
44395
|
}
|
|
44070
44396
|
};
|
|
44071
44397
|
|
|
44072
|
-
var formkitVersion$4 = '
|
|
44398
|
+
var formkitVersion$4 = '202604091759';
|
|
44073
44399
|
|
|
44074
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
44400
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
44075
44401
|
// See LICENSE in the project root for license information.
|
|
44076
44402
|
|
|
44077
44403
|
|
|
@@ -45785,10 +46111,19 @@ const comboboxKeyboardStrategy = {
|
|
|
45785
46111
|
}
|
|
45786
46112
|
},
|
|
45787
46113
|
|
|
45788
|
-
Escape(component,
|
|
45789
|
-
if (ctx.isExpanded
|
|
46114
|
+
Escape(component, evt, ctx) {
|
|
46115
|
+
if (!ctx.isExpanded) {
|
|
46116
|
+
return;
|
|
46117
|
+
}
|
|
46118
|
+
|
|
46119
|
+
// Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups
|
|
46120
|
+
evt.stopPropagation();
|
|
46121
|
+
|
|
46122
|
+
if (ctx.isModal) {
|
|
45790
46123
|
component.setTriggerInputFocus();
|
|
45791
46124
|
}
|
|
46125
|
+
|
|
46126
|
+
component.hideBib();
|
|
45792
46127
|
},
|
|
45793
46128
|
|
|
45794
46129
|
Home(component, evt, ctx) {
|
|
@@ -47652,11 +47987,19 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47652
47987
|
* This ensures that the bib content has the same dimensions as the sizer element.
|
|
47653
47988
|
*/
|
|
47654
47989
|
mirrorSize() {
|
|
47990
|
+
const element = this.element;
|
|
47991
|
+
if (!element) {
|
|
47992
|
+
return;
|
|
47993
|
+
}
|
|
47994
|
+
|
|
47655
47995
|
// mirror the boxsize from bibSizer
|
|
47656
|
-
if (
|
|
47657
|
-
const sizerStyle = window.getComputedStyle(
|
|
47658
|
-
const bibContent =
|
|
47659
|
-
|
|
47996
|
+
if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
|
|
47997
|
+
const sizerStyle = window.getComputedStyle(element.bibSizer);
|
|
47998
|
+
const bibContent = element.bib.shadowRoot.querySelector(".container");
|
|
47999
|
+
if (!bibContent) {
|
|
48000
|
+
return;
|
|
48001
|
+
}
|
|
48002
|
+
|
|
47660
48003
|
if (sizerStyle.width !== "0px") {
|
|
47661
48004
|
bibContent.style.width = sizerStyle.width;
|
|
47662
48005
|
}
|
|
@@ -47678,9 +48021,14 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47678
48021
|
* @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
|
|
47679
48022
|
*/
|
|
47680
48023
|
getPositioningStrategy() {
|
|
48024
|
+
const element = this.element;
|
|
48025
|
+
if (!element) {
|
|
48026
|
+
return "floating";
|
|
48027
|
+
}
|
|
48028
|
+
|
|
47681
48029
|
const breakpoint =
|
|
47682
|
-
|
|
47683
|
-
|
|
48030
|
+
element.bib?.mobileFullscreenBreakpoint ||
|
|
48031
|
+
element.floaterConfig?.fullscreenBreakpoint;
|
|
47684
48032
|
switch (this.behavior) {
|
|
47685
48033
|
case "tooltip":
|
|
47686
48034
|
return "floating";
|
|
@@ -47691,9 +48039,9 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47691
48039
|
`(max-width: ${breakpoint})`,
|
|
47692
48040
|
).matches;
|
|
47693
48041
|
|
|
47694
|
-
|
|
48042
|
+
element.expanded = smallerThanBreakpoint;
|
|
47695
48043
|
}
|
|
47696
|
-
if (
|
|
48044
|
+
if (element.nested) {
|
|
47697
48045
|
return "cover";
|
|
47698
48046
|
}
|
|
47699
48047
|
return "fullscreen";
|
|
@@ -47723,42 +48071,65 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47723
48071
|
* and applies the calculated position to the bib's style.
|
|
47724
48072
|
*/
|
|
47725
48073
|
position() {
|
|
48074
|
+
const element = this.element;
|
|
48075
|
+
if (!element) {
|
|
48076
|
+
return;
|
|
48077
|
+
}
|
|
48078
|
+
|
|
47726
48079
|
const strategy = this.getPositioningStrategy();
|
|
47727
48080
|
this.configureBibStrategy(strategy);
|
|
47728
48081
|
|
|
47729
48082
|
if (strategy === "floating") {
|
|
48083
|
+
if (!element.trigger || !element.bib) {
|
|
48084
|
+
return;
|
|
48085
|
+
}
|
|
48086
|
+
|
|
47730
48087
|
this.mirrorSize();
|
|
47731
48088
|
// Define the middlware for the floater configuration
|
|
47732
48089
|
const middleware = [
|
|
47733
|
-
offset$2(
|
|
47734
|
-
...(
|
|
47735
|
-
...(
|
|
47736
|
-
...(
|
|
48090
|
+
offset$2(element.floaterConfig?.offset || 0),
|
|
48091
|
+
...(element.floaterConfig?.shift ? [shift$2()] : []), // Add shift middleware if shift is enabled.
|
|
48092
|
+
...(element.floaterConfig?.flip ? [flip$2()] : []), // Add flip middleware if flip is enabled.
|
|
48093
|
+
...(element.floaterConfig?.autoPlacement ? [autoPlacement$2()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
|
|
47737
48094
|
];
|
|
47738
48095
|
|
|
47739
48096
|
// Compute the position of the bib
|
|
47740
|
-
computePosition$2(
|
|
47741
|
-
strategy:
|
|
47742
|
-
placement:
|
|
48097
|
+
computePosition$2(element.trigger, element.bib, {
|
|
48098
|
+
strategy: element.floaterConfig?.strategy || "fixed",
|
|
48099
|
+
placement: element.floaterConfig?.placement,
|
|
47743
48100
|
middleware: middleware || [],
|
|
47744
48101
|
}).then(({ x, y }) => {
|
|
47745
48102
|
// eslint-disable-line id-length
|
|
47746
|
-
|
|
48103
|
+
const currentElement = this.element;
|
|
48104
|
+
if (!currentElement?.bib) {
|
|
48105
|
+
return;
|
|
48106
|
+
}
|
|
48107
|
+
|
|
48108
|
+
Object.assign(currentElement.bib.style, {
|
|
47747
48109
|
left: `${x}px`,
|
|
47748
48110
|
top: `${y}px`,
|
|
47749
48111
|
});
|
|
47750
48112
|
});
|
|
47751
48113
|
} else if (strategy === "cover") {
|
|
48114
|
+
if (!element.parentNode || !element.bib) {
|
|
48115
|
+
return;
|
|
48116
|
+
}
|
|
48117
|
+
|
|
47752
48118
|
// Compute the position of the bib
|
|
47753
|
-
computePosition$2(
|
|
48119
|
+
computePosition$2(element.parentNode, element.bib, {
|
|
47754
48120
|
placement: "bottom-start",
|
|
47755
48121
|
}).then(({ x, y }) => {
|
|
47756
48122
|
// eslint-disable-line id-length
|
|
47757
|
-
|
|
48123
|
+
const currentElement = this.element;
|
|
48124
|
+
if (!currentElement?.bib || !currentElement.parentNode) {
|
|
48125
|
+
return;
|
|
48126
|
+
}
|
|
48127
|
+
|
|
48128
|
+
Object.assign(currentElement.bib.style, {
|
|
47758
48129
|
left: `${x}px`,
|
|
47759
|
-
top: `${y -
|
|
47760
|
-
width: `${
|
|
47761
|
-
height: `${
|
|
48130
|
+
top: `${y - currentElement.parentNode.offsetHeight}px`,
|
|
48131
|
+
width: `${currentElement.parentNode.offsetWidth}px`,
|
|
48132
|
+
height: `${currentElement.parentNode.offsetHeight}px`,
|
|
47762
48133
|
});
|
|
47763
48134
|
});
|
|
47764
48135
|
}
|
|
@@ -47770,11 +48141,17 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47770
48141
|
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
47771
48142
|
*/
|
|
47772
48143
|
lockScroll(lock = true) {
|
|
48144
|
+
const element = this.element;
|
|
48145
|
+
|
|
47773
48146
|
if (lock) {
|
|
48147
|
+
if (!element?.bib) {
|
|
48148
|
+
return;
|
|
48149
|
+
}
|
|
48150
|
+
|
|
47774
48151
|
document.body.style.overflow = "hidden"; // hide body's scrollbar
|
|
47775
48152
|
|
|
47776
48153
|
// Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
|
|
47777
|
-
|
|
48154
|
+
element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
|
|
47778
48155
|
} else {
|
|
47779
48156
|
document.body.style.overflow = "";
|
|
47780
48157
|
}
|
|
@@ -47790,20 +48167,24 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47790
48167
|
* @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
|
|
47791
48168
|
*/
|
|
47792
48169
|
configureBibStrategy(value) {
|
|
48170
|
+
const element = this.element;
|
|
48171
|
+
if (!element?.bib) {
|
|
48172
|
+
return;
|
|
48173
|
+
}
|
|
48174
|
+
|
|
47793
48175
|
if (value === "fullscreen") {
|
|
47794
|
-
|
|
48176
|
+
element.isBibFullscreen = true;
|
|
47795
48177
|
// reset the prev position
|
|
47796
|
-
|
|
47797
|
-
|
|
47798
|
-
|
|
47799
|
-
|
|
47800
|
-
|
|
47801
|
-
|
|
47802
|
-
|
|
48178
|
+
element.bib.setAttribute("isfullscreen", "");
|
|
48179
|
+
element.bib.style.position = "fixed";
|
|
48180
|
+
element.bib.style.top = "0px";
|
|
48181
|
+
element.bib.style.left = "0px";
|
|
48182
|
+
element.bib.style.width = "";
|
|
48183
|
+
element.bib.style.height = "";
|
|
48184
|
+
element.style.contain = "";
|
|
47803
48185
|
|
|
47804
48186
|
// reset the size that was mirroring `size` css-part
|
|
47805
|
-
const bibContent =
|
|
47806
|
-
this.element.bib.shadowRoot.querySelector(".container");
|
|
48187
|
+
const bibContent = element.bib.shadowRoot?.querySelector(".container");
|
|
47807
48188
|
if (bibContent) {
|
|
47808
48189
|
bibContent.style.width = "";
|
|
47809
48190
|
bibContent.style.height = "";
|
|
@@ -47818,14 +48199,14 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47818
48199
|
}, 0);
|
|
47819
48200
|
}
|
|
47820
48201
|
|
|
47821
|
-
if (
|
|
48202
|
+
if (element.isPopoverVisible) {
|
|
47822
48203
|
this.lockScroll(true);
|
|
47823
48204
|
}
|
|
47824
48205
|
} else {
|
|
47825
|
-
|
|
47826
|
-
|
|
47827
|
-
|
|
47828
|
-
|
|
48206
|
+
element.bib.style.position = "";
|
|
48207
|
+
element.bib.removeAttribute("isfullscreen");
|
|
48208
|
+
element.isBibFullscreen = false;
|
|
48209
|
+
element.style.contain = "layout";
|
|
47829
48210
|
}
|
|
47830
48211
|
|
|
47831
48212
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -47843,16 +48224,21 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47843
48224
|
},
|
|
47844
48225
|
);
|
|
47845
48226
|
|
|
47846
|
-
|
|
48227
|
+
element.dispatchEvent(event);
|
|
47847
48228
|
}
|
|
47848
48229
|
}
|
|
47849
48230
|
|
|
47850
48231
|
updateState() {
|
|
47851
|
-
const
|
|
48232
|
+
const element = this.element;
|
|
48233
|
+
if (!element) {
|
|
48234
|
+
return;
|
|
48235
|
+
}
|
|
48236
|
+
|
|
48237
|
+
const isVisible = element.isPopoverVisible;
|
|
47852
48238
|
if (!isVisible) {
|
|
47853
48239
|
this.cleanupHideHandlers();
|
|
47854
48240
|
try {
|
|
47855
|
-
|
|
48241
|
+
element.cleanup?.();
|
|
47856
48242
|
} catch (error) {
|
|
47857
48243
|
// Do nothing
|
|
47858
48244
|
}
|
|
@@ -47868,28 +48254,30 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47868
48254
|
* If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
|
|
47869
48255
|
*/
|
|
47870
48256
|
handleFocusLoss() {
|
|
48257
|
+
const element = this.element;
|
|
48258
|
+
if (!element?.bib) {
|
|
48259
|
+
return;
|
|
48260
|
+
}
|
|
48261
|
+
|
|
47871
48262
|
// if mouse is being pressed, skip and let click event to handle the action
|
|
47872
48263
|
if (AuroFloatingUI.isMousePressed) {
|
|
47873
48264
|
return;
|
|
47874
48265
|
}
|
|
47875
48266
|
|
|
47876
48267
|
if (
|
|
47877
|
-
|
|
47878
|
-
|
|
48268
|
+
element.noHideOnThisFocusLoss ||
|
|
48269
|
+
element.hasAttribute("noHideOnThisFocusLoss")
|
|
47879
48270
|
) {
|
|
47880
48271
|
return;
|
|
47881
48272
|
}
|
|
47882
48273
|
|
|
47883
48274
|
// if focus is still inside of trigger or bib, do not close
|
|
47884
|
-
if (
|
|
47885
|
-
this.element.matches(":focus") ||
|
|
47886
|
-
this.element.matches(":focus-within")
|
|
47887
|
-
) {
|
|
48275
|
+
if (element.matches(":focus") || element.matches(":focus-within")) {
|
|
47888
48276
|
return;
|
|
47889
48277
|
}
|
|
47890
48278
|
|
|
47891
48279
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
47892
|
-
if (
|
|
48280
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
47893
48281
|
return;
|
|
47894
48282
|
}
|
|
47895
48283
|
|
|
@@ -47897,23 +48285,33 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47897
48285
|
}
|
|
47898
48286
|
|
|
47899
48287
|
setupHideHandlers() {
|
|
48288
|
+
const element = this.element;
|
|
48289
|
+
if (!element) {
|
|
48290
|
+
return;
|
|
48291
|
+
}
|
|
48292
|
+
|
|
47900
48293
|
// Define handlers & store references
|
|
47901
48294
|
this.focusHandler = () => this.handleFocusLoss();
|
|
47902
48295
|
|
|
47903
48296
|
this.clickHandler = (evt) => {
|
|
48297
|
+
const element = this.element;
|
|
48298
|
+
if (!element?.bib) {
|
|
48299
|
+
return;
|
|
48300
|
+
}
|
|
48301
|
+
|
|
47904
48302
|
// When the bib is fullscreen (modal dialog), don't close on outside
|
|
47905
48303
|
// clicks. VoiceOver's synthetic click events inside a top-layer modal
|
|
47906
48304
|
// <dialog> may not include the bib in composedPath(), causing false
|
|
47907
48305
|
// positives. This mirrors the fullscreen guard in handleFocusLoss().
|
|
47908
|
-
if (
|
|
48306
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
47909
48307
|
return;
|
|
47910
48308
|
}
|
|
47911
48309
|
|
|
47912
48310
|
if (
|
|
47913
|
-
(!evt.composedPath().includes(
|
|
47914
|
-
!evt.composedPath().includes(
|
|
47915
|
-
(
|
|
47916
|
-
evt.composedPath().includes(
|
|
48311
|
+
(!evt.composedPath().includes(element.trigger) &&
|
|
48312
|
+
!evt.composedPath().includes(element.bib)) ||
|
|
48313
|
+
(element.bib.backdrop &&
|
|
48314
|
+
evt.composedPath().includes(element.bib.backdrop))
|
|
47917
48315
|
) {
|
|
47918
48316
|
const existedVisibleFloatingUI =
|
|
47919
48317
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -47934,7 +48332,12 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47934
48332
|
|
|
47935
48333
|
// ESC key handler
|
|
47936
48334
|
this.keyDownHandler = (evt) => {
|
|
47937
|
-
|
|
48335
|
+
const element = this.element;
|
|
48336
|
+
if (!element) {
|
|
48337
|
+
return;
|
|
48338
|
+
}
|
|
48339
|
+
|
|
48340
|
+
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
47938
48341
|
const existedVisibleFloatingUI =
|
|
47939
48342
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
47940
48343
|
if (
|
|
@@ -47991,6 +48394,10 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
47991
48394
|
}
|
|
47992
48395
|
|
|
47993
48396
|
updateCurrentExpandedDropdown() {
|
|
48397
|
+
if (!this.element) {
|
|
48398
|
+
return;
|
|
48399
|
+
}
|
|
48400
|
+
|
|
47994
48401
|
// Close any other dropdown that is already open
|
|
47995
48402
|
const existedVisibleFloatingUI =
|
|
47996
48403
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -48007,25 +48414,34 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48007
48414
|
}
|
|
48008
48415
|
|
|
48009
48416
|
showBib() {
|
|
48010
|
-
|
|
48417
|
+
const element = this.element;
|
|
48418
|
+
if (!element) {
|
|
48419
|
+
return;
|
|
48420
|
+
}
|
|
48421
|
+
|
|
48422
|
+
if (!element.bib || (!element.trigger && !element.parentNode)) {
|
|
48423
|
+
return;
|
|
48424
|
+
}
|
|
48425
|
+
|
|
48426
|
+
if (!element.disabled && !this.showing) {
|
|
48011
48427
|
this.updateCurrentExpandedDropdown();
|
|
48012
|
-
|
|
48428
|
+
element.triggerChevron?.setAttribute("data-expanded", true);
|
|
48013
48429
|
|
|
48014
48430
|
// prevent double showing: isPopovervisible gets first and showBib gets called later
|
|
48015
48431
|
if (!this.showing) {
|
|
48016
|
-
if (!
|
|
48432
|
+
if (!element.modal) {
|
|
48017
48433
|
this.setupHideHandlers();
|
|
48018
48434
|
}
|
|
48019
48435
|
this.showing = true;
|
|
48020
|
-
|
|
48436
|
+
element.isPopoverVisible = true;
|
|
48021
48437
|
this.position();
|
|
48022
48438
|
this.dispatchEventDropdownToggle();
|
|
48023
48439
|
}
|
|
48024
48440
|
|
|
48025
48441
|
// Setup auto update to handle resize and scroll
|
|
48026
|
-
|
|
48027
|
-
|
|
48028
|
-
|
|
48442
|
+
element.cleanup = autoUpdate$1(
|
|
48443
|
+
element.trigger || element.parentNode,
|
|
48444
|
+
element.bib,
|
|
48029
48445
|
() => {
|
|
48030
48446
|
this.position();
|
|
48031
48447
|
},
|
|
@@ -48038,22 +48454,27 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48038
48454
|
* @param {String} eventType - The event type that triggered the hiding action.
|
|
48039
48455
|
*/
|
|
48040
48456
|
hideBib(eventType = "unknown") {
|
|
48041
|
-
|
|
48457
|
+
const element = this.element;
|
|
48458
|
+
if (!element) {
|
|
48459
|
+
return;
|
|
48460
|
+
}
|
|
48461
|
+
|
|
48462
|
+
if (element.disabled) {
|
|
48042
48463
|
return;
|
|
48043
48464
|
}
|
|
48044
48465
|
|
|
48045
48466
|
// noToggle dropdowns should not close when the trigger is clicked (the
|
|
48046
48467
|
// "toggle" behavior), but they CAN still close via other interactions like
|
|
48047
48468
|
// Escape key or focus loss.
|
|
48048
|
-
if (
|
|
48469
|
+
if (element.noToggle && eventType === "click") {
|
|
48049
48470
|
return;
|
|
48050
48471
|
}
|
|
48051
48472
|
|
|
48052
48473
|
this.lockScroll(false);
|
|
48053
|
-
|
|
48474
|
+
element.triggerChevron?.removeAttribute("data-expanded");
|
|
48054
48475
|
|
|
48055
|
-
if (
|
|
48056
|
-
|
|
48476
|
+
if (element.isPopoverVisible) {
|
|
48477
|
+
element.isPopoverVisible = false;
|
|
48057
48478
|
}
|
|
48058
48479
|
if (this.showing) {
|
|
48059
48480
|
this.cleanupHideHandlers();
|
|
@@ -48073,6 +48494,11 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48073
48494
|
* @param {String} eventType - The event type that triggered the toggle action.
|
|
48074
48495
|
*/
|
|
48075
48496
|
dispatchEventDropdownToggle(eventType) {
|
|
48497
|
+
const element = this.element;
|
|
48498
|
+
if (!element) {
|
|
48499
|
+
return;
|
|
48500
|
+
}
|
|
48501
|
+
|
|
48076
48502
|
const event = new CustomEvent(
|
|
48077
48503
|
this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
|
|
48078
48504
|
{
|
|
@@ -48084,11 +48510,16 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48084
48510
|
},
|
|
48085
48511
|
);
|
|
48086
48512
|
|
|
48087
|
-
|
|
48513
|
+
element.dispatchEvent(event);
|
|
48088
48514
|
}
|
|
48089
48515
|
|
|
48090
48516
|
handleClick() {
|
|
48091
|
-
|
|
48517
|
+
const element = this.element;
|
|
48518
|
+
if (!element) {
|
|
48519
|
+
return;
|
|
48520
|
+
}
|
|
48521
|
+
|
|
48522
|
+
if (element.isPopoverVisible) {
|
|
48092
48523
|
this.hideBib("click");
|
|
48093
48524
|
} else {
|
|
48094
48525
|
this.showBib();
|
|
@@ -48099,63 +48530,66 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48099
48530
|
{
|
|
48100
48531
|
composed: true,
|
|
48101
48532
|
detail: {
|
|
48102
|
-
expanded:
|
|
48533
|
+
expanded: element.isPopoverVisible,
|
|
48103
48534
|
},
|
|
48104
48535
|
},
|
|
48105
48536
|
);
|
|
48106
48537
|
|
|
48107
|
-
|
|
48538
|
+
element.dispatchEvent(event);
|
|
48108
48539
|
}
|
|
48109
48540
|
|
|
48110
48541
|
handleEvent(event) {
|
|
48111
|
-
|
|
48112
|
-
|
|
48113
|
-
|
|
48114
|
-
|
|
48115
|
-
|
|
48116
|
-
|
|
48117
|
-
|
|
48118
|
-
|
|
48119
|
-
|
|
48120
|
-
|
|
48121
|
-
|
|
48122
|
-
|
|
48123
|
-
|
|
48124
|
-
|
|
48125
|
-
|
|
48126
|
-
|
|
48127
|
-
case "mouseenter":
|
|
48128
|
-
if (this.element.hoverToggle) {
|
|
48129
|
-
this.showBib();
|
|
48130
|
-
}
|
|
48131
|
-
break;
|
|
48132
|
-
case "mouseleave":
|
|
48133
|
-
if (this.element.hoverToggle) {
|
|
48134
|
-
this.hideBib("mouseleave");
|
|
48135
|
-
}
|
|
48136
|
-
break;
|
|
48137
|
-
case "focus":
|
|
48138
|
-
if (this.element.focusShow) {
|
|
48139
|
-
/*
|
|
48140
|
-
This needs to better handle clicking that gives focus -
|
|
48141
|
-
currently it shows and then immediately hides the bib
|
|
48142
|
-
*/
|
|
48143
|
-
this.showBib();
|
|
48144
|
-
}
|
|
48145
|
-
break;
|
|
48146
|
-
case "blur":
|
|
48147
|
-
// send this task 100ms later queue to
|
|
48148
|
-
// wait a frame in case focus moves within the floating element/bib
|
|
48149
|
-
setTimeout(() => this.handleFocusLoss(), 0);
|
|
48150
|
-
break;
|
|
48151
|
-
case "click":
|
|
48152
|
-
if (document.activeElement === document.body) {
|
|
48153
|
-
event.currentTarget.focus();
|
|
48154
|
-
}
|
|
48542
|
+
const element = this.element;
|
|
48543
|
+
if (!element || element.disableEventShow) {
|
|
48544
|
+
return;
|
|
48545
|
+
}
|
|
48546
|
+
|
|
48547
|
+
switch (event.type) {
|
|
48548
|
+
case "keydown": {
|
|
48549
|
+
// Support both Enter and Space keys for accessibility
|
|
48550
|
+
// Space is included as it's expected behavior for interactive elements
|
|
48551
|
+
|
|
48552
|
+
const origin = event.composedPath()[0];
|
|
48553
|
+
if (
|
|
48554
|
+
event.key === "Enter" ||
|
|
48555
|
+
(event.key === " " && (!origin || origin.tagName !== "INPUT"))
|
|
48556
|
+
) {
|
|
48557
|
+
event.preventDefault();
|
|
48155
48558
|
this.handleClick();
|
|
48156
|
-
|
|
48157
|
-
|
|
48559
|
+
}
|
|
48560
|
+
break;
|
|
48158
48561
|
}
|
|
48562
|
+
case "mouseenter":
|
|
48563
|
+
if (element.hoverToggle) {
|
|
48564
|
+
this.showBib();
|
|
48565
|
+
}
|
|
48566
|
+
break;
|
|
48567
|
+
case "mouseleave":
|
|
48568
|
+
if (element.hoverToggle) {
|
|
48569
|
+
this.hideBib("mouseleave");
|
|
48570
|
+
}
|
|
48571
|
+
break;
|
|
48572
|
+
case "focus":
|
|
48573
|
+
if (element.focusShow) {
|
|
48574
|
+
/*
|
|
48575
|
+
This needs to better handle clicking that gives focus -
|
|
48576
|
+
currently it shows and then immediately hides the bib
|
|
48577
|
+
*/
|
|
48578
|
+
this.showBib();
|
|
48579
|
+
}
|
|
48580
|
+
break;
|
|
48581
|
+
case "blur":
|
|
48582
|
+
// send this task 100ms later queue to
|
|
48583
|
+
// wait a frame in case focus moves within the floating element/bib
|
|
48584
|
+
setTimeout(() => this.handleFocusLoss(), 0);
|
|
48585
|
+
break;
|
|
48586
|
+
case "click":
|
|
48587
|
+
if (document.activeElement === document.body) {
|
|
48588
|
+
event.currentTarget.focus();
|
|
48589
|
+
}
|
|
48590
|
+
this.handleClick();
|
|
48591
|
+
break;
|
|
48592
|
+
// Do nothing
|
|
48159
48593
|
}
|
|
48160
48594
|
}
|
|
48161
48595
|
|
|
@@ -48166,6 +48600,11 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48166
48600
|
* This prevents the component itself from being focusable when the trigger element already handles focus.
|
|
48167
48601
|
*/
|
|
48168
48602
|
handleTriggerTabIndex() {
|
|
48603
|
+
const element = this.element;
|
|
48604
|
+
if (!element) {
|
|
48605
|
+
return;
|
|
48606
|
+
}
|
|
48607
|
+
|
|
48169
48608
|
const focusableElementSelectors = [
|
|
48170
48609
|
"a",
|
|
48171
48610
|
"button",
|
|
@@ -48178,7 +48617,7 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48178
48617
|
"auro-hyperlink",
|
|
48179
48618
|
];
|
|
48180
48619
|
|
|
48181
|
-
const triggerNode =
|
|
48620
|
+
const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
|
|
48182
48621
|
if (!triggerNode) {
|
|
48183
48622
|
return;
|
|
48184
48623
|
}
|
|
@@ -48187,13 +48626,13 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48187
48626
|
focusableElementSelectors.forEach((selector) => {
|
|
48188
48627
|
// Check if the trigger node element is focusable
|
|
48189
48628
|
if (triggerNodeTagName === selector) {
|
|
48190
|
-
|
|
48629
|
+
element.tabIndex = -1;
|
|
48191
48630
|
return;
|
|
48192
48631
|
}
|
|
48193
48632
|
|
|
48194
48633
|
// Check if any child is focusable
|
|
48195
48634
|
if (triggerNode.querySelector(selector)) {
|
|
48196
|
-
|
|
48635
|
+
element.tabIndex = -1;
|
|
48197
48636
|
}
|
|
48198
48637
|
});
|
|
48199
48638
|
}
|
|
@@ -48203,13 +48642,18 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48203
48642
|
* @param {*} eventPrefix
|
|
48204
48643
|
*/
|
|
48205
48644
|
regenerateBibId() {
|
|
48206
|
-
|
|
48645
|
+
const element = this.element;
|
|
48646
|
+
if (!element) {
|
|
48647
|
+
return;
|
|
48648
|
+
}
|
|
48649
|
+
|
|
48650
|
+
this.id = element.getAttribute("id");
|
|
48207
48651
|
if (!this.id) {
|
|
48208
48652
|
this.id = window.crypto.randomUUID();
|
|
48209
|
-
|
|
48653
|
+
element.setAttribute("id", this.id);
|
|
48210
48654
|
}
|
|
48211
48655
|
|
|
48212
|
-
|
|
48656
|
+
element.bib?.setAttribute("id", `${this.id}-floater-bib`);
|
|
48213
48657
|
}
|
|
48214
48658
|
|
|
48215
48659
|
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
@@ -48221,67 +48665,69 @@ let AuroFloatingUI$1 = class AuroFloatingUI {
|
|
|
48221
48665
|
this.element = elem;
|
|
48222
48666
|
}
|
|
48223
48667
|
|
|
48224
|
-
|
|
48225
|
-
|
|
48668
|
+
const element = this.element;
|
|
48669
|
+
if (!element) {
|
|
48670
|
+
return;
|
|
48671
|
+
}
|
|
48672
|
+
|
|
48673
|
+
if (this.behavior !== element.behavior) {
|
|
48674
|
+
this.behavior = element.behavior;
|
|
48226
48675
|
}
|
|
48227
48676
|
|
|
48228
|
-
if (
|
|
48677
|
+
if (element.trigger) {
|
|
48229
48678
|
this.disconnect();
|
|
48230
48679
|
}
|
|
48231
|
-
|
|
48232
|
-
|
|
48233
|
-
|
|
48234
|
-
|
|
48235
|
-
|
|
48236
|
-
|
|
48237
|
-
|
|
48238
|
-
|
|
48239
|
-
this.element.shadowRoot.querySelector("#showStateIcon");
|
|
48680
|
+
element.trigger =
|
|
48681
|
+
element.triggerElement ||
|
|
48682
|
+
element.shadowRoot?.querySelector("#trigger") ||
|
|
48683
|
+
element.trigger;
|
|
48684
|
+
element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
|
|
48685
|
+
element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
|
|
48686
|
+
element.triggerChevron =
|
|
48687
|
+
element.shadowRoot?.querySelector("#showStateIcon");
|
|
48240
48688
|
|
|
48241
|
-
if (
|
|
48242
|
-
|
|
48689
|
+
if (element.floaterConfig) {
|
|
48690
|
+
element.hoverToggle = element.floaterConfig.hoverToggle;
|
|
48243
48691
|
}
|
|
48244
48692
|
|
|
48245
48693
|
this.regenerateBibId();
|
|
48246
48694
|
this.handleTriggerTabIndex();
|
|
48247
48695
|
|
|
48248
48696
|
this.handleEvent = this.handleEvent.bind(this);
|
|
48249
|
-
if (
|
|
48697
|
+
if (element.trigger) {
|
|
48250
48698
|
if (this.enableKeyboardHandling) {
|
|
48251
|
-
|
|
48699
|
+
element.trigger.addEventListener("keydown", this.handleEvent);
|
|
48252
48700
|
}
|
|
48253
|
-
|
|
48254
|
-
|
|
48255
|
-
|
|
48256
|
-
|
|
48257
|
-
|
|
48701
|
+
element.trigger.addEventListener("click", this.handleEvent);
|
|
48702
|
+
element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
48703
|
+
element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
48704
|
+
element.trigger.addEventListener("focus", this.handleEvent);
|
|
48705
|
+
element.trigger.addEventListener("blur", this.handleEvent);
|
|
48258
48706
|
}
|
|
48259
48707
|
}
|
|
48260
48708
|
|
|
48261
48709
|
disconnect() {
|
|
48262
48710
|
this.cleanupHideHandlers();
|
|
48263
|
-
if (this.element) {
|
|
48264
|
-
this.element.cleanup?.();
|
|
48265
48711
|
|
|
48266
|
-
|
|
48267
|
-
|
|
48268
|
-
|
|
48712
|
+
const element = this.element;
|
|
48713
|
+
if (!element) {
|
|
48714
|
+
return;
|
|
48715
|
+
}
|
|
48269
48716
|
|
|
48270
|
-
|
|
48271
|
-
|
|
48272
|
-
|
|
48273
|
-
|
|
48274
|
-
|
|
48275
|
-
|
|
48276
|
-
|
|
48277
|
-
|
|
48278
|
-
|
|
48279
|
-
|
|
48280
|
-
|
|
48281
|
-
|
|
48282
|
-
|
|
48283
|
-
|
|
48284
|
-
}
|
|
48717
|
+
element.cleanup?.();
|
|
48718
|
+
|
|
48719
|
+
if (element.bib && element.shadowRoot) {
|
|
48720
|
+
element.shadowRoot.append(element.bib);
|
|
48721
|
+
}
|
|
48722
|
+
|
|
48723
|
+
// Remove event & keyboard listeners
|
|
48724
|
+
if (element.trigger) {
|
|
48725
|
+
element.trigger.removeEventListener("keydown", this.handleEvent);
|
|
48726
|
+
element.trigger.removeEventListener("click", this.handleEvent);
|
|
48727
|
+
element.trigger.removeEventListener("mouseenter", this.handleEvent);
|
|
48728
|
+
element.trigger.removeEventListener("mouseleave", this.handleEvent);
|
|
48729
|
+
element.trigger.removeEventListener("focus", this.handleEvent);
|
|
48730
|
+
element.trigger.removeEventListener("blur", this.handleEvent);
|
|
48285
48731
|
}
|
|
48286
48732
|
}
|
|
48287
48733
|
};
|
|
@@ -49409,7 +49855,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$4 {
|
|
|
49409
49855
|
}
|
|
49410
49856
|
};
|
|
49411
49857
|
|
|
49412
|
-
var formkitVersion$2 = '
|
|
49858
|
+
var formkitVersion$2 = '202604091759';
|
|
49413
49859
|
|
|
49414
49860
|
let AuroElement$2$1 = class AuroElement extends i$4 {
|
|
49415
49861
|
static get properties() {
|
|
@@ -49515,7 +49961,7 @@ let AuroElement$2$1 = class AuroElement extends i$4 {
|
|
|
49515
49961
|
}
|
|
49516
49962
|
};
|
|
49517
49963
|
|
|
49518
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
49964
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
49519
49965
|
// See LICENSE in the project root for license information.
|
|
49520
49966
|
|
|
49521
49967
|
|
|
@@ -57158,7 +57604,7 @@ let AuroHelpText$1$1 = class AuroHelpText extends i$4 {
|
|
|
57158
57604
|
}
|
|
57159
57605
|
};
|
|
57160
57606
|
|
|
57161
|
-
var formkitVersion$1$1 = '
|
|
57607
|
+
var formkitVersion$1$1 = '202604091759';
|
|
57162
57608
|
|
|
57163
57609
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
57164
57610
|
// See LICENSE in the project root for license information.
|
|
@@ -58223,7 +58669,7 @@ let AuroBibtemplate$1 = class AuroBibtemplate extends i$4 {
|
|
|
58223
58669
|
}
|
|
58224
58670
|
};
|
|
58225
58671
|
|
|
58226
|
-
var formkitVersion$3 = '
|
|
58672
|
+
var formkitVersion$3 = '202604091759';
|
|
58227
58673
|
|
|
58228
58674
|
var styleCss$1$3 = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host{display:block;text-align:left}:host [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: transparent}:host #inputInBib::part(wrapper){box-shadow:none}:host #inputInBib::part(accent-left){display:none}:host([layout*=classic]) [auro-input]{width:100%}:host([layout*=classic]) [auro-input]::part(helpText){display:none}:host([layout*=classic]) #slotHolder{display:none}`;
|
|
58229
58675
|
|
|
@@ -58563,7 +59009,7 @@ let AuroHelpText$3 = class AuroHelpText extends i$4 {
|
|
|
58563
59009
|
}
|
|
58564
59010
|
};
|
|
58565
59011
|
|
|
58566
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
59012
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
58567
59013
|
// See LICENSE in the project root for license information.
|
|
58568
59014
|
|
|
58569
59015
|
|
|
@@ -59086,7 +59532,7 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
59086
59532
|
* @returns {void}
|
|
59087
59533
|
*/
|
|
59088
59534
|
activateFirstEnabledAvailableOption() {
|
|
59089
|
-
const firstEnabledOptionIndex = this.availableOptions.findIndex((opt) => !opt.disabled);
|
|
59535
|
+
const firstEnabledOptionIndex = this.availableOptions.findIndex((opt) => !opt.disabled && !opt.hasAttribute('nomatch'));
|
|
59090
59536
|
this.updateActiveOption(firstEnabledOptionIndex);
|
|
59091
59537
|
}
|
|
59092
59538
|
|
|
@@ -59100,7 +59546,7 @@ class AuroCombobox extends AuroElement$3 {
|
|
|
59100
59546
|
|
|
59101
59547
|
// Work backwards through the available options array to find the last enabled option
|
|
59102
59548
|
for (let index = this.availableOptions.length - 1; index >= 0; index -= 1) {
|
|
59103
|
-
if (!this.availableOptions[index].disabled) {
|
|
59549
|
+
if (!this.availableOptions[index].disabled && !this.availableOptions[index].hasAttribute('nomatch')) {
|
|
59104
59550
|
lastEnabledOptionIndex = index;
|
|
59105
59551
|
break;
|
|
59106
59552
|
}
|
|
@@ -60588,6 +61034,7 @@ class AuroMenuOption extends AuroElement$2 {
|
|
|
60588
61034
|
this.selected = false;
|
|
60589
61035
|
this.noCheckmark = false;
|
|
60590
61036
|
this.disabled = false;
|
|
61037
|
+
this.noMatch = false;
|
|
60591
61038
|
|
|
60592
61039
|
/**
|
|
60593
61040
|
* @private
|
|
@@ -60663,6 +61110,15 @@ class AuroMenuOption extends AuroElement$2 {
|
|
|
60663
61110
|
reflect: true
|
|
60664
61111
|
},
|
|
60665
61112
|
|
|
61113
|
+
/**
|
|
61114
|
+
* When true, marks this option as the "no matching results" placeholder shown by combobox when the user's input does not match any available options. Enables distinct styling and prevents the option from being treated as a selectable match.
|
|
61115
|
+
*/
|
|
61116
|
+
noMatch: {
|
|
61117
|
+
type: Boolean,
|
|
61118
|
+
reflect: true,
|
|
61119
|
+
attribute: 'nomatch'
|
|
61120
|
+
},
|
|
61121
|
+
|
|
60666
61122
|
/**
|
|
60667
61123
|
* Specifies that an option is selected.
|
|
60668
61124
|
*/
|
|
@@ -63712,6 +64168,10 @@ const selectKeyboardStrategy = {
|
|
|
63712
64168
|
if (!ctx.isExpanded) {
|
|
63713
64169
|
return;
|
|
63714
64170
|
}
|
|
64171
|
+
|
|
64172
|
+
// Prevent the Escape key from bubbling up and closing any parent dialogs / drawers / popups
|
|
64173
|
+
evt.stopPropagation();
|
|
64174
|
+
|
|
63715
64175
|
component.dropdown.hide();
|
|
63716
64176
|
},
|
|
63717
64177
|
|
|
@@ -65650,11 +66110,19 @@ class AuroFloatingUI {
|
|
|
65650
66110
|
* This ensures that the bib content has the same dimensions as the sizer element.
|
|
65651
66111
|
*/
|
|
65652
66112
|
mirrorSize() {
|
|
66113
|
+
const element = this.element;
|
|
66114
|
+
if (!element) {
|
|
66115
|
+
return;
|
|
66116
|
+
}
|
|
66117
|
+
|
|
65653
66118
|
// mirror the boxsize from bibSizer
|
|
65654
|
-
if (
|
|
65655
|
-
const sizerStyle = window.getComputedStyle(
|
|
65656
|
-
const bibContent =
|
|
65657
|
-
|
|
66119
|
+
if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
|
|
66120
|
+
const sizerStyle = window.getComputedStyle(element.bibSizer);
|
|
66121
|
+
const bibContent = element.bib.shadowRoot.querySelector(".container");
|
|
66122
|
+
if (!bibContent) {
|
|
66123
|
+
return;
|
|
66124
|
+
}
|
|
66125
|
+
|
|
65658
66126
|
if (sizerStyle.width !== "0px") {
|
|
65659
66127
|
bibContent.style.width = sizerStyle.width;
|
|
65660
66128
|
}
|
|
@@ -65676,9 +66144,14 @@ class AuroFloatingUI {
|
|
|
65676
66144
|
* @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
|
|
65677
66145
|
*/
|
|
65678
66146
|
getPositioningStrategy() {
|
|
66147
|
+
const element = this.element;
|
|
66148
|
+
if (!element) {
|
|
66149
|
+
return "floating";
|
|
66150
|
+
}
|
|
66151
|
+
|
|
65679
66152
|
const breakpoint =
|
|
65680
|
-
|
|
65681
|
-
|
|
66153
|
+
element.bib?.mobileFullscreenBreakpoint ||
|
|
66154
|
+
element.floaterConfig?.fullscreenBreakpoint;
|
|
65682
66155
|
switch (this.behavior) {
|
|
65683
66156
|
case "tooltip":
|
|
65684
66157
|
return "floating";
|
|
@@ -65689,9 +66162,9 @@ class AuroFloatingUI {
|
|
|
65689
66162
|
`(max-width: ${breakpoint})`,
|
|
65690
66163
|
).matches;
|
|
65691
66164
|
|
|
65692
|
-
|
|
66165
|
+
element.expanded = smallerThanBreakpoint;
|
|
65693
66166
|
}
|
|
65694
|
-
if (
|
|
66167
|
+
if (element.nested) {
|
|
65695
66168
|
return "cover";
|
|
65696
66169
|
}
|
|
65697
66170
|
return "fullscreen";
|
|
@@ -65721,42 +66194,65 @@ class AuroFloatingUI {
|
|
|
65721
66194
|
* and applies the calculated position to the bib's style.
|
|
65722
66195
|
*/
|
|
65723
66196
|
position() {
|
|
66197
|
+
const element = this.element;
|
|
66198
|
+
if (!element) {
|
|
66199
|
+
return;
|
|
66200
|
+
}
|
|
66201
|
+
|
|
65724
66202
|
const strategy = this.getPositioningStrategy();
|
|
65725
66203
|
this.configureBibStrategy(strategy);
|
|
65726
66204
|
|
|
65727
66205
|
if (strategy === "floating") {
|
|
66206
|
+
if (!element.trigger || !element.bib) {
|
|
66207
|
+
return;
|
|
66208
|
+
}
|
|
66209
|
+
|
|
65728
66210
|
this.mirrorSize();
|
|
65729
66211
|
// Define the middlware for the floater configuration
|
|
65730
66212
|
const middleware = [
|
|
65731
|
-
offset(
|
|
65732
|
-
...(
|
|
65733
|
-
...(
|
|
65734
|
-
...(
|
|
66213
|
+
offset(element.floaterConfig?.offset || 0),
|
|
66214
|
+
...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
|
|
66215
|
+
...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
|
|
66216
|
+
...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
|
|
65735
66217
|
];
|
|
65736
66218
|
|
|
65737
66219
|
// Compute the position of the bib
|
|
65738
|
-
computePosition(
|
|
65739
|
-
strategy:
|
|
65740
|
-
placement:
|
|
66220
|
+
computePosition(element.trigger, element.bib, {
|
|
66221
|
+
strategy: element.floaterConfig?.strategy || "fixed",
|
|
66222
|
+
placement: element.floaterConfig?.placement,
|
|
65741
66223
|
middleware: middleware || [],
|
|
65742
66224
|
}).then(({ x, y }) => {
|
|
65743
66225
|
// eslint-disable-line id-length
|
|
65744
|
-
|
|
66226
|
+
const currentElement = this.element;
|
|
66227
|
+
if (!currentElement?.bib) {
|
|
66228
|
+
return;
|
|
66229
|
+
}
|
|
66230
|
+
|
|
66231
|
+
Object.assign(currentElement.bib.style, {
|
|
65745
66232
|
left: `${x}px`,
|
|
65746
66233
|
top: `${y}px`,
|
|
65747
66234
|
});
|
|
65748
66235
|
});
|
|
65749
66236
|
} else if (strategy === "cover") {
|
|
66237
|
+
if (!element.parentNode || !element.bib) {
|
|
66238
|
+
return;
|
|
66239
|
+
}
|
|
66240
|
+
|
|
65750
66241
|
// Compute the position of the bib
|
|
65751
|
-
computePosition(
|
|
66242
|
+
computePosition(element.parentNode, element.bib, {
|
|
65752
66243
|
placement: "bottom-start",
|
|
65753
66244
|
}).then(({ x, y }) => {
|
|
65754
66245
|
// eslint-disable-line id-length
|
|
65755
|
-
|
|
66246
|
+
const currentElement = this.element;
|
|
66247
|
+
if (!currentElement?.bib || !currentElement.parentNode) {
|
|
66248
|
+
return;
|
|
66249
|
+
}
|
|
66250
|
+
|
|
66251
|
+
Object.assign(currentElement.bib.style, {
|
|
65756
66252
|
left: `${x}px`,
|
|
65757
|
-
top: `${y -
|
|
65758
|
-
width: `${
|
|
65759
|
-
height: `${
|
|
66253
|
+
top: `${y - currentElement.parentNode.offsetHeight}px`,
|
|
66254
|
+
width: `${currentElement.parentNode.offsetWidth}px`,
|
|
66255
|
+
height: `${currentElement.parentNode.offsetHeight}px`,
|
|
65760
66256
|
});
|
|
65761
66257
|
});
|
|
65762
66258
|
}
|
|
@@ -65768,11 +66264,17 @@ class AuroFloatingUI {
|
|
|
65768
66264
|
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
65769
66265
|
*/
|
|
65770
66266
|
lockScroll(lock = true) {
|
|
66267
|
+
const element = this.element;
|
|
66268
|
+
|
|
65771
66269
|
if (lock) {
|
|
66270
|
+
if (!element?.bib) {
|
|
66271
|
+
return;
|
|
66272
|
+
}
|
|
66273
|
+
|
|
65772
66274
|
document.body.style.overflow = "hidden"; // hide body's scrollbar
|
|
65773
66275
|
|
|
65774
66276
|
// Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
|
|
65775
|
-
|
|
66277
|
+
element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
|
|
65776
66278
|
} else {
|
|
65777
66279
|
document.body.style.overflow = "";
|
|
65778
66280
|
}
|
|
@@ -65788,20 +66290,24 @@ class AuroFloatingUI {
|
|
|
65788
66290
|
* @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
|
|
65789
66291
|
*/
|
|
65790
66292
|
configureBibStrategy(value) {
|
|
66293
|
+
const element = this.element;
|
|
66294
|
+
if (!element?.bib) {
|
|
66295
|
+
return;
|
|
66296
|
+
}
|
|
66297
|
+
|
|
65791
66298
|
if (value === "fullscreen") {
|
|
65792
|
-
|
|
66299
|
+
element.isBibFullscreen = true;
|
|
65793
66300
|
// reset the prev position
|
|
65794
|
-
|
|
65795
|
-
|
|
65796
|
-
|
|
65797
|
-
|
|
65798
|
-
|
|
65799
|
-
|
|
65800
|
-
|
|
66301
|
+
element.bib.setAttribute("isfullscreen", "");
|
|
66302
|
+
element.bib.style.position = "fixed";
|
|
66303
|
+
element.bib.style.top = "0px";
|
|
66304
|
+
element.bib.style.left = "0px";
|
|
66305
|
+
element.bib.style.width = "";
|
|
66306
|
+
element.bib.style.height = "";
|
|
66307
|
+
element.style.contain = "";
|
|
65801
66308
|
|
|
65802
66309
|
// reset the size that was mirroring `size` css-part
|
|
65803
|
-
const bibContent =
|
|
65804
|
-
this.element.bib.shadowRoot.querySelector(".container");
|
|
66310
|
+
const bibContent = element.bib.shadowRoot?.querySelector(".container");
|
|
65805
66311
|
if (bibContent) {
|
|
65806
66312
|
bibContent.style.width = "";
|
|
65807
66313
|
bibContent.style.height = "";
|
|
@@ -65816,14 +66322,14 @@ class AuroFloatingUI {
|
|
|
65816
66322
|
}, 0);
|
|
65817
66323
|
}
|
|
65818
66324
|
|
|
65819
|
-
if (
|
|
66325
|
+
if (element.isPopoverVisible) {
|
|
65820
66326
|
this.lockScroll(true);
|
|
65821
66327
|
}
|
|
65822
66328
|
} else {
|
|
65823
|
-
|
|
65824
|
-
|
|
65825
|
-
|
|
65826
|
-
|
|
66329
|
+
element.bib.style.position = "";
|
|
66330
|
+
element.bib.removeAttribute("isfullscreen");
|
|
66331
|
+
element.isBibFullscreen = false;
|
|
66332
|
+
element.style.contain = "layout";
|
|
65827
66333
|
}
|
|
65828
66334
|
|
|
65829
66335
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -65841,16 +66347,21 @@ class AuroFloatingUI {
|
|
|
65841
66347
|
},
|
|
65842
66348
|
);
|
|
65843
66349
|
|
|
65844
|
-
|
|
66350
|
+
element.dispatchEvent(event);
|
|
65845
66351
|
}
|
|
65846
66352
|
}
|
|
65847
66353
|
|
|
65848
66354
|
updateState() {
|
|
65849
|
-
const
|
|
66355
|
+
const element = this.element;
|
|
66356
|
+
if (!element) {
|
|
66357
|
+
return;
|
|
66358
|
+
}
|
|
66359
|
+
|
|
66360
|
+
const isVisible = element.isPopoverVisible;
|
|
65850
66361
|
if (!isVisible) {
|
|
65851
66362
|
this.cleanupHideHandlers();
|
|
65852
66363
|
try {
|
|
65853
|
-
|
|
66364
|
+
element.cleanup?.();
|
|
65854
66365
|
} catch (error) {
|
|
65855
66366
|
// Do nothing
|
|
65856
66367
|
}
|
|
@@ -65866,28 +66377,30 @@ class AuroFloatingUI {
|
|
|
65866
66377
|
* If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
|
|
65867
66378
|
*/
|
|
65868
66379
|
handleFocusLoss() {
|
|
66380
|
+
const element = this.element;
|
|
66381
|
+
if (!element?.bib) {
|
|
66382
|
+
return;
|
|
66383
|
+
}
|
|
66384
|
+
|
|
65869
66385
|
// if mouse is being pressed, skip and let click event to handle the action
|
|
65870
66386
|
if (AuroFloatingUI.isMousePressed) {
|
|
65871
66387
|
return;
|
|
65872
66388
|
}
|
|
65873
66389
|
|
|
65874
66390
|
if (
|
|
65875
|
-
|
|
65876
|
-
|
|
66391
|
+
element.noHideOnThisFocusLoss ||
|
|
66392
|
+
element.hasAttribute("noHideOnThisFocusLoss")
|
|
65877
66393
|
) {
|
|
65878
66394
|
return;
|
|
65879
66395
|
}
|
|
65880
66396
|
|
|
65881
66397
|
// if focus is still inside of trigger or bib, do not close
|
|
65882
|
-
if (
|
|
65883
|
-
this.element.matches(":focus") ||
|
|
65884
|
-
this.element.matches(":focus-within")
|
|
65885
|
-
) {
|
|
66398
|
+
if (element.matches(":focus") || element.matches(":focus-within")) {
|
|
65886
66399
|
return;
|
|
65887
66400
|
}
|
|
65888
66401
|
|
|
65889
66402
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
65890
|
-
if (
|
|
66403
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
65891
66404
|
return;
|
|
65892
66405
|
}
|
|
65893
66406
|
|
|
@@ -65895,23 +66408,33 @@ class AuroFloatingUI {
|
|
|
65895
66408
|
}
|
|
65896
66409
|
|
|
65897
66410
|
setupHideHandlers() {
|
|
66411
|
+
const element = this.element;
|
|
66412
|
+
if (!element) {
|
|
66413
|
+
return;
|
|
66414
|
+
}
|
|
66415
|
+
|
|
65898
66416
|
// Define handlers & store references
|
|
65899
66417
|
this.focusHandler = () => this.handleFocusLoss();
|
|
65900
66418
|
|
|
65901
66419
|
this.clickHandler = (evt) => {
|
|
66420
|
+
const element = this.element;
|
|
66421
|
+
if (!element?.bib) {
|
|
66422
|
+
return;
|
|
66423
|
+
}
|
|
66424
|
+
|
|
65902
66425
|
// When the bib is fullscreen (modal dialog), don't close on outside
|
|
65903
66426
|
// clicks. VoiceOver's synthetic click events inside a top-layer modal
|
|
65904
66427
|
// <dialog> may not include the bib in composedPath(), causing false
|
|
65905
66428
|
// positives. This mirrors the fullscreen guard in handleFocusLoss().
|
|
65906
|
-
if (
|
|
66429
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
65907
66430
|
return;
|
|
65908
66431
|
}
|
|
65909
66432
|
|
|
65910
66433
|
if (
|
|
65911
|
-
(!evt.composedPath().includes(
|
|
65912
|
-
!evt.composedPath().includes(
|
|
65913
|
-
(
|
|
65914
|
-
evt.composedPath().includes(
|
|
66434
|
+
(!evt.composedPath().includes(element.trigger) &&
|
|
66435
|
+
!evt.composedPath().includes(element.bib)) ||
|
|
66436
|
+
(element.bib.backdrop &&
|
|
66437
|
+
evt.composedPath().includes(element.bib.backdrop))
|
|
65915
66438
|
) {
|
|
65916
66439
|
const existedVisibleFloatingUI =
|
|
65917
66440
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -65932,7 +66455,12 @@ class AuroFloatingUI {
|
|
|
65932
66455
|
|
|
65933
66456
|
// ESC key handler
|
|
65934
66457
|
this.keyDownHandler = (evt) => {
|
|
65935
|
-
|
|
66458
|
+
const element = this.element;
|
|
66459
|
+
if (!element) {
|
|
66460
|
+
return;
|
|
66461
|
+
}
|
|
66462
|
+
|
|
66463
|
+
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
65936
66464
|
const existedVisibleFloatingUI =
|
|
65937
66465
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
65938
66466
|
if (
|
|
@@ -65989,6 +66517,10 @@ class AuroFloatingUI {
|
|
|
65989
66517
|
}
|
|
65990
66518
|
|
|
65991
66519
|
updateCurrentExpandedDropdown() {
|
|
66520
|
+
if (!this.element) {
|
|
66521
|
+
return;
|
|
66522
|
+
}
|
|
66523
|
+
|
|
65992
66524
|
// Close any other dropdown that is already open
|
|
65993
66525
|
const existedVisibleFloatingUI =
|
|
65994
66526
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -66005,25 +66537,34 @@ class AuroFloatingUI {
|
|
|
66005
66537
|
}
|
|
66006
66538
|
|
|
66007
66539
|
showBib() {
|
|
66008
|
-
|
|
66540
|
+
const element = this.element;
|
|
66541
|
+
if (!element) {
|
|
66542
|
+
return;
|
|
66543
|
+
}
|
|
66544
|
+
|
|
66545
|
+
if (!element.bib || (!element.trigger && !element.parentNode)) {
|
|
66546
|
+
return;
|
|
66547
|
+
}
|
|
66548
|
+
|
|
66549
|
+
if (!element.disabled && !this.showing) {
|
|
66009
66550
|
this.updateCurrentExpandedDropdown();
|
|
66010
|
-
|
|
66551
|
+
element.triggerChevron?.setAttribute("data-expanded", true);
|
|
66011
66552
|
|
|
66012
66553
|
// prevent double showing: isPopovervisible gets first and showBib gets called later
|
|
66013
66554
|
if (!this.showing) {
|
|
66014
|
-
if (!
|
|
66555
|
+
if (!element.modal) {
|
|
66015
66556
|
this.setupHideHandlers();
|
|
66016
66557
|
}
|
|
66017
66558
|
this.showing = true;
|
|
66018
|
-
|
|
66559
|
+
element.isPopoverVisible = true;
|
|
66019
66560
|
this.position();
|
|
66020
66561
|
this.dispatchEventDropdownToggle();
|
|
66021
66562
|
}
|
|
66022
66563
|
|
|
66023
66564
|
// Setup auto update to handle resize and scroll
|
|
66024
|
-
|
|
66025
|
-
|
|
66026
|
-
|
|
66565
|
+
element.cleanup = autoUpdate(
|
|
66566
|
+
element.trigger || element.parentNode,
|
|
66567
|
+
element.bib,
|
|
66027
66568
|
() => {
|
|
66028
66569
|
this.position();
|
|
66029
66570
|
},
|
|
@@ -66036,22 +66577,27 @@ class AuroFloatingUI {
|
|
|
66036
66577
|
* @param {String} eventType - The event type that triggered the hiding action.
|
|
66037
66578
|
*/
|
|
66038
66579
|
hideBib(eventType = "unknown") {
|
|
66039
|
-
|
|
66580
|
+
const element = this.element;
|
|
66581
|
+
if (!element) {
|
|
66582
|
+
return;
|
|
66583
|
+
}
|
|
66584
|
+
|
|
66585
|
+
if (element.disabled) {
|
|
66040
66586
|
return;
|
|
66041
66587
|
}
|
|
66042
66588
|
|
|
66043
66589
|
// noToggle dropdowns should not close when the trigger is clicked (the
|
|
66044
66590
|
// "toggle" behavior), but they CAN still close via other interactions like
|
|
66045
66591
|
// Escape key or focus loss.
|
|
66046
|
-
if (
|
|
66592
|
+
if (element.noToggle && eventType === "click") {
|
|
66047
66593
|
return;
|
|
66048
66594
|
}
|
|
66049
66595
|
|
|
66050
66596
|
this.lockScroll(false);
|
|
66051
|
-
|
|
66597
|
+
element.triggerChevron?.removeAttribute("data-expanded");
|
|
66052
66598
|
|
|
66053
|
-
if (
|
|
66054
|
-
|
|
66599
|
+
if (element.isPopoverVisible) {
|
|
66600
|
+
element.isPopoverVisible = false;
|
|
66055
66601
|
}
|
|
66056
66602
|
if (this.showing) {
|
|
66057
66603
|
this.cleanupHideHandlers();
|
|
@@ -66071,6 +66617,11 @@ class AuroFloatingUI {
|
|
|
66071
66617
|
* @param {String} eventType - The event type that triggered the toggle action.
|
|
66072
66618
|
*/
|
|
66073
66619
|
dispatchEventDropdownToggle(eventType) {
|
|
66620
|
+
const element = this.element;
|
|
66621
|
+
if (!element) {
|
|
66622
|
+
return;
|
|
66623
|
+
}
|
|
66624
|
+
|
|
66074
66625
|
const event = new CustomEvent(
|
|
66075
66626
|
this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
|
|
66076
66627
|
{
|
|
@@ -66082,11 +66633,16 @@ class AuroFloatingUI {
|
|
|
66082
66633
|
},
|
|
66083
66634
|
);
|
|
66084
66635
|
|
|
66085
|
-
|
|
66636
|
+
element.dispatchEvent(event);
|
|
66086
66637
|
}
|
|
66087
66638
|
|
|
66088
66639
|
handleClick() {
|
|
66089
|
-
|
|
66640
|
+
const element = this.element;
|
|
66641
|
+
if (!element) {
|
|
66642
|
+
return;
|
|
66643
|
+
}
|
|
66644
|
+
|
|
66645
|
+
if (element.isPopoverVisible) {
|
|
66090
66646
|
this.hideBib("click");
|
|
66091
66647
|
} else {
|
|
66092
66648
|
this.showBib();
|
|
@@ -66097,63 +66653,66 @@ class AuroFloatingUI {
|
|
|
66097
66653
|
{
|
|
66098
66654
|
composed: true,
|
|
66099
66655
|
detail: {
|
|
66100
|
-
expanded:
|
|
66656
|
+
expanded: element.isPopoverVisible,
|
|
66101
66657
|
},
|
|
66102
66658
|
},
|
|
66103
66659
|
);
|
|
66104
66660
|
|
|
66105
|
-
|
|
66661
|
+
element.dispatchEvent(event);
|
|
66106
66662
|
}
|
|
66107
66663
|
|
|
66108
66664
|
handleEvent(event) {
|
|
66109
|
-
|
|
66110
|
-
|
|
66111
|
-
|
|
66112
|
-
|
|
66113
|
-
|
|
66114
|
-
|
|
66115
|
-
|
|
66116
|
-
|
|
66117
|
-
|
|
66118
|
-
|
|
66119
|
-
|
|
66120
|
-
|
|
66121
|
-
|
|
66122
|
-
|
|
66123
|
-
|
|
66124
|
-
|
|
66125
|
-
case "mouseenter":
|
|
66126
|
-
if (this.element.hoverToggle) {
|
|
66127
|
-
this.showBib();
|
|
66128
|
-
}
|
|
66129
|
-
break;
|
|
66130
|
-
case "mouseleave":
|
|
66131
|
-
if (this.element.hoverToggle) {
|
|
66132
|
-
this.hideBib("mouseleave");
|
|
66133
|
-
}
|
|
66134
|
-
break;
|
|
66135
|
-
case "focus":
|
|
66136
|
-
if (this.element.focusShow) {
|
|
66137
|
-
/*
|
|
66138
|
-
This needs to better handle clicking that gives focus -
|
|
66139
|
-
currently it shows and then immediately hides the bib
|
|
66140
|
-
*/
|
|
66141
|
-
this.showBib();
|
|
66142
|
-
}
|
|
66143
|
-
break;
|
|
66144
|
-
case "blur":
|
|
66145
|
-
// send this task 100ms later queue to
|
|
66146
|
-
// wait a frame in case focus moves within the floating element/bib
|
|
66147
|
-
setTimeout(() => this.handleFocusLoss(), 0);
|
|
66148
|
-
break;
|
|
66149
|
-
case "click":
|
|
66150
|
-
if (document.activeElement === document.body) {
|
|
66151
|
-
event.currentTarget.focus();
|
|
66152
|
-
}
|
|
66665
|
+
const element = this.element;
|
|
66666
|
+
if (!element || element.disableEventShow) {
|
|
66667
|
+
return;
|
|
66668
|
+
}
|
|
66669
|
+
|
|
66670
|
+
switch (event.type) {
|
|
66671
|
+
case "keydown": {
|
|
66672
|
+
// Support both Enter and Space keys for accessibility
|
|
66673
|
+
// Space is included as it's expected behavior for interactive elements
|
|
66674
|
+
|
|
66675
|
+
const origin = event.composedPath()[0];
|
|
66676
|
+
if (
|
|
66677
|
+
event.key === "Enter" ||
|
|
66678
|
+
(event.key === " " && (!origin || origin.tagName !== "INPUT"))
|
|
66679
|
+
) {
|
|
66680
|
+
event.preventDefault();
|
|
66153
66681
|
this.handleClick();
|
|
66154
|
-
|
|
66155
|
-
|
|
66682
|
+
}
|
|
66683
|
+
break;
|
|
66156
66684
|
}
|
|
66685
|
+
case "mouseenter":
|
|
66686
|
+
if (element.hoverToggle) {
|
|
66687
|
+
this.showBib();
|
|
66688
|
+
}
|
|
66689
|
+
break;
|
|
66690
|
+
case "mouseleave":
|
|
66691
|
+
if (element.hoverToggle) {
|
|
66692
|
+
this.hideBib("mouseleave");
|
|
66693
|
+
}
|
|
66694
|
+
break;
|
|
66695
|
+
case "focus":
|
|
66696
|
+
if (element.focusShow) {
|
|
66697
|
+
/*
|
|
66698
|
+
This needs to better handle clicking that gives focus -
|
|
66699
|
+
currently it shows and then immediately hides the bib
|
|
66700
|
+
*/
|
|
66701
|
+
this.showBib();
|
|
66702
|
+
}
|
|
66703
|
+
break;
|
|
66704
|
+
case "blur":
|
|
66705
|
+
// send this task 100ms later queue to
|
|
66706
|
+
// wait a frame in case focus moves within the floating element/bib
|
|
66707
|
+
setTimeout(() => this.handleFocusLoss(), 0);
|
|
66708
|
+
break;
|
|
66709
|
+
case "click":
|
|
66710
|
+
if (document.activeElement === document.body) {
|
|
66711
|
+
event.currentTarget.focus();
|
|
66712
|
+
}
|
|
66713
|
+
this.handleClick();
|
|
66714
|
+
break;
|
|
66715
|
+
// Do nothing
|
|
66157
66716
|
}
|
|
66158
66717
|
}
|
|
66159
66718
|
|
|
@@ -66164,6 +66723,11 @@ class AuroFloatingUI {
|
|
|
66164
66723
|
* This prevents the component itself from being focusable when the trigger element already handles focus.
|
|
66165
66724
|
*/
|
|
66166
66725
|
handleTriggerTabIndex() {
|
|
66726
|
+
const element = this.element;
|
|
66727
|
+
if (!element) {
|
|
66728
|
+
return;
|
|
66729
|
+
}
|
|
66730
|
+
|
|
66167
66731
|
const focusableElementSelectors = [
|
|
66168
66732
|
"a",
|
|
66169
66733
|
"button",
|
|
@@ -66176,7 +66740,7 @@ class AuroFloatingUI {
|
|
|
66176
66740
|
"auro-hyperlink",
|
|
66177
66741
|
];
|
|
66178
66742
|
|
|
66179
|
-
const triggerNode =
|
|
66743
|
+
const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
|
|
66180
66744
|
if (!triggerNode) {
|
|
66181
66745
|
return;
|
|
66182
66746
|
}
|
|
@@ -66185,13 +66749,13 @@ class AuroFloatingUI {
|
|
|
66185
66749
|
focusableElementSelectors.forEach((selector) => {
|
|
66186
66750
|
// Check if the trigger node element is focusable
|
|
66187
66751
|
if (triggerNodeTagName === selector) {
|
|
66188
|
-
|
|
66752
|
+
element.tabIndex = -1;
|
|
66189
66753
|
return;
|
|
66190
66754
|
}
|
|
66191
66755
|
|
|
66192
66756
|
// Check if any child is focusable
|
|
66193
66757
|
if (triggerNode.querySelector(selector)) {
|
|
66194
|
-
|
|
66758
|
+
element.tabIndex = -1;
|
|
66195
66759
|
}
|
|
66196
66760
|
});
|
|
66197
66761
|
}
|
|
@@ -66201,13 +66765,18 @@ class AuroFloatingUI {
|
|
|
66201
66765
|
* @param {*} eventPrefix
|
|
66202
66766
|
*/
|
|
66203
66767
|
regenerateBibId() {
|
|
66204
|
-
|
|
66768
|
+
const element = this.element;
|
|
66769
|
+
if (!element) {
|
|
66770
|
+
return;
|
|
66771
|
+
}
|
|
66772
|
+
|
|
66773
|
+
this.id = element.getAttribute("id");
|
|
66205
66774
|
if (!this.id) {
|
|
66206
66775
|
this.id = window.crypto.randomUUID();
|
|
66207
|
-
|
|
66776
|
+
element.setAttribute("id", this.id);
|
|
66208
66777
|
}
|
|
66209
66778
|
|
|
66210
|
-
|
|
66779
|
+
element.bib?.setAttribute("id", `${this.id}-floater-bib`);
|
|
66211
66780
|
}
|
|
66212
66781
|
|
|
66213
66782
|
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
@@ -66219,67 +66788,69 @@ class AuroFloatingUI {
|
|
|
66219
66788
|
this.element = elem;
|
|
66220
66789
|
}
|
|
66221
66790
|
|
|
66222
|
-
|
|
66223
|
-
|
|
66791
|
+
const element = this.element;
|
|
66792
|
+
if (!element) {
|
|
66793
|
+
return;
|
|
66794
|
+
}
|
|
66795
|
+
|
|
66796
|
+
if (this.behavior !== element.behavior) {
|
|
66797
|
+
this.behavior = element.behavior;
|
|
66224
66798
|
}
|
|
66225
66799
|
|
|
66226
|
-
if (
|
|
66800
|
+
if (element.trigger) {
|
|
66227
66801
|
this.disconnect();
|
|
66228
66802
|
}
|
|
66229
|
-
|
|
66230
|
-
|
|
66231
|
-
|
|
66232
|
-
|
|
66233
|
-
|
|
66234
|
-
|
|
66235
|
-
|
|
66236
|
-
|
|
66237
|
-
this.element.shadowRoot.querySelector("#showStateIcon");
|
|
66803
|
+
element.trigger =
|
|
66804
|
+
element.triggerElement ||
|
|
66805
|
+
element.shadowRoot?.querySelector("#trigger") ||
|
|
66806
|
+
element.trigger;
|
|
66807
|
+
element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
|
|
66808
|
+
element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
|
|
66809
|
+
element.triggerChevron =
|
|
66810
|
+
element.shadowRoot?.querySelector("#showStateIcon");
|
|
66238
66811
|
|
|
66239
|
-
if (
|
|
66240
|
-
|
|
66812
|
+
if (element.floaterConfig) {
|
|
66813
|
+
element.hoverToggle = element.floaterConfig.hoverToggle;
|
|
66241
66814
|
}
|
|
66242
66815
|
|
|
66243
66816
|
this.regenerateBibId();
|
|
66244
66817
|
this.handleTriggerTabIndex();
|
|
66245
66818
|
|
|
66246
66819
|
this.handleEvent = this.handleEvent.bind(this);
|
|
66247
|
-
if (
|
|
66820
|
+
if (element.trigger) {
|
|
66248
66821
|
if (this.enableKeyboardHandling) {
|
|
66249
|
-
|
|
66822
|
+
element.trigger.addEventListener("keydown", this.handleEvent);
|
|
66250
66823
|
}
|
|
66251
|
-
|
|
66252
|
-
|
|
66253
|
-
|
|
66254
|
-
|
|
66255
|
-
|
|
66824
|
+
element.trigger.addEventListener("click", this.handleEvent);
|
|
66825
|
+
element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
66826
|
+
element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
66827
|
+
element.trigger.addEventListener("focus", this.handleEvent);
|
|
66828
|
+
element.trigger.addEventListener("blur", this.handleEvent);
|
|
66256
66829
|
}
|
|
66257
66830
|
}
|
|
66258
66831
|
|
|
66259
66832
|
disconnect() {
|
|
66260
66833
|
this.cleanupHideHandlers();
|
|
66261
|
-
if (this.element) {
|
|
66262
|
-
this.element.cleanup?.();
|
|
66263
66834
|
|
|
66264
|
-
|
|
66265
|
-
|
|
66266
|
-
|
|
66835
|
+
const element = this.element;
|
|
66836
|
+
if (!element) {
|
|
66837
|
+
return;
|
|
66838
|
+
}
|
|
66267
66839
|
|
|
66268
|
-
|
|
66269
|
-
|
|
66270
|
-
|
|
66271
|
-
|
|
66272
|
-
|
|
66273
|
-
|
|
66274
|
-
|
|
66275
|
-
|
|
66276
|
-
|
|
66277
|
-
|
|
66278
|
-
|
|
66279
|
-
|
|
66280
|
-
|
|
66281
|
-
|
|
66282
|
-
}
|
|
66840
|
+
element.cleanup?.();
|
|
66841
|
+
|
|
66842
|
+
if (element.bib && element.shadowRoot) {
|
|
66843
|
+
element.shadowRoot.append(element.bib);
|
|
66844
|
+
}
|
|
66845
|
+
|
|
66846
|
+
// Remove event & keyboard listeners
|
|
66847
|
+
if (element.trigger) {
|
|
66848
|
+
element.trigger.removeEventListener("keydown", this.handleEvent);
|
|
66849
|
+
element.trigger.removeEventListener("click", this.handleEvent);
|
|
66850
|
+
element.trigger.removeEventListener("mouseenter", this.handleEvent);
|
|
66851
|
+
element.trigger.removeEventListener("mouseleave", this.handleEvent);
|
|
66852
|
+
element.trigger.removeEventListener("focus", this.handleEvent);
|
|
66853
|
+
element.trigger.removeEventListener("blur", this.handleEvent);
|
|
66283
66854
|
}
|
|
66284
66855
|
}
|
|
66285
66856
|
}
|
|
@@ -67407,7 +67978,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$4 {
|
|
|
67407
67978
|
}
|
|
67408
67979
|
};
|
|
67409
67980
|
|
|
67410
|
-
var formkitVersion$1 = '
|
|
67981
|
+
var formkitVersion$1 = '202604091759';
|
|
67411
67982
|
|
|
67412
67983
|
class AuroElement extends i$4 {
|
|
67413
67984
|
static get properties() {
|
|
@@ -67513,7 +68084,7 @@ class AuroElement extends i$4 {
|
|
|
67513
68084
|
}
|
|
67514
68085
|
}
|
|
67515
68086
|
|
|
67516
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
68087
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
67517
68088
|
// See LICENSE in the project root for license information.
|
|
67518
68089
|
|
|
67519
68090
|
|
|
@@ -69152,13 +69723,13 @@ class AuroHelpText extends i$4 {
|
|
|
69152
69723
|
}
|
|
69153
69724
|
}
|
|
69154
69725
|
|
|
69155
|
-
var formkitVersion = '
|
|
69726
|
+
var formkitVersion = '202604091759';
|
|
69156
69727
|
|
|
69157
69728
|
var styleCss = i$7`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5rem)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.625rem)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25rem)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1rem)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular"),system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.875rem)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular"),var(--wcss-display-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular"),var(--wcss-display-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular"),var(--wcss-display-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular"),var(--wcss-display-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular"),var(--wcss-display-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular"),var(--wcss-display-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular"),var(--wcss-heading-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular"),var(--wcss-heading-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular"),var(--wcss-heading-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular"),var(--wcss-heading-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular"),var(--wcss-heading-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular"),var(--wcss-heading-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT"),var(--wcss-accent-2xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-2xl,.accent-xl{text-transform:uppercase}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT"),var(--wcss-accent-xl-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT"),var(--wcss-accent-lg-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-lg,.accent-md{text-transform:uppercase}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT"),var(--wcss-accent-md-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT"),var(--wcss-accent-sm-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-sm,.accent-xs{text-transform:uppercase}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT"),var(--wcss-accent-xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT"),var(--wcss-accent-2xs-family-fallback, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3);text-transform:uppercase}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-outline-color: var(--ds-auro-select-outline-color)}:host{display:inline-block;text-align:left;vertical-align:top}:host([layout*=emphasized]) [auro-dropdown],:host([layout*=snowflake]) [auro-dropdown]{--ds-auro-select-border-color: transparent}:host([layout*=emphasized]) .mainContent,:host([layout*=snowflake]) .mainContent{text-align:center}.mainContent{position:relative;display:flex;overflow:hidden;flex:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content:center}::slotted([slot=typeIcon]){margin-right:var(--ds-size-100, 0.5rem)}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}:host([layout*=emphasized]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem) 0 var(--ds-size-200, 1rem)}:host([layout*=snowflake]) label{padding-block:var(--ds-size-25, 0.125rem)}:host([layout*=classic]) .triggerContent{padding:0 var(--ds-size-100, 0.5rem)}:host([layout*=classic]) .mainContent{align-items:start}:host([layout*=classic]) label{overflow:hidden;cursor:text;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) .value{height:auto}label{color:var(--ds-auro-select-label-text-color)}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown],:host([appearance=inverse]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([fluid]){width:100%}:host([disabled]){pointer-events:none;user-select:none}:host([disabled]:not([ondark])) [auro-dropdown],:host([disabled]:not([appearance=inverse])) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([layout*=classic])[disabled][ondark]) [auro-dropdown],:host(:not([layout*=classic])[disabled][appearance=inverse]) [auro-dropdown]{--ds-auro-select-border-color: transparent}`;
|
|
69158
69729
|
|
|
69159
69730
|
var emphasizedColorCss = i$7`:host([layout=emphasized]) [auro-dropdown]{--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843))}:host([layout=emphasized]) [auro-dropdown]:hover{--ds-auro-dropdown-trigger-hover-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843))}:host([layout=emphasized]) [auro-dropdown][layout*=emphasized]::part(wrapper){--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-dropdown-emphasized-background, rgba(0, 39, 74, 0.1019607843))}`;
|
|
69160
69731
|
|
|
69161
|
-
// Copyright (c) 2026 Alaska Airlines. All
|
|
69732
|
+
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
69162
69733
|
// See LICENSE in the project root for license information.
|
|
69163
69734
|
|
|
69164
69735
|
|
|
@@ -69953,6 +70524,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
69953
70524
|
this.scrollActiveOptionIntoView();
|
|
69954
70525
|
}
|
|
69955
70526
|
});
|
|
70527
|
+
|
|
69956
70528
|
this.menu.addEventListener('auroMenu-selectedOption', (event) => {
|
|
69957
70529
|
|
|
69958
70530
|
// Update the displayed value
|
|
@@ -69966,6 +70538,7 @@ class AuroSelect extends AuroElement$1 {
|
|
|
69966
70538
|
|
|
69967
70539
|
if (this.dropdown.isPopoverVisible && !this.multiSelect) {
|
|
69968
70540
|
this.dropdown.hide();
|
|
70541
|
+
this.dropdown.trigger.focus();
|
|
69969
70542
|
}
|
|
69970
70543
|
|
|
69971
70544
|
// Announce the selection after the dropdown closes so it isn't
|
|
@@ -70227,9 +70800,6 @@ class AuroSelect extends AuroElement$1 {
|
|
|
70227
70800
|
if (!this.multiSelect) {
|
|
70228
70801
|
this.hideBib();
|
|
70229
70802
|
}
|
|
70230
|
-
if (this.dropdown && this.dropdown.trigger) {
|
|
70231
|
-
this.dropdown.trigger.focus();
|
|
70232
|
-
}
|
|
70233
70803
|
|
|
70234
70804
|
// LEGACY EVENT
|
|
70235
70805
|
this.dispatchEvent(new CustomEvent('auroSelect-valueSet', {
|