@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
|
@@ -584,9 +584,9 @@ let AuroLibraryRuntimeUtils$8 = class AuroLibraryRuntimeUtils {
|
|
|
584
584
|
}
|
|
585
585
|
};
|
|
586
586
|
|
|
587
|
-
var styleCss$
|
|
587
|
+
var styleCss$b = css`: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}`;
|
|
588
588
|
|
|
589
|
-
var colorCss$9 = css`[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)}`;
|
|
589
|
+
var colorCss$a = css`[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)}`;
|
|
590
590
|
|
|
591
591
|
var tokensCss$7 = css`: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}`;
|
|
592
592
|
|
|
@@ -662,9 +662,9 @@ let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
|
662
662
|
}
|
|
663
663
|
};
|
|
664
664
|
|
|
665
|
-
var styleCss$
|
|
665
|
+
var styleCss$a = css`: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}}`;
|
|
666
666
|
|
|
667
|
-
var colorCss$
|
|
667
|
+
var colorCss$9 = css`: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}`;
|
|
668
668
|
|
|
669
669
|
var tokensCss$6 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
670
670
|
|
|
@@ -742,8 +742,8 @@ let AuroLoader$1 = class AuroLoader extends LitElement {
|
|
|
742
742
|
|
|
743
743
|
static get styles() {
|
|
744
744
|
return [
|
|
745
|
-
css`${styleCss$
|
|
746
|
-
css`${colorCss$
|
|
745
|
+
css`${styleCss$a}`,
|
|
746
|
+
css`${colorCss$9}`,
|
|
747
747
|
css`${tokensCss$6}`
|
|
748
748
|
];
|
|
749
749
|
}
|
|
@@ -896,8 +896,8 @@ let AuroButton$1 = class AuroButton extends AuroElement$5 {
|
|
|
896
896
|
static get styles() {
|
|
897
897
|
return [
|
|
898
898
|
tokensCss$7,
|
|
899
|
-
styleCss$
|
|
900
|
-
colorCss$
|
|
899
|
+
styleCss$b,
|
|
900
|
+
colorCss$a,
|
|
901
901
|
shapeSize$1
|
|
902
902
|
];
|
|
903
903
|
}
|
|
@@ -1268,7 +1268,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
1268
1268
|
return _fetchMap$2.get(uri);
|
|
1269
1269
|
};
|
|
1270
1270
|
|
|
1271
|
-
var styleCss$
|
|
1271
|
+
var styleCss$9 = css`: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}`;
|
|
1272
1272
|
|
|
1273
1273
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1274
1274
|
// See LICENSE in the project root for license information.
|
|
@@ -1311,7 +1311,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$4 {
|
|
|
1311
1311
|
|
|
1312
1312
|
static get styles() {
|
|
1313
1313
|
return css`
|
|
1314
|
-
${styleCss$
|
|
1314
|
+
${styleCss$9}
|
|
1315
1315
|
`;
|
|
1316
1316
|
}
|
|
1317
1317
|
|
|
@@ -1354,7 +1354,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$4 {
|
|
|
1354
1354
|
|
|
1355
1355
|
var tokensCss$5 = css`: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)}`;
|
|
1356
1356
|
|
|
1357
|
-
var colorCss$
|
|
1357
|
+
var colorCss$8 = css`: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)}`;
|
|
1358
1358
|
|
|
1359
1359
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1360
1360
|
// See LICENSE in the project root for license information.
|
|
@@ -1513,8 +1513,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1513
1513
|
return [
|
|
1514
1514
|
super.styles,
|
|
1515
1515
|
css`${tokensCss$5}`,
|
|
1516
|
-
css`${styleCss$
|
|
1517
|
-
css`${colorCss$
|
|
1516
|
+
css`${styleCss$9}`,
|
|
1517
|
+
css`${colorCss$8}`
|
|
1518
1518
|
];
|
|
1519
1519
|
}
|
|
1520
1520
|
|
|
@@ -2075,19 +2075,19 @@ class AuroFormValidation {
|
|
|
2075
2075
|
{
|
|
2076
2076
|
check: (e) => e.value?.length > 0 && e.value?.length < e.minLength,
|
|
2077
2077
|
validity: 'tooShort',
|
|
2078
|
-
message: e => e.setCustomValidityTooShort || e.setCustomValidity || ''
|
|
2078
|
+
message: e => e.getAttribute('setCustomValidityTooShort') || e.setCustomValidity || ''
|
|
2079
2079
|
},
|
|
2080
2080
|
{
|
|
2081
2081
|
check: (e) => e.value?.length > e.maxLength,
|
|
2082
2082
|
validity: 'tooLong',
|
|
2083
|
-
message: e => e.setCustomValidityTooLong || e.setCustomValidity || ''
|
|
2083
|
+
message: e => e.getAttribute('setCustomValidityTooLong') || e.setCustomValidity || ''
|
|
2084
2084
|
}
|
|
2085
2085
|
],
|
|
2086
2086
|
pattern: [
|
|
2087
2087
|
{
|
|
2088
2088
|
check: (e) => e.pattern && !new RegExp(`^${e.pattern}$`, 'u').test(e.value),
|
|
2089
2089
|
validity: 'patternMismatch',
|
|
2090
|
-
message: e => e.setCustomValidityPatternMismatch || e.setCustomValidity || ''
|
|
2090
|
+
message: e => e.getAttribute('setCustomValidityPatternMismatch') || e.setCustomValidity || ''
|
|
2091
2091
|
}
|
|
2092
2092
|
]
|
|
2093
2093
|
},
|
|
@@ -2282,10 +2282,10 @@ class AuroFormValidation {
|
|
|
2282
2282
|
if (!hasValue && elem.required && elem.touched) {
|
|
2283
2283
|
elem.validity = 'valueMissing';
|
|
2284
2284
|
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
2285
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
2285
|
+
} else if (hasValue && this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
2286
2286
|
this.validateType(elem);
|
|
2287
2287
|
this.validateElementAttributes(elem);
|
|
2288
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group')) {
|
|
2288
|
+
} else if (hasValue && (this.runtimeUtils.elementMatch(elem, 'auro-counter') || this.runtimeUtils.elementMatch(elem, 'auro-counter-group'))) {
|
|
2289
2289
|
this.validateElementAttributes(elem);
|
|
2290
2290
|
}
|
|
2291
2291
|
}
|
|
@@ -2403,9 +2403,217 @@ var plusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width"
|
|
|
2403
2403
|
|
|
2404
2404
|
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>"};
|
|
2405
2405
|
|
|
2406
|
-
var colorCss$
|
|
2406
|
+
var colorCss$7 = css`.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)}`;
|
|
2407
|
+
|
|
2408
|
+
var styleCss$8 = css`.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}`;
|
|
2409
|
+
|
|
2410
|
+
var colorCss$6 = css`: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)}`;
|
|
2411
|
+
|
|
2412
|
+
var styleCss$7 = css`: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}`;
|
|
2413
|
+
|
|
2414
|
+
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
2415
|
+
|
|
2416
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2417
|
+
// See LICENSE in the project root for license information.
|
|
2418
|
+
|
|
2419
|
+
// ---------------------------------------------------------------------
|
|
2420
|
+
|
|
2421
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
2422
|
+
|
|
2423
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
2424
|
+
|
|
2425
|
+
/* eslint-disable jsdoc/require-param */
|
|
2426
|
+
|
|
2427
|
+
/**
|
|
2428
|
+
* This will register a new custom element with the browser.
|
|
2429
|
+
* @param {String} name - The name of the custom element.
|
|
2430
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
2431
|
+
* @returns {void}
|
|
2432
|
+
*/
|
|
2433
|
+
registerComponent(name, componentClass) {
|
|
2434
|
+
if (!customElements.get(name)) {
|
|
2435
|
+
customElements.define(name, class extends componentClass {});
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
/**
|
|
2440
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
2441
|
+
* @returns {void}
|
|
2442
|
+
*/
|
|
2443
|
+
closestElement(
|
|
2444
|
+
selector, // selector like in .closest()
|
|
2445
|
+
base = this, // extra functionality to skip a parent
|
|
2446
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
2447
|
+
!el || el === document || el === window
|
|
2448
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
2449
|
+
: found
|
|
2450
|
+
? found // found a selector INside this element
|
|
2451
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
2452
|
+
) {
|
|
2453
|
+
return __Closest(base);
|
|
2454
|
+
}
|
|
2455
|
+
/* eslint-enable jsdoc/require-param */
|
|
2456
|
+
|
|
2457
|
+
/**
|
|
2458
|
+
* 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.
|
|
2459
|
+
* @param {Object} elem - The element to check.
|
|
2460
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
2461
|
+
* @returns {void}
|
|
2462
|
+
*/
|
|
2463
|
+
handleComponentTagRename(elem, tagName) {
|
|
2464
|
+
const tag = tagName.toLowerCase();
|
|
2465
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2466
|
+
|
|
2467
|
+
if (elemTag !== tag) {
|
|
2468
|
+
elem.setAttribute(tag, true);
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
/**
|
|
2473
|
+
* Validates if an element is a specific Auro component.
|
|
2474
|
+
* @param {Object} elem - The element to validate.
|
|
2475
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
2476
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
2477
|
+
*/
|
|
2478
|
+
elementMatch(elem, tagName) {
|
|
2479
|
+
const tag = tagName.toLowerCase();
|
|
2480
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2481
|
+
|
|
2482
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
2483
|
+
}
|
|
2484
|
+
};
|
|
2485
|
+
|
|
2486
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2487
|
+
// See LICENSE in the project root for license information.
|
|
2488
|
+
|
|
2489
|
+
|
|
2490
|
+
/**
|
|
2491
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
2492
|
+
*
|
|
2493
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
2494
|
+
*/
|
|
2495
|
+
let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
2496
|
+
|
|
2497
|
+
constructor() {
|
|
2498
|
+
super();
|
|
2499
|
+
|
|
2500
|
+
this.error = false;
|
|
2501
|
+
this.onDark = false;
|
|
2502
|
+
this.hasTextContent = false;
|
|
2503
|
+
|
|
2504
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
static get styles() {
|
|
2508
|
+
return [
|
|
2509
|
+
colorCss$6,
|
|
2510
|
+
styleCss$7,
|
|
2511
|
+
tokensCss$4
|
|
2512
|
+
];
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
// function to define props used within the scope of this component
|
|
2516
|
+
static get properties() {
|
|
2517
|
+
return {
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* @private
|
|
2521
|
+
*/
|
|
2522
|
+
slotNodes: {
|
|
2523
|
+
type: Boolean,
|
|
2524
|
+
},
|
|
2525
|
+
|
|
2526
|
+
/**
|
|
2527
|
+
* @private
|
|
2528
|
+
*/
|
|
2529
|
+
hasTextContent: {
|
|
2530
|
+
type: Boolean,
|
|
2531
|
+
},
|
|
2532
|
+
|
|
2533
|
+
/**
|
|
2534
|
+
* If declared, make font color red.
|
|
2535
|
+
*/
|
|
2536
|
+
error: {
|
|
2537
|
+
type: Boolean,
|
|
2538
|
+
reflect: true,
|
|
2539
|
+
},
|
|
2540
|
+
|
|
2541
|
+
/**
|
|
2542
|
+
* If declared, will apply onDark styles.
|
|
2543
|
+
*/
|
|
2544
|
+
onDark: {
|
|
2545
|
+
type: Boolean,
|
|
2546
|
+
reflect: true
|
|
2547
|
+
}
|
|
2548
|
+
};
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* This will register this element with the browser.
|
|
2553
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
2554
|
+
*
|
|
2555
|
+
* @example
|
|
2556
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
2557
|
+
*
|
|
2558
|
+
*/
|
|
2559
|
+
static register(name = "auro-helptext") {
|
|
2560
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
updated() {
|
|
2564
|
+
this.handleSlotChange();
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
handleSlotChange(event) {
|
|
2568
|
+
if (event) {
|
|
2569
|
+
this.slotNodes = event.target.assignedNodes();
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
/**
|
|
2576
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
2577
|
+
*
|
|
2578
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
2579
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
2580
|
+
* @private
|
|
2581
|
+
*/
|
|
2582
|
+
checkSlotsForContent(nodes) {
|
|
2583
|
+
if (!nodes) {
|
|
2584
|
+
return false;
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
return nodes.some((node) => {
|
|
2588
|
+
if (node.textContent.trim()) {
|
|
2589
|
+
return true;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
if (!node.querySelector) {
|
|
2593
|
+
return false;
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
2597
|
+
if (!nestedSlot) {
|
|
2598
|
+
return false;
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
2602
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
2603
|
+
});
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
2607
|
+
render() {
|
|
2608
|
+
return html`
|
|
2609
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
2610
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
2611
|
+
</div>
|
|
2612
|
+
`;
|
|
2613
|
+
}
|
|
2614
|
+
};
|
|
2407
2615
|
|
|
2408
|
-
var
|
|
2616
|
+
var helptextVersion = '1.0.0';
|
|
2409
2617
|
|
|
2410
2618
|
/* eslint-disable lit/binding-positions, lit/no-invalid-html, max-lines */
|
|
2411
2619
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -2455,6 +2663,11 @@ class AuroCounter extends LitElement {
|
|
|
2455
2663
|
*/
|
|
2456
2664
|
this.iconTag = versioning.generateTag("auro-formkit-counter-icon", iconVersion$2, AuroIcon$2);
|
|
2457
2665
|
|
|
2666
|
+
/**
|
|
2667
|
+
* @private
|
|
2668
|
+
*/
|
|
2669
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helptextVersion, AuroHelpText$1);
|
|
2670
|
+
|
|
2458
2671
|
/**
|
|
2459
2672
|
* @private
|
|
2460
2673
|
* @property {boolean} delegatesFocus - Whether the shadow root delegates focus.
|
|
@@ -2515,6 +2728,15 @@ class AuroCounter extends LitElement {
|
|
|
2515
2728
|
type: Boolean,
|
|
2516
2729
|
},
|
|
2517
2730
|
|
|
2731
|
+
/**
|
|
2732
|
+
* Error state and message.
|
|
2733
|
+
* True if set, value is the error message.
|
|
2734
|
+
*/
|
|
2735
|
+
error: {
|
|
2736
|
+
type: String,
|
|
2737
|
+
reflect: false,
|
|
2738
|
+
},
|
|
2739
|
+
|
|
2518
2740
|
/**
|
|
2519
2741
|
* The maximum value for the counter.
|
|
2520
2742
|
*/
|
|
@@ -2569,8 +2791,8 @@ class AuroCounter extends LitElement {
|
|
|
2569
2791
|
static get styles() {
|
|
2570
2792
|
return [
|
|
2571
2793
|
tokens,
|
|
2572
|
-
colorCss$
|
|
2573
|
-
styleCss$
|
|
2794
|
+
colorCss$7,
|
|
2795
|
+
styleCss$8
|
|
2574
2796
|
];
|
|
2575
2797
|
}
|
|
2576
2798
|
|
|
@@ -2711,56 +2933,85 @@ class AuroCounter extends LitElement {
|
|
|
2711
2933
|
}
|
|
2712
2934
|
}
|
|
2713
2935
|
|
|
2714
|
-
|
|
2936
|
+
/**
|
|
2937
|
+
* Returns HTML for the help text and error message.
|
|
2938
|
+
* @private
|
|
2939
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
2940
|
+
*/
|
|
2941
|
+
renderHelpText() {
|
|
2715
2942
|
return html$1`
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
.tabindex="${'-1'}"
|
|
2735
|
-
part="controlMinus"
|
|
2736
|
-
@click="${() => this.decrement()}"
|
|
2737
|
-
?onDark="${this.onDark}"
|
|
2738
|
-
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
2739
|
-
>
|
|
2740
|
-
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
2741
|
-
</auro-counter-button>
|
|
2943
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
2944
|
+
? html$1`
|
|
2945
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
2946
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
2947
|
+
<slot name="helptext"></slot>
|
|
2948
|
+
</p>
|
|
2949
|
+
</${this.helpTextTag}>
|
|
2950
|
+
`
|
|
2951
|
+
: html$1`
|
|
2952
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
2953
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
2954
|
+
${this.errorMessage}
|
|
2955
|
+
</p>
|
|
2956
|
+
</${this.helpTextTag}>
|
|
2957
|
+
`
|
|
2958
|
+
}
|
|
2959
|
+
`;
|
|
2960
|
+
}
|
|
2742
2961
|
|
|
2743
|
-
|
|
2744
|
-
|
|
2962
|
+
render() {
|
|
2963
|
+
return html$1`
|
|
2964
|
+
<div class="counterWrapper">
|
|
2965
|
+
<div class="counter">
|
|
2966
|
+
<div class="content" >
|
|
2967
|
+
<label id="counter-label" class="label"><slot @slotchange="${this.onDefaultSlotChange}" ></slot></label>
|
|
2968
|
+
<slot id="counter-description" name="description"></slot>
|
|
2745
2969
|
</div>
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
aria-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2970
|
+
<div
|
|
2971
|
+
part="counterControl"
|
|
2972
|
+
aria-labelledby="counter-label"
|
|
2973
|
+
aria-describedby="counter-description"
|
|
2974
|
+
tabindex="${this.disabled ? '-1' : '0'}"
|
|
2975
|
+
role="spinbutton"
|
|
2976
|
+
aria-valuemin="${this.min}"
|
|
2977
|
+
aria-valuemax="${this.max}"
|
|
2978
|
+
aria-valuenow="${this.value}"
|
|
2979
|
+
aria-valuetext="${this.value !== undefined ? this.value : this.min}"
|
|
2754
2980
|
>
|
|
2755
|
-
|
|
2756
|
-
|
|
2981
|
+
<auro-counter-button
|
|
2982
|
+
aria-hidden="true"
|
|
2983
|
+
.tabindex="${'-1'}"
|
|
2984
|
+
part="controlMinus"
|
|
2985
|
+
@click="${() => this.decrement()}"
|
|
2986
|
+
?onDark="${this.onDark}"
|
|
2987
|
+
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
2988
|
+
>
|
|
2989
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
2990
|
+
</auro-counter-button>
|
|
2991
|
+
|
|
2992
|
+
<div class="quantityWrapper">
|
|
2993
|
+
<div class="quantity">${this.value !== undefined ? this.value : this.min}</div>
|
|
2994
|
+
</div>
|
|
2995
|
+
|
|
2996
|
+
<auro-counter-button
|
|
2997
|
+
aria-hidden="true"
|
|
2998
|
+
.tabindex="${'-1'}"
|
|
2999
|
+
part="controlPlus"
|
|
3000
|
+
@click="${() => this.increment()}"
|
|
3001
|
+
?onDark="${this.onDark}"
|
|
3002
|
+
?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
|
|
3003
|
+
>
|
|
3004
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(plusIcon)} </${this.iconTag}>
|
|
3005
|
+
</auro-counter-button>
|
|
3006
|
+
</div>
|
|
2757
3007
|
</div>
|
|
3008
|
+
${this.renderHelpText()}
|
|
2758
3009
|
</div>
|
|
2759
3010
|
`;
|
|
2760
3011
|
}
|
|
2761
3012
|
}
|
|
2762
3013
|
|
|
2763
|
-
var counterGroupStyles = css`:host(:not([layout=classic])) .triggerContent{padding:0
|
|
3014
|
+
var counterGroupStyles = css`: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}`;
|
|
2764
3015
|
|
|
2765
3016
|
var shapeSizeCss$1 = css`.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}`;
|
|
2766
3017
|
|
|
@@ -5002,290 +5253,389 @@ class AuroFloatingUI {
|
|
|
5002
5253
|
}
|
|
5003
5254
|
}
|
|
5004
5255
|
|
|
5005
|
-
//
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5256
|
+
// Selectors for focusable elements
|
|
5257
|
+
const FOCUSABLE_SELECTORS = [
|
|
5258
|
+
'a[href]',
|
|
5259
|
+
'button:not([disabled])',
|
|
5260
|
+
'textarea:not([disabled])',
|
|
5261
|
+
'input:not([disabled])',
|
|
5262
|
+
'select:not([disabled])',
|
|
5263
|
+
'[role="tab"]:not([disabled])',
|
|
5264
|
+
'[role="link"]:not([disabled])',
|
|
5265
|
+
'[role="button"]:not([disabled])',
|
|
5266
|
+
'[tabindex]:not([tabindex="-1"])',
|
|
5267
|
+
'[contenteditable]:not([contenteditable="false"])'
|
|
5268
|
+
];
|
|
5010
5269
|
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5270
|
+
// List of custom components that are known to be focusable
|
|
5271
|
+
const FOCUSABLE_COMPONENTS = [
|
|
5272
|
+
'auro-checkbox',
|
|
5273
|
+
'auro-radio',
|
|
5274
|
+
'auro-dropdown',
|
|
5275
|
+
'auro-button',
|
|
5276
|
+
'auro-combobox',
|
|
5277
|
+
'auro-input',
|
|
5278
|
+
'auro-counter',
|
|
5279
|
+
'auro-menu',
|
|
5280
|
+
'auro-select',
|
|
5281
|
+
'auro-datepicker',
|
|
5282
|
+
'auro-hyperlink',
|
|
5283
|
+
'auro-accordion',
|
|
5284
|
+
];
|
|
5026
5285
|
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5286
|
+
/**
|
|
5287
|
+
* Determines if a given element is a custom focusable component.
|
|
5288
|
+
* Returns true if the element matches a known focusable component and is not disabled.
|
|
5289
|
+
*
|
|
5290
|
+
* @param {HTMLElement} element The element to check for focusability.
|
|
5291
|
+
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
5292
|
+
*/
|
|
5293
|
+
function isFocusableComponent(element) {
|
|
5294
|
+
const componentName = element.tagName.toLowerCase();
|
|
5036
5295
|
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
}
|
|
5296
|
+
// Guard Clause: Element is a focusable component
|
|
5297
|
+
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
5040
5298
|
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
};
|
|
5299
|
+
// Guard Clause: Element is not disabled
|
|
5300
|
+
if (element.hasAttribute('disabled')) return false;
|
|
5044
5301
|
|
|
5045
|
-
//
|
|
5046
|
-
|
|
5302
|
+
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
5303
|
+
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
5047
5304
|
|
|
5305
|
+
// If all guard clauses pass, the element is a focusable component
|
|
5306
|
+
return true;
|
|
5307
|
+
}
|
|
5048
5308
|
|
|
5049
5309
|
/**
|
|
5050
|
-
*
|
|
5051
|
-
*
|
|
5052
|
-
*
|
|
5310
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
5311
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
5312
|
+
*
|
|
5313
|
+
* @param {HTMLElement} container The container to search within
|
|
5314
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
5053
5315
|
*/
|
|
5316
|
+
function getFocusableElements(container) {
|
|
5317
|
+
// Get elements in DOM order by walking the tree
|
|
5318
|
+
const orderedFocusableElements = [];
|
|
5054
5319
|
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
reflect: true },
|
|
5062
|
-
hiddenVisually: { type: Boolean,
|
|
5063
|
-
reflect: true },
|
|
5064
|
-
hiddenAudible: { type: Boolean,
|
|
5065
|
-
reflect: true },
|
|
5066
|
-
};
|
|
5067
|
-
}
|
|
5320
|
+
// Define a recursive function to collect focusable elements in DOM order
|
|
5321
|
+
const collectFocusableElements = (root) => {
|
|
5322
|
+
// Check if current element is focusable
|
|
5323
|
+
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
5324
|
+
// Check if this is a custom component that is focusable
|
|
5325
|
+
const isComponentFocusable = isFocusableComponent(root);
|
|
5068
5326
|
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
return 'true'
|
|
5075
|
-
}
|
|
5327
|
+
if (isComponentFocusable) {
|
|
5328
|
+
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
5329
|
+
orderedFocusableElements.push(root);
|
|
5330
|
+
return; // Skip traversing inside this component
|
|
5331
|
+
}
|
|
5076
5332
|
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5333
|
+
// Check if the element itself matches any selector
|
|
5334
|
+
for (const selector of FOCUSABLE_SELECTORS) {
|
|
5335
|
+
if (root.matches?.(selector)) {
|
|
5336
|
+
orderedFocusableElements.push(root);
|
|
5337
|
+
break; // Once we know it's focusable, no need to check other selectors
|
|
5338
|
+
}
|
|
5339
|
+
}
|
|
5080
5340
|
|
|
5081
|
-
|
|
5341
|
+
// Process shadow DOM only for non-Auro components
|
|
5342
|
+
if (root.shadowRoot) {
|
|
5343
|
+
// Process shadow DOM children in order
|
|
5344
|
+
if (root.shadowRoot.children) {
|
|
5345
|
+
Array.from(root.shadowRoot.children).forEach(child => {
|
|
5346
|
+
collectFocusableElements(child);
|
|
5347
|
+
});
|
|
5348
|
+
}
|
|
5349
|
+
}
|
|
5082
5350
|
|
|
5083
|
-
|
|
5351
|
+
// Process slots and their assigned nodes in order
|
|
5352
|
+
if (root.tagName === 'SLOT') {
|
|
5353
|
+
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
5354
|
+
for (const node of assignedNodes) {
|
|
5355
|
+
collectFocusableElements(node);
|
|
5356
|
+
}
|
|
5357
|
+
} else {
|
|
5358
|
+
// Process light DOM children in order
|
|
5359
|
+
if (root.children) {
|
|
5360
|
+
Array.from(root.children).forEach(child => {
|
|
5361
|
+
collectFocusableElements(child);
|
|
5362
|
+
});
|
|
5363
|
+
}
|
|
5364
|
+
}
|
|
5365
|
+
}
|
|
5366
|
+
};
|
|
5084
5367
|
|
|
5085
|
-
|
|
5368
|
+
// Start the traversal from the container
|
|
5369
|
+
collectFocusableElements(container);
|
|
5086
5370
|
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
* @param {Fetch.Response} response
|
|
5092
|
-
* @returns {Promise}
|
|
5093
|
-
*/
|
|
5371
|
+
// Remove duplicates that might have been collected through different paths
|
|
5372
|
+
// while preserving order
|
|
5373
|
+
const uniqueElements = [];
|
|
5374
|
+
const seen = new Set();
|
|
5094
5375
|
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
5101
|
-
* @returns {Promise}
|
|
5102
|
-
*/
|
|
5103
|
-
const cacheFetch$1 = (uri, options = {}) => {
|
|
5104
|
-
const responseParser = options.responseParser || ((response) => response.text());
|
|
5105
|
-
if (!_fetchMap$1.has(uri)) {
|
|
5106
|
-
_fetchMap$1.set(uri, fetch(uri).then(responseParser));
|
|
5376
|
+
for (const element of orderedFocusableElements) {
|
|
5377
|
+
if (!seen.has(element)) {
|
|
5378
|
+
seen.add(element);
|
|
5379
|
+
uniqueElements.push(element);
|
|
5380
|
+
}
|
|
5107
5381
|
}
|
|
5108
|
-
return _fetchMap$1.get(uri);
|
|
5109
|
-
};
|
|
5110
|
-
|
|
5111
|
-
var styleCss$2$1 = css`: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}`;
|
|
5112
|
-
|
|
5113
|
-
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5114
|
-
// See LICENSE in the project root for license information.
|
|
5115
5382
|
|
|
5383
|
+
return uniqueElements;
|
|
5384
|
+
}
|
|
5116
5385
|
|
|
5117
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5118
5386
|
/**
|
|
5119
|
-
*
|
|
5387
|
+
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
5388
|
+
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
5120
5389
|
*/
|
|
5390
|
+
class FocusTrap {
|
|
5391
|
+
/**
|
|
5392
|
+
* Creates a new FocusTrap instance for the given container element.
|
|
5393
|
+
* Initializes event listeners and prepares the container for focus management.
|
|
5394
|
+
*
|
|
5395
|
+
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
5396
|
+
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
5397
|
+
*/
|
|
5398
|
+
constructor(container) {
|
|
5399
|
+
if (!container || !(container instanceof HTMLElement)) {
|
|
5400
|
+
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
5401
|
+
}
|
|
5121
5402
|
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
constructor() {
|
|
5125
|
-
super();
|
|
5126
|
-
this.onDark = false;
|
|
5127
|
-
}
|
|
5128
|
-
|
|
5129
|
-
// function to define props used within the scope of this component
|
|
5130
|
-
static get properties() {
|
|
5131
|
-
return {
|
|
5132
|
-
...super.properties,
|
|
5133
|
-
|
|
5134
|
-
/**
|
|
5135
|
-
* Set value for on-dark version of auro-icon.
|
|
5136
|
-
*/
|
|
5137
|
-
onDark: {
|
|
5138
|
-
type: Boolean,
|
|
5139
|
-
reflect: true
|
|
5140
|
-
},
|
|
5141
|
-
|
|
5142
|
-
/**
|
|
5143
|
-
* @private
|
|
5144
|
-
*/
|
|
5145
|
-
svg: {
|
|
5146
|
-
attribute: false,
|
|
5147
|
-
reflect: true
|
|
5148
|
-
}
|
|
5149
|
-
};
|
|
5150
|
-
}
|
|
5403
|
+
this.container = container;
|
|
5404
|
+
this.tabDirection = 'forward'; // or 'backward'
|
|
5151
5405
|
|
|
5152
|
-
|
|
5153
|
-
return css`
|
|
5154
|
-
${styleCss$2$1}
|
|
5155
|
-
`;
|
|
5406
|
+
this._init();
|
|
5156
5407
|
}
|
|
5157
5408
|
|
|
5158
5409
|
/**
|
|
5159
|
-
*
|
|
5410
|
+
* Initializes the focus trap by setting up event listeners and attributes on the container.
|
|
5411
|
+
* Prepares the container for focus management, including support for shadow DOM and inert attributes.
|
|
5412
|
+
*
|
|
5160
5413
|
* @private
|
|
5161
|
-
* @param {string} category - Icon category.
|
|
5162
|
-
* @param {string} name - Icon name.
|
|
5163
|
-
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
5164
5414
|
*/
|
|
5165
|
-
|
|
5166
|
-
let iconHTML = '';
|
|
5415
|
+
_init() {
|
|
5167
5416
|
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5417
|
+
// Add inert attribute to prevent focusing programmatically as well (if supported)
|
|
5418
|
+
if ('inert' in HTMLElement.prototype) {
|
|
5419
|
+
this.container.inert = false; // Ensure the container isn't inert
|
|
5420
|
+
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
5172
5421
|
}
|
|
5173
5422
|
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
return dom.body.querySelector('svg');
|
|
5423
|
+
// Track tab direction
|
|
5424
|
+
this.container.addEventListener('keydown', this._onKeydown);
|
|
5177
5425
|
}
|
|
5178
5426
|
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5427
|
+
/**
|
|
5428
|
+
* Handles keydown events to manage tab navigation within the container.
|
|
5429
|
+
* Ensures that focus wraps around when reaching the first or last focusable element.
|
|
5430
|
+
*
|
|
5431
|
+
* @param {KeyboardEvent} e The keyboard event triggered by user interaction.
|
|
5432
|
+
* @private
|
|
5433
|
+
*/
|
|
5434
|
+
_onKeydown = (e) => {
|
|
5435
|
+
|
|
5436
|
+
if (e.key === 'Tab') {
|
|
5183
5437
|
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
} else if (!svg) {
|
|
5187
|
-
const penDOM = new DOMParser().parseFromString(error$1.svg, 'text/html');
|
|
5438
|
+
// Set the tab direction based on the key pressed
|
|
5439
|
+
this.tabDirection = e.shiftKey ? 'backward' : 'forward';
|
|
5188
5440
|
|
|
5189
|
-
|
|
5441
|
+
// Get the active element(s) in the document and shadow root
|
|
5442
|
+
// This will include the active element in the shadow DOM if it exists
|
|
5443
|
+
// Active element may be inside the shadow DOM depending on delegatesFocus, so we need to check both
|
|
5444
|
+
let activeElement = document.activeElement;
|
|
5445
|
+
const actives = [activeElement];
|
|
5446
|
+
while (activeElement?.shadowRoot?.activeElement) {
|
|
5447
|
+
actives.push(activeElement.shadowRoot.activeElement);
|
|
5448
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
|
5190
5449
|
}
|
|
5191
|
-
}
|
|
5192
|
-
}
|
|
5193
|
-
};
|
|
5194
|
-
|
|
5195
|
-
var tokensCss$2$1 = css`: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)}`;
|
|
5196
5450
|
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5200
|
-
// See LICENSE in the project root for license information.
|
|
5201
|
-
|
|
5202
|
-
// ---------------------------------------------------------------------
|
|
5451
|
+
// Update the focusable elements
|
|
5452
|
+
const focusables = this._getFocusableElements();
|
|
5203
5453
|
|
|
5204
|
-
|
|
5454
|
+
// If we're at either end of the focusable elements, wrap around to the other end
|
|
5455
|
+
const focusIndex =
|
|
5456
|
+
(actives.includes(focusables[0]) || actives.includes(this.container)) && this.tabDirection === 'backward'
|
|
5457
|
+
? focusables.length - 1
|
|
5458
|
+
: actives.includes(focusables[focusables.length - 1]) && this.tabDirection === 'forward'
|
|
5459
|
+
? 0
|
|
5460
|
+
: null;
|
|
5205
5461
|
|
|
5206
|
-
|
|
5462
|
+
if (focusIndex !== null) {
|
|
5463
|
+
focusables[focusIndex].focus();
|
|
5464
|
+
e.preventDefault(); // Prevent default tab behavior
|
|
5465
|
+
e.stopPropagation(); // Stop the event from bubbling up
|
|
5466
|
+
}
|
|
5467
|
+
}
|
|
5468
|
+
};
|
|
5207
5469
|
|
|
5208
|
-
|
|
5470
|
+
/**
|
|
5471
|
+
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
5472
|
+
* Returns a unique, ordered array of elements that can receive focus.
|
|
5473
|
+
*
|
|
5474
|
+
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
5475
|
+
* @private
|
|
5476
|
+
*/
|
|
5477
|
+
_getFocusableElements() {
|
|
5478
|
+
// Use the imported utility function to get focusable elements
|
|
5479
|
+
const elements = getFocusableElements(this.container);
|
|
5480
|
+
|
|
5481
|
+
// Filter out any elements with the 'focus-bookend' class
|
|
5482
|
+
return elements;
|
|
5483
|
+
}
|
|
5209
5484
|
|
|
5210
5485
|
/**
|
|
5211
|
-
*
|
|
5212
|
-
*
|
|
5213
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
5214
|
-
* @returns {void}
|
|
5486
|
+
* Moves focus to the first focusable element within the container.
|
|
5487
|
+
* Useful for setting initial focus when activating the focus trap.
|
|
5215
5488
|
*/
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
}
|
|
5489
|
+
focusFirstElement() {
|
|
5490
|
+
const focusables = this._getFocusableElements();
|
|
5491
|
+
if (focusables.length) focusables[0].focus();
|
|
5220
5492
|
}
|
|
5221
5493
|
|
|
5222
5494
|
/**
|
|
5223
|
-
*
|
|
5224
|
-
*
|
|
5495
|
+
* Moves focus to the last focusable element within the container.
|
|
5496
|
+
* Useful for setting focus when deactivating or cycling focus in reverse.
|
|
5225
5497
|
*/
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5230
|
-
!el || el === document || el === window
|
|
5231
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
5232
|
-
: found
|
|
5233
|
-
? found // found a selector INside this element
|
|
5234
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5235
|
-
) {
|
|
5236
|
-
return __Closest(base);
|
|
5498
|
+
focusLastElement() {
|
|
5499
|
+
const focusables = this._getFocusableElements();
|
|
5500
|
+
if (focusables.length) focusables[focusables.length - 1].focus();
|
|
5237
5501
|
}
|
|
5238
|
-
/* eslint-enable jsdoc/require-param */
|
|
5239
5502
|
|
|
5240
5503
|
/**
|
|
5241
|
-
*
|
|
5242
|
-
*
|
|
5243
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5244
|
-
* @returns {void}
|
|
5504
|
+
* Removes event listeners and attributes added by the focus trap.
|
|
5505
|
+
* Call this method to clean up when the focus trap is no longer needed.
|
|
5245
5506
|
*/
|
|
5246
|
-
|
|
5247
|
-
const tag = tagName.toLowerCase();
|
|
5248
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
5507
|
+
disconnect() {
|
|
5249
5508
|
|
|
5250
|
-
if (
|
|
5251
|
-
|
|
5509
|
+
if (this.container.hasAttribute('data-focus-trap-container')) {
|
|
5510
|
+
this.container.removeAttribute('data-focus-trap-container');
|
|
5252
5511
|
}
|
|
5512
|
+
|
|
5513
|
+
this.container.removeEventListener('keydown', this._onKeydown);
|
|
5253
5514
|
}
|
|
5515
|
+
}
|
|
5516
|
+
|
|
5517
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5518
|
+
// See LICENSE in the project root for license information.
|
|
5519
|
+
|
|
5520
|
+
|
|
5521
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
5254
5522
|
|
|
5255
5523
|
/**
|
|
5256
|
-
*
|
|
5257
|
-
* @
|
|
5258
|
-
* @param {
|
|
5259
|
-
* @
|
|
5524
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5525
|
+
* @private
|
|
5526
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5527
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5528
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5260
5529
|
*/
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
5530
|
+
generateElementName(baseName, version) {
|
|
5531
|
+
let result = baseName;
|
|
5264
5532
|
|
|
5265
|
-
|
|
5533
|
+
result += '-';
|
|
5534
|
+
result += version.replace(/[.]/g, '_');
|
|
5535
|
+
|
|
5536
|
+
return result;
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5539
|
+
/**
|
|
5540
|
+
* Generates a unique string to be used for child auro element naming.
|
|
5541
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
5542
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
5543
|
+
* @returns {string} - Unique string to be used for naming.
|
|
5544
|
+
*/
|
|
5545
|
+
generateTag(baseName, version, tagClass) {
|
|
5546
|
+
const elementName = this.generateElementName(baseName, version);
|
|
5547
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
5548
|
+
|
|
5549
|
+
if (!customElements.get(elementName)) {
|
|
5550
|
+
customElements.define(elementName, class extends tagClass {});
|
|
5551
|
+
}
|
|
5552
|
+
|
|
5553
|
+
return tag;
|
|
5266
5554
|
}
|
|
5267
5555
|
};
|
|
5268
5556
|
|
|
5269
|
-
// Copyright (c)
|
|
5557
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5270
5558
|
// See LICENSE in the project root for license information.
|
|
5271
5559
|
|
|
5272
5560
|
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5561
|
+
/**
|
|
5562
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
5563
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
5564
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
5565
|
+
*/
|
|
5276
5566
|
|
|
5277
|
-
|
|
5278
|
-
|
|
5567
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
5568
|
+
|
|
5569
|
+
// function to define props used within the scope of this component
|
|
5570
|
+
static get properties() {
|
|
5571
|
+
return {
|
|
5572
|
+
hidden: { type: Boolean,
|
|
5573
|
+
reflect: true },
|
|
5574
|
+
hiddenVisually: { type: Boolean,
|
|
5575
|
+
reflect: true },
|
|
5576
|
+
hiddenAudible: { type: Boolean,
|
|
5577
|
+
reflect: true },
|
|
5578
|
+
};
|
|
5279
5579
|
}
|
|
5280
5580
|
|
|
5281
5581
|
/**
|
|
5282
|
-
*
|
|
5283
|
-
* @private
|
|
5284
|
-
* @returns {void}
|
|
5582
|
+
* @private Function that determines state of aria-hidden
|
|
5285
5583
|
*/
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5584
|
+
hideAudible(value) {
|
|
5585
|
+
if (value) {
|
|
5586
|
+
return 'true'
|
|
5587
|
+
}
|
|
5588
|
+
|
|
5589
|
+
return 'false'
|
|
5590
|
+
}
|
|
5591
|
+
};
|
|
5592
|
+
|
|
5593
|
+
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>"};
|
|
5594
|
+
|
|
5595
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
5596
|
+
|
|
5597
|
+
const _fetchMap$1 = new Map();
|
|
5598
|
+
|
|
5599
|
+
/**
|
|
5600
|
+
* A callback to parse Response body.
|
|
5601
|
+
*
|
|
5602
|
+
* @callback ResponseParser
|
|
5603
|
+
* @param {Fetch.Response} response
|
|
5604
|
+
* @returns {Promise}
|
|
5605
|
+
*/
|
|
5606
|
+
|
|
5607
|
+
/**
|
|
5608
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
5609
|
+
*
|
|
5610
|
+
* @param {String} uri
|
|
5611
|
+
* @param {Object} [options={}]
|
|
5612
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
5613
|
+
* @returns {Promise}
|
|
5614
|
+
*/
|
|
5615
|
+
const cacheFetch$1 = (uri, options = {}) => {
|
|
5616
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
5617
|
+
if (!_fetchMap$1.has(uri)) {
|
|
5618
|
+
_fetchMap$1.set(uri, fetch(uri).then(responseParser));
|
|
5619
|
+
}
|
|
5620
|
+
return _fetchMap$1.get(uri);
|
|
5621
|
+
};
|
|
5622
|
+
|
|
5623
|
+
var styleCss$2$1 = css`: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}`;
|
|
5624
|
+
|
|
5625
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5626
|
+
// See LICENSE in the project root for license information.
|
|
5627
|
+
|
|
5628
|
+
|
|
5629
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
5630
|
+
/**
|
|
5631
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
5632
|
+
*/
|
|
5633
|
+
|
|
5634
|
+
// build the component class
|
|
5635
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
5636
|
+
constructor() {
|
|
5637
|
+
super();
|
|
5638
|
+
this.onDark = false;
|
|
5289
5639
|
}
|
|
5290
5640
|
|
|
5291
5641
|
// function to define props used within the scope of this component
|
|
@@ -5294,15 +5644,177 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5294
5644
|
...super.properties,
|
|
5295
5645
|
|
|
5296
5646
|
/**
|
|
5297
|
-
* Set
|
|
5647
|
+
* Set value for on-dark version of auro-icon.
|
|
5298
5648
|
*/
|
|
5299
|
-
|
|
5300
|
-
type:
|
|
5649
|
+
onDark: {
|
|
5650
|
+
type: Boolean,
|
|
5301
5651
|
reflect: true
|
|
5302
5652
|
},
|
|
5303
5653
|
|
|
5304
5654
|
/**
|
|
5305
|
-
*
|
|
5655
|
+
* @private
|
|
5656
|
+
*/
|
|
5657
|
+
svg: {
|
|
5658
|
+
attribute: false,
|
|
5659
|
+
reflect: true
|
|
5660
|
+
}
|
|
5661
|
+
};
|
|
5662
|
+
}
|
|
5663
|
+
|
|
5664
|
+
static get styles() {
|
|
5665
|
+
return css`
|
|
5666
|
+
${styleCss$2$1}
|
|
5667
|
+
`;
|
|
5668
|
+
}
|
|
5669
|
+
|
|
5670
|
+
/**
|
|
5671
|
+
* Async function to fetch requested icon from npm CDN.
|
|
5672
|
+
* @private
|
|
5673
|
+
* @param {string} category - Icon category.
|
|
5674
|
+
* @param {string} name - Icon name.
|
|
5675
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
5676
|
+
*/
|
|
5677
|
+
async fetchIcon(category, name) {
|
|
5678
|
+
let iconHTML = '';
|
|
5679
|
+
|
|
5680
|
+
if (category === 'logos') {
|
|
5681
|
+
iconHTML = await cacheFetch$1(`${this.uri}/${category}/${name}.svg`);
|
|
5682
|
+
} else {
|
|
5683
|
+
iconHTML = await cacheFetch$1(`${this.uri}/icons/${category}/${name}.svg`);
|
|
5684
|
+
}
|
|
5685
|
+
|
|
5686
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
5687
|
+
|
|
5688
|
+
return dom.body.querySelector('svg');
|
|
5689
|
+
}
|
|
5690
|
+
|
|
5691
|
+
// lifecycle function
|
|
5692
|
+
async firstUpdated() {
|
|
5693
|
+
if (!this.customSvg) {
|
|
5694
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
5695
|
+
|
|
5696
|
+
if (svg) {
|
|
5697
|
+
this.svg = svg;
|
|
5698
|
+
} else if (!svg) {
|
|
5699
|
+
const penDOM = new DOMParser().parseFromString(error$1.svg, 'text/html');
|
|
5700
|
+
|
|
5701
|
+
this.svg = penDOM.body.firstChild;
|
|
5702
|
+
}
|
|
5703
|
+
}
|
|
5704
|
+
}
|
|
5705
|
+
};
|
|
5706
|
+
|
|
5707
|
+
var tokensCss$2$1 = css`: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)}`;
|
|
5708
|
+
|
|
5709
|
+
var colorCss$3$1 = css`: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)}`;
|
|
5710
|
+
|
|
5711
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5712
|
+
// See LICENSE in the project root for license information.
|
|
5713
|
+
|
|
5714
|
+
// ---------------------------------------------------------------------
|
|
5715
|
+
|
|
5716
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5717
|
+
|
|
5718
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
5719
|
+
|
|
5720
|
+
/* eslint-disable jsdoc/require-param */
|
|
5721
|
+
|
|
5722
|
+
/**
|
|
5723
|
+
* This will register a new custom element with the browser.
|
|
5724
|
+
* @param {String} name - The name of the custom element.
|
|
5725
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5726
|
+
* @returns {void}
|
|
5727
|
+
*/
|
|
5728
|
+
registerComponent(name, componentClass) {
|
|
5729
|
+
if (!customElements.get(name)) {
|
|
5730
|
+
customElements.define(name, class extends componentClass {});
|
|
5731
|
+
}
|
|
5732
|
+
}
|
|
5733
|
+
|
|
5734
|
+
/**
|
|
5735
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5736
|
+
* @returns {void}
|
|
5737
|
+
*/
|
|
5738
|
+
closestElement(
|
|
5739
|
+
selector, // selector like in .closest()
|
|
5740
|
+
base = this, // extra functionality to skip a parent
|
|
5741
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5742
|
+
!el || el === document || el === window
|
|
5743
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5744
|
+
: found
|
|
5745
|
+
? found // found a selector INside this element
|
|
5746
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5747
|
+
) {
|
|
5748
|
+
return __Closest(base);
|
|
5749
|
+
}
|
|
5750
|
+
/* eslint-enable jsdoc/require-param */
|
|
5751
|
+
|
|
5752
|
+
/**
|
|
5753
|
+
* 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.
|
|
5754
|
+
* @param {Object} elem - The element to check.
|
|
5755
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5756
|
+
* @returns {void}
|
|
5757
|
+
*/
|
|
5758
|
+
handleComponentTagRename(elem, tagName) {
|
|
5759
|
+
const tag = tagName.toLowerCase();
|
|
5760
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5761
|
+
|
|
5762
|
+
if (elemTag !== tag) {
|
|
5763
|
+
elem.setAttribute(tag, true);
|
|
5764
|
+
}
|
|
5765
|
+
}
|
|
5766
|
+
|
|
5767
|
+
/**
|
|
5768
|
+
* Validates if an element is a specific Auro component.
|
|
5769
|
+
* @param {Object} elem - The element to validate.
|
|
5770
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5771
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5772
|
+
*/
|
|
5773
|
+
elementMatch(elem, tagName) {
|
|
5774
|
+
const tag = tagName.toLowerCase();
|
|
5775
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5776
|
+
|
|
5777
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5778
|
+
}
|
|
5779
|
+
};
|
|
5780
|
+
|
|
5781
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5782
|
+
// See LICENSE in the project root for license information.
|
|
5783
|
+
|
|
5784
|
+
|
|
5785
|
+
let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
5786
|
+
constructor() {
|
|
5787
|
+
super();
|
|
5788
|
+
|
|
5789
|
+
this.variant = undefined;
|
|
5790
|
+
this.privateDefaults();
|
|
5791
|
+
}
|
|
5792
|
+
|
|
5793
|
+
/**
|
|
5794
|
+
* Internal Defaults.
|
|
5795
|
+
* @private
|
|
5796
|
+
* @returns {void}
|
|
5797
|
+
*/
|
|
5798
|
+
privateDefaults() {
|
|
5799
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5800
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5801
|
+
}
|
|
5802
|
+
|
|
5803
|
+
// function to define props used within the scope of this component
|
|
5804
|
+
static get properties() {
|
|
5805
|
+
return {
|
|
5806
|
+
...super.properties,
|
|
5807
|
+
|
|
5808
|
+
/**
|
|
5809
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
5810
|
+
*/
|
|
5811
|
+
ariaHidden: {
|
|
5812
|
+
type: String,
|
|
5813
|
+
reflect: true
|
|
5814
|
+
},
|
|
5815
|
+
|
|
5816
|
+
/**
|
|
5817
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
5306
5818
|
*/
|
|
5307
5819
|
category: {
|
|
5308
5820
|
type: String,
|
|
@@ -5439,7 +5951,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5439
5951
|
|
|
5440
5952
|
var iconVersion$1 = '6.1.2';
|
|
5441
5953
|
|
|
5442
|
-
var styleCss$1$
|
|
5954
|
+
var styleCss$1$1 = css`: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}`;
|
|
5443
5955
|
|
|
5444
5956
|
var colorCss$2$1 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
5445
5957
|
|
|
@@ -5481,7 +5993,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
5481
5993
|
|
|
5482
5994
|
static get styles() {
|
|
5483
5995
|
return [
|
|
5484
|
-
styleCss$1$
|
|
5996
|
+
styleCss$1$1,
|
|
5485
5997
|
colorCss$2$1,
|
|
5486
5998
|
tokensCss$1$1
|
|
5487
5999
|
];
|
|
@@ -5640,11 +6152,11 @@ var dropdownVersion$1 = '3.0.0';
|
|
|
5640
6152
|
|
|
5641
6153
|
var shapeSizeCss = css`.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}`;
|
|
5642
6154
|
|
|
5643
|
-
var colorCss$1$
|
|
6155
|
+
var colorCss$1$1 = css`: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)}`;
|
|
5644
6156
|
|
|
5645
6157
|
var classicColorCss = css``;
|
|
5646
6158
|
|
|
5647
|
-
var classicLayoutCss = css`: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([
|
|
6159
|
+
var classicLayoutCss = css`: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%}`;
|
|
5648
6160
|
|
|
5649
6161
|
var styleEmphasizedCss = css`: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)}`;
|
|
5650
6162
|
|
|
@@ -5652,9 +6164,9 @@ var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex:1;fle
|
|
|
5652
6164
|
|
|
5653
6165
|
var colorCss$5 = css`: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)}`;
|
|
5654
6166
|
|
|
5655
|
-
var styleCss$6 = css
|
|
6167
|
+
var styleCss$6 = css`: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}`;
|
|
5656
6168
|
|
|
5657
|
-
var tokensCss$
|
|
6169
|
+
var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5658
6170
|
|
|
5659
6171
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5660
6172
|
// See LICENSE in the project root for license information.
|
|
@@ -5663,7 +6175,7 @@ var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
5663
6175
|
|
|
5664
6176
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5665
6177
|
|
|
5666
|
-
let AuroLibraryRuntimeUtils$
|
|
6178
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
5667
6179
|
|
|
5668
6180
|
/* eslint-disable jsdoc/require-param */
|
|
5669
6181
|
|
|
@@ -5735,7 +6247,7 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
5735
6247
|
*
|
|
5736
6248
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
5737
6249
|
*/
|
|
5738
|
-
|
|
6250
|
+
class AuroHelpText extends LitElement {
|
|
5739
6251
|
|
|
5740
6252
|
constructor() {
|
|
5741
6253
|
super();
|
|
@@ -5744,14 +6256,14 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
5744
6256
|
this.onDark = false;
|
|
5745
6257
|
this.hasTextContent = false;
|
|
5746
6258
|
|
|
5747
|
-
AuroLibraryRuntimeUtils$
|
|
6259
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
5748
6260
|
}
|
|
5749
6261
|
|
|
5750
6262
|
static get styles() {
|
|
5751
6263
|
return [
|
|
5752
6264
|
colorCss$5,
|
|
5753
6265
|
styleCss$6,
|
|
5754
|
-
tokensCss$
|
|
6266
|
+
tokensCss$3
|
|
5755
6267
|
];
|
|
5756
6268
|
}
|
|
5757
6269
|
|
|
@@ -5800,7 +6312,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
5800
6312
|
*
|
|
5801
6313
|
*/
|
|
5802
6314
|
static register(name = "auro-helptext") {
|
|
5803
|
-
AuroLibraryRuntimeUtils$
|
|
6315
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
5804
6316
|
}
|
|
5805
6317
|
|
|
5806
6318
|
updated() {
|
|
@@ -5854,7 +6366,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
5854
6366
|
</div>
|
|
5855
6367
|
`;
|
|
5856
6368
|
}
|
|
5857
|
-
}
|
|
6369
|
+
}
|
|
5858
6370
|
|
|
5859
6371
|
var helpTextVersion = '1.0.0';
|
|
5860
6372
|
|
|
@@ -5957,10 +6469,8 @@ let AuroElement$3 = class AuroElement extends LitElement {
|
|
|
5957
6469
|
// See LICENSE in the project root for license information.
|
|
5958
6470
|
|
|
5959
6471
|
|
|
5960
|
-
|
|
5961
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
6472
|
+
/*
|
|
5962
6473
|
* @slot - Default slot for the popover content.
|
|
5963
|
-
* @slot label - Defines the content of the label.
|
|
5964
6474
|
* @slot helpText - Defines the content of the helpText.
|
|
5965
6475
|
* @slot trigger - Defines the content of the trigger.
|
|
5966
6476
|
* @csspart trigger - The trigger content container.
|
|
@@ -5979,18 +6489,22 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
5979
6489
|
this.matchWidth = false;
|
|
5980
6490
|
this.noHideOnThisFocusLoss = false;
|
|
5981
6491
|
|
|
5982
|
-
this.errorMessage =
|
|
6492
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
5983
6493
|
|
|
5984
6494
|
// Layout Config
|
|
5985
|
-
this.layout =
|
|
5986
|
-
this.shape =
|
|
5987
|
-
this.size =
|
|
6495
|
+
this.layout = undefined;
|
|
6496
|
+
this.shape = undefined;
|
|
6497
|
+
this.size = undefined;
|
|
5988
6498
|
|
|
5989
6499
|
this.parentBorder = false;
|
|
5990
6500
|
|
|
5991
6501
|
this.privateDefaults();
|
|
5992
6502
|
}
|
|
5993
6503
|
|
|
6504
|
+
/**
|
|
6505
|
+
* @private
|
|
6506
|
+
* @returns {object} Class definition for the wrapper element.
|
|
6507
|
+
*/
|
|
5994
6508
|
get commonWrapperClasses() {
|
|
5995
6509
|
return {
|
|
5996
6510
|
'trigger': true,
|
|
@@ -6008,13 +6522,10 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6008
6522
|
privateDefaults() {
|
|
6009
6523
|
this.chevron = false;
|
|
6010
6524
|
this.disabled = false;
|
|
6525
|
+
this.disableFocusTrap = false;
|
|
6011
6526
|
this.error = false;
|
|
6012
|
-
this.inset = false;
|
|
6013
|
-
this.rounded = false;
|
|
6014
6527
|
this.tabIndex = 0;
|
|
6015
6528
|
this.noToggle = false;
|
|
6016
|
-
this.a11yAutocomplete = 'none';
|
|
6017
|
-
this.labeled = true;
|
|
6018
6529
|
this.a11yRole = 'button';
|
|
6019
6530
|
this.onDark = false;
|
|
6020
6531
|
this.showTriggerBorders = true;
|
|
@@ -6074,7 +6585,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6074
6585
|
/**
|
|
6075
6586
|
* @private
|
|
6076
6587
|
*/
|
|
6077
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText
|
|
6588
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
6078
6589
|
|
|
6079
6590
|
/**
|
|
6080
6591
|
* @private
|
|
@@ -6110,6 +6621,18 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6110
6621
|
this.floater.showBib();
|
|
6111
6622
|
}
|
|
6112
6623
|
|
|
6624
|
+
/**
|
|
6625
|
+
* When bib is open, focus on the first element inside of bib.
|
|
6626
|
+
* If not, trigger element will get focus.
|
|
6627
|
+
*/
|
|
6628
|
+
focus() {
|
|
6629
|
+
if (this.isPopoverVisible && this.focusTrap) {
|
|
6630
|
+
this.focusTrap.focusFirstElement();
|
|
6631
|
+
} else {
|
|
6632
|
+
this.trigger.focus();
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
|
|
6113
6636
|
// function to define props used within the scope of this component
|
|
6114
6637
|
static get properties() {
|
|
6115
6638
|
return {
|
|
@@ -6123,6 +6646,15 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6123
6646
|
reflect: true
|
|
6124
6647
|
},
|
|
6125
6648
|
|
|
6649
|
+
/**
|
|
6650
|
+
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
6651
|
+
* @default false
|
|
6652
|
+
*/
|
|
6653
|
+
disableEventShow: {
|
|
6654
|
+
type: Boolean,
|
|
6655
|
+
reflect: true
|
|
6656
|
+
},
|
|
6657
|
+
|
|
6126
6658
|
/**
|
|
6127
6659
|
* If declared, applies a border around the trigger slot.
|
|
6128
6660
|
*/
|
|
@@ -6141,17 +6673,17 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6141
6673
|
},
|
|
6142
6674
|
|
|
6143
6675
|
/**
|
|
6144
|
-
* If declared, the dropdown
|
|
6676
|
+
* If declared, the dropdown is not interactive.
|
|
6145
6677
|
*/
|
|
6146
|
-
|
|
6678
|
+
disabled: {
|
|
6147
6679
|
type: Boolean,
|
|
6148
6680
|
reflect: true
|
|
6149
6681
|
},
|
|
6150
6682
|
|
|
6151
6683
|
/**
|
|
6152
|
-
* If declared, the
|
|
6684
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
6153
6685
|
*/
|
|
6154
|
-
|
|
6686
|
+
disableFocusTrap: {
|
|
6155
6687
|
type: Boolean,
|
|
6156
6688
|
reflect: true
|
|
6157
6689
|
},
|
|
@@ -6196,22 +6728,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6196
6728
|
reflect: true
|
|
6197
6729
|
},
|
|
6198
6730
|
|
|
6199
|
-
/**
|
|
6200
|
-
* Makes the trigger to be full width of its parent container.
|
|
6201
|
-
*/
|
|
6202
|
-
fluid: {
|
|
6203
|
-
type: Boolean,
|
|
6204
|
-
reflect: true
|
|
6205
|
-
},
|
|
6206
|
-
|
|
6207
|
-
/**
|
|
6208
|
-
* If declared, will apply padding around trigger slot content.
|
|
6209
|
-
*/
|
|
6210
|
-
inset: {
|
|
6211
|
-
type: Boolean,
|
|
6212
|
-
reflect: true
|
|
6213
|
-
},
|
|
6214
|
-
|
|
6215
6731
|
/**
|
|
6216
6732
|
* If true, the dropdown bib is displayed.
|
|
6217
6733
|
*/
|
|
@@ -6255,15 +6771,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6255
6771
|
reflect: true
|
|
6256
6772
|
},
|
|
6257
6773
|
|
|
6258
|
-
/**
|
|
6259
|
-
* Defines if there is a label preset.
|
|
6260
|
-
* @private
|
|
6261
|
-
*/
|
|
6262
|
-
labeled: {
|
|
6263
|
-
type: Boolean,
|
|
6264
|
-
reflect: true
|
|
6265
|
-
},
|
|
6266
|
-
|
|
6267
6774
|
/**
|
|
6268
6775
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
6269
6776
|
* @private
|
|
@@ -6324,6 +6831,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6324
6831
|
reflect: true
|
|
6325
6832
|
},
|
|
6326
6833
|
|
|
6834
|
+
/**
|
|
6835
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
6836
|
+
*/
|
|
6327
6837
|
onSlotChange: {
|
|
6328
6838
|
type: Function,
|
|
6329
6839
|
reflect: false
|
|
@@ -6338,14 +6848,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6338
6848
|
reflect: true
|
|
6339
6849
|
},
|
|
6340
6850
|
|
|
6341
|
-
/**
|
|
6342
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
6343
|
-
*/
|
|
6344
|
-
rounded: {
|
|
6345
|
-
type: Boolean,
|
|
6346
|
-
reflect: true
|
|
6347
|
-
},
|
|
6348
|
-
|
|
6349
6851
|
/**
|
|
6350
6852
|
* @private
|
|
6351
6853
|
*/
|
|
@@ -6360,22 +6862,14 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6360
6862
|
type: String || undefined,
|
|
6361
6863
|
attribute: false,
|
|
6362
6864
|
reflect: false
|
|
6363
|
-
},
|
|
6364
|
-
|
|
6365
|
-
/**
|
|
6366
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
6367
|
-
*/
|
|
6368
|
-
a11yAutocomplete: {
|
|
6369
|
-
type: String,
|
|
6370
|
-
attribute: false,
|
|
6371
6865
|
}
|
|
6372
6866
|
};
|
|
6373
6867
|
}
|
|
6374
6868
|
|
|
6375
6869
|
static get styles() {
|
|
6376
6870
|
return [
|
|
6377
|
-
colorCss$1$2,
|
|
6378
6871
|
tokensCss$1$1,
|
|
6872
|
+
colorCss$1$1,
|
|
6379
6873
|
|
|
6380
6874
|
// default layout
|
|
6381
6875
|
classicColorCss,
|
|
@@ -6438,6 +6932,12 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6438
6932
|
this.handleTriggerContentSlotChange();
|
|
6439
6933
|
}
|
|
6440
6934
|
|
|
6935
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
6936
|
+
this.updateFocusTrap();
|
|
6937
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
6938
|
+
this.trigger.focus();
|
|
6939
|
+
}
|
|
6940
|
+
}
|
|
6441
6941
|
}
|
|
6442
6942
|
|
|
6443
6943
|
firstUpdated() {
|
|
@@ -6503,6 +7003,27 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6503
7003
|
this.hasFocus = true;
|
|
6504
7004
|
}
|
|
6505
7005
|
|
|
7006
|
+
/**
|
|
7007
|
+
* @private
|
|
7008
|
+
*/
|
|
7009
|
+
updateFocusTrap() {
|
|
7010
|
+
// If the dropdown is open, create a focus trap and focus the first element
|
|
7011
|
+
if (this.isPopoverVisible && !this.disableFocusTrap) {
|
|
7012
|
+
this.focusTrap = new FocusTrap(this.bibContent);
|
|
7013
|
+
this.focusTrap.focusFirstElement();
|
|
7014
|
+
return;
|
|
7015
|
+
}
|
|
7016
|
+
|
|
7017
|
+
// Guard Clause: Ensure there is a focus trap currently active before continuing
|
|
7018
|
+
if (!this.focusTrap) {
|
|
7019
|
+
return;
|
|
7020
|
+
}
|
|
7021
|
+
|
|
7022
|
+
// If the dropdown is not open, disconnect the focus trap if it exists
|
|
7023
|
+
this.focusTrap.disconnect();
|
|
7024
|
+
this.focusTrap = undefined;
|
|
7025
|
+
}
|
|
7026
|
+
|
|
6506
7027
|
/**
|
|
6507
7028
|
* Function to support @focusout event.
|
|
6508
7029
|
* @private
|
|
@@ -6788,10 +7309,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6788
7309
|
id="bib"
|
|
6789
7310
|
shape="${this.shape}"
|
|
6790
7311
|
?data-show="${this.isPopoverVisible}"
|
|
6791
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
6792
|
-
?common="${this.common}"
|
|
6793
|
-
?rounded="${this.common || this.rounded}"
|
|
6794
|
-
?inset="${this.common || this.inset}">
|
|
7312
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
6795
7313
|
<div class="slotContent">
|
|
6796
7314
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
6797
7315
|
</div>
|
|
@@ -7541,7 +8059,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
7541
8059
|
|
|
7542
8060
|
var styleCss$2 = css`: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}}`;
|
|
7543
8061
|
|
|
7544
|
-
var colorCss$1
|
|
8062
|
+
var colorCss$1 = css`: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}`;
|
|
7545
8063
|
|
|
7546
8064
|
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
7547
8065
|
|
|
@@ -7620,7 +8138,7 @@ class AuroLoader extends LitElement {
|
|
|
7620
8138
|
static get styles() {
|
|
7621
8139
|
return [
|
|
7622
8140
|
css`${styleCss$2}`,
|
|
7623
|
-
css`${colorCss$1
|
|
8141
|
+
css`${colorCss$1}`,
|
|
7624
8142
|
css`${tokensCss$1}`
|
|
7625
8143
|
];
|
|
7626
8144
|
}
|
|
@@ -8106,7 +8624,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
8106
8624
|
return _fetchMap.get(uri);
|
|
8107
8625
|
};
|
|
8108
8626
|
|
|
8109
|
-
var styleCss$1
|
|
8627
|
+
var styleCss$1 = css`: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}`;
|
|
8110
8628
|
|
|
8111
8629
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8112
8630
|
// See LICENSE in the project root for license information.
|
|
@@ -8149,7 +8667,7 @@ class BaseIcon extends AuroElement$2 {
|
|
|
8149
8667
|
|
|
8150
8668
|
static get styles() {
|
|
8151
8669
|
return css`
|
|
8152
|
-
${styleCss$1
|
|
8670
|
+
${styleCss$1}
|
|
8153
8671
|
`;
|
|
8154
8672
|
}
|
|
8155
8673
|
|
|
@@ -8190,7 +8708,7 @@ class BaseIcon extends AuroElement$2 {
|
|
|
8190
8708
|
}
|
|
8191
8709
|
}
|
|
8192
8710
|
|
|
8193
|
-
var tokensCss
|
|
8711
|
+
var tokensCss = css`: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)}`;
|
|
8194
8712
|
|
|
8195
8713
|
var colorCss$4 = css`: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)}`;
|
|
8196
8714
|
|
|
@@ -8350,8 +8868,8 @@ class AuroIcon extends BaseIcon {
|
|
|
8350
8868
|
static get styles() {
|
|
8351
8869
|
return [
|
|
8352
8870
|
super.styles,
|
|
8353
|
-
css`${tokensCss
|
|
8354
|
-
css`${styleCss$1
|
|
8871
|
+
css`${tokensCss}`,
|
|
8872
|
+
css`${styleCss$1}`,
|
|
8355
8873
|
css`${colorCss$4}`
|
|
8356
8874
|
];
|
|
8357
8875
|
}
|
|
@@ -8444,7 +8962,7 @@ var iconVersion = '8.0.4';
|
|
|
8444
8962
|
|
|
8445
8963
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8446
8964
|
|
|
8447
|
-
|
|
8965
|
+
class AuroLibraryRuntimeUtils {
|
|
8448
8966
|
|
|
8449
8967
|
/* eslint-disable jsdoc/require-param */
|
|
8450
8968
|
|
|
@@ -8505,7 +9023,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
8505
9023
|
|
|
8506
9024
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
8507
9025
|
}
|
|
8508
|
-
}
|
|
9026
|
+
}
|
|
8509
9027
|
|
|
8510
9028
|
var styleCss$5 = css`.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)}`;
|
|
8511
9029
|
|
|
@@ -8536,7 +9054,7 @@ class AuroHeader extends LitElement {
|
|
|
8536
9054
|
/**
|
|
8537
9055
|
* @private
|
|
8538
9056
|
*/
|
|
8539
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
9057
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
8540
9058
|
}
|
|
8541
9059
|
|
|
8542
9060
|
// function to define props used within the scope of this component
|
|
@@ -8566,7 +9084,7 @@ class AuroHeader extends LitElement {
|
|
|
8566
9084
|
*
|
|
8567
9085
|
*/
|
|
8568
9086
|
static register(name = "auro-header") {
|
|
8569
|
-
AuroLibraryRuntimeUtils
|
|
9087
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
8570
9088
|
}
|
|
8571
9089
|
|
|
8572
9090
|
firstUpdated() {
|
|
@@ -8772,7 +9290,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
8772
9290
|
<div id="bibTemplate" part="bibtemplate">
|
|
8773
9291
|
${this.isFullscreen ? html$1`
|
|
8774
9292
|
<div id="headerContainer">
|
|
8775
|
-
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
9293
|
+
<${this.buttonTag} id="closeButton" aria-label="Close" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
8776
9294
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
8777
9295
|
</${this.buttonTag}>
|
|
8778
9296
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -8798,220 +9316,12 @@ class AuroBibtemplate extends LitElement {
|
|
|
8798
9316
|
|
|
8799
9317
|
var bibTemplateVersion = '1.0.0';
|
|
8800
9318
|
|
|
8801
|
-
var
|
|
9319
|
+
var styleCss = css`:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
8802
9320
|
|
|
8803
|
-
var
|
|
9321
|
+
var colorCss = css`:host ::slotted(*:not(:first-child)){border-color:var(--ds-auro-counter-divider-color)}`;
|
|
8804
9322
|
|
|
8805
|
-
|
|
8806
|
-
|
|
8807
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8808
|
-
// See LICENSE in the project root for license information.
|
|
8809
|
-
|
|
8810
|
-
// ---------------------------------------------------------------------
|
|
8811
|
-
|
|
8812
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8813
|
-
|
|
8814
|
-
class AuroLibraryRuntimeUtils {
|
|
8815
|
-
|
|
8816
|
-
/* eslint-disable jsdoc/require-param */
|
|
8817
|
-
|
|
8818
|
-
/**
|
|
8819
|
-
* This will register a new custom element with the browser.
|
|
8820
|
-
* @param {String} name - The name of the custom element.
|
|
8821
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
8822
|
-
* @returns {void}
|
|
8823
|
-
*/
|
|
8824
|
-
registerComponent(name, componentClass) {
|
|
8825
|
-
if (!customElements.get(name)) {
|
|
8826
|
-
customElements.define(name, class extends componentClass {});
|
|
8827
|
-
}
|
|
8828
|
-
}
|
|
8829
|
-
|
|
8830
|
-
/**
|
|
8831
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
8832
|
-
* @returns {void}
|
|
8833
|
-
*/
|
|
8834
|
-
closestElement(
|
|
8835
|
-
selector, // selector like in .closest()
|
|
8836
|
-
base = this, // extra functionality to skip a parent
|
|
8837
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8838
|
-
!el || el === document || el === window
|
|
8839
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
8840
|
-
: found
|
|
8841
|
-
? found // found a selector INside this element
|
|
8842
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8843
|
-
) {
|
|
8844
|
-
return __Closest(base);
|
|
8845
|
-
}
|
|
8846
|
-
/* eslint-enable jsdoc/require-param */
|
|
8847
|
-
|
|
8848
|
-
/**
|
|
8849
|
-
* 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.
|
|
8850
|
-
* @param {Object} elem - The element to check.
|
|
8851
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8852
|
-
* @returns {void}
|
|
8853
|
-
*/
|
|
8854
|
-
handleComponentTagRename(elem, tagName) {
|
|
8855
|
-
const tag = tagName.toLowerCase();
|
|
8856
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
8857
|
-
|
|
8858
|
-
if (elemTag !== tag) {
|
|
8859
|
-
elem.setAttribute(tag, true);
|
|
8860
|
-
}
|
|
8861
|
-
}
|
|
8862
|
-
|
|
8863
|
-
/**
|
|
8864
|
-
* Validates if an element is a specific Auro component.
|
|
8865
|
-
* @param {Object} elem - The element to validate.
|
|
8866
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
8867
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8868
|
-
*/
|
|
8869
|
-
elementMatch(elem, tagName) {
|
|
8870
|
-
const tag = tagName.toLowerCase();
|
|
8871
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
8872
|
-
|
|
8873
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
8874
|
-
}
|
|
8875
|
-
}
|
|
8876
|
-
|
|
8877
|
-
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8878
|
-
// See LICENSE in the project root for license information.
|
|
8879
|
-
|
|
8880
|
-
|
|
8881
|
-
/**
|
|
8882
|
-
* Displays help text or error messages within form elements - Internal Use Only.
|
|
8883
|
-
*
|
|
8884
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
8885
|
-
*/
|
|
8886
|
-
class AuroHelpText extends LitElement {
|
|
8887
|
-
|
|
8888
|
-
constructor() {
|
|
8889
|
-
super();
|
|
8890
|
-
|
|
8891
|
-
this.error = false;
|
|
8892
|
-
this.onDark = false;
|
|
8893
|
-
this.hasTextContent = false;
|
|
8894
|
-
|
|
8895
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
8896
|
-
}
|
|
8897
|
-
|
|
8898
|
-
static get styles() {
|
|
8899
|
-
return [
|
|
8900
|
-
colorCss$1,
|
|
8901
|
-
styleCss$1,
|
|
8902
|
-
tokensCss
|
|
8903
|
-
];
|
|
8904
|
-
}
|
|
8905
|
-
|
|
8906
|
-
// function to define props used within the scope of this component
|
|
8907
|
-
static get properties() {
|
|
8908
|
-
return {
|
|
8909
|
-
|
|
8910
|
-
/**
|
|
8911
|
-
* @private
|
|
8912
|
-
*/
|
|
8913
|
-
slotNodes: {
|
|
8914
|
-
type: Boolean,
|
|
8915
|
-
},
|
|
8916
|
-
|
|
8917
|
-
/**
|
|
8918
|
-
* @private
|
|
8919
|
-
*/
|
|
8920
|
-
hasTextContent: {
|
|
8921
|
-
type: Boolean,
|
|
8922
|
-
},
|
|
8923
|
-
|
|
8924
|
-
/**
|
|
8925
|
-
* If declared, make font color red.
|
|
8926
|
-
*/
|
|
8927
|
-
error: {
|
|
8928
|
-
type: Boolean,
|
|
8929
|
-
reflect: true,
|
|
8930
|
-
},
|
|
8931
|
-
|
|
8932
|
-
/**
|
|
8933
|
-
* If declared, will apply onDark styles.
|
|
8934
|
-
*/
|
|
8935
|
-
onDark: {
|
|
8936
|
-
type: Boolean,
|
|
8937
|
-
reflect: true
|
|
8938
|
-
}
|
|
8939
|
-
};
|
|
8940
|
-
}
|
|
8941
|
-
|
|
8942
|
-
/**
|
|
8943
|
-
* This will register this element with the browser.
|
|
8944
|
-
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
8945
|
-
*
|
|
8946
|
-
* @example
|
|
8947
|
-
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
8948
|
-
*
|
|
8949
|
-
*/
|
|
8950
|
-
static register(name = "auro-helptext") {
|
|
8951
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
8952
|
-
}
|
|
8953
|
-
|
|
8954
|
-
updated() {
|
|
8955
|
-
this.handleSlotChange();
|
|
8956
|
-
}
|
|
8957
|
-
|
|
8958
|
-
handleSlotChange(event) {
|
|
8959
|
-
if (event) {
|
|
8960
|
-
this.slotNodes = event.target.assignedNodes();
|
|
8961
|
-
}
|
|
8962
|
-
|
|
8963
|
-
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
8964
|
-
}
|
|
8965
|
-
|
|
8966
|
-
/**
|
|
8967
|
-
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
8968
|
-
*
|
|
8969
|
-
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
8970
|
-
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
8971
|
-
* @private
|
|
8972
|
-
*/
|
|
8973
|
-
checkSlotsForContent(nodes) {
|
|
8974
|
-
if (!nodes) {
|
|
8975
|
-
return false;
|
|
8976
|
-
}
|
|
8977
|
-
|
|
8978
|
-
return nodes.some((node) => {
|
|
8979
|
-
if (node.textContent.trim()) {
|
|
8980
|
-
return true;
|
|
8981
|
-
}
|
|
8982
|
-
|
|
8983
|
-
if (!node.querySelector) {
|
|
8984
|
-
return false;
|
|
8985
|
-
}
|
|
8986
|
-
|
|
8987
|
-
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
8988
|
-
if (!nestedSlot) {
|
|
8989
|
-
return false;
|
|
8990
|
-
}
|
|
8991
|
-
|
|
8992
|
-
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
8993
|
-
return this.checkSlotsForContent(nestedSlotNodes);
|
|
8994
|
-
});
|
|
8995
|
-
}
|
|
8996
|
-
|
|
8997
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
8998
|
-
render() {
|
|
8999
|
-
return html`
|
|
9000
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
9001
|
-
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9002
|
-
</div>
|
|
9003
|
-
`;
|
|
9004
|
-
}
|
|
9005
|
-
}
|
|
9006
|
-
|
|
9007
|
-
var helptextVersion = '1.0.0';
|
|
9008
|
-
|
|
9009
|
-
var styleCss = css`:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
9010
|
-
|
|
9011
|
-
var colorCss = css`:host ::slotted(*:not(:first-child)){border-color:var(--ds-auro-counter-divider-color)}`;
|
|
9012
|
-
|
|
9013
|
-
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
9014
|
-
// See LICENSE in the project root for license information.
|
|
9323
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
9324
|
+
// See LICENSE in the project root for license information.
|
|
9015
9325
|
|
|
9016
9326
|
|
|
9017
9327
|
/**
|
|
@@ -9042,377 +9352,128 @@ class AuroCounterWrapper extends LitElement {
|
|
|
9042
9352
|
*/
|
|
9043
9353
|
static register(name = "auro-counter-wrapper") {
|
|
9044
9354
|
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterWrapper);
|
|
9045
|
-
}
|
|
9046
|
-
|
|
9047
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
9048
|
-
render() {
|
|
9049
|
-
return html$1`<div class="wrapper"><slot></slot></div>`;
|
|
9050
|
-
}
|
|
9051
|
-
}
|
|
9052
|
-
|
|
9053
|
-
/* istanbul ignore else */
|
|
9054
|
-
// define the name of the custom component
|
|
9055
|
-
if (!customElements.get("auro-counter-wrapper")) {
|
|
9056
|
-
customElements.define("auro-counter-wrapper", AuroCounterWrapper);
|
|
9057
|
-
}
|
|
9058
|
-
|
|
9059
|
-
class AuroElement extends LitElement {
|
|
9060
|
-
static get properties() {
|
|
9061
|
-
return {
|
|
9062
|
-
|
|
9063
|
-
/**
|
|
9064
|
-
* Defines the language of an element.
|
|
9065
|
-
* @default {'default'}
|
|
9066
|
-
*/
|
|
9067
|
-
layout: {
|
|
9068
|
-
type: String,
|
|
9069
|
-
attribute: "layout",
|
|
9070
|
-
reflect: true
|
|
9071
|
-
},
|
|
9072
|
-
|
|
9073
|
-
shape: {
|
|
9074
|
-
type: String,
|
|
9075
|
-
attribute: "shape",
|
|
9076
|
-
reflect: true
|
|
9077
|
-
},
|
|
9078
|
-
|
|
9079
|
-
size: {
|
|
9080
|
-
type: String,
|
|
9081
|
-
attribute: "size",
|
|
9082
|
-
reflect: true
|
|
9083
|
-
},
|
|
9084
|
-
|
|
9085
|
-
onDark: {
|
|
9086
|
-
type: Boolean,
|
|
9087
|
-
attribute: "ondark",
|
|
9088
|
-
reflect: true
|
|
9089
|
-
}
|
|
9090
|
-
};
|
|
9091
|
-
}
|
|
9092
|
-
|
|
9093
|
-
resetShapeClasses() {
|
|
9094
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9095
|
-
|
|
9096
|
-
if (wrapper) {
|
|
9097
|
-
wrapper.classList.forEach((className) => {
|
|
9098
|
-
if (className.startsWith('shape-')) {
|
|
9099
|
-
wrapper.classList.remove(className);
|
|
9100
|
-
}
|
|
9101
|
-
});
|
|
9102
|
-
|
|
9103
|
-
}
|
|
9104
|
-
|
|
9105
|
-
if (this.shape && this.size) {
|
|
9106
|
-
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
9107
|
-
} else {
|
|
9108
|
-
wrapper.classList.add('shape-none');
|
|
9109
|
-
}
|
|
9110
|
-
}
|
|
9111
|
-
|
|
9112
|
-
resetLayoutClasses() {
|
|
9113
|
-
if (this.layout) {
|
|
9114
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9115
|
-
|
|
9116
|
-
if (wrapper) {
|
|
9117
|
-
wrapper.classList.forEach((className) => {
|
|
9118
|
-
if (className.startsWith('layout-')) {
|
|
9119
|
-
wrapper.classList.remove(className);
|
|
9120
|
-
}
|
|
9121
|
-
});
|
|
9122
|
-
|
|
9123
|
-
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
9124
|
-
}
|
|
9125
|
-
}
|
|
9126
|
-
}
|
|
9127
|
-
|
|
9128
|
-
updateComponentArchitecture() {
|
|
9129
|
-
this.resetLayoutClasses();
|
|
9130
|
-
this.resetShapeClasses();
|
|
9131
|
-
}
|
|
9132
|
-
|
|
9133
|
-
updated(changedProperties) {
|
|
9134
|
-
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9135
|
-
this.updateComponentArchitecture();
|
|
9136
|
-
}
|
|
9137
|
-
}
|
|
9138
|
-
|
|
9139
|
-
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
9140
|
-
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
9141
|
-
render() {
|
|
9142
|
-
try {
|
|
9143
|
-
return this.renderLayout();
|
|
9144
|
-
} catch (error) {
|
|
9145
|
-
// failed to get the defined layout
|
|
9146
|
-
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
9147
|
-
|
|
9148
|
-
// fallback to the default layout
|
|
9149
|
-
return this.getLayout('default');
|
|
9150
|
-
}
|
|
9151
|
-
}
|
|
9152
|
-
}
|
|
9153
|
-
|
|
9154
|
-
// Selectors for focusable elements
|
|
9155
|
-
const FOCUSABLE_SELECTORS = [
|
|
9156
|
-
'a[href]',
|
|
9157
|
-
'button:not([disabled])',
|
|
9158
|
-
'textarea:not([disabled])',
|
|
9159
|
-
'input:not([disabled])',
|
|
9160
|
-
'select:not([disabled])',
|
|
9161
|
-
'[role="tab"]:not([disabled])',
|
|
9162
|
-
'[role="link"]:not([disabled])',
|
|
9163
|
-
'[role="button"]:not([disabled])',
|
|
9164
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
9165
|
-
'[contenteditable]:not([contenteditable="false"])'
|
|
9166
|
-
];
|
|
9167
|
-
|
|
9168
|
-
// List of custom components that are known to be focusable
|
|
9169
|
-
const FOCUSABLE_COMPONENTS = [
|
|
9170
|
-
'auro-checkbox',
|
|
9171
|
-
'auro-radio',
|
|
9172
|
-
'auro-dropdown',
|
|
9173
|
-
'auro-button',
|
|
9174
|
-
'auro-combobox',
|
|
9175
|
-
'auro-input',
|
|
9176
|
-
'auro-counter',
|
|
9177
|
-
'auro-menu',
|
|
9178
|
-
'auro-select',
|
|
9179
|
-
'auro-datepicker',
|
|
9180
|
-
'auro-hyperlink',
|
|
9181
|
-
'auro-accordion',
|
|
9182
|
-
];
|
|
9183
|
-
|
|
9184
|
-
/**
|
|
9185
|
-
* Determines if a given element is a custom focusable component.
|
|
9186
|
-
* Returns true if the element matches a known focusable component and is not disabled.
|
|
9187
|
-
*
|
|
9188
|
-
* @param {HTMLElement} element The element to check for focusability.
|
|
9189
|
-
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
9190
|
-
*/
|
|
9191
|
-
function isFocusableComponent(element) {
|
|
9192
|
-
const componentName = element.tagName.toLowerCase();
|
|
9193
|
-
|
|
9194
|
-
// Guard Clause: Element is a focusable component
|
|
9195
|
-
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
9196
|
-
|
|
9197
|
-
// Guard Clause: Element is not disabled
|
|
9198
|
-
if (element.hasAttribute('disabled')) return false;
|
|
9199
|
-
|
|
9200
|
-
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
9201
|
-
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
9202
|
-
|
|
9203
|
-
// If all guard clauses pass, the element is a focusable component
|
|
9204
|
-
return true;
|
|
9205
|
-
}
|
|
9206
|
-
|
|
9207
|
-
/**
|
|
9208
|
-
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
9209
|
-
* Returns a unique, ordered array of elements that can receive focus.
|
|
9210
|
-
*
|
|
9211
|
-
* @param {HTMLElement} container The container to search within
|
|
9212
|
-
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
9213
|
-
*/
|
|
9214
|
-
function getFocusableElements(container) {
|
|
9215
|
-
// Get elements in DOM order by walking the tree
|
|
9216
|
-
const orderedFocusableElements = [];
|
|
9217
|
-
|
|
9218
|
-
// Define a recursive function to collect focusable elements in DOM order
|
|
9219
|
-
const collectFocusableElements = (root) => {
|
|
9220
|
-
// Check if current element is focusable
|
|
9221
|
-
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
9222
|
-
// Check if this is a custom component that is focusable
|
|
9223
|
-
const isComponentFocusable = isFocusableComponent(root);
|
|
9224
|
-
|
|
9225
|
-
if (isComponentFocusable) {
|
|
9226
|
-
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
9227
|
-
orderedFocusableElements.push(root);
|
|
9228
|
-
return; // Skip traversing inside this component
|
|
9229
|
-
}
|
|
9230
|
-
|
|
9231
|
-
// Check if the element itself matches any selector
|
|
9232
|
-
for (const selector of FOCUSABLE_SELECTORS) {
|
|
9233
|
-
if (root.matches?.(selector)) {
|
|
9234
|
-
orderedFocusableElements.push(root);
|
|
9235
|
-
break; // Once we know it's focusable, no need to check other selectors
|
|
9236
|
-
}
|
|
9237
|
-
}
|
|
9238
|
-
|
|
9239
|
-
// Process shadow DOM only for non-Auro components
|
|
9240
|
-
if (root.shadowRoot) {
|
|
9241
|
-
// Process shadow DOM children in order
|
|
9242
|
-
if (root.shadowRoot.children) {
|
|
9243
|
-
Array.from(root.shadowRoot.children).forEach(child => {
|
|
9244
|
-
collectFocusableElements(child);
|
|
9245
|
-
});
|
|
9246
|
-
}
|
|
9247
|
-
}
|
|
9248
|
-
|
|
9249
|
-
// Process slots and their assigned nodes in order
|
|
9250
|
-
if (root.tagName === 'SLOT') {
|
|
9251
|
-
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
9252
|
-
for (const node of assignedNodes) {
|
|
9253
|
-
collectFocusableElements(node);
|
|
9254
|
-
}
|
|
9255
|
-
} else {
|
|
9256
|
-
// Process light DOM children in order
|
|
9257
|
-
if (root.children) {
|
|
9258
|
-
Array.from(root.children).forEach(child => {
|
|
9259
|
-
collectFocusableElements(child);
|
|
9260
|
-
});
|
|
9261
|
-
}
|
|
9262
|
-
}
|
|
9263
|
-
}
|
|
9264
|
-
};
|
|
9265
|
-
|
|
9266
|
-
// Start the traversal from the container
|
|
9267
|
-
collectFocusableElements(container);
|
|
9268
|
-
|
|
9269
|
-
// Remove duplicates that might have been collected through different paths
|
|
9270
|
-
// while preserving order
|
|
9271
|
-
const uniqueElements = [];
|
|
9272
|
-
const seen = new Set();
|
|
9273
|
-
|
|
9274
|
-
for (const element of orderedFocusableElements) {
|
|
9275
|
-
if (!seen.has(element)) {
|
|
9276
|
-
seen.add(element);
|
|
9277
|
-
uniqueElements.push(element);
|
|
9278
|
-
}
|
|
9279
|
-
}
|
|
9280
|
-
|
|
9281
|
-
return uniqueElements;
|
|
9282
|
-
}
|
|
9283
|
-
|
|
9284
|
-
/**
|
|
9285
|
-
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
9286
|
-
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
9287
|
-
*/
|
|
9288
|
-
class FocusTrap {
|
|
9289
|
-
/**
|
|
9290
|
-
* Creates a new FocusTrap instance for the given container element.
|
|
9291
|
-
* Initializes event listeners and prepares the container for focus management.
|
|
9292
|
-
*
|
|
9293
|
-
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
9294
|
-
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
9295
|
-
*/
|
|
9296
|
-
constructor(container) {
|
|
9297
|
-
if (!container || !(container instanceof HTMLElement)) {
|
|
9298
|
-
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
9299
|
-
}
|
|
9300
|
-
|
|
9301
|
-
this.container = container;
|
|
9302
|
-
this.tabDirection = 'forward'; // or 'backward'
|
|
9355
|
+
}
|
|
9303
9356
|
|
|
9304
|
-
|
|
9357
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
9358
|
+
render() {
|
|
9359
|
+
return html$1`<div class="wrapper"><slot></slot></div>`;
|
|
9305
9360
|
}
|
|
9361
|
+
}
|
|
9306
9362
|
|
|
9307
|
-
|
|
9308
|
-
|
|
9309
|
-
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
*/
|
|
9313
|
-
_init() {
|
|
9363
|
+
/* istanbul ignore else */
|
|
9364
|
+
// define the name of the custom component
|
|
9365
|
+
if (!customElements.get("auro-counter-wrapper")) {
|
|
9366
|
+
customElements.define("auro-counter-wrapper", AuroCounterWrapper);
|
|
9367
|
+
}
|
|
9314
9368
|
|
|
9315
|
-
|
|
9316
|
-
|
|
9317
|
-
|
|
9318
|
-
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
9319
|
-
}
|
|
9369
|
+
class AuroElement extends LitElement {
|
|
9370
|
+
static get properties() {
|
|
9371
|
+
return {
|
|
9320
9372
|
|
|
9321
|
-
|
|
9322
|
-
|
|
9323
|
-
|
|
9373
|
+
/**
|
|
9374
|
+
* Defines the language of an element.
|
|
9375
|
+
* @default {'default'}
|
|
9376
|
+
*/
|
|
9377
|
+
layout: {
|
|
9378
|
+
type: String,
|
|
9379
|
+
attribute: "layout",
|
|
9380
|
+
reflect: true
|
|
9381
|
+
},
|
|
9324
9382
|
|
|
9325
|
-
|
|
9326
|
-
|
|
9327
|
-
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
* @private
|
|
9331
|
-
*/
|
|
9332
|
-
_onKeydown = (e) => {
|
|
9333
|
-
|
|
9334
|
-
if (e.key === 'Tab') {
|
|
9383
|
+
shape: {
|
|
9384
|
+
type: String,
|
|
9385
|
+
attribute: "shape",
|
|
9386
|
+
reflect: true
|
|
9387
|
+
},
|
|
9335
9388
|
|
|
9336
|
-
|
|
9337
|
-
|
|
9389
|
+
size: {
|
|
9390
|
+
type: String,
|
|
9391
|
+
attribute: "size",
|
|
9392
|
+
reflect: true
|
|
9393
|
+
},
|
|
9338
9394
|
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
const actives = [activeElement];
|
|
9344
|
-
while (activeElement?.shadowRoot?.activeElement) {
|
|
9345
|
-
actives.push(activeElement.shadowRoot.activeElement);
|
|
9346
|
-
activeElement = activeElement.shadowRoot.activeElement;
|
|
9395
|
+
onDark: {
|
|
9396
|
+
type: Boolean,
|
|
9397
|
+
attribute: "ondark",
|
|
9398
|
+
reflect: true
|
|
9347
9399
|
}
|
|
9400
|
+
};
|
|
9401
|
+
}
|
|
9348
9402
|
|
|
9349
|
-
|
|
9350
|
-
|
|
9403
|
+
resetShapeClasses() {
|
|
9404
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9351
9405
|
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
(
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
: null;
|
|
9406
|
+
if (wrapper) {
|
|
9407
|
+
wrapper.classList.forEach((className) => {
|
|
9408
|
+
if (className.startsWith('shape-')) {
|
|
9409
|
+
wrapper.classList.remove(className);
|
|
9410
|
+
}
|
|
9411
|
+
});
|
|
9359
9412
|
|
|
9360
|
-
if (focusIndex !== null) {
|
|
9361
|
-
focusables[focusIndex].focus();
|
|
9362
|
-
e.preventDefault(); // Prevent default tab behavior
|
|
9363
|
-
e.stopPropagation(); // Stop the event from bubbling up
|
|
9364
|
-
}
|
|
9365
9413
|
}
|
|
9366
|
-
};
|
|
9367
9414
|
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
* @private
|
|
9374
|
-
*/
|
|
9375
|
-
_getFocusableElements() {
|
|
9376
|
-
// Use the imported utility function to get focusable elements
|
|
9377
|
-
const elements = getFocusableElements(this.container);
|
|
9378
|
-
|
|
9379
|
-
// Filter out any elements with the 'focus-bookend' class
|
|
9380
|
-
return elements;
|
|
9415
|
+
if (this.shape && this.size) {
|
|
9416
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
9417
|
+
} else {
|
|
9418
|
+
wrapper.classList.add('shape-none');
|
|
9419
|
+
}
|
|
9381
9420
|
}
|
|
9382
9421
|
|
|
9383
|
-
|
|
9384
|
-
|
|
9385
|
-
|
|
9386
|
-
*/
|
|
9387
|
-
focusFirstElement() {
|
|
9388
|
-
const focusables = this._getFocusableElements();
|
|
9389
|
-
if (focusables.length) focusables[0].focus();
|
|
9390
|
-
}
|
|
9422
|
+
resetLayoutClasses() {
|
|
9423
|
+
if (this.layout) {
|
|
9424
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9391
9425
|
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9426
|
+
if (wrapper) {
|
|
9427
|
+
wrapper.classList.forEach((className) => {
|
|
9428
|
+
if (className.startsWith('layout-')) {
|
|
9429
|
+
wrapper.classList.remove(className);
|
|
9430
|
+
}
|
|
9431
|
+
});
|
|
9432
|
+
|
|
9433
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
9434
|
+
}
|
|
9435
|
+
}
|
|
9399
9436
|
}
|
|
9400
9437
|
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
disconnect() {
|
|
9438
|
+
updateComponentArchitecture() {
|
|
9439
|
+
this.resetLayoutClasses();
|
|
9440
|
+
this.resetShapeClasses();
|
|
9441
|
+
}
|
|
9406
9442
|
|
|
9407
|
-
|
|
9408
|
-
|
|
9443
|
+
updated(changedProperties) {
|
|
9444
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9445
|
+
this.updateComponentArchitecture();
|
|
9409
9446
|
}
|
|
9447
|
+
}
|
|
9410
9448
|
|
|
9411
|
-
|
|
9449
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
9450
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
9451
|
+
render() {
|
|
9452
|
+
try {
|
|
9453
|
+
return this.renderLayout();
|
|
9454
|
+
} catch (error) {
|
|
9455
|
+
// failed to get the defined layout
|
|
9456
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
9457
|
+
|
|
9458
|
+
// fallback to the default layout
|
|
9459
|
+
return this.getLayout('default');
|
|
9460
|
+
}
|
|
9412
9461
|
}
|
|
9413
9462
|
}
|
|
9414
9463
|
|
|
9415
|
-
/*
|
|
9464
|
+
/*
|
|
9465
|
+
eslint-disable
|
|
9466
|
+
lit/no-invalid-html,
|
|
9467
|
+
lit/binding-positions,
|
|
9468
|
+
max-lines,
|
|
9469
|
+
no-underscore-dangle,
|
|
9470
|
+
arrow-parens,
|
|
9471
|
+
no-confusing-arrow,
|
|
9472
|
+
curly,
|
|
9473
|
+
dot-location,
|
|
9474
|
+
no-inline-comments,
|
|
9475
|
+
line-comment-position,
|
|
9476
|
+
*/
|
|
9416
9477
|
|
|
9417
9478
|
|
|
9418
9479
|
/**
|
|
@@ -9471,10 +9532,11 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9471
9532
|
*/
|
|
9472
9533
|
this.validation = new AuroFormValidation();
|
|
9473
9534
|
|
|
9474
|
-
|
|
9535
|
+
/** @private */
|
|
9536
|
+
this.updateValue = this.updateValue.bind(this);
|
|
9475
9537
|
|
|
9476
9538
|
/** @private */
|
|
9477
|
-
this.
|
|
9539
|
+
this.updateValidity = this.updateValidity.bind(this);
|
|
9478
9540
|
|
|
9479
9541
|
/**
|
|
9480
9542
|
* Generate unique names for dependency components.
|
|
@@ -9501,7 +9563,12 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9501
9563
|
* @private
|
|
9502
9564
|
* @type {string}
|
|
9503
9565
|
*/
|
|
9504
|
-
this.helpTextTag = versioning.generateTag("auro-formkit-counter-helptext", helptextVersion, AuroHelpText);
|
|
9566
|
+
this.helpTextTag = versioning.generateTag("auro-formkit-counter-helptext", helptextVersion, AuroHelpText$1);
|
|
9567
|
+
|
|
9568
|
+
/**
|
|
9569
|
+
* @private
|
|
9570
|
+
*/
|
|
9571
|
+
this.iconTag = versioning.generateTag('auro-formkit-input-icon', iconVersion$2, AuroIcon$2);
|
|
9505
9572
|
}
|
|
9506
9573
|
|
|
9507
9574
|
static get styles() {
|
|
@@ -9526,6 +9593,25 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9526
9593
|
reflect: true
|
|
9527
9594
|
},
|
|
9528
9595
|
|
|
9596
|
+
/**
|
|
9597
|
+
* The current error message to display when the component is invalid.
|
|
9598
|
+
*/
|
|
9599
|
+
error: {
|
|
9600
|
+
type: String,
|
|
9601
|
+
reflect: false
|
|
9602
|
+
},
|
|
9603
|
+
|
|
9604
|
+
/**
|
|
9605
|
+
* The current error message to display when the component is invalid.
|
|
9606
|
+
* This is set by validation and is not available to consumers.
|
|
9607
|
+
* @private
|
|
9608
|
+
*/
|
|
9609
|
+
errorMessage: {
|
|
9610
|
+
type: String,
|
|
9611
|
+
reflect: false,
|
|
9612
|
+
attribute: false
|
|
9613
|
+
},
|
|
9614
|
+
|
|
9529
9615
|
/**
|
|
9530
9616
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
9531
9617
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -9613,7 +9699,7 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9613
9699
|
* "top" | "right" | "bottom" | "left" |
|
|
9614
9700
|
* "bottom-start" | "top-start" | "top-end" |
|
|
9615
9701
|
* "right-start" | "right-end" | "bottom-end" |
|
|
9616
|
-
* "left-start" | "left-end"
|
|
9702
|
+
* "left-start" | "left-end".
|
|
9617
9703
|
* @default bottom-start
|
|
9618
9704
|
*/
|
|
9619
9705
|
placement: {
|
|
@@ -9684,54 +9770,98 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9684
9770
|
this.counters = this.querySelectorAll("auro-counter, [auro-counter]");
|
|
9685
9771
|
this.counters.forEach((counter) => {
|
|
9686
9772
|
counter.onDark = this.onDark;
|
|
9687
|
-
counter.addEventListener("input",
|
|
9773
|
+
counter.addEventListener("input", this.updateValue);
|
|
9774
|
+
counter.addEventListener("auroFormElement-validated", this.updateValidity);
|
|
9688
9775
|
});
|
|
9689
9776
|
}
|
|
9690
9777
|
|
|
9691
9778
|
/**
|
|
9692
|
-
*
|
|
9693
|
-
* @
|
|
9779
|
+
* Renders help text error messages.
|
|
9780
|
+
* @param {Array<string>} messages - The error messages to render.
|
|
9781
|
+
* @returns {TemplateResult[]} - The rendered error messages rendered in a TemplateResult.
|
|
9694
9782
|
* @private
|
|
9695
9783
|
*/
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
// Check if the dropdown is open
|
|
9699
|
-
const dropdownIsOpen = this.dropdown.isPopoverVisible;
|
|
9784
|
+
renderHelpTextErrors(messages) {
|
|
9700
9785
|
|
|
9701
|
-
//
|
|
9702
|
-
|
|
9786
|
+
// Return empty template if no messages are provided
|
|
9787
|
+
if (!messages || messages.length === 0) return html$1``;
|
|
9703
9788
|
|
|
9704
|
-
//
|
|
9705
|
-
|
|
9789
|
+
// Return messages as a TemplateResult
|
|
9790
|
+
return messages.map(message => html$1`<p>${message}</p>`);
|
|
9791
|
+
}
|
|
9706
9792
|
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9793
|
+
/**
|
|
9794
|
+
* Gets and returns an array of counters in an invalid state.
|
|
9795
|
+
* @returns {Array<HTMLElement>} - Returns an array of invalid counters.
|
|
9796
|
+
* @param {NodeList} counters - The NodeList of counter elements to check.
|
|
9797
|
+
* @private
|
|
9798
|
+
*/
|
|
9799
|
+
getInvalidCounters(counters) {
|
|
9800
|
+
return Array.from(counters).filter(counter => counter.validity && counter.validity !== 'valid');
|
|
9710
9801
|
}
|
|
9711
9802
|
|
|
9712
9803
|
/**
|
|
9713
|
-
*
|
|
9714
|
-
*
|
|
9715
|
-
*
|
|
9716
|
-
* @
|
|
9804
|
+
* Gets all valid error messages from errored counters.
|
|
9805
|
+
* @param {NodeList} invalidCounters - The NodeList of counter elements to check.
|
|
9806
|
+
* @returns {Array<string>} - Returns an array of error messages from invalid counters.
|
|
9807
|
+
* @private
|
|
9808
|
+
*/
|
|
9809
|
+
getErrorMessages(invalidCounters) {
|
|
9810
|
+
return invalidCounters
|
|
9811
|
+
.map(counter => counter.errorMessage)
|
|
9812
|
+
.filter(message => message && message.length > 0);
|
|
9813
|
+
};
|
|
9814
|
+
|
|
9815
|
+
/**
|
|
9816
|
+
* Updates the validity of the counter group based on the validity of its counters.
|
|
9817
|
+
* This method checks all counters within the group, determines if any are invalid, and updates the group's validity state and error message accordingly.
|
|
9818
|
+
* If any counter is invalid, it generates a combined error message from all invalid counters.
|
|
9717
9819
|
* @returns {void}
|
|
9718
9820
|
* @private
|
|
9719
9821
|
*/
|
|
9720
|
-
|
|
9822
|
+
updateValidity () {
|
|
9721
9823
|
|
|
9722
|
-
//
|
|
9723
|
-
if (
|
|
9724
|
-
this.dropdownFocusTrap = new FocusTrap(this.dropdown.bibContent);
|
|
9725
|
-
this.dropdownFocusTrap.focusFirstElement();
|
|
9726
|
-
return;
|
|
9727
|
-
}
|
|
9824
|
+
// We don't need to do anything if there are no counters
|
|
9825
|
+
if (!this.counters) return;
|
|
9728
9826
|
|
|
9729
|
-
//
|
|
9730
|
-
|
|
9827
|
+
// Wait for initial validation to complete before updating validity and error message
|
|
9828
|
+
// This is necessary because we need the initial validation to know when to reset the validity and error message
|
|
9829
|
+
setTimeout(() => {
|
|
9731
9830
|
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
|
|
9831
|
+
// Get any invalid counters
|
|
9832
|
+
const invalidCounters = this.getInvalidCounters(this.counters);
|
|
9833
|
+
|
|
9834
|
+
// Determine if we are in an invalid state based on the presence of invalid counters
|
|
9835
|
+
const isInvalid = invalidCounters.length > 0;
|
|
9836
|
+
|
|
9837
|
+
// If we are in an invalid state
|
|
9838
|
+
if (isInvalid) {
|
|
9839
|
+
|
|
9840
|
+
// Generate the error messages
|
|
9841
|
+
const errorMessages = this.getErrorMessages(invalidCounters);
|
|
9842
|
+
|
|
9843
|
+
const errorMessage = isInvalid ? this.renderHelpTextErrors(errorMessages) : this.errorMessage;
|
|
9844
|
+
|
|
9845
|
+
// Set the validity and error message
|
|
9846
|
+
// This needs to allow for the initial validation to come through
|
|
9847
|
+
this.validity =
|
|
9848
|
+
invalidCounters[0].validity || // The first invalid counter's validity
|
|
9849
|
+
this.validity || // incoming validity from validation
|
|
9850
|
+
undefined; // fallback
|
|
9851
|
+
|
|
9852
|
+
this.errorMessage =
|
|
9853
|
+
errorMessage || // our message
|
|
9854
|
+
this.errorMessage || // incoming message from validation
|
|
9855
|
+
undefined; // fallback
|
|
9856
|
+
}
|
|
9857
|
+
|
|
9858
|
+
if (!isInvalid && this.validity !== 'valid') {
|
|
9859
|
+
|
|
9860
|
+
// If there are no invalid counters, reset validity and error message
|
|
9861
|
+
this.validity = 'valid';
|
|
9862
|
+
this.errorMessage = undefined;
|
|
9863
|
+
}
|
|
9864
|
+
});
|
|
9735
9865
|
}
|
|
9736
9866
|
|
|
9737
9867
|
/**
|
|
@@ -9744,14 +9874,13 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9744
9874
|
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
9745
9875
|
this.dropdown.requestUpdate();
|
|
9746
9876
|
|
|
9747
|
-
this.dropdown.addEventListener("auroDropdown-toggled", this.handleDropdownToggle);
|
|
9748
|
-
|
|
9749
9877
|
const counterWrapper = this.shadowRoot.querySelector('auro-counter-wrapper');
|
|
9750
9878
|
const counterSlot = counterWrapper.querySelector('slot');
|
|
9751
9879
|
this.counters = counterSlot.assignedElements().filter(el => el.tagName.toLowerCase() === 'auro-counter' || el.hasAttribute('auro-counter'));
|
|
9752
9880
|
|
|
9753
9881
|
this.counters.forEach((counter) => {
|
|
9754
|
-
counter.addEventListener("input",
|
|
9882
|
+
counter.addEventListener("input", this.updateValue);
|
|
9883
|
+
counter.addEventListener("auroFormElement-validated", this.updateValidity);
|
|
9755
9884
|
});
|
|
9756
9885
|
|
|
9757
9886
|
if (this.isDropdown) {
|
|
@@ -9891,13 +10020,6 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9891
10020
|
this.updateValueText();
|
|
9892
10021
|
}
|
|
9893
10022
|
|
|
9894
|
-
disconnectedCallback() {
|
|
9895
|
-
super.disconnectedCallback();
|
|
9896
|
-
|
|
9897
|
-
// Remove the event listener for dropdown toggling
|
|
9898
|
-
this.removeEventListener("auroDropdown-toggled", this.handleDropdownToggle);
|
|
9899
|
-
}
|
|
9900
|
-
|
|
9901
10023
|
/**
|
|
9902
10024
|
* Registers the custom element with the browser.
|
|
9903
10025
|
* @param {string} [name="auro-counter-group"] - Custom element name to register.
|
|
@@ -9908,6 +10030,57 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9908
10030
|
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterGroup);
|
|
9909
10031
|
}
|
|
9910
10032
|
|
|
10033
|
+
/**
|
|
10034
|
+
* Returns HTML for the help text and error message.
|
|
10035
|
+
* @private
|
|
10036
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
10037
|
+
*/
|
|
10038
|
+
renderHelpText() {
|
|
10039
|
+
return !this.validity || this.validity === undefined || this.validity === 'valid'
|
|
10040
|
+
? html$1`
|
|
10041
|
+
<div slot="helpText">
|
|
10042
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
10043
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
10044
|
+
<slot name="helpText"></slot>
|
|
10045
|
+
</p>
|
|
10046
|
+
</${this.helpTextTag}>
|
|
10047
|
+
</div>
|
|
10048
|
+
`
|
|
10049
|
+
: html$1`
|
|
10050
|
+
<div slot="helpText">
|
|
10051
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
10052
|
+
<p id="${this.uniqueId}" part="helpText" role="alert" aria-live="assertive">
|
|
10053
|
+
${this.error || this.errorMessage}
|
|
10054
|
+
</p>
|
|
10055
|
+
</${this.helpTextTag}>
|
|
10056
|
+
</div>
|
|
10057
|
+
`;
|
|
10058
|
+
}
|
|
10059
|
+
|
|
10060
|
+
/**
|
|
10061
|
+
* Returns HTML for the validation error icon.
|
|
10062
|
+
* @private
|
|
10063
|
+
* @returns {html} - Returns HTML for the validation error icon.
|
|
10064
|
+
*/
|
|
10065
|
+
renderValidationErrorIcon() {
|
|
10066
|
+
|
|
10067
|
+
// Don't render in valid state
|
|
10068
|
+
if (!this.validity || this.validity === 'valid') return undefined;
|
|
10069
|
+
|
|
10070
|
+
return html$1`
|
|
10071
|
+
${this.validity && this.validity !== 'valid' ? html$1`
|
|
10072
|
+
<div class="notification alertNotification">
|
|
10073
|
+
<${this.iconTag}
|
|
10074
|
+
category="alert"
|
|
10075
|
+
name="error-stroke"
|
|
10076
|
+
variant="statusError"
|
|
10077
|
+
?ondark="${this.onDark}">
|
|
10078
|
+
</${this.iconTag}>
|
|
10079
|
+
</div>
|
|
10080
|
+
` : undefined}
|
|
10081
|
+
`;
|
|
10082
|
+
}
|
|
10083
|
+
|
|
9911
10084
|
/**
|
|
9912
10085
|
* Render the dropdown structure for the counter group.
|
|
9913
10086
|
* @returns {TemplateResult} The dropdown template.
|
|
@@ -9917,7 +10090,7 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9917
10090
|
return html$1`
|
|
9918
10091
|
<${this.dropdownTag}
|
|
9919
10092
|
noHideOnThisFocusLoss
|
|
9920
|
-
chevron
|
|
10093
|
+
chevron
|
|
9921
10094
|
part="dropdown"
|
|
9922
10095
|
?autoPlacement="${this.autoPlacement}"
|
|
9923
10096
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
@@ -9964,28 +10137,13 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9964
10137
|
${this.counters && Array.from(this.counters).map((counter, index) => html$1`${counter.value} ${counter.defaultSlot}${index !== this.counters.length - 1 ? ', ' : ''}`)}
|
|
9965
10138
|
</slot>
|
|
9966
10139
|
</div>
|
|
9967
|
-
<div class="accents right"
|
|
10140
|
+
<div class="accents right">
|
|
10141
|
+
${this.renderValidationErrorIcon()}
|
|
10142
|
+
</div>
|
|
9968
10143
|
</div>
|
|
9969
10144
|
`;
|
|
9970
10145
|
};
|
|
9971
10146
|
|
|
9972
|
-
/**
|
|
9973
|
-
* Render the help text for the counter group.
|
|
9974
|
-
* @returns {TemplateResult} The help text template.
|
|
9975
|
-
* @private
|
|
9976
|
-
*/
|
|
9977
|
-
renderHelpText() {
|
|
9978
|
-
return html$1`
|
|
9979
|
-
<div slot="helpText">
|
|
9980
|
-
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
9981
|
-
<p id="${this.uniqueId}" part="helpText">
|
|
9982
|
-
<slot name="helpText"></slot>
|
|
9983
|
-
</p>
|
|
9984
|
-
</${this.helpTextTag}>
|
|
9985
|
-
</div>
|
|
9986
|
-
`;
|
|
9987
|
-
}
|
|
9988
|
-
|
|
9989
10147
|
/**
|
|
9990
10148
|
* Render the dropdown bib template for the dropdown.
|
|
9991
10149
|
* @returns {TemplateResult} The bib template.
|