@aurodesignsystem-dev/auro-formkit 0.0.0-pr741.0 → 0.0.0-pr750.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/index.js +1 -1
- package/components/bibtemplate/dist/registered.js +1 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.min.js +11 -11
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.min.js +11 -11
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/dist/index.js +11 -11
- package/components/checkbox/dist/registered.js +11 -11
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +12 -6
- package/components/combobox/demo/api.min.js +411 -103
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.min.js +411 -103
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/index.js +374 -91
- package/components/combobox/dist/registered.js +374 -91
- package/components/counter/demo/api.html +16 -10
- package/components/counter/demo/api.md +140 -7
- package/components/counter/demo/api.min.js +1145 -987
- package/components/counter/demo/index.html +16 -10
- package/components/counter/demo/index.md +82 -0
- package/components/counter/demo/index.min.js +1145 -987
- package/components/counter/demo/readme.html +16 -9
- package/components/counter/dist/auro-counter-group.d.ts +64 -23
- package/components/counter/dist/auro-counter.d.ts +10 -0
- package/components/counter/dist/index.js +1145 -987
- package/components/counter/dist/registered.js +1145 -987
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.min.js +374 -91
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.min.js +374 -91
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
- package/components/datepicker/dist/index.js +374 -91
- package/components/datepicker/dist/registered.js +374 -91
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +77 -267
- package/components/dropdown/demo/api.min.js +331 -64
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +45 -363
- package/components/dropdown/demo/index.min.js +331 -64
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +35 -67
- package/components/dropdown/dist/index.js +331 -64
- package/components/dropdown/dist/registered.js +331 -64
- package/components/form/demo/api.html +16 -9
- package/components/form/demo/autocomplete.html +19 -3
- package/components/form/demo/index.html +16 -9
- package/components/form/demo/readme.html +16 -9
- package/components/form/demo/working.html +19 -13
- package/components/helptext/dist/index.js +1 -1
- package/components/helptext/dist/registered.js +1 -1
- package/components/input/demo/api.html +16 -10
- package/components/input/demo/api.md +1 -1
- package/components/input/demo/api.min.js +14 -14
- package/components/input/demo/index.html +16 -10
- package/components/input/demo/index.min.js +14 -14
- package/components/input/demo/readme.html +16 -9
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +14 -14
- package/components/input/dist/registered.js +14 -14
- package/components/menu/demo/api.html +16 -32
- package/components/menu/demo/api.md +1 -1
- package/components/menu/demo/api.min.js +37 -12
- package/components/menu/demo/index.html +16 -10
- package/components/menu/demo/index.min.js +37 -12
- package/components/menu/demo/readme.html +16 -9
- package/components/menu/dist/auro-menu.d.ts +13 -2
- package/components/menu/dist/index.js +37 -12
- package/components/menu/dist/registered.js +37 -12
- package/components/radio/demo/api.html +16 -10
- package/components/radio/demo/api.md +0 -1
- package/components/radio/demo/api.min.js +61 -76
- package/components/radio/demo/index.html +16 -10
- package/components/radio/demo/index.min.js +61 -76
- package/components/radio/demo/readme.html +16 -9
- package/components/radio/dist/auro-radio.d.ts +8 -11
- package/components/radio/dist/index.js +61 -76
- package/components/radio/dist/registered.js +61 -76
- package/components/select/demo/api.html +16 -10
- package/components/select/demo/api.js +0 -2
- package/components/select/demo/api.md +53 -51
- package/components/select/demo/api.min.js +491 -326
- package/components/select/demo/index.html +16 -11
- package/components/select/demo/index.md +6 -158
- package/components/select/demo/index.min.js +491 -314
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +33 -8
- package/components/select/dist/index.js +454 -302
- package/components/select/dist/registered.js +454 -302
- package/package.json +26 -25
|
@@ -631,9 +631,9 @@ let AuroLibraryRuntimeUtils$8 = class AuroLibraryRuntimeUtils {
|
|
|
631
631
|
}
|
|
632
632
|
};
|
|
633
633
|
|
|
634
|
-
var styleCss$
|
|
634
|
+
var styleCss$b = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
635
635
|
|
|
636
|
-
var colorCss$9 = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
636
|
+
var colorCss$a = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
637
637
|
|
|
638
638
|
var tokensCss$7 = i$5`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
639
639
|
|
|
@@ -709,9 +709,9 @@ let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
|
709
709
|
}
|
|
710
710
|
};
|
|
711
711
|
|
|
712
|
-
var styleCss$
|
|
712
|
+
var styleCss$a = i$5`: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}: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:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.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(0deg)}100%{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{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{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%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
713
713
|
|
|
714
|
-
var colorCss$
|
|
714
|
+
var colorCss$9 = i$5`: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]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--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}`;
|
|
715
715
|
|
|
716
716
|
var tokensCss$6 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
717
717
|
|
|
@@ -789,8 +789,8 @@ let AuroLoader$1 = class AuroLoader extends i$2 {
|
|
|
789
789
|
|
|
790
790
|
static get styles() {
|
|
791
791
|
return [
|
|
792
|
-
i$5`${styleCss$
|
|
793
|
-
i$5`${colorCss$
|
|
792
|
+
i$5`${styleCss$a}`,
|
|
793
|
+
i$5`${colorCss$9}`,
|
|
794
794
|
i$5`${tokensCss$6}`
|
|
795
795
|
];
|
|
796
796
|
}
|
|
@@ -943,8 +943,8 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
|
|
|
943
943
|
static get styles() {
|
|
944
944
|
return [
|
|
945
945
|
tokensCss$7,
|
|
946
|
-
styleCss$
|
|
947
|
-
colorCss$
|
|
946
|
+
styleCss$b,
|
|
947
|
+
colorCss$a,
|
|
948
948
|
shapeSize$1
|
|
949
949
|
];
|
|
950
950
|
}
|
|
@@ -1315,7 +1315,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
1315
1315
|
return _fetchMap$2.get(uri);
|
|
1316
1316
|
};
|
|
1317
1317
|
|
|
1318
|
-
var styleCss$
|
|
1318
|
+
var styleCss$9 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
1319
1319
|
|
|
1320
1320
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1321
1321
|
// See LICENSE in the project root for license information.
|
|
@@ -1358,7 +1358,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$4 {
|
|
|
1358
1358
|
|
|
1359
1359
|
static get styles() {
|
|
1360
1360
|
return i$5`
|
|
1361
|
-
${styleCss$
|
|
1361
|
+
${styleCss$9}
|
|
1362
1362
|
`;
|
|
1363
1363
|
}
|
|
1364
1364
|
|
|
@@ -1401,7 +1401,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$4 {
|
|
|
1401
1401
|
|
|
1402
1402
|
var tokensCss$5 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
1403
1403
|
|
|
1404
|
-
var colorCss$
|
|
1404
|
+
var colorCss$8 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
1405
1405
|
|
|
1406
1406
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1407
1407
|
// See LICENSE in the project root for license information.
|
|
@@ -1560,8 +1560,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1560
1560
|
return [
|
|
1561
1561
|
super.styles,
|
|
1562
1562
|
i$5`${tokensCss$5}`,
|
|
1563
|
-
i$5`${styleCss$
|
|
1564
|
-
i$5`${colorCss$
|
|
1563
|
+
i$5`${styleCss$9}`,
|
|
1564
|
+
i$5`${colorCss$8}`
|
|
1565
1565
|
];
|
|
1566
1566
|
}
|
|
1567
1567
|
|
|
@@ -2122,19 +2122,19 @@ class AuroFormValidation {
|
|
|
2122
2122
|
{
|
|
2123
2123
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
2124
2124
|
validity: 'tooShort',
|
|
2125
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
2125
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
2126
2126
|
},
|
|
2127
2127
|
{
|
|
2128
2128
|
check: (e) => e.value?.length > e.maxLength,
|
|
2129
2129
|
validity: 'tooLong',
|
|
2130
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
2130
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
2131
2131
|
}
|
|
2132
2132
|
],
|
|
2133
2133
|
pattern: [
|
|
2134
2134
|
{
|
|
2135
2135
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
2136
2136
|
validity: 'patternMismatch',
|
|
2137
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
2137
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
2138
2138
|
}
|
|
2139
2139
|
]
|
|
2140
2140
|
},
|
|
@@ -2329,10 +2329,10 @@ class AuroFormValidation {
|
|
|
2329
2329
|
if (!hasValue && elem.required && elem.touched) {
|
|
2330
2330
|
elem.validity = 'valueMissing';
|
|
2331
2331
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
2332
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
2332
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
2333
2333
|
this.validateType(elem);
|
|
2334
2334
|
this.validateElementAttributes(elem);
|
|
2335
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
2335
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
2336
2336
|
this.validateElementAttributes(elem);
|
|
2337
2337
|
}
|
|
2338
2338
|
}
|
|
@@ -2450,9 +2450,217 @@ var plusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width"
|
|
|
2450
2450
|
|
|
2451
2451
|
var minusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"minus-lg","category":"interface","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><path d=\"M5.75 12.75h12.5a.75.75 0 1 0 0-1.5H5.75a.75.75 0 1 0 0 1.5\"/></svg>"};
|
|
2452
2452
|
|
|
2453
|
-
var colorCss$
|
|
2453
|
+
var colorCss$7 = i$5`.label{color:var(--ds-auro-counter-label-text-color)}[name=description]::slotted(*){color:var(--ds-auro-counter-description-text-color)}.controlIcon{color:var(--ds-auro-counter-icon-color)}.quantityWrapper{background-color:var(--ds-auro-counter-control-background-color);color:var(--ds-auro-counter-quantity-text-color)}:host::part(counterControl):focus-visible{outline-color:var(--ds-auro-counter-control-border-color)}[disabled],:host([disabled]){--ds-auro-counter-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}[onDark],:host([onDark]){--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}[onDark][disabled],:host([onDark][disabled]){--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-counter-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
2454
|
+
|
|
2455
|
+
var styleCss$8 = i$5`.counter{display:flex;align-items:center;justify-content:space-between;column-gap:var(--ds-size-150, 0.75rem)}.content{display:flex;flex-flow:column}[name=description]::slotted(*){display:block;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}.quantityWrapper{width:var(--ds-size-400, 2rem);height:calc(var(--ds-size-25, 0.125rem) + var(--ds-size-400, 2rem));align-content:center;cursor:default;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px;text-align:center}:host{position:relative}:host::part(counterControl){display:flex;border-radius:var(--ds-size-500, 2.5rem);line-height:0;touch-action:manipulation}:host::part(counterControl):focus-visible{outline-offset:0;outline-style:solid;outline-width:var(--ds-size-25, 0.125rem)}:host::part(controlMinus){--ds-auro-counter-control-border-radius: var(--ds-size-500, 2.5rem) 0 0 var(--ds-size-500, 2.5rem);--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem)}:host::part(controlPlus){--ds-auro-counter-control-border-radius: 0 var(--ds-size-500, 2.5rem) var(--ds-size-500, 2.5rem) 0;--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem)}auro-counter-button{display:flex}`;
|
|
2456
|
+
|
|
2457
|
+
var colorCss$6 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
2458
|
+
|
|
2459
|
+
var styleCss$7 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
2460
|
+
|
|
2461
|
+
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
2462
|
+
|
|
2463
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2464
|
+
// See LICENSE in the project root for license information.
|
|
2465
|
+
|
|
2466
|
+
// ---------------------------------------------------------------------
|
|
2467
|
+
|
|
2468
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
2469
|
+
|
|
2470
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
2471
|
+
|
|
2472
|
+
/* eslint-disable jsdoc/require-param */
|
|
2473
|
+
|
|
2474
|
+
/**
|
|
2475
|
+
* This will register a new custom element with the browser.
|
|
2476
|
+
* @param {String} name - The name of the custom element.
|
|
2477
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
2478
|
+
* @returns {void}
|
|
2479
|
+
*/
|
|
2480
|
+
registerComponent(name, componentClass) {
|
|
2481
|
+
if (!customElements.get(name)) {
|
|
2482
|
+
customElements.define(name, class extends componentClass {});
|
|
2483
|
+
}
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
/**
|
|
2487
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
2488
|
+
* @returns {void}
|
|
2489
|
+
*/
|
|
2490
|
+
closestElement(
|
|
2491
|
+
selector, // selector like in .closest()
|
|
2492
|
+
base = this, // extra functionality to skip a parent
|
|
2493
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
2494
|
+
!el || el === document || el === window
|
|
2495
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
2496
|
+
: found
|
|
2497
|
+
? found // found a selector INside this element
|
|
2498
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
2499
|
+
) {
|
|
2500
|
+
return __Closest(base);
|
|
2501
|
+
}
|
|
2502
|
+
/* eslint-enable jsdoc/require-param */
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
2506
|
+
* @param {Object} elem - The element to check.
|
|
2507
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
2508
|
+
* @returns {void}
|
|
2509
|
+
*/
|
|
2510
|
+
handleComponentTagRename(elem, tagName) {
|
|
2511
|
+
const tag = tagName.toLowerCase();
|
|
2512
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2513
|
+
|
|
2514
|
+
if (elemTag !== tag) {
|
|
2515
|
+
elem.setAttribute(tag, true);
|
|
2516
|
+
}
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* Validates if an element is a specific Auro component.
|
|
2521
|
+
* @param {Object} elem - The element to validate.
|
|
2522
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
2523
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
2524
|
+
*/
|
|
2525
|
+
elementMatch(elem, tagName) {
|
|
2526
|
+
const tag = tagName.toLowerCase();
|
|
2527
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2528
|
+
|
|
2529
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
2530
|
+
}
|
|
2531
|
+
};
|
|
2532
|
+
|
|
2533
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2534
|
+
// See LICENSE in the project root for license information.
|
|
2535
|
+
|
|
2536
|
+
|
|
2537
|
+
/**
|
|
2538
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
2539
|
+
*
|
|
2540
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
2541
|
+
*/
|
|
2542
|
+
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
2543
|
+
|
|
2544
|
+
constructor() {
|
|
2545
|
+
super();
|
|
2546
|
+
|
|
2547
|
+
this.error = false;
|
|
2548
|
+
this.onDark = false;
|
|
2549
|
+
this.hasTextContent = false;
|
|
2550
|
+
|
|
2551
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
static get styles() {
|
|
2555
|
+
return [
|
|
2556
|
+
colorCss$6,
|
|
2557
|
+
styleCss$7,
|
|
2558
|
+
tokensCss$4
|
|
2559
|
+
];
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
// function to define props used within the scope of this component
|
|
2563
|
+
static get properties() {
|
|
2564
|
+
return {
|
|
2565
|
+
|
|
2566
|
+
/**
|
|
2567
|
+
* @private
|
|
2568
|
+
*/
|
|
2569
|
+
slotNodes: {
|
|
2570
|
+
type: Boolean,
|
|
2571
|
+
},
|
|
2572
|
+
|
|
2573
|
+
/**
|
|
2574
|
+
* @private
|
|
2575
|
+
*/
|
|
2576
|
+
hasTextContent: {
|
|
2577
|
+
type: Boolean,
|
|
2578
|
+
},
|
|
2579
|
+
|
|
2580
|
+
/**
|
|
2581
|
+
* If declared, make font color red.
|
|
2582
|
+
*/
|
|
2583
|
+
error: {
|
|
2584
|
+
type: Boolean,
|
|
2585
|
+
reflect: true,
|
|
2586
|
+
},
|
|
2587
|
+
|
|
2588
|
+
/**
|
|
2589
|
+
* If declared, will apply onDark styles.
|
|
2590
|
+
*/
|
|
2591
|
+
onDark: {
|
|
2592
|
+
type: Boolean,
|
|
2593
|
+
reflect: true
|
|
2594
|
+
}
|
|
2595
|
+
};
|
|
2596
|
+
}
|
|
2597
|
+
|
|
2598
|
+
/**
|
|
2599
|
+
* This will register this element with the browser.
|
|
2600
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
2601
|
+
*
|
|
2602
|
+
* @example
|
|
2603
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
2604
|
+
*
|
|
2605
|
+
*/
|
|
2606
|
+
static register(name = "auro-helptext") {
|
|
2607
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
updated() {
|
|
2611
|
+
this.handleSlotChange();
|
|
2612
|
+
}
|
|
2613
|
+
|
|
2614
|
+
handleSlotChange(event) {
|
|
2615
|
+
if (event) {
|
|
2616
|
+
this.slotNodes = event.target.assignedNodes();
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
/**
|
|
2623
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
2624
|
+
*
|
|
2625
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
2626
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
2627
|
+
* @private
|
|
2628
|
+
*/
|
|
2629
|
+
checkSlotsForContent(nodes) {
|
|
2630
|
+
if (!nodes) {
|
|
2631
|
+
return false;
|
|
2632
|
+
}
|
|
2633
|
+
|
|
2634
|
+
return nodes.some((node) => {
|
|
2635
|
+
if (node.textContent.trim()) {
|
|
2636
|
+
return true;
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
if (!node.querySelector) {
|
|
2640
|
+
return false;
|
|
2641
|
+
}
|
|
2642
|
+
|
|
2643
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
2644
|
+
if (!nestedSlot) {
|
|
2645
|
+
return false;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
2649
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
2650
|
+
});
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
2654
|
+
render() {
|
|
2655
|
+
return x`
|
|
2656
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
2657
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
2658
|
+
</div>
|
|
2659
|
+
`;
|
|
2660
|
+
}
|
|
2661
|
+
};
|
|
2454
2662
|
|
|
2455
|
-
var
|
|
2663
|
+
var helptextVersion = '1.0.0';
|
|
2456
2664
|
|
|
2457
2665
|
/* eslint-disable lit/binding-positions, lit/no-invalid-html, max-lines */
|
|
2458
2666
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -2502,6 +2710,11 @@ class AuroCounter extends i$2 {
|
|
|
2502
2710
|
*/
|
|
2503
2711
|
this.iconTag = versioning.generateTag("auro-formkit-counter-icon", iconVersion$2, AuroIcon$2);
|
|
2504
2712
|
|
|
2713
|
+
/**
|
|
2714
|
+
* @private
|
|
2715
|
+
*/
|
|
2716
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helptextVersion, AuroHelpText$1);
|
|
2717
|
+
|
|
2505
2718
|
/**
|
|
2506
2719
|
* @private
|
|
2507
2720
|
* @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
|
|
@@ -2562,6 +2775,15 @@ class AuroCounter extends i$2 {
|
|
|
2562
2775
|
type: Boolean,
|
|
2563
2776
|
},
|
|
2564
2777
|
|
|
2778
|
+
/**
|
|
2779
|
+
* Error state and message.
|
|
2780
|
+
* True if set, value is the error message.
|
|
2781
|
+
*/
|
|
2782
|
+
error: {
|
|
2783
|
+
type: String,
|
|
2784
|
+
reflect: false,
|
|
2785
|
+
},
|
|
2786
|
+
|
|
2565
2787
|
/**
|
|
2566
2788
|
* The maximum value for the counter.
|
|
2567
2789
|
*/
|
|
@@ -2616,8 +2838,8 @@ class AuroCounter extends i$2 {
|
|
|
2616
2838
|
static get styles() {
|
|
2617
2839
|
return [
|
|
2618
2840
|
tokens,
|
|
2619
|
-
colorCss$
|
|
2620
|
-
styleCss$
|
|
2841
|
+
colorCss$7,
|
|
2842
|
+
styleCss$8
|
|
2621
2843
|
];
|
|
2622
2844
|
}
|
|
2623
2845
|
|
|
@@ -2758,56 +2980,85 @@ class AuroCounter extends i$2 {
|
|
|
2758
2980
|
}
|
|
2759
2981
|
}
|
|
2760
2982
|
|
|
2761
|
-
|
|
2983
|
+
/**
|
|
2984
|
+
* Returns HTML for the help text and error message.
|
|
2985
|
+
* @private
|
|
2986
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
2987
|
+
*/
|
|
2988
|
+
renderHelpText() {
|
|
2762
2989
|
return u`
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
.tabindex="${'-1'}"
|
|
2782
|
-
part="controlMinus"
|
|
2783
|
-
@click="${() => this.decrement()}"
|
|
2784
|
-
?onDark="${this.onDark}"
|
|
2785
|
-
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
2786
|
-
>
|
|
2787
|
-
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
2788
|
-
</auro-counter-button>
|
|
2990
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
2991
|
+
? u`
|
|
2992
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
2993
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
2994
|
+
<slot name="helptext"></slot>
|
|
2995
|
+
</p>
|
|
2996
|
+
</${this.helpTextTag}>
|
|
2997
|
+
`
|
|
2998
|
+
: u`
|
|
2999
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
3000
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
3001
|
+
${this.errorMessage}
|
|
3002
|
+
</p>
|
|
3003
|
+
</${this.helpTextTag}>
|
|
3004
|
+
`
|
|
3005
|
+
}
|
|
3006
|
+
`;
|
|
3007
|
+
}
|
|
2789
3008
|
|
|
2790
|
-
|
|
2791
|
-
|
|
3009
|
+
render() {
|
|
3010
|
+
return u`
|
|
3011
|
+
<div class="counterWrapper">
|
|
3012
|
+
<div class="counter">
|
|
3013
|
+
<div class="content" >
|
|
3014
|
+
<label id="counter-label" class="label"><slot @slotchange="${this.onDefaultSlotChange}" ></slot></label>
|
|
3015
|
+
<slot id="counter-description" name="description"></slot>
|
|
2792
3016
|
</div>
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
aria-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
3017
|
+
<div
|
|
3018
|
+
part="counterControl"
|
|
3019
|
+
aria-labelledby="counter-label"
|
|
3020
|
+
aria-describedby="counter-description"
|
|
3021
|
+
tabindex="${this.disabled ? '-1' : '0'}"
|
|
3022
|
+
role="spinbutton"
|
|
3023
|
+
aria-valuemin="${this.min}"
|
|
3024
|
+
aria-valuemax="${this.max}"
|
|
3025
|
+
aria-valuenow="${this.value}"
|
|
3026
|
+
aria-valuetext="${this.value !== undefined ? this.value : this.min}"
|
|
2801
3027
|
>
|
|
2802
|
-
|
|
2803
|
-
|
|
3028
|
+
<auro-counter-button
|
|
3029
|
+
aria-hidden="true"
|
|
3030
|
+
.tabindex="${'-1'}"
|
|
3031
|
+
part="controlMinus"
|
|
3032
|
+
@click="${() => this.decrement()}"
|
|
3033
|
+
?onDark="${this.onDark}"
|
|
3034
|
+
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
3035
|
+
>
|
|
3036
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
3037
|
+
</auro-counter-button>
|
|
3038
|
+
|
|
3039
|
+
<div class="quantityWrapper">
|
|
3040
|
+
<div class="quantity">${this.value !== undefined ? this.value : this.min}</div>
|
|
3041
|
+
</div>
|
|
3042
|
+
|
|
3043
|
+
<auro-counter-button
|
|
3044
|
+
aria-hidden="true"
|
|
3045
|
+
.tabindex="${'-1'}"
|
|
3046
|
+
part="controlPlus"
|
|
3047
|
+
@click="${() => this.increment()}"
|
|
3048
|
+
?onDark="${this.onDark}"
|
|
3049
|
+
?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
|
|
3050
|
+
>
|
|
3051
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(plusIcon)} </${this.iconTag}>
|
|
3052
|
+
</auro-counter-button>
|
|
3053
|
+
</div>
|
|
2804
3054
|
</div>
|
|
3055
|
+
${this.renderHelpText()}
|
|
2805
3056
|
</div>
|
|
2806
3057
|
`;
|
|
2807
3058
|
}
|
|
2808
3059
|
}
|
|
2809
3060
|
|
|
2810
|
-
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0
|
|
3061
|
+
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 var(--ds-size-50, 0.25rem) 0 var(--ds-size-150, 0.75rem)}:host([layout=snowflake]) [auro-dropdown] .mainContent{align-items:center}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}.mainContent{display:flex;width:100%;flex-direction:column;align-items:flex-start;justify-content:center}label{font-size:var(--ds-text-body-size-default, 1rem);line-height:20px}label.filled{font-size:var(--ds-text-body-size-xs, 0.75rem)}.accents ::slotted([slot=typeIcon]){margin-right:8px}.accents ::slotted(*):not(.util_displayHidden){display:flex;flex-direction:row;align-items:center;justify-content:center;gap:8px}slot[name=valueText]{font-size:var(--ds-text-body-size-default, 1rem);overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.counters{display:flex;flex-direction:column;gap:var(--ds-size-300, 1.5rem)}.counters ::slotted(auro-counter:not(:first-of-type)){padding-top:var(--ds-size-300, 1.5rem);border-top-width:1px;border-top-style:solid}[auro-helptext] [part=helpText]{display:flex;flex-direction:column}[auro-helptext] [part=helpText]>p{margin-block:0}`;
|
|
2811
3062
|
|
|
2812
3063
|
var shapeSizeCss$1 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
2813
3064
|
|
|
@@ -5049,290 +5300,389 @@ class AuroFloatingUI {
|
|
|
5049
5300
|
}
|
|
5050
5301
|
}
|
|
5051
5302
|
|
|
5052
|
-
//
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5303
|
+
// Selectors for focusable elements
|
|
5304
|
+
const FOCUSABLE_SELECTORS = [
|
|
5305
|
+
'a[href]',
|
|
5306
|
+
'button:not([disabled])',
|
|
5307
|
+
'textarea:not([disabled])',
|
|
5308
|
+
'input:not([disabled])',
|
|
5309
|
+
'select:not([disabled])',
|
|
5310
|
+
'[role="tab"]:not([disabled])',
|
|
5311
|
+
'[role="link"]:not([disabled])',
|
|
5312
|
+
'[role="button"]:not([disabled])',
|
|
5313
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
5314
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
5315
|
+
];
|
|
5057
5316
|
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5317
|
+
// List of custom components that are known to be focusable
|
|
5318
|
+
const FOCUSABLE_COMPONENTS = [
|
|
5319
|
+
'auro-checkbox',
|
|
5320
|
+
'auro-radio',
|
|
5321
|
+
'auro-dropdown',
|
|
5322
|
+
'auro-button',
|
|
5323
|
+
'auro-combobox',
|
|
5324
|
+
'auro-input',
|
|
5325
|
+
'auro-counter',
|
|
5326
|
+
'auro-menu',
|
|
5327
|
+
'auro-select',
|
|
5328
|
+
'auro-datepicker',
|
|
5329
|
+
'auro-hyperlink',
|
|
5330
|
+
'auro-accordion',
|
|
5331
|
+
];
|
|
5073
5332
|
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5333
|
+
/**
|
|
5334
|
+
* Determines if a given element is a custom focusable component.
|
|
5335
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
5336
|
+
*
|
|
5337
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
5338
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
5339
|
+
*/
|
|
5340
|
+
function isFocusableComponent(element) {
|
|
5341
|
+
const componentName = element.tagName.toLowerCase();
|
|
5083
5342
|
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
}
|
|
5343
|
+
// Guard Clause: Element is a focusable component
|
|
5344
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
5087
5345
|
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
};
|
|
5346
|
+
// Guard Clause: Element is not disabled
|
|
5347
|
+
if (element.hasAttribute('disabled')) return false;
|
|
5091
5348
|
|
|
5092
|
-
//
|
|
5093
|
-
|
|
5349
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
5350
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
5094
5351
|
|
|
5352
|
+
// If all guard clauses pass, the element is a focusable component
|
|
5353
|
+
return true;
|
|
5354
|
+
}
|
|
5095
5355
|
|
|
5096
5356
|
/**
|
|
5097
|
-
*
|
|
5098
|
-
*
|
|
5099
|
-
*
|
|
5357
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
5358
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
5359
|
+
*
|
|
5360
|
+
* @param {HTMLElement} container The container to search within
|
|
5361
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
5100
5362
|
*/
|
|
5363
|
+
function getFocusableElements(container) {
|
|
5364
|
+
// Get elements in DOM order by walking the tree
|
|
5365
|
+
const orderedFocusableElements = [];
|
|
5101
5366
|
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
reflect: true },
|
|
5109
|
-
hiddenVisually: { type: Boolean,
|
|
5110
|
-
reflect: true },
|
|
5111
|
-
hiddenAudible: { type: Boolean,
|
|
5112
|
-
reflect: true },
|
|
5113
|
-
};
|
|
5114
|
-
}
|
|
5367
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
5368
|
+
const collectFocusableElements = (root) => {
|
|
5369
|
+
// Check if current element is focusable
|
|
5370
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
5371
|
+
// Check if this is a custom component that is focusable
|
|
5372
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
5115
5373
|
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
return 'true'
|
|
5122
|
-
}
|
|
5374
|
+
if (isComponentFocusable) {
|
|
5375
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
5376
|
+
orderedFocusableElements.push(root);
|
|
5377
|
+
return; // Skip traversing inside this component
|
|
5378
|
+
}
|
|
5123
5379
|
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5380
|
+
// Check if the element itself matches any selector
|
|
5381
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
5382
|
+
if (root.matches?.(selector)) {
|
|
5383
|
+
orderedFocusableElements.push(root);
|
|
5384
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
5385
|
+
}
|
|
5386
|
+
}
|
|
5127
5387
|
|
|
5128
|
-
|
|
5388
|
+
// Process shadow DOM only for non-Auro components
|
|
5389
|
+
if (root.shadowRoot) {
|
|
5390
|
+
// Process shadow DOM children in order
|
|
5391
|
+
if (root.shadowRoot.children) {
|
|
5392
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
5393
|
+
collectFocusableElements(child);
|
|
5394
|
+
});
|
|
5395
|
+
}
|
|
5396
|
+
}
|
|
5129
5397
|
|
|
5130
|
-
|
|
5398
|
+
// Process slots and their assigned nodes in order
|
|
5399
|
+
if (root.tagName === 'SLOT') {
|
|
5400
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
5401
|
+
for (const node of assignedNodes) {
|
|
5402
|
+
collectFocusableElements(node);
|
|
5403
|
+
}
|
|
5404
|
+
} else {
|
|
5405
|
+
// Process light DOM children in order
|
|
5406
|
+
if (root.children) {
|
|
5407
|
+
Array.from(root.children).forEach(child => {
|
|
5408
|
+
collectFocusableElements(child);
|
|
5409
|
+
});
|
|
5410
|
+
}
|
|
5411
|
+
}
|
|
5412
|
+
}
|
|
5413
|
+
};
|
|
5131
5414
|
|
|
5132
|
-
|
|
5415
|
+
// Start the traversal from the container
|
|
5416
|
+
collectFocusableElements(container);
|
|
5133
5417
|
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
* @param {Fetch.Response} response
|
|
5139
|
-
* @returns {Promise}
|
|
5140
|
-
*/
|
|
5418
|
+
// Remove duplicates that might have been collected through different paths
|
|
5419
|
+
// while preserving order
|
|
5420
|
+
const uniqueElements = [];
|
|
5421
|
+
const seen = new Set();
|
|
5141
5422
|
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
5148
|
-
* @returns {Promise}
|
|
5149
|
-
*/
|
|
5150
|
-
const cacheFetch$1 = (uri, options = {}) => {
|
|
5151
|
-
const responseParser = options.responseParser || ((response) => response.text());
|
|
5152
|
-
if (!_fetchMap$1.has(uri)) {
|
|
5153
|
-
_fetchMap$1.set(uri, fetch(uri).then(responseParser));
|
|
5423
|
+
for (const element of orderedFocusableElements) {
|
|
5424
|
+
if (!seen.has(element)) {
|
|
5425
|
+
seen.add(element);
|
|
5426
|
+
uniqueElements.push(element);
|
|
5427
|
+
}
|
|
5154
5428
|
}
|
|
5155
|
-
return _fetchMap$1.get(uri);
|
|
5156
|
-
};
|
|
5157
|
-
|
|
5158
|
-
var styleCss$2$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
5159
|
-
|
|
5160
|
-
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5161
|
-
// See LICENSE in the project root for license information.
|
|
5162
5429
|
|
|
5430
|
+
return uniqueElements;
|
|
5431
|
+
}
|
|
5163
5432
|
|
|
5164
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5165
5433
|
/**
|
|
5166
|
-
*
|
|
5434
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
5435
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
5167
5436
|
*/
|
|
5437
|
+
class FocusTrap {
|
|
5438
|
+
/**
|
|
5439
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
5440
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
5441
|
+
*
|
|
5442
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
5443
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
5444
|
+
*/
|
|
5445
|
+
constructor(container) {
|
|
5446
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
5447
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
5448
|
+
}
|
|
5168
5449
|
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
constructor() {
|
|
5172
|
-
super();
|
|
5173
|
-
this.onDark = false;
|
|
5174
|
-
}
|
|
5175
|
-
|
|
5176
|
-
// function to define props used within the scope of this component
|
|
5177
|
-
static get properties() {
|
|
5178
|
-
return {
|
|
5179
|
-
...super.properties,
|
|
5180
|
-
|
|
5181
|
-
/**
|
|
5182
|
-
* Set value for on-dark version of auro-icon.
|
|
5183
|
-
*/
|
|
5184
|
-
onDark: {
|
|
5185
|
-
type: Boolean,
|
|
5186
|
-
reflect: true
|
|
5187
|
-
},
|
|
5188
|
-
|
|
5189
|
-
/**
|
|
5190
|
-
* @private
|
|
5191
|
-
*/
|
|
5192
|
-
svg: {
|
|
5193
|
-
attribute: false,
|
|
5194
|
-
reflect: true
|
|
5195
|
-
}
|
|
5196
|
-
};
|
|
5197
|
-
}
|
|
5450
|
+
this.container = container;
|
|
5451
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
5198
5452
|
|
|
5199
|
-
|
|
5200
|
-
return i$5`
|
|
5201
|
-
${styleCss$2$1}
|
|
5202
|
-
`;
|
|
5453
|
+
this._init();
|
|
5203
5454
|
}
|
|
5204
5455
|
|
|
5205
5456
|
/**
|
|
5206
|
-
*
|
|
5457
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
5458
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
5459
|
+
*
|
|
5207
5460
|
* @private
|
|
5208
|
-
* @param {string} category - Icon category.
|
|
5209
|
-
* @param {string} name - Icon name.
|
|
5210
|
-
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
5211
5461
|
*/
|
|
5212
|
-
|
|
5213
|
-
let iconHTML = '';
|
|
5462
|
+
_init() {
|
|
5214
5463
|
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5464
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
5465
|
+
if ('inert' in HTMLElement.prototype) {
|
|
5466
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
5467
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
5219
5468
|
}
|
|
5220
5469
|
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
return dom.body.querySelector('svg');
|
|
5470
|
+
// Track tab direction
|
|
5471
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
5224
5472
|
}
|
|
5225
5473
|
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5474
|
+
/**
|
|
5475
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
5476
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
5477
|
+
*
|
|
5478
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
5479
|
+
* @private
|
|
5480
|
+
*/
|
|
5481
|
+
_onKeydown = (e) => {
|
|
5482
|
+
|
|
5483
|
+
if (e.key === 'Tab') {
|
|
5230
5484
|
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
} else if (!svg) {
|
|
5234
|
-
const penDOM = new DOMParser().parseFromString(error$1.svg, 'text/html');
|
|
5485
|
+
// Set the tab direction based on the key pressed
|
|
5486
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
5235
5487
|
|
|
5236
|
-
|
|
5488
|
+
// Get the active element(s) in the document and shadow root
|
|
5489
|
+
// This will include the active element in the shadow DOM if it exists
|
|
5490
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
5491
|
+
let activeElement = document.activeElement;
|
|
5492
|
+
const actives = [activeElement];
|
|
5493
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
5494
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
5495
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
5237
5496
|
}
|
|
5238
|
-
}
|
|
5239
|
-
}
|
|
5240
|
-
};
|
|
5241
|
-
|
|
5242
|
-
var tokensCss$2$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
5243
5497
|
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5247
|
-
// See LICENSE in the project root for license information.
|
|
5248
|
-
|
|
5249
|
-
// ---------------------------------------------------------------------
|
|
5498
|
+
// Update the focusable elements
|
|
5499
|
+
const focusables = this._getFocusableElements();
|
|
5250
5500
|
|
|
5251
|
-
|
|
5501
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
5502
|
+
const focusIndex =
|
|
5503
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
5504
|
+
? focusables.length - 1
|
|
5505
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
5506
|
+
? 0
|
|
5507
|
+
: null;
|
|
5252
5508
|
|
|
5253
|
-
|
|
5509
|
+
if (focusIndex !== null) {
|
|
5510
|
+
focusables[focusIndex].focus();
|
|
5511
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
5512
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
5513
|
+
}
|
|
5514
|
+
}
|
|
5515
|
+
};
|
|
5254
5516
|
|
|
5255
|
-
|
|
5517
|
+
/**
|
|
5518
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
5519
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
5520
|
+
*
|
|
5521
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
5522
|
+
* @private
|
|
5523
|
+
*/
|
|
5524
|
+
_getFocusableElements() {
|
|
5525
|
+
// Use the imported utility function to get focusable elements
|
|
5526
|
+
const elements = getFocusableElements(this.container);
|
|
5527
|
+
|
|
5528
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
5529
|
+
return elements;
|
|
5530
|
+
}
|
|
5256
5531
|
|
|
5257
5532
|
/**
|
|
5258
|
-
*
|
|
5259
|
-
*
|
|
5260
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
5261
|
-
* @returns {void}
|
|
5533
|
+
* Moves focus to the first focusable element within the container.
|
|
5534
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
5262
5535
|
*/
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
}
|
|
5536
|
+
focusFirstElement() {
|
|
5537
|
+
const focusables = this._getFocusableElements();
|
|
5538
|
+
if (focusables.length) focusables[0].focus();
|
|
5267
5539
|
}
|
|
5268
5540
|
|
|
5269
5541
|
/**
|
|
5270
|
-
*
|
|
5271
|
-
*
|
|
5542
|
+
* Moves focus to the last focusable element within the container.
|
|
5543
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
5272
5544
|
*/
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5277
|
-
!el || el === document || el === window
|
|
5278
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
5279
|
-
: found
|
|
5280
|
-
? found // found a selector INside this element
|
|
5281
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5282
|
-
) {
|
|
5283
|
-
return __Closest(base);
|
|
5545
|
+
focusLastElement() {
|
|
5546
|
+
const focusables = this._getFocusableElements();
|
|
5547
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
5284
5548
|
}
|
|
5285
|
-
/* eslint-enable jsdoc/require-param */
|
|
5286
5549
|
|
|
5287
5550
|
/**
|
|
5288
|
-
*
|
|
5289
|
-
*
|
|
5290
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5291
|
-
* @returns {void}
|
|
5551
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
5552
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
5292
5553
|
*/
|
|
5293
|
-
|
|
5294
|
-
const tag = tagName.toLowerCase();
|
|
5295
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
5554
|
+
disconnect() {
|
|
5296
5555
|
|
|
5297
|
-
if (
|
|
5298
|
-
|
|
5556
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
5557
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
5299
5558
|
}
|
|
5559
|
+
|
|
5560
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
5300
5561
|
}
|
|
5562
|
+
}
|
|
5563
|
+
|
|
5564
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5565
|
+
// See LICENSE in the project root for license information.
|
|
5566
|
+
|
|
5567
|
+
|
|
5568
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
5301
5569
|
|
|
5302
5570
|
/**
|
|
5303
|
-
*
|
|
5304
|
-
* @
|
|
5305
|
-
* @param {
|
|
5306
|
-
* @
|
|
5571
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5572
|
+
* @private
|
|
5573
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5574
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5575
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5307
5576
|
*/
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
5577
|
+
generateElementName(baseName, version) {
|
|
5578
|
+
let result = baseName;
|
|
5311
5579
|
|
|
5312
|
-
|
|
5580
|
+
result += '-';
|
|
5581
|
+
result += version.replace(/[.]/g, '_');
|
|
5582
|
+
|
|
5583
|
+
return result;
|
|
5584
|
+
}
|
|
5585
|
+
|
|
5586
|
+
/**
|
|
5587
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5588
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5589
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5590
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5591
|
+
*/
|
|
5592
|
+
generateTag(baseName, version, tagClass) {
|
|
5593
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5594
|
+
const tag = i$1`${s(elementName)}`;
|
|
5595
|
+
|
|
5596
|
+
if (!customElements.get(elementName)) {
|
|
5597
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5598
|
+
}
|
|
5599
|
+
|
|
5600
|
+
return tag;
|
|
5313
5601
|
}
|
|
5314
5602
|
};
|
|
5315
5603
|
|
|
5316
|
-
// Copyright (c)
|
|
5604
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5317
5605
|
// See LICENSE in the project root for license information.
|
|
5318
5606
|
|
|
5319
5607
|
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5608
|
+
/**
|
|
5609
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
5610
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
5611
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5612
|
+
*/
|
|
5323
5613
|
|
|
5324
|
-
|
|
5325
|
-
|
|
5614
|
+
let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
5615
|
+
|
|
5616
|
+
// function to define props used within the scope of this component
|
|
5617
|
+
static get properties() {
|
|
5618
|
+
return {
|
|
5619
|
+
hidden: { type: Boolean,
|
|
5620
|
+
reflect: true },
|
|
5621
|
+
hiddenVisually: { type: Boolean,
|
|
5622
|
+
reflect: true },
|
|
5623
|
+
hiddenAudible: { type: Boolean,
|
|
5624
|
+
reflect: true },
|
|
5625
|
+
};
|
|
5326
5626
|
}
|
|
5327
5627
|
|
|
5328
5628
|
/**
|
|
5329
|
-
*
|
|
5330
|
-
* @private
|
|
5331
|
-
* @returns {void}
|
|
5629
|
+
* @private Function that determines state of aria-hidden
|
|
5332
5630
|
*/
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5631
|
+
hideAudible(value) {
|
|
5632
|
+
if (value) {
|
|
5633
|
+
return 'true'
|
|
5634
|
+
}
|
|
5635
|
+
|
|
5636
|
+
return 'false'
|
|
5637
|
+
}
|
|
5638
|
+
};
|
|
5639
|
+
|
|
5640
|
+
var error$1 = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
5641
|
+
|
|
5642
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
5643
|
+
|
|
5644
|
+
const _fetchMap$1 = new Map();
|
|
5645
|
+
|
|
5646
|
+
/**
|
|
5647
|
+
* A callback to parse Response body.
|
|
5648
|
+
*
|
|
5649
|
+
* @callback ResponseParser
|
|
5650
|
+
* @param {Fetch.Response} response
|
|
5651
|
+
* @returns {Promise}
|
|
5652
|
+
*/
|
|
5653
|
+
|
|
5654
|
+
/**
|
|
5655
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
5656
|
+
*
|
|
5657
|
+
* @param {String} uri
|
|
5658
|
+
* @param {Object} [options={}]
|
|
5659
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
5660
|
+
* @returns {Promise}
|
|
5661
|
+
*/
|
|
5662
|
+
const cacheFetch$1 = (uri, options = {}) => {
|
|
5663
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
5664
|
+
if (!_fetchMap$1.has(uri)) {
|
|
5665
|
+
_fetchMap$1.set(uri, fetch(uri).then(responseParser));
|
|
5666
|
+
}
|
|
5667
|
+
return _fetchMap$1.get(uri);
|
|
5668
|
+
};
|
|
5669
|
+
|
|
5670
|
+
var styleCss$2$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
5671
|
+
|
|
5672
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5673
|
+
// See LICENSE in the project root for license information.
|
|
5674
|
+
|
|
5675
|
+
|
|
5676
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5677
|
+
/**
|
|
5678
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
5679
|
+
*/
|
|
5680
|
+
|
|
5681
|
+
// build the component class
|
|
5682
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
5683
|
+
constructor() {
|
|
5684
|
+
super();
|
|
5685
|
+
this.onDark = false;
|
|
5336
5686
|
}
|
|
5337
5687
|
|
|
5338
5688
|
// function to define props used within the scope of this component
|
|
@@ -5341,15 +5691,177 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5341
5691
|
...super.properties,
|
|
5342
5692
|
|
|
5343
5693
|
/**
|
|
5344
|
-
* Set
|
|
5694
|
+
* Set value for on-dark version of auro-icon.
|
|
5345
5695
|
*/
|
|
5346
|
-
|
|
5347
|
-
type:
|
|
5696
|
+
onDark: {
|
|
5697
|
+
type: Boolean,
|
|
5348
5698
|
reflect: true
|
|
5349
5699
|
},
|
|
5350
5700
|
|
|
5351
5701
|
/**
|
|
5352
|
-
*
|
|
5702
|
+
* @private
|
|
5703
|
+
*/
|
|
5704
|
+
svg: {
|
|
5705
|
+
attribute: false,
|
|
5706
|
+
reflect: true
|
|
5707
|
+
}
|
|
5708
|
+
};
|
|
5709
|
+
}
|
|
5710
|
+
|
|
5711
|
+
static get styles() {
|
|
5712
|
+
return i$5`
|
|
5713
|
+
${styleCss$2$1}
|
|
5714
|
+
`;
|
|
5715
|
+
}
|
|
5716
|
+
|
|
5717
|
+
/**
|
|
5718
|
+
* Async function to fetch requested icon from npm CDN.
|
|
5719
|
+
* @private
|
|
5720
|
+
* @param {string} category - Icon category.
|
|
5721
|
+
* @param {string} name - Icon name.
|
|
5722
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
5723
|
+
*/
|
|
5724
|
+
async fetchIcon(category, name) {
|
|
5725
|
+
let iconHTML = '';
|
|
5726
|
+
|
|
5727
|
+
if (category === 'logos') {
|
|
5728
|
+
iconHTML = await cacheFetch$1(`${this.uri}/${category}/${name}.svg`);
|
|
5729
|
+
} else {
|
|
5730
|
+
iconHTML = await cacheFetch$1(`${this.uri}/icons/${category}/${name}.svg`);
|
|
5731
|
+
}
|
|
5732
|
+
|
|
5733
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
5734
|
+
|
|
5735
|
+
return dom.body.querySelector('svg');
|
|
5736
|
+
}
|
|
5737
|
+
|
|
5738
|
+
// lifecycle function
|
|
5739
|
+
async firstUpdated() {
|
|
5740
|
+
if (!this.customSvg) {
|
|
5741
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
5742
|
+
|
|
5743
|
+
if (svg) {
|
|
5744
|
+
this.svg = svg;
|
|
5745
|
+
} else if (!svg) {
|
|
5746
|
+
const penDOM = new DOMParser().parseFromString(error$1.svg, 'text/html');
|
|
5747
|
+
|
|
5748
|
+
this.svg = penDOM.body.firstChild;
|
|
5749
|
+
}
|
|
5750
|
+
}
|
|
5751
|
+
}
|
|
5752
|
+
};
|
|
5753
|
+
|
|
5754
|
+
var tokensCss$2$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
5755
|
+
|
|
5756
|
+
var colorCss$3$1 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
5757
|
+
|
|
5758
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5759
|
+
// See LICENSE in the project root for license information.
|
|
5760
|
+
|
|
5761
|
+
// ---------------------------------------------------------------------
|
|
5762
|
+
|
|
5763
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5764
|
+
|
|
5765
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
5766
|
+
|
|
5767
|
+
/* eslint-disable jsdoc/require-param */
|
|
5768
|
+
|
|
5769
|
+
/**
|
|
5770
|
+
* This will register a new custom element with the browser.
|
|
5771
|
+
* @param {String} name - The name of the custom element.
|
|
5772
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5773
|
+
* @returns {void}
|
|
5774
|
+
*/
|
|
5775
|
+
registerComponent(name, componentClass) {
|
|
5776
|
+
if (!customElements.get(name)) {
|
|
5777
|
+
customElements.define(name, class extends componentClass {});
|
|
5778
|
+
}
|
|
5779
|
+
}
|
|
5780
|
+
|
|
5781
|
+
/**
|
|
5782
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5783
|
+
* @returns {void}
|
|
5784
|
+
*/
|
|
5785
|
+
closestElement(
|
|
5786
|
+
selector, // selector like in .closest()
|
|
5787
|
+
base = this, // extra functionality to skip a parent
|
|
5788
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5789
|
+
!el || el === document || el === window
|
|
5790
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5791
|
+
: found
|
|
5792
|
+
? found // found a selector INside this element
|
|
5793
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5794
|
+
) {
|
|
5795
|
+
return __Closest(base);
|
|
5796
|
+
}
|
|
5797
|
+
/* eslint-enable jsdoc/require-param */
|
|
5798
|
+
|
|
5799
|
+
/**
|
|
5800
|
+
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
5801
|
+
* @param {Object} elem - The element to check.
|
|
5802
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5803
|
+
* @returns {void}
|
|
5804
|
+
*/
|
|
5805
|
+
handleComponentTagRename(elem, tagName) {
|
|
5806
|
+
const tag = tagName.toLowerCase();
|
|
5807
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5808
|
+
|
|
5809
|
+
if (elemTag !== tag) {
|
|
5810
|
+
elem.setAttribute(tag, true);
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5813
|
+
|
|
5814
|
+
/**
|
|
5815
|
+
* Validates if an element is a specific Auro component.
|
|
5816
|
+
* @param {Object} elem - The element to validate.
|
|
5817
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5818
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5819
|
+
*/
|
|
5820
|
+
elementMatch(elem, tagName) {
|
|
5821
|
+
const tag = tagName.toLowerCase();
|
|
5822
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5823
|
+
|
|
5824
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5825
|
+
}
|
|
5826
|
+
};
|
|
5827
|
+
|
|
5828
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5829
|
+
// See LICENSE in the project root for license information.
|
|
5830
|
+
|
|
5831
|
+
|
|
5832
|
+
let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
5833
|
+
constructor() {
|
|
5834
|
+
super();
|
|
5835
|
+
|
|
5836
|
+
this.variant = undefined;
|
|
5837
|
+
this.privateDefaults();
|
|
5838
|
+
}
|
|
5839
|
+
|
|
5840
|
+
/**
|
|
5841
|
+
* Internal Defaults.
|
|
5842
|
+
* @private
|
|
5843
|
+
* @returns {void}
|
|
5844
|
+
*/
|
|
5845
|
+
privateDefaults() {
|
|
5846
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5847
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5848
|
+
}
|
|
5849
|
+
|
|
5850
|
+
// function to define props used within the scope of this component
|
|
5851
|
+
static get properties() {
|
|
5852
|
+
return {
|
|
5853
|
+
...super.properties,
|
|
5854
|
+
|
|
5855
|
+
/**
|
|
5856
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
5857
|
+
*/
|
|
5858
|
+
ariaHidden: {
|
|
5859
|
+
type: String,
|
|
5860
|
+
reflect: true
|
|
5861
|
+
},
|
|
5862
|
+
|
|
5863
|
+
/**
|
|
5864
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
5353
5865
|
*/
|
|
5354
5866
|
category: {
|
|
5355
5867
|
type: String,
|
|
@@ -5486,7 +5998,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5486
5998
|
|
|
5487
5999
|
var iconVersion$1 = '6.1.2';
|
|
5488
6000
|
|
|
5489
|
-
var styleCss$1$
|
|
6001
|
+
var styleCss$1$1 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
5490
6002
|
|
|
5491
6003
|
var colorCss$2$1 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
5492
6004
|
|
|
@@ -5528,7 +6040,7 @@ class AuroDropdownBib extends i$2 {
|
|
|
5528
6040
|
|
|
5529
6041
|
static get styles() {
|
|
5530
6042
|
return [
|
|
5531
|
-
styleCss$1$
|
|
6043
|
+
styleCss$1$1,
|
|
5532
6044
|
colorCss$2$1,
|
|
5533
6045
|
tokensCss$1$1
|
|
5534
6046
|
];
|
|
@@ -5687,11 +6199,11 @@ var dropdownVersion$1 = '3.0.0';
|
|
|
5687
6199
|
|
|
5688
6200
|
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
5689
6201
|
|
|
5690
|
-
var colorCss$1$
|
|
6202
|
+
var colorCss$1$1 = i$5`:host(:not([layout*=classic])){--ds-auro-dropdown-trigger-border-color: transparent}:host(:not([ondark])) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus-within,:host(:not([ondark])) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host(:not([onDark])[disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host(:not([ondark])[error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([onDark]) .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([onDark]) .wrapper:focus-within,:host([onDark]) .wrapper:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([ondark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}`;
|
|
5691
6203
|
|
|
5692
6204
|
var classicColorCss = i$5``;
|
|
5693
6205
|
|
|
5694
|
-
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([
|
|
6206
|
+
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .wrapper{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .wrapper:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([matchwidth]) #bibSizer{width:100%}`;
|
|
5695
6207
|
|
|
5696
6208
|
var styleEmphasizedCss = i$5`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
5697
6209
|
|
|
@@ -5699,9 +6211,9 @@ var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex:1;fle
|
|
|
5699
6211
|
|
|
5700
6212
|
var colorCss$5 = i$5`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error-subtle, #fbc6c6)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
5701
6213
|
|
|
5702
|
-
var styleCss$6 = i$5
|
|
6214
|
+
var styleCss$6 = i$5`:host{position:relative;display:block}.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
5703
6215
|
|
|
5704
|
-
var tokensCss$
|
|
6216
|
+
var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5705
6217
|
|
|
5706
6218
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5707
6219
|
// See LICENSE in the project root for license information.
|
|
@@ -5710,7 +6222,7 @@ var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
5710
6222
|
|
|
5711
6223
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5712
6224
|
|
|
5713
|
-
let AuroLibraryRuntimeUtils$
|
|
6225
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
5714
6226
|
|
|
5715
6227
|
/* eslint-disable jsdoc/require-param */
|
|
5716
6228
|
|
|
@@ -5782,7 +6294,7 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
5782
6294
|
*
|
|
5783
6295
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
5784
6296
|
*/
|
|
5785
|
-
|
|
6297
|
+
class AuroHelpText extends i$2 {
|
|
5786
6298
|
|
|
5787
6299
|
constructor() {
|
|
5788
6300
|
super();
|
|
@@ -5791,14 +6303,14 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
5791
6303
|
this.onDark = false;
|
|
5792
6304
|
this.hasTextContent = false;
|
|
5793
6305
|
|
|
5794
|
-
AuroLibraryRuntimeUtils$
|
|
6306
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
5795
6307
|
}
|
|
5796
6308
|
|
|
5797
6309
|
static get styles() {
|
|
5798
6310
|
return [
|
|
5799
6311
|
colorCss$5,
|
|
5800
6312
|
styleCss$6,
|
|
5801
|
-
tokensCss$
|
|
6313
|
+
tokensCss$3
|
|
5802
6314
|
];
|
|
5803
6315
|
}
|
|
5804
6316
|
|
|
@@ -5847,7 +6359,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
5847
6359
|
*
|
|
5848
6360
|
*/
|
|
5849
6361
|
static register(name = "auro-helptext") {
|
|
5850
|
-
AuroLibraryRuntimeUtils$
|
|
6362
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
5851
6363
|
}
|
|
5852
6364
|
|
|
5853
6365
|
updated() {
|
|
@@ -5901,7 +6413,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
|
5901
6413
|
</div>
|
|
5902
6414
|
`;
|
|
5903
6415
|
}
|
|
5904
|
-
}
|
|
6416
|
+
}
|
|
5905
6417
|
|
|
5906
6418
|
var helpTextVersion = '1.0.0';
|
|
5907
6419
|
|
|
@@ -6004,10 +6516,8 @@ let AuroElement$3 = class AuroElement extends i$2 {
|
|
|
6004
6516
|
// See LICENSE in the project root for license information.
|
|
6005
6517
|
|
|
6006
6518
|
|
|
6007
|
-
|
|
6008
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
6519
|
+
/*
|
|
6009
6520
|
* @slot - Default slot for the popover content.
|
|
6010
|
-
* @slot label - Defines the content of the label.
|
|
6011
6521
|
* @slot helpText - Defines the content of the helpText.
|
|
6012
6522
|
* @slot trigger - Defines the content of the trigger.
|
|
6013
6523
|
* @csspart trigger - The trigger content container.
|
|
@@ -6026,18 +6536,22 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6026
6536
|
this.matchWidth = false;
|
|
6027
6537
|
this.noHideOnThisFocusLoss = false;
|
|
6028
6538
|
|
|
6029
|
-
this.errorMessage =
|
|
6539
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
6030
6540
|
|
|
6031
6541
|
// Layout Config
|
|
6032
|
-
this.layout =
|
|
6033
|
-
this.shape =
|
|
6034
|
-
this.size =
|
|
6542
|
+
this.layout = undefined;
|
|
6543
|
+
this.shape = undefined;
|
|
6544
|
+
this.size = undefined;
|
|
6035
6545
|
|
|
6036
6546
|
this.parentBorder = false;
|
|
6037
6547
|
|
|
6038
6548
|
this.privateDefaults();
|
|
6039
6549
|
}
|
|
6040
6550
|
|
|
6551
|
+
/**
|
|
6552
|
+
* @private
|
|
6553
|
+
* @returns {object} Class definition for the wrapper element.
|
|
6554
|
+
*/
|
|
6041
6555
|
get commonWrapperClasses() {
|
|
6042
6556
|
return {
|
|
6043
6557
|
'trigger': true,
|
|
@@ -6055,13 +6569,10 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6055
6569
|
privateDefaults() {
|
|
6056
6570
|
this.chevron = false;
|
|
6057
6571
|
this.disabled = false;
|
|
6572
|
+
this.disableFocusTrap = false;
|
|
6058
6573
|
this.error = false;
|
|
6059
|
-
this.inset = false;
|
|
6060
|
-
this.rounded = false;
|
|
6061
6574
|
this.tabIndex = 0;
|
|
6062
6575
|
this.noToggle = false;
|
|
6063
|
-
this.a11yAutocomplete = 'none';
|
|
6064
|
-
this.labeled = true;
|
|
6065
6576
|
this.a11yRole = 'button';
|
|
6066
6577
|
this.onDark = false;
|
|
6067
6578
|
this.showTriggerBorders = true;
|
|
@@ -6121,7 +6632,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6121
6632
|
/**
|
|
6122
6633
|
* @private
|
|
6123
6634
|
*/
|
|
6124
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText
|
|
6635
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
6125
6636
|
|
|
6126
6637
|
/**
|
|
6127
6638
|
* @private
|
|
@@ -6157,6 +6668,18 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6157
6668
|
this.floater.showBib();
|
|
6158
6669
|
}
|
|
6159
6670
|
|
|
6671
|
+
/**
|
|
6672
|
+
* When bib is open, focus on the first element inside of bib.
|
|
6673
|
+
* If not, trigger element will get focus.
|
|
6674
|
+
*/
|
|
6675
|
+
focus() {
|
|
6676
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
6677
|
+
this.focusTrap.focusFirstElement();
|
|
6678
|
+
} else {
|
|
6679
|
+
this.trigger.focus();
|
|
6680
|
+
}
|
|
6681
|
+
}
|
|
6682
|
+
|
|
6160
6683
|
// function to define props used within the scope of this component
|
|
6161
6684
|
static get properties() {
|
|
6162
6685
|
return {
|
|
@@ -6170,6 +6693,15 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6170
6693
|
reflect: true
|
|
6171
6694
|
},
|
|
6172
6695
|
|
|
6696
|
+
/**
|
|
6697
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
6698
|
+
* @default false
|
|
6699
|
+
*/
|
|
6700
|
+
disableEventShow: {
|
|
6701
|
+
type: Boolean,
|
|
6702
|
+
reflect: true
|
|
6703
|
+
},
|
|
6704
|
+
|
|
6173
6705
|
/**
|
|
6174
6706
|
* If declared, applies a border around the trigger slot.
|
|
6175
6707
|
*/
|
|
@@ -6188,17 +6720,17 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6188
6720
|
},
|
|
6189
6721
|
|
|
6190
6722
|
/**
|
|
6191
|
-
* If declared, the dropdown
|
|
6723
|
+
* If declared, the dropdown is not interactive.
|
|
6192
6724
|
*/
|
|
6193
|
-
|
|
6725
|
+
disabled: {
|
|
6194
6726
|
type: Boolean,
|
|
6195
6727
|
reflect: true
|
|
6196
6728
|
},
|
|
6197
6729
|
|
|
6198
6730
|
/**
|
|
6199
|
-
* If declared, the
|
|
6731
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
6200
6732
|
*/
|
|
6201
|
-
|
|
6733
|
+
disableFocusTrap: {
|
|
6202
6734
|
type: Boolean,
|
|
6203
6735
|
reflect: true
|
|
6204
6736
|
},
|
|
@@ -6243,22 +6775,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6243
6775
|
reflect: true
|
|
6244
6776
|
},
|
|
6245
6777
|
|
|
6246
|
-
/**
|
|
6247
|
-
* Makes the trigger to be full width of its parent container.
|
|
6248
|
-
*/
|
|
6249
|
-
fluid: {
|
|
6250
|
-
type: Boolean,
|
|
6251
|
-
reflect: true
|
|
6252
|
-
},
|
|
6253
|
-
|
|
6254
|
-
/**
|
|
6255
|
-
* If declared, will apply padding around trigger slot content.
|
|
6256
|
-
*/
|
|
6257
|
-
inset: {
|
|
6258
|
-
type: Boolean,
|
|
6259
|
-
reflect: true
|
|
6260
|
-
},
|
|
6261
|
-
|
|
6262
6778
|
/**
|
|
6263
6779
|
* If true, the dropdown bib is displayed.
|
|
6264
6780
|
*/
|
|
@@ -6302,15 +6818,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6302
6818
|
reflect: true
|
|
6303
6819
|
},
|
|
6304
6820
|
|
|
6305
|
-
/**
|
|
6306
|
-
* Defines if there is a label preset.
|
|
6307
|
-
* @private
|
|
6308
|
-
*/
|
|
6309
|
-
labeled: {
|
|
6310
|
-
type: Boolean,
|
|
6311
|
-
reflect: true
|
|
6312
|
-
},
|
|
6313
|
-
|
|
6314
6821
|
/**
|
|
6315
6822
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
6316
6823
|
* @private
|
|
@@ -6371,6 +6878,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6371
6878
|
reflect: true
|
|
6372
6879
|
},
|
|
6373
6880
|
|
|
6881
|
+
/**
|
|
6882
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
6883
|
+
*/
|
|
6374
6884
|
onSlotChange: {
|
|
6375
6885
|
type: Function,
|
|
6376
6886
|
reflect: false
|
|
@@ -6385,14 +6895,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6385
6895
|
reflect: true
|
|
6386
6896
|
},
|
|
6387
6897
|
|
|
6388
|
-
/**
|
|
6389
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
6390
|
-
*/
|
|
6391
|
-
rounded: {
|
|
6392
|
-
type: Boolean,
|
|
6393
|
-
reflect: true
|
|
6394
|
-
},
|
|
6395
|
-
|
|
6396
6898
|
/**
|
|
6397
6899
|
* @private
|
|
6398
6900
|
*/
|
|
@@ -6407,22 +6909,14 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6407
6909
|
type: String || undefined,
|
|
6408
6910
|
attribute: false,
|
|
6409
6911
|
reflect: false
|
|
6410
|
-
},
|
|
6411
|
-
|
|
6412
|
-
/**
|
|
6413
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
6414
|
-
*/
|
|
6415
|
-
a11yAutocomplete: {
|
|
6416
|
-
type: String,
|
|
6417
|
-
attribute: false,
|
|
6418
6912
|
}
|
|
6419
6913
|
};
|
|
6420
6914
|
}
|
|
6421
6915
|
|
|
6422
6916
|
static get styles() {
|
|
6423
6917
|
return [
|
|
6424
|
-
colorCss$1$2,
|
|
6425
6918
|
tokensCss$1$1,
|
|
6919
|
+
colorCss$1$1,
|
|
6426
6920
|
|
|
6427
6921
|
// default layout
|
|
6428
6922
|
classicColorCss,
|
|
@@ -6485,6 +6979,12 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6485
6979
|
this.handleTriggerContentSlotChange();
|
|
6486
6980
|
}
|
|
6487
6981
|
|
|
6982
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
6983
|
+
this.updateFocusTrap();
|
|
6984
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
6985
|
+
this.trigger.focus();
|
|
6986
|
+
}
|
|
6987
|
+
}
|
|
6488
6988
|
}
|
|
6489
6989
|
|
|
6490
6990
|
firstUpdated() {
|
|
@@ -6550,6 +7050,27 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6550
7050
|
this.hasFocus = true;
|
|
6551
7051
|
}
|
|
6552
7052
|
|
|
7053
|
+
/**
|
|
7054
|
+
* @private
|
|
7055
|
+
*/
|
|
7056
|
+
updateFocusTrap() {
|
|
7057
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
7058
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
7059
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
7060
|
+
this.focusTrap.focusFirstElement();
|
|
7061
|
+
return;
|
|
7062
|
+
}
|
|
7063
|
+
|
|
7064
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
7065
|
+
if (!this.focusTrap) {
|
|
7066
|
+
return;
|
|
7067
|
+
}
|
|
7068
|
+
|
|
7069
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
7070
|
+
this.focusTrap.disconnect();
|
|
7071
|
+
this.focusTrap = undefined;
|
|
7072
|
+
}
|
|
7073
|
+
|
|
6553
7074
|
/**
|
|
6554
7075
|
* Function to support @focusout event.
|
|
6555
7076
|
* @private
|
|
@@ -6835,10 +7356,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6835
7356
|
id="bib"
|
|
6836
7357
|
shape="${this.shape}"
|
|
6837
7358
|
?data-show="${this.isPopoverVisible}"
|
|
6838
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
6839
|
-
?common="${this.common}"
|
|
6840
|
-
?rounded="${this.common || this.rounded}"
|
|
6841
|
-
?inset="${this.common || this.inset}">
|
|
7359
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
6842
7360
|
<div class="slotContent">
|
|
6843
7361
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
6844
7362
|
</div>
|
|
@@ -7588,7 +8106,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
7588
8106
|
|
|
7589
8107
|
var styleCss$2 = i$5`: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}: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:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.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(0deg)}100%{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{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{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%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
7590
8108
|
|
|
7591
|
-
var colorCss$1
|
|
8109
|
+
var colorCss$1 = i$5`: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]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--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}`;
|
|
7592
8110
|
|
|
7593
8111
|
var tokensCss$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
7594
8112
|
|
|
@@ -7667,7 +8185,7 @@ class AuroLoader extends i$2 {
|
|
|
7667
8185
|
static get styles() {
|
|
7668
8186
|
return [
|
|
7669
8187
|
i$5`${styleCss$2}`,
|
|
7670
|
-
i$5`${colorCss$1
|
|
8188
|
+
i$5`${colorCss$1}`,
|
|
7671
8189
|
i$5`${tokensCss$1}`
|
|
7672
8190
|
];
|
|
7673
8191
|
}
|
|
@@ -8153,7 +8671,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
8153
8671
|
return _fetchMap.get(uri);
|
|
8154
8672
|
};
|
|
8155
8673
|
|
|
8156
|
-
var styleCss$1
|
|
8674
|
+
var styleCss$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
8157
8675
|
|
|
8158
8676
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8159
8677
|
// See LICENSE in the project root for license information.
|
|
@@ -8196,7 +8714,7 @@ class BaseIcon extends AuroElement$2 {
|
|
|
8196
8714
|
|
|
8197
8715
|
static get styles() {
|
|
8198
8716
|
return i$5`
|
|
8199
|
-
${styleCss$1
|
|
8717
|
+
${styleCss$1}
|
|
8200
8718
|
`;
|
|
8201
8719
|
}
|
|
8202
8720
|
|
|
@@ -8237,7 +8755,7 @@ class BaseIcon extends AuroElement$2 {
|
|
|
8237
8755
|
}
|
|
8238
8756
|
}
|
|
8239
8757
|
|
|
8240
|
-
var tokensCss
|
|
8758
|
+
var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
8241
8759
|
|
|
8242
8760
|
var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
8243
8761
|
|
|
@@ -8397,8 +8915,8 @@ class AuroIcon extends BaseIcon {
|
|
|
8397
8915
|
static get styles() {
|
|
8398
8916
|
return [
|
|
8399
8917
|
super.styles,
|
|
8400
|
-
i$5`${tokensCss
|
|
8401
|
-
i$5`${styleCss$1
|
|
8918
|
+
i$5`${tokensCss}`,
|
|
8919
|
+
i$5`${styleCss$1}`,
|
|
8402
8920
|
i$5`${colorCss$4}`
|
|
8403
8921
|
];
|
|
8404
8922
|
}
|
|
@@ -8491,7 +9009,7 @@ var iconVersion = '8.0.4';
|
|
|
8491
9009
|
|
|
8492
9010
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8493
9011
|
|
|
8494
|
-
|
|
9012
|
+
class AuroLibraryRuntimeUtils {
|
|
8495
9013
|
|
|
8496
9014
|
/* eslint-disable jsdoc/require-param */
|
|
8497
9015
|
|
|
@@ -8552,7 +9070,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
8552
9070
|
|
|
8553
9071
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
8554
9072
|
}
|
|
8555
|
-
}
|
|
9073
|
+
}
|
|
8556
9074
|
|
|
8557
9075
|
var styleCss$5 = i$5`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
|
|
8558
9076
|
|
|
@@ -8583,7 +9101,7 @@ class AuroHeader extends i$2 {
|
|
|
8583
9101
|
/**
|
|
8584
9102
|
* @private
|
|
8585
9103
|
*/
|
|
8586
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
9104
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
8587
9105
|
}
|
|
8588
9106
|
|
|
8589
9107
|
// function to define props used within the scope of this component
|
|
@@ -8613,7 +9131,7 @@ class AuroHeader extends i$2 {
|
|
|
8613
9131
|
*
|
|
8614
9132
|
*/
|
|
8615
9133
|
static register(name = "auro-header") {
|
|
8616
|
-
AuroLibraryRuntimeUtils
|
|
9134
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
8617
9135
|
}
|
|
8618
9136
|
|
|
8619
9137
|
firstUpdated() {
|
|
@@ -8819,7 +9337,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
8819
9337
|
<div id="bibTemplate" part="bibtemplate">
|
|
8820
9338
|
${this.isFullscreen ? u`
|
|
8821
9339
|
<div id="headerContainer">
|
|
8822
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
9340
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
8823
9341
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
8824
9342
|
</${this.buttonTag}>
|
|
8825
9343
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -8845,220 +9363,12 @@ class AuroBibtemplate extends i$2 {
|
|
|
8845
9363
|
|
|
8846
9364
|
var bibTemplateVersion = '1.0.0';
|
|
8847
9365
|
|
|
8848
|
-
var
|
|
9366
|
+
var styleCss = i$5`:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
8849
9367
|
|
|
8850
|
-
var
|
|
9368
|
+
var colorCss = i$5`:host ::slotted(*:not(:first-child)){border-color:var(--ds-auro-counter-divider-color)}`;
|
|
8851
9369
|
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8855
|
-
// See LICENSE in the project root for license information.
|
|
8856
|
-
|
|
8857
|
-
// ---------------------------------------------------------------------
|
|
8858
|
-
|
|
8859
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8860
|
-
|
|
8861
|
-
class AuroLibraryRuntimeUtils {
|
|
8862
|
-
|
|
8863
|
-
/* eslint-disable jsdoc/require-param */
|
|
8864
|
-
|
|
8865
|
-
/**
|
|
8866
|
-
* This will register a new custom element with the browser.
|
|
8867
|
-
* @param {String} name - The name of the custom element.
|
|
8868
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
8869
|
-
* @returns {void}
|
|
8870
|
-
*/
|
|
8871
|
-
registerComponent(name, componentClass) {
|
|
8872
|
-
if (!customElements.get(name)) {
|
|
8873
|
-
customElements.define(name, class extends componentClass {});
|
|
8874
|
-
}
|
|
8875
|
-
}
|
|
8876
|
-
|
|
8877
|
-
/**
|
|
8878
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
8879
|
-
* @returns {void}
|
|
8880
|
-
*/
|
|
8881
|
-
closestElement(
|
|
8882
|
-
selector, // selector like in .closest()
|
|
8883
|
-
base = this, // extra functionality to skip a parent
|
|
8884
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8885
|
-
!el || el === document || el === window
|
|
8886
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
8887
|
-
: found
|
|
8888
|
-
? found // found a selector INside this element
|
|
8889
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8890
|
-
) {
|
|
8891
|
-
return __Closest(base);
|
|
8892
|
-
}
|
|
8893
|
-
/* eslint-enable jsdoc/require-param */
|
|
8894
|
-
|
|
8895
|
-
/**
|
|
8896
|
-
* If the element passed is registered with a different tag name than what is passed in, the tag name is added as an attribute to the element.
|
|
8897
|
-
* @param {Object} elem - The element to check.
|
|
8898
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8899
|
-
* @returns {void}
|
|
8900
|
-
*/
|
|
8901
|
-
handleComponentTagRename(elem, tagName) {
|
|
8902
|
-
const tag = tagName.toLowerCase();
|
|
8903
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
8904
|
-
|
|
8905
|
-
if (elemTag !== tag) {
|
|
8906
|
-
elem.setAttribute(tag, true);
|
|
8907
|
-
}
|
|
8908
|
-
}
|
|
8909
|
-
|
|
8910
|
-
/**
|
|
8911
|
-
* Validates if an element is a specific Auro component.
|
|
8912
|
-
* @param {Object} elem - The element to validate.
|
|
8913
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
8914
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8915
|
-
*/
|
|
8916
|
-
elementMatch(elem, tagName) {
|
|
8917
|
-
const tag = tagName.toLowerCase();
|
|
8918
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
8919
|
-
|
|
8920
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
8921
|
-
}
|
|
8922
|
-
}
|
|
8923
|
-
|
|
8924
|
-
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8925
|
-
// See LICENSE in the project root for license information.
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
/**
|
|
8929
|
-
* Displays help text or error messages within form elements - Internal Use Only.
|
|
8930
|
-
*
|
|
8931
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
8932
|
-
*/
|
|
8933
|
-
class AuroHelpText extends i$2 {
|
|
8934
|
-
|
|
8935
|
-
constructor() {
|
|
8936
|
-
super();
|
|
8937
|
-
|
|
8938
|
-
this.error = false;
|
|
8939
|
-
this.onDark = false;
|
|
8940
|
-
this.hasTextContent = false;
|
|
8941
|
-
|
|
8942
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
8943
|
-
}
|
|
8944
|
-
|
|
8945
|
-
static get styles() {
|
|
8946
|
-
return [
|
|
8947
|
-
colorCss$1,
|
|
8948
|
-
styleCss$1,
|
|
8949
|
-
tokensCss
|
|
8950
|
-
];
|
|
8951
|
-
}
|
|
8952
|
-
|
|
8953
|
-
// function to define props used within the scope of this component
|
|
8954
|
-
static get properties() {
|
|
8955
|
-
return {
|
|
8956
|
-
|
|
8957
|
-
/**
|
|
8958
|
-
* @private
|
|
8959
|
-
*/
|
|
8960
|
-
slotNodes: {
|
|
8961
|
-
type: Boolean,
|
|
8962
|
-
},
|
|
8963
|
-
|
|
8964
|
-
/**
|
|
8965
|
-
* @private
|
|
8966
|
-
*/
|
|
8967
|
-
hasTextContent: {
|
|
8968
|
-
type: Boolean,
|
|
8969
|
-
},
|
|
8970
|
-
|
|
8971
|
-
/**
|
|
8972
|
-
* If declared, make font color red.
|
|
8973
|
-
*/
|
|
8974
|
-
error: {
|
|
8975
|
-
type: Boolean,
|
|
8976
|
-
reflect: true,
|
|
8977
|
-
},
|
|
8978
|
-
|
|
8979
|
-
/**
|
|
8980
|
-
* If declared, will apply onDark styles.
|
|
8981
|
-
*/
|
|
8982
|
-
onDark: {
|
|
8983
|
-
type: Boolean,
|
|
8984
|
-
reflect: true
|
|
8985
|
-
}
|
|
8986
|
-
};
|
|
8987
|
-
}
|
|
8988
|
-
|
|
8989
|
-
/**
|
|
8990
|
-
* This will register this element with the browser.
|
|
8991
|
-
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
8992
|
-
*
|
|
8993
|
-
* @example
|
|
8994
|
-
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
8995
|
-
*
|
|
8996
|
-
*/
|
|
8997
|
-
static register(name = "auro-helptext") {
|
|
8998
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
8999
|
-
}
|
|
9000
|
-
|
|
9001
|
-
updated() {
|
|
9002
|
-
this.handleSlotChange();
|
|
9003
|
-
}
|
|
9004
|
-
|
|
9005
|
-
handleSlotChange(event) {
|
|
9006
|
-
if (event) {
|
|
9007
|
-
this.slotNodes = event.target.assignedNodes();
|
|
9008
|
-
}
|
|
9009
|
-
|
|
9010
|
-
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
9011
|
-
}
|
|
9012
|
-
|
|
9013
|
-
/**
|
|
9014
|
-
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
9015
|
-
*
|
|
9016
|
-
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
9017
|
-
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
9018
|
-
* @private
|
|
9019
|
-
*/
|
|
9020
|
-
checkSlotsForContent(nodes) {
|
|
9021
|
-
if (!nodes) {
|
|
9022
|
-
return false;
|
|
9023
|
-
}
|
|
9024
|
-
|
|
9025
|
-
return nodes.some((node) => {
|
|
9026
|
-
if (node.textContent.trim()) {
|
|
9027
|
-
return true;
|
|
9028
|
-
}
|
|
9029
|
-
|
|
9030
|
-
if (!node.querySelector) {
|
|
9031
|
-
return false;
|
|
9032
|
-
}
|
|
9033
|
-
|
|
9034
|
-
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
9035
|
-
if (!nestedSlot) {
|
|
9036
|
-
return false;
|
|
9037
|
-
}
|
|
9038
|
-
|
|
9039
|
-
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
9040
|
-
return this.checkSlotsForContent(nestedSlotNodes);
|
|
9041
|
-
});
|
|
9042
|
-
}
|
|
9043
|
-
|
|
9044
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
9045
|
-
render() {
|
|
9046
|
-
return x`
|
|
9047
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
9048
|
-
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9049
|
-
</div>
|
|
9050
|
-
`;
|
|
9051
|
-
}
|
|
9052
|
-
}
|
|
9053
|
-
|
|
9054
|
-
var helptextVersion = '1.0.0';
|
|
9055
|
-
|
|
9056
|
-
var styleCss = i$5`:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
9057
|
-
|
|
9058
|
-
var colorCss = i$5`:host ::slotted(*:not(:first-child)){border-color:var(--ds-auro-counter-divider-color)}`;
|
|
9059
|
-
|
|
9060
|
-
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
9061
|
-
// See LICENSE in the project root for license information.
|
|
9370
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
9371
|
+
// See LICENSE in the project root for license information.
|
|
9062
9372
|
|
|
9063
9373
|
|
|
9064
9374
|
/**
|
|
@@ -9089,377 +9399,128 @@ class AuroCounterWrapper extends i$2 {
|
|
|
9089
9399
|
*/
|
|
9090
9400
|
static register(name = "auro-counter-wrapper") {
|
|
9091
9401
|
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterWrapper);
|
|
9092
|
-
}
|
|
9093
|
-
|
|
9094
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
9095
|
-
render() {
|
|
9096
|
-
return u`<div class="wrapper"><slot></slot></div>`;
|
|
9097
|
-
}
|
|
9098
|
-
}
|
|
9099
|
-
|
|
9100
|
-
/* istanbul ignore else */
|
|
9101
|
-
// define the name of the custom component
|
|
9102
|
-
if (!customElements.get("auro-counter-wrapper")) {
|
|
9103
|
-
customElements.define("auro-counter-wrapper", AuroCounterWrapper);
|
|
9104
|
-
}
|
|
9105
|
-
|
|
9106
|
-
class AuroElement extends i$2 {
|
|
9107
|
-
static get properties() {
|
|
9108
|
-
return {
|
|
9109
|
-
|
|
9110
|
-
/**
|
|
9111
|
-
* Defines the language of an element.
|
|
9112
|
-
* @default {'default'}
|
|
9113
|
-
*/
|
|
9114
|
-
layout: {
|
|
9115
|
-
type: String,
|
|
9116
|
-
attribute: "layout",
|
|
9117
|
-
reflect: true
|
|
9118
|
-
},
|
|
9119
|
-
|
|
9120
|
-
shape: {
|
|
9121
|
-
type: String,
|
|
9122
|
-
attribute: "shape",
|
|
9123
|
-
reflect: true
|
|
9124
|
-
},
|
|
9125
|
-
|
|
9126
|
-
size: {
|
|
9127
|
-
type: String,
|
|
9128
|
-
attribute: "size",
|
|
9129
|
-
reflect: true
|
|
9130
|
-
},
|
|
9131
|
-
|
|
9132
|
-
onDark: {
|
|
9133
|
-
type: Boolean,
|
|
9134
|
-
attribute: "ondark",
|
|
9135
|
-
reflect: true
|
|
9136
|
-
}
|
|
9137
|
-
};
|
|
9138
|
-
}
|
|
9139
|
-
|
|
9140
|
-
resetShapeClasses() {
|
|
9141
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9142
|
-
|
|
9143
|
-
if (wrapper) {
|
|
9144
|
-
wrapper.classList.forEach((className) => {
|
|
9145
|
-
if (className.startsWith('shape-')) {
|
|
9146
|
-
wrapper.classList.remove(className);
|
|
9147
|
-
}
|
|
9148
|
-
});
|
|
9149
|
-
|
|
9150
|
-
}
|
|
9151
|
-
|
|
9152
|
-
if (this.shape && this.size) {
|
|
9153
|
-
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
9154
|
-
} else {
|
|
9155
|
-
wrapper.classList.add('shape-none');
|
|
9156
|
-
}
|
|
9157
|
-
}
|
|
9158
|
-
|
|
9159
|
-
resetLayoutClasses() {
|
|
9160
|
-
if (this.layout) {
|
|
9161
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9162
|
-
|
|
9163
|
-
if (wrapper) {
|
|
9164
|
-
wrapper.classList.forEach((className) => {
|
|
9165
|
-
if (className.startsWith('layout-')) {
|
|
9166
|
-
wrapper.classList.remove(className);
|
|
9167
|
-
}
|
|
9168
|
-
});
|
|
9169
|
-
|
|
9170
|
-
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
9171
|
-
}
|
|
9172
|
-
}
|
|
9173
|
-
}
|
|
9174
|
-
|
|
9175
|
-
updateComponentArchitecture() {
|
|
9176
|
-
this.resetLayoutClasses();
|
|
9177
|
-
this.resetShapeClasses();
|
|
9178
|
-
}
|
|
9179
|
-
|
|
9180
|
-
updated(changedProperties) {
|
|
9181
|
-
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9182
|
-
this.updateComponentArchitecture();
|
|
9183
|
-
}
|
|
9184
|
-
}
|
|
9185
|
-
|
|
9186
|
-
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
9187
|
-
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
9188
|
-
render() {
|
|
9189
|
-
try {
|
|
9190
|
-
return this.renderLayout();
|
|
9191
|
-
} catch (error) {
|
|
9192
|
-
// failed to get the defined layout
|
|
9193
|
-
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
9194
|
-
|
|
9195
|
-
// fallback to the default layout
|
|
9196
|
-
return this.getLayout('default');
|
|
9197
|
-
}
|
|
9198
|
-
}
|
|
9199
|
-
}
|
|
9200
|
-
|
|
9201
|
-
// Selectors for focusable elements
|
|
9202
|
-
const FOCUSABLE_SELECTORS = [
|
|
9203
|
-
'a[href]',
|
|
9204
|
-
'button:not([disabled])',
|
|
9205
|
-
'textarea:not([disabled])',
|
|
9206
|
-
'input:not([disabled])',
|
|
9207
|
-
'select:not([disabled])',
|
|
9208
|
-
'[role="tab"]:not([disabled])',
|
|
9209
|
-
'[role="link"]:not([disabled])',
|
|
9210
|
-
'[role="button"]:not([disabled])',
|
|
9211
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
9212
|
-
'[contenteditable]:not([contenteditable="false"])'
|
|
9213
|
-
];
|
|
9214
|
-
|
|
9215
|
-
// List of custom components that are known to be focusable
|
|
9216
|
-
const FOCUSABLE_COMPONENTS = [
|
|
9217
|
-
'auro-checkbox',
|
|
9218
|
-
'auro-radio',
|
|
9219
|
-
'auro-dropdown',
|
|
9220
|
-
'auro-button',
|
|
9221
|
-
'auro-combobox',
|
|
9222
|
-
'auro-input',
|
|
9223
|
-
'auro-counter',
|
|
9224
|
-
'auro-menu',
|
|
9225
|
-
'auro-select',
|
|
9226
|
-
'auro-datepicker',
|
|
9227
|
-
'auro-hyperlink',
|
|
9228
|
-
'auro-accordion',
|
|
9229
|
-
];
|
|
9230
|
-
|
|
9231
|
-
/**
|
|
9232
|
-
* Determines if a given element is a custom focusable component.
|
|
9233
|
-
* Returns true if the element matches a known focusable component and is not disabled.
|
|
9234
|
-
*
|
|
9235
|
-
* @param {HTMLElement} element The element to check for focusability.
|
|
9236
|
-
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
9237
|
-
*/
|
|
9238
|
-
function isFocusableComponent(element) {
|
|
9239
|
-
const componentName = element.tagName.toLowerCase();
|
|
9240
|
-
|
|
9241
|
-
// Guard Clause: Element is a focusable component
|
|
9242
|
-
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
9243
|
-
|
|
9244
|
-
// Guard Clause: Element is not disabled
|
|
9245
|
-
if (element.hasAttribute('disabled')) return false;
|
|
9246
|
-
|
|
9247
|
-
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
9248
|
-
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
9249
|
-
|
|
9250
|
-
// If all guard clauses pass, the element is a focusable component
|
|
9251
|
-
return true;
|
|
9252
|
-
}
|
|
9253
|
-
|
|
9254
|
-
/**
|
|
9255
|
-
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
9256
|
-
* Returns a unique, ordered array of elements that can receive focus.
|
|
9257
|
-
*
|
|
9258
|
-
* @param {HTMLElement} container The container to search within
|
|
9259
|
-
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
9260
|
-
*/
|
|
9261
|
-
function getFocusableElements(container) {
|
|
9262
|
-
// Get elements in DOM order by walking the tree
|
|
9263
|
-
const orderedFocusableElements = [];
|
|
9264
|
-
|
|
9265
|
-
// Define a recursive function to collect focusable elements in DOM order
|
|
9266
|
-
const collectFocusableElements = (root) => {
|
|
9267
|
-
// Check if current element is focusable
|
|
9268
|
-
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
9269
|
-
// Check if this is a custom component that is focusable
|
|
9270
|
-
const isComponentFocusable = isFocusableComponent(root);
|
|
9271
|
-
|
|
9272
|
-
if (isComponentFocusable) {
|
|
9273
|
-
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
9274
|
-
orderedFocusableElements.push(root);
|
|
9275
|
-
return; // Skip traversing inside this component
|
|
9276
|
-
}
|
|
9277
|
-
|
|
9278
|
-
// Check if the element itself matches any selector
|
|
9279
|
-
for (const selector of FOCUSABLE_SELECTORS) {
|
|
9280
|
-
if (root.matches?.(selector)) {
|
|
9281
|
-
orderedFocusableElements.push(root);
|
|
9282
|
-
break; // Once we know it's focusable, no need to check other selectors
|
|
9283
|
-
}
|
|
9284
|
-
}
|
|
9285
|
-
|
|
9286
|
-
// Process shadow DOM only for non-Auro components
|
|
9287
|
-
if (root.shadowRoot) {
|
|
9288
|
-
// Process shadow DOM children in order
|
|
9289
|
-
if (root.shadowRoot.children) {
|
|
9290
|
-
Array.from(root.shadowRoot.children).forEach(child => {
|
|
9291
|
-
collectFocusableElements(child);
|
|
9292
|
-
});
|
|
9293
|
-
}
|
|
9294
|
-
}
|
|
9295
|
-
|
|
9296
|
-
// Process slots and their assigned nodes in order
|
|
9297
|
-
if (root.tagName === 'SLOT') {
|
|
9298
|
-
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
9299
|
-
for (const node of assignedNodes) {
|
|
9300
|
-
collectFocusableElements(node);
|
|
9301
|
-
}
|
|
9302
|
-
} else {
|
|
9303
|
-
// Process light DOM children in order
|
|
9304
|
-
if (root.children) {
|
|
9305
|
-
Array.from(root.children).forEach(child => {
|
|
9306
|
-
collectFocusableElements(child);
|
|
9307
|
-
});
|
|
9308
|
-
}
|
|
9309
|
-
}
|
|
9310
|
-
}
|
|
9311
|
-
};
|
|
9312
|
-
|
|
9313
|
-
// Start the traversal from the container
|
|
9314
|
-
collectFocusableElements(container);
|
|
9315
|
-
|
|
9316
|
-
// Remove duplicates that might have been collected through different paths
|
|
9317
|
-
// while preserving order
|
|
9318
|
-
const uniqueElements = [];
|
|
9319
|
-
const seen = new Set();
|
|
9320
|
-
|
|
9321
|
-
for (const element of orderedFocusableElements) {
|
|
9322
|
-
if (!seen.has(element)) {
|
|
9323
|
-
seen.add(element);
|
|
9324
|
-
uniqueElements.push(element);
|
|
9325
|
-
}
|
|
9326
|
-
}
|
|
9327
|
-
|
|
9328
|
-
return uniqueElements;
|
|
9329
|
-
}
|
|
9330
|
-
|
|
9331
|
-
/**
|
|
9332
|
-
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
9333
|
-
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
9334
|
-
*/
|
|
9335
|
-
class FocusTrap {
|
|
9336
|
-
/**
|
|
9337
|
-
* Creates a new FocusTrap instance for the given container element.
|
|
9338
|
-
* Initializes event listeners and prepares the container for focus management.
|
|
9339
|
-
*
|
|
9340
|
-
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
9341
|
-
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
9342
|
-
*/
|
|
9343
|
-
constructor(container) {
|
|
9344
|
-
if (!container || !(container instanceof HTMLElement)) {
|
|
9345
|
-
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
9346
|
-
}
|
|
9347
|
-
|
|
9348
|
-
this.container = container;
|
|
9349
|
-
this.tabDirection = 'forward'; // or 'backward'
|
|
9402
|
+
}
|
|
9350
9403
|
|
|
9351
|
-
|
|
9404
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
9405
|
+
render() {
|
|
9406
|
+
return u`<div class="wrapper"><slot></slot></div>`;
|
|
9352
9407
|
}
|
|
9408
|
+
}
|
|
9353
9409
|
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
*/
|
|
9360
|
-
_init() {
|
|
9410
|
+
/* istanbul ignore else */
|
|
9411
|
+
// define the name of the custom component
|
|
9412
|
+
if (!customElements.get("auro-counter-wrapper")) {
|
|
9413
|
+
customElements.define("auro-counter-wrapper", AuroCounterWrapper);
|
|
9414
|
+
}
|
|
9361
9415
|
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
9366
|
-
}
|
|
9416
|
+
class AuroElement extends i$2 {
|
|
9417
|
+
static get properties() {
|
|
9418
|
+
return {
|
|
9367
9419
|
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9420
|
+
/**
|
|
9421
|
+
* Defines the language of an element.
|
|
9422
|
+
* @default {'default'}
|
|
9423
|
+
*/
|
|
9424
|
+
layout: {
|
|
9425
|
+
type: String,
|
|
9426
|
+
attribute: "layout",
|
|
9427
|
+
reflect: true
|
|
9428
|
+
},
|
|
9371
9429
|
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
* @private
|
|
9378
|
-
*/
|
|
9379
|
-
_onKeydown = (e) => {
|
|
9380
|
-
|
|
9381
|
-
if (e.key === 'Tab') {
|
|
9430
|
+
shape: {
|
|
9431
|
+
type: String,
|
|
9432
|
+
attribute: "shape",
|
|
9433
|
+
reflect: true
|
|
9434
|
+
},
|
|
9382
9435
|
|
|
9383
|
-
|
|
9384
|
-
|
|
9436
|
+
size: {
|
|
9437
|
+
type: String,
|
|
9438
|
+
attribute: "size",
|
|
9439
|
+
reflect: true
|
|
9440
|
+
},
|
|
9385
9441
|
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
const actives = [activeElement];
|
|
9391
|
-
while (activeElement?.shadowRoot?.activeElement) {
|
|
9392
|
-
actives.push(activeElement.shadowRoot.activeElement);
|
|
9393
|
-
activeElement = activeElement.shadowRoot.activeElement;
|
|
9442
|
+
onDark: {
|
|
9443
|
+
type: Boolean,
|
|
9444
|
+
attribute: "ondark",
|
|
9445
|
+
reflect: true
|
|
9394
9446
|
}
|
|
9447
|
+
};
|
|
9448
|
+
}
|
|
9395
9449
|
|
|
9396
|
-
|
|
9397
|
-
|
|
9450
|
+
resetShapeClasses() {
|
|
9451
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9398
9452
|
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
(
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
: null;
|
|
9453
|
+
if (wrapper) {
|
|
9454
|
+
wrapper.classList.forEach((className) => {
|
|
9455
|
+
if (className.startsWith('shape-')) {
|
|
9456
|
+
wrapper.classList.remove(className);
|
|
9457
|
+
}
|
|
9458
|
+
});
|
|
9406
9459
|
|
|
9407
|
-
if (focusIndex !== null) {
|
|
9408
|
-
focusables[focusIndex].focus();
|
|
9409
|
-
e.preventDefault(); // Prevent default tab behavior
|
|
9410
|
-
e.stopPropagation(); // Stop the event from bubbling up
|
|
9411
|
-
}
|
|
9412
9460
|
}
|
|
9413
|
-
};
|
|
9414
9461
|
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
* @private
|
|
9421
|
-
*/
|
|
9422
|
-
_getFocusableElements() {
|
|
9423
|
-
// Use the imported utility function to get focusable elements
|
|
9424
|
-
const elements = getFocusableElements(this.container);
|
|
9425
|
-
|
|
9426
|
-
// Filter out any elements with the 'focus-bookend' class
|
|
9427
|
-
return elements;
|
|
9462
|
+
if (this.shape && this.size) {
|
|
9463
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
9464
|
+
} else {
|
|
9465
|
+
wrapper.classList.add('shape-none');
|
|
9466
|
+
}
|
|
9428
9467
|
}
|
|
9429
9468
|
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
*/
|
|
9434
|
-
focusFirstElement() {
|
|
9435
|
-
const focusables = this._getFocusableElements();
|
|
9436
|
-
if (focusables.length) focusables[0].focus();
|
|
9437
|
-
}
|
|
9469
|
+
resetLayoutClasses() {
|
|
9470
|
+
if (this.layout) {
|
|
9471
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9438
9472
|
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
|
|
9444
|
-
|
|
9445
|
-
|
|
9473
|
+
if (wrapper) {
|
|
9474
|
+
wrapper.classList.forEach((className) => {
|
|
9475
|
+
if (className.startsWith('layout-')) {
|
|
9476
|
+
wrapper.classList.remove(className);
|
|
9477
|
+
}
|
|
9478
|
+
});
|
|
9479
|
+
|
|
9480
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
9481
|
+
}
|
|
9482
|
+
}
|
|
9446
9483
|
}
|
|
9447
9484
|
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9452
|
-
disconnect() {
|
|
9485
|
+
updateComponentArchitecture() {
|
|
9486
|
+
this.resetLayoutClasses();
|
|
9487
|
+
this.resetShapeClasses();
|
|
9488
|
+
}
|
|
9453
9489
|
|
|
9454
|
-
|
|
9455
|
-
|
|
9490
|
+
updated(changedProperties) {
|
|
9491
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9492
|
+
this.updateComponentArchitecture();
|
|
9456
9493
|
}
|
|
9494
|
+
}
|
|
9457
9495
|
|
|
9458
|
-
|
|
9496
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
9497
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
9498
|
+
render() {
|
|
9499
|
+
try {
|
|
9500
|
+
return this.renderLayout();
|
|
9501
|
+
} catch (error) {
|
|
9502
|
+
// failed to get the defined layout
|
|
9503
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
9504
|
+
|
|
9505
|
+
// fallback to the default layout
|
|
9506
|
+
return this.getLayout('default');
|
|
9507
|
+
}
|
|
9459
9508
|
}
|
|
9460
9509
|
}
|
|
9461
9510
|
|
|
9462
|
-
/*
|
|
9511
|
+
/*
|
|
9512
|
+
eslint-disable
|
|
9513
|
+
lit/no-invalid-html,
|
|
9514
|
+
lit/binding-positions,
|
|
9515
|
+
max-lines,
|
|
9516
|
+
no-underscore-dangle,
|
|
9517
|
+
arrow-parens,
|
|
9518
|
+
no-confusing-arrow,
|
|
9519
|
+
curly,
|
|
9520
|
+
dot-location,
|
|
9521
|
+
no-inline-comments,
|
|
9522
|
+
line-comment-position,
|
|
9523
|
+
*/
|
|
9463
9524
|
|
|
9464
9525
|
|
|
9465
9526
|
/**
|
|
@@ -9518,10 +9579,11 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9518
9579
|
*/
|
|
9519
9580
|
this.validation = new AuroFormValidation();
|
|
9520
9581
|
|
|
9521
|
-
|
|
9582
|
+
/** @private */
|
|
9583
|
+
this.updateValue = this.updateValue.bind(this);
|
|
9522
9584
|
|
|
9523
9585
|
/** @private */
|
|
9524
|
-
this.
|
|
9586
|
+
this.updateValidity = this.updateValidity.bind(this);
|
|
9525
9587
|
|
|
9526
9588
|
/**
|
|
9527
9589
|
* Generate unique names for dependency components.
|
|
@@ -9548,7 +9610,12 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9548
9610
|
* @private
|
|
9549
9611
|
* @type {string}
|
|
9550
9612
|
*/
|
|
9551
|
-
this.helpTextTag = versioning.generateTag("auro-formkit-counter-helptext", helptextVersion, AuroHelpText);
|
|
9613
|
+
this.helpTextTag = versioning.generateTag("auro-formkit-counter-helptext", helptextVersion, AuroHelpText$1);
|
|
9614
|
+
|
|
9615
|
+
/**
|
|
9616
|
+
* @private
|
|
9617
|
+
*/
|
|
9618
|
+
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion$2, AuroIcon$2);
|
|
9552
9619
|
}
|
|
9553
9620
|
|
|
9554
9621
|
static get styles() {
|
|
@@ -9573,6 +9640,25 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9573
9640
|
reflect: true
|
|
9574
9641
|
},
|
|
9575
9642
|
|
|
9643
|
+
/**
|
|
9644
|
+
* The current error message to display when the component is invalid.
|
|
9645
|
+
*/
|
|
9646
|
+
error: {
|
|
9647
|
+
type: String,
|
|
9648
|
+
reflect: false
|
|
9649
|
+
},
|
|
9650
|
+
|
|
9651
|
+
/**
|
|
9652
|
+
* The current error message to display when the component is invalid.
|
|
9653
|
+
* This is set by validation and is not available to consumers.
|
|
9654
|
+
* @private
|
|
9655
|
+
*/
|
|
9656
|
+
errorMessage: {
|
|
9657
|
+
type: String,
|
|
9658
|
+
reflect: false,
|
|
9659
|
+
attribute: false
|
|
9660
|
+
},
|
|
9661
|
+
|
|
9576
9662
|
/**
|
|
9577
9663
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
9578
9664
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -9660,7 +9746,7 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9660
9746
|
* "top" | "right" | "bottom" | "left" |
|
|
9661
9747
|
* "bottom-start" | "top-start" | "top-end" |
|
|
9662
9748
|
* "right-start" | "right-end" | "bottom-end" |
|
|
9663
|
-
* "left-start" | "left-end"
|
|
9749
|
+
* "left-start" | "left-end".
|
|
9664
9750
|
* @default bottom-start
|
|
9665
9751
|
*/
|
|
9666
9752
|
placement: {
|
|
@@ -9731,54 +9817,98 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9731
9817
|
this.counters = this.querySelectorAll("auro-counter, [auro-counter]");
|
|
9732
9818
|
this.counters.forEach((counter) => {
|
|
9733
9819
|
counter.onDark = this.onDark;
|
|
9734
|
-
counter.addEventListener("input",
|
|
9820
|
+
counter.addEventListener("input", this.updateValue);
|
|
9821
|
+
counter.addEventListener("auroFormElement-validated", this.updateValidity);
|
|
9735
9822
|
});
|
|
9736
9823
|
}
|
|
9737
9824
|
|
|
9738
9825
|
/**
|
|
9739
|
-
*
|
|
9740
|
-
* @
|
|
9826
|
+
* Renders help text error messages.
|
|
9827
|
+
* @param {Array<string>} messages - The error messages to render.
|
|
9828
|
+
* @returns {TemplateResult[]} - The rendered error messages rendered in a TemplateResult.
|
|
9741
9829
|
* @private
|
|
9742
9830
|
*/
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
// Check if the dropdown is open
|
|
9746
|
-
const dropdownIsOpen = this.dropdown.isPopoverVisible;
|
|
9831
|
+
renderHelpTextErrors(messages) {
|
|
9747
9832
|
|
|
9748
|
-
//
|
|
9749
|
-
|
|
9833
|
+
// Return empty template if no messages are provided
|
|
9834
|
+
if (!messages || messages.length === 0) return u``;
|
|
9750
9835
|
|
|
9751
|
-
//
|
|
9752
|
-
|
|
9836
|
+
// Return messages as a TemplateResult
|
|
9837
|
+
return messages.map(message => u`<p>${message}</p>`);
|
|
9838
|
+
}
|
|
9753
9839
|
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9840
|
+
/**
|
|
9841
|
+
* Gets and returns an array of counters in an invalid state.
|
|
9842
|
+
* @returns {Array<HTMLElement>} - Returns an array of invalid counters.
|
|
9843
|
+
* @param {NodeList} counters - The NodeList of counter elements to check.
|
|
9844
|
+
* @private
|
|
9845
|
+
*/
|
|
9846
|
+
getInvalidCounters(counters) {
|
|
9847
|
+
return Array.from(counters).filter(counter => counter.validity && counter.validity !== 'valid');
|
|
9757
9848
|
}
|
|
9758
9849
|
|
|
9759
9850
|
/**
|
|
9760
|
-
*
|
|
9761
|
-
*
|
|
9762
|
-
*
|
|
9763
|
-
* @
|
|
9851
|
+
* Gets all valid error messages from errored counters.
|
|
9852
|
+
* @param {NodeList} invalidCounters - The NodeList of counter elements to check.
|
|
9853
|
+
* @returns {Array<string>} - Returns an array of error messages from invalid counters.
|
|
9854
|
+
* @private
|
|
9855
|
+
*/
|
|
9856
|
+
getErrorMessages(invalidCounters) {
|
|
9857
|
+
return invalidCounters
|
|
9858
|
+
.map(counter => counter.errorMessage)
|
|
9859
|
+
.filter(message => message && message.length > 0);
|
|
9860
|
+
};
|
|
9861
|
+
|
|
9862
|
+
/**
|
|
9863
|
+
* Updates the validity of the counter group based on the validity of its counters.
|
|
9864
|
+
* This method checks all counters within the group, determines if any are invalid, and updates the group's validity state and error message accordingly.
|
|
9865
|
+
* If any counter is invalid, it generates a combined error message from all invalid counters.
|
|
9764
9866
|
* @returns {void}
|
|
9765
9867
|
* @private
|
|
9766
9868
|
*/
|
|
9767
|
-
|
|
9869
|
+
updateValidity () {
|
|
9768
9870
|
|
|
9769
|
-
//
|
|
9770
|
-
if (
|
|
9771
|
-
this.dropdownFocusTrap = new FocusTrap(this.dropdown.bibContent);
|
|
9772
|
-
this.dropdownFocusTrap.focusFirstElement();
|
|
9773
|
-
return;
|
|
9774
|
-
}
|
|
9871
|
+
// We don't need to do anything if there are no counters
|
|
9872
|
+
if (!this.counters) return;
|
|
9775
9873
|
|
|
9776
|
-
//
|
|
9777
|
-
|
|
9874
|
+
// Wait for initial validation to complete before updating validity and error message
|
|
9875
|
+
// This is necessary because we need the initial validation to know when to reset the validity and error message
|
|
9876
|
+
setTimeout(() => {
|
|
9778
9877
|
|
|
9779
|
-
|
|
9780
|
-
|
|
9781
|
-
|
|
9878
|
+
// Get any invalid counters
|
|
9879
|
+
const invalidCounters = this.getInvalidCounters(this.counters);
|
|
9880
|
+
|
|
9881
|
+
// Determine if we are in an invalid state based on the presence of invalid counters
|
|
9882
|
+
const isInvalid = invalidCounters.length > 0;
|
|
9883
|
+
|
|
9884
|
+
// If we are in an invalid state
|
|
9885
|
+
if (isInvalid) {
|
|
9886
|
+
|
|
9887
|
+
// Generate the error messages
|
|
9888
|
+
const errorMessages = this.getErrorMessages(invalidCounters);
|
|
9889
|
+
|
|
9890
|
+
const errorMessage = isInvalid ? this.renderHelpTextErrors(errorMessages) : this.errorMessage;
|
|
9891
|
+
|
|
9892
|
+
// Set the validity and error message
|
|
9893
|
+
// This needs to allow for the initial validation to come through
|
|
9894
|
+
this.validity =
|
|
9895
|
+
invalidCounters[0].validity || // The first invalid counter's validity
|
|
9896
|
+
this.validity || // incoming validity from validation
|
|
9897
|
+
undefined; // fallback
|
|
9898
|
+
|
|
9899
|
+
this.errorMessage =
|
|
9900
|
+
errorMessage || // our message
|
|
9901
|
+
this.errorMessage || // incoming message from validation
|
|
9902
|
+
undefined; // fallback
|
|
9903
|
+
}
|
|
9904
|
+
|
|
9905
|
+
if (!isInvalid && this.validity !== 'valid') {
|
|
9906
|
+
|
|
9907
|
+
// If there are no invalid counters, reset validity and error message
|
|
9908
|
+
this.validity = 'valid';
|
|
9909
|
+
this.errorMessage = undefined;
|
|
9910
|
+
}
|
|
9911
|
+
});
|
|
9782
9912
|
}
|
|
9783
9913
|
|
|
9784
9914
|
/**
|
|
@@ -9791,14 +9921,13 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9791
9921
|
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
9792
9922
|
this.dropdown.requestUpdate();
|
|
9793
9923
|
|
|
9794
|
-
this.dropdown.addEventListener("auroDropdown-toggled", this.handleDropdownToggle);
|
|
9795
|
-
|
|
9796
9924
|
const counterWrapper = this.shadowRoot.querySelector('auro-counter-wrapper');
|
|
9797
9925
|
const counterSlot = counterWrapper.querySelector('slot');
|
|
9798
9926
|
this.counters = counterSlot.assignedElements().filter(el => el.tagName.toLowerCase() === 'auro-counter' || el.hasAttribute('auro-counter'));
|
|
9799
9927
|
|
|
9800
9928
|
this.counters.forEach((counter) => {
|
|
9801
|
-
counter.addEventListener("input",
|
|
9929
|
+
counter.addEventListener("input", this.updateValue);
|
|
9930
|
+
counter.addEventListener("auroFormElement-validated", this.updateValidity);
|
|
9802
9931
|
});
|
|
9803
9932
|
|
|
9804
9933
|
if (this.isDropdown) {
|
|
@@ -9938,13 +10067,6 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9938
10067
|
this.updateValueText();
|
|
9939
10068
|
}
|
|
9940
10069
|
|
|
9941
|
-
disconnectedCallback() {
|
|
9942
|
-
super.disconnectedCallback();
|
|
9943
|
-
|
|
9944
|
-
// Remove the event listener for dropdown toggling
|
|
9945
|
-
this.removeEventListener("auroDropdown-toggled", this.handleDropdownToggle);
|
|
9946
|
-
}
|
|
9947
|
-
|
|
9948
10070
|
/**
|
|
9949
10071
|
* Registers the custom element with the browser.
|
|
9950
10072
|
* @param {string} [name="auro-counter-group"] - Custom element name to register.
|
|
@@ -9955,6 +10077,57 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9955
10077
|
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterGroup);
|
|
9956
10078
|
}
|
|
9957
10079
|
|
|
10080
|
+
/**
|
|
10081
|
+
* Returns HTML for the help text and error message.
|
|
10082
|
+
* @private
|
|
10083
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
10084
|
+
*/
|
|
10085
|
+
renderHelpText() {
|
|
10086
|
+
return !this.validity || this.validity === undefined || this.validity === 'valid'
|
|
10087
|
+
? u`
|
|
10088
|
+
<div slot="helpText">
|
|
10089
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
10090
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
10091
|
+
<slot name="helpText"></slot>
|
|
10092
|
+
</p>
|
|
10093
|
+
</${this.helpTextTag}>
|
|
10094
|
+
</div>
|
|
10095
|
+
`
|
|
10096
|
+
: u`
|
|
10097
|
+
<div slot="helpText">
|
|
10098
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
10099
|
+
<p id="${this.uniqueId}" part="helpText" role="alert" aria-live="assertive">
|
|
10100
|
+
${this.error || this.errorMessage}
|
|
10101
|
+
</p>
|
|
10102
|
+
</${this.helpTextTag}>
|
|
10103
|
+
</div>
|
|
10104
|
+
`;
|
|
10105
|
+
}
|
|
10106
|
+
|
|
10107
|
+
/**
|
|
10108
|
+
* Returns HTML for the validation error icon.
|
|
10109
|
+
* @private
|
|
10110
|
+
* @returns {html} - Returns HTML for the validation error icon.
|
|
10111
|
+
*/
|
|
10112
|
+
renderValidationErrorIcon() {
|
|
10113
|
+
|
|
10114
|
+
// Don't render in valid state
|
|
10115
|
+
if (!this.validity || this.validity === 'valid') return undefined;
|
|
10116
|
+
|
|
10117
|
+
return u`
|
|
10118
|
+
${this.validity && this.validity !== 'valid' ? u`
|
|
10119
|
+
<div class="notification alertNotification">
|
|
10120
|
+
<${this.iconTag}
|
|
10121
|
+
category="alert"
|
|
10122
|
+
name="error-stroke"
|
|
10123
|
+
variant="statusError"
|
|
10124
|
+
?ondark="${this.onDark}">
|
|
10125
|
+
</${this.iconTag}>
|
|
10126
|
+
</div>
|
|
10127
|
+
` : undefined}
|
|
10128
|
+
`;
|
|
10129
|
+
}
|
|
10130
|
+
|
|
9958
10131
|
/**
|
|
9959
10132
|
* Render the dropdown structure for the counter group.
|
|
9960
10133
|
* @returns {TemplateResult} The dropdown template.
|
|
@@ -9964,7 +10137,7 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9964
10137
|
return u`
|
|
9965
10138
|
<${this.dropdownTag}
|
|
9966
10139
|
noHideOnThisFocusLoss
|
|
9967
|
-
chevron
|
|
10140
|
+
chevron
|
|
9968
10141
|
part="dropdown"
|
|
9969
10142
|
?autoPlacement="${this.autoPlacement}"
|
|
9970
10143
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
@@ -10011,28 +10184,13 @@ class AuroCounterGroup extends AuroElement {
|
|
|
10011
10184
|
${this.counters && Array.from(this.counters).map((counter, index) => u`${counter.value} ${counter.defaultSlot}${index !== this.counters.length - 1 ? ', ' : ''}`)}
|
|
10012
10185
|
</slot>
|
|
10013
10186
|
</div>
|
|
10014
|
-
<div class="accents right"
|
|
10187
|
+
<div class="accents right">
|
|
10188
|
+
${this.renderValidationErrorIcon()}
|
|
10189
|
+
</div>
|
|
10015
10190
|
</div>
|
|
10016
10191
|
`;
|
|
10017
10192
|
};
|
|
10018
10193
|
|
|
10019
|
-
/**
|
|
10020
|
-
* Render the help text for the counter group.
|
|
10021
|
-
* @returns {TemplateResult} The help text template.
|
|
10022
|
-
* @private
|
|
10023
|
-
*/
|
|
10024
|
-
renderHelpText() {
|
|
10025
|
-
return u`
|
|
10026
|
-
<div slot="helpText">
|
|
10027
|
-
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
10028
|
-
<p id="${this.uniqueId}" part="helpText">
|
|
10029
|
-
<slot name="helpText"></slot>
|
|
10030
|
-
</p>
|
|
10031
|
-
</${this.helpTextTag}>
|
|
10032
|
-
</div>
|
|
10033
|
-
`;
|
|
10034
|
-
}
|
|
10035
|
-
|
|
10036
10194
|
/**
|
|
10037
10195
|
* Render the dropdown bib template for the dropdown.
|
|
10038
10196
|
* @returns {TemplateResult} The bib template.
|