@aurodesignsystem-dev/auro-formkit 0.0.0-pr1425.0 → 0.0.0-pr1428.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/api.min.js +276 -165
- package/components/combobox/demo/index.min.js +276 -165
- package/components/combobox/dist/index.js +276 -165
- package/components/combobox/dist/registered.js +276 -165
- package/components/counter/demo/api.min.js +275 -164
- package/components/counter/demo/index.min.js +275 -164
- package/components/counter/dist/index.js +275 -164
- package/components/counter/dist/registered.js +275 -164
- package/components/datepicker/demo/api.min.js +276 -165
- package/components/datepicker/demo/index.min.js +276 -165
- package/components/datepicker/dist/index.js +276 -165
- package/components/datepicker/dist/registered.js +276 -165
- package/components/dropdown/demo/api.min.js +275 -164
- package/components/dropdown/demo/index.min.js +275 -164
- package/components/dropdown/dist/index.js +275 -164
- package/components/dropdown/dist/registered.js +275 -164
- package/components/form/demo/api.min.js +1105 -661
- package/components/form/demo/index.min.js +1105 -661
- 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/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/api.min.js +275 -164
- package/components/select/demo/index.min.js +275 -164
- package/components/select/dist/index.js +275 -164
- package/components/select/dist/registered.js +275 -164
- package/custom-elements.json +244 -244
- package/package.json +2 -2
|
@@ -9549,7 +9549,7 @@ class AuroBibtemplate extends i$1 {
|
|
|
9549
9549
|
}
|
|
9550
9550
|
}
|
|
9551
9551
|
|
|
9552
|
-
var formkitVersion$2 = '
|
|
9552
|
+
var formkitVersion$2 = '202604081417';
|
|
9553
9553
|
|
|
9554
9554
|
let l$1 = 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$5`${s$5(r)}`;return customElements.get(r)||customElements.define(r,class extends a{}),i}};let d$1 = 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$4 = 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$3=i$3`: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}
|
|
9555
9555
|
`,u$6=i$3`.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}}
|
|
@@ -11883,11 +11883,19 @@ class AuroFloatingUI {
|
|
|
11883
11883
|
* This ensures that the bib content has the same dimensions as the sizer element.
|
|
11884
11884
|
*/
|
|
11885
11885
|
mirrorSize() {
|
|
11886
|
+
const element = this.element;
|
|
11887
|
+
if (!element) {
|
|
11888
|
+
return;
|
|
11889
|
+
}
|
|
11890
|
+
|
|
11886
11891
|
// mirror the boxsize from bibSizer
|
|
11887
|
-
if (
|
|
11888
|
-
const sizerStyle = window.getComputedStyle(
|
|
11889
|
-
const bibContent =
|
|
11890
|
-
|
|
11892
|
+
if (element.bibSizer && element.matchWidth && element.bib?.shadowRoot) {
|
|
11893
|
+
const sizerStyle = window.getComputedStyle(element.bibSizer);
|
|
11894
|
+
const bibContent = element.bib.shadowRoot.querySelector(".container");
|
|
11895
|
+
if (!bibContent) {
|
|
11896
|
+
return;
|
|
11897
|
+
}
|
|
11898
|
+
|
|
11891
11899
|
if (sizerStyle.width !== "0px") {
|
|
11892
11900
|
bibContent.style.width = sizerStyle.width;
|
|
11893
11901
|
}
|
|
@@ -11909,9 +11917,14 @@ class AuroFloatingUI {
|
|
|
11909
11917
|
* @returns {String} The positioning strategy, one of 'fullscreen', 'floating', 'cover'.
|
|
11910
11918
|
*/
|
|
11911
11919
|
getPositioningStrategy() {
|
|
11920
|
+
const element = this.element;
|
|
11921
|
+
if (!element) {
|
|
11922
|
+
return "floating";
|
|
11923
|
+
}
|
|
11924
|
+
|
|
11912
11925
|
const breakpoint =
|
|
11913
|
-
|
|
11914
|
-
|
|
11926
|
+
element.bib?.mobileFullscreenBreakpoint ||
|
|
11927
|
+
element.floaterConfig?.fullscreenBreakpoint;
|
|
11915
11928
|
switch (this.behavior) {
|
|
11916
11929
|
case "tooltip":
|
|
11917
11930
|
return "floating";
|
|
@@ -11922,9 +11935,9 @@ class AuroFloatingUI {
|
|
|
11922
11935
|
`(max-width: ${breakpoint})`,
|
|
11923
11936
|
).matches;
|
|
11924
11937
|
|
|
11925
|
-
|
|
11938
|
+
element.expanded = smallerThanBreakpoint;
|
|
11926
11939
|
}
|
|
11927
|
-
if (
|
|
11940
|
+
if (element.nested) {
|
|
11928
11941
|
return "cover";
|
|
11929
11942
|
}
|
|
11930
11943
|
return "fullscreen";
|
|
@@ -11954,42 +11967,65 @@ class AuroFloatingUI {
|
|
|
11954
11967
|
* and applies the calculated position to the bib's style.
|
|
11955
11968
|
*/
|
|
11956
11969
|
position() {
|
|
11970
|
+
const element = this.element;
|
|
11971
|
+
if (!element) {
|
|
11972
|
+
return;
|
|
11973
|
+
}
|
|
11974
|
+
|
|
11957
11975
|
const strategy = this.getPositioningStrategy();
|
|
11958
11976
|
this.configureBibStrategy(strategy);
|
|
11959
11977
|
|
|
11960
11978
|
if (strategy === "floating") {
|
|
11979
|
+
if (!element.trigger || !element.bib) {
|
|
11980
|
+
return;
|
|
11981
|
+
}
|
|
11982
|
+
|
|
11961
11983
|
this.mirrorSize();
|
|
11962
11984
|
// Define the middlware for the floater configuration
|
|
11963
11985
|
const middleware = [
|
|
11964
|
-
offset(
|
|
11965
|
-
...(
|
|
11966
|
-
...(
|
|
11967
|
-
...(
|
|
11986
|
+
offset(element.floaterConfig?.offset || 0),
|
|
11987
|
+
...(element.floaterConfig?.shift ? [shift()] : []), // Add shift middleware if shift is enabled.
|
|
11988
|
+
...(element.floaterConfig?.flip ? [flip()] : []), // Add flip middleware if flip is enabled.
|
|
11989
|
+
...(element.floaterConfig?.autoPlacement ? [autoPlacement()] : []), // Add autoPlacement middleware if autoPlacement is enabled.
|
|
11968
11990
|
];
|
|
11969
11991
|
|
|
11970
11992
|
// Compute the position of the bib
|
|
11971
|
-
computePosition(
|
|
11972
|
-
strategy:
|
|
11973
|
-
placement:
|
|
11993
|
+
computePosition(element.trigger, element.bib, {
|
|
11994
|
+
strategy: element.floaterConfig?.strategy || "fixed",
|
|
11995
|
+
placement: element.floaterConfig?.placement,
|
|
11974
11996
|
middleware: middleware || [],
|
|
11975
11997
|
}).then(({ x, y }) => {
|
|
11976
11998
|
// eslint-disable-line id-length
|
|
11977
|
-
|
|
11999
|
+
const currentElement = this.element;
|
|
12000
|
+
if (!currentElement?.bib) {
|
|
12001
|
+
return;
|
|
12002
|
+
}
|
|
12003
|
+
|
|
12004
|
+
Object.assign(currentElement.bib.style, {
|
|
11978
12005
|
left: `${x}px`,
|
|
11979
12006
|
top: `${y}px`,
|
|
11980
12007
|
});
|
|
11981
12008
|
});
|
|
11982
12009
|
} else if (strategy === "cover") {
|
|
12010
|
+
if (!element.parentNode || !element.bib) {
|
|
12011
|
+
return;
|
|
12012
|
+
}
|
|
12013
|
+
|
|
11983
12014
|
// Compute the position of the bib
|
|
11984
|
-
computePosition(
|
|
12015
|
+
computePosition(element.parentNode, element.bib, {
|
|
11985
12016
|
placement: "bottom-start",
|
|
11986
12017
|
}).then(({ x, y }) => {
|
|
11987
12018
|
// eslint-disable-line id-length
|
|
11988
|
-
|
|
12019
|
+
const currentElement = this.element;
|
|
12020
|
+
if (!currentElement?.bib || !currentElement.parentNode) {
|
|
12021
|
+
return;
|
|
12022
|
+
}
|
|
12023
|
+
|
|
12024
|
+
Object.assign(currentElement.bib.style, {
|
|
11989
12025
|
left: `${x}px`,
|
|
11990
|
-
top: `${y -
|
|
11991
|
-
width: `${
|
|
11992
|
-
height: `${
|
|
12026
|
+
top: `${y - currentElement.parentNode.offsetHeight}px`,
|
|
12027
|
+
width: `${currentElement.parentNode.offsetWidth}px`,
|
|
12028
|
+
height: `${currentElement.parentNode.offsetHeight}px`,
|
|
11993
12029
|
});
|
|
11994
12030
|
});
|
|
11995
12031
|
}
|
|
@@ -12001,11 +12037,17 @@ class AuroFloatingUI {
|
|
|
12001
12037
|
* @param {Boolean} lock - If true, locks the body's scrolling functionlity; otherwise, unlock.
|
|
12002
12038
|
*/
|
|
12003
12039
|
lockScroll(lock = true) {
|
|
12040
|
+
const element = this.element;
|
|
12041
|
+
|
|
12004
12042
|
if (lock) {
|
|
12043
|
+
if (!element?.bib) {
|
|
12044
|
+
return;
|
|
12045
|
+
}
|
|
12046
|
+
|
|
12005
12047
|
document.body.style.overflow = "hidden"; // hide body's scrollbar
|
|
12006
12048
|
|
|
12007
12049
|
// Move `bib` by the amount the viewport is shifted to stay aligned in fullscreen.
|
|
12008
|
-
|
|
12050
|
+
element.bib.style.transform = `translateY(${window?.visualViewport?.offsetTop}px)`;
|
|
12009
12051
|
} else {
|
|
12010
12052
|
document.body.style.overflow = "";
|
|
12011
12053
|
}
|
|
@@ -12021,20 +12063,24 @@ class AuroFloatingUI {
|
|
|
12021
12063
|
* @param {string} strategy - The positioning strategy ('fullscreen' or 'floating').
|
|
12022
12064
|
*/
|
|
12023
12065
|
configureBibStrategy(value) {
|
|
12066
|
+
const element = this.element;
|
|
12067
|
+
if (!element?.bib) {
|
|
12068
|
+
return;
|
|
12069
|
+
}
|
|
12070
|
+
|
|
12024
12071
|
if (value === "fullscreen") {
|
|
12025
|
-
|
|
12072
|
+
element.isBibFullscreen = true;
|
|
12026
12073
|
// reset the prev position
|
|
12027
|
-
|
|
12028
|
-
|
|
12029
|
-
|
|
12030
|
-
|
|
12031
|
-
|
|
12032
|
-
|
|
12033
|
-
|
|
12074
|
+
element.bib.setAttribute("isfullscreen", "");
|
|
12075
|
+
element.bib.style.position = "fixed";
|
|
12076
|
+
element.bib.style.top = "0px";
|
|
12077
|
+
element.bib.style.left = "0px";
|
|
12078
|
+
element.bib.style.width = "";
|
|
12079
|
+
element.bib.style.height = "";
|
|
12080
|
+
element.style.contain = "";
|
|
12034
12081
|
|
|
12035
12082
|
// reset the size that was mirroring `size` css-part
|
|
12036
|
-
const bibContent =
|
|
12037
|
-
this.element.bib.shadowRoot.querySelector(".container");
|
|
12083
|
+
const bibContent = element.bib.shadowRoot?.querySelector(".container");
|
|
12038
12084
|
if (bibContent) {
|
|
12039
12085
|
bibContent.style.width = "";
|
|
12040
12086
|
bibContent.style.height = "";
|
|
@@ -12049,14 +12095,14 @@ class AuroFloatingUI {
|
|
|
12049
12095
|
}, 0);
|
|
12050
12096
|
}
|
|
12051
12097
|
|
|
12052
|
-
if (
|
|
12098
|
+
if (element.isPopoverVisible) {
|
|
12053
12099
|
this.lockScroll(true);
|
|
12054
12100
|
}
|
|
12055
12101
|
} else {
|
|
12056
|
-
|
|
12057
|
-
|
|
12058
|
-
|
|
12059
|
-
|
|
12102
|
+
element.bib.style.position = "";
|
|
12103
|
+
element.bib.removeAttribute("isfullscreen");
|
|
12104
|
+
element.isBibFullscreen = false;
|
|
12105
|
+
element.style.contain = "layout";
|
|
12060
12106
|
}
|
|
12061
12107
|
|
|
12062
12108
|
const isChanged = this.strategy && this.strategy !== value;
|
|
@@ -12074,16 +12120,21 @@ class AuroFloatingUI {
|
|
|
12074
12120
|
},
|
|
12075
12121
|
);
|
|
12076
12122
|
|
|
12077
|
-
|
|
12123
|
+
element.dispatchEvent(event);
|
|
12078
12124
|
}
|
|
12079
12125
|
}
|
|
12080
12126
|
|
|
12081
12127
|
updateState() {
|
|
12082
|
-
const
|
|
12128
|
+
const element = this.element;
|
|
12129
|
+
if (!element) {
|
|
12130
|
+
return;
|
|
12131
|
+
}
|
|
12132
|
+
|
|
12133
|
+
const isVisible = element.isPopoverVisible;
|
|
12083
12134
|
if (!isVisible) {
|
|
12084
12135
|
this.cleanupHideHandlers();
|
|
12085
12136
|
try {
|
|
12086
|
-
|
|
12137
|
+
element.cleanup?.();
|
|
12087
12138
|
} catch (error) {
|
|
12088
12139
|
// Do nothing
|
|
12089
12140
|
}
|
|
@@ -12099,28 +12150,30 @@ class AuroFloatingUI {
|
|
|
12099
12150
|
* If not, and if the bib isn't in fullscreen mode with focus lost, it hides the bib.
|
|
12100
12151
|
*/
|
|
12101
12152
|
handleFocusLoss() {
|
|
12153
|
+
const element = this.element;
|
|
12154
|
+
if (!element?.bib) {
|
|
12155
|
+
return;
|
|
12156
|
+
}
|
|
12157
|
+
|
|
12102
12158
|
// if mouse is being pressed, skip and let click event to handle the action
|
|
12103
12159
|
if (AuroFloatingUI.isMousePressed) {
|
|
12104
12160
|
return;
|
|
12105
12161
|
}
|
|
12106
12162
|
|
|
12107
12163
|
if (
|
|
12108
|
-
|
|
12109
|
-
|
|
12164
|
+
element.noHideOnThisFocusLoss ||
|
|
12165
|
+
element.hasAttribute("noHideOnThisFocusLoss")
|
|
12110
12166
|
) {
|
|
12111
12167
|
return;
|
|
12112
12168
|
}
|
|
12113
12169
|
|
|
12114
12170
|
// if focus is still inside of trigger or bib, do not close
|
|
12115
|
-
if (
|
|
12116
|
-
this.element.matches(":focus") ||
|
|
12117
|
-
this.element.matches(":focus-within")
|
|
12118
|
-
) {
|
|
12171
|
+
if (element.matches(":focus") || element.matches(":focus-within")) {
|
|
12119
12172
|
return;
|
|
12120
12173
|
}
|
|
12121
12174
|
|
|
12122
12175
|
// if fullscreen bib is in fullscreen mode, do not close
|
|
12123
|
-
if (
|
|
12176
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
12124
12177
|
return;
|
|
12125
12178
|
}
|
|
12126
12179
|
|
|
@@ -12128,23 +12181,33 @@ class AuroFloatingUI {
|
|
|
12128
12181
|
}
|
|
12129
12182
|
|
|
12130
12183
|
setupHideHandlers() {
|
|
12184
|
+
const element = this.element;
|
|
12185
|
+
if (!element) {
|
|
12186
|
+
return;
|
|
12187
|
+
}
|
|
12188
|
+
|
|
12131
12189
|
// Define handlers & store references
|
|
12132
12190
|
this.focusHandler = () => this.handleFocusLoss();
|
|
12133
12191
|
|
|
12134
12192
|
this.clickHandler = (evt) => {
|
|
12193
|
+
const element = this.element;
|
|
12194
|
+
if (!element?.bib) {
|
|
12195
|
+
return;
|
|
12196
|
+
}
|
|
12197
|
+
|
|
12135
12198
|
// When the bib is fullscreen (modal dialog), don't close on outside
|
|
12136
12199
|
// clicks. VoiceOver's synthetic click events inside a top-layer modal
|
|
12137
12200
|
// <dialog> may not include the bib in composedPath(), causing false
|
|
12138
12201
|
// positives. This mirrors the fullscreen guard in handleFocusLoss().
|
|
12139
|
-
if (
|
|
12202
|
+
if (element.bib.hasAttribute("isfullscreen")) {
|
|
12140
12203
|
return;
|
|
12141
12204
|
}
|
|
12142
12205
|
|
|
12143
12206
|
if (
|
|
12144
|
-
(!evt.composedPath().includes(
|
|
12145
|
-
!evt.composedPath().includes(
|
|
12146
|
-
(
|
|
12147
|
-
evt.composedPath().includes(
|
|
12207
|
+
(!evt.composedPath().includes(element.trigger) &&
|
|
12208
|
+
!evt.composedPath().includes(element.bib)) ||
|
|
12209
|
+
(element.bib.backdrop &&
|
|
12210
|
+
evt.composedPath().includes(element.bib.backdrop))
|
|
12148
12211
|
) {
|
|
12149
12212
|
const existedVisibleFloatingUI =
|
|
12150
12213
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -12165,7 +12228,12 @@ class AuroFloatingUI {
|
|
|
12165
12228
|
|
|
12166
12229
|
// ESC key handler
|
|
12167
12230
|
this.keyDownHandler = (evt) => {
|
|
12168
|
-
|
|
12231
|
+
const element = this.element;
|
|
12232
|
+
if (!element) {
|
|
12233
|
+
return;
|
|
12234
|
+
}
|
|
12235
|
+
|
|
12236
|
+
if (evt.key === "Escape" && element.isPopoverVisible) {
|
|
12169
12237
|
const existedVisibleFloatingUI =
|
|
12170
12238
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
12171
12239
|
if (
|
|
@@ -12222,6 +12290,10 @@ class AuroFloatingUI {
|
|
|
12222
12290
|
}
|
|
12223
12291
|
|
|
12224
12292
|
updateCurrentExpandedDropdown() {
|
|
12293
|
+
if (!this.element) {
|
|
12294
|
+
return;
|
|
12295
|
+
}
|
|
12296
|
+
|
|
12225
12297
|
// Close any other dropdown that is already open
|
|
12226
12298
|
const existedVisibleFloatingUI =
|
|
12227
12299
|
document.expandedAuroFormkitDropdown || document.expandedAuroFloater;
|
|
@@ -12238,25 +12310,34 @@ class AuroFloatingUI {
|
|
|
12238
12310
|
}
|
|
12239
12311
|
|
|
12240
12312
|
showBib() {
|
|
12241
|
-
|
|
12313
|
+
const element = this.element;
|
|
12314
|
+
if (!element) {
|
|
12315
|
+
return;
|
|
12316
|
+
}
|
|
12317
|
+
|
|
12318
|
+
if (!element.bib || (!element.trigger && !element.parentNode)) {
|
|
12319
|
+
return;
|
|
12320
|
+
}
|
|
12321
|
+
|
|
12322
|
+
if (!element.disabled && !this.showing) {
|
|
12242
12323
|
this.updateCurrentExpandedDropdown();
|
|
12243
|
-
|
|
12324
|
+
element.triggerChevron?.setAttribute("data-expanded", true);
|
|
12244
12325
|
|
|
12245
12326
|
// prevent double showing: isPopovervisible gets first and showBib gets called later
|
|
12246
12327
|
if (!this.showing) {
|
|
12247
|
-
if (!
|
|
12328
|
+
if (!element.modal) {
|
|
12248
12329
|
this.setupHideHandlers();
|
|
12249
12330
|
}
|
|
12250
12331
|
this.showing = true;
|
|
12251
|
-
|
|
12332
|
+
element.isPopoverVisible = true;
|
|
12252
12333
|
this.position();
|
|
12253
12334
|
this.dispatchEventDropdownToggle();
|
|
12254
12335
|
}
|
|
12255
12336
|
|
|
12256
12337
|
// Setup auto update to handle resize and scroll
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12338
|
+
element.cleanup = autoUpdate(
|
|
12339
|
+
element.trigger || element.parentNode,
|
|
12340
|
+
element.bib,
|
|
12260
12341
|
() => {
|
|
12261
12342
|
this.position();
|
|
12262
12343
|
},
|
|
@@ -12269,22 +12350,27 @@ class AuroFloatingUI {
|
|
|
12269
12350
|
* @param {String} eventType - The event type that triggered the hiding action.
|
|
12270
12351
|
*/
|
|
12271
12352
|
hideBib(eventType = "unknown") {
|
|
12272
|
-
|
|
12353
|
+
const element = this.element;
|
|
12354
|
+
if (!element) {
|
|
12355
|
+
return;
|
|
12356
|
+
}
|
|
12357
|
+
|
|
12358
|
+
if (element.disabled) {
|
|
12273
12359
|
return;
|
|
12274
12360
|
}
|
|
12275
12361
|
|
|
12276
12362
|
// noToggle dropdowns should not close when the trigger is clicked (the
|
|
12277
12363
|
// "toggle" behavior), but they CAN still close via other interactions like
|
|
12278
12364
|
// Escape key or focus loss.
|
|
12279
|
-
if (
|
|
12365
|
+
if (element.noToggle && eventType === "click") {
|
|
12280
12366
|
return;
|
|
12281
12367
|
}
|
|
12282
12368
|
|
|
12283
12369
|
this.lockScroll(false);
|
|
12284
|
-
|
|
12370
|
+
element.triggerChevron?.removeAttribute("data-expanded");
|
|
12285
12371
|
|
|
12286
|
-
if (
|
|
12287
|
-
|
|
12372
|
+
if (element.isPopoverVisible) {
|
|
12373
|
+
element.isPopoverVisible = false;
|
|
12288
12374
|
}
|
|
12289
12375
|
if (this.showing) {
|
|
12290
12376
|
this.cleanupHideHandlers();
|
|
@@ -12304,6 +12390,11 @@ class AuroFloatingUI {
|
|
|
12304
12390
|
* @param {String} eventType - The event type that triggered the toggle action.
|
|
12305
12391
|
*/
|
|
12306
12392
|
dispatchEventDropdownToggle(eventType) {
|
|
12393
|
+
const element = this.element;
|
|
12394
|
+
if (!element) {
|
|
12395
|
+
return;
|
|
12396
|
+
}
|
|
12397
|
+
|
|
12307
12398
|
const event = new CustomEvent(
|
|
12308
12399
|
this.eventPrefix ? `${this.eventPrefix}-toggled` : "toggled",
|
|
12309
12400
|
{
|
|
@@ -12315,11 +12406,16 @@ class AuroFloatingUI {
|
|
|
12315
12406
|
},
|
|
12316
12407
|
);
|
|
12317
12408
|
|
|
12318
|
-
|
|
12409
|
+
element.dispatchEvent(event);
|
|
12319
12410
|
}
|
|
12320
12411
|
|
|
12321
12412
|
handleClick() {
|
|
12322
|
-
|
|
12413
|
+
const element = this.element;
|
|
12414
|
+
if (!element) {
|
|
12415
|
+
return;
|
|
12416
|
+
}
|
|
12417
|
+
|
|
12418
|
+
if (element.isPopoverVisible) {
|
|
12323
12419
|
this.hideBib("click");
|
|
12324
12420
|
} else {
|
|
12325
12421
|
this.showBib();
|
|
@@ -12330,63 +12426,66 @@ class AuroFloatingUI {
|
|
|
12330
12426
|
{
|
|
12331
12427
|
composed: true,
|
|
12332
12428
|
detail: {
|
|
12333
|
-
expanded:
|
|
12429
|
+
expanded: element.isPopoverVisible,
|
|
12334
12430
|
},
|
|
12335
12431
|
},
|
|
12336
12432
|
);
|
|
12337
12433
|
|
|
12338
|
-
|
|
12434
|
+
element.dispatchEvent(event);
|
|
12339
12435
|
}
|
|
12340
12436
|
|
|
12341
12437
|
handleEvent(event) {
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
|
|
12351
|
-
|
|
12352
|
-
|
|
12353
|
-
|
|
12354
|
-
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
case "mouseenter":
|
|
12359
|
-
if (this.element.hoverToggle) {
|
|
12360
|
-
this.showBib();
|
|
12361
|
-
}
|
|
12362
|
-
break;
|
|
12363
|
-
case "mouseleave":
|
|
12364
|
-
if (this.element.hoverToggle) {
|
|
12365
|
-
this.hideBib("mouseleave");
|
|
12366
|
-
}
|
|
12367
|
-
break;
|
|
12368
|
-
case "focus":
|
|
12369
|
-
if (this.element.focusShow) {
|
|
12370
|
-
/*
|
|
12371
|
-
This needs to better handle clicking that gives focus -
|
|
12372
|
-
currently it shows and then immediately hides the bib
|
|
12373
|
-
*/
|
|
12374
|
-
this.showBib();
|
|
12375
|
-
}
|
|
12376
|
-
break;
|
|
12377
|
-
case "blur":
|
|
12378
|
-
// send this task 100ms later queue to
|
|
12379
|
-
// wait a frame in case focus moves within the floating element/bib
|
|
12380
|
-
setTimeout(() => this.handleFocusLoss(), 0);
|
|
12381
|
-
break;
|
|
12382
|
-
case "click":
|
|
12383
|
-
if (document.activeElement === document.body) {
|
|
12384
|
-
event.currentTarget.focus();
|
|
12385
|
-
}
|
|
12438
|
+
const element = this.element;
|
|
12439
|
+
if (!element || element.disableEventShow) {
|
|
12440
|
+
return;
|
|
12441
|
+
}
|
|
12442
|
+
|
|
12443
|
+
switch (event.type) {
|
|
12444
|
+
case "keydown": {
|
|
12445
|
+
// Support both Enter and Space keys for accessibility
|
|
12446
|
+
// Space is included as it's expected behavior for interactive elements
|
|
12447
|
+
|
|
12448
|
+
const origin = event.composedPath()[0];
|
|
12449
|
+
if (
|
|
12450
|
+
event.key === "Enter" ||
|
|
12451
|
+
(event.key === " " && (!origin || origin.tagName !== "INPUT"))
|
|
12452
|
+
) {
|
|
12453
|
+
event.preventDefault();
|
|
12386
12454
|
this.handleClick();
|
|
12387
|
-
|
|
12388
|
-
|
|
12455
|
+
}
|
|
12456
|
+
break;
|
|
12389
12457
|
}
|
|
12458
|
+
case "mouseenter":
|
|
12459
|
+
if (element.hoverToggle) {
|
|
12460
|
+
this.showBib();
|
|
12461
|
+
}
|
|
12462
|
+
break;
|
|
12463
|
+
case "mouseleave":
|
|
12464
|
+
if (element.hoverToggle) {
|
|
12465
|
+
this.hideBib("mouseleave");
|
|
12466
|
+
}
|
|
12467
|
+
break;
|
|
12468
|
+
case "focus":
|
|
12469
|
+
if (element.focusShow) {
|
|
12470
|
+
/*
|
|
12471
|
+
This needs to better handle clicking that gives focus -
|
|
12472
|
+
currently it shows and then immediately hides the bib
|
|
12473
|
+
*/
|
|
12474
|
+
this.showBib();
|
|
12475
|
+
}
|
|
12476
|
+
break;
|
|
12477
|
+
case "blur":
|
|
12478
|
+
// send this task 100ms later queue to
|
|
12479
|
+
// wait a frame in case focus moves within the floating element/bib
|
|
12480
|
+
setTimeout(() => this.handleFocusLoss(), 0);
|
|
12481
|
+
break;
|
|
12482
|
+
case "click":
|
|
12483
|
+
if (document.activeElement === document.body) {
|
|
12484
|
+
event.currentTarget.focus();
|
|
12485
|
+
}
|
|
12486
|
+
this.handleClick();
|
|
12487
|
+
break;
|
|
12488
|
+
// Do nothing
|
|
12390
12489
|
}
|
|
12391
12490
|
}
|
|
12392
12491
|
|
|
@@ -12397,6 +12496,11 @@ class AuroFloatingUI {
|
|
|
12397
12496
|
* This prevents the component itself from being focusable when the trigger element already handles focus.
|
|
12398
12497
|
*/
|
|
12399
12498
|
handleTriggerTabIndex() {
|
|
12499
|
+
const element = this.element;
|
|
12500
|
+
if (!element) {
|
|
12501
|
+
return;
|
|
12502
|
+
}
|
|
12503
|
+
|
|
12400
12504
|
const focusableElementSelectors = [
|
|
12401
12505
|
"a",
|
|
12402
12506
|
"button",
|
|
@@ -12409,7 +12513,7 @@ class AuroFloatingUI {
|
|
|
12409
12513
|
"auro-hyperlink",
|
|
12410
12514
|
];
|
|
12411
12515
|
|
|
12412
|
-
const triggerNode =
|
|
12516
|
+
const triggerNode = element.querySelectorAll('[slot="trigger"]')[0];
|
|
12413
12517
|
if (!triggerNode) {
|
|
12414
12518
|
return;
|
|
12415
12519
|
}
|
|
@@ -12418,13 +12522,13 @@ class AuroFloatingUI {
|
|
|
12418
12522
|
focusableElementSelectors.forEach((selector) => {
|
|
12419
12523
|
// Check if the trigger node element is focusable
|
|
12420
12524
|
if (triggerNodeTagName === selector) {
|
|
12421
|
-
|
|
12525
|
+
element.tabIndex = -1;
|
|
12422
12526
|
return;
|
|
12423
12527
|
}
|
|
12424
12528
|
|
|
12425
12529
|
// Check if any child is focusable
|
|
12426
12530
|
if (triggerNode.querySelector(selector)) {
|
|
12427
|
-
|
|
12531
|
+
element.tabIndex = -1;
|
|
12428
12532
|
}
|
|
12429
12533
|
});
|
|
12430
12534
|
}
|
|
@@ -12434,13 +12538,18 @@ class AuroFloatingUI {
|
|
|
12434
12538
|
* @param {*} eventPrefix
|
|
12435
12539
|
*/
|
|
12436
12540
|
regenerateBibId() {
|
|
12437
|
-
|
|
12541
|
+
const element = this.element;
|
|
12542
|
+
if (!element) {
|
|
12543
|
+
return;
|
|
12544
|
+
}
|
|
12545
|
+
|
|
12546
|
+
this.id = element.getAttribute("id");
|
|
12438
12547
|
if (!this.id) {
|
|
12439
12548
|
this.id = window.crypto.randomUUID();
|
|
12440
|
-
|
|
12549
|
+
element.setAttribute("id", this.id);
|
|
12441
12550
|
}
|
|
12442
12551
|
|
|
12443
|
-
|
|
12552
|
+
element.bib?.setAttribute("id", `${this.id}-floater-bib`);
|
|
12444
12553
|
}
|
|
12445
12554
|
|
|
12446
12555
|
configure(elem, eventPrefix, enableKeyboardHandling = true) {
|
|
@@ -12452,67 +12561,69 @@ class AuroFloatingUI {
|
|
|
12452
12561
|
this.element = elem;
|
|
12453
12562
|
}
|
|
12454
12563
|
|
|
12455
|
-
|
|
12456
|
-
|
|
12564
|
+
const element = this.element;
|
|
12565
|
+
if (!element) {
|
|
12566
|
+
return;
|
|
12457
12567
|
}
|
|
12458
12568
|
|
|
12459
|
-
if (this.element.
|
|
12569
|
+
if (this.behavior !== element.behavior) {
|
|
12570
|
+
this.behavior = element.behavior;
|
|
12571
|
+
}
|
|
12572
|
+
|
|
12573
|
+
if (element.trigger) {
|
|
12460
12574
|
this.disconnect();
|
|
12461
12575
|
}
|
|
12462
|
-
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
this.element.shadowRoot.querySelector("#showStateIcon");
|
|
12576
|
+
element.trigger =
|
|
12577
|
+
element.triggerElement ||
|
|
12578
|
+
element.shadowRoot?.querySelector("#trigger") ||
|
|
12579
|
+
element.trigger;
|
|
12580
|
+
element.bib = element.shadowRoot?.querySelector("#bib") || element.bib;
|
|
12581
|
+
element.bibSizer = element.shadowRoot?.querySelector("#bibSizer");
|
|
12582
|
+
element.triggerChevron =
|
|
12583
|
+
element.shadowRoot?.querySelector("#showStateIcon");
|
|
12471
12584
|
|
|
12472
|
-
if (
|
|
12473
|
-
|
|
12585
|
+
if (element.floaterConfig) {
|
|
12586
|
+
element.hoverToggle = element.floaterConfig.hoverToggle;
|
|
12474
12587
|
}
|
|
12475
12588
|
|
|
12476
12589
|
this.regenerateBibId();
|
|
12477
12590
|
this.handleTriggerTabIndex();
|
|
12478
12591
|
|
|
12479
12592
|
this.handleEvent = this.handleEvent.bind(this);
|
|
12480
|
-
if (
|
|
12593
|
+
if (element.trigger) {
|
|
12481
12594
|
if (this.enableKeyboardHandling) {
|
|
12482
|
-
|
|
12595
|
+
element.trigger.addEventListener("keydown", this.handleEvent);
|
|
12483
12596
|
}
|
|
12484
|
-
|
|
12485
|
-
|
|
12486
|
-
|
|
12487
|
-
|
|
12488
|
-
|
|
12597
|
+
element.trigger.addEventListener("click", this.handleEvent);
|
|
12598
|
+
element.trigger.addEventListener("mouseenter", this.handleEvent);
|
|
12599
|
+
element.trigger.addEventListener("mouseleave", this.handleEvent);
|
|
12600
|
+
element.trigger.addEventListener("focus", this.handleEvent);
|
|
12601
|
+
element.trigger.addEventListener("blur", this.handleEvent);
|
|
12489
12602
|
}
|
|
12490
12603
|
}
|
|
12491
12604
|
|
|
12492
12605
|
disconnect() {
|
|
12493
12606
|
this.cleanupHideHandlers();
|
|
12494
|
-
if (this.element) {
|
|
12495
|
-
this.element.cleanup?.();
|
|
12496
12607
|
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
|
|
12608
|
+
const element = this.element;
|
|
12609
|
+
if (!element) {
|
|
12610
|
+
return;
|
|
12611
|
+
}
|
|
12500
12612
|
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
}
|
|
12613
|
+
element.cleanup?.();
|
|
12614
|
+
|
|
12615
|
+
if (element.bib && element.shadowRoot) {
|
|
12616
|
+
element.shadowRoot.append(element.bib);
|
|
12617
|
+
}
|
|
12618
|
+
|
|
12619
|
+
// Remove event & keyboard listeners
|
|
12620
|
+
if (element.trigger) {
|
|
12621
|
+
element.trigger.removeEventListener("keydown", this.handleEvent);
|
|
12622
|
+
element.trigger.removeEventListener("click", this.handleEvent);
|
|
12623
|
+
element.trigger.removeEventListener("mouseenter", this.handleEvent);
|
|
12624
|
+
element.trigger.removeEventListener("mouseleave", this.handleEvent);
|
|
12625
|
+
element.trigger.removeEventListener("focus", this.handleEvent);
|
|
12626
|
+
element.trigger.removeEventListener("blur", this.handleEvent);
|
|
12516
12627
|
}
|
|
12517
12628
|
}
|
|
12518
12629
|
}
|
|
@@ -13640,7 +13751,7 @@ let AuroHelpText$2 = class AuroHelpText extends i$1 {
|
|
|
13640
13751
|
}
|
|
13641
13752
|
};
|
|
13642
13753
|
|
|
13643
|
-
var formkitVersion$1 = '
|
|
13754
|
+
var formkitVersion$1 = '202604081417';
|
|
13644
13755
|
|
|
13645
13756
|
let AuroElement$2 = class AuroElement extends i$1 {
|
|
13646
13757
|
static get properties() {
|
|
@@ -21404,7 +21515,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$1 {
|
|
|
21404
21515
|
}
|
|
21405
21516
|
};
|
|
21406
21517
|
|
|
21407
|
-
var formkitVersion = '
|
|
21518
|
+
var formkitVersion = '202604081417';
|
|
21408
21519
|
|
|
21409
21520
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
21410
21521
|
// See LICENSE in the project root for license information.
|