@aurodesignsystem-dev/auro-formkit 0.0.0-pr1001.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/CHANGELOG.md +5 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +314 -0
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +50 -0
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
- package/components/bibtemplate/dist/index.d.ts +2 -0
- package/components/bibtemplate/dist/index.js +1940 -0
- package/components/bibtemplate/dist/registered.js +1940 -0
- package/components/bibtemplate/dist/styles/color-css.d.ts +2 -0
- package/components/bibtemplate/dist/styles/style-css.d.ts +2 -0
- package/components/bibtemplate/dist/styles/tokens-css.d.ts +2 -0
- package/components/checkbox/README.md +142 -0
- package/components/checkbox/demo/api.html +61 -0
- package/components/checkbox/demo/api.js +17 -0
- package/components/checkbox/demo/api.md +436 -0
- package/components/checkbox/demo/api.min.js +1870 -0
- package/components/checkbox/demo/index.html +57 -0
- package/components/checkbox/demo/index.js +8 -0
- package/components/checkbox/demo/index.md +327 -0
- package/components/checkbox/demo/index.min.js +1845 -0
- package/components/checkbox/demo/readme.html +57 -0
- package/components/checkbox/demo/readme.md +142 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts +166 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +136 -0
- package/components/checkbox/dist/helptextVersion.d.ts +2 -0
- package/components/checkbox/dist/index.d.ts +3 -0
- package/components/checkbox/dist/index.js +1794 -0
- package/components/checkbox/dist/registered.js +1795 -0
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +2 -0
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +2 -0
- package/components/checkbox/dist/styles/color-css.d.ts +2 -0
- package/components/checkbox/dist/styles/colorGroup-css.d.ts +2 -0
- package/components/checkbox/dist/styles/tokens-css.d.ts +2 -0
- package/components/combobox/README.md +154 -0
- package/components/combobox/demo/api.html +63 -0
- package/components/combobox/demo/api.js +36 -0
- package/components/combobox/demo/api.md +1326 -0
- package/components/combobox/demo/api.min.js +18691 -0
- package/components/combobox/demo/index.html +63 -0
- package/components/combobox/demo/index.js +26 -0
- package/components/combobox/demo/index.md +725 -0
- package/components/combobox/demo/index.min.js +18545 -0
- package/components/combobox/demo/readme.html +57 -0
- package/components/combobox/demo/readme.md +154 -0
- package/components/combobox/dist/auro-combobox.d.ts +434 -0
- package/components/combobox/dist/bibtemplateVersion.d.ts +2 -0
- package/components/combobox/dist/dropdownVersion.d.ts +2 -0
- package/components/combobox/dist/index.d.ts +2 -0
- package/components/combobox/dist/index.js +16999 -0
- package/components/combobox/dist/inputVersion.d.ts +2 -0
- package/components/combobox/dist/registered.js +17001 -0
- package/components/combobox/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/style-css.d.ts +2 -0
- package/components/counter/README.md +146 -0
- package/components/counter/demo/api.html +61 -0
- package/components/counter/demo/api.js +20 -0
- package/components/counter/demo/api.md +730 -0
- package/components/counter/demo/api.min.js +10406 -0
- package/components/counter/demo/index.html +61 -0
- package/components/counter/demo/index.js +21 -0
- package/components/counter/demo/index.md +401 -0
- package/components/counter/demo/index.min.js +10370 -0
- package/components/counter/demo/readme.html +57 -0
- package/components/counter/demo/readme.md +146 -0
- package/components/counter/dist/auro-counter-button.d.ts +14 -0
- package/components/counter/dist/auro-counter-group.d.ts +386 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts +22 -0
- package/components/counter/dist/auro-counter.d.ts +113 -0
- package/components/counter/dist/bibtemplateVersion.d.ts +2 -0
- package/components/counter/dist/dropdownVersion.d.ts +2 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +2 -0
- package/components/counter/dist/index.d.ts +3 -0
- package/components/counter/dist/index.js +10313 -0
- package/components/counter/dist/registered.js +10314 -0
- package/components/counter/dist/styles/color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
- package/components/counter/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/counter/dist/styles/style-css.d.ts +2 -0
- package/components/counter/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/README.md +141 -0
- package/components/datepicker/demo/api.html +63 -0
- package/components/datepicker/demo/api.js +35 -0
- package/components/datepicker/demo/api.md +1529 -0
- package/components/datepicker/demo/api.min.js +29755 -0
- package/components/datepicker/demo/index.html +62 -0
- package/components/datepicker/demo/index.js +19 -0
- package/components/datepicker/demo/index.md +204 -0
- package/components/datepicker/demo/index.min.js +29476 -0
- package/components/datepicker/demo/readme.html +57 -0
- package/components/datepicker/demo/readme.md +141 -0
- package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
- package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
- package/components/datepicker/dist/auro-calendar.d.ts +133 -0
- package/components/datepicker/dist/auro-datepicker.d.ts +625 -0
- package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
- package/components/datepicker/dist/buttonVersion.d.ts +2 -0
- package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.d.ts +2 -0
- package/components/datepicker/dist/index.js +29406 -0
- package/components/datepicker/dist/inputVersion.d.ts +2 -0
- package/components/datepicker/dist/popoverVersion.d.ts +2 -0
- package/components/datepicker/dist/registered.js +29406 -0
- package/components/datepicker/dist/styles/classic/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/dist/utilities.d.ts +78 -0
- package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
- package/components/dropdown/README.md +144 -0
- package/components/dropdown/demo/api.html +63 -0
- package/components/dropdown/demo/api.js +21 -0
- package/components/dropdown/demo/api.md +1266 -0
- package/components/dropdown/demo/api.min.js +4442 -0
- package/components/dropdown/demo/index.html +61 -0
- package/components/dropdown/demo/index.js +19 -0
- package/components/dropdown/demo/index.md +337 -0
- package/components/dropdown/demo/index.min.js +4405 -0
- package/components/dropdown/demo/readme.html +57 -0
- package/components/dropdown/demo/readme.md +144 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +425 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +68 -0
- package/components/dropdown/dist/dropdownVersion.d.ts +2 -0
- package/components/dropdown/dist/helptextVersion.d.ts +2 -0
- package/components/dropdown/dist/iconVersion.d.ts +2 -0
- package/components/dropdown/dist/index.d.ts +2 -0
- package/components/dropdown/dist/index.js +4350 -0
- package/components/dropdown/dist/registered.js +4350 -0
- package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
- package/components/form/README.md +142 -0
- package/components/form/demo/api.html +56 -0
- package/components/form/demo/api.js +3 -0
- package/components/form/demo/api.md +51 -0
- package/components/form/demo/api.min.js +638 -0
- package/components/form/demo/autocomplete.html +31 -0
- package/components/form/demo/index.html +57 -0
- package/components/form/demo/index.js +4 -0
- package/components/form/demo/index.md +403 -0
- package/components/form/demo/index.min.js +639 -0
- package/components/form/demo/readme.html +57 -0
- package/components/form/demo/readme.md +142 -0
- package/components/form/demo/registerDemoDeps.js +23 -0
- package/components/form/demo/working.html +124 -0
- package/components/form/dist/auro-form.d.ts +223 -0
- package/components/form/dist/index.d.ts +2 -0
- package/components/form/dist/index.js +614 -0
- package/components/form/dist/registered.d.ts +1 -0
- package/components/form/dist/registered.js +614 -0
- package/components/form/dist/styles/style-css.d.ts +2 -0
- package/components/helptext/dist/auro-helptext.d.ts +59 -0
- package/components/helptext/dist/index.d.ts +2 -0
- package/components/helptext/dist/index.js +207 -0
- package/components/helptext/dist/registered.js +207 -0
- package/components/helptext/dist/styles/color-css.d.ts +2 -0
- package/components/helptext/dist/styles/style-css.d.ts +2 -0
- package/components/helptext/dist/styles/tokens-css.d.ts +2 -0
- package/components/input/README.md +139 -0
- package/components/input/demo/api.html +48 -0
- package/components/input/demo/api.js +29 -0
- package/components/input/demo/api.md +1366 -0
- package/components/input/demo/api.min.js +8542 -0
- package/components/input/demo/index.html +49 -0
- package/components/input/demo/index.js +20 -0
- package/components/input/demo/index.md +270 -0
- package/components/input/demo/index.min.js +8461 -0
- package/components/input/demo/readme.html +57 -0
- package/components/input/demo/readme.md +139 -0
- package/components/input/dist/auro-input.d.ts +167 -0
- package/components/input/dist/base-input.d.ts +566 -0
- package/components/input/dist/buttonVersion.d.ts +2 -0
- package/components/input/dist/helptextVersion.d.ts +2 -0
- package/components/input/dist/i18n.d.ts +18 -0
- package/components/input/dist/iconVersion.d.ts +2 -0
- package/components/input/dist/index.d.ts +2 -0
- package/components/input/dist/index.js +8367 -0
- package/components/input/dist/registered.js +8367 -0
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/dist/styles/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/borders-css.d.ts +2 -0
- package/components/input/dist/styles/default/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
- package/components/input/dist/styles/default/style-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/input/dist/styles/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/input/dist/styles/style-css.d.ts +2 -0
- package/components/input/dist/styles/tokens-css.d.ts +2 -0
- package/components/input/dist/utilities.d.ts +25 -0
- package/components/layoutElement/dist/auroElement.d.ts +34 -0
- package/components/layoutElement/dist/index.d.ts +2 -0
- package/components/layoutElement/dist/index.js +98 -0
- package/components/layoutElement/dist/registered.js +98 -0
- package/components/menu/README.md +145 -0
- package/components/menu/demo/api.html +62 -0
- package/components/menu/demo/api.js +27 -0
- package/components/menu/demo/api.md +1011 -0
- package/components/menu/demo/api.min.js +1762 -0
- package/components/menu/demo/index.html +58 -0
- package/components/menu/demo/index.js +28 -0
- package/components/menu/demo/index.md +61 -0
- package/components/menu/demo/index.min.js +1708 -0
- package/components/menu/demo/readme.html +57 -0
- package/components/menu/demo/readme.md +145 -0
- package/components/menu/dist/auro-menu-utils.d.ts +34 -0
- package/components/menu/dist/auro-menu.d.ts +246 -0
- package/components/menu/dist/auro-menuoption.d.ts +81 -0
- package/components/menu/dist/dropdownVersion.d.ts +2 -0
- package/components/menu/dist/iconVersion.d.ts +2 -0
- package/components/menu/dist/index.d.ts +4 -0
- package/components/menu/dist/index.js +1691 -0
- package/components/menu/dist/registered.js +1651 -0
- package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/README.md +137 -0
- package/components/radio/demo/api.html +59 -0
- package/components/radio/demo/api.js +19 -0
- package/components/radio/demo/api.md +602 -0
- package/components/radio/demo/api.min.js +1951 -0
- package/components/radio/demo/index.html +56 -0
- package/components/radio/demo/index.js +8 -0
- package/components/radio/demo/index.md +150 -0
- package/components/radio/demo/index.min.js +1908 -0
- package/components/radio/demo/readme.html +57 -0
- package/components/radio/demo/readme.md +137 -0
- package/components/radio/dist/auro-radio-group.d.ts +194 -0
- package/components/radio/dist/auro-radio.d.ts +147 -0
- package/components/radio/dist/helptextVersion.d.ts +2 -0
- package/components/radio/dist/index.d.ts +3 -0
- package/components/radio/dist/index.js +1857 -0
- package/components/radio/dist/registered.js +1858 -0
- package/components/radio/dist/styles/auro-radio-group-css.d.ts +2 -0
- package/components/radio/dist/styles/color-css.d.ts +2 -0
- package/components/radio/dist/styles/groupColor-css.d.ts +2 -0
- package/components/radio/dist/styles/style-css.d.ts +2 -0
- package/components/radio/dist/styles/tokens-css.d.ts +2 -0
- package/components/select/README.md +145 -0
- package/components/select/demo/api.html +77 -0
- package/components/select/demo/api.js +35 -0
- package/components/select/demo/api.md +1413 -0
- package/components/select/demo/api.min.js +10502 -0
- package/components/select/demo/index.html +73 -0
- package/components/select/demo/index.js +9 -0
- package/components/select/demo/index.md +1151 -0
- package/components/select/demo/index.min.js +10390 -0
- package/components/select/demo/readme.html +57 -0
- package/components/select/demo/readme.md +145 -0
- package/components/select/dist/auro-select.d.ts +512 -0
- package/components/select/dist/bibtemplateVersion.d.ts +2 -0
- package/components/select/dist/dropdownVersion.d.ts +2 -0
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.d.ts +2 -0
- package/components/select/dist/index.js +8898 -0
- package/components/select/dist/registered.js +8898 -0
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/style-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +218 -0
|
@@ -0,0 +1,1940 @@
|
|
|
1
|
+
import { css, LitElement, html } from 'lit';
|
|
2
|
+
import { unsafeStatic, literal, html as html$1 } from 'lit/static-html.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
|
+
|
|
6
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
7
|
+
|
|
8
|
+
var styleCss$4 = css`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column;padding:var(--ds-size-200, 1rem);padding-top:var(--ds-size-400, 2rem);padding-bottom:0}#headerContainer .titleRow{display:flex;flex-direction:row;justify-content:space-between;gap:var(--ds-size-100, 0.5rem)}#headerContainer .header{max-width:calc(100vw - var(--ds-size-900, 4.5rem));padding-top:var(--ds-size-200, 1rem)}#headerContainer .subheader{width:100%}#closeButton [auro-icon]{--ds-auro-icon-size: var(--ds-size-500, 2.5rem)}#bodyContainer{position:relative;overflow:auto;flex:1 1 100%}:host([isfullscreen]) #bibTemplate{max-height:100dvh}:host([isfullscreen]) #bodyContainer{margin-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
9
|
+
|
|
10
|
+
var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-basic-color-surface-default, #ffffff)}`;
|
|
11
|
+
|
|
12
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13
|
+
// See LICENSE in the project root for license information.
|
|
14
|
+
|
|
15
|
+
// ---------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
18
|
+
|
|
19
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
20
|
+
|
|
21
|
+
/* eslint-disable jsdoc/require-param */
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* This will register a new custom element with the browser.
|
|
25
|
+
* @param {String} name - The name of the custom element.
|
|
26
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
27
|
+
* @returns {void}
|
|
28
|
+
*/
|
|
29
|
+
registerComponent(name, componentClass) {
|
|
30
|
+
if (!customElements.get(name)) {
|
|
31
|
+
customElements.define(name, class extends componentClass {});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
37
|
+
* @returns {void}
|
|
38
|
+
*/
|
|
39
|
+
closestElement(
|
|
40
|
+
selector, // selector like in .closest()
|
|
41
|
+
base = this, // extra functionality to skip a parent
|
|
42
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
43
|
+
!el || el === document || el === window
|
|
44
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
45
|
+
: found
|
|
46
|
+
? found // found a selector INside this element
|
|
47
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
48
|
+
) {
|
|
49
|
+
return __Closest(base);
|
|
50
|
+
}
|
|
51
|
+
/* eslint-enable jsdoc/require-param */
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* 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.
|
|
55
|
+
* @param {Object} elem - The element to check.
|
|
56
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
57
|
+
* @returns {void}
|
|
58
|
+
*/
|
|
59
|
+
handleComponentTagRename(elem, tagName) {
|
|
60
|
+
const tag = tagName.toLowerCase();
|
|
61
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
62
|
+
|
|
63
|
+
if (elemTag !== tag) {
|
|
64
|
+
elem.setAttribute(tag, true);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Validates if an element is a specific Auro component.
|
|
70
|
+
* @param {Object} elem - The element to validate.
|
|
71
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
72
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
73
|
+
*/
|
|
74
|
+
elementMatch(elem, tagName) {
|
|
75
|
+
const tag = tagName.toLowerCase();
|
|
76
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
77
|
+
|
|
78
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
83
|
+
// See LICENSE in the project root for license information.
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class AuroDependencyVersioning {
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Generates a unique string to be used for child auro element naming.
|
|
90
|
+
* @private
|
|
91
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
92
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
93
|
+
* @returns {string} - Unique string to be used for naming.
|
|
94
|
+
*/
|
|
95
|
+
generateElementName(baseName, version) {
|
|
96
|
+
let result = baseName;
|
|
97
|
+
|
|
98
|
+
result += '-';
|
|
99
|
+
result += version.replace(/[.]/g, '_');
|
|
100
|
+
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Generates a unique string to be used for child auro element naming.
|
|
106
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
107
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
108
|
+
* @returns {string} - Unique string to be used for naming.
|
|
109
|
+
*/
|
|
110
|
+
generateTag(baseName, version, tagClass) {
|
|
111
|
+
const elementName = this.generateElementName(baseName, version);
|
|
112
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
113
|
+
|
|
114
|
+
if (!customElements.get(elementName)) {
|
|
115
|
+
customElements.define(elementName, class extends tagClass {});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return tag;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
124
|
+
*/
|
|
125
|
+
const _observers = new WeakMap();
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
129
|
+
* Structure: {
|
|
130
|
+
* host: {
|
|
131
|
+
* matchers: Set<Function>,
|
|
132
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
133
|
+
* }
|
|
134
|
+
* }
|
|
135
|
+
*/
|
|
136
|
+
const _transportConfig = new WeakMap();
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
140
|
+
*
|
|
141
|
+
* @param {Object} params - The parameters for the function.
|
|
142
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
143
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
144
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
145
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
146
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
147
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
148
|
+
*/
|
|
149
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
150
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
151
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
152
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
156
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
157
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Guard Clause: Ensure match is a function
|
|
161
|
+
if (typeof match !== 'function') {
|
|
162
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
166
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
167
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Register this transport and get cleanup function
|
|
171
|
+
return _registerTransport({
|
|
172
|
+
host,
|
|
173
|
+
target,
|
|
174
|
+
matcher: match,
|
|
175
|
+
removeOriginal
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
181
|
+
*
|
|
182
|
+
* @param {Object} params - The parameters object.
|
|
183
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
184
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
185
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
186
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
187
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
188
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
189
|
+
* @private
|
|
190
|
+
*/
|
|
191
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
192
|
+
// Initialize config for this host if it doesn't exist
|
|
193
|
+
if (!_transportConfig.has(host)) {
|
|
194
|
+
_transportConfig.set(host, {
|
|
195
|
+
matchers: new Set(),
|
|
196
|
+
targets: new Map()
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
const config = _transportConfig.get(host);
|
|
201
|
+
|
|
202
|
+
// Add the matcher to the set of matchers for this host
|
|
203
|
+
config.matchers.add(matcher);
|
|
204
|
+
|
|
205
|
+
// Initialize target entry if it doesn't exist
|
|
206
|
+
if (!config.targets.has(target)) {
|
|
207
|
+
config.targets.set(target, new Map());
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
211
|
+
config.targets.get(target).set(matcher, {
|
|
212
|
+
removeOriginal,
|
|
213
|
+
currentAttributes: new Map()
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Perform initial attribute transport
|
|
217
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
218
|
+
|
|
219
|
+
// Attach observer
|
|
220
|
+
_attachObserver(host);
|
|
221
|
+
|
|
222
|
+
// Return cleanup function and utility functions
|
|
223
|
+
return {
|
|
224
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
225
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
226
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
232
|
+
*
|
|
233
|
+
* @param {HTMLElement} host - The host element
|
|
234
|
+
* @param {HTMLElement} target - The target element
|
|
235
|
+
* @param {Function} matcher - The matcher function
|
|
236
|
+
* @private
|
|
237
|
+
*/
|
|
238
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
239
|
+
const config = _transportConfig.get(host);
|
|
240
|
+
if (!config) return;
|
|
241
|
+
|
|
242
|
+
// Remove this matcher from this target
|
|
243
|
+
const targetMatchers = config.targets.get(target);
|
|
244
|
+
if (targetMatchers) {
|
|
245
|
+
targetMatchers.delete(matcher);
|
|
246
|
+
|
|
247
|
+
// If this target has no more matchers, remove it
|
|
248
|
+
if (targetMatchers.size === 0) {
|
|
249
|
+
config.targets.delete(target);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Check if this matcher is still used by any target
|
|
254
|
+
let matcherStillUsed = false;
|
|
255
|
+
for (const matcherMap of config.targets.values()) {
|
|
256
|
+
if (matcherMap.has(matcher)) {
|
|
257
|
+
matcherStillUsed = true;
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// If not used anymore, remove from matchers set
|
|
263
|
+
if (!matcherStillUsed) {
|
|
264
|
+
config.matchers.delete(matcher);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// If no more targets or matchers, detach observer
|
|
268
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
269
|
+
_detachObserver(host);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
275
|
+
*
|
|
276
|
+
* @param {Object} params - The parameters object.
|
|
277
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
278
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
279
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
280
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
281
|
+
* @returns {void}
|
|
282
|
+
* @private
|
|
283
|
+
*/
|
|
284
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
285
|
+
// Get a list of all matching attributes on the host element and their values
|
|
286
|
+
const matchingAttributes = host.getAttributeNames()
|
|
287
|
+
.filter(attr => matcher(attr))
|
|
288
|
+
.reduce((acc, attr) => {
|
|
289
|
+
acc[attr] = host.getAttribute(attr);
|
|
290
|
+
return acc;
|
|
291
|
+
}, {});
|
|
292
|
+
|
|
293
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
294
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
295
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
296
|
+
target.setAttribute(key, value);
|
|
297
|
+
if (removeOriginal) {
|
|
298
|
+
host.removeAttribute(key);
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
305
|
+
*
|
|
306
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
307
|
+
* @returns {MutationObserver} The observer instance.
|
|
308
|
+
* @private
|
|
309
|
+
*/
|
|
310
|
+
const _attachObserver = (host) => {
|
|
311
|
+
// If an observer for this host already exists, return it
|
|
312
|
+
if (_observers.has(host)) {
|
|
313
|
+
return _observers.get(host);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
// Create a new MutationObserver
|
|
317
|
+
const observer = new MutationObserver((mutations) => {
|
|
318
|
+
const config = _transportConfig.get(host);
|
|
319
|
+
if (!config) return;
|
|
320
|
+
|
|
321
|
+
// For each mutation affecting attributes
|
|
322
|
+
mutations
|
|
323
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
324
|
+
.forEach(mutation => {
|
|
325
|
+
const attributeName = mutation.attributeName;
|
|
326
|
+
|
|
327
|
+
// Find matchers that care about this attribute
|
|
328
|
+
for (const matcher of config.matchers) {
|
|
329
|
+
if (matcher(attributeName)) {
|
|
330
|
+
// For each target that uses this matcher
|
|
331
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
332
|
+
if (matcherConfigs.has(matcher)) {
|
|
333
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
334
|
+
_transportAttributes({
|
|
335
|
+
host,
|
|
336
|
+
target,
|
|
337
|
+
matcher,
|
|
338
|
+
removeOriginal
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
// Start observing attribute changes
|
|
348
|
+
observer.observe(host, { attributes: true });
|
|
349
|
+
|
|
350
|
+
// Store the observer
|
|
351
|
+
_observers.set(host, observer);
|
|
352
|
+
|
|
353
|
+
return observer;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
358
|
+
*
|
|
359
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
360
|
+
* @private
|
|
361
|
+
*/
|
|
362
|
+
const _detachObserver = (host) => {
|
|
363
|
+
if (_observers.has(host)) {
|
|
364
|
+
const observer = _observers.get(host);
|
|
365
|
+
observer.disconnect();
|
|
366
|
+
_observers.delete(host);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
// Clean up the transport config as well
|
|
370
|
+
if (_transportConfig.has(host)) {
|
|
371
|
+
_transportConfig.delete(host);
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
377
|
+
* @param {HTMLElement} host - The host element
|
|
378
|
+
* @param {HTMLElement} target - The target element
|
|
379
|
+
* @param {Function} matcher - The matcher function
|
|
380
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
381
|
+
* @private
|
|
382
|
+
*/
|
|
383
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
384
|
+
const config = _transportConfig.get(host);
|
|
385
|
+
if (!config) return undefined;
|
|
386
|
+
|
|
387
|
+
const targetMatchers = config.targets.get(target);
|
|
388
|
+
if (!targetMatchers) return undefined;
|
|
389
|
+
|
|
390
|
+
return targetMatchers.get(matcher);
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Sets an observed attribute value
|
|
395
|
+
* @param {HTMLElement} host - The host element
|
|
396
|
+
* @param {HTMLElement} target - The target element
|
|
397
|
+
* @param {Function} matcher - The matcher function
|
|
398
|
+
* @param {string} key - The attribute name
|
|
399
|
+
* @param {string} value - The attribute value
|
|
400
|
+
* @private
|
|
401
|
+
*/
|
|
402
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
403
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
404
|
+
if (matcherConfig) {
|
|
405
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
|
|
409
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
410
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
411
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
412
|
+
return undefined;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
416
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
417
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
418
|
+
return [];
|
|
419
|
+
};
|
|
420
|
+
|
|
421
|
+
const _matchers = {
|
|
422
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
423
|
+
'role': attr => attr.match(/^role$/)
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
427
|
+
return transportAttributes({
|
|
428
|
+
host,
|
|
429
|
+
target,
|
|
430
|
+
match: attr => {
|
|
431
|
+
for (const key in _matchers) {
|
|
432
|
+
if (_matchers[key](attr)) return true;
|
|
433
|
+
}
|
|
434
|
+
return false;
|
|
435
|
+
},
|
|
436
|
+
removeOriginal
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
441
|
+
|
|
442
|
+
/**
|
|
443
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
444
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
445
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
446
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
447
|
+
* @private
|
|
448
|
+
*/
|
|
449
|
+
attributeWatcher;
|
|
450
|
+
|
|
451
|
+
static get properties() {
|
|
452
|
+
return {
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Defines the layout of an element.
|
|
456
|
+
* @default {'default'}
|
|
457
|
+
*/
|
|
458
|
+
layout: {
|
|
459
|
+
type: String,
|
|
460
|
+
attribute: "layout",
|
|
461
|
+
reflect: true
|
|
462
|
+
},
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Defines the shape of an element.
|
|
466
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
467
|
+
* @default {'default'}
|
|
468
|
+
*/
|
|
469
|
+
shape: {
|
|
470
|
+
type: String,
|
|
471
|
+
attribute: "shape",
|
|
472
|
+
reflect: true
|
|
473
|
+
},
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Defines the size of an element.
|
|
477
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
478
|
+
* @default {'md'}
|
|
479
|
+
*/
|
|
480
|
+
size: {
|
|
481
|
+
type: String,
|
|
482
|
+
attribute: "size",
|
|
483
|
+
reflect: true
|
|
484
|
+
},
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
488
|
+
* @default {false}
|
|
489
|
+
*/
|
|
490
|
+
onDark: {
|
|
491
|
+
type: Boolean,
|
|
492
|
+
attribute: "ondark",
|
|
493
|
+
reflect: true
|
|
494
|
+
},
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
498
|
+
* This is used to apply layout and shape classes dynamically.
|
|
499
|
+
* @type {HTMLElement|null}
|
|
500
|
+
* @default {null}
|
|
501
|
+
* @private
|
|
502
|
+
*/
|
|
503
|
+
wrapper: {
|
|
504
|
+
attribute: false,
|
|
505
|
+
reflect: false
|
|
506
|
+
}
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
resetShapeClasses() {
|
|
513
|
+
if (this.shape && this.size) {
|
|
514
|
+
|
|
515
|
+
if (this.wrapper) {
|
|
516
|
+
this.wrapper.classList.forEach((className) => {
|
|
517
|
+
if (className.startsWith('shape-')) {
|
|
518
|
+
this.wrapper.classList.remove(className);
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
|
|
522
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
resetLayoutClasses() {
|
|
528
|
+
if (this.layout) {
|
|
529
|
+
if (this.wrapper) {
|
|
530
|
+
this.wrapper.classList.forEach((className) => {
|
|
531
|
+
if (className.startsWith('layout-')) {
|
|
532
|
+
this.wrapper.classList.remove(className);
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
|
|
536
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
updateComponentArchitecture() {
|
|
542
|
+
this.resetLayoutClasses();
|
|
543
|
+
this.resetShapeClasses();
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
updated(changedProperties) {
|
|
547
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
548
|
+
this.updateComponentArchitecture();
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
firstUpdated() {
|
|
553
|
+
super.firstUpdated();
|
|
554
|
+
|
|
555
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
556
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
557
|
+
|
|
558
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
559
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
disconnectedCallback() {
|
|
563
|
+
super.disconnectedCallback();
|
|
564
|
+
|
|
565
|
+
// Cleanup the ARIA observer if it exists
|
|
566
|
+
if (this.attributeWatcher) {
|
|
567
|
+
this.attributeWatcher.cleanup();
|
|
568
|
+
this.attributeWatcher = null;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
573
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
574
|
+
render() {
|
|
575
|
+
try {
|
|
576
|
+
return this.renderLayout();
|
|
577
|
+
} catch (error) {
|
|
578
|
+
// failed to get the defined layout
|
|
579
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
580
|
+
|
|
581
|
+
// fallback to the default layout
|
|
582
|
+
return this.getLayout('default');
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
var styleCss$3 = 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}.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([size=xs][shape=rounded]) ::slotted(auro-icon),:host([size=xs][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xs][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill]) ::slotted(auro-icon),:host([size=xs][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left]) ::slotted(auro-icon),:host([size=xs][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right]) ::slotted(auro-icon),:host([size=xs][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-200, 1rem)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xs][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle]) ::slotted(auro-icon),:host([size=xs][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xs][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=flat]) .auro-button:focus,:host([size=xs][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xs][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square]) ::slotted(auro-icon),:host([size=xs][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xs][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xs][shape=square][variant=secondary]) .auro-button:focus,:host([size=xs][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xs][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 2px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=flat]) .auro-button:focus,:host([size=xs][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs][shape=square][variant=ghost]) .auro-button:focus,:host([size=xs][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded]) ::slotted(auro-icon),:host([size=sm][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=sm][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill]) ::slotted(auro-icon),:host([size=sm][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left]) ::slotted(auro-icon),:host([size=sm][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right]) ::slotted(auro-icon),:host([size=sm][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=sm][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle]) ::slotted(auro-icon),:host([size=sm][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus,:host([size=sm][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=flat]) .auro-button:focus,:host([size=sm][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus,:host([size=sm][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square]) ::slotted(auro-icon),:host([size=sm][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=primary]) .auro-button:focus:after,:host([size=sm][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=sm][shape=square][variant=secondary]) .auro-button:focus,:host([size=sm][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus,:host([size=sm][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=flat]) .auro-button:focus,:host([size=sm][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=sm][shape=square][variant=ghost]) .auro-button:focus,:host([size=sm][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded]) ::slotted(auro-icon),:host([size=md][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=md][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=md][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=md][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=md][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill]) ::slotted(auro-icon),:host([size=md][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left]) ::slotted(auro-icon),:host([size=md][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right]) ::slotted(auro-icon),:host([size=md][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=md][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=md][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=md][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle]) ::slotted(auro-icon),:host([size=md][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=md][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=circle][variant=secondary]) .auro-button:focus,:host([size=md][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=md][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=flat]) .auro-button:focus,:host([size=md][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=circle][variant=ghost]) .auro-button:focus,:host([size=md][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square]) ::slotted(auro-icon),:host([size=md][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=md][shape=square][variant=primary]) .auro-button:focus,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=primary]) .auro-button:focus:after,:host([size=md][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=md][shape=square][variant=secondary]) .auro-button:focus,:host([size=md][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=tertiary]) .auro-button:focus,:host([size=md][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=flat]) .auro-button:focus,:host([size=md][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=md][shape=square][variant=ghost]) .auro-button:focus,:host([size=md][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded]) ::slotted(auro-icon),:host([size=lg][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=lg][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill]) ::slotted(auro-icon),:host([size=lg][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left]) ::slotted(auro-icon),:host([size=lg][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right]) ::slotted(auro-icon),:host([size=lg][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=lg][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle]) ::slotted(auro-icon),:host([size=lg][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus,:host([size=lg][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=flat]) .auro-button:focus,:host([size=lg][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus,:host([size=lg][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square]) ::slotted(auro-icon),:host([size=lg][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}:host([size=lg][shape=square][variant=primary]) .auro-button:focus,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4.33px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=primary]) .auro-button:focus:after,:host([size=lg][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=lg][shape=square][variant=secondary]) .auro-button:focus,:host([size=lg][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus,:host([size=lg][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=flat]) .auro-button:focus,:host([size=lg][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=lg][shape=square][variant=ghost]) .auro-button:focus,:host([size=lg][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded]) ::slotted(auro-icon),:host([size=xl][shape=rounded]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=rounded][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=rounded][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus,:host([size=xl][shape=rounded][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill]) ::slotted(auro-icon),:host([size=xl][shape=pill]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left]) ::slotted(auro-icon),:host([size=xl][shape=pill-left]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-left][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-left][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right]) ::slotted(auro-icon),:host([size=xl][shape=pill-right]) ::slotted([auro-icon]){--ds-auro-icon-size: var(--ds-size-300, 1.5rem)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=pill-right][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus,:host([size=xl][shape=pill-right][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle]) ::slotted(auro-icon),:host([size=xl][shape=circle]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=circle][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus,:host([size=xl][shape=circle][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=circle][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=flat]) .auro-button:focus,:host([size=xl][shape=circle][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus,:host([size=xl][shape=circle][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square]) ::slotted(auro-icon),:host([size=xl][shape=square]) ::slotted([auro-icon]){--ds-auro-icon-size: calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem))}:host([size=xl][shape=square][variant=primary]) .auro-button:focus,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 5px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=primary]) .auro-button:focus:after,:host([size=xl][shape=square][variant=primary]) .auro-button:focus-visible:after{content:"";position:absolute;border-radius:inherit;box-sizing:content-box;top:0;left:0;width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid var(--ds-auro-button-border-color)}:host([size=xl][shape=square][variant=secondary]) .auro-button:focus,:host([size=xl][shape=square][variant=secondary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 3px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus,:host([size=xl][shape=square][variant=tertiary]) .auro-button:focus-visible{box-shadow:inset 0 0 0 4px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=flat]) .auro-button:focus,:host([size=xl][shape=square][variant=flat]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xl][shape=square][variant=ghost]) .auro-button:focus,:host([size=xl][shape=square][variant=ghost]) .auro-button:focus-visible{box-shadow:inset 0 0 0 1px var(--ds-auro-button-border-inset-color)}:host([size=xs]) .inset{padding-inline:var(--ds-size-150, 0.75rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-150, 0.75rem)*2)}:host([size=sm]) .inset{padding-inline:var(--ds-size-200, 1rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-200, 1rem)*2)}:host([size=md]) .inset{padding-inline:var(--ds-size-300, 1.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-300, 1.5rem)*2)}:host([size=lg]) .inset{padding-inline:var(--ds-size-400, 2rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-400, 2rem)*2)}:host([size=xl]) .inset{padding-inline:var(--ds-size-500, 2.5rem)}:host([fluid]){display:block}:host([fluid]) .auro-button{width:calc(100% - var(--ds-size-500, 2.5rem)*2)}:host([shape=circle]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([shape=square]) ::slotted(:not(auro-icon):not([auro-icon])){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}:host{display:inline-block;overflow:hidden}.auro-button{position:relative;cursor:pointer;padding:0 var(--ds-size-300, 1.5rem);padding-inline:unset;padding-block:unset;box-sizing:content-box;overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;outline:none;display: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:focus,.auro-button:focus-visible{outline:none}.auro-button:active{transform:scale(0.95)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}`;
|
|
588
|
+
|
|
589
|
+
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color, #ffffff)}.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,.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,.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,.auro-button:not([ondark])[variant=ghost]:focus-visible{border-color:transparent;--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,.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,.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,.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,.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));--ds-auro-button-border-color: transparent}.auro-button[ondark][variant=ghost]:focus,.auro-button[ondark][variant=ghost]:focus-visible{border-color:transparent;--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,.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
|
+
|
|
591
|
+
var tokensCss$2 = 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
|
+
|
|
593
|
+
var shapeSize = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-rounded-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-rounded-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;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;overflow:hidden;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;overflow:hidden;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-circle-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:50%;min-width:72px;max-width:72px;padding:0}.shape-circle-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-circle-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-circle-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-square-xl{min-height:68px;max-height:68px;border-style:solid;overflow:hidden;border-radius:6px;min-width:72px;max-width:72px;padding:0}.shape-square-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-square-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-square-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;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-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px}.shape-pill-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:28px 0 0 28px}.shape-pill-left-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-left-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-left-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:0 28px 28px 0}.shape-pill-right-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-pill-right-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-pill-right-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-circle-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:50%;min-width:56px;max-width:56px;padding:0}.shape-circle-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-circle-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-circle-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-square-lg{min-height:52px;max-height:52px;border-style:solid;overflow:hidden;border-radius:6px;min-width:56px;max-width:56px;padding:0}.shape-square-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-square-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-square-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-rounded-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-rounded-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:24px}.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;overflow:hidden;border-radius:24px 0 0 24px}.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;overflow:hidden;border-radius:0 24px 24px 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}.shape-circle-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:50%;min-width:48px;max-width:48px;padding:0}.shape-circle-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-circle-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-circle-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-square-md{min-height:44px;max-height:44px;border-style:solid;overflow:hidden;border-radius:6px;min-width:48px;max-width:48px;padding:0}.shape-square-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-square-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-square-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px}.shape-rounded-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-rounded-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-rounded-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px}.shape-pill-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:18px 0 0 18px}.shape-pill-left-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-left-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-left-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:0 18px 18px 0}.shape-pill-right-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-pill-right-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-pill-right-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-circle-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:50%;min-width:36px;max-width:36px;padding:0}.shape-circle-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-circle-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-circle-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-square-sm{min-height:32px;max-height:32px;border-style:solid;overflow:hidden;border-radius:6px;min-width:36px;max-width:36px;padding:0}.shape-square-sm.simple{border-width:0px;min-height:36px;max-height:36px;background-color:unset;box-shadow:none}.shape-square-sm.thin{border-width:1px;min-height:34px;max-height:34px;background-color:unset}.shape-square-sm.parentBorder{border:0;box-shadow:unset;min-height:32px;max-height:32px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:4px}.shape-rounded-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-rounded-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-rounded-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px}.shape-pill-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:12px 0 0 12px}.shape-pill-left-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-left-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-left-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:0 12px 12px 0}.shape-pill-right-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-pill-right-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-pill-right-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-circle-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:50%;min-width:24px;max-width:24px;padding:0}.shape-circle-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-circle-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-circle-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}.shape-square-xs{min-height:20px;max-height:20px;border-style:solid;overflow:hidden;border-radius:6px;min-width:24px;max-width:24px;padding:0}.shape-square-xs.simple{border-width:0px;min-height:24px;max-height:24px;background-color:unset;box-shadow:none}.shape-square-xs.thin{border-width:1px;min-height:22px;max-height:22px;background-color:unset}.shape-square-xs.parentBorder{border:0;box-shadow:unset;min-height:20px;max-height:20px}`;
|
|
594
|
+
|
|
595
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
596
|
+
// See LICENSE in the project root for license information.
|
|
597
|
+
|
|
598
|
+
// ---------------------------------------------------------------------
|
|
599
|
+
|
|
600
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
601
|
+
|
|
602
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
603
|
+
|
|
604
|
+
/* eslint-disable jsdoc/require-param */
|
|
605
|
+
|
|
606
|
+
/**
|
|
607
|
+
* This will register a new custom element with the browser.
|
|
608
|
+
* @param {String} name - The name of the custom element.
|
|
609
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
610
|
+
* @returns {void}
|
|
611
|
+
*/
|
|
612
|
+
registerComponent(name, componentClass) {
|
|
613
|
+
if (!customElements.get(name)) {
|
|
614
|
+
customElements.define(name, class extends componentClass {});
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
620
|
+
* @returns {void}
|
|
621
|
+
*/
|
|
622
|
+
closestElement(
|
|
623
|
+
selector, // selector like in .closest()
|
|
624
|
+
base = this, // extra functionality to skip a parent
|
|
625
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
626
|
+
!el || el === document || el === window
|
|
627
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
628
|
+
: found
|
|
629
|
+
? found // found a selector INside this element
|
|
630
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
631
|
+
) {
|
|
632
|
+
return __Closest(base);
|
|
633
|
+
}
|
|
634
|
+
/* eslint-enable jsdoc/require-param */
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* 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.
|
|
638
|
+
* @param {Object} elem - The element to check.
|
|
639
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
640
|
+
* @returns {void}
|
|
641
|
+
*/
|
|
642
|
+
handleComponentTagRename(elem, tagName) {
|
|
643
|
+
const tag = tagName.toLowerCase();
|
|
644
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
645
|
+
|
|
646
|
+
if (elemTag !== tag) {
|
|
647
|
+
elem.setAttribute(tag, true);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Validates if an element is a specific Auro component.
|
|
653
|
+
* @param {Object} elem - The element to validate.
|
|
654
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
655
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
656
|
+
*/
|
|
657
|
+
elementMatch(elem, tagName) {
|
|
658
|
+
const tag = tagName.toLowerCase();
|
|
659
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
660
|
+
|
|
661
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
|
|
665
|
+
var styleCss$2 = css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}: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}:host>span{opacity:1}:host>.loader{display:none}:host>svg{display:none}:host>.no-animation{display:block}}`;
|
|
666
|
+
|
|
667
|
+
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}`;
|
|
668
|
+
|
|
669
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
670
|
+
|
|
671
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
672
|
+
// See LICENSE in the project root for license information.
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
class AuroLoader extends LitElement {
|
|
676
|
+
constructor() {
|
|
677
|
+
super();
|
|
678
|
+
|
|
679
|
+
/**
|
|
680
|
+
* @private
|
|
681
|
+
*/
|
|
682
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
683
|
+
|
|
684
|
+
/**
|
|
685
|
+
* @private
|
|
686
|
+
*/
|
|
687
|
+
this.mdCount = 3;
|
|
688
|
+
|
|
689
|
+
/**
|
|
690
|
+
* @private
|
|
691
|
+
*/
|
|
692
|
+
this.smCount = 2;
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* @private
|
|
696
|
+
*/
|
|
697
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
698
|
+
|
|
699
|
+
this.orbit = false;
|
|
700
|
+
this.ringworm = false;
|
|
701
|
+
this.laser = false;
|
|
702
|
+
this.pulse = false;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
// function to define props used within the scope of this component
|
|
706
|
+
static get properties() {
|
|
707
|
+
return {
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Sets loader to laser type.
|
|
711
|
+
*/
|
|
712
|
+
laser: {
|
|
713
|
+
type: Boolean,
|
|
714
|
+
reflect: true
|
|
715
|
+
},
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* Sets loader to orbit type.
|
|
719
|
+
*/
|
|
720
|
+
orbit: {
|
|
721
|
+
type: Boolean,
|
|
722
|
+
reflect: true
|
|
723
|
+
},
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Sets loader to pulse type.
|
|
727
|
+
*/
|
|
728
|
+
pulse: {
|
|
729
|
+
type: Boolean,
|
|
730
|
+
reflect: true
|
|
731
|
+
},
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Sets loader to ringworm type.
|
|
735
|
+
*/
|
|
736
|
+
ringworm: {
|
|
737
|
+
type: Boolean,
|
|
738
|
+
reflect: true
|
|
739
|
+
}
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
|
|
743
|
+
static get styles() {
|
|
744
|
+
return [
|
|
745
|
+
css`${styleCss$2}`,
|
|
746
|
+
css`${colorCss$1}`,
|
|
747
|
+
css`${tokensCss$1}`
|
|
748
|
+
];
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* This will register this element with the browser.
|
|
753
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
754
|
+
*
|
|
755
|
+
* @example
|
|
756
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
757
|
+
*
|
|
758
|
+
*/
|
|
759
|
+
static register(name = "auro-loader") {
|
|
760
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroLoader);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
firstUpdated() {
|
|
764
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
765
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
connectedCallback() {
|
|
769
|
+
super.connectedCallback();
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/**
|
|
773
|
+
* @private
|
|
774
|
+
* @returns {Array} Numbered array for template map.
|
|
775
|
+
*/
|
|
776
|
+
defineTemplate() {
|
|
777
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
778
|
+
|
|
779
|
+
if (this.orbit || this.laser) {
|
|
780
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
781
|
+
} else if (this.ringworm) {
|
|
782
|
+
nodes = Array.from(Array(0).keys());
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
return nodes;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
789
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
790
|
+
|
|
791
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
792
|
+
render() {
|
|
793
|
+
return html`
|
|
794
|
+
${this.defineTemplate().map((idx) => html`
|
|
795
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
796
|
+
`)}
|
|
797
|
+
|
|
798
|
+
<div class="no-animation body-default">Loading...</div>
|
|
799
|
+
|
|
800
|
+
${this.ringworm ? html`
|
|
801
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
802
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
803
|
+
</svg>`
|
|
804
|
+
: ``
|
|
805
|
+
}
|
|
806
|
+
`;
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
var loaderVersion = '5.1.0';
|
|
811
|
+
|
|
812
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
813
|
+
// See LICENSE in the project root for license information.
|
|
814
|
+
|
|
815
|
+
|
|
816
|
+
/**
|
|
817
|
+
* @slot - Default slot for the text of the button.
|
|
818
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
819
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
820
|
+
* @csspart text - Apply CSS to text slot.
|
|
821
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
822
|
+
*/
|
|
823
|
+
|
|
824
|
+
const ICON_ONLY_SHAPES = ['circle', 'square'];
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
828
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
829
|
+
* @property {'default', 'rounded', 'pill', 'circle', 'square'} shape - Defines the shape of the button.
|
|
830
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
831
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
832
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
833
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
834
|
+
*/
|
|
835
|
+
class AuroButton extends AuroElement$1 {
|
|
836
|
+
|
|
837
|
+
/**
|
|
838
|
+
* Enables form association for this element.
|
|
839
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
840
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
841
|
+
*/
|
|
842
|
+
static get formAssociated() {
|
|
843
|
+
return true;
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
constructor() {
|
|
847
|
+
super();
|
|
848
|
+
this.autofocus = false;
|
|
849
|
+
this.disabled = false;
|
|
850
|
+
this.loading = false;
|
|
851
|
+
this.size = "md";
|
|
852
|
+
this.shape = "rounded";
|
|
853
|
+
this.onDark = false;
|
|
854
|
+
this.fluid = false;
|
|
855
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
856
|
+
this.variant = 'primary';
|
|
857
|
+
|
|
858
|
+
// Support for HTML5 forms
|
|
859
|
+
if (typeof this.attachInternals === 'function') {
|
|
860
|
+
this.internals = this.attachInternals();
|
|
861
|
+
} else {
|
|
862
|
+
this.internals = null;
|
|
863
|
+
|
|
864
|
+
// eslint-disable-next-line no-console
|
|
865
|
+
console.warn('This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually.');
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Generate unique names for dependency components.
|
|
870
|
+
*/
|
|
871
|
+
const versioning = new AuroDependencyVersioning();
|
|
872
|
+
|
|
873
|
+
/**
|
|
874
|
+
* @private
|
|
875
|
+
*/
|
|
876
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* @private
|
|
880
|
+
*/
|
|
881
|
+
this.buttonHref = undefined;
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* @private
|
|
885
|
+
*/
|
|
886
|
+
this.buttonTarget = undefined;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* @private
|
|
890
|
+
*/
|
|
891
|
+
this.buttonRel = undefined;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
static get styles() {
|
|
895
|
+
return [
|
|
896
|
+
tokensCss$2,
|
|
897
|
+
styleCss$3,
|
|
898
|
+
colorCss$2,
|
|
899
|
+
shapeSize
|
|
900
|
+
];
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
static get properties() {
|
|
904
|
+
return {
|
|
905
|
+
|
|
906
|
+
...super.properties,
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* Override layout since it isn't used in this component.
|
|
910
|
+
* @private
|
|
911
|
+
*/
|
|
912
|
+
layout: {
|
|
913
|
+
type: Boolean,
|
|
914
|
+
attribute: false,
|
|
915
|
+
reflect: false
|
|
916
|
+
},
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
920
|
+
*/
|
|
921
|
+
autofocus: {
|
|
922
|
+
type: Boolean,
|
|
923
|
+
reflect: true
|
|
924
|
+
},
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
928
|
+
*/
|
|
929
|
+
disabled: {
|
|
930
|
+
type: Boolean,
|
|
931
|
+
reflect: true
|
|
932
|
+
},
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
936
|
+
*/
|
|
937
|
+
fluid: {
|
|
938
|
+
type: Boolean,
|
|
939
|
+
reflect: true
|
|
940
|
+
},
|
|
941
|
+
|
|
942
|
+
/**
|
|
943
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
944
|
+
*/
|
|
945
|
+
loading: {
|
|
946
|
+
type: Boolean,
|
|
947
|
+
reflect: true
|
|
948
|
+
},
|
|
949
|
+
|
|
950
|
+
/**
|
|
951
|
+
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
952
|
+
*/
|
|
953
|
+
loadingText: {
|
|
954
|
+
type: String
|
|
955
|
+
},
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
959
|
+
*/
|
|
960
|
+
tIndex: {
|
|
961
|
+
type: String,
|
|
962
|
+
reflect: true
|
|
963
|
+
},
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
967
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
968
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`.
|
|
969
|
+
*/
|
|
970
|
+
tabindex: {
|
|
971
|
+
type: String,
|
|
972
|
+
reflect: false
|
|
973
|
+
},
|
|
974
|
+
|
|
975
|
+
/**
|
|
976
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
977
|
+
*/
|
|
978
|
+
title: {
|
|
979
|
+
type: String,
|
|
980
|
+
reflect: true
|
|
981
|
+
},
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
985
|
+
*/
|
|
986
|
+
type: {
|
|
987
|
+
type: String,
|
|
988
|
+
reflect: true
|
|
989
|
+
},
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
993
|
+
*/
|
|
994
|
+
value: {
|
|
995
|
+
type: String,
|
|
996
|
+
reflect: true
|
|
997
|
+
},
|
|
998
|
+
|
|
999
|
+
/**
|
|
1000
|
+
* Sets button variant option.
|
|
1001
|
+
* @default primary
|
|
1002
|
+
*/
|
|
1003
|
+
variant: {
|
|
1004
|
+
type: String,
|
|
1005
|
+
reflect: true
|
|
1006
|
+
},
|
|
1007
|
+
|
|
1008
|
+
/**
|
|
1009
|
+
* @private
|
|
1010
|
+
*/
|
|
1011
|
+
buttonHref: {
|
|
1012
|
+
type: String,
|
|
1013
|
+
},
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* @private
|
|
1017
|
+
*/
|
|
1018
|
+
buttonTarget: {
|
|
1019
|
+
type: String,
|
|
1020
|
+
},
|
|
1021
|
+
|
|
1022
|
+
/**
|
|
1023
|
+
* @private
|
|
1024
|
+
*/
|
|
1025
|
+
buttonRel: {
|
|
1026
|
+
type: String,
|
|
1027
|
+
},
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
/**
|
|
1032
|
+
* This will register this element with the browser.
|
|
1033
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
1034
|
+
*
|
|
1035
|
+
* @example
|
|
1036
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
1037
|
+
*
|
|
1038
|
+
*/
|
|
1039
|
+
static register(name = "auro-button") {
|
|
1040
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroButton);
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Internal method to apply focus to the HTML5 button.
|
|
1045
|
+
* @private
|
|
1046
|
+
* @returns {void}
|
|
1047
|
+
*/
|
|
1048
|
+
focus() {
|
|
1049
|
+
this.renderRoot.querySelector('button').focus();
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
/**
|
|
1053
|
+
* Submits the form that this button is associated with.
|
|
1054
|
+
* @private
|
|
1055
|
+
* @returns {void}
|
|
1056
|
+
*/
|
|
1057
|
+
surfaceSubmitEvent() {
|
|
1058
|
+
if (this.form) {
|
|
1059
|
+
this.form.requestSubmit();
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Returns the form element that this button is associated with.
|
|
1065
|
+
* @private
|
|
1066
|
+
* @returns {HTMLFormElement | null}
|
|
1067
|
+
*/
|
|
1068
|
+
get form() {
|
|
1069
|
+
return this.internals ? this.internals.form : null;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* @private
|
|
1074
|
+
* @returns {Boolean}
|
|
1075
|
+
*/
|
|
1076
|
+
get showText() {
|
|
1077
|
+
return !ICON_ONLY_SHAPES.includes(this.shape);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/**
|
|
1081
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
1082
|
+
* @returns {string | undefined}
|
|
1083
|
+
* @private
|
|
1084
|
+
*/
|
|
1085
|
+
get currentAriaLabel() {
|
|
1086
|
+
if (!this.attributeWatcher) return undefined;
|
|
1087
|
+
|
|
1088
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
1089
|
+
return ariaLabel || undefined;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
/**
|
|
1093
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
1094
|
+
* @returns {string | undefined}
|
|
1095
|
+
* @private
|
|
1096
|
+
*/
|
|
1097
|
+
get currentAriaLabelledBy() {
|
|
1098
|
+
if (!this.attributeWatcher) return undefined;
|
|
1099
|
+
|
|
1100
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
1101
|
+
return ariaLabelledBy || undefined;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Whether or not the button is set to an icon-only shape.
|
|
1106
|
+
* @returns {boolean} - True if the button is icon-only, false otherwise.
|
|
1107
|
+
* @private
|
|
1108
|
+
*/
|
|
1109
|
+
get iconOnly() {
|
|
1110
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
/**
|
|
1114
|
+
* Gets a class name for the font size based on the button's size and shape.
|
|
1115
|
+
* @returns {string} - The font size class name.
|
|
1116
|
+
* @private
|
|
1117
|
+
*/
|
|
1118
|
+
getFontSize() {
|
|
1119
|
+
|
|
1120
|
+
// Size map for standard buttons
|
|
1121
|
+
const standardButtonSizeMap = {
|
|
1122
|
+
xs: 'body-xs',
|
|
1123
|
+
sm: 'body-sm',
|
|
1124
|
+
md: 'body-default',
|
|
1125
|
+
lg: 'body-lg',
|
|
1126
|
+
xl: 'body-lg'
|
|
1127
|
+
};
|
|
1128
|
+
|
|
1129
|
+
// Size map for icon-only buttons
|
|
1130
|
+
const iconOnlyButtonSizeMap = {
|
|
1131
|
+
xs: 'heading-xs',
|
|
1132
|
+
sm: 'heading-sm',
|
|
1133
|
+
md: 'heading-sm',
|
|
1134
|
+
lg: 'heading-md',
|
|
1135
|
+
xl: 'heading-lg'
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1138
|
+
// Determine which map to use based on the shape
|
|
1139
|
+
const sizeMap = this.iconOnly ? iconOnlyButtonSizeMap : standardButtonSizeMap;
|
|
1140
|
+
|
|
1141
|
+
// Return the font size based on the button size and shape
|
|
1142
|
+
return sizeMap[this.size] || 'body-default';
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
/**
|
|
1146
|
+
* Renders the default layout for the button.
|
|
1147
|
+
* @returns {TemplateResult}
|
|
1148
|
+
* @private
|
|
1149
|
+
*/
|
|
1150
|
+
renderLayoutDefault() {
|
|
1151
|
+
|
|
1152
|
+
const fontSize = this.getFontSize();
|
|
1153
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
1154
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
1155
|
+
|
|
1156
|
+
const classes = {
|
|
1157
|
+
"auro-button": true,
|
|
1158
|
+
"inset": this.showText,
|
|
1159
|
+
wrapper: true,
|
|
1160
|
+
loading: this.loading,
|
|
1161
|
+
[`${fontSize}`]: true,
|
|
1162
|
+
|
|
1163
|
+
// These remove the default borders so we can handle focus borders ourselves
|
|
1164
|
+
'simple': !['secondary'].includes(this.variant),
|
|
1165
|
+
'thin': ['secondary'].includes(this.variant),
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
const contentClasses = {
|
|
1169
|
+
"contentWrapper": true,
|
|
1170
|
+
"util_displayHiddenVisually": this.loading
|
|
1171
|
+
};
|
|
1172
|
+
|
|
1173
|
+
return html$1`
|
|
1174
|
+
<${tag}
|
|
1175
|
+
part="${part}"
|
|
1176
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
1177
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
1178
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
1179
|
+
?autofocus="${this.autofocus}"
|
|
1180
|
+
class=${classMap(classes)}
|
|
1181
|
+
?disabled="${this.disabled || this.loading}"
|
|
1182
|
+
?onDark="${this.onDark}"
|
|
1183
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
1184
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
1185
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
1186
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
1187
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
1188
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
1189
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
1190
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
1191
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
1192
|
+
>
|
|
1193
|
+
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
1194
|
+
|
|
1195
|
+
<span class="${classMap(contentClasses)}">
|
|
1196
|
+
<span class="textSlot" part="text">
|
|
1197
|
+
<slot></slot>
|
|
1198
|
+
</span>
|
|
1199
|
+
</span>
|
|
1200
|
+
</${tag}>
|
|
1201
|
+
`;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* Renders the layout of the button.
|
|
1206
|
+
* @returns {TemplateResult}
|
|
1207
|
+
* @private
|
|
1208
|
+
*/
|
|
1209
|
+
renderLayout() {
|
|
1210
|
+
return this.renderLayoutDefault();
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
var buttonVersion = '11.3.0';
|
|
1215
|
+
|
|
1216
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1217
|
+
// See LICENSE in the project root for license information.
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
/**
|
|
1221
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
1222
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
1223
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
1224
|
+
*/
|
|
1225
|
+
|
|
1226
|
+
class AuroElement extends LitElement {
|
|
1227
|
+
|
|
1228
|
+
// function to define props used within the scope of this component
|
|
1229
|
+
static get properties() {
|
|
1230
|
+
return {
|
|
1231
|
+
hidden: { type: Boolean,
|
|
1232
|
+
reflect: true },
|
|
1233
|
+
hiddenVisually: { type: Boolean,
|
|
1234
|
+
reflect: true },
|
|
1235
|
+
hiddenAudible: { type: Boolean,
|
|
1236
|
+
reflect: true },
|
|
1237
|
+
};
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
/**
|
|
1241
|
+
* @private Function that determines state of aria-hidden
|
|
1242
|
+
*/
|
|
1243
|
+
hideAudible(value) {
|
|
1244
|
+
if (value) {
|
|
1245
|
+
return 'true'
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
return 'false'
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
var error = {"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>"};
|
|
1253
|
+
|
|
1254
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
1255
|
+
|
|
1256
|
+
const _fetchMap = new Map();
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* A callback to parse Response body.
|
|
1260
|
+
*
|
|
1261
|
+
* @callback ResponseParser
|
|
1262
|
+
* @param {Fetch.Response} response
|
|
1263
|
+
* @returns {Promise}
|
|
1264
|
+
*/
|
|
1265
|
+
|
|
1266
|
+
/**
|
|
1267
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
1268
|
+
*
|
|
1269
|
+
* @param {String} uri
|
|
1270
|
+
* @param {Object} [options={}]
|
|
1271
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
1272
|
+
* @returns {Promise}
|
|
1273
|
+
*/
|
|
1274
|
+
const cacheFetch = (uri, options = {}) => {
|
|
1275
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
1276
|
+
if (!_fetchMap.has(uri)) {
|
|
1277
|
+
_fetchMap.set(uri, fetch(uri).then(responseParser));
|
|
1278
|
+
}
|
|
1279
|
+
return _fetchMap.get(uri);
|
|
1280
|
+
};
|
|
1281
|
+
|
|
1282
|
+
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}`;
|
|
1283
|
+
|
|
1284
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1285
|
+
// See LICENSE in the project root for license information.
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
1289
|
+
/**
|
|
1290
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
1291
|
+
*/
|
|
1292
|
+
|
|
1293
|
+
// build the component class
|
|
1294
|
+
class BaseIcon extends AuroElement {
|
|
1295
|
+
constructor() {
|
|
1296
|
+
super();
|
|
1297
|
+
this.onDark = false;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
// function to define props used within the scope of this component
|
|
1301
|
+
static get properties() {
|
|
1302
|
+
return {
|
|
1303
|
+
...super.properties,
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* Set value for on-dark version of auro-icon.
|
|
1307
|
+
*/
|
|
1308
|
+
onDark: {
|
|
1309
|
+
type: Boolean,
|
|
1310
|
+
reflect: true
|
|
1311
|
+
},
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* @private
|
|
1315
|
+
*/
|
|
1316
|
+
svg: {
|
|
1317
|
+
attribute: false,
|
|
1318
|
+
reflect: true
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1323
|
+
static get styles() {
|
|
1324
|
+
return css`
|
|
1325
|
+
${styleCss$1}
|
|
1326
|
+
`;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Async function to fetch requested icon from npm CDN.
|
|
1331
|
+
* @private
|
|
1332
|
+
* @param {string} category - Icon category.
|
|
1333
|
+
* @param {string} name - Icon name.
|
|
1334
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
1335
|
+
*/
|
|
1336
|
+
async fetchIcon(category, name) {
|
|
1337
|
+
let iconHTML = '';
|
|
1338
|
+
|
|
1339
|
+
if (category === 'logos') {
|
|
1340
|
+
iconHTML = await cacheFetch(`${this.uri}/${category}/${name}.svg`);
|
|
1341
|
+
} else {
|
|
1342
|
+
iconHTML = await cacheFetch(`${this.uri}/icons/${category}/${name}.svg`);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
1346
|
+
|
|
1347
|
+
return dom.body.querySelector('svg');
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
// lifecycle function
|
|
1351
|
+
async firstUpdated() {
|
|
1352
|
+
if (!this.customSvg) {
|
|
1353
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
1354
|
+
|
|
1355
|
+
if (svg) {
|
|
1356
|
+
this.svg = svg;
|
|
1357
|
+
} else if (!svg) {
|
|
1358
|
+
const penDOM = new DOMParser().parseFromString(error.svg, 'text/html');
|
|
1359
|
+
|
|
1360
|
+
this.svg = penDOM.body.firstChild;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
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)}`;
|
|
1367
|
+
|
|
1368
|
+
var colorCss = 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)}`;
|
|
1369
|
+
|
|
1370
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1371
|
+
// See LICENSE in the project root for license information.
|
|
1372
|
+
|
|
1373
|
+
// ---------------------------------------------------------------------
|
|
1374
|
+
|
|
1375
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1376
|
+
|
|
1377
|
+
class AuroLibraryRuntimeUtils {
|
|
1378
|
+
|
|
1379
|
+
/* eslint-disable jsdoc/require-param */
|
|
1380
|
+
|
|
1381
|
+
/**
|
|
1382
|
+
* This will register a new custom element with the browser.
|
|
1383
|
+
* @param {String} name - The name of the custom element.
|
|
1384
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
1385
|
+
* @returns {void}
|
|
1386
|
+
*/
|
|
1387
|
+
registerComponent(name, componentClass) {
|
|
1388
|
+
if (!customElements.get(name)) {
|
|
1389
|
+
customElements.define(name, class extends componentClass {});
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
/**
|
|
1394
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
1395
|
+
* @returns {void}
|
|
1396
|
+
*/
|
|
1397
|
+
closestElement(
|
|
1398
|
+
selector, // selector like in .closest()
|
|
1399
|
+
base = this, // extra functionality to skip a parent
|
|
1400
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
1401
|
+
!el || el === document || el === window
|
|
1402
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
1403
|
+
: found
|
|
1404
|
+
? found // found a selector INside this element
|
|
1405
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
1406
|
+
) {
|
|
1407
|
+
return __Closest(base);
|
|
1408
|
+
}
|
|
1409
|
+
/* eslint-enable jsdoc/require-param */
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* 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.
|
|
1413
|
+
* @param {Object} elem - The element to check.
|
|
1414
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
1415
|
+
* @returns {void}
|
|
1416
|
+
*/
|
|
1417
|
+
handleComponentTagRename(elem, tagName) {
|
|
1418
|
+
const tag = tagName.toLowerCase();
|
|
1419
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1420
|
+
|
|
1421
|
+
if (elemTag !== tag) {
|
|
1422
|
+
elem.setAttribute(tag, true);
|
|
1423
|
+
}
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
/**
|
|
1427
|
+
* Validates if an element is a specific Auro component.
|
|
1428
|
+
* @param {Object} elem - The element to validate.
|
|
1429
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1430
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1431
|
+
*/
|
|
1432
|
+
elementMatch(elem, tagName) {
|
|
1433
|
+
const tag = tagName.toLowerCase();
|
|
1434
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1435
|
+
|
|
1436
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1437
|
+
}
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1441
|
+
// See LICENSE in the project root for license information.
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
class AuroIcon extends BaseIcon {
|
|
1445
|
+
constructor() {
|
|
1446
|
+
super();
|
|
1447
|
+
|
|
1448
|
+
this.variant = undefined;
|
|
1449
|
+
this.privateDefaults();
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
/**
|
|
1453
|
+
* Internal Defaults.
|
|
1454
|
+
* @private
|
|
1455
|
+
* @returns {void}
|
|
1456
|
+
*/
|
|
1457
|
+
privateDefaults() {
|
|
1458
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1459
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
// function to define props used within the scope of this component
|
|
1463
|
+
static get properties() {
|
|
1464
|
+
return {
|
|
1465
|
+
...super.properties,
|
|
1466
|
+
|
|
1467
|
+
/**
|
|
1468
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1469
|
+
*/
|
|
1470
|
+
ariaHidden: {
|
|
1471
|
+
type: String,
|
|
1472
|
+
reflect: true
|
|
1473
|
+
},
|
|
1474
|
+
|
|
1475
|
+
/**
|
|
1476
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1477
|
+
*/
|
|
1478
|
+
category: {
|
|
1479
|
+
type: String,
|
|
1480
|
+
reflect: true
|
|
1481
|
+
},
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* Allows custom color to be set.
|
|
1485
|
+
*/
|
|
1486
|
+
customColor: {
|
|
1487
|
+
type: Boolean,
|
|
1488
|
+
reflect: true
|
|
1489
|
+
},
|
|
1490
|
+
|
|
1491
|
+
/**
|
|
1492
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
1493
|
+
*/
|
|
1494
|
+
customSvg: {
|
|
1495
|
+
type: Boolean
|
|
1496
|
+
},
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* Exposes content in slot as icon label.
|
|
1500
|
+
*/
|
|
1501
|
+
label: {
|
|
1502
|
+
type: Boolean,
|
|
1503
|
+
reflect: true
|
|
1504
|
+
},
|
|
1505
|
+
|
|
1506
|
+
/**
|
|
1507
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
1508
|
+
*/
|
|
1509
|
+
name: {
|
|
1510
|
+
type: String,
|
|
1511
|
+
reflect: true
|
|
1512
|
+
},
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
* The style of the icon. The accepted variants are `accent1`, `disabled`, `muted`, `statusDefault`, `statusInfo`, `statusSuccess`, `statusWarning`, `statusError`, `statusInfoSubtle`, `statusSuccessSubtle`, `statusWarningSubtle`, `statusErrorSubtle`, `fareBasicEconomy`, `fareBusiness`, `fareEconomy`, `fareFirst`, `farePremiumEconomy`, `tierOneWorldEmerald`, `tierOneWorldSapphire`, `tierOneWorldRuby`.
|
|
1516
|
+
*/
|
|
1517
|
+
variant: {
|
|
1518
|
+
type: String,
|
|
1519
|
+
reflect: true
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
static get styles() {
|
|
1525
|
+
return [
|
|
1526
|
+
super.styles,
|
|
1527
|
+
css`${tokensCss}`,
|
|
1528
|
+
css`${styleCss$1}`,
|
|
1529
|
+
css`${colorCss}`
|
|
1530
|
+
];
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
/**
|
|
1534
|
+
* This will register this element with the browser.
|
|
1535
|
+
* @param {string} [name="auro-icon"] - The name of element that you want to register to.
|
|
1536
|
+
*
|
|
1537
|
+
* @example
|
|
1538
|
+
* AuroIcon.register("custom-icon") // this will register this element to <custom-icon/>
|
|
1539
|
+
*
|
|
1540
|
+
*/
|
|
1541
|
+
static register(name = "auro-icon") {
|
|
1542
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
connectedCallback() {
|
|
1546
|
+
super.connectedCallback();
|
|
1547
|
+
|
|
1548
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
1549
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-icon');
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
/**
|
|
1553
|
+
* @private
|
|
1554
|
+
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
1555
|
+
*/
|
|
1556
|
+
exposeCssParts() {
|
|
1557
|
+
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
async firstUpdated() {
|
|
1561
|
+
await super.firstUpdated();
|
|
1562
|
+
|
|
1563
|
+
/**
|
|
1564
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
1565
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
1566
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
1567
|
+
*/
|
|
1568
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
1569
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
1570
|
+
|
|
1571
|
+
if (svgDesc) {
|
|
1572
|
+
svgDesc.remove();
|
|
1573
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
1579
|
+
render() {
|
|
1580
|
+
const labelClasses = {
|
|
1581
|
+
'labelWrapper': true,
|
|
1582
|
+
'util_displayHiddenVisually': !this.label
|
|
1583
|
+
};
|
|
1584
|
+
|
|
1585
|
+
const svgClasses = {
|
|
1586
|
+
'svgWrapper': true,
|
|
1587
|
+
};
|
|
1588
|
+
|
|
1589
|
+
return html`
|
|
1590
|
+
<div class="componentWrapper">
|
|
1591
|
+
<div
|
|
1592
|
+
class="${classMap(svgClasses)}"
|
|
1593
|
+
title="${ifDefined(this.title || undefined)}">
|
|
1594
|
+
<span aria-hidden="${ifDefined(this.ariaHidden || true)}" part="svg">
|
|
1595
|
+
${this.customSvg ? html`
|
|
1596
|
+
<slot name="svg"></slot>
|
|
1597
|
+
` : html`
|
|
1598
|
+
${this.svg}
|
|
1599
|
+
`
|
|
1600
|
+
}
|
|
1601
|
+
</span>
|
|
1602
|
+
</div>
|
|
1603
|
+
|
|
1604
|
+
<div class="${classMap(labelClasses)}">
|
|
1605
|
+
<slot></slot>
|
|
1606
|
+
</div>
|
|
1607
|
+
</div>
|
|
1608
|
+
`;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
var iconVersion = '8.1.1';
|
|
1613
|
+
|
|
1614
|
+
var styleCss = css`.body-default{font-size:var(--wcss-body-default-font-size, 1rem);line-height:var(--wcss-body-default-line-height, 1.5)}.body-default,.body-lg{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-lg{font-size:var(--wcss-body-lg-font-size, 1.125rem);line-height:var(--wcss-body-lg-line-height, 1.63)}.body-sm{font-size:var(--wcss-body-sm-font-size, 0.875rem);line-height:var(--wcss-body-sm-line-height, 1.25)}.body-sm,.body-xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0)}.body-xs{font-size:var(--wcss-body-xs-font-size, 0.75rem);line-height:var(--wcss-body-xs-line-height, 1)}.body-2xs{font-family:var(--wcss-body-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-body-2xs-font-size, 0.625rem);font-weight:var(--wcss-body-weight, 450);letter-spacing:var(--wcss-body-letter-spacing, 0);line-height:var(--wcss-body-2xs-line-height, 0.88)}.display-2xl{font-family:var(--wcss-display-2xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-2xl-font-size, clamp(3.5rem, 6vw, 5.375rem));font-weight:var(--wcss-display-2xl-weight, 300);letter-spacing:var(--wcss-display-2xl-letter-spacing, 0);line-height:var(--wcss-display-2xl-line-height, 1.3)}.display-xl{font-family:var(--wcss-display-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xl-font-size, clamp(3rem, 5.3333333333vw, 4.5rem));font-weight:var(--wcss-display-xl-weight, 300);letter-spacing:var(--wcss-display-xl-letter-spacing, 0);line-height:var(--wcss-display-xl-line-height, 1.3)}.display-lg{font-family:var(--wcss-display-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-lg-font-size, clamp(2.75rem, 4.6666666667vw, 4rem));font-weight:var(--wcss-display-lg-weight, 300);letter-spacing:var(--wcss-display-lg-letter-spacing, 0);line-height:var(--wcss-display-lg-line-height, 1.3)}.display-md{font-family:var(--wcss-display-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-md-font-size, clamp(2.5rem, 4vw, 3.5rem));font-weight:var(--wcss-display-md-weight, 300);letter-spacing:var(--wcss-display-md-letter-spacing, 0);line-height:var(--wcss-display-md-line-height, 1.3)}.display-sm{font-family:var(--wcss-display-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-sm-font-size, clamp(2rem, 3.6666666667vw, 3rem));font-weight:var(--wcss-display-sm-weight, 300);letter-spacing:var(--wcss-display-sm-letter-spacing, 0);line-height:var(--wcss-display-sm-line-height, 1.3)}.display-xs{font-family:var(--wcss-display-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-display-xs-font-size, clamp(1.75rem, 3vw, 2.375rem));font-weight:var(--wcss-display-xs-weight, 300);letter-spacing:var(--wcss-display-xs-letter-spacing, 0);line-height:var(--wcss-display-xs-line-height, 1.3)}.heading-xl{font-family:var(--wcss-heading-xl-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xl-font-size, clamp(2rem, 3vw, 2.5rem));font-weight:var(--wcss-heading-xl-weight, 300);letter-spacing:var(--wcss-heading-xl-letter-spacing, 0);line-height:var(--wcss-heading-xl-line-height, 1.3)}.heading-lg{font-family:var(--wcss-heading-lg-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-lg-font-size, clamp(1.75rem, 2.6666666667vw, 2.25rem));font-weight:var(--wcss-heading-lg-weight, 300);letter-spacing:var(--wcss-heading-lg-letter-spacing, 0);line-height:var(--wcss-heading-lg-line-height, 1.3)}.heading-md{font-family:var(--wcss-heading-md-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-md-font-size, clamp(1.625rem, 2.3333333333vw, 1.75rem));font-weight:var(--wcss-heading-md-weight, 300);letter-spacing:var(--wcss-heading-md-letter-spacing, 0);line-height:var(--wcss-heading-md-line-height, 1.3)}.heading-sm{font-family:var(--wcss-heading-sm-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-sm-font-size, clamp(1.375rem, 2vw, 1.5rem));font-weight:var(--wcss-heading-sm-weight, 300);letter-spacing:var(--wcss-heading-sm-letter-spacing, 0);line-height:var(--wcss-heading-sm-line-height, 1.3)}.heading-xs{font-family:var(--wcss-heading-xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-xs-font-size, clamp(1.25rem, 1.6666666667vw, 1.25rem));font-weight:var(--wcss-heading-xs-weight, 450);letter-spacing:var(--wcss-heading-xs-letter-spacing, 0);line-height:var(--wcss-heading-xs-line-height, 1.3)}.heading-2xs{font-family:var(--wcss-heading-2xs-family, "AS Circular", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-heading-2xs-font-size, clamp(1.125rem, 1.5vw, 1.125rem));font-weight:var(--wcss-heading-2xs-weight, 450);letter-spacing:var(--wcss-heading-2xs-letter-spacing, 0);line-height:var(--wcss-heading-2xs-line-height, 1.3)}.accent-2xl{font-family:var(--wcss-accent-2xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xl-font-size, clamp(2rem, 3.1666666667vw, 2.375rem));font-weight:var(--wcss-accent-2xl-weight, 450);letter-spacing:var(--wcss-accent-2xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-2xl-line-height, 1)}.accent-xl{font-family:var(--wcss-accent-xl-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xl-font-size, clamp(1.625rem, 2.3333333333vw, 2rem));font-weight:var(--wcss-accent-xl-weight, 450);letter-spacing:var(--wcss-accent-xl-letter-spacing, 0.05em);line-height:var(--wcss-accent-xl-line-height, 1.3)}.accent-lg{font-family:var(--wcss-accent-lg-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-lg-font-size, clamp(1.5rem, 2.1666666667vw, 1.75rem));font-weight:var(--wcss-accent-lg-weight, 450);letter-spacing:var(--wcss-accent-lg-letter-spacing, 0.05em);line-height:var(--wcss-accent-lg-line-height, 1.3)}.accent-md{font-family:var(--wcss-accent-md-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-md-font-size, clamp(1.375rem, 1.8333333333vw, 1.5rem));font-weight:var(--wcss-accent-md-weight, 500);letter-spacing:var(--wcss-accent-md-letter-spacing, 0.05em);line-height:var(--wcss-accent-md-line-height, 1.3)}.accent-sm{font-family:var(--wcss-accent-sm-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-sm-font-size, clamp(1.125rem, 1.5vw, 1.25rem));font-weight:var(--wcss-accent-sm-weight, 500);letter-spacing:var(--wcss-accent-sm-letter-spacing, 0.05em);line-height:var(--wcss-accent-sm-line-height, 1.3)}.accent-xs{font-family:var(--wcss-accent-xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-xs-font-size, clamp(1rem, 1.3333333333vw, 1rem));font-weight:var(--wcss-accent-xs-weight, 500);letter-spacing:var(--wcss-accent-xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-xs-line-height, 1.3)}.accent-2xs{font-family:var(--wcss-accent-2xs-family, "Good OT", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);font-size:var(--wcss-accent-2xs-font-size, clamp(0.875rem, 1.1666666667vw, 0.875rem));font-weight:var(--wcss-accent-2xs-weight, 450);letter-spacing:var(--wcss-accent-2xs-letter-spacing, 0.1em);line-height:var(--wcss-accent-2xs-line-height, 1.3)}: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)}`;
|
|
1615
|
+
|
|
1616
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1617
|
+
// See LICENSE in the project root for license information.
|
|
1618
|
+
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* The auro-header component is a custom element to make using headers with the Auro Design System seamless and easy.
|
|
1622
|
+
*
|
|
1623
|
+
* @attr {Boolean} no-margin-block - if declared, margin-block will be set to `0`
|
|
1624
|
+
* @attr {String} color - Allows user to pass in CSS custom property or direct hex value to change the color of the header
|
|
1625
|
+
* @attr {String} display - Determines the visual appearance of the header. Options are `display`, `800`, `700`, `600`, `500`, `400`, `300`.
|
|
1626
|
+
* @attr {String} level - Determines the semantic heading level of the HTML element. Options are `1` - `6`
|
|
1627
|
+
* @attr {String} margin - Specify the margin(s) to be altered. Options are `top`, `bottom`, or `both`.
|
|
1628
|
+
* @attr {String} size - Specify size of margin adjustment, either `none`, `25`, `50`, `100`, `150`, `200`, `300`, `400`, `600` or `800`.
|
|
1629
|
+
*/
|
|
1630
|
+
/* eslint complexity: ["error", 21] */
|
|
1631
|
+
|
|
1632
|
+
// build the component class
|
|
1633
|
+
class AuroHeader extends LitElement {
|
|
1634
|
+
constructor() {
|
|
1635
|
+
super();
|
|
1636
|
+
|
|
1637
|
+
this.display = 'display';
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* @private
|
|
1641
|
+
*/
|
|
1642
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
// function to define props used within the scope of this component
|
|
1646
|
+
static get properties() {
|
|
1647
|
+
return {
|
|
1648
|
+
level: { type: String },
|
|
1649
|
+
display: {
|
|
1650
|
+
type: String,
|
|
1651
|
+
reflect: true
|
|
1652
|
+
},
|
|
1653
|
+
color: { type: String },
|
|
1654
|
+
margin: { type: String },
|
|
1655
|
+
size: { type: String }
|
|
1656
|
+
};
|
|
1657
|
+
}
|
|
1658
|
+
|
|
1659
|
+
static get styles() {
|
|
1660
|
+
return [styleCss];
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
/**
|
|
1664
|
+
* Mapping of display values to their corresponding CSS classes
|
|
1665
|
+
* @private
|
|
1666
|
+
*/
|
|
1667
|
+
static get displayClassMap() {
|
|
1668
|
+
return {
|
|
1669
|
+
'display': 'heading-xl',
|
|
1670
|
+
'800': 'heading-xl',
|
|
1671
|
+
'700': 'heading-lg',
|
|
1672
|
+
'600': 'heading-md',
|
|
1673
|
+
'500': 'heading-sm',
|
|
1674
|
+
'400': 'heading-xs',
|
|
1675
|
+
'300': 'heading-2xs'
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* This will register this element with the browser.
|
|
1681
|
+
* @param {string} [name="auro-header"] - The name of element that you want to register to.
|
|
1682
|
+
*
|
|
1683
|
+
* @example
|
|
1684
|
+
* AuroHeader.register("custom-header") // this will register this element to <custom-header/>
|
|
1685
|
+
*
|
|
1686
|
+
*/
|
|
1687
|
+
static register(name = "auro-header") {
|
|
1688
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroHeader);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
firstUpdated() {
|
|
1692
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
1693
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-header');
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
/**
|
|
1697
|
+
* Determines if the spacing is to be applied uniform or individual.
|
|
1698
|
+
* @private
|
|
1699
|
+
* @param {string} size - Accepts string for size definition.
|
|
1700
|
+
* @returns {string} - Returns either selectors or function.
|
|
1701
|
+
*/
|
|
1702
|
+
spacingDecision(size) {
|
|
1703
|
+
if (this.margin === 'both') {
|
|
1704
|
+
switch (size) {
|
|
1705
|
+
case 'none': return `util_stackMarginnone--top util_stackMarginnone--bottom`;
|
|
1706
|
+
case '25': return `util_stackMargin25--top util_stackMargin25--bottom`;
|
|
1707
|
+
case '50': return `util_stackMargin50--top util_stackMargin50--bottom`;
|
|
1708
|
+
case '100': return `util_stackMargin100--top util_stackMargin100--bottom`;
|
|
1709
|
+
case '150': return `util_stackMargin150--top util_stackMargin150--bottom`;
|
|
1710
|
+
case '200': return `util_stackMargin200--top util_stackMargin200--bottom`;
|
|
1711
|
+
case '300': return `util_stackMargin300--top util_stackMargin300--bottom`;
|
|
1712
|
+
case '400': return `util_stackMargin400--top util_stackMargin400--bottom`;
|
|
1713
|
+
case '600': return `util_stackMargin600--top util_stackMargin600--bottom`;
|
|
1714
|
+
case '800': return `util_stackMargin800--top util_stackMargin800--bottom`;
|
|
1715
|
+
default: return '';
|
|
1716
|
+
}
|
|
1717
|
+
} else {
|
|
1718
|
+
return this.spacingApplied(size);
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* If spacing is individual, return will be single selector based on input.
|
|
1724
|
+
* @private
|
|
1725
|
+
* @param {string} size - Accepts string for size definition.
|
|
1726
|
+
* @returns {string} - Returns selector.
|
|
1727
|
+
*/
|
|
1728
|
+
spacingApplied(size) {
|
|
1729
|
+
switch (size) {
|
|
1730
|
+
case 'none': return `util_stackMarginnone--${this.margin}`;
|
|
1731
|
+
case '25': return `util_stackMargin25--${this.margin}`;
|
|
1732
|
+
case '50': return `util_stackMargin50--${this.margin}`;
|
|
1733
|
+
case '100': return `util_stackMargin100--${this.margin}`;
|
|
1734
|
+
case '150': return `util_stackMargin150--${this.margin}`;
|
|
1735
|
+
case '200': return `util_stackMargin200--${this.margin}`;
|
|
1736
|
+
case '300': return `util_stackMargin300--${this.margin}`;
|
|
1737
|
+
case '400': return `util_stackMargin400--${this.margin}`;
|
|
1738
|
+
case '600': return `util_stackMarginX600--${this.margin}`;
|
|
1739
|
+
case '800': return `util_stackMargin800--${this.margin}`;
|
|
1740
|
+
default: return '';
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Creates HTML template for use in render function.
|
|
1746
|
+
* @private
|
|
1747
|
+
* @param {string} level - Accepts string value.
|
|
1748
|
+
* @returns {string} - Returns HTML template.
|
|
1749
|
+
*/
|
|
1750
|
+
template(level) {
|
|
1751
|
+
if (this.display === '' || this.display === null) {
|
|
1752
|
+
this.display = 'display';
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
const headingLevel = level || '1';
|
|
1756
|
+
const spacingClasses = this.spacingDecision(this.size);
|
|
1757
|
+
|
|
1758
|
+
// Get the CSS class based on the display prop
|
|
1759
|
+
const headingClass = AuroHeader.displayClassMap[this.display];
|
|
1760
|
+
|
|
1761
|
+
const classObject = {
|
|
1762
|
+
'heading': true,
|
|
1763
|
+
[`heading--${this.display}`]: true,
|
|
1764
|
+
[headingClass]: true
|
|
1765
|
+
};
|
|
1766
|
+
|
|
1767
|
+
// Add spacing classes to the class object if they exist
|
|
1768
|
+
if (spacingClasses) {
|
|
1769
|
+
const spacingClassArray = spacingClasses.split(' ');
|
|
1770
|
+
spacingClassArray.forEach(cls => {
|
|
1771
|
+
if (cls.trim()) {
|
|
1772
|
+
classObject[cls.trim()] = true;
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
const headerClasses = classMap(classObject);
|
|
1778
|
+
|
|
1779
|
+
// unsafeStatic dynamically creates tag names at runtime
|
|
1780
|
+
const tag = unsafeStatic(`h${headingLevel}`);
|
|
1781
|
+
return html$1`<${tag} class="${headerClasses}" style="color: ${ifDefined(this.color ? this.color : undefined)}"><slot></slot></${tag}>`;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
1785
|
+
render() {
|
|
1786
|
+
return this.template(this.level);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
|
|
1790
|
+
var headerVersion = '4.0.2';
|
|
1791
|
+
|
|
1792
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1793
|
+
// See LICENSE in the project root for license information.
|
|
1794
|
+
|
|
1795
|
+
|
|
1796
|
+
class AuroBibtemplate extends LitElement {
|
|
1797
|
+
|
|
1798
|
+
constructor() {
|
|
1799
|
+
super();
|
|
1800
|
+
|
|
1801
|
+
this.large = false;
|
|
1802
|
+
|
|
1803
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
1804
|
+
|
|
1805
|
+
const versioning = new AuroDependencyVersioning();
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* @private
|
|
1809
|
+
*/
|
|
1810
|
+
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
1811
|
+
|
|
1812
|
+
/**
|
|
1813
|
+
* @private
|
|
1814
|
+
*/
|
|
1815
|
+
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
1816
|
+
|
|
1817
|
+
/**
|
|
1818
|
+
* @private
|
|
1819
|
+
*/
|
|
1820
|
+
this.buttonTag = versioning.generateTag('auro-formkit-bibtemplate-button', buttonVersion, AuroButton);
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
static get styles() {
|
|
1824
|
+
return [
|
|
1825
|
+
colorCss$3,
|
|
1826
|
+
styleCss$4,
|
|
1827
|
+
tokenCss
|
|
1828
|
+
];
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
// function to define props used within the scope of this component
|
|
1832
|
+
static get properties() {
|
|
1833
|
+
return {
|
|
1834
|
+
isFullscreen: {
|
|
1835
|
+
type: Boolean,
|
|
1836
|
+
reflect: true
|
|
1837
|
+
},
|
|
1838
|
+
large: {
|
|
1839
|
+
type: Boolean,
|
|
1840
|
+
reflect: true
|
|
1841
|
+
}
|
|
1842
|
+
};
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
// function to define props used within the scope of this component
|
|
1846
|
+
/**
|
|
1847
|
+
* This will register this element with the browser.
|
|
1848
|
+
* @param {string} [name="auro-bibtemplate"] - The name of element that you want to register to.
|
|
1849
|
+
*
|
|
1850
|
+
* @example
|
|
1851
|
+
* AuroCheckbox.register("custom-bibtemplate") // this will register this element to <custom-bibtemplate/>
|
|
1852
|
+
*
|
|
1853
|
+
*/
|
|
1854
|
+
static register(name = "auro-bibtemplate") {
|
|
1855
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
1856
|
+
}
|
|
1857
|
+
|
|
1858
|
+
/**
|
|
1859
|
+
* Prevents scrolling of the body when touching empty areas of the component.
|
|
1860
|
+
* @param {Event} event - The touchmove event.
|
|
1861
|
+
* @returns {void}
|
|
1862
|
+
*/
|
|
1863
|
+
preventBodyScroll(event) {
|
|
1864
|
+
if (event.target === this) {
|
|
1865
|
+
event.preventDefault();
|
|
1866
|
+
}
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
connectedCallback() {
|
|
1870
|
+
super.connectedCallback();
|
|
1871
|
+
|
|
1872
|
+
this.preventBodyScroll = this.preventBodyScroll.bind(this);
|
|
1873
|
+
this.addEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
1874
|
+
}
|
|
1875
|
+
|
|
1876
|
+
disconnectedCallback() {
|
|
1877
|
+
super.disconnectedCallback();
|
|
1878
|
+
|
|
1879
|
+
this.removeEventListener('touchmove', this.preventBodyScroll, { passive: false });
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
onCloseButtonClick() {
|
|
1883
|
+
this.dispatchEvent(new Event("close-click", { bubbles: true,
|
|
1884
|
+
composed: true }));
|
|
1885
|
+
}
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* Exposes CSS parts for styling from parent components.
|
|
1889
|
+
* @returns {void}
|
|
1890
|
+
*/
|
|
1891
|
+
exposeCssParts() {
|
|
1892
|
+
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
firstUpdated(changedProperties) {
|
|
1896
|
+
super.firstUpdated(changedProperties);
|
|
1897
|
+
|
|
1898
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
1899
|
+
bubbles: true,
|
|
1900
|
+
composed: true,
|
|
1901
|
+
detail: {
|
|
1902
|
+
element: this
|
|
1903
|
+
}
|
|
1904
|
+
}));
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1907
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
1908
|
+
render() {
|
|
1909
|
+
return html$1`
|
|
1910
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
1911
|
+
${this.isFullscreen ? html$1`
|
|
1912
|
+
<div id="headerContainer">
|
|
1913
|
+
<div class="titleRow">
|
|
1914
|
+
<${this.headerTag} class="header" display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
1915
|
+
<slot name="header"></slot>
|
|
1916
|
+
</${this.headerTag}>
|
|
1917
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
1918
|
+
<span><slot name="ariaLabel.close">Close</slot></span>
|
|
1919
|
+
<${this.iconTag} aria-hidden="true" category="interface" name="x-lg"></${this.iconTag}>
|
|
1920
|
+
</${this.buttonTag}>
|
|
1921
|
+
</div>
|
|
1922
|
+
<span class="subheader">
|
|
1923
|
+
<slot name="subheader"></slot>
|
|
1924
|
+
</span>
|
|
1925
|
+
</div>` : null}
|
|
1926
|
+
|
|
1927
|
+
<div id="bodyContainer">
|
|
1928
|
+
<slot></slot>
|
|
1929
|
+
</div>
|
|
1930
|
+
|
|
1931
|
+
${this.isFullscreen ? html$1`
|
|
1932
|
+
<div id="footerContainer">
|
|
1933
|
+
<slot name="footer"></slot>
|
|
1934
|
+
</div>` : null}
|
|
1935
|
+
</div>
|
|
1936
|
+
`;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
AuroBibtemplate.register();
|