@aurodesignsystem-dev/auro-formkit 0.0.0-pr740.9 → 0.0.0-pr750.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +6 -0
- package/components/bibtemplate/dist/index.js +25 -1
- package/components/bibtemplate/dist/registered.js +25 -1
- package/components/checkbox/demo/api.html +16 -10
- package/components/checkbox/demo/api.min.js +23 -16
- package/components/checkbox/demo/index.html +16 -10
- package/components/checkbox/demo/index.min.js +23 -16
- package/components/checkbox/demo/readme.html +16 -9
- package/components/checkbox/dist/index.js +23 -16
- package/components/checkbox/dist/registered.js +23 -16
- package/components/combobox/demo/api.html +16 -10
- package/components/combobox/demo/api.md +12 -6
- package/components/combobox/demo/api.min.js +442 -148
- package/components/combobox/demo/index.html +16 -10
- package/components/combobox/demo/index.min.js +442 -148
- package/components/combobox/demo/readme.html +16 -9
- package/components/combobox/dist/index.js +405 -136
- package/components/combobox/dist/registered.js +405 -136
- package/components/counter/demo/api.html +17 -10
- package/components/counter/demo/api.md +140 -7
- package/components/counter/demo/api.min.js +1171 -1016
- package/components/counter/demo/index.html +17 -10
- package/components/counter/demo/index.md +86 -0
- package/components/counter/demo/index.min.js +1171 -1016
- 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 +1171 -1016
- package/components/counter/dist/registered.js +1171 -1016
- package/components/datepicker/demo/api.html +16 -10
- package/components/datepicker/demo/api.min.js +403 -123
- package/components/datepicker/demo/index.html +16 -10
- package/components/datepicker/demo/index.min.js +403 -123
- package/components/datepicker/demo/readme.html +16 -9
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -0
- package/components/datepicker/dist/index.js +403 -123
- package/components/datepicker/dist/registered.js +403 -123
- package/components/dropdown/demo/api.html +16 -10
- package/components/dropdown/demo/api.md +77 -269
- package/components/dropdown/demo/api.min.js +336 -96
- package/components/dropdown/demo/index.html +16 -10
- package/components/dropdown/demo/index.md +45 -363
- package/components/dropdown/demo/index.min.js +336 -96
- package/components/dropdown/demo/readme.html +16 -9
- package/components/dropdown/dist/auro-dropdown.d.ts +35 -67
- package/components/dropdown/dist/auro-dropdownBib.d.ts +0 -6
- package/components/dropdown/dist/index.js +336 -96
- package/components/dropdown/dist/registered.js +336 -96
- 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 +520 -358
- package/components/select/demo/index.html +16 -11
- package/components/select/demo/index.md +6 -158
- package/components/select/demo/index.min.js +520 -346
- package/components/select/demo/readme.html +16 -9
- package/components/select/dist/auro-select.d.ts +33 -8
- package/components/select/dist/index.js +483 -334
- package/components/select/dist/registered.js +483 -334
- 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,11 +5951,11 @@ 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
|
|
|
5446
|
-
var tokensCss$1$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-
|
|
5958
|
+
var tokensCss$1$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
5447
5959
|
|
|
5448
5960
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5449
5961
|
// See LICENSE in the project root for license information.
|
|
@@ -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
|
];
|
|
@@ -5603,17 +6115,6 @@ class AuroDropdownBib extends LitElement {
|
|
|
5603
6115
|
}
|
|
5604
6116
|
}
|
|
5605
6117
|
});
|
|
5606
|
-
|
|
5607
|
-
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
5608
|
-
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
5609
|
-
this.addEventListener('touchstart', this.preventBodyScroll, { passive: false });
|
|
5610
|
-
}
|
|
5611
|
-
|
|
5612
|
-
disconnectedCallback() {
|
|
5613
|
-
super.disconnectedCallback();
|
|
5614
|
-
|
|
5615
|
-
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
5616
|
-
this.removeEventListener('touchstart', this.preventBodyScroll, { passive: false });
|
|
5617
6118
|
}
|
|
5618
6119
|
|
|
5619
6120
|
firstUpdated(changedProperties) {
|
|
@@ -5629,19 +6130,6 @@ class AuroDropdownBib extends LitElement {
|
|
|
5629
6130
|
}));
|
|
5630
6131
|
}
|
|
5631
6132
|
|
|
5632
|
-
/**
|
|
5633
|
-
* Prevents scrolling of the body when touching empty areas of the component.
|
|
5634
|
-
* @param {Event} event - The touchmove event.
|
|
5635
|
-
* @returns {void}
|
|
5636
|
-
*/
|
|
5637
|
-
preventBodyScroll(event) {
|
|
5638
|
-
// when touchmove/touchstart on empty space
|
|
5639
|
-
if (event.target === this) {
|
|
5640
|
-
event.preventDefault();
|
|
5641
|
-
event.stopImmediatePropagation();
|
|
5642
|
-
}
|
|
5643
|
-
}
|
|
5644
|
-
|
|
5645
6133
|
// function that renders the HTML and CSS into the scope of the component
|
|
5646
6134
|
render() {
|
|
5647
6135
|
const classes = {
|
|
@@ -5664,21 +6152,21 @@ var dropdownVersion$1 = '3.0.0';
|
|
|
5664
6152
|
|
|
5665
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}`;
|
|
5666
6154
|
|
|
5667
|
-
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)}`;
|
|
5668
6156
|
|
|
5669
|
-
var classicColorCss = css
|
|
6157
|
+
var classicColorCss = css``;
|
|
5670
6158
|
|
|
5671
|
-
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]) .
|
|
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%}`;
|
|
5672
6160
|
|
|
5673
|
-
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-direction:row
|
|
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)}`;
|
|
5674
6162
|
|
|
5675
|
-
var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex-direction:row
|
|
6163
|
+
var styleSnowflakeCss = css`:host{display:block}.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*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
5676
6164
|
|
|
5677
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)}`;
|
|
5678
6166
|
|
|
5679
|
-
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}`;
|
|
5680
6168
|
|
|
5681
|
-
var tokensCss$
|
|
6169
|
+
var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5682
6170
|
|
|
5683
6171
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5684
6172
|
// See LICENSE in the project root for license information.
|
|
@@ -5687,7 +6175,7 @@ var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
5687
6175
|
|
|
5688
6176
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5689
6177
|
|
|
5690
|
-
let AuroLibraryRuntimeUtils$
|
|
6178
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
5691
6179
|
|
|
5692
6180
|
/* eslint-disable jsdoc/require-param */
|
|
5693
6181
|
|
|
@@ -5759,7 +6247,7 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
5759
6247
|
*
|
|
5760
6248
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
5761
6249
|
*/
|
|
5762
|
-
|
|
6250
|
+
class AuroHelpText extends LitElement {
|
|
5763
6251
|
|
|
5764
6252
|
constructor() {
|
|
5765
6253
|
super();
|
|
@@ -5768,14 +6256,14 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
5768
6256
|
this.onDark = false;
|
|
5769
6257
|
this.hasTextContent = false;
|
|
5770
6258
|
|
|
5771
|
-
AuroLibraryRuntimeUtils$
|
|
6259
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
5772
6260
|
}
|
|
5773
6261
|
|
|
5774
6262
|
static get styles() {
|
|
5775
6263
|
return [
|
|
5776
6264
|
colorCss$5,
|
|
5777
6265
|
styleCss$6,
|
|
5778
|
-
tokensCss$
|
|
6266
|
+
tokensCss$3
|
|
5779
6267
|
];
|
|
5780
6268
|
}
|
|
5781
6269
|
|
|
@@ -5824,7 +6312,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
5824
6312
|
*
|
|
5825
6313
|
*/
|
|
5826
6314
|
static register(name = "auro-helptext") {
|
|
5827
|
-
AuroLibraryRuntimeUtils$
|
|
6315
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
5828
6316
|
}
|
|
5829
6317
|
|
|
5830
6318
|
updated() {
|
|
@@ -5878,7 +6366,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
5878
6366
|
</div>
|
|
5879
6367
|
`;
|
|
5880
6368
|
}
|
|
5881
|
-
}
|
|
6369
|
+
}
|
|
5882
6370
|
|
|
5883
6371
|
var helpTextVersion = '1.0.0';
|
|
5884
6372
|
|
|
@@ -5981,10 +6469,8 @@ let AuroElement$3 = class AuroElement extends LitElement {
|
|
|
5981
6469
|
// See LICENSE in the project root for license information.
|
|
5982
6470
|
|
|
5983
6471
|
|
|
5984
|
-
|
|
5985
|
-
* @attr { Boolean } disableEventShow - If declared, the dropdown will only show by calling the API .show() public method.
|
|
6472
|
+
/*
|
|
5986
6473
|
* @slot - Default slot for the popover content.
|
|
5987
|
-
* @slot label - Defines the content of the label.
|
|
5988
6474
|
* @slot helpText - Defines the content of the helpText.
|
|
5989
6475
|
* @slot trigger - Defines the content of the trigger.
|
|
5990
6476
|
* @csspart trigger - The trigger content container.
|
|
@@ -6003,18 +6489,22 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6003
6489
|
this.matchWidth = false;
|
|
6004
6490
|
this.noHideOnThisFocusLoss = false;
|
|
6005
6491
|
|
|
6006
|
-
this.errorMessage =
|
|
6492
|
+
this.errorMessage = undefined; // TODO - check with Doug if there is still more to do here
|
|
6007
6493
|
|
|
6008
6494
|
// Layout Config
|
|
6009
|
-
this.layout =
|
|
6010
|
-
this.shape =
|
|
6011
|
-
this.size =
|
|
6495
|
+
this.layout = undefined;
|
|
6496
|
+
this.shape = undefined;
|
|
6497
|
+
this.size = undefined;
|
|
6012
6498
|
|
|
6013
6499
|
this.parentBorder = false;
|
|
6014
6500
|
|
|
6015
6501
|
this.privateDefaults();
|
|
6016
6502
|
}
|
|
6017
6503
|
|
|
6504
|
+
/**
|
|
6505
|
+
* @private
|
|
6506
|
+
* @returns {object} Class definition for the wrapper element.
|
|
6507
|
+
*/
|
|
6018
6508
|
get commonWrapperClasses() {
|
|
6019
6509
|
return {
|
|
6020
6510
|
'trigger': true,
|
|
@@ -6032,13 +6522,10 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6032
6522
|
privateDefaults() {
|
|
6033
6523
|
this.chevron = false;
|
|
6034
6524
|
this.disabled = false;
|
|
6525
|
+
this.disableFocusTrap = false;
|
|
6035
6526
|
this.error = false;
|
|
6036
|
-
this.inset = false;
|
|
6037
|
-
this.rounded = false;
|
|
6038
6527
|
this.tabIndex = 0;
|
|
6039
6528
|
this.noToggle = false;
|
|
6040
|
-
this.a11yAutocomplete = 'none';
|
|
6041
|
-
this.labeled = true;
|
|
6042
6529
|
this.a11yRole = 'button';
|
|
6043
6530
|
this.onDark = false;
|
|
6044
6531
|
this.showTriggerBorders = true;
|
|
@@ -6098,7 +6585,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6098
6585
|
/**
|
|
6099
6586
|
* @private
|
|
6100
6587
|
*/
|
|
6101
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText
|
|
6588
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
6102
6589
|
|
|
6103
6590
|
/**
|
|
6104
6591
|
* @private
|
|
@@ -6134,6 +6621,18 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6134
6621
|
this.floater.showBib();
|
|
6135
6622
|
}
|
|
6136
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
|
+
|
|
6137
6636
|
// function to define props used within the scope of this component
|
|
6138
6637
|
static get properties() {
|
|
6139
6638
|
return {
|
|
@@ -6147,6 +6646,15 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6147
6646
|
reflect: true
|
|
6148
6647
|
},
|
|
6149
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
|
+
|
|
6150
6658
|
/**
|
|
6151
6659
|
* If declared, applies a border around the trigger slot.
|
|
6152
6660
|
*/
|
|
@@ -6165,17 +6673,17 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6165
6673
|
},
|
|
6166
6674
|
|
|
6167
6675
|
/**
|
|
6168
|
-
* If declared, the dropdown
|
|
6676
|
+
* If declared, the dropdown is not interactive.
|
|
6169
6677
|
*/
|
|
6170
|
-
|
|
6678
|
+
disabled: {
|
|
6171
6679
|
type: Boolean,
|
|
6172
6680
|
reflect: true
|
|
6173
6681
|
},
|
|
6174
6682
|
|
|
6175
6683
|
/**
|
|
6176
|
-
* If declared, the
|
|
6684
|
+
* If declared, the focus trap inside of bib will be turned off.
|
|
6177
6685
|
*/
|
|
6178
|
-
|
|
6686
|
+
disableFocusTrap: {
|
|
6179
6687
|
type: Boolean,
|
|
6180
6688
|
reflect: true
|
|
6181
6689
|
},
|
|
@@ -6220,22 +6728,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6220
6728
|
reflect: true
|
|
6221
6729
|
},
|
|
6222
6730
|
|
|
6223
|
-
/**
|
|
6224
|
-
* Makes the trigger to be full width of its parent container.
|
|
6225
|
-
*/
|
|
6226
|
-
fluid: {
|
|
6227
|
-
type: Boolean,
|
|
6228
|
-
reflect: true
|
|
6229
|
-
},
|
|
6230
|
-
|
|
6231
|
-
/**
|
|
6232
|
-
* If declared, will apply padding around trigger slot content.
|
|
6233
|
-
*/
|
|
6234
|
-
inset: {
|
|
6235
|
-
type: Boolean,
|
|
6236
|
-
reflect: true
|
|
6237
|
-
},
|
|
6238
|
-
|
|
6239
6731
|
/**
|
|
6240
6732
|
* If true, the dropdown bib is displayed.
|
|
6241
6733
|
*/
|
|
@@ -6279,15 +6771,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6279
6771
|
reflect: true
|
|
6280
6772
|
},
|
|
6281
6773
|
|
|
6282
|
-
/**
|
|
6283
|
-
* Defines if there is a label preset.
|
|
6284
|
-
* @private
|
|
6285
|
-
*/
|
|
6286
|
-
labeled: {
|
|
6287
|
-
type: Boolean,
|
|
6288
|
-
reflect: true
|
|
6289
|
-
},
|
|
6290
|
-
|
|
6291
6774
|
/**
|
|
6292
6775
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
6293
6776
|
* @private
|
|
@@ -6348,6 +6831,9 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6348
6831
|
reflect: true
|
|
6349
6832
|
},
|
|
6350
6833
|
|
|
6834
|
+
/**
|
|
6835
|
+
* If declared, and a function is set, that function will execute when the slot content is updated.
|
|
6836
|
+
*/
|
|
6351
6837
|
onSlotChange: {
|
|
6352
6838
|
type: Function,
|
|
6353
6839
|
reflect: false
|
|
@@ -6362,14 +6848,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6362
6848
|
reflect: true
|
|
6363
6849
|
},
|
|
6364
6850
|
|
|
6365
|
-
/**
|
|
6366
|
-
* If declared, will apply border-radius to trigger and default slots.
|
|
6367
|
-
*/
|
|
6368
|
-
rounded: {
|
|
6369
|
-
type: Boolean,
|
|
6370
|
-
reflect: true
|
|
6371
|
-
},
|
|
6372
|
-
|
|
6373
6851
|
/**
|
|
6374
6852
|
* @private
|
|
6375
6853
|
*/
|
|
@@ -6384,22 +6862,14 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6384
6862
|
type: String || undefined,
|
|
6385
6863
|
attribute: false,
|
|
6386
6864
|
reflect: false
|
|
6387
|
-
},
|
|
6388
|
-
|
|
6389
|
-
/**
|
|
6390
|
-
* The value for the aria-autocomplete attribute of the trigger element.
|
|
6391
|
-
*/
|
|
6392
|
-
a11yAutocomplete: {
|
|
6393
|
-
type: String,
|
|
6394
|
-
attribute: false,
|
|
6395
6865
|
}
|
|
6396
6866
|
};
|
|
6397
6867
|
}
|
|
6398
6868
|
|
|
6399
6869
|
static get styles() {
|
|
6400
6870
|
return [
|
|
6401
|
-
colorCss$1$2,
|
|
6402
6871
|
tokensCss$1$1,
|
|
6872
|
+
colorCss$1$1,
|
|
6403
6873
|
|
|
6404
6874
|
// default layout
|
|
6405
6875
|
classicColorCss,
|
|
@@ -6462,6 +6932,12 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6462
6932
|
this.handleTriggerContentSlotChange();
|
|
6463
6933
|
}
|
|
6464
6934
|
|
|
6935
|
+
if (changedProperties.has('isPopoverVisible')) {
|
|
6936
|
+
this.updateFocusTrap();
|
|
6937
|
+
if (!this.isPopoverVisible && this.hasFocus) {
|
|
6938
|
+
this.trigger.focus();
|
|
6939
|
+
}
|
|
6940
|
+
}
|
|
6465
6941
|
}
|
|
6466
6942
|
|
|
6467
6943
|
firstUpdated() {
|
|
@@ -6482,9 +6958,6 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6482
6958
|
}
|
|
6483
6959
|
|
|
6484
6960
|
this.bibContent = this.floater.element.bib;
|
|
6485
|
-
this.bibContent.setAttribute('role', 'dialog');
|
|
6486
|
-
this.bibContent.setAttribute('aria-modal', 'true');
|
|
6487
|
-
this.bibContent.setAttribute('aria-labelledby', 'triggerLabel');
|
|
6488
6961
|
|
|
6489
6962
|
// Add the tag name as an attribute if it is different than the component name
|
|
6490
6963
|
this.runtimeUtils.handleComponentTagRename(this, 'auro-dropdown');
|
|
@@ -6531,9 +7004,30 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6531
7004
|
}
|
|
6532
7005
|
|
|
6533
7006
|
/**
|
|
6534
|
-
* Function to support @focusout event.
|
|
6535
7007
|
* @private
|
|
6536
|
-
|
|
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
|
+
|
|
7027
|
+
/**
|
|
7028
|
+
* Function to support @focusout event.
|
|
7029
|
+
* @private
|
|
7030
|
+
* @return {void}
|
|
6537
7031
|
*/
|
|
6538
7032
|
handleFocusout() {
|
|
6539
7033
|
this.hasFocus = false;
|
|
@@ -6815,10 +7309,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
6815
7309
|
id="bib"
|
|
6816
7310
|
shape="${this.shape}"
|
|
6817
7311
|
?data-show="${this.isPopoverVisible}"
|
|
6818
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
6819
|
-
?common="${this.common}"
|
|
6820
|
-
?rounded="${this.common || this.rounded}"
|
|
6821
|
-
?inset="${this.common || this.inset}">
|
|
7312
|
+
?isfullscreen="${this.isBibFullscreen}">
|
|
6822
7313
|
<div class="slotContent">
|
|
6823
7314
|
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
6824
7315
|
</div>
|
|
@@ -7568,7 +8059,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
7568
8059
|
|
|
7569
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}}`;
|
|
7570
8061
|
|
|
7571
|
-
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}`;
|
|
7572
8063
|
|
|
7573
8064
|
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
7574
8065
|
|
|
@@ -7647,7 +8138,7 @@ class AuroLoader extends LitElement {
|
|
|
7647
8138
|
static get styles() {
|
|
7648
8139
|
return [
|
|
7649
8140
|
css`${styleCss$2}`,
|
|
7650
|
-
css`${colorCss$1
|
|
8141
|
+
css`${colorCss$1}`,
|
|
7651
8142
|
css`${tokensCss$1}`
|
|
7652
8143
|
];
|
|
7653
8144
|
}
|
|
@@ -8133,7 +8624,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
8133
8624
|
return _fetchMap.get(uri);
|
|
8134
8625
|
};
|
|
8135
8626
|
|
|
8136
|
-
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}`;
|
|
8137
8628
|
|
|
8138
8629
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8139
8630
|
// See LICENSE in the project root for license information.
|
|
@@ -8176,7 +8667,7 @@ class BaseIcon extends AuroElement$2 {
|
|
|
8176
8667
|
|
|
8177
8668
|
static get styles() {
|
|
8178
8669
|
return css`
|
|
8179
|
-
${styleCss$1
|
|
8670
|
+
${styleCss$1}
|
|
8180
8671
|
`;
|
|
8181
8672
|
}
|
|
8182
8673
|
|
|
@@ -8217,7 +8708,7 @@ class BaseIcon extends AuroElement$2 {
|
|
|
8217
8708
|
}
|
|
8218
8709
|
}
|
|
8219
8710
|
|
|
8220
|
-
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)}`;
|
|
8221
8712
|
|
|
8222
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)}`;
|
|
8223
8714
|
|
|
@@ -8377,8 +8868,8 @@ class AuroIcon extends BaseIcon {
|
|
|
8377
8868
|
static get styles() {
|
|
8378
8869
|
return [
|
|
8379
8870
|
super.styles,
|
|
8380
|
-
css`${tokensCss
|
|
8381
|
-
css`${styleCss$1
|
|
8871
|
+
css`${tokensCss}`,
|
|
8872
|
+
css`${styleCss$1}`,
|
|
8382
8873
|
css`${colorCss$4}`
|
|
8383
8874
|
];
|
|
8384
8875
|
}
|
|
@@ -8471,7 +8962,7 @@ var iconVersion = '8.0.4';
|
|
|
8471
8962
|
|
|
8472
8963
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8473
8964
|
|
|
8474
|
-
|
|
8965
|
+
class AuroLibraryRuntimeUtils {
|
|
8475
8966
|
|
|
8476
8967
|
/* eslint-disable jsdoc/require-param */
|
|
8477
8968
|
|
|
@@ -8532,7 +9023,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
8532
9023
|
|
|
8533
9024
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
8534
9025
|
}
|
|
8535
|
-
}
|
|
9026
|
+
}
|
|
8536
9027
|
|
|
8537
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)}`;
|
|
8538
9029
|
|
|
@@ -8563,7 +9054,7 @@ class AuroHeader extends LitElement {
|
|
|
8563
9054
|
/**
|
|
8564
9055
|
* @private
|
|
8565
9056
|
*/
|
|
8566
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
9057
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
8567
9058
|
}
|
|
8568
9059
|
|
|
8569
9060
|
// function to define props used within the scope of this component
|
|
@@ -8593,7 +9084,7 @@ class AuroHeader extends LitElement {
|
|
|
8593
9084
|
*
|
|
8594
9085
|
*/
|
|
8595
9086
|
static register(name = "auro-header") {
|
|
8596
|
-
AuroLibraryRuntimeUtils
|
|
9087
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
8597
9088
|
}
|
|
8598
9089
|
|
|
8599
9090
|
firstUpdated() {
|
|
@@ -8744,6 +9235,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
8744
9235
|
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
8745
9236
|
}
|
|
8746
9237
|
|
|
9238
|
+
/**
|
|
9239
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
9240
|
+
* @param {Event} event - The touchmove event.
|
|
9241
|
+
* @returns {void}
|
|
9242
|
+
*/
|
|
9243
|
+
preventBodyScroll(event) {
|
|
9244
|
+
if (event.target === this) {
|
|
9245
|
+
event.preventDefault();
|
|
9246
|
+
}
|
|
9247
|
+
}
|
|
9248
|
+
|
|
9249
|
+
connectedCallback() {
|
|
9250
|
+
super.connectedCallback();
|
|
9251
|
+
|
|
9252
|
+
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
9253
|
+
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
9254
|
+
}
|
|
9255
|
+
|
|
9256
|
+
disconnectedCallback() {
|
|
9257
|
+
super.disconnectedCallback();
|
|
9258
|
+
|
|
9259
|
+
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
9260
|
+
}
|
|
9261
|
+
|
|
8747
9262
|
onCloseButtonClick() {
|
|
8748
9263
|
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
8749
9264
|
composed: true }));
|
|
@@ -8775,7 +9290,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
8775
9290
|
<div id="bibTemplate" part="bibtemplate">
|
|
8776
9291
|
${this.isFullscreen ? html$1`
|
|
8777
9292
|
<div id="headerContainer">
|
|
8778
|
-
<${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}">
|
|
8779
9294
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
8780
9295
|
</${this.buttonTag}>
|
|
8781
9296
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
@@ -8801,214 +9316,6 @@ class AuroBibtemplate extends LitElement {
|
|
|
8801
9316
|
|
|
8802
9317
|
var bibTemplateVersion = '1.0.0';
|
|
8803
9318
|
|
|
8804
|
-
var colorCss$1 = 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)}`;
|
|
8805
|
-
|
|
8806
|
-
var styleCss$1 = css`.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}`;
|
|
8807
|
-
|
|
8808
|
-
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
8809
|
-
|
|
8810
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8811
|
-
// See LICENSE in the project root for license information.
|
|
8812
|
-
|
|
8813
|
-
// ---------------------------------------------------------------------
|
|
8814
|
-
|
|
8815
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8816
|
-
|
|
8817
|
-
class AuroLibraryRuntimeUtils {
|
|
8818
|
-
|
|
8819
|
-
/* eslint-disable jsdoc/require-param */
|
|
8820
|
-
|
|
8821
|
-
/**
|
|
8822
|
-
* This will register a new custom element with the browser.
|
|
8823
|
-
* @param {String} name - The name of the custom element.
|
|
8824
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
8825
|
-
* @returns {void}
|
|
8826
|
-
*/
|
|
8827
|
-
registerComponent(name, componentClass) {
|
|
8828
|
-
if (!customElements.get(name)) {
|
|
8829
|
-
customElements.define(name, class extends componentClass {});
|
|
8830
|
-
}
|
|
8831
|
-
}
|
|
8832
|
-
|
|
8833
|
-
/**
|
|
8834
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
8835
|
-
* @returns {void}
|
|
8836
|
-
*/
|
|
8837
|
-
closestElement(
|
|
8838
|
-
selector, // selector like in .closest()
|
|
8839
|
-
base = this, // extra functionality to skip a parent
|
|
8840
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8841
|
-
!el || el === document || el === window
|
|
8842
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
8843
|
-
: found
|
|
8844
|
-
? found // found a selector INside this element
|
|
8845
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8846
|
-
) {
|
|
8847
|
-
return __Closest(base);
|
|
8848
|
-
}
|
|
8849
|
-
/* eslint-enable jsdoc/require-param */
|
|
8850
|
-
|
|
8851
|
-
/**
|
|
8852
|
-
* 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.
|
|
8853
|
-
* @param {Object} elem - The element to check.
|
|
8854
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8855
|
-
* @returns {void}
|
|
8856
|
-
*/
|
|
8857
|
-
handleComponentTagRename(elem, tagName) {
|
|
8858
|
-
const tag = tagName.toLowerCase();
|
|
8859
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
8860
|
-
|
|
8861
|
-
if (elemTag !== tag) {
|
|
8862
|
-
elem.setAttribute(tag, true);
|
|
8863
|
-
}
|
|
8864
|
-
}
|
|
8865
|
-
|
|
8866
|
-
/**
|
|
8867
|
-
* Validates if an element is a specific Auro component.
|
|
8868
|
-
* @param {Object} elem - The element to validate.
|
|
8869
|
-
* @param {String} tagName - The name of the Auro component to check against.
|
|
8870
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8871
|
-
*/
|
|
8872
|
-
elementMatch(elem, tagName) {
|
|
8873
|
-
const tag = tagName.toLowerCase();
|
|
8874
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
8875
|
-
|
|
8876
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
8877
|
-
}
|
|
8878
|
-
}
|
|
8879
|
-
|
|
8880
|
-
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8881
|
-
// See LICENSE in the project root for license information.
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
/**
|
|
8885
|
-
* Displays help text or error messages within form elements - Internal Use Only.
|
|
8886
|
-
*
|
|
8887
|
-
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
8888
|
-
*/
|
|
8889
|
-
class AuroHelpText extends LitElement {
|
|
8890
|
-
|
|
8891
|
-
constructor() {
|
|
8892
|
-
super();
|
|
8893
|
-
|
|
8894
|
-
this.error = false;
|
|
8895
|
-
this.onDark = false;
|
|
8896
|
-
this.hasTextContent = false;
|
|
8897
|
-
|
|
8898
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
8899
|
-
}
|
|
8900
|
-
|
|
8901
|
-
static get styles() {
|
|
8902
|
-
return [
|
|
8903
|
-
colorCss$1,
|
|
8904
|
-
styleCss$1,
|
|
8905
|
-
tokensCss
|
|
8906
|
-
];
|
|
8907
|
-
}
|
|
8908
|
-
|
|
8909
|
-
// function to define props used within the scope of this component
|
|
8910
|
-
static get properties() {
|
|
8911
|
-
return {
|
|
8912
|
-
|
|
8913
|
-
/**
|
|
8914
|
-
* @private
|
|
8915
|
-
*/
|
|
8916
|
-
slotNodes: {
|
|
8917
|
-
type: Boolean,
|
|
8918
|
-
},
|
|
8919
|
-
|
|
8920
|
-
/**
|
|
8921
|
-
* @private
|
|
8922
|
-
*/
|
|
8923
|
-
hasTextContent: {
|
|
8924
|
-
type: Boolean,
|
|
8925
|
-
},
|
|
8926
|
-
|
|
8927
|
-
/**
|
|
8928
|
-
* If declared, make font color red.
|
|
8929
|
-
*/
|
|
8930
|
-
error: {
|
|
8931
|
-
type: Boolean,
|
|
8932
|
-
reflect: true,
|
|
8933
|
-
},
|
|
8934
|
-
|
|
8935
|
-
/**
|
|
8936
|
-
* If declared, will apply onDark styles.
|
|
8937
|
-
*/
|
|
8938
|
-
onDark: {
|
|
8939
|
-
type: Boolean,
|
|
8940
|
-
reflect: true
|
|
8941
|
-
}
|
|
8942
|
-
};
|
|
8943
|
-
}
|
|
8944
|
-
|
|
8945
|
-
/**
|
|
8946
|
-
* This will register this element with the browser.
|
|
8947
|
-
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
8948
|
-
*
|
|
8949
|
-
* @example
|
|
8950
|
-
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
8951
|
-
*
|
|
8952
|
-
*/
|
|
8953
|
-
static register(name = "auro-helptext") {
|
|
8954
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
8955
|
-
}
|
|
8956
|
-
|
|
8957
|
-
updated() {
|
|
8958
|
-
this.handleSlotChange();
|
|
8959
|
-
}
|
|
8960
|
-
|
|
8961
|
-
handleSlotChange(event) {
|
|
8962
|
-
if (event) {
|
|
8963
|
-
this.slotNodes = event.target.assignedNodes();
|
|
8964
|
-
}
|
|
8965
|
-
|
|
8966
|
-
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
8967
|
-
}
|
|
8968
|
-
|
|
8969
|
-
/**
|
|
8970
|
-
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
8971
|
-
*
|
|
8972
|
-
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
8973
|
-
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
8974
|
-
* @private
|
|
8975
|
-
*/
|
|
8976
|
-
checkSlotsForContent(nodes) {
|
|
8977
|
-
if (!nodes) {
|
|
8978
|
-
return false;
|
|
8979
|
-
}
|
|
8980
|
-
|
|
8981
|
-
return nodes.some((node) => {
|
|
8982
|
-
if (node.textContent.trim()) {
|
|
8983
|
-
return true;
|
|
8984
|
-
}
|
|
8985
|
-
|
|
8986
|
-
if (!node.querySelector) {
|
|
8987
|
-
return false;
|
|
8988
|
-
}
|
|
8989
|
-
|
|
8990
|
-
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
8991
|
-
if (!nestedSlot) {
|
|
8992
|
-
return false;
|
|
8993
|
-
}
|
|
8994
|
-
|
|
8995
|
-
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
8996
|
-
return this.checkSlotsForContent(nestedSlotNodes);
|
|
8997
|
-
});
|
|
8998
|
-
}
|
|
8999
|
-
|
|
9000
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
9001
|
-
render() {
|
|
9002
|
-
return html`
|
|
9003
|
-
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
9004
|
-
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
9005
|
-
</div>
|
|
9006
|
-
`;
|
|
9007
|
-
}
|
|
9008
|
-
}
|
|
9009
|
-
|
|
9010
|
-
var helptextVersion = '1.0.0';
|
|
9011
|
-
|
|
9012
9319
|
var styleCss = css`:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
9013
9320
|
|
|
9014
9321
|
var colorCss = css`:host ::slotted(*:not(:first-child)){border-color:var(--ds-auro-counter-divider-color)}`;
|
|
@@ -9045,377 +9352,128 @@ class AuroCounterWrapper extends LitElement {
|
|
|
9045
9352
|
*/
|
|
9046
9353
|
static register(name = "auro-counter-wrapper") {
|
|
9047
9354
|
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterWrapper);
|
|
9048
|
-
}
|
|
9049
|
-
|
|
9050
|
-
// function that renders the HTML and CSS into the scope of the component
|
|
9051
|
-
render() {
|
|
9052
|
-
return html$1`<div class="wrapper"><slot></slot></div>`;
|
|
9053
|
-
}
|
|
9054
|
-
}
|
|
9055
|
-
|
|
9056
|
-
/* istanbul ignore else */
|
|
9057
|
-
// define the name of the custom component
|
|
9058
|
-
if (!customElements.get("auro-counter-wrapper")) {
|
|
9059
|
-
customElements.define("auro-counter-wrapper", AuroCounterWrapper);
|
|
9060
|
-
}
|
|
9061
|
-
|
|
9062
|
-
class AuroElement extends LitElement {
|
|
9063
|
-
static get properties() {
|
|
9064
|
-
return {
|
|
9065
|
-
|
|
9066
|
-
/**
|
|
9067
|
-
* Defines the language of an element.
|
|
9068
|
-
* @default {'default'}
|
|
9069
|
-
*/
|
|
9070
|
-
layout: {
|
|
9071
|
-
type: String,
|
|
9072
|
-
attribute: "layout",
|
|
9073
|
-
reflect: true
|
|
9074
|
-
},
|
|
9075
|
-
|
|
9076
|
-
shape: {
|
|
9077
|
-
type: String,
|
|
9078
|
-
attribute: "shape",
|
|
9079
|
-
reflect: true
|
|
9080
|
-
},
|
|
9081
|
-
|
|
9082
|
-
size: {
|
|
9083
|
-
type: String,
|
|
9084
|
-
attribute: "size",
|
|
9085
|
-
reflect: true
|
|
9086
|
-
},
|
|
9087
|
-
|
|
9088
|
-
onDark: {
|
|
9089
|
-
type: Boolean,
|
|
9090
|
-
attribute: "ondark",
|
|
9091
|
-
reflect: true
|
|
9092
|
-
}
|
|
9093
|
-
};
|
|
9094
|
-
}
|
|
9095
|
-
|
|
9096
|
-
resetShapeClasses() {
|
|
9097
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9098
|
-
|
|
9099
|
-
if (wrapper) {
|
|
9100
|
-
wrapper.classList.forEach((className) => {
|
|
9101
|
-
if (className.startsWith('shape-')) {
|
|
9102
|
-
wrapper.classList.remove(className);
|
|
9103
|
-
}
|
|
9104
|
-
});
|
|
9105
|
-
|
|
9106
|
-
}
|
|
9107
|
-
|
|
9108
|
-
if (this.shape && this.size) {
|
|
9109
|
-
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
9110
|
-
} else {
|
|
9111
|
-
wrapper.classList.add('shape-none');
|
|
9112
|
-
}
|
|
9113
|
-
}
|
|
9114
|
-
|
|
9115
|
-
resetLayoutClasses() {
|
|
9116
|
-
if (this.layout) {
|
|
9117
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9118
|
-
|
|
9119
|
-
if (wrapper) {
|
|
9120
|
-
wrapper.classList.forEach((className) => {
|
|
9121
|
-
if (className.startsWith('layout-')) {
|
|
9122
|
-
wrapper.classList.remove(className);
|
|
9123
|
-
}
|
|
9124
|
-
});
|
|
9125
|
-
|
|
9126
|
-
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
9127
|
-
}
|
|
9128
|
-
}
|
|
9129
|
-
}
|
|
9130
|
-
|
|
9131
|
-
updateComponentArchitecture() {
|
|
9132
|
-
this.resetLayoutClasses();
|
|
9133
|
-
this.resetShapeClasses();
|
|
9134
|
-
}
|
|
9135
|
-
|
|
9136
|
-
updated(changedProperties) {
|
|
9137
|
-
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9138
|
-
this.updateComponentArchitecture();
|
|
9139
|
-
}
|
|
9140
|
-
}
|
|
9141
|
-
|
|
9142
|
-
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
9143
|
-
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
9144
|
-
render() {
|
|
9145
|
-
try {
|
|
9146
|
-
return this.renderLayout();
|
|
9147
|
-
} catch (error) {
|
|
9148
|
-
// failed to get the defined layout
|
|
9149
|
-
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
9150
|
-
|
|
9151
|
-
// fallback to the default layout
|
|
9152
|
-
return this.getLayout('default');
|
|
9153
|
-
}
|
|
9154
|
-
}
|
|
9155
|
-
}
|
|
9156
|
-
|
|
9157
|
-
// Selectors for focusable elements
|
|
9158
|
-
const FOCUSABLE_SELECTORS = [
|
|
9159
|
-
'a[href]',
|
|
9160
|
-
'button:not([disabled])',
|
|
9161
|
-
'textarea:not([disabled])',
|
|
9162
|
-
'input:not([disabled])',
|
|
9163
|
-
'select:not([disabled])',
|
|
9164
|
-
'[role="tab"]:not([disabled])',
|
|
9165
|
-
'[role="link"]:not([disabled])',
|
|
9166
|
-
'[role="button"]:not([disabled])',
|
|
9167
|
-
'[tabindex]:not([tabindex="-1"])',
|
|
9168
|
-
'[contenteditable]:not([contenteditable="false"])'
|
|
9169
|
-
];
|
|
9170
|
-
|
|
9171
|
-
// List of custom components that are known to be focusable
|
|
9172
|
-
const FOCUSABLE_COMPONENTS = [
|
|
9173
|
-
'auro-checkbox',
|
|
9174
|
-
'auro-radio',
|
|
9175
|
-
'auro-dropdown',
|
|
9176
|
-
'auro-button',
|
|
9177
|
-
'auro-combobox',
|
|
9178
|
-
'auro-input',
|
|
9179
|
-
'auro-counter',
|
|
9180
|
-
'auro-menu',
|
|
9181
|
-
'auro-select',
|
|
9182
|
-
'auro-datepicker',
|
|
9183
|
-
'auro-hyperlink',
|
|
9184
|
-
'auro-accordion',
|
|
9185
|
-
];
|
|
9186
|
-
|
|
9187
|
-
/**
|
|
9188
|
-
* Determines if a given element is a custom focusable component.
|
|
9189
|
-
* Returns true if the element matches a known focusable component and is not disabled.
|
|
9190
|
-
*
|
|
9191
|
-
* @param {HTMLElement} element The element to check for focusability.
|
|
9192
|
-
* @returns {boolean} True if the element is a focusable custom component, false otherwise.
|
|
9193
|
-
*/
|
|
9194
|
-
function isFocusableComponent(element) {
|
|
9195
|
-
const componentName = element.tagName.toLowerCase();
|
|
9196
|
-
|
|
9197
|
-
// Guard Clause: Element is a focusable component
|
|
9198
|
-
if (!FOCUSABLE_COMPONENTS.some((name) => element.hasAttribute(name) || componentName === name)) return false;
|
|
9199
|
-
|
|
9200
|
-
// Guard Clause: Element is not disabled
|
|
9201
|
-
if (element.hasAttribute('disabled')) return false;
|
|
9202
|
-
|
|
9203
|
-
// Guard Clause: The element is a hyperlink and has no href attribute
|
|
9204
|
-
if (componentName.match("hyperlink") && !element.hasAttribute('href')) return false;
|
|
9205
|
-
|
|
9206
|
-
// If all guard clauses pass, the element is a focusable component
|
|
9207
|
-
return true;
|
|
9208
|
-
}
|
|
9209
|
-
|
|
9210
|
-
/**
|
|
9211
|
-
* Retrieves all focusable elements within the container in DOM order, including those in shadow DOM and slots.
|
|
9212
|
-
* Returns a unique, ordered array of elements that can receive focus.
|
|
9213
|
-
*
|
|
9214
|
-
* @param {HTMLElement} container The container to search within
|
|
9215
|
-
* @returns {Array<HTMLElement>} An array of focusable elements within the container.
|
|
9216
|
-
*/
|
|
9217
|
-
function getFocusableElements(container) {
|
|
9218
|
-
// Get elements in DOM order by walking the tree
|
|
9219
|
-
const orderedFocusableElements = [];
|
|
9220
|
-
|
|
9221
|
-
// Define a recursive function to collect focusable elements in DOM order
|
|
9222
|
-
const collectFocusableElements = (root) => {
|
|
9223
|
-
// Check if current element is focusable
|
|
9224
|
-
if (root.nodeType === Node.ELEMENT_NODE) {
|
|
9225
|
-
// Check if this is a custom component that is focusable
|
|
9226
|
-
const isComponentFocusable = isFocusableComponent(root);
|
|
9227
|
-
|
|
9228
|
-
if (isComponentFocusable) {
|
|
9229
|
-
// Add the component itself as a focusable element and don't traverse its shadow DOM
|
|
9230
|
-
orderedFocusableElements.push(root);
|
|
9231
|
-
return; // Skip traversing inside this component
|
|
9232
|
-
}
|
|
9233
|
-
|
|
9234
|
-
// Check if the element itself matches any selector
|
|
9235
|
-
for (const selector of FOCUSABLE_SELECTORS) {
|
|
9236
|
-
if (root.matches?.(selector)) {
|
|
9237
|
-
orderedFocusableElements.push(root);
|
|
9238
|
-
break; // Once we know it's focusable, no need to check other selectors
|
|
9239
|
-
}
|
|
9240
|
-
}
|
|
9241
|
-
|
|
9242
|
-
// Process shadow DOM only for non-Auro components
|
|
9243
|
-
if (root.shadowRoot) {
|
|
9244
|
-
// Process shadow DOM children in order
|
|
9245
|
-
if (root.shadowRoot.children) {
|
|
9246
|
-
Array.from(root.shadowRoot.children).forEach(child => {
|
|
9247
|
-
collectFocusableElements(child);
|
|
9248
|
-
});
|
|
9249
|
-
}
|
|
9250
|
-
}
|
|
9251
|
-
|
|
9252
|
-
// Process slots and their assigned nodes in order
|
|
9253
|
-
if (root.tagName === 'SLOT') {
|
|
9254
|
-
const assignedNodes = root.assignedNodes({ flatten: true });
|
|
9255
|
-
for (const node of assignedNodes) {
|
|
9256
|
-
collectFocusableElements(node);
|
|
9257
|
-
}
|
|
9258
|
-
} else {
|
|
9259
|
-
// Process light DOM children in order
|
|
9260
|
-
if (root.children) {
|
|
9261
|
-
Array.from(root.children).forEach(child => {
|
|
9262
|
-
collectFocusableElements(child);
|
|
9263
|
-
});
|
|
9264
|
-
}
|
|
9265
|
-
}
|
|
9266
|
-
}
|
|
9267
|
-
};
|
|
9268
|
-
|
|
9269
|
-
// Start the traversal from the container
|
|
9270
|
-
collectFocusableElements(container);
|
|
9271
|
-
|
|
9272
|
-
// Remove duplicates that might have been collected through different paths
|
|
9273
|
-
// while preserving order
|
|
9274
|
-
const uniqueElements = [];
|
|
9275
|
-
const seen = new Set();
|
|
9276
|
-
|
|
9277
|
-
for (const element of orderedFocusableElements) {
|
|
9278
|
-
if (!seen.has(element)) {
|
|
9279
|
-
seen.add(element);
|
|
9280
|
-
uniqueElements.push(element);
|
|
9281
|
-
}
|
|
9282
|
-
}
|
|
9283
|
-
|
|
9284
|
-
return uniqueElements;
|
|
9285
|
-
}
|
|
9286
|
-
|
|
9287
|
-
/**
|
|
9288
|
-
* FocusTrap manages keyboard focus within a specified container element, ensuring that focus does not leave the container when tabbing.
|
|
9289
|
-
* It is commonly used for modal dialogs or overlays to improve accessibility by trapping focus within interactive UI components.
|
|
9290
|
-
*/
|
|
9291
|
-
class FocusTrap {
|
|
9292
|
-
/**
|
|
9293
|
-
* Creates a new FocusTrap instance for the given container element.
|
|
9294
|
-
* Initializes event listeners and prepares the container for focus management.
|
|
9295
|
-
*
|
|
9296
|
-
* @param {HTMLElement} container The DOM element to trap focus within.
|
|
9297
|
-
* @throws {Error} If the provided container is not a valid HTMLElement.
|
|
9298
|
-
*/
|
|
9299
|
-
constructor(container) {
|
|
9300
|
-
if (!container || !(container instanceof HTMLElement)) {
|
|
9301
|
-
throw new Error("FocusTrap requires a valid HTMLElement.");
|
|
9302
|
-
}
|
|
9303
|
-
|
|
9304
|
-
this.container = container;
|
|
9305
|
-
this.tabDirection = 'forward'; // or 'backward'
|
|
9355
|
+
}
|
|
9306
9356
|
|
|
9307
|
-
|
|
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>`;
|
|
9308
9360
|
}
|
|
9361
|
+
}
|
|
9309
9362
|
|
|
9310
|
-
|
|
9311
|
-
|
|
9312
|
-
|
|
9313
|
-
|
|
9314
|
-
|
|
9315
|
-
*/
|
|
9316
|
-
_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
|
+
}
|
|
9317
9368
|
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9321
|
-
this.container.setAttribute('data-focus-trap-container', true); // Mark for identification
|
|
9322
|
-
}
|
|
9369
|
+
class AuroElement extends LitElement {
|
|
9370
|
+
static get properties() {
|
|
9371
|
+
return {
|
|
9323
9372
|
|
|
9324
|
-
|
|
9325
|
-
|
|
9326
|
-
|
|
9373
|
+
/**
|
|
9374
|
+
* Defines the language of an element.
|
|
9375
|
+
* @default {'default'}
|
|
9376
|
+
*/
|
|
9377
|
+
layout: {
|
|
9378
|
+
type: String,
|
|
9379
|
+
attribute: "layout",
|
|
9380
|
+
reflect: true
|
|
9381
|
+
},
|
|
9327
9382
|
|
|
9328
|
-
|
|
9329
|
-
|
|
9330
|
-
|
|
9331
|
-
|
|
9332
|
-
|
|
9333
|
-
* @private
|
|
9334
|
-
*/
|
|
9335
|
-
_onKeydown = (e) => {
|
|
9336
|
-
|
|
9337
|
-
if (e.key === 'Tab') {
|
|
9383
|
+
shape: {
|
|
9384
|
+
type: String,
|
|
9385
|
+
attribute: "shape",
|
|
9386
|
+
reflect: true
|
|
9387
|
+
},
|
|
9338
9388
|
|
|
9339
|
-
|
|
9340
|
-
|
|
9389
|
+
size: {
|
|
9390
|
+
type: String,
|
|
9391
|
+
attribute: "size",
|
|
9392
|
+
reflect: true
|
|
9393
|
+
},
|
|
9341
9394
|
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
const actives = [activeElement];
|
|
9347
|
-
while (activeElement?.shadowRoot?.activeElement) {
|
|
9348
|
-
actives.push(activeElement.shadowRoot.activeElement);
|
|
9349
|
-
activeElement = activeElement.shadowRoot.activeElement;
|
|
9395
|
+
onDark: {
|
|
9396
|
+
type: Boolean,
|
|
9397
|
+
attribute: "ondark",
|
|
9398
|
+
reflect: true
|
|
9350
9399
|
}
|
|
9400
|
+
};
|
|
9401
|
+
}
|
|
9351
9402
|
|
|
9352
|
-
|
|
9353
|
-
|
|
9403
|
+
resetShapeClasses() {
|
|
9404
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9354
9405
|
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
(
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
: null;
|
|
9406
|
+
if (wrapper) {
|
|
9407
|
+
wrapper.classList.forEach((className) => {
|
|
9408
|
+
if (className.startsWith('shape-')) {
|
|
9409
|
+
wrapper.classList.remove(className);
|
|
9410
|
+
}
|
|
9411
|
+
});
|
|
9362
9412
|
|
|
9363
|
-
if (focusIndex !== null) {
|
|
9364
|
-
focusables[focusIndex].focus();
|
|
9365
|
-
e.preventDefault(); // Prevent default tab behavior
|
|
9366
|
-
e.stopPropagation(); // Stop the event from bubbling up
|
|
9367
|
-
}
|
|
9368
9413
|
}
|
|
9369
|
-
};
|
|
9370
9414
|
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
* @private
|
|
9377
|
-
*/
|
|
9378
|
-
_getFocusableElements() {
|
|
9379
|
-
// Use the imported utility function to get focusable elements
|
|
9380
|
-
const elements = getFocusableElements(this.container);
|
|
9381
|
-
|
|
9382
|
-
// Filter out any elements with the 'focus-bookend' class
|
|
9383
|
-
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
|
+
}
|
|
9384
9420
|
}
|
|
9385
9421
|
|
|
9386
|
-
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
*/
|
|
9390
|
-
focusFirstElement() {
|
|
9391
|
-
const focusables = this._getFocusableElements();
|
|
9392
|
-
if (focusables.length) focusables[0].focus();
|
|
9393
|
-
}
|
|
9422
|
+
resetLayoutClasses() {
|
|
9423
|
+
if (this.layout) {
|
|
9424
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9394
9425
|
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
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
|
+
}
|
|
9402
9436
|
}
|
|
9403
9437
|
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
disconnect() {
|
|
9438
|
+
updateComponentArchitecture() {
|
|
9439
|
+
this.resetLayoutClasses();
|
|
9440
|
+
this.resetShapeClasses();
|
|
9441
|
+
}
|
|
9409
9442
|
|
|
9410
|
-
|
|
9411
|
-
|
|
9443
|
+
updated(changedProperties) {
|
|
9444
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9445
|
+
this.updateComponentArchitecture();
|
|
9412
9446
|
}
|
|
9447
|
+
}
|
|
9413
9448
|
|
|
9414
|
-
|
|
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
|
+
}
|
|
9415
9461
|
}
|
|
9416
9462
|
}
|
|
9417
9463
|
|
|
9418
|
-
/*
|
|
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
|
+
*/
|
|
9419
9477
|
|
|
9420
9478
|
|
|
9421
9479
|
/**
|
|
@@ -9474,10 +9532,11 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9474
9532
|
*/
|
|
9475
9533
|
this.validation = new AuroFormValidation();
|
|
9476
9534
|
|
|
9477
|
-
|
|
9535
|
+
/** @private */
|
|
9536
|
+
this.updateValue = this.updateValue.bind(this);
|
|
9478
9537
|
|
|
9479
9538
|
/** @private */
|
|
9480
|
-
this.
|
|
9539
|
+
this.updateValidity = this.updateValidity.bind(this);
|
|
9481
9540
|
|
|
9482
9541
|
/**
|
|
9483
9542
|
* Generate unique names for dependency components.
|
|
@@ -9504,7 +9563,12 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9504
9563
|
* @private
|
|
9505
9564
|
* @type {string}
|
|
9506
9565
|
*/
|
|
9507
|
-
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);
|
|
9508
9572
|
}
|
|
9509
9573
|
|
|
9510
9574
|
static get styles() {
|
|
@@ -9529,6 +9593,25 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9529
9593
|
reflect: true
|
|
9530
9594
|
},
|
|
9531
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
|
+
|
|
9532
9615
|
/**
|
|
9533
9616
|
* Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)
|
|
9534
9617
|
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
@@ -9616,7 +9699,7 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9616
9699
|
* "top" | "right" | "bottom" | "left" |
|
|
9617
9700
|
* "bottom-start" | "top-start" | "top-end" |
|
|
9618
9701
|
* "right-start" | "right-end" | "bottom-end" |
|
|
9619
|
-
* "left-start" | "left-end"
|
|
9702
|
+
* "left-start" | "left-end".
|
|
9620
9703
|
* @default bottom-start
|
|
9621
9704
|
*/
|
|
9622
9705
|
placement: {
|
|
@@ -9687,54 +9770,98 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9687
9770
|
this.counters = this.querySelectorAll("auro-counter, [auro-counter]");
|
|
9688
9771
|
this.counters.forEach((counter) => {
|
|
9689
9772
|
counter.onDark = this.onDark;
|
|
9690
|
-
counter.addEventListener("input",
|
|
9773
|
+
counter.addEventListener("input", this.updateValue);
|
|
9774
|
+
counter.addEventListener("auroFormElement-validated", this.updateValidity);
|
|
9691
9775
|
});
|
|
9692
9776
|
}
|
|
9693
9777
|
|
|
9694
9778
|
/**
|
|
9695
|
-
*
|
|
9696
|
-
* @
|
|
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.
|
|
9697
9782
|
* @private
|
|
9698
9783
|
*/
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
// Check if the dropdown is open
|
|
9702
|
-
const dropdownIsOpen = this.dropdown.isPopoverVisible;
|
|
9784
|
+
renderHelpTextErrors(messages) {
|
|
9703
9785
|
|
|
9704
|
-
//
|
|
9705
|
-
|
|
9786
|
+
// Return empty template if no messages are provided
|
|
9787
|
+
if (!messages || messages.length === 0) return html$1``;
|
|
9706
9788
|
|
|
9707
|
-
//
|
|
9708
|
-
|
|
9789
|
+
// Return messages as a TemplateResult
|
|
9790
|
+
return messages.map(message => html$1`<p>${message}</p>`);
|
|
9791
|
+
}
|
|
9709
9792
|
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
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');
|
|
9713
9801
|
}
|
|
9714
9802
|
|
|
9715
9803
|
/**
|
|
9716
|
-
*
|
|
9717
|
-
*
|
|
9718
|
-
*
|
|
9719
|
-
* @
|
|
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.
|
|
9720
9819
|
* @returns {void}
|
|
9721
9820
|
* @private
|
|
9722
9821
|
*/
|
|
9723
|
-
|
|
9822
|
+
updateValidity () {
|
|
9724
9823
|
|
|
9725
|
-
//
|
|
9726
|
-
if (
|
|
9727
|
-
this.dropdownFocusTrap = new FocusTrap(this.dropdown.bibContent);
|
|
9728
|
-
this.dropdownFocusTrap.focusFirstElement();
|
|
9729
|
-
return;
|
|
9730
|
-
}
|
|
9824
|
+
// We don't need to do anything if there are no counters
|
|
9825
|
+
if (!this.counters) return;
|
|
9731
9826
|
|
|
9732
|
-
//
|
|
9733
|
-
|
|
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(() => {
|
|
9734
9830
|
|
|
9735
|
-
|
|
9736
|
-
|
|
9737
|
-
|
|
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
|
+
});
|
|
9738
9865
|
}
|
|
9739
9866
|
|
|
9740
9867
|
/**
|
|
@@ -9747,14 +9874,13 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9747
9874
|
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
9748
9875
|
this.dropdown.requestUpdate();
|
|
9749
9876
|
|
|
9750
|
-
this.dropdown.addEventListener("auroDropdown-toggled", this.handleDropdownToggle);
|
|
9751
|
-
|
|
9752
9877
|
const counterWrapper = this.shadowRoot.querySelector('auro-counter-wrapper');
|
|
9753
9878
|
const counterSlot = counterWrapper.querySelector('slot');
|
|
9754
9879
|
this.counters = counterSlot.assignedElements().filter(el => el.tagName.toLowerCase() === 'auro-counter' || el.hasAttribute('auro-counter'));
|
|
9755
9880
|
|
|
9756
9881
|
this.counters.forEach((counter) => {
|
|
9757
|
-
counter.addEventListener("input",
|
|
9882
|
+
counter.addEventListener("input", this.updateValue);
|
|
9883
|
+
counter.addEventListener("auroFormElement-validated", this.updateValidity);
|
|
9758
9884
|
});
|
|
9759
9885
|
|
|
9760
9886
|
if (this.isDropdown) {
|
|
@@ -9894,13 +10020,6 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9894
10020
|
this.updateValueText();
|
|
9895
10021
|
}
|
|
9896
10022
|
|
|
9897
|
-
disconnectedCallback() {
|
|
9898
|
-
super.disconnectedCallback();
|
|
9899
|
-
|
|
9900
|
-
// Remove the event listener for dropdown toggling
|
|
9901
|
-
this.removeEventListener("auroDropdown-toggled", this.handleDropdownToggle);
|
|
9902
|
-
}
|
|
9903
|
-
|
|
9904
10023
|
/**
|
|
9905
10024
|
* Registers the custom element with the browser.
|
|
9906
10025
|
* @param {string} [name="auro-counter-group"] - Custom element name to register.
|
|
@@ -9911,6 +10030,57 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9911
10030
|
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterGroup);
|
|
9912
10031
|
}
|
|
9913
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
|
+
|
|
9914
10084
|
/**
|
|
9915
10085
|
* Render the dropdown structure for the counter group.
|
|
9916
10086
|
* @returns {TemplateResult} The dropdown template.
|
|
@@ -9920,7 +10090,7 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9920
10090
|
return html$1`
|
|
9921
10091
|
<${this.dropdownTag}
|
|
9922
10092
|
noHideOnThisFocusLoss
|
|
9923
|
-
chevron
|
|
10093
|
+
chevron
|
|
9924
10094
|
part="dropdown"
|
|
9925
10095
|
?autoPlacement="${this.autoPlacement}"
|
|
9926
10096
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
@@ -9967,28 +10137,13 @@ class AuroCounterGroup extends AuroElement {
|
|
|
9967
10137
|
${this.counters && Array.from(this.counters).map((counter, index) => html$1`${counter.value} ${counter.defaultSlot}${index !== this.counters.length - 1 ? ', ' : ''}`)}
|
|
9968
10138
|
</slot>
|
|
9969
10139
|
</div>
|
|
9970
|
-
<div class="accents right"
|
|
10140
|
+
<div class="accents right">
|
|
10141
|
+
${this.renderValidationErrorIcon()}
|
|
10142
|
+
</div>
|
|
9971
10143
|
</div>
|
|
9972
10144
|
`;
|
|
9973
10145
|
};
|
|
9974
10146
|
|
|
9975
|
-
/**
|
|
9976
|
-
* Render the help text for the counter group.
|
|
9977
|
-
* @returns {TemplateResult} The help text template.
|
|
9978
|
-
* @private
|
|
9979
|
-
*/
|
|
9980
|
-
renderHelpText() {
|
|
9981
|
-
return html$1`
|
|
9982
|
-
<div slot="helpText">
|
|
9983
|
-
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
9984
|
-
<p id="${this.uniqueId}" part="helpText">
|
|
9985
|
-
<slot name="helpText"></slot>
|
|
9986
|
-
</p>
|
|
9987
|
-
</${this.helpTextTag}>
|
|
9988
|
-
</div>
|
|
9989
|
-
`;
|
|
9990
|
-
}
|
|
9991
|
-
|
|
9992
10147
|
/**
|
|
9993
10148
|
* Render the dropdown bib template for the dropdown.
|
|
9994
10149
|
* @returns {TemplateResult} The bib template.
|