@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.14 → 0.0.0-pr624.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1022 -12
- package/components/bibtemplate/dist/registered.js +1022 -12
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +2 -2
- package/components/checkbox/demo/api.min.js +24 -19
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +24 -19
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +24 -19
- package/components/checkbox/dist/registered.js +24 -19
- package/components/combobox/demo/api.md +52 -0
- package/components/combobox/demo/api.min.js +2059 -651
- package/components/combobox/demo/index.md +6 -0
- package/components/combobox/demo/index.min.js +2059 -651
- package/components/combobox/dist/auro-combobox.d.ts +4 -4
- package/components/combobox/dist/index.js +1978 -629
- package/components/combobox/dist/registered.js +1978 -629
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +2326 -539
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +2326 -539
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +92 -1
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +2326 -539
- package/components/counter/dist/registered.js +2326 -539
- package/components/datepicker/demo/api.md +3 -1
- package/components/datepicker/demo/api.min.js +5402 -3158
- package/components/datepicker/demo/index.md +6 -1
- package/components/datepicker/demo/index.min.js +5402 -3158
- package/components/datepicker/dist/auro-datepicker.d.ts +17 -7
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +5402 -3158
- package/components/datepicker/dist/registered.js +5402 -3158
- package/components/dropdown/demo/api.md +3 -4
- package/components/dropdown/demo/api.min.js +69 -119
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +69 -119
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +69 -119
- package/components/dropdown/dist/registered.js +69 -119
- package/components/input/demo/api.md +12 -5
- package/components/input/demo/api.min.js +665 -285
- package/components/input/demo/index.min.js +665 -285
- package/components/input/dist/auro-input.d.ts +6 -0
- package/components/input/dist/base-input.d.ts +29 -6
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +665 -285
- package/components/input/dist/registered.js +665 -285
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +63 -2
- package/components/menu/demo/api.min.js +190 -36
- package/components/menu/demo/index.min.js +190 -36
- package/components/menu/dist/auro-menu.d.ts +22 -5
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +190 -36
- package/components/menu/dist/registered.js +190 -36
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.min.js +4 -2
- package/components/radio/demo/index.min.js +4 -2
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +4 -2
- package/components/radio/dist/registered.js +4 -2
- package/components/select/demo/api.md +5 -5
- package/components/select/demo/api.min.js +1412 -293
- package/components/select/demo/index.md +42 -1
- package/components/select/demo/index.min.js +1412 -293
- package/components/select/dist/auro-select.d.ts +8 -8
- package/components/select/dist/index.js +1321 -261
- package/components/select/dist/registered.js +1321 -261
- package/package.json +2 -2
- /package/components/{menu/dist/styles/color-menu-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-css.d.ts} +0 -0
|
@@ -3,17 +3,483 @@ import { unsafeStatic, literal, html as html$1 } from 'lit/static-html.js';
|
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var tokens = css`:host(:not([ondark])){--ds-auro-counter-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-counter-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15))}:host([ondark]){--ds-auro-counter-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-counter-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider-inverse, rgba(255, 255, 255, 0.4))}`;
|
|
7
7
|
|
|
8
|
-
var styleButtonColorCss = css`.
|
|
8
|
+
var styleButtonColorCss = css`.auro-button{border-color:unset;background-color:var(--ds-auro-counter-control-background-color);-webkit-tap-highlight-color:var(--ds-auro-button-tap-color)}@media(hover: hover){.auro-button:active:not(:disabled),.auro-button:hover:not(:disabled){--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1))}}:host([onDark]) .auro-button{--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05))}@media(hover: hover){:host([onDark]) .auro-button:active:not(:disabled),:host([onDark]) .auro-button:hover:not(:disabled){--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}}`;
|
|
9
9
|
|
|
10
|
-
var styleButtonCss = 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}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.contentWrapper{display:flex;align-items:center}.contentWrapper span{display:block;height:var(--ds-size-300, 1.5rem)}.
|
|
10
|
+
var styleButtonCss = 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}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.contentWrapper{display:flex;align-items:center}.contentWrapper span{display:block;height:var(--ds-size-300, 1.5rem)}.auro-button{position:relative;display:inline-flex;overflow:visible;width:calc(var(--ds-size-50, 0.25rem) + var(--ds-size-400, 2rem));height:calc(var(--ds-size-25, 0.125rem) + var(--ds-size-400, 2rem));flex-direction:row;align-items:center;justify-content:center;padding:var(--ds-auro-counter-control-padding);border:none;border-radius:var(--ds-auro-counter-control-border-radius);margin:0;cursor:pointer;gap:var(--ds-size-100, 0.5rem);line-height:unset;touch-action:manipulation;-webkit-touch-callout:none;user-select:none;white-space:nowrap}.auro-button:active .contentWrapper{transform:scale(0.95)}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button:focus-visible:not(.auro-button:focus-visible:disabled){outline:none;transform:unset}`;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
14
|
+
*/
|
|
15
|
+
const _observers$1 = new WeakMap();
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
19
|
+
* Structure: {
|
|
20
|
+
* host: {
|
|
21
|
+
* matchers: Set<Function>,
|
|
22
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
const _transportConfig$1 = new WeakMap();
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} params - The parameters for the function.
|
|
32
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
33
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
34
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
35
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
36
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
37
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
38
|
+
*/
|
|
39
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
40
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
41
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
42
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
46
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
47
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Guard Clause: Ensure match is a function
|
|
51
|
+
if (typeof match !== 'function') {
|
|
52
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
56
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
57
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Register this transport and get cleanup function
|
|
61
|
+
return _registerTransport$1({
|
|
62
|
+
host,
|
|
63
|
+
target,
|
|
64
|
+
matcher: match,
|
|
65
|
+
removeOriginal
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
71
|
+
*
|
|
72
|
+
* @param {Object} params - The parameters object.
|
|
73
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
74
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
75
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
76
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
77
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
78
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
82
|
+
// Initialize config for this host if it doesn't exist
|
|
83
|
+
if (!_transportConfig$1.has(host)) {
|
|
84
|
+
_transportConfig$1.set(host, {
|
|
85
|
+
matchers: new Set(),
|
|
86
|
+
targets: new Map()
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const config = _transportConfig$1.get(host);
|
|
91
|
+
|
|
92
|
+
// Add the matcher to the set of matchers for this host
|
|
93
|
+
config.matchers.add(matcher);
|
|
94
|
+
|
|
95
|
+
// Initialize target entry if it doesn't exist
|
|
96
|
+
if (!config.targets.has(target)) {
|
|
97
|
+
config.targets.set(target, new Map());
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
101
|
+
config.targets.get(target).set(matcher, {
|
|
102
|
+
removeOriginal,
|
|
103
|
+
currentAttributes: new Map()
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Perform initial attribute transport
|
|
107
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
108
|
+
|
|
109
|
+
// Attach observer
|
|
110
|
+
_attachObserver$1(host);
|
|
111
|
+
|
|
112
|
+
// Return cleanup function and utility functions
|
|
113
|
+
return {
|
|
114
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
115
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
116
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
122
|
+
*
|
|
123
|
+
* @param {HTMLElement} host - The host element
|
|
124
|
+
* @param {HTMLElement} target - The target element
|
|
125
|
+
* @param {Function} matcher - The matcher function
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
129
|
+
const config = _transportConfig$1.get(host);
|
|
130
|
+
if (!config) return;
|
|
131
|
+
|
|
132
|
+
// Remove this matcher from this target
|
|
133
|
+
const targetMatchers = config.targets.get(target);
|
|
134
|
+
if (targetMatchers) {
|
|
135
|
+
targetMatchers.delete(matcher);
|
|
136
|
+
|
|
137
|
+
// If this target has no more matchers, remove it
|
|
138
|
+
if (targetMatchers.size === 0) {
|
|
139
|
+
config.targets.delete(target);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Check if this matcher is still used by any target
|
|
144
|
+
let matcherStillUsed = false;
|
|
145
|
+
for (const matcherMap of config.targets.values()) {
|
|
146
|
+
if (matcherMap.has(matcher)) {
|
|
147
|
+
matcherStillUsed = true;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// If not used anymore, remove from matchers set
|
|
153
|
+
if (!matcherStillUsed) {
|
|
154
|
+
config.matchers.delete(matcher);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// If no more targets or matchers, detach observer
|
|
158
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
159
|
+
_detachObserver$1(host);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
165
|
+
*
|
|
166
|
+
* @param {Object} params - The parameters object.
|
|
167
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
168
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
169
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
170
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
171
|
+
* @returns {void}
|
|
172
|
+
* @private
|
|
173
|
+
*/
|
|
174
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
175
|
+
// Get a list of all matching attributes on the host element and their values
|
|
176
|
+
const matchingAttributes = host.getAttributeNames()
|
|
177
|
+
.filter(attr => matcher(attr))
|
|
178
|
+
.reduce((acc, attr) => {
|
|
179
|
+
acc[attr] = host.getAttribute(attr);
|
|
180
|
+
return acc;
|
|
181
|
+
}, {});
|
|
182
|
+
|
|
183
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
184
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
185
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
186
|
+
target.setAttribute(key, value);
|
|
187
|
+
if (removeOriginal) {
|
|
188
|
+
host.removeAttribute(key);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
195
|
+
*
|
|
196
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
197
|
+
* @returns {MutationObserver} The observer instance.
|
|
198
|
+
* @private
|
|
199
|
+
*/
|
|
200
|
+
const _attachObserver$1 = (host) => {
|
|
201
|
+
// If an observer for this host already exists, return it
|
|
202
|
+
if (_observers$1.has(host)) {
|
|
203
|
+
return _observers$1.get(host);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// Create a new MutationObserver
|
|
207
|
+
const observer = new MutationObserver((mutations) => {
|
|
208
|
+
const config = _transportConfig$1.get(host);
|
|
209
|
+
if (!config) return;
|
|
210
|
+
|
|
211
|
+
// For each mutation affecting attributes
|
|
212
|
+
mutations
|
|
213
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
214
|
+
.forEach(mutation => {
|
|
215
|
+
const attributeName = mutation.attributeName;
|
|
216
|
+
|
|
217
|
+
// Find matchers that care about this attribute
|
|
218
|
+
for (const matcher of config.matchers) {
|
|
219
|
+
if (matcher(attributeName)) {
|
|
220
|
+
// For each target that uses this matcher
|
|
221
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
222
|
+
if (matcherConfigs.has(matcher)) {
|
|
223
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
224
|
+
_transportAttributes$1({
|
|
225
|
+
host,
|
|
226
|
+
target,
|
|
227
|
+
matcher,
|
|
228
|
+
removeOriginal
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
// Start observing attribute changes
|
|
238
|
+
observer.observe(host, { attributes: true });
|
|
239
|
+
|
|
240
|
+
// Store the observer
|
|
241
|
+
_observers$1.set(host, observer);
|
|
242
|
+
|
|
243
|
+
return observer;
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
248
|
+
*
|
|
249
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
const _detachObserver$1 = (host) => {
|
|
253
|
+
if (_observers$1.has(host)) {
|
|
254
|
+
const observer = _observers$1.get(host);
|
|
255
|
+
observer.disconnect();
|
|
256
|
+
_observers$1.delete(host);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Clean up the transport config as well
|
|
260
|
+
if (_transportConfig$1.has(host)) {
|
|
261
|
+
_transportConfig$1.delete(host);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
267
|
+
* @param {HTMLElement} host - The host element
|
|
268
|
+
* @param {HTMLElement} target - The target element
|
|
269
|
+
* @param {Function} matcher - The matcher function
|
|
270
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
271
|
+
* @private
|
|
272
|
+
*/
|
|
273
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
274
|
+
const config = _transportConfig$1.get(host);
|
|
275
|
+
if (!config) return undefined;
|
|
276
|
+
|
|
277
|
+
const targetMatchers = config.targets.get(target);
|
|
278
|
+
if (!targetMatchers) return undefined;
|
|
279
|
+
|
|
280
|
+
return targetMatchers.get(matcher);
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Sets an observed attribute value
|
|
285
|
+
* @param {HTMLElement} host - The host element
|
|
286
|
+
* @param {HTMLElement} target - The target element
|
|
287
|
+
* @param {Function} matcher - The matcher function
|
|
288
|
+
* @param {string} key - The attribute name
|
|
289
|
+
* @param {string} value - The attribute value
|
|
290
|
+
* @private
|
|
291
|
+
*/
|
|
292
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
293
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
294
|
+
if (matcherConfig) {
|
|
295
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
300
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
301
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
302
|
+
return undefined;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
306
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
307
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
308
|
+
return [];
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
const _matchers$1 = {
|
|
312
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
313
|
+
'role': attr => attr.match(/^role$/)
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
317
|
+
return transportAttributes$1({
|
|
318
|
+
host,
|
|
319
|
+
target,
|
|
320
|
+
match: attr => {
|
|
321
|
+
for (const key in _matchers$1) {
|
|
322
|
+
if (_matchers$1[key](attr)) return true;
|
|
323
|
+
}
|
|
324
|
+
return false;
|
|
325
|
+
},
|
|
326
|
+
removeOriginal
|
|
327
|
+
});
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
let AuroElement$5 = class AuroElement extends LitElement {
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
334
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
335
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
336
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
337
|
+
* @private
|
|
338
|
+
*/
|
|
339
|
+
attributeWatcher;
|
|
340
|
+
|
|
341
|
+
static get properties() {
|
|
342
|
+
return {
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Defines the layout of an element.
|
|
346
|
+
* @default {'default'}
|
|
347
|
+
*/
|
|
348
|
+
layout: {
|
|
349
|
+
type: String,
|
|
350
|
+
attribute: "layout",
|
|
351
|
+
reflect: true
|
|
352
|
+
},
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* Defines the shape of an element.
|
|
356
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
357
|
+
* @default {'default'}
|
|
358
|
+
*/
|
|
359
|
+
shape: {
|
|
360
|
+
type: String,
|
|
361
|
+
attribute: "shape",
|
|
362
|
+
reflect: true
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Defines the size of an element.
|
|
367
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
368
|
+
* @default {'md'}
|
|
369
|
+
*/
|
|
370
|
+
size: {
|
|
371
|
+
type: String,
|
|
372
|
+
attribute: "size",
|
|
373
|
+
reflect: true
|
|
374
|
+
},
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
378
|
+
* @default {false}
|
|
379
|
+
*/
|
|
380
|
+
onDark: {
|
|
381
|
+
type: Boolean,
|
|
382
|
+
attribute: "ondark",
|
|
383
|
+
reflect: true
|
|
384
|
+
},
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
388
|
+
* This is used to apply layout and shape classes dynamically.
|
|
389
|
+
* @type {HTMLElement|null}
|
|
390
|
+
* @default {null}
|
|
391
|
+
* @private
|
|
392
|
+
*/
|
|
393
|
+
wrapper: {
|
|
394
|
+
type: HTMLElement,
|
|
395
|
+
attribute: false,
|
|
396
|
+
reflect: false
|
|
397
|
+
}
|
|
398
|
+
};
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
resetShapeClasses() {
|
|
404
|
+
if (this.shape && this.size) {
|
|
405
|
+
|
|
406
|
+
if (this.wrapper) {
|
|
407
|
+
this.wrapper.classList.forEach((className) => {
|
|
408
|
+
if (className.startsWith('shape-')) {
|
|
409
|
+
this.wrapper.classList.remove(className);
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
resetLayoutClasses() {
|
|
419
|
+
if (this.layout) {
|
|
420
|
+
if (this.wrapper) {
|
|
421
|
+
this.wrapper.classList.forEach((className) => {
|
|
422
|
+
if (className.startsWith('layout-')) {
|
|
423
|
+
this.wrapper.classList.remove(className);
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
updateComponentArchitecture() {
|
|
433
|
+
this.resetLayoutClasses();
|
|
434
|
+
this.resetShapeClasses();
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
updated(changedProperties) {
|
|
438
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
439
|
+
this.updateComponentArchitecture();
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
firstUpdated() {
|
|
444
|
+
super.firstUpdated();
|
|
445
|
+
|
|
446
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
447
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
448
|
+
|
|
449
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
450
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
disconnectedCallback() {
|
|
454
|
+
super.disconnectedCallback();
|
|
455
|
+
|
|
456
|
+
// Cleanup the ARIA observer if it exists
|
|
457
|
+
if (this.attributeWatcher) {
|
|
458
|
+
this.attributeWatcher.cleanup();
|
|
459
|
+
this.attributeWatcher = null;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
464
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
465
|
+
render() {
|
|
466
|
+
try {
|
|
467
|
+
return this.renderLayout();
|
|
468
|
+
} catch (error) {
|
|
469
|
+
// failed to get the defined layout
|
|
470
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
471
|
+
|
|
472
|
+
// fallback to the default layout
|
|
473
|
+
return this.getLayout('default');
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
};
|
|
11
477
|
|
|
12
478
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
13
479
|
// See LICENSE in the project root for license information.
|
|
14
480
|
|
|
15
481
|
|
|
16
|
-
let AuroDependencyVersioning$
|
|
482
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
17
483
|
|
|
18
484
|
/**
|
|
19
485
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -56,7 +522,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
56
522
|
|
|
57
523
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
58
524
|
|
|
59
|
-
let AuroLibraryRuntimeUtils$
|
|
525
|
+
let AuroLibraryRuntimeUtils$8 = class AuroLibraryRuntimeUtils {
|
|
60
526
|
|
|
61
527
|
/* eslint-disable jsdoc/require-param */
|
|
62
528
|
|
|
@@ -119,11 +585,13 @@ let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
|
119
585
|
}
|
|
120
586
|
};
|
|
121
587
|
|
|
122
|
-
var styleCss$
|
|
588
|
+
var styleCss$a = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
123
589
|
|
|
124
|
-
var colorCss$8 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=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[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=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}`;
|
|
590
|
+
var colorCss$9 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
125
591
|
|
|
126
|
-
var tokensCss$
|
|
592
|
+
var tokensCss$7 = css`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
593
|
+
|
|
594
|
+
var shapeSize$1 = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
127
595
|
|
|
128
596
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
129
597
|
// See LICENSE in the project root for license information.
|
|
@@ -132,7 +600,7 @@ var tokensCss$6 = css`:host{--ds-auro-button-border-color:var(--ds-advanced-colo
|
|
|
132
600
|
|
|
133
601
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
134
602
|
|
|
135
|
-
let AuroLibraryRuntimeUtils$
|
|
603
|
+
let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
136
604
|
|
|
137
605
|
/* eslint-disable jsdoc/require-param */
|
|
138
606
|
|
|
@@ -195,17 +663,17 @@ let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
|
195
663
|
}
|
|
196
664
|
};
|
|
197
665
|
|
|
198
|
-
var styleCss$
|
|
666
|
+
var styleCss$9 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
199
667
|
|
|
200
|
-
var colorCss$
|
|
668
|
+
var colorCss$8 = 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}`;
|
|
201
669
|
|
|
202
|
-
var tokensCss$
|
|
670
|
+
var tokensCss$6 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
203
671
|
|
|
204
672
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
205
673
|
// See LICENSE in the project root for license information.
|
|
206
674
|
|
|
207
675
|
|
|
208
|
-
class AuroLoader extends LitElement {
|
|
676
|
+
let AuroLoader$1 = class AuroLoader extends LitElement {
|
|
209
677
|
constructor() {
|
|
210
678
|
super();
|
|
211
679
|
|
|
@@ -227,7 +695,7 @@ class AuroLoader extends LitElement {
|
|
|
227
695
|
/**
|
|
228
696
|
* @private
|
|
229
697
|
*/
|
|
230
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
698
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
231
699
|
|
|
232
700
|
this.orbit = false;
|
|
233
701
|
this.ringworm = false;
|
|
@@ -275,9 +743,9 @@ class AuroLoader extends LitElement {
|
|
|
275
743
|
|
|
276
744
|
static get styles() {
|
|
277
745
|
return [
|
|
278
|
-
css`${styleCss$
|
|
279
|
-
css`${colorCss$
|
|
280
|
-
css`${tokensCss$
|
|
746
|
+
css`${styleCss$9}`,
|
|
747
|
+
css`${colorCss$8}`,
|
|
748
|
+
css`${tokensCss$6}`
|
|
281
749
|
];
|
|
282
750
|
}
|
|
283
751
|
|
|
@@ -290,7 +758,7 @@ class AuroLoader extends LitElement {
|
|
|
290
758
|
*
|
|
291
759
|
*/
|
|
292
760
|
static register(name = "auro-loader") {
|
|
293
|
-
AuroLibraryRuntimeUtils$
|
|
761
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroLoader);
|
|
294
762
|
}
|
|
295
763
|
|
|
296
764
|
firstUpdated() {
|
|
@@ -338,18 +806,17 @@ class AuroLoader extends LitElement {
|
|
|
338
806
|
}
|
|
339
807
|
`;
|
|
340
808
|
}
|
|
341
|
-
}
|
|
809
|
+
};
|
|
342
810
|
|
|
343
|
-
var loaderVersion = '5.0.0';
|
|
811
|
+
var loaderVersion$1 = '5.0.0';
|
|
344
812
|
|
|
345
|
-
/* eslint-disable max-lines */
|
|
813
|
+
/* eslint-disable max-lines, curly */
|
|
346
814
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
347
815
|
// See LICENSE in the project root for license information.
|
|
348
816
|
|
|
349
817
|
|
|
350
818
|
/**
|
|
351
819
|
* @slot - Default slot for the text of the button.
|
|
352
|
-
* @slot icon - Slot to provide auro-icon for the button.
|
|
353
820
|
* @csspart button - Apply CSS to HTML5 button.
|
|
354
821
|
* @csspart loader - Apply CSS to auro-loader.
|
|
355
822
|
* @csspart text - Apply CSS to text slot.
|
|
@@ -358,7 +825,18 @@ var loaderVersion = '5.0.0';
|
|
|
358
825
|
|
|
359
826
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
360
827
|
|
|
361
|
-
|
|
828
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
832
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
833
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
834
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
835
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
836
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
837
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
838
|
+
*/
|
|
839
|
+
let AuroButton$1 = class AuroButton extends AuroElement$5 {
|
|
362
840
|
|
|
363
841
|
/**
|
|
364
842
|
* Enables form association for this element.
|
|
@@ -373,13 +851,10 @@ class AuroButton extends LitElement {
|
|
|
373
851
|
super();
|
|
374
852
|
this.autofocus = false;
|
|
375
853
|
this.disabled = false;
|
|
376
|
-
this.iconOnly = false;
|
|
377
854
|
this.loading = false;
|
|
855
|
+
this.size = "md";
|
|
856
|
+
this.shape = "rounded";
|
|
378
857
|
this.onDark = false;
|
|
379
|
-
this.secondary = false;
|
|
380
|
-
this.tertiary = false;
|
|
381
|
-
this.rounded = false;
|
|
382
|
-
this.slim = false;
|
|
383
858
|
this.fluid = false;
|
|
384
859
|
this.loadingText = this.loadingText || 'Loading...';
|
|
385
860
|
|
|
@@ -396,55 +871,50 @@ class AuroButton extends LitElement {
|
|
|
396
871
|
/**
|
|
397
872
|
* Generate unique names for dependency components.
|
|
398
873
|
*/
|
|
399
|
-
const versioning = new AuroDependencyVersioning$
|
|
874
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
400
875
|
|
|
401
876
|
/**
|
|
402
877
|
* @private
|
|
403
878
|
*/
|
|
404
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
879
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
405
880
|
}
|
|
406
881
|
|
|
407
882
|
static get styles() {
|
|
408
883
|
return [
|
|
409
|
-
tokensCss$
|
|
410
|
-
styleCss$
|
|
411
|
-
colorCss$
|
|
884
|
+
tokensCss$7,
|
|
885
|
+
styleCss$a,
|
|
886
|
+
colorCss$9,
|
|
887
|
+
shapeSize$1
|
|
412
888
|
];
|
|
413
889
|
}
|
|
414
890
|
|
|
415
891
|
static get properties() {
|
|
416
892
|
return {
|
|
417
893
|
|
|
418
|
-
|
|
419
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
420
|
-
*/
|
|
421
|
-
autofocus: {
|
|
422
|
-
type: Boolean,
|
|
423
|
-
reflect: true
|
|
424
|
-
},
|
|
894
|
+
...super.properties,
|
|
425
895
|
|
|
426
896
|
/**
|
|
427
|
-
*
|
|
897
|
+
* Override layout since it isn't used in this component.
|
|
898
|
+
* @private
|
|
428
899
|
*/
|
|
429
|
-
|
|
900
|
+
layout: {
|
|
430
901
|
type: Boolean,
|
|
431
|
-
|
|
902
|
+
attribute: false,
|
|
903
|
+
reflect: false
|
|
432
904
|
},
|
|
433
905
|
|
|
434
906
|
/**
|
|
435
|
-
*
|
|
436
|
-
* @deprecated
|
|
907
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
437
908
|
*/
|
|
438
|
-
|
|
909
|
+
autofocus: {
|
|
439
910
|
type: Boolean,
|
|
440
911
|
reflect: true
|
|
441
912
|
},
|
|
442
913
|
|
|
443
914
|
/**
|
|
444
|
-
*
|
|
445
|
-
* @deprecated
|
|
915
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
446
916
|
*/
|
|
447
|
-
|
|
917
|
+
disabled: {
|
|
448
918
|
type: Boolean,
|
|
449
919
|
reflect: true
|
|
450
920
|
},
|
|
@@ -452,15 +922,7 @@ class AuroButton extends LitElement {
|
|
|
452
922
|
/**
|
|
453
923
|
* Alters the shape of the button to be full width of its parent container.
|
|
454
924
|
*/
|
|
455
|
-
fluid:
|
|
456
|
-
type: Boolean,
|
|
457
|
-
reflect: true
|
|
458
|
-
},
|
|
459
|
-
|
|
460
|
-
/**
|
|
461
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
462
|
-
*/
|
|
463
|
-
iconOnly: {
|
|
925
|
+
fluid: {
|
|
464
926
|
type: Boolean,
|
|
465
927
|
reflect: true
|
|
466
928
|
},
|
|
@@ -468,7 +930,7 @@ class AuroButton extends LitElement {
|
|
|
468
930
|
/**
|
|
469
931
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
470
932
|
*/
|
|
471
|
-
loading:
|
|
933
|
+
loading: {
|
|
472
934
|
type: Boolean,
|
|
473
935
|
reflect: true
|
|
474
936
|
},
|
|
@@ -476,112 +938,50 @@ class AuroButton extends LitElement {
|
|
|
476
938
|
/**
|
|
477
939
|
* 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.
|
|
478
940
|
*/
|
|
479
|
-
loadingText:
|
|
941
|
+
loadingText: {
|
|
480
942
|
type: String
|
|
481
943
|
},
|
|
482
944
|
|
|
483
945
|
/**
|
|
484
|
-
*
|
|
946
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
485
947
|
*/
|
|
486
|
-
|
|
487
|
-
type:
|
|
948
|
+
tIndex: {
|
|
949
|
+
type: String,
|
|
488
950
|
reflect: true
|
|
489
951
|
},
|
|
490
952
|
|
|
491
953
|
/**
|
|
492
|
-
*
|
|
954
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
493
955
|
*/
|
|
494
|
-
|
|
495
|
-
type:
|
|
956
|
+
title: {
|
|
957
|
+
type: String,
|
|
496
958
|
reflect: true
|
|
497
959
|
},
|
|
498
960
|
|
|
499
961
|
/**
|
|
500
|
-
*
|
|
962
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
501
963
|
*/
|
|
502
|
-
|
|
503
|
-
type:
|
|
964
|
+
type: {
|
|
965
|
+
type: String,
|
|
504
966
|
reflect: true
|
|
505
967
|
},
|
|
506
968
|
|
|
507
969
|
/**
|
|
508
|
-
*
|
|
970
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
509
971
|
*/
|
|
510
|
-
|
|
972
|
+
value: {
|
|
511
973
|
type: String,
|
|
512
974
|
reflect: true
|
|
513
975
|
},
|
|
514
976
|
|
|
515
977
|
/**
|
|
516
|
-
*
|
|
978
|
+
* Sets button variant option.
|
|
979
|
+
* @default primary
|
|
517
980
|
*/
|
|
518
|
-
|
|
519
|
-
type: String,
|
|
520
|
-
reflect: true,
|
|
521
|
-
},
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
525
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
526
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
527
|
-
*/
|
|
528
|
-
arialabel: {
|
|
529
|
-
type: String,
|
|
530
|
-
reflect: true
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
/**
|
|
534
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
535
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
536
|
-
* List multiple element IDs in a space delimited fashion.
|
|
537
|
-
*/
|
|
538
|
-
arialabelledby: {
|
|
539
|
-
type: String,
|
|
540
|
-
reflect: true
|
|
541
|
-
},
|
|
542
|
-
|
|
543
|
-
/**
|
|
544
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
545
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
546
|
-
* This is an optional attribute for buttons.
|
|
547
|
-
*/
|
|
548
|
-
ariaexpanded: {
|
|
549
|
-
type: Boolean,
|
|
550
|
-
reflect: true
|
|
551
|
-
},
|
|
552
|
-
|
|
553
|
-
/**
|
|
554
|
-
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
555
|
-
*/
|
|
556
|
-
title: {
|
|
557
|
-
type: String,
|
|
558
|
-
reflect: true
|
|
559
|
-
},
|
|
560
|
-
|
|
561
|
-
/**
|
|
562
|
-
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
563
|
-
*/
|
|
564
|
-
type: {
|
|
565
|
-
type: String,
|
|
566
|
-
reflect: true
|
|
567
|
-
},
|
|
568
|
-
|
|
569
|
-
/**
|
|
570
|
-
* Defines the value associated with the button which is submitted with the form data.
|
|
571
|
-
*/
|
|
572
|
-
value: {
|
|
573
|
-
type: String,
|
|
574
|
-
reflect: true
|
|
575
|
-
},
|
|
576
|
-
|
|
577
|
-
/**
|
|
578
|
-
* Sets button variant option. Possible values are: `secondary`, `tertiary`.
|
|
579
|
-
*/
|
|
580
|
-
variant: {
|
|
981
|
+
variant: {
|
|
581
982
|
type: String,
|
|
582
983
|
reflect: true
|
|
583
984
|
},
|
|
584
|
-
ready: { type: Boolean },
|
|
585
985
|
};
|
|
586
986
|
}
|
|
587
987
|
|
|
@@ -594,7 +994,7 @@ class AuroButton extends LitElement {
|
|
|
594
994
|
*
|
|
595
995
|
*/
|
|
596
996
|
static register(name = "auro-button") {
|
|
597
|
-
AuroLibraryRuntimeUtils$
|
|
997
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroButton);
|
|
598
998
|
}
|
|
599
999
|
|
|
600
1000
|
/**
|
|
@@ -606,17 +1006,6 @@ class AuroButton extends LitElement {
|
|
|
606
1006
|
this.renderRoot.querySelector('button').focus();
|
|
607
1007
|
}
|
|
608
1008
|
|
|
609
|
-
updated() {
|
|
610
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
611
|
-
if (this.secondary) {
|
|
612
|
-
this.setAttribute('variant', 'secondary');
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
if (this.tertiary) {
|
|
616
|
-
this.setAttribute('variant', 'tertiary');
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
1009
|
/**
|
|
621
1010
|
* Submits the form that this button is associated with.
|
|
622
1011
|
* @private
|
|
@@ -637,25 +1026,57 @@ class AuroButton extends LitElement {
|
|
|
637
1026
|
return this.internals ? this.internals.form : null;
|
|
638
1027
|
}
|
|
639
1028
|
|
|
640
|
-
|
|
1029
|
+
/**
|
|
1030
|
+
* @private
|
|
1031
|
+
* @returns {Boolean}
|
|
1032
|
+
*/
|
|
1033
|
+
get hideText() {
|
|
1034
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
1035
|
+
}
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
1039
|
+
* @returns {string | undefined}
|
|
1040
|
+
* @private
|
|
1041
|
+
*/
|
|
1042
|
+
get currentAriaLabel() {
|
|
1043
|
+
if (!this.attributeWatcher) return undefined;
|
|
1044
|
+
|
|
1045
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
1046
|
+
return ariaLabel || undefined;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
1051
|
+
* @returns {string | undefined}
|
|
1052
|
+
* @private
|
|
1053
|
+
*/
|
|
1054
|
+
get currentAriaLabelledBy() {
|
|
1055
|
+
if (!this.attributeWatcher) return undefined;
|
|
1056
|
+
|
|
1057
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
1058
|
+
return ariaLabelledBy || undefined;
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
/**
|
|
1062
|
+
* Renders the default layout for the button.
|
|
1063
|
+
* @returns {TemplateResult}
|
|
1064
|
+
* @private
|
|
1065
|
+
*/
|
|
1066
|
+
renderLayoutDefault() {
|
|
641
1067
|
const classes = {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
648
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
649
|
-
'loading': this.loading
|
|
1068
|
+
"util_insetLg--squish": true,
|
|
1069
|
+
"auro-button": true,
|
|
1070
|
+
"icon-only": this.hideText,
|
|
1071
|
+
wrapper: true,
|
|
1072
|
+
loading: this.loading,
|
|
650
1073
|
};
|
|
651
1074
|
|
|
652
1075
|
return html$1`
|
|
653
1076
|
<button
|
|
654
1077
|
part="button"
|
|
655
|
-
aria-
|
|
656
|
-
aria-
|
|
657
|
-
aria-labelledby="${ifDefined(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
658
|
-
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
1078
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
1079
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
659
1080
|
tabIndex="${ifDefined(this.tIndex)}"
|
|
660
1081
|
?autofocus="${this.autofocus}"
|
|
661
1082
|
class="${classMap(classes)}"
|
|
@@ -672,85 +1093,20 @@ class AuroButton extends LitElement {
|
|
|
672
1093
|
|
|
673
1094
|
<span class="contentWrapper">
|
|
674
1095
|
<span class="textSlot" part="text">
|
|
675
|
-
|
|
676
|
-
</span>
|
|
677
|
-
|
|
678
|
-
<span part="icon">
|
|
679
|
-
<slot name="icon"></slot>
|
|
1096
|
+
<slot></slot>
|
|
680
1097
|
</span>
|
|
681
1098
|
</span>
|
|
682
1099
|
</button>
|
|
683
1100
|
`;
|
|
684
1101
|
}
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
688
|
-
// See LICENSE in the project root for license information.
|
|
689
|
-
|
|
690
|
-
// ---------------------------------------------------------------------
|
|
691
|
-
|
|
692
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
693
|
-
|
|
694
|
-
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
695
|
-
|
|
696
|
-
/* eslint-disable jsdoc/require-param */
|
|
697
|
-
|
|
698
|
-
/**
|
|
699
|
-
* This will register a new custom element with the browser.
|
|
700
|
-
* @param {String} name - The name of the custom element.
|
|
701
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
702
|
-
* @returns {void}
|
|
703
|
-
*/
|
|
704
|
-
registerComponent(name, componentClass) {
|
|
705
|
-
if (!customElements.get(name)) {
|
|
706
|
-
customElements.define(name, class extends componentClass {});
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
/**
|
|
711
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
712
|
-
* @returns {void}
|
|
713
|
-
*/
|
|
714
|
-
closestElement(
|
|
715
|
-
selector, // selector like in .closest()
|
|
716
|
-
base = this, // extra functionality to skip a parent
|
|
717
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
718
|
-
!el || el === document || el === window
|
|
719
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
720
|
-
: found
|
|
721
|
-
? found // found a selector INside this element
|
|
722
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
723
|
-
) {
|
|
724
|
-
return __Closest(base);
|
|
725
|
-
}
|
|
726
|
-
/* eslint-enable jsdoc/require-param */
|
|
727
|
-
|
|
728
|
-
/**
|
|
729
|
-
* 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.
|
|
730
|
-
* @param {Object} elem - The element to check.
|
|
731
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
732
|
-
* @returns {void}
|
|
733
|
-
*/
|
|
734
|
-
handleComponentTagRename(elem, tagName) {
|
|
735
|
-
const tag = tagName.toLowerCase();
|
|
736
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
737
|
-
|
|
738
|
-
if (elemTag !== tag) {
|
|
739
|
-
elem.setAttribute(tag, true);
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
1102
|
|
|
743
1103
|
/**
|
|
744
|
-
*
|
|
745
|
-
* @
|
|
746
|
-
* @
|
|
747
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1104
|
+
* Renders the layout of the button
|
|
1105
|
+
* @returns {TemplateResult}
|
|
1106
|
+
* @private
|
|
748
1107
|
*/
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
752
|
-
|
|
753
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
1108
|
+
renderLayout() {
|
|
1109
|
+
return this.renderLayoutDefault();
|
|
754
1110
|
}
|
|
755
1111
|
};
|
|
756
1112
|
|
|
@@ -759,13 +1115,20 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
759
1115
|
|
|
760
1116
|
|
|
761
1117
|
// build the component class
|
|
762
|
-
class AuroCounterButton extends AuroButton {
|
|
1118
|
+
class AuroCounterButton extends AuroButton$1 {
|
|
1119
|
+
|
|
1120
|
+
constructor() {
|
|
1121
|
+
super();
|
|
1122
|
+
|
|
1123
|
+
this.size = "sm";
|
|
1124
|
+
this.shape = "rounded";
|
|
1125
|
+
}
|
|
763
1126
|
|
|
764
1127
|
static get styles() {
|
|
765
1128
|
return [
|
|
766
1129
|
styleButtonCss,
|
|
767
1130
|
styleButtonColorCss,
|
|
768
|
-
|
|
1131
|
+
tokens
|
|
769
1132
|
];
|
|
770
1133
|
}
|
|
771
1134
|
|
|
@@ -778,7 +1141,7 @@ class AuroCounterButton extends AuroButton {
|
|
|
778
1141
|
*
|
|
779
1142
|
*/
|
|
780
1143
|
static register(name = "auro-counter-button") {
|
|
781
|
-
AuroLibraryRuntimeUtils$
|
|
1144
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterButton);
|
|
782
1145
|
}
|
|
783
1146
|
}
|
|
784
1147
|
|
|
@@ -788,46 +1151,6 @@ if (!customElements.get("auro-counter-button")) {
|
|
|
788
1151
|
customElements.define("auro-counter-button", AuroCounterButton);
|
|
789
1152
|
}
|
|
790
1153
|
|
|
791
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
792
|
-
// See LICENSE in the project root for license information.
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
796
|
-
|
|
797
|
-
/**
|
|
798
|
-
* Generates a unique string to be used for child auro element naming.
|
|
799
|
-
* @private
|
|
800
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
801
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
802
|
-
* @returns {string} - Unique string to be used for naming.
|
|
803
|
-
*/
|
|
804
|
-
generateElementName(baseName, version) {
|
|
805
|
-
let result = baseName;
|
|
806
|
-
|
|
807
|
-
result += '-';
|
|
808
|
-
result += version.replace(/[.]/g, '_');
|
|
809
|
-
|
|
810
|
-
return result;
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
/**
|
|
814
|
-
* Generates a unique string to be used for child auro element naming.
|
|
815
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
816
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
817
|
-
* @returns {string} - Unique string to be used for naming.
|
|
818
|
-
*/
|
|
819
|
-
generateTag(baseName, version, tagClass) {
|
|
820
|
-
const elementName = this.generateElementName(baseName, version);
|
|
821
|
-
const tag = literal`${unsafeStatic(elementName)}`;
|
|
822
|
-
|
|
823
|
-
if (!customElements.get(elementName)) {
|
|
824
|
-
customElements.define(elementName, class extends tagClass {});
|
|
825
|
-
}
|
|
826
|
-
|
|
827
|
-
return tag;
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
|
|
831
1154
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
832
1155
|
// See LICENSE in the project root for license information.
|
|
833
1156
|
|
|
@@ -838,7 +1161,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
838
1161
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
839
1162
|
*/
|
|
840
1163
|
|
|
841
|
-
let AuroElement$
|
|
1164
|
+
let AuroElement$4 = class AuroElement extends LitElement {
|
|
842
1165
|
|
|
843
1166
|
// function to define props used within the scope of this component
|
|
844
1167
|
static get properties() {
|
|
@@ -894,7 +1217,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
894
1217
|
return _fetchMap$2.get(uri);
|
|
895
1218
|
};
|
|
896
1219
|
|
|
897
|
-
var styleCss$
|
|
1220
|
+
var styleCss$8 = 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}`;
|
|
898
1221
|
|
|
899
1222
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
900
1223
|
// See LICENSE in the project root for license information.
|
|
@@ -906,7 +1229,7 @@ var styleCss$7 = css`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
906
1229
|
*/
|
|
907
1230
|
|
|
908
1231
|
// build the component class
|
|
909
|
-
let BaseIcon$2 = class BaseIcon extends AuroElement$
|
|
1232
|
+
let BaseIcon$2 = class BaseIcon extends AuroElement$4 {
|
|
910
1233
|
constructor() {
|
|
911
1234
|
super();
|
|
912
1235
|
this.onDark = false;
|
|
@@ -937,7 +1260,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
937
1260
|
|
|
938
1261
|
static get styles() {
|
|
939
1262
|
return css`
|
|
940
|
-
${styleCss$
|
|
1263
|
+
${styleCss$8}
|
|
941
1264
|
`;
|
|
942
1265
|
}
|
|
943
1266
|
|
|
@@ -978,9 +1301,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
978
1301
|
}
|
|
979
1302
|
};
|
|
980
1303
|
|
|
981
|
-
var tokensCss$
|
|
1304
|
+
var tokensCss$5 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
982
1305
|
|
|
983
|
-
var colorCss$
|
|
1306
|
+
var colorCss$7 = 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)}`;
|
|
984
1307
|
|
|
985
1308
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
986
1309
|
// See LICENSE in the project root for license information.
|
|
@@ -989,7 +1312,7 @@ var colorCss$6 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
989
1312
|
|
|
990
1313
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
991
1314
|
|
|
992
|
-
let AuroLibraryRuntimeUtils$
|
|
1315
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
993
1316
|
|
|
994
1317
|
/* eslint-disable jsdoc/require-param */
|
|
995
1318
|
|
|
@@ -1071,7 +1394,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1071
1394
|
*/
|
|
1072
1395
|
privateDefaults() {
|
|
1073
1396
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1074
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1397
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
1075
1398
|
}
|
|
1076
1399
|
|
|
1077
1400
|
// function to define props used within the scope of this component
|
|
@@ -1138,9 +1461,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1138
1461
|
static get styles() {
|
|
1139
1462
|
return [
|
|
1140
1463
|
super.styles,
|
|
1141
|
-
css`${tokensCss$
|
|
1142
|
-
css`${styleCss$
|
|
1143
|
-
css`${colorCss$
|
|
1464
|
+
css`${tokensCss$5}`,
|
|
1465
|
+
css`${styleCss$8}`,
|
|
1466
|
+
css`${colorCss$7}`
|
|
1144
1467
|
];
|
|
1145
1468
|
}
|
|
1146
1469
|
|
|
@@ -1153,7 +1476,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1153
1476
|
*
|
|
1154
1477
|
*/
|
|
1155
1478
|
static register(name = "auro-icon") {
|
|
1156
|
-
AuroLibraryRuntimeUtils$
|
|
1479
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroIcon);
|
|
1157
1480
|
}
|
|
1158
1481
|
|
|
1159
1482
|
connectedCallback() {
|
|
@@ -1174,8 +1497,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1174
1497
|
async firstUpdated() {
|
|
1175
1498
|
await super.firstUpdated();
|
|
1176
1499
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1500
|
+
/**
|
|
1501
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
1502
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
1503
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
1504
|
+
*/
|
|
1505
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
1179
1506
|
const svgDesc = this.svg.querySelector('desc');
|
|
1180
1507
|
|
|
1181
1508
|
if (svgDesc) {
|
|
@@ -1219,7 +1546,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1219
1546
|
}
|
|
1220
1547
|
};
|
|
1221
1548
|
|
|
1222
|
-
var iconVersion$2 = '8.0.
|
|
1549
|
+
var iconVersion$2 = '8.0.4';
|
|
1223
1550
|
|
|
1224
1551
|
class DateFormatter {
|
|
1225
1552
|
|
|
@@ -1637,7 +1964,7 @@ const {
|
|
|
1637
1964
|
class AuroFormValidation {
|
|
1638
1965
|
|
|
1639
1966
|
constructor() {
|
|
1640
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1967
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$8();
|
|
1641
1968
|
}
|
|
1642
1969
|
|
|
1643
1970
|
/**
|
|
@@ -1916,7 +2243,9 @@ class AuroFormValidation {
|
|
|
1916
2243
|
elem.validity = this.auroInputElements[0].validity;
|
|
1917
2244
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1918
2245
|
|
|
1919
|
-
|
|
2246
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
2247
|
+
// combobox's 2nd input will have noValidate set true.
|
|
2248
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1920
2249
|
elem.validity = this.auroInputElements[1].validity;
|
|
1921
2250
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1922
2251
|
}
|
|
@@ -2023,9 +2352,9 @@ var plusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width"
|
|
|
2023
2352
|
|
|
2024
2353
|
var minusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"minus-lg","category":"interface","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><path d=\"M5.75 12.75h12.5a.75.75 0 1 0 0-1.5H5.75a.75.75 0 1 0 0 1.5\"/></svg>"};
|
|
2025
2354
|
|
|
2026
|
-
var colorCss$
|
|
2355
|
+
var colorCss$6 = css`.label{color:var(--ds-auro-counter-label-text-color)}[name=description]::slotted(*){color:var(--ds-auro-counter-description-text-color)}.controlIcon{color:var(--ds-auro-counter-icon-color)}.quantityWrapper{background-color:var(--ds-auro-counter-control-background-color);color:var(--ds-auro-counter-quantity-text-color)}:host::part(counterControl):focus-visible{outline-color:var(--ds-auro-counter-control-border-color)}[disabled],:host([disabled]){--ds-auro-counter-icon-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}[onDark],:host([onDark]){--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}[onDark][disabled],:host([onDark][disabled]){--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-counter-icon-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}`;
|
|
2027
2356
|
|
|
2028
|
-
var styleCss$
|
|
2357
|
+
var styleCss$7 = css`.counter{display:flex;align-items:center;justify-content:space-between;column-gap:var(--ds-size-150, 0.75rem)}.content{display:flex;flex-flow:column}[name=description]::slotted(*){display:block;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}.quantityWrapper{width:var(--ds-size-400, 2rem);height:calc(var(--ds-size-25, 0.125rem) + var(--ds-size-400, 2rem));align-content:center;cursor:default;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px;text-align:center}:host{position:relative}:host::part(counterControl){display:flex;border-radius:var(--ds-size-500, 2.5rem);line-height:0;touch-action:manipulation}:host::part(counterControl):focus-visible{outline-offset:0;outline-style:solid;outline-width:var(--ds-size-25, 0.125rem)}:host::part(controlMinus){--ds-auro-counter-control-border-radius: var(--ds-size-500, 2.5rem) 0 0 var(--ds-size-500, 2.5rem);--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem)}:host::part(controlPlus){--ds-auro-counter-control-border-radius: 0 var(--ds-size-500, 2.5rem) var(--ds-size-500, 2.5rem) 0;--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem)}auro-counter-button{display:flex}`;
|
|
2029
2358
|
|
|
2030
2359
|
/* eslint-disable lit/binding-positions, lit/no-invalid-html, max-lines */
|
|
2031
2360
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -2183,14 +2512,14 @@ class AuroCounter extends LitElement {
|
|
|
2183
2512
|
* AuroCounter.register("custom-counter") // registers <custom-counter/>
|
|
2184
2513
|
*/
|
|
2185
2514
|
static register(name = "auro-counter") {
|
|
2186
|
-
AuroLibraryRuntimeUtils$
|
|
2515
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounter);
|
|
2187
2516
|
}
|
|
2188
2517
|
|
|
2189
2518
|
static get styles() {
|
|
2190
2519
|
return [
|
|
2191
|
-
|
|
2192
|
-
colorCss$
|
|
2193
|
-
styleCss$
|
|
2520
|
+
tokens,
|
|
2521
|
+
colorCss$6,
|
|
2522
|
+
styleCss$7
|
|
2194
2523
|
];
|
|
2195
2524
|
}
|
|
2196
2525
|
|
|
@@ -2329,14 +2658,13 @@ class AuroCounter extends LitElement {
|
|
|
2329
2658
|
<div part="counterControl" aria-labelledby="counter-label" aria-describedby="counter-description" tabindex="${this.disabled ? '-1' : '0'}" role="spinbutton" aria-valuemin="${this.min}" aria-valuemax="${this.max}" aria-valuenow="${this.value}">
|
|
2330
2659
|
<auro-counter-button
|
|
2331
2660
|
aria-hidden="true"
|
|
2332
|
-
|
|
2333
|
-
tabindex="-1"
|
|
2661
|
+
tindex="-1"
|
|
2334
2662
|
part="controlMinus"
|
|
2335
2663
|
@click="${() => this.decrement()}"
|
|
2336
2664
|
?onDark="${this.onDark}"
|
|
2337
2665
|
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
2338
2666
|
>
|
|
2339
|
-
<${this.iconTag} class="controlIcon"
|
|
2667
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
2340
2668
|
</auro-counter-button>
|
|
2341
2669
|
|
|
2342
2670
|
<div class="quantityWrapper">
|
|
@@ -2345,14 +2673,13 @@ class AuroCounter extends LitElement {
|
|
|
2345
2673
|
|
|
2346
2674
|
<auro-counter-button
|
|
2347
2675
|
aria-hidden="true"
|
|
2348
|
-
|
|
2349
|
-
tabindex="-1"
|
|
2676
|
+
tindex="-1"
|
|
2350
2677
|
part="controlPlus"
|
|
2351
2678
|
@click="${() => this.increment()}"
|
|
2352
2679
|
?onDark="${this.onDark}"
|
|
2353
2680
|
?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
|
|
2354
2681
|
>
|
|
2355
|
-
<${this.iconTag} class="controlIcon"
|
|
2682
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(plusIcon)} </${this.iconTag}>
|
|
2356
2683
|
</auro-counter-button>
|
|
2357
2684
|
</div>
|
|
2358
2685
|
</div>
|
|
@@ -2360,7 +2687,9 @@ class AuroCounter extends LitElement {
|
|
|
2360
2687
|
}
|
|
2361
2688
|
}
|
|
2362
2689
|
|
|
2363
|
-
var
|
|
2690
|
+
var counterGroupStyles = css`:host(:not([layout=classic])) .triggerContent{padding:0 8px 0 24px}:host(:not([layout=classic])) [auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-counter-trigger-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-counter-trigger-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-counter-trigger-background-color)}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}.mainContent{display:flex;width:100%;flex-direction:column;align-items:flex-start;justify-content:center}label{font-size:var(--ds-text-body-size-default, 1rem);line-height:20px}label.filled{font-size:var(--ds-text-body-size-xs, 0.75rem)}slot[name=valueText]{font-size:var(--ds-text-body-size-default, 1rem);overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.counters{display:flex;flex-direction:column;gap:var(--ds-size-300, 1.5rem)}.counters ::slotted(auro-counter:not(:first-of-type)){padding-top:var(--ds-size-300, 1.5rem);border-top-width:1px;border-top-style:solid}`;
|
|
2691
|
+
|
|
2692
|
+
var shapeSizeCss$1 = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
2364
2693
|
|
|
2365
2694
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2366
2695
|
// See LICENSE in the project root for license information.
|
|
@@ -4649,7 +4978,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
4649
4978
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
4650
4979
|
*/
|
|
4651
4980
|
|
|
4652
|
-
let AuroElement$1 = class AuroElement extends LitElement {
|
|
4981
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
4653
4982
|
|
|
4654
4983
|
// function to define props used within the scope of this component
|
|
4655
4984
|
static get properties() {
|
|
@@ -4717,7 +5046,7 @@ var styleCss$2$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
4717
5046
|
*/
|
|
4718
5047
|
|
|
4719
5048
|
// build the component class
|
|
4720
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
5049
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
4721
5050
|
constructor() {
|
|
4722
5051
|
super();
|
|
4723
5052
|
this.onDark = false;
|
|
@@ -4789,9 +5118,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
4789
5118
|
}
|
|
4790
5119
|
};
|
|
4791
5120
|
|
|
4792
|
-
var tokensCss$2 = 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)}`;
|
|
5121
|
+
var tokensCss$2$1 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
4793
5122
|
|
|
4794
|
-
var colorCss$3 = 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)}`;
|
|
5123
|
+
var colorCss$3$1 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
4795
5124
|
|
|
4796
5125
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4797
5126
|
// See LICENSE in the project root for license information.
|
|
@@ -4949,9 +5278,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4949
5278
|
static get styles() {
|
|
4950
5279
|
return [
|
|
4951
5280
|
super.styles,
|
|
4952
|
-
css`${tokensCss$2}`,
|
|
5281
|
+
css`${tokensCss$2$1}`,
|
|
4953
5282
|
css`${styleCss$2$1}`,
|
|
4954
|
-
css`${colorCss$3}`
|
|
5283
|
+
css`${colorCss$3$1}`
|
|
4955
5284
|
];
|
|
4956
5285
|
}
|
|
4957
5286
|
|
|
@@ -4985,8 +5314,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4985
5314
|
async firstUpdated() {
|
|
4986
5315
|
await super.firstUpdated();
|
|
4987
5316
|
|
|
4988
|
-
|
|
4989
|
-
|
|
5317
|
+
/**
|
|
5318
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
5319
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
5320
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
5321
|
+
*/
|
|
5322
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
4990
5323
|
const svgDesc = this.svg.querySelector('desc');
|
|
4991
5324
|
|
|
4992
5325
|
if (svgDesc) {
|
|
@@ -5032,11 +5365,11 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5032
5365
|
|
|
5033
5366
|
var iconVersion$1 = '6.1.2';
|
|
5034
5367
|
|
|
5035
|
-
var styleCss$1$
|
|
5368
|
+
var styleCss$1$2 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
5036
5369
|
|
|
5037
5370
|
var colorCss$2$1 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
5038
5371
|
|
|
5039
|
-
var tokensCss$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color:
|
|
5372
|
+
var tokensCss$1$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
5040
5373
|
|
|
5041
5374
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5042
5375
|
// See LICENSE in the project root for license information.
|
|
@@ -5057,7 +5390,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
5057
5390
|
*/
|
|
5058
5391
|
|
|
5059
5392
|
class AuroDropdownBib extends LitElement {
|
|
5060
|
-
|
|
5393
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
5061
5394
|
constructor() {
|
|
5062
5395
|
super();
|
|
5063
5396
|
|
|
@@ -5067,13 +5400,16 @@ class AuroDropdownBib extends LitElement {
|
|
|
5067
5400
|
this._mobileBreakpointValue = undefined;
|
|
5068
5401
|
|
|
5069
5402
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
5403
|
+
|
|
5404
|
+
this.shape = "rounded";
|
|
5405
|
+
this.matchWidth = false;
|
|
5070
5406
|
}
|
|
5071
5407
|
|
|
5072
5408
|
static get styles() {
|
|
5073
5409
|
return [
|
|
5074
|
-
styleCss$1$
|
|
5410
|
+
styleCss$1$2,
|
|
5075
5411
|
colorCss$2$1,
|
|
5076
|
-
tokensCss$1
|
|
5412
|
+
tokensCss$1$1
|
|
5077
5413
|
];
|
|
5078
5414
|
}
|
|
5079
5415
|
|
|
@@ -5104,6 +5440,15 @@ class AuroDropdownBib extends LitElement {
|
|
|
5104
5440
|
reflect: true
|
|
5105
5441
|
},
|
|
5106
5442
|
|
|
5443
|
+
/**
|
|
5444
|
+
* If declared, the bib width will match the trigger width.
|
|
5445
|
+
* @private
|
|
5446
|
+
*/
|
|
5447
|
+
matchWidth: {
|
|
5448
|
+
type: Boolean,
|
|
5449
|
+
reflect: true
|
|
5450
|
+
},
|
|
5451
|
+
|
|
5107
5452
|
/**
|
|
5108
5453
|
* If declared, will apply border-radius to the bib.
|
|
5109
5454
|
*/
|
|
@@ -5117,6 +5462,11 @@ class AuroDropdownBib extends LitElement {
|
|
|
5117
5462
|
*/
|
|
5118
5463
|
bibTemplate: {
|
|
5119
5464
|
type: Object
|
|
5465
|
+
},
|
|
5466
|
+
|
|
5467
|
+
shape: {
|
|
5468
|
+
type: String,
|
|
5469
|
+
reflect: true
|
|
5120
5470
|
}
|
|
5121
5471
|
};
|
|
5122
5472
|
}
|
|
@@ -5196,8 +5546,16 @@ class AuroDropdownBib extends LitElement {
|
|
|
5196
5546
|
|
|
5197
5547
|
// function that renders the HTML and CSS into the scope of the component
|
|
5198
5548
|
render() {
|
|
5549
|
+
const classes = {
|
|
5550
|
+
container: true
|
|
5551
|
+
};
|
|
5552
|
+
|
|
5553
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
5554
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
5555
|
+
classes[`shape-${this.shape}`] = true;
|
|
5556
|
+
|
|
5199
5557
|
return html$1`
|
|
5200
|
-
<div class="
|
|
5558
|
+
<div class="${classMap(classes)}" part="bibContainer">
|
|
5201
5559
|
<slot></slot>
|
|
5202
5560
|
</div>
|
|
5203
5561
|
`;
|
|
@@ -5206,23 +5564,23 @@ class AuroDropdownBib extends LitElement {
|
|
|
5206
5564
|
|
|
5207
5565
|
var dropdownVersion$1 = '3.0.0';
|
|
5208
5566
|
|
|
5209
|
-
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
5567
|
+
var shapeSizeCss = css`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
5210
5568
|
|
|
5211
|
-
var colorCss$1$
|
|
5569
|
+
var colorCss$1$2 = css`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
5212
5570
|
|
|
5213
|
-
var classicColorCss = css`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)
|
|
5571
|
+
var classicColorCss = css`:host([layout*=classic]:not([onDark])) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]:not([onDark])) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic]:not([onDark])) .trigger:focus-within,:host([layout*=classic]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][disabled]:not([onDark])){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic][error]:not([onDark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][error]:not([onDark])) .trigger:focus-within,:host([layout*=classic][error]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic][onDark]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic][onDark]) .trigger:focus-within,:host([layout*=classic][onDark]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic][onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([layout*=classic][onDark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][onDark][error]) .trigger:focus-within,:host([layout*=classic][onDark][error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
5214
5572
|
|
|
5215
|
-
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;
|
|
5573
|
+
var classicLayoutCss = css`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic]:not([simple])) .triggerContentWrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}`;
|
|
5216
5574
|
|
|
5217
|
-
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;
|
|
5575
|
+
var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
5218
5576
|
|
|
5219
|
-
var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;
|
|
5577
|
+
var styleSnowflakeCss = css`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
5220
5578
|
|
|
5221
|
-
var colorCss$
|
|
5579
|
+
var colorCss$5 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
5222
5580
|
|
|
5223
|
-
var styleCss$
|
|
5581
|
+
var styleCss$6 = css`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
5224
5582
|
|
|
5225
|
-
var tokensCss$
|
|
5583
|
+
var tokensCss$4 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5226
5584
|
|
|
5227
5585
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5228
5586
|
// See LICENSE in the project root for license information.
|
|
@@ -5231,7 +5589,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
5231
5589
|
|
|
5232
5590
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5233
5591
|
|
|
5234
|
-
let AuroLibraryRuntimeUtils$
|
|
5592
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
5235
5593
|
|
|
5236
5594
|
/* eslint-disable jsdoc/require-param */
|
|
5237
5595
|
|
|
@@ -5303,7 +5661,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
5303
5661
|
*
|
|
5304
5662
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
5305
5663
|
*/
|
|
5306
|
-
class AuroHelpText extends LitElement {
|
|
5664
|
+
let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
5307
5665
|
|
|
5308
5666
|
constructor() {
|
|
5309
5667
|
super();
|
|
@@ -5312,14 +5670,14 @@ class AuroHelpText extends LitElement {
|
|
|
5312
5670
|
this.onDark = false;
|
|
5313
5671
|
this.hasTextContent = false;
|
|
5314
5672
|
|
|
5315
|
-
AuroLibraryRuntimeUtils$
|
|
5673
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
5316
5674
|
}
|
|
5317
5675
|
|
|
5318
5676
|
static get styles() {
|
|
5319
5677
|
return [
|
|
5320
|
-
colorCss$
|
|
5321
|
-
styleCss$
|
|
5322
|
-
tokensCss$
|
|
5678
|
+
colorCss$5,
|
|
5679
|
+
styleCss$6,
|
|
5680
|
+
tokensCss$4
|
|
5323
5681
|
];
|
|
5324
5682
|
}
|
|
5325
5683
|
|
|
@@ -5368,7 +5726,7 @@ class AuroHelpText extends LitElement {
|
|
|
5368
5726
|
*
|
|
5369
5727
|
*/
|
|
5370
5728
|
static register(name = "auro-helptext") {
|
|
5371
|
-
AuroLibraryRuntimeUtils$
|
|
5729
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
5372
5730
|
}
|
|
5373
5731
|
|
|
5374
5732
|
updated() {
|
|
@@ -5422,11 +5780,11 @@ class AuroHelpText extends LitElement {
|
|
|
5422
5780
|
</div>
|
|
5423
5781
|
`;
|
|
5424
5782
|
}
|
|
5425
|
-
}
|
|
5783
|
+
};
|
|
5426
5784
|
|
|
5427
5785
|
var helpTextVersion = '1.0.0';
|
|
5428
5786
|
|
|
5429
|
-
let AuroElement$
|
|
5787
|
+
let AuroElement$3 = class AuroElement extends LitElement {
|
|
5430
5788
|
static get properties() {
|
|
5431
5789
|
return {
|
|
5432
5790
|
|
|
@@ -5461,18 +5819,21 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
5461
5819
|
}
|
|
5462
5820
|
|
|
5463
5821
|
resetShapeClasses() {
|
|
5464
|
-
|
|
5465
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5822
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5466
5823
|
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5824
|
+
if (wrapper) {
|
|
5825
|
+
wrapper.classList.forEach((className) => {
|
|
5826
|
+
if (className.startsWith('shape-')) {
|
|
5827
|
+
wrapper.classList.remove(className);
|
|
5828
|
+
}
|
|
5829
|
+
});
|
|
5473
5830
|
|
|
5474
|
-
|
|
5475
|
-
|
|
5831
|
+
}
|
|
5832
|
+
|
|
5833
|
+
if (this.shape && this.size) {
|
|
5834
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5835
|
+
} else {
|
|
5836
|
+
wrapper.classList.add('shape-none');
|
|
5476
5837
|
}
|
|
5477
5838
|
}
|
|
5478
5839
|
|
|
@@ -5535,7 +5896,7 @@ let AuroElement$2 = class AuroElement extends LitElement {
|
|
|
5535
5896
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
5536
5897
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
5537
5898
|
*/
|
|
5538
|
-
class AuroDropdown extends AuroElement$
|
|
5899
|
+
class AuroDropdown extends AuroElement$3 {
|
|
5539
5900
|
constructor() {
|
|
5540
5901
|
super();
|
|
5541
5902
|
|
|
@@ -5548,19 +5909,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5548
5909
|
|
|
5549
5910
|
// Layout Config
|
|
5550
5911
|
this.layout = 'classic';
|
|
5551
|
-
this.shape = '
|
|
5912
|
+
this.shape = 'classic';
|
|
5552
5913
|
this.size = 'xl';
|
|
5914
|
+
|
|
5553
5915
|
this.parentBorder = false;
|
|
5554
5916
|
|
|
5555
5917
|
this.privateDefaults();
|
|
5556
5918
|
}
|
|
5557
5919
|
|
|
5558
|
-
get commonLabelClasses() {
|
|
5559
|
-
return {
|
|
5560
|
-
// 'withValue': this.value && this.value.length > 0
|
|
5561
|
-
};
|
|
5562
|
-
}
|
|
5563
|
-
|
|
5564
5920
|
get commonWrapperClasses() {
|
|
5565
5921
|
return {
|
|
5566
5922
|
'trigger': true,
|
|
@@ -5644,7 +6000,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5644
6000
|
/**
|
|
5645
6001
|
* @private
|
|
5646
6002
|
*/
|
|
5647
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
6003
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText$1);
|
|
5648
6004
|
|
|
5649
6005
|
/**
|
|
5650
6006
|
* @private
|
|
@@ -5944,8 +6300,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5944
6300
|
|
|
5945
6301
|
static get styles() {
|
|
5946
6302
|
return [
|
|
5947
|
-
colorCss$1$
|
|
5948
|
-
tokensCss$1,
|
|
6303
|
+
colorCss$1$2,
|
|
6304
|
+
tokensCss$1$1,
|
|
5949
6305
|
|
|
5950
6306
|
// default layout
|
|
5951
6307
|
classicColorCss,
|
|
@@ -6233,14 +6589,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6233
6589
|
* @returns {void}
|
|
6234
6590
|
*/
|
|
6235
6591
|
handleTriggerContentSlotChange(event) {
|
|
6236
|
-
|
|
6237
6592
|
this.floater.handleTriggerTabIndex();
|
|
6238
6593
|
|
|
6239
6594
|
// Get the trigger
|
|
6240
6595
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
6241
6596
|
|
|
6242
6597
|
// Get the trigger slot
|
|
6243
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
6598
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
6244
6599
|
|
|
6245
6600
|
// If there's a trigger slot
|
|
6246
6601
|
if (triggerSlot) {
|
|
@@ -6313,33 +6668,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6313
6668
|
}
|
|
6314
6669
|
|
|
6315
6670
|
/**
|
|
6671
|
+
* Returns HTML for the common portion of the layouts.
|
|
6316
6672
|
* @private
|
|
6317
|
-
* @
|
|
6318
|
-
* @
|
|
6319
|
-
* @description Handles the slot change event for the label slot.
|
|
6320
|
-
*/
|
|
6321
|
-
handleLabelSlotChange (event) {
|
|
6322
|
-
|
|
6323
|
-
// Get the nodes from the event
|
|
6324
|
-
const nodes = event.target.assignedNodes();
|
|
6325
|
-
|
|
6326
|
-
// Guard clause for no nodes
|
|
6327
|
-
if (!nodes) {
|
|
6328
|
-
return;
|
|
6329
|
-
}
|
|
6330
|
-
|
|
6331
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
6332
|
-
const nodesArr = Array.from(nodes);
|
|
6333
|
-
|
|
6334
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
6335
|
-
this.labeled = nodesArr.length > 0;
|
|
6336
|
-
}
|
|
6337
|
-
|
|
6338
|
-
/**
|
|
6339
|
-
* Returns HTML for the common portion of the layouts.
|
|
6340
|
-
* @private
|
|
6341
|
-
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
6342
|
-
* @returns {html} - Returns HTML.
|
|
6673
|
+
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
6674
|
+
* @returns {html} - Returns HTML.
|
|
6343
6675
|
*/
|
|
6344
6676
|
renderBasicHtml(helpTextClasses) {
|
|
6345
6677
|
return html$1`
|
|
@@ -6349,22 +6681,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6349
6681
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
6350
6682
|
tabindex="${this.tabIndex}"
|
|
6351
6683
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
6352
|
-
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6353
|
-
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6684
|
+
aria-expanded="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6685
|
+
aria-controls="${ifDefined(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6354
6686
|
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
6355
6687
|
@focusin="${this.handleFocusin}"
|
|
6356
6688
|
@blur="${this.handleFocusOut}">
|
|
6357
|
-
<div class="triggerContentWrapper">
|
|
6358
|
-
<
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
<div class="triggerContent">
|
|
6362
|
-
<slot
|
|
6363
|
-
name="trigger"
|
|
6364
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
6365
|
-
</div>
|
|
6689
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
6690
|
+
<slot
|
|
6691
|
+
name="trigger"
|
|
6692
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
6366
6693
|
</div>
|
|
6367
|
-
${this.chevron
|
|
6694
|
+
${this.chevron ? html$1`
|
|
6368
6695
|
<div
|
|
6369
6696
|
id="showStateIcon"
|
|
6370
6697
|
class="chevron"
|
|
@@ -6385,6 +6712,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6385
6712
|
<div id="bibSizer" part="size"></div>
|
|
6386
6713
|
<${this.dropdownBibTag}
|
|
6387
6714
|
id="bib"
|
|
6715
|
+
shape="${this.shape}"
|
|
6388
6716
|
?data-show="${this.isPopoverVisible}"
|
|
6389
6717
|
?isfullscreen="${this.isBibFullscreen}"
|
|
6390
6718
|
?common="${this.common}"
|
|
@@ -6404,62 +6732,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6404
6732
|
* @returns {html} - Returns HTML for the classic layout.
|
|
6405
6733
|
*/
|
|
6406
6734
|
renderLayoutClassic() {
|
|
6735
|
+
// TODO: check with Doug why this was never used?
|
|
6736
|
+
const helpTextClasses = {
|
|
6737
|
+
'helpText': true
|
|
6738
|
+
};
|
|
6407
6739
|
|
|
6408
6740
|
return html$1`
|
|
6409
|
-
|
|
6410
|
-
<div
|
|
6411
|
-
id="trigger"
|
|
6412
|
-
class="trigger"
|
|
6413
|
-
part="trigger"
|
|
6414
|
-
tabindex="${this.tabIndex}"
|
|
6415
|
-
?showBorder="${this.showTriggerBorders}"
|
|
6416
|
-
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
6417
|
-
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6418
|
-
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6419
|
-
aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
6420
|
-
>
|
|
6421
|
-
<div class="triggerContentWrapper">
|
|
6422
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
6423
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
6424
|
-
</label>
|
|
6425
|
-
<div class="triggerContent">
|
|
6426
|
-
<slot
|
|
6427
|
-
name="trigger"
|
|
6428
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
6429
|
-
</div>
|
|
6430
|
-
</div>
|
|
6431
|
-
${this.chevron || this.common ? html$1`
|
|
6432
|
-
<div
|
|
6433
|
-
id="showStateIcon"
|
|
6434
|
-
part="chevron">
|
|
6435
|
-
<${this.iconTag}
|
|
6436
|
-
category="interface"
|
|
6437
|
-
name="chevron-down"
|
|
6438
|
-
?onDark="${this.onDark}"
|
|
6439
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
6440
|
-
>
|
|
6441
|
-
</${this.iconTag}>
|
|
6442
|
-
</div>
|
|
6443
|
-
` : undefined }
|
|
6444
|
-
</div>
|
|
6445
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
6446
|
-
<slot name="helpText"></slot>
|
|
6447
|
-
</${this.helpTextTag}>
|
|
6448
|
-
|
|
6449
|
-
<div id="bibSizer" part="size"></div>
|
|
6450
|
-
<${this.dropdownBibTag}
|
|
6451
|
-
id="bib"
|
|
6452
|
-
?data-show="${this.isPopoverVisible}"
|
|
6453
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
6454
|
-
?common="${this.common}"
|
|
6455
|
-
?rounded="${this.common || this.rounded}"
|
|
6456
|
-
?inset="${this.common || this.inset}"
|
|
6457
|
-
>
|
|
6458
|
-
<div class="slotContent">
|
|
6459
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
6460
|
-
</div>
|
|
6461
|
-
</${this.dropdownBibTag}>
|
|
6462
|
-
</div>
|
|
6741
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6463
6742
|
`;
|
|
6464
6743
|
}
|
|
6465
6744
|
|
|
@@ -6527,9 +6806,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6527
6806
|
|
|
6528
6807
|
var dropdownVersion = '3.0.0';
|
|
6529
6808
|
|
|
6530
|
-
var colorCss$
|
|
6809
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
6531
6810
|
|
|
6532
|
-
var styleCss$
|
|
6811
|
+
var styleCss$4 = css`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column}#header{display:flex;width:100%;min-height:var(--ds-size-1000, 5rem);box-sizing:border-box;align-items:end;padding-top:var(--ds-size-400, 2rem);padding-right:var(--ds-size-700, 3.5rem);padding-left:var(--ds-size-200, 1rem);pointer-events:none}#subheader{width:100%}#subheader ::slotted([auro-input]){box-sizing:border-box;padding:0 var(--ds-size-200, 1rem)}#closeButton{position:absolute;top:var(--ds-size-400, 2rem);right:var(--ds-size-200, 1rem);border:none;background-color:transparent;cursor:pointer}#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)}`;
|
|
6533
6812
|
|
|
6534
6813
|
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)}`;
|
|
6535
6814
|
|
|
@@ -6540,7 +6819,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
6540
6819
|
|
|
6541
6820
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6542
6821
|
|
|
6543
|
-
let AuroLibraryRuntimeUtils$
|
|
6822
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
6544
6823
|
|
|
6545
6824
|
/* eslint-disable jsdoc/require-param */
|
|
6546
6825
|
|
|
@@ -6639,10 +6918,1003 @@ class AuroDependencyVersioning {
|
|
|
6639
6918
|
customElements.define(elementName, class extends tagClass {});
|
|
6640
6919
|
}
|
|
6641
6920
|
|
|
6642
|
-
return tag;
|
|
6921
|
+
return tag;
|
|
6922
|
+
}
|
|
6923
|
+
}
|
|
6924
|
+
|
|
6925
|
+
/**
|
|
6926
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6927
|
+
*/
|
|
6928
|
+
const _observers = new WeakMap();
|
|
6929
|
+
|
|
6930
|
+
/**
|
|
6931
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6932
|
+
* Structure: {
|
|
6933
|
+
* host: {
|
|
6934
|
+
* matchers: Set<Function>,
|
|
6935
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6936
|
+
* }
|
|
6937
|
+
* }
|
|
6938
|
+
*/
|
|
6939
|
+
const _transportConfig = new WeakMap();
|
|
6940
|
+
|
|
6941
|
+
/**
|
|
6942
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6943
|
+
*
|
|
6944
|
+
* @param {Object} params - The parameters for the function.
|
|
6945
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6946
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6947
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6948
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6949
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6950
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
6951
|
+
*/
|
|
6952
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
6953
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
6954
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
6955
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
6956
|
+
}
|
|
6957
|
+
|
|
6958
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
6959
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
6960
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
6961
|
+
}
|
|
6962
|
+
|
|
6963
|
+
// Guard Clause: Ensure match is a function
|
|
6964
|
+
if (typeof match !== 'function') {
|
|
6965
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
6966
|
+
}
|
|
6967
|
+
|
|
6968
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
6969
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
6970
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
6971
|
+
}
|
|
6972
|
+
|
|
6973
|
+
// Register this transport and get cleanup function
|
|
6974
|
+
return _registerTransport({
|
|
6975
|
+
host,
|
|
6976
|
+
target,
|
|
6977
|
+
matcher: match,
|
|
6978
|
+
removeOriginal
|
|
6979
|
+
});
|
|
6980
|
+
};
|
|
6981
|
+
|
|
6982
|
+
/**
|
|
6983
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
6984
|
+
*
|
|
6985
|
+
* @param {Object} params - The parameters object.
|
|
6986
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
6987
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
6988
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
6989
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
6990
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
6991
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
6992
|
+
* @private
|
|
6993
|
+
*/
|
|
6994
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6995
|
+
// Initialize config for this host if it doesn't exist
|
|
6996
|
+
if (!_transportConfig.has(host)) {
|
|
6997
|
+
_transportConfig.set(host, {
|
|
6998
|
+
matchers: new Set(),
|
|
6999
|
+
targets: new Map()
|
|
7000
|
+
});
|
|
7001
|
+
}
|
|
7002
|
+
|
|
7003
|
+
const config = _transportConfig.get(host);
|
|
7004
|
+
|
|
7005
|
+
// Add the matcher to the set of matchers for this host
|
|
7006
|
+
config.matchers.add(matcher);
|
|
7007
|
+
|
|
7008
|
+
// Initialize target entry if it doesn't exist
|
|
7009
|
+
if (!config.targets.has(target)) {
|
|
7010
|
+
config.targets.set(target, new Map());
|
|
7011
|
+
}
|
|
7012
|
+
|
|
7013
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
7014
|
+
config.targets.get(target).set(matcher, {
|
|
7015
|
+
removeOriginal,
|
|
7016
|
+
currentAttributes: new Map()
|
|
7017
|
+
});
|
|
7018
|
+
|
|
7019
|
+
// Perform initial attribute transport
|
|
7020
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
7021
|
+
|
|
7022
|
+
// Attach observer
|
|
7023
|
+
_attachObserver(host);
|
|
7024
|
+
|
|
7025
|
+
// Return cleanup function and utility functions
|
|
7026
|
+
return {
|
|
7027
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
7028
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
7029
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
7030
|
+
}
|
|
7031
|
+
};
|
|
7032
|
+
|
|
7033
|
+
/**
|
|
7034
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
7035
|
+
*
|
|
7036
|
+
* @param {HTMLElement} host - The host element
|
|
7037
|
+
* @param {HTMLElement} target - The target element
|
|
7038
|
+
* @param {Function} matcher - The matcher function
|
|
7039
|
+
* @private
|
|
7040
|
+
*/
|
|
7041
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
7042
|
+
const config = _transportConfig.get(host);
|
|
7043
|
+
if (!config) return;
|
|
7044
|
+
|
|
7045
|
+
// Remove this matcher from this target
|
|
7046
|
+
const targetMatchers = config.targets.get(target);
|
|
7047
|
+
if (targetMatchers) {
|
|
7048
|
+
targetMatchers.delete(matcher);
|
|
7049
|
+
|
|
7050
|
+
// If this target has no more matchers, remove it
|
|
7051
|
+
if (targetMatchers.size === 0) {
|
|
7052
|
+
config.targets.delete(target);
|
|
7053
|
+
}
|
|
7054
|
+
}
|
|
7055
|
+
|
|
7056
|
+
// Check if this matcher is still used by any target
|
|
7057
|
+
let matcherStillUsed = false;
|
|
7058
|
+
for (const matcherMap of config.targets.values()) {
|
|
7059
|
+
if (matcherMap.has(matcher)) {
|
|
7060
|
+
matcherStillUsed = true;
|
|
7061
|
+
break;
|
|
7062
|
+
}
|
|
7063
|
+
}
|
|
7064
|
+
|
|
7065
|
+
// If not used anymore, remove from matchers set
|
|
7066
|
+
if (!matcherStillUsed) {
|
|
7067
|
+
config.matchers.delete(matcher);
|
|
7068
|
+
}
|
|
7069
|
+
|
|
7070
|
+
// If no more targets or matchers, detach observer
|
|
7071
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
7072
|
+
_detachObserver(host);
|
|
7073
|
+
}
|
|
7074
|
+
};
|
|
7075
|
+
|
|
7076
|
+
/**
|
|
7077
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
7078
|
+
*
|
|
7079
|
+
* @param {Object} params - The parameters object.
|
|
7080
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
7081
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
7082
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
7083
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
7084
|
+
* @returns {void}
|
|
7085
|
+
* @private
|
|
7086
|
+
*/
|
|
7087
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
7088
|
+
// Get a list of all matching attributes on the host element and their values
|
|
7089
|
+
const matchingAttributes = host.getAttributeNames()
|
|
7090
|
+
.filter(attr => matcher(attr))
|
|
7091
|
+
.reduce((acc, attr) => {
|
|
7092
|
+
acc[attr] = host.getAttribute(attr);
|
|
7093
|
+
return acc;
|
|
7094
|
+
}, {});
|
|
7095
|
+
|
|
7096
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
7097
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
7098
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
7099
|
+
target.setAttribute(key, value);
|
|
7100
|
+
if (removeOriginal) {
|
|
7101
|
+
host.removeAttribute(key);
|
|
7102
|
+
}
|
|
7103
|
+
});
|
|
7104
|
+
};
|
|
7105
|
+
|
|
7106
|
+
/**
|
|
7107
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
7108
|
+
*
|
|
7109
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
7110
|
+
* @returns {MutationObserver} The observer instance.
|
|
7111
|
+
* @private
|
|
7112
|
+
*/
|
|
7113
|
+
const _attachObserver = (host) => {
|
|
7114
|
+
// If an observer for this host already exists, return it
|
|
7115
|
+
if (_observers.has(host)) {
|
|
7116
|
+
return _observers.get(host);
|
|
7117
|
+
}
|
|
7118
|
+
|
|
7119
|
+
// Create a new MutationObserver
|
|
7120
|
+
const observer = new MutationObserver((mutations) => {
|
|
7121
|
+
const config = _transportConfig.get(host);
|
|
7122
|
+
if (!config) return;
|
|
7123
|
+
|
|
7124
|
+
// For each mutation affecting attributes
|
|
7125
|
+
mutations
|
|
7126
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
7127
|
+
.forEach(mutation => {
|
|
7128
|
+
const attributeName = mutation.attributeName;
|
|
7129
|
+
|
|
7130
|
+
// Find matchers that care about this attribute
|
|
7131
|
+
for (const matcher of config.matchers) {
|
|
7132
|
+
if (matcher(attributeName)) {
|
|
7133
|
+
// For each target that uses this matcher
|
|
7134
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
7135
|
+
if (matcherConfigs.has(matcher)) {
|
|
7136
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
7137
|
+
_transportAttributes({
|
|
7138
|
+
host,
|
|
7139
|
+
target,
|
|
7140
|
+
matcher,
|
|
7141
|
+
removeOriginal
|
|
7142
|
+
});
|
|
7143
|
+
}
|
|
7144
|
+
}
|
|
7145
|
+
}
|
|
7146
|
+
}
|
|
7147
|
+
});
|
|
7148
|
+
});
|
|
7149
|
+
|
|
7150
|
+
// Start observing attribute changes
|
|
7151
|
+
observer.observe(host, { attributes: true });
|
|
7152
|
+
|
|
7153
|
+
// Store the observer
|
|
7154
|
+
_observers.set(host, observer);
|
|
7155
|
+
|
|
7156
|
+
return observer;
|
|
7157
|
+
};
|
|
7158
|
+
|
|
7159
|
+
/**
|
|
7160
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
7161
|
+
*
|
|
7162
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
7163
|
+
* @private
|
|
7164
|
+
*/
|
|
7165
|
+
const _detachObserver = (host) => {
|
|
7166
|
+
if (_observers.has(host)) {
|
|
7167
|
+
const observer = _observers.get(host);
|
|
7168
|
+
observer.disconnect();
|
|
7169
|
+
_observers.delete(host);
|
|
7170
|
+
}
|
|
7171
|
+
|
|
7172
|
+
// Clean up the transport config as well
|
|
7173
|
+
if (_transportConfig.has(host)) {
|
|
7174
|
+
_transportConfig.delete(host);
|
|
7175
|
+
}
|
|
7176
|
+
};
|
|
7177
|
+
|
|
7178
|
+
/**
|
|
7179
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
7180
|
+
* @param {HTMLElement} host - The host element
|
|
7181
|
+
* @param {HTMLElement} target - The target element
|
|
7182
|
+
* @param {Function} matcher - The matcher function
|
|
7183
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
7184
|
+
* @private
|
|
7185
|
+
*/
|
|
7186
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
7187
|
+
const config = _transportConfig.get(host);
|
|
7188
|
+
if (!config) return undefined;
|
|
7189
|
+
|
|
7190
|
+
const targetMatchers = config.targets.get(target);
|
|
7191
|
+
if (!targetMatchers) return undefined;
|
|
7192
|
+
|
|
7193
|
+
return targetMatchers.get(matcher);
|
|
7194
|
+
};
|
|
7195
|
+
|
|
7196
|
+
/**
|
|
7197
|
+
* Sets an observed attribute value
|
|
7198
|
+
* @param {HTMLElement} host - The host element
|
|
7199
|
+
* @param {HTMLElement} target - The target element
|
|
7200
|
+
* @param {Function} matcher - The matcher function
|
|
7201
|
+
* @param {string} key - The attribute name
|
|
7202
|
+
* @param {string} value - The attribute value
|
|
7203
|
+
* @private
|
|
7204
|
+
*/
|
|
7205
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
7206
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7207
|
+
if (matcherConfig) {
|
|
7208
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
7209
|
+
}
|
|
7210
|
+
};
|
|
7211
|
+
|
|
7212
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
7213
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7214
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
7215
|
+
return undefined;
|
|
7216
|
+
};
|
|
7217
|
+
|
|
7218
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
7219
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7220
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
7221
|
+
return [];
|
|
7222
|
+
};
|
|
7223
|
+
|
|
7224
|
+
const _matchers = {
|
|
7225
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
7226
|
+
'role': attr => attr.match(/^role$/)
|
|
7227
|
+
};
|
|
7228
|
+
|
|
7229
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
7230
|
+
return transportAttributes({
|
|
7231
|
+
host,
|
|
7232
|
+
target,
|
|
7233
|
+
match: attr => {
|
|
7234
|
+
for (const key in _matchers) {
|
|
7235
|
+
if (_matchers[key](attr)) return true;
|
|
7236
|
+
}
|
|
7237
|
+
return false;
|
|
7238
|
+
},
|
|
7239
|
+
removeOriginal
|
|
7240
|
+
});
|
|
7241
|
+
};
|
|
7242
|
+
|
|
7243
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
7244
|
+
|
|
7245
|
+
/**
|
|
7246
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
7247
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
7248
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
7249
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
7250
|
+
* @private
|
|
7251
|
+
*/
|
|
7252
|
+
attributeWatcher;
|
|
7253
|
+
|
|
7254
|
+
static get properties() {
|
|
7255
|
+
return {
|
|
7256
|
+
|
|
7257
|
+
/**
|
|
7258
|
+
* Defines the layout of an element.
|
|
7259
|
+
* @default {'default'}
|
|
7260
|
+
*/
|
|
7261
|
+
layout: {
|
|
7262
|
+
type: String,
|
|
7263
|
+
attribute: "layout",
|
|
7264
|
+
reflect: true
|
|
7265
|
+
},
|
|
7266
|
+
|
|
7267
|
+
/**
|
|
7268
|
+
* Defines the shape of an element.
|
|
7269
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
7270
|
+
* @default {'default'}
|
|
7271
|
+
*/
|
|
7272
|
+
shape: {
|
|
7273
|
+
type: String,
|
|
7274
|
+
attribute: "shape",
|
|
7275
|
+
reflect: true
|
|
7276
|
+
},
|
|
7277
|
+
|
|
7278
|
+
/**
|
|
7279
|
+
* Defines the size of an element.
|
|
7280
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
7281
|
+
* @default {'md'}
|
|
7282
|
+
*/
|
|
7283
|
+
size: {
|
|
7284
|
+
type: String,
|
|
7285
|
+
attribute: "size",
|
|
7286
|
+
reflect: true
|
|
7287
|
+
},
|
|
7288
|
+
|
|
7289
|
+
/**
|
|
7290
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
7291
|
+
* @default {false}
|
|
7292
|
+
*/
|
|
7293
|
+
onDark: {
|
|
7294
|
+
type: Boolean,
|
|
7295
|
+
attribute: "ondark",
|
|
7296
|
+
reflect: true
|
|
7297
|
+
},
|
|
7298
|
+
|
|
7299
|
+
/**
|
|
7300
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
7301
|
+
* This is used to apply layout and shape classes dynamically.
|
|
7302
|
+
* @type {HTMLElement|null}
|
|
7303
|
+
* @default {null}
|
|
7304
|
+
* @private
|
|
7305
|
+
*/
|
|
7306
|
+
wrapper: {
|
|
7307
|
+
type: HTMLElement,
|
|
7308
|
+
attribute: false,
|
|
7309
|
+
reflect: false
|
|
7310
|
+
}
|
|
7311
|
+
};
|
|
7312
|
+
}
|
|
7313
|
+
|
|
7314
|
+
|
|
7315
|
+
|
|
7316
|
+
resetShapeClasses() {
|
|
7317
|
+
if (this.shape && this.size) {
|
|
7318
|
+
|
|
7319
|
+
if (this.wrapper) {
|
|
7320
|
+
this.wrapper.classList.forEach((className) => {
|
|
7321
|
+
if (className.startsWith('shape-')) {
|
|
7322
|
+
this.wrapper.classList.remove(className);
|
|
7323
|
+
}
|
|
7324
|
+
});
|
|
7325
|
+
|
|
7326
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
7327
|
+
}
|
|
7328
|
+
}
|
|
7329
|
+
}
|
|
7330
|
+
|
|
7331
|
+
resetLayoutClasses() {
|
|
7332
|
+
if (this.layout) {
|
|
7333
|
+
if (this.wrapper) {
|
|
7334
|
+
this.wrapper.classList.forEach((className) => {
|
|
7335
|
+
if (className.startsWith('layout-')) {
|
|
7336
|
+
this.wrapper.classList.remove(className);
|
|
7337
|
+
}
|
|
7338
|
+
});
|
|
7339
|
+
|
|
7340
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
7341
|
+
}
|
|
7342
|
+
}
|
|
7343
|
+
}
|
|
7344
|
+
|
|
7345
|
+
updateComponentArchitecture() {
|
|
7346
|
+
this.resetLayoutClasses();
|
|
7347
|
+
this.resetShapeClasses();
|
|
7348
|
+
}
|
|
7349
|
+
|
|
7350
|
+
updated(changedProperties) {
|
|
7351
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
7352
|
+
this.updateComponentArchitecture();
|
|
7353
|
+
}
|
|
7354
|
+
}
|
|
7355
|
+
|
|
7356
|
+
firstUpdated() {
|
|
7357
|
+
super.firstUpdated();
|
|
7358
|
+
|
|
7359
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
7360
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
7361
|
+
|
|
7362
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
7363
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
7364
|
+
}
|
|
7365
|
+
|
|
7366
|
+
disconnectedCallback() {
|
|
7367
|
+
super.disconnectedCallback();
|
|
7368
|
+
|
|
7369
|
+
// Cleanup the ARIA observer if it exists
|
|
7370
|
+
if (this.attributeWatcher) {
|
|
7371
|
+
this.attributeWatcher.cleanup();
|
|
7372
|
+
this.attributeWatcher = null;
|
|
7373
|
+
}
|
|
7374
|
+
}
|
|
7375
|
+
|
|
7376
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
7377
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
7378
|
+
render() {
|
|
7379
|
+
try {
|
|
7380
|
+
return this.renderLayout();
|
|
7381
|
+
} catch (error) {
|
|
7382
|
+
// failed to get the defined layout
|
|
7383
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
7384
|
+
|
|
7385
|
+
// fallback to the default layout
|
|
7386
|
+
return this.getLayout('default');
|
|
7387
|
+
}
|
|
7388
|
+
}
|
|
7389
|
+
};
|
|
7390
|
+
|
|
7391
|
+
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}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
7392
|
+
|
|
7393
|
+
var colorCss$2 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
7394
|
+
|
|
7395
|
+
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}`;
|
|
7396
|
+
|
|
7397
|
+
var shapeSize = css`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
7398
|
+
|
|
7399
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7400
|
+
// See LICENSE in the project root for license information.
|
|
7401
|
+
|
|
7402
|
+
// ---------------------------------------------------------------------
|
|
7403
|
+
|
|
7404
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7405
|
+
|
|
7406
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
7407
|
+
|
|
7408
|
+
/* eslint-disable jsdoc/require-param */
|
|
7409
|
+
|
|
7410
|
+
/**
|
|
7411
|
+
* This will register a new custom element with the browser.
|
|
7412
|
+
* @param {String} name - The name of the custom element.
|
|
7413
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7414
|
+
* @returns {void}
|
|
7415
|
+
*/
|
|
7416
|
+
registerComponent(name, componentClass) {
|
|
7417
|
+
if (!customElements.get(name)) {
|
|
7418
|
+
customElements.define(name, class extends componentClass {});
|
|
7419
|
+
}
|
|
7420
|
+
}
|
|
7421
|
+
|
|
7422
|
+
/**
|
|
7423
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7424
|
+
* @returns {void}
|
|
7425
|
+
*/
|
|
7426
|
+
closestElement(
|
|
7427
|
+
selector, // selector like in .closest()
|
|
7428
|
+
base = this, // extra functionality to skip a parent
|
|
7429
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7430
|
+
!el || el === document || el === window
|
|
7431
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7432
|
+
: found
|
|
7433
|
+
? found // found a selector INside this element
|
|
7434
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7435
|
+
) {
|
|
7436
|
+
return __Closest(base);
|
|
7437
|
+
}
|
|
7438
|
+
/* eslint-enable jsdoc/require-param */
|
|
7439
|
+
|
|
7440
|
+
/**
|
|
7441
|
+
* 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.
|
|
7442
|
+
* @param {Object} elem - The element to check.
|
|
7443
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7444
|
+
* @returns {void}
|
|
7445
|
+
*/
|
|
7446
|
+
handleComponentTagRename(elem, tagName) {
|
|
7447
|
+
const tag = tagName.toLowerCase();
|
|
7448
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7449
|
+
|
|
7450
|
+
if (elemTag !== tag) {
|
|
7451
|
+
elem.setAttribute(tag, true);
|
|
7452
|
+
}
|
|
7453
|
+
}
|
|
7454
|
+
|
|
7455
|
+
/**
|
|
7456
|
+
* Validates if an element is a specific Auro component.
|
|
7457
|
+
* @param {Object} elem - The element to validate.
|
|
7458
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7459
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7460
|
+
*/
|
|
7461
|
+
elementMatch(elem, tagName) {
|
|
7462
|
+
const tag = tagName.toLowerCase();
|
|
7463
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7464
|
+
|
|
7465
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7466
|
+
}
|
|
7467
|
+
};
|
|
7468
|
+
|
|
7469
|
+
var styleCss$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
7470
|
+
|
|
7471
|
+
var colorCss$1$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}`;
|
|
7472
|
+
|
|
7473
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
7474
|
+
|
|
7475
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7476
|
+
// See LICENSE in the project root for license information.
|
|
7477
|
+
|
|
7478
|
+
|
|
7479
|
+
class AuroLoader extends LitElement {
|
|
7480
|
+
constructor() {
|
|
7481
|
+
super();
|
|
7482
|
+
|
|
7483
|
+
/**
|
|
7484
|
+
* @private
|
|
7485
|
+
*/
|
|
7486
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
7487
|
+
|
|
7488
|
+
/**
|
|
7489
|
+
* @private
|
|
7490
|
+
*/
|
|
7491
|
+
this.mdCount = 3;
|
|
7492
|
+
|
|
7493
|
+
/**
|
|
7494
|
+
* @private
|
|
7495
|
+
*/
|
|
7496
|
+
this.smCount = 2;
|
|
7497
|
+
|
|
7498
|
+
/**
|
|
7499
|
+
* @private
|
|
7500
|
+
*/
|
|
7501
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
7502
|
+
|
|
7503
|
+
this.orbit = false;
|
|
7504
|
+
this.ringworm = false;
|
|
7505
|
+
this.laser = false;
|
|
7506
|
+
this.pulse = false;
|
|
7507
|
+
}
|
|
7508
|
+
|
|
7509
|
+
// function to define props used within the scope of this component
|
|
7510
|
+
static get properties() {
|
|
7511
|
+
return {
|
|
7512
|
+
|
|
7513
|
+
/**
|
|
7514
|
+
* Sets loader to laser type.
|
|
7515
|
+
*/
|
|
7516
|
+
laser: {
|
|
7517
|
+
type: Boolean,
|
|
7518
|
+
reflect: true
|
|
7519
|
+
},
|
|
7520
|
+
|
|
7521
|
+
/**
|
|
7522
|
+
* Sets loader to orbit type.
|
|
7523
|
+
*/
|
|
7524
|
+
orbit: {
|
|
7525
|
+
type: Boolean,
|
|
7526
|
+
reflect: true
|
|
7527
|
+
},
|
|
7528
|
+
|
|
7529
|
+
/**
|
|
7530
|
+
* Sets loader to pulse type.
|
|
7531
|
+
*/
|
|
7532
|
+
pulse: {
|
|
7533
|
+
type: Boolean,
|
|
7534
|
+
reflect: true
|
|
7535
|
+
},
|
|
7536
|
+
|
|
7537
|
+
/**
|
|
7538
|
+
* Sets loader to ringworm type.
|
|
7539
|
+
*/
|
|
7540
|
+
ringworm: {
|
|
7541
|
+
type: Boolean,
|
|
7542
|
+
reflect: true
|
|
7543
|
+
}
|
|
7544
|
+
};
|
|
7545
|
+
}
|
|
7546
|
+
|
|
7547
|
+
static get styles() {
|
|
7548
|
+
return [
|
|
7549
|
+
css`${styleCss$2}`,
|
|
7550
|
+
css`${colorCss$1$1}`,
|
|
7551
|
+
css`${tokensCss$1}`
|
|
7552
|
+
];
|
|
7553
|
+
}
|
|
7554
|
+
|
|
7555
|
+
/**
|
|
7556
|
+
* This will register this element with the browser.
|
|
7557
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
7558
|
+
*
|
|
7559
|
+
* @example
|
|
7560
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
7561
|
+
*
|
|
7562
|
+
*/
|
|
7563
|
+
static register(name = "auro-loader") {
|
|
7564
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
7565
|
+
}
|
|
7566
|
+
|
|
7567
|
+
firstUpdated() {
|
|
7568
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
7569
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
7570
|
+
}
|
|
7571
|
+
|
|
7572
|
+
connectedCallback() {
|
|
7573
|
+
super.connectedCallback();
|
|
7574
|
+
}
|
|
7575
|
+
|
|
7576
|
+
/**
|
|
7577
|
+
* @private
|
|
7578
|
+
* @returns {Array} Numbered array for template map.
|
|
7579
|
+
*/
|
|
7580
|
+
defineTemplate() {
|
|
7581
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
7582
|
+
|
|
7583
|
+
if (this.orbit || this.laser) {
|
|
7584
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
7585
|
+
} else if (this.ringworm) {
|
|
7586
|
+
nodes = Array.from(Array(0).keys());
|
|
7587
|
+
}
|
|
7588
|
+
|
|
7589
|
+
return nodes;
|
|
7590
|
+
}
|
|
7591
|
+
|
|
7592
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7593
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7594
|
+
|
|
7595
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
7596
|
+
render() {
|
|
7597
|
+
return html`
|
|
7598
|
+
${this.defineTemplate().map((idx) => html`
|
|
7599
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
7600
|
+
`)}
|
|
7601
|
+
|
|
7602
|
+
<div class="no-animation">Loading...</div>
|
|
7603
|
+
|
|
7604
|
+
${this.ringworm ? html`
|
|
7605
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
7606
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
7607
|
+
</svg>`
|
|
7608
|
+
: ``
|
|
7609
|
+
}
|
|
7610
|
+
`;
|
|
7611
|
+
}
|
|
7612
|
+
}
|
|
7613
|
+
|
|
7614
|
+
var loaderVersion = '5.0.0';
|
|
7615
|
+
|
|
7616
|
+
/* eslint-disable max-lines, curly */
|
|
7617
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7618
|
+
// See LICENSE in the project root for license information.
|
|
7619
|
+
|
|
7620
|
+
|
|
7621
|
+
/**
|
|
7622
|
+
* @slot - Default slot for the text of the button.
|
|
7623
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
7624
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
7625
|
+
* @csspart text - Apply CSS to text slot.
|
|
7626
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
7627
|
+
*/
|
|
7628
|
+
|
|
7629
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
7630
|
+
|
|
7631
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7632
|
+
|
|
7633
|
+
/**
|
|
7634
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7635
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7636
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7637
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7638
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7639
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7640
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7641
|
+
*/
|
|
7642
|
+
class AuroButton extends AuroElement$1 {
|
|
7643
|
+
|
|
7644
|
+
/**
|
|
7645
|
+
* Enables form association for this element.
|
|
7646
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
7647
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
7648
|
+
*/
|
|
7649
|
+
static get formAssociated() {
|
|
7650
|
+
return true;
|
|
7651
|
+
}
|
|
7652
|
+
|
|
7653
|
+
constructor() {
|
|
7654
|
+
super();
|
|
7655
|
+
this.autofocus = false;
|
|
7656
|
+
this.disabled = false;
|
|
7657
|
+
this.loading = false;
|
|
7658
|
+
this.size = "md";
|
|
7659
|
+
this.shape = "rounded";
|
|
7660
|
+
this.onDark = false;
|
|
7661
|
+
this.fluid = false;
|
|
7662
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
7663
|
+
|
|
7664
|
+
// Support for HTML5 forms
|
|
7665
|
+
if (typeof this.attachInternals === 'function') {
|
|
7666
|
+
this.internals = this.attachInternals();
|
|
7667
|
+
} else {
|
|
7668
|
+
this.internals = null;
|
|
7669
|
+
|
|
7670
|
+
// eslint-disable-next-line no-console
|
|
7671
|
+
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.');
|
|
7672
|
+
}
|
|
7673
|
+
|
|
7674
|
+
/**
|
|
7675
|
+
* Generate unique names for dependency components.
|
|
7676
|
+
*/
|
|
7677
|
+
const versioning = new AuroDependencyVersioning();
|
|
7678
|
+
|
|
7679
|
+
/**
|
|
7680
|
+
* @private
|
|
7681
|
+
*/
|
|
7682
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7683
|
+
}
|
|
7684
|
+
|
|
7685
|
+
static get styles() {
|
|
7686
|
+
return [
|
|
7687
|
+
tokensCss$2,
|
|
7688
|
+
styleCss$3,
|
|
7689
|
+
colorCss$2,
|
|
7690
|
+
shapeSize
|
|
7691
|
+
];
|
|
7692
|
+
}
|
|
7693
|
+
|
|
7694
|
+
static get properties() {
|
|
7695
|
+
return {
|
|
7696
|
+
|
|
7697
|
+
...super.properties,
|
|
7698
|
+
|
|
7699
|
+
/**
|
|
7700
|
+
* Override layout since it isn't used in this component.
|
|
7701
|
+
* @private
|
|
7702
|
+
*/
|
|
7703
|
+
layout: {
|
|
7704
|
+
type: Boolean,
|
|
7705
|
+
attribute: false,
|
|
7706
|
+
reflect: false
|
|
7707
|
+
},
|
|
7708
|
+
|
|
7709
|
+
/**
|
|
7710
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
7711
|
+
*/
|
|
7712
|
+
autofocus: {
|
|
7713
|
+
type: Boolean,
|
|
7714
|
+
reflect: true
|
|
7715
|
+
},
|
|
7716
|
+
|
|
7717
|
+
/**
|
|
7718
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
7719
|
+
*/
|
|
7720
|
+
disabled: {
|
|
7721
|
+
type: Boolean,
|
|
7722
|
+
reflect: true
|
|
7723
|
+
},
|
|
7724
|
+
|
|
7725
|
+
/**
|
|
7726
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
7727
|
+
*/
|
|
7728
|
+
fluid: {
|
|
7729
|
+
type: Boolean,
|
|
7730
|
+
reflect: true
|
|
7731
|
+
},
|
|
7732
|
+
|
|
7733
|
+
/**
|
|
7734
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
7735
|
+
*/
|
|
7736
|
+
loading: {
|
|
7737
|
+
type: Boolean,
|
|
7738
|
+
reflect: true
|
|
7739
|
+
},
|
|
7740
|
+
|
|
7741
|
+
/**
|
|
7742
|
+
* 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.
|
|
7743
|
+
*/
|
|
7744
|
+
loadingText: {
|
|
7745
|
+
type: String
|
|
7746
|
+
},
|
|
7747
|
+
|
|
7748
|
+
/**
|
|
7749
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
7750
|
+
*/
|
|
7751
|
+
tIndex: {
|
|
7752
|
+
type: String,
|
|
7753
|
+
reflect: true
|
|
7754
|
+
},
|
|
7755
|
+
|
|
7756
|
+
/**
|
|
7757
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
7758
|
+
*/
|
|
7759
|
+
title: {
|
|
7760
|
+
type: String,
|
|
7761
|
+
reflect: true
|
|
7762
|
+
},
|
|
7763
|
+
|
|
7764
|
+
/**
|
|
7765
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
7766
|
+
*/
|
|
7767
|
+
type: {
|
|
7768
|
+
type: String,
|
|
7769
|
+
reflect: true
|
|
7770
|
+
},
|
|
7771
|
+
|
|
7772
|
+
/**
|
|
7773
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
7774
|
+
*/
|
|
7775
|
+
value: {
|
|
7776
|
+
type: String,
|
|
7777
|
+
reflect: true
|
|
7778
|
+
},
|
|
7779
|
+
|
|
7780
|
+
/**
|
|
7781
|
+
* Sets button variant option.
|
|
7782
|
+
* @default primary
|
|
7783
|
+
*/
|
|
7784
|
+
variant: {
|
|
7785
|
+
type: String,
|
|
7786
|
+
reflect: true
|
|
7787
|
+
},
|
|
7788
|
+
};
|
|
7789
|
+
}
|
|
7790
|
+
|
|
7791
|
+
/**
|
|
7792
|
+
* This will register this element with the browser.
|
|
7793
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
7794
|
+
*
|
|
7795
|
+
* @example
|
|
7796
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
7797
|
+
*
|
|
7798
|
+
*/
|
|
7799
|
+
static register(name = "auro-button") {
|
|
7800
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
7801
|
+
}
|
|
7802
|
+
|
|
7803
|
+
/**
|
|
7804
|
+
* Internal method to apply focus to the HTML5 button.
|
|
7805
|
+
* @private
|
|
7806
|
+
* @returns {void}
|
|
7807
|
+
*/
|
|
7808
|
+
focus() {
|
|
7809
|
+
this.renderRoot.querySelector('button').focus();
|
|
7810
|
+
}
|
|
7811
|
+
|
|
7812
|
+
/**
|
|
7813
|
+
* Submits the form that this button is associated with.
|
|
7814
|
+
* @private
|
|
7815
|
+
* @returns {void}
|
|
7816
|
+
*/
|
|
7817
|
+
surfaceSubmitEvent() {
|
|
7818
|
+
if (this.form) {
|
|
7819
|
+
this.form.requestSubmit();
|
|
7820
|
+
}
|
|
7821
|
+
}
|
|
7822
|
+
|
|
7823
|
+
/**
|
|
7824
|
+
* Returns the form element that this button is associated with.
|
|
7825
|
+
* @private
|
|
7826
|
+
* @returns {HTMLFormElement | null}
|
|
7827
|
+
*/
|
|
7828
|
+
get form() {
|
|
7829
|
+
return this.internals ? this.internals.form : null;
|
|
7830
|
+
}
|
|
7831
|
+
|
|
7832
|
+
/**
|
|
7833
|
+
* @private
|
|
7834
|
+
* @returns {Boolean}
|
|
7835
|
+
*/
|
|
7836
|
+
get hideText() {
|
|
7837
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
7838
|
+
}
|
|
7839
|
+
|
|
7840
|
+
/**
|
|
7841
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7842
|
+
* @returns {string | undefined}
|
|
7843
|
+
* @private
|
|
7844
|
+
*/
|
|
7845
|
+
get currentAriaLabel() {
|
|
7846
|
+
if (!this.attributeWatcher) return undefined;
|
|
7847
|
+
|
|
7848
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7849
|
+
return ariaLabel || undefined;
|
|
7850
|
+
}
|
|
7851
|
+
|
|
7852
|
+
/**
|
|
7853
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7854
|
+
* @returns {string | undefined}
|
|
7855
|
+
* @private
|
|
7856
|
+
*/
|
|
7857
|
+
get currentAriaLabelledBy() {
|
|
7858
|
+
if (!this.attributeWatcher) return undefined;
|
|
7859
|
+
|
|
7860
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7861
|
+
return ariaLabelledBy || undefined;
|
|
7862
|
+
}
|
|
7863
|
+
|
|
7864
|
+
/**
|
|
7865
|
+
* Renders the default layout for the button.
|
|
7866
|
+
* @returns {TemplateResult}
|
|
7867
|
+
* @private
|
|
7868
|
+
*/
|
|
7869
|
+
renderLayoutDefault() {
|
|
7870
|
+
const classes = {
|
|
7871
|
+
"util_insetLg--squish": true,
|
|
7872
|
+
"auro-button": true,
|
|
7873
|
+
"icon-only": this.hideText,
|
|
7874
|
+
wrapper: true,
|
|
7875
|
+
loading: this.loading,
|
|
7876
|
+
};
|
|
7877
|
+
|
|
7878
|
+
return html$1`
|
|
7879
|
+
<button
|
|
7880
|
+
part="button"
|
|
7881
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7882
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7883
|
+
tabIndex="${ifDefined(this.tIndex)}"
|
|
7884
|
+
?autofocus="${this.autofocus}"
|
|
7885
|
+
class="${classMap(classes)}"
|
|
7886
|
+
?disabled="${this.disabled || this.loading}"
|
|
7887
|
+
?onDark="${this.onDark}"
|
|
7888
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
7889
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
7890
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
7891
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
7892
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
7893
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7894
|
+
>
|
|
7895
|
+
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
7896
|
+
|
|
7897
|
+
<span class="contentWrapper">
|
|
7898
|
+
<span class="textSlot" part="text">
|
|
7899
|
+
<slot></slot>
|
|
7900
|
+
</span>
|
|
7901
|
+
</span>
|
|
7902
|
+
</button>
|
|
7903
|
+
`;
|
|
7904
|
+
}
|
|
7905
|
+
|
|
7906
|
+
/**
|
|
7907
|
+
* Renders the layout of the button
|
|
7908
|
+
* @returns {TemplateResult}
|
|
7909
|
+
* @private
|
|
7910
|
+
*/
|
|
7911
|
+
renderLayout() {
|
|
7912
|
+
return this.renderLayoutDefault();
|
|
6643
7913
|
}
|
|
6644
7914
|
}
|
|
6645
7915
|
|
|
7916
|
+
var buttonVersion = '11.0.0';
|
|
7917
|
+
|
|
6646
7918
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6647
7919
|
// See LICENSE in the project root for license information.
|
|
6648
7920
|
|
|
@@ -6653,7 +7925,7 @@ class AuroDependencyVersioning {
|
|
|
6653
7925
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6654
7926
|
*/
|
|
6655
7927
|
|
|
6656
|
-
class AuroElement extends LitElement {
|
|
7928
|
+
let AuroElement$2 = class AuroElement extends LitElement {
|
|
6657
7929
|
|
|
6658
7930
|
// function to define props used within the scope of this component
|
|
6659
7931
|
static get properties() {
|
|
@@ -6677,7 +7949,7 @@ class AuroElement extends LitElement {
|
|
|
6677
7949
|
|
|
6678
7950
|
return 'false'
|
|
6679
7951
|
}
|
|
6680
|
-
}
|
|
7952
|
+
};
|
|
6681
7953
|
|
|
6682
7954
|
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>"};
|
|
6683
7955
|
|
|
@@ -6709,7 +7981,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
6709
7981
|
return _fetchMap.get(uri);
|
|
6710
7982
|
};
|
|
6711
7983
|
|
|
6712
|
-
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}`;
|
|
7984
|
+
var styleCss$1$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}`;
|
|
6713
7985
|
|
|
6714
7986
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6715
7987
|
// See LICENSE in the project root for license information.
|
|
@@ -6721,7 +7993,7 @@ var styleCss$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
6721
7993
|
*/
|
|
6722
7994
|
|
|
6723
7995
|
// build the component class
|
|
6724
|
-
class BaseIcon extends AuroElement {
|
|
7996
|
+
class BaseIcon extends AuroElement$2 {
|
|
6725
7997
|
constructor() {
|
|
6726
7998
|
super();
|
|
6727
7999
|
this.onDark = false;
|
|
@@ -6752,7 +8024,7 @@ class BaseIcon extends AuroElement {
|
|
|
6752
8024
|
|
|
6753
8025
|
static get styles() {
|
|
6754
8026
|
return css`
|
|
6755
|
-
${styleCss$1}
|
|
8027
|
+
${styleCss$1$1}
|
|
6756
8028
|
`;
|
|
6757
8029
|
}
|
|
6758
8030
|
|
|
@@ -6793,9 +8065,9 @@ class BaseIcon extends AuroElement {
|
|
|
6793
8065
|
}
|
|
6794
8066
|
}
|
|
6795
8067
|
|
|
6796
|
-
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)}`;
|
|
8068
|
+
var tokensCss$3 = 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)}`;
|
|
6797
8069
|
|
|
6798
|
-
var colorCss$
|
|
8070
|
+
var colorCss$4 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
6799
8071
|
|
|
6800
8072
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6801
8073
|
// See LICENSE in the project root for license information.
|
|
@@ -6953,9 +8225,9 @@ class AuroIcon extends BaseIcon {
|
|
|
6953
8225
|
static get styles() {
|
|
6954
8226
|
return [
|
|
6955
8227
|
super.styles,
|
|
6956
|
-
css`${tokensCss}`,
|
|
6957
|
-
css`${styleCss$1}`,
|
|
6958
|
-
css`${colorCss$
|
|
8228
|
+
css`${tokensCss$3}`,
|
|
8229
|
+
css`${styleCss$1$1}`,
|
|
8230
|
+
css`${colorCss$4}`
|
|
6959
8231
|
];
|
|
6960
8232
|
}
|
|
6961
8233
|
|
|
@@ -6989,8 +8261,12 @@ class AuroIcon extends BaseIcon {
|
|
|
6989
8261
|
async firstUpdated() {
|
|
6990
8262
|
await super.firstUpdated();
|
|
6991
8263
|
|
|
6992
|
-
|
|
6993
|
-
|
|
8264
|
+
/**
|
|
8265
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
8266
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
8267
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
8268
|
+
*/
|
|
8269
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
6994
8270
|
const svgDesc = this.svg.querySelector('desc');
|
|
6995
8271
|
|
|
6996
8272
|
if (svgDesc) {
|
|
@@ -7034,7 +8310,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7034
8310
|
}
|
|
7035
8311
|
}
|
|
7036
8312
|
|
|
7037
|
-
var iconVersion = '8.0.
|
|
8313
|
+
var iconVersion = '8.0.4';
|
|
7038
8314
|
|
|
7039
8315
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7040
8316
|
// See LICENSE in the project root for license information.
|
|
@@ -7043,7 +8319,7 @@ var iconVersion = '8.0.3';
|
|
|
7043
8319
|
|
|
7044
8320
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7045
8321
|
|
|
7046
|
-
class AuroLibraryRuntimeUtils {
|
|
8322
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
7047
8323
|
|
|
7048
8324
|
/* eslint-disable jsdoc/require-param */
|
|
7049
8325
|
|
|
@@ -7104,9 +8380,9 @@ class AuroLibraryRuntimeUtils {
|
|
|
7104
8380
|
|
|
7105
8381
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
7106
8382
|
}
|
|
7107
|
-
}
|
|
8383
|
+
};
|
|
7108
8384
|
|
|
7109
|
-
var styleCss$
|
|
8385
|
+
var styleCss$5 = css`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
|
|
7110
8386
|
|
|
7111
8387
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7112
8388
|
// See LICENSE in the project root for license information.
|
|
@@ -7135,7 +8411,7 @@ class AuroHeader extends LitElement {
|
|
|
7135
8411
|
/**
|
|
7136
8412
|
* @private
|
|
7137
8413
|
*/
|
|
7138
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
8414
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
7139
8415
|
}
|
|
7140
8416
|
|
|
7141
8417
|
// function to define props used within the scope of this component
|
|
@@ -7153,7 +8429,7 @@ class AuroHeader extends LitElement {
|
|
|
7153
8429
|
}
|
|
7154
8430
|
|
|
7155
8431
|
static get styles() {
|
|
7156
|
-
return [styleCss$
|
|
8432
|
+
return [styleCss$5];
|
|
7157
8433
|
}
|
|
7158
8434
|
|
|
7159
8435
|
/**
|
|
@@ -7165,7 +8441,7 @@ class AuroHeader extends LitElement {
|
|
|
7165
8441
|
*
|
|
7166
8442
|
*/
|
|
7167
8443
|
static register(name = "auro-header") {
|
|
7168
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
8444
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
7169
8445
|
}
|
|
7170
8446
|
|
|
7171
8447
|
firstUpdated() {
|
|
@@ -7261,17 +8537,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
7261
8537
|
|
|
7262
8538
|
this.large = false;
|
|
7263
8539
|
|
|
7264
|
-
AuroLibraryRuntimeUtils$
|
|
8540
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
7265
8541
|
|
|
7266
8542
|
const versioning = new AuroDependencyVersioning();
|
|
8543
|
+
|
|
8544
|
+
/**
|
|
8545
|
+
* @private
|
|
8546
|
+
*/
|
|
7267
8547
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
8548
|
+
|
|
8549
|
+
/**
|
|
8550
|
+
* @private
|
|
8551
|
+
*/
|
|
7268
8552
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
8553
|
+
|
|
8554
|
+
/**
|
|
8555
|
+
* @private
|
|
8556
|
+
*/
|
|
8557
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
7269
8558
|
}
|
|
7270
8559
|
|
|
7271
8560
|
static get styles() {
|
|
7272
8561
|
return [
|
|
7273
|
-
colorCss$
|
|
7274
|
-
styleCss$
|
|
8562
|
+
colorCss$3,
|
|
8563
|
+
styleCss$4,
|
|
7275
8564
|
tokenCss
|
|
7276
8565
|
];
|
|
7277
8566
|
}
|
|
@@ -7300,7 +8589,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
7300
8589
|
*
|
|
7301
8590
|
*/
|
|
7302
8591
|
static register(name = "auro-bibtemplate") {
|
|
7303
|
-
AuroLibraryRuntimeUtils$
|
|
8592
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
7304
8593
|
}
|
|
7305
8594
|
|
|
7306
8595
|
/**
|
|
@@ -7354,37 +8643,245 @@ class AuroBibtemplate extends LitElement {
|
|
|
7354
8643
|
|
|
7355
8644
|
// function that renders the HTML and CSS into the scope of the component
|
|
7356
8645
|
render() {
|
|
7357
|
-
return html$1`
|
|
7358
|
-
<div id="bibTemplate" part="bibtemplate">
|
|
7359
|
-
${this.isFullscreen ? html$1`
|
|
7360
|
-
<div id="headerContainer">
|
|
7361
|
-
|
|
7362
|
-
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
7363
|
-
|
|
7364
|
-
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
7365
|
-
<slot name="header"></slot>
|
|
7366
|
-
</${this.headerTag}>
|
|
7367
|
-
<span id="subheader">
|
|
7368
|
-
<slot name="subheader"></slot>
|
|
7369
|
-
</span>
|
|
7370
|
-
</div>` : null}
|
|
7371
|
-
|
|
7372
|
-
<div id="bodyContainer">
|
|
7373
|
-
<slot></slot>
|
|
7374
|
-
</div>
|
|
7375
|
-
|
|
7376
|
-
${this.isFullscreen ? html$1`
|
|
7377
|
-
<div id="footerContainer">
|
|
7378
|
-
<slot name="footer"></slot>
|
|
7379
|
-
</div>` : null}
|
|
8646
|
+
return html$1`
|
|
8647
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
8648
|
+
${this.isFullscreen ? html$1`
|
|
8649
|
+
<div id="headerContainer">
|
|
8650
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
8651
|
+
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
8652
|
+
</${this.buttonTag}>
|
|
8653
|
+
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
8654
|
+
<slot name="header"></slot>
|
|
8655
|
+
</${this.headerTag}>
|
|
8656
|
+
<span id="subheader">
|
|
8657
|
+
<slot name="subheader"></slot>
|
|
8658
|
+
</span>
|
|
8659
|
+
</div>` : null}
|
|
8660
|
+
|
|
8661
|
+
<div id="bodyContainer">
|
|
8662
|
+
<slot></slot>
|
|
8663
|
+
</div>
|
|
8664
|
+
|
|
8665
|
+
${this.isFullscreen ? html$1`
|
|
8666
|
+
<div id="footerContainer">
|
|
8667
|
+
<slot name="footer"></slot>
|
|
8668
|
+
</div>` : null}
|
|
8669
|
+
</div>
|
|
8670
|
+
`;
|
|
8671
|
+
}
|
|
8672
|
+
}
|
|
8673
|
+
|
|
8674
|
+
var bibTemplateVersion = '1.0.0';
|
|
8675
|
+
|
|
8676
|
+
var colorCss$1 = css`:host([error]){--ds-auro-helptext-color: var(--ds-basic-color-status-error, #e31f26)}:host([onDark]){--ds-auro-helptext-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][error]){--ds-auro-helptext-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helptext-wrapper{color:var(--ds-auro-helptext-color)}`;
|
|
8677
|
+
|
|
8678
|
+
var styleCss$1 = css`.helptext-wrapper{display:none;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}:host([large]) .helptext-wrapper{font-size:16px;font-weight:450;letter-spacing:0;line-height:24px}.helptext-wrapper[visible]{display:block}::slotted(*:not(:empty)){margin-top:var(--ds-size-50, 0.25rem);margin-bottom:0}::slotted(p){margin-block:0}`;
|
|
8679
|
+
|
|
8680
|
+
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
8681
|
+
|
|
8682
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8683
|
+
// See LICENSE in the project root for license information.
|
|
8684
|
+
|
|
8685
|
+
// ---------------------------------------------------------------------
|
|
8686
|
+
|
|
8687
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8688
|
+
|
|
8689
|
+
class AuroLibraryRuntimeUtils {
|
|
8690
|
+
|
|
8691
|
+
/* eslint-disable jsdoc/require-param */
|
|
8692
|
+
|
|
8693
|
+
/**
|
|
8694
|
+
* This will register a new custom element with the browser.
|
|
8695
|
+
* @param {String} name - The name of the custom element.
|
|
8696
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
8697
|
+
* @returns {void}
|
|
8698
|
+
*/
|
|
8699
|
+
registerComponent(name, componentClass) {
|
|
8700
|
+
if (!customElements.get(name)) {
|
|
8701
|
+
customElements.define(name, class extends componentClass {});
|
|
8702
|
+
}
|
|
8703
|
+
}
|
|
8704
|
+
|
|
8705
|
+
/**
|
|
8706
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
8707
|
+
* @returns {void}
|
|
8708
|
+
*/
|
|
8709
|
+
closestElement(
|
|
8710
|
+
selector, // selector like in .closest()
|
|
8711
|
+
base = this, // extra functionality to skip a parent
|
|
8712
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8713
|
+
!el || el === document || el === window
|
|
8714
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
8715
|
+
: found
|
|
8716
|
+
? found // found a selector INside this element
|
|
8717
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8718
|
+
) {
|
|
8719
|
+
return __Closest(base);
|
|
8720
|
+
}
|
|
8721
|
+
/* eslint-enable jsdoc/require-param */
|
|
8722
|
+
|
|
8723
|
+
/**
|
|
8724
|
+
* 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.
|
|
8725
|
+
* @param {Object} elem - The element to check.
|
|
8726
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8727
|
+
* @returns {void}
|
|
8728
|
+
*/
|
|
8729
|
+
handleComponentTagRename(elem, tagName) {
|
|
8730
|
+
const tag = tagName.toLowerCase();
|
|
8731
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8732
|
+
|
|
8733
|
+
if (elemTag !== tag) {
|
|
8734
|
+
elem.setAttribute(tag, true);
|
|
8735
|
+
}
|
|
8736
|
+
}
|
|
8737
|
+
|
|
8738
|
+
/**
|
|
8739
|
+
* Validates if an element is a specific Auro component.
|
|
8740
|
+
* @param {Object} elem - The element to validate.
|
|
8741
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
8742
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8743
|
+
*/
|
|
8744
|
+
elementMatch(elem, tagName) {
|
|
8745
|
+
const tag = tagName.toLowerCase();
|
|
8746
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8747
|
+
|
|
8748
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
8749
|
+
}
|
|
8750
|
+
}
|
|
8751
|
+
|
|
8752
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8753
|
+
// See LICENSE in the project root for license information.
|
|
8754
|
+
|
|
8755
|
+
|
|
8756
|
+
/**
|
|
8757
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
8758
|
+
*
|
|
8759
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
8760
|
+
*/
|
|
8761
|
+
class AuroHelpText extends LitElement {
|
|
8762
|
+
|
|
8763
|
+
constructor() {
|
|
8764
|
+
super();
|
|
8765
|
+
|
|
8766
|
+
this.error = false;
|
|
8767
|
+
this.onDark = false;
|
|
8768
|
+
this.hasTextContent = false;
|
|
8769
|
+
|
|
8770
|
+
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
8771
|
+
}
|
|
8772
|
+
|
|
8773
|
+
static get styles() {
|
|
8774
|
+
return [
|
|
8775
|
+
colorCss$1,
|
|
8776
|
+
styleCss$1,
|
|
8777
|
+
tokensCss
|
|
8778
|
+
];
|
|
8779
|
+
}
|
|
8780
|
+
|
|
8781
|
+
// function to define props used within the scope of this component
|
|
8782
|
+
static get properties() {
|
|
8783
|
+
return {
|
|
8784
|
+
|
|
8785
|
+
/**
|
|
8786
|
+
* @private
|
|
8787
|
+
*/
|
|
8788
|
+
slotNodes: {
|
|
8789
|
+
type: Boolean,
|
|
8790
|
+
},
|
|
8791
|
+
|
|
8792
|
+
/**
|
|
8793
|
+
* @private
|
|
8794
|
+
*/
|
|
8795
|
+
hasTextContent: {
|
|
8796
|
+
type: Boolean,
|
|
8797
|
+
},
|
|
8798
|
+
|
|
8799
|
+
/**
|
|
8800
|
+
* If declared, make font color red.
|
|
8801
|
+
*/
|
|
8802
|
+
error: {
|
|
8803
|
+
type: Boolean,
|
|
8804
|
+
reflect: true,
|
|
8805
|
+
},
|
|
8806
|
+
|
|
8807
|
+
/**
|
|
8808
|
+
* If declared, will apply onDark styles.
|
|
8809
|
+
*/
|
|
8810
|
+
onDark: {
|
|
8811
|
+
type: Boolean,
|
|
8812
|
+
reflect: true
|
|
8813
|
+
}
|
|
8814
|
+
};
|
|
8815
|
+
}
|
|
8816
|
+
|
|
8817
|
+
/**
|
|
8818
|
+
* This will register this element with the browser.
|
|
8819
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
8820
|
+
*
|
|
8821
|
+
* @example
|
|
8822
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
8823
|
+
*
|
|
8824
|
+
*/
|
|
8825
|
+
static register(name = "auro-helptext") {
|
|
8826
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
8827
|
+
}
|
|
8828
|
+
|
|
8829
|
+
updated() {
|
|
8830
|
+
this.handleSlotChange();
|
|
8831
|
+
}
|
|
8832
|
+
|
|
8833
|
+
handleSlotChange(event) {
|
|
8834
|
+
if (event) {
|
|
8835
|
+
this.slotNodes = event.target.assignedNodes();
|
|
8836
|
+
}
|
|
8837
|
+
|
|
8838
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
8839
|
+
}
|
|
8840
|
+
|
|
8841
|
+
/**
|
|
8842
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
8843
|
+
*
|
|
8844
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
8845
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
8846
|
+
* @private
|
|
8847
|
+
*/
|
|
8848
|
+
checkSlotsForContent(nodes) {
|
|
8849
|
+
if (!nodes) {
|
|
8850
|
+
return false;
|
|
8851
|
+
}
|
|
8852
|
+
|
|
8853
|
+
return nodes.some((node) => {
|
|
8854
|
+
if (node.textContent.trim()) {
|
|
8855
|
+
return true;
|
|
8856
|
+
}
|
|
8857
|
+
|
|
8858
|
+
if (!node.querySelector) {
|
|
8859
|
+
return false;
|
|
8860
|
+
}
|
|
8861
|
+
|
|
8862
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
8863
|
+
if (!nestedSlot) {
|
|
8864
|
+
return false;
|
|
8865
|
+
}
|
|
8866
|
+
|
|
8867
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
8868
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
8869
|
+
});
|
|
8870
|
+
}
|
|
8871
|
+
|
|
8872
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
8873
|
+
render() {
|
|
8874
|
+
return html`
|
|
8875
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
8876
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
7380
8877
|
</div>
|
|
7381
|
-
|
|
8878
|
+
`;
|
|
7382
8879
|
}
|
|
7383
8880
|
}
|
|
7384
8881
|
|
|
7385
|
-
var
|
|
8882
|
+
var helptextVersion = '1.0.0';
|
|
7386
8883
|
|
|
7387
|
-
var styleCss = css
|
|
8884
|
+
var styleCss = css`:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
7388
8885
|
|
|
7389
8886
|
var colorCss = css`:host ::slotted(*:not(:first-child)){border-color:var(--ds-auro-counter-divider-color)}`;
|
|
7390
8887
|
|
|
@@ -7408,7 +8905,7 @@ class AuroCounterWrapper extends LitElement {
|
|
|
7408
8905
|
return [
|
|
7409
8906
|
colorCss,
|
|
7410
8907
|
styleCss,
|
|
7411
|
-
|
|
8908
|
+
tokens
|
|
7412
8909
|
];
|
|
7413
8910
|
}
|
|
7414
8911
|
|
|
@@ -7419,7 +8916,7 @@ class AuroCounterWrapper extends LitElement {
|
|
|
7419
8916
|
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
7420
8917
|
*/
|
|
7421
8918
|
static register(name = "auro-counter-wrapper") {
|
|
7422
|
-
AuroLibraryRuntimeUtils$
|
|
8919
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterWrapper);
|
|
7423
8920
|
}
|
|
7424
8921
|
|
|
7425
8922
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -7434,7 +8931,102 @@ if (!customElements.get("auro-counter-wrapper")) {
|
|
|
7434
8931
|
customElements.define("auro-counter-wrapper", AuroCounterWrapper);
|
|
7435
8932
|
}
|
|
7436
8933
|
|
|
7437
|
-
|
|
8934
|
+
class AuroElement extends LitElement {
|
|
8935
|
+
static get properties() {
|
|
8936
|
+
return {
|
|
8937
|
+
|
|
8938
|
+
/**
|
|
8939
|
+
* Defines the language of an element.
|
|
8940
|
+
* @default {'default'}
|
|
8941
|
+
*/
|
|
8942
|
+
layout: {
|
|
8943
|
+
type: String,
|
|
8944
|
+
attribute: "layout",
|
|
8945
|
+
reflect: true
|
|
8946
|
+
},
|
|
8947
|
+
|
|
8948
|
+
shape: {
|
|
8949
|
+
type: String,
|
|
8950
|
+
attribute: "shape",
|
|
8951
|
+
reflect: true
|
|
8952
|
+
},
|
|
8953
|
+
|
|
8954
|
+
size: {
|
|
8955
|
+
type: String,
|
|
8956
|
+
attribute: "size",
|
|
8957
|
+
reflect: true
|
|
8958
|
+
},
|
|
8959
|
+
|
|
8960
|
+
onDark: {
|
|
8961
|
+
type: Boolean,
|
|
8962
|
+
attribute: "ondark",
|
|
8963
|
+
reflect: true
|
|
8964
|
+
}
|
|
8965
|
+
};
|
|
8966
|
+
}
|
|
8967
|
+
|
|
8968
|
+
resetShapeClasses() {
|
|
8969
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
8970
|
+
|
|
8971
|
+
if (wrapper) {
|
|
8972
|
+
wrapper.classList.forEach((className) => {
|
|
8973
|
+
if (className.startsWith('shape-')) {
|
|
8974
|
+
wrapper.classList.remove(className);
|
|
8975
|
+
}
|
|
8976
|
+
});
|
|
8977
|
+
|
|
8978
|
+
}
|
|
8979
|
+
|
|
8980
|
+
if (this.shape && this.size) {
|
|
8981
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
8982
|
+
} else {
|
|
8983
|
+
wrapper.classList.add('shape-none');
|
|
8984
|
+
}
|
|
8985
|
+
}
|
|
8986
|
+
|
|
8987
|
+
resetLayoutClasses() {
|
|
8988
|
+
if (this.layout) {
|
|
8989
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
8990
|
+
|
|
8991
|
+
if (wrapper) {
|
|
8992
|
+
wrapper.classList.forEach((className) => {
|
|
8993
|
+
if (className.startsWith('layout-')) {
|
|
8994
|
+
wrapper.classList.remove(className);
|
|
8995
|
+
}
|
|
8996
|
+
});
|
|
8997
|
+
|
|
8998
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
8999
|
+
}
|
|
9000
|
+
}
|
|
9001
|
+
}
|
|
9002
|
+
|
|
9003
|
+
updateComponentArchitecture() {
|
|
9004
|
+
this.resetLayoutClasses();
|
|
9005
|
+
this.resetShapeClasses();
|
|
9006
|
+
}
|
|
9007
|
+
|
|
9008
|
+
updated(changedProperties) {
|
|
9009
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9010
|
+
this.updateComponentArchitecture();
|
|
9011
|
+
}
|
|
9012
|
+
}
|
|
9013
|
+
|
|
9014
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
9015
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
9016
|
+
render() {
|
|
9017
|
+
try {
|
|
9018
|
+
return this.renderLayout();
|
|
9019
|
+
} catch (error) {
|
|
9020
|
+
// failed to get the defined layout
|
|
9021
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
9022
|
+
|
|
9023
|
+
// fallback to the default layout
|
|
9024
|
+
return this.getLayout('default');
|
|
9025
|
+
}
|
|
9026
|
+
}
|
|
9027
|
+
}
|
|
9028
|
+
|
|
9029
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions, max-lines, prefer-destructuring, no-underscore-dangle, arrow-parens, no-confusing-arrow, curly */
|
|
7438
9030
|
|
|
7439
9031
|
|
|
7440
9032
|
/**
|
|
@@ -7451,8 +9043,9 @@ if (!customElements.get("auro-counter-wrapper")) {
|
|
|
7451
9043
|
* @slot label - Dropdown label content. Only used when `isDropdown` is true.
|
|
7452
9044
|
* @slot valueText - Dropdown value text display. Only used when `isDropdown` is true.
|
|
7453
9045
|
* @slot helpText - Dropdown help text content. Only used when `isDropdown` is true.
|
|
9046
|
+
* @property {'classic'|'snowflake'} layout - Determines the layout style of the counter group when it is a dropdown. Options are 'classic' or 'snowflake'. Default is 'classic'.
|
|
7454
9047
|
*/
|
|
7455
|
-
class AuroCounterGroup extends
|
|
9048
|
+
class AuroCounterGroup extends AuroElement {
|
|
7456
9049
|
constructor() {
|
|
7457
9050
|
super();
|
|
7458
9051
|
|
|
@@ -7463,12 +9056,15 @@ class AuroCounterGroup extends LitElement {
|
|
|
7463
9056
|
this.validity = undefined;
|
|
7464
9057
|
this.value = undefined;
|
|
7465
9058
|
|
|
9059
|
+
this.matchWidth = false;
|
|
7466
9060
|
this.isDropdown = false;
|
|
7467
9061
|
this.fullscreenBreakpoint = 'sm';
|
|
7468
9062
|
this.largeFullscreenHeadline = false;
|
|
7469
9063
|
this.autoPlacement = false;
|
|
7470
9064
|
this.noFlip = false;
|
|
7471
9065
|
|
|
9066
|
+
this.placement = 'bottom-start';
|
|
9067
|
+
|
|
7472
9068
|
/**
|
|
7473
9069
|
* @private
|
|
7474
9070
|
*/
|
|
@@ -7508,10 +9104,21 @@ class AuroCounterGroup extends LitElement {
|
|
|
7508
9104
|
* @type {string}
|
|
7509
9105
|
*/
|
|
7510
9106
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-counter-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
9107
|
+
|
|
9108
|
+
/**
|
|
9109
|
+
* Dynamically generated helptext tag.
|
|
9110
|
+
* @private
|
|
9111
|
+
* @type {string}
|
|
9112
|
+
*/
|
|
9113
|
+
this.helpTextTag = versioning.generateTag("auro-formkit-counter-helptext", helptextVersion, AuroHelpText);
|
|
7511
9114
|
}
|
|
7512
9115
|
|
|
7513
9116
|
static get styles() {
|
|
7514
|
-
return [
|
|
9117
|
+
return [
|
|
9118
|
+
tokens,
|
|
9119
|
+
counterGroupStyles,
|
|
9120
|
+
shapeSizeCss$1
|
|
9121
|
+
];
|
|
7515
9122
|
}
|
|
7516
9123
|
|
|
7517
9124
|
static get properties() {
|
|
@@ -7546,6 +9153,15 @@ class AuroCounterGroup extends LitElement {
|
|
|
7546
9153
|
type: Boolean
|
|
7547
9154
|
},
|
|
7548
9155
|
|
|
9156
|
+
/**
|
|
9157
|
+
* If declared, the dropdown will expand to the width of its parent container.
|
|
9158
|
+
* Otherwise, the dropdown width will be determined by its content.
|
|
9159
|
+
*/
|
|
9160
|
+
matchWidth: {
|
|
9161
|
+
type: Boolean,
|
|
9162
|
+
reflect: true
|
|
9163
|
+
},
|
|
9164
|
+
|
|
7549
9165
|
/**
|
|
7550
9166
|
* The maximum value allowed for the whole group of counters.
|
|
7551
9167
|
*/
|
|
@@ -7633,6 +9249,16 @@ class AuroCounterGroup extends LitElement {
|
|
|
7633
9249
|
value: {
|
|
7634
9250
|
type: Object,
|
|
7635
9251
|
},
|
|
9252
|
+
|
|
9253
|
+
/**
|
|
9254
|
+
* The current text in the valueText slot.
|
|
9255
|
+
* @private
|
|
9256
|
+
*/
|
|
9257
|
+
valueText: {
|
|
9258
|
+
type: String,
|
|
9259
|
+
reflect: false,
|
|
9260
|
+
attribute: false
|
|
9261
|
+
}
|
|
7636
9262
|
};
|
|
7637
9263
|
}
|
|
7638
9264
|
|
|
@@ -7733,13 +9359,8 @@ class AuroCounterGroup extends LitElement {
|
|
|
7733
9359
|
});
|
|
7734
9360
|
|
|
7735
9361
|
const counterWrapper = this.shadowRoot.querySelector('auro-counter-wrapper');
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
this.counters.forEach((counter) => {
|
|
7739
|
-
counterWrapper.append(counter);
|
|
7740
|
-
});
|
|
7741
|
-
|
|
7742
|
-
this.counters = counterWrapper.querySelectorAll("auro-counter, [auro-counter]");
|
|
9362
|
+
const counterSlot = counterWrapper.querySelector('slot');
|
|
9363
|
+
this.counters = counterSlot.assignedElements().filter(el => el.tagName.toLowerCase() === 'auro-counter' || el.hasAttribute('auro-counter'));
|
|
7743
9364
|
|
|
7744
9365
|
if (this.keydownHandler) {
|
|
7745
9366
|
counterWrapper.removeEventListener('keydown', this.keydownHandler);
|
|
@@ -7820,6 +9441,10 @@ class AuroCounterGroup extends LitElement {
|
|
|
7820
9441
|
* @private
|
|
7821
9442
|
*/
|
|
7822
9443
|
updateValue() {
|
|
9444
|
+
if (!this.counters) {
|
|
9445
|
+
return;
|
|
9446
|
+
}
|
|
9447
|
+
|
|
7823
9448
|
this.value = Array.from(this.counters).reduce((acc, counter, index) => {
|
|
7824
9449
|
const name = counter.hasAttribute('name') ? counter.getAttribute('name') : `counter-${index}`;
|
|
7825
9450
|
acc[name] = this.safeNumberConversion(counter.value);
|
|
@@ -7836,6 +9461,20 @@ class AuroCounterGroup extends LitElement {
|
|
|
7836
9461
|
});
|
|
7837
9462
|
}
|
|
7838
9463
|
|
|
9464
|
+
/**
|
|
9465
|
+
* Updates the value text in the dropdown trigger based on the counters in the counter group.
|
|
9466
|
+
* @private
|
|
9467
|
+
*/
|
|
9468
|
+
updateValueText() {
|
|
9469
|
+
const valueTextSlot = this.shadowRoot.querySelector('slot[name="valueText"]');
|
|
9470
|
+
if (valueTextSlot) {
|
|
9471
|
+
const assignedNodes = valueTextSlot.assignedNodes({ flatten: true });
|
|
9472
|
+
this.valueText = assignedNodes.map((node) => node.textContent).join(', ');
|
|
9473
|
+
} else {
|
|
9474
|
+
this.valueText = '';
|
|
9475
|
+
}
|
|
9476
|
+
}
|
|
9477
|
+
|
|
7839
9478
|
/**
|
|
7840
9479
|
* Validates value.
|
|
7841
9480
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7866,6 +9505,12 @@ class AuroCounterGroup extends LitElement {
|
|
|
7866
9505
|
}
|
|
7867
9506
|
}
|
|
7868
9507
|
|
|
9508
|
+
firstUpdated() {
|
|
9509
|
+
super.firstUpdated();
|
|
9510
|
+
this.updateValue();
|
|
9511
|
+
this.updateValueText();
|
|
9512
|
+
}
|
|
9513
|
+
|
|
7869
9514
|
/**
|
|
7870
9515
|
* Registers the custom element with the browser.
|
|
7871
9516
|
* @param {string} [name="auro-counter-group"] - Custom element name to register.
|
|
@@ -7873,40 +9518,182 @@ class AuroCounterGroup extends LitElement {
|
|
|
7873
9518
|
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
7874
9519
|
*/
|
|
7875
9520
|
static register(name = "auro-counter-group") {
|
|
7876
|
-
AuroLibraryRuntimeUtils$
|
|
9521
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterGroup);
|
|
7877
9522
|
}
|
|
7878
9523
|
|
|
7879
|
-
|
|
7880
|
-
|
|
9524
|
+
/**
|
|
9525
|
+
* Render the dropdown structure for the counter group.
|
|
9526
|
+
* @returns {TemplateResult} The dropdown template.
|
|
9527
|
+
* @private
|
|
9528
|
+
*/
|
|
9529
|
+
renderCounterDropdown() {
|
|
7881
9530
|
return html$1`
|
|
7882
|
-
|
|
7883
|
-
|
|
9531
|
+
<${this.dropdownTag}
|
|
9532
|
+
chevron common fluid
|
|
9533
|
+
part="dropdown"
|
|
9534
|
+
?autoPlacement="${this.autoPlacement}"
|
|
9535
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
9536
|
+
?matchWidth="${this.matchWidth}"
|
|
9537
|
+
?noFlip="${this.noFlip}"
|
|
9538
|
+
?onDark="${this.onDark}"
|
|
7884
9539
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7885
|
-
.placement="${this.placement}"
|
|
7886
9540
|
.offset="${this.offset}"
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
|
|
7896
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
7897
|
-
<auro-counter-wrapper isInDropdown>
|
|
7898
|
-
</auro-counter-wrapper>
|
|
7899
|
-
</${this.bibtemplateTag}>
|
|
9541
|
+
.placement="${this.placement}"
|
|
9542
|
+
.layout="${this.layout}"
|
|
9543
|
+
.shape="${this.shape}"
|
|
9544
|
+
.size="${this.size}"
|
|
9545
|
+
.ondark="${this.onDark}"
|
|
9546
|
+
>
|
|
9547
|
+
${this.renderDropdownTrigger()}
|
|
9548
|
+
${this.renderBibTemplate()}
|
|
9549
|
+
${this.renderHelpText()}
|
|
7900
9550
|
</${this.dropdownTag}>
|
|
7901
|
-
|
|
9551
|
+
${this.renderFullscreenSlots()}
|
|
9552
|
+
`;
|
|
9553
|
+
}
|
|
9554
|
+
|
|
9555
|
+
/**
|
|
9556
|
+
* Render the dropdown trigger for the dropdown.
|
|
9557
|
+
* @returns {TemplateResult} The dropdown trigger template.
|
|
9558
|
+
* @private
|
|
9559
|
+
*/
|
|
9560
|
+
renderDropdownTrigger() {
|
|
9561
|
+
|
|
9562
|
+
const labelClasses = {
|
|
9563
|
+
filled: typeof this.valueText === 'string' && this.valueText.length
|
|
9564
|
+
};
|
|
9565
|
+
|
|
9566
|
+
return html$1`
|
|
9567
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
9568
|
+
<div class="accents left">
|
|
9569
|
+
<slot name="typeIcon"></slot>
|
|
9570
|
+
</div>
|
|
9571
|
+
<div class="mainContent">
|
|
9572
|
+
<label class="${classMap(labelClasses)}">
|
|
9573
|
+
<slot name="label"></slot>
|
|
9574
|
+
</label>
|
|
9575
|
+
<slot name="valueText" @slotChange="${this.updateValueText}">
|
|
9576
|
+
${this.counters && Array.from(this.counters).map((counter, index) => html$1`${counter.value} ${counter.defaultSlot}${index !== this.counters.length - 1 ? ', ' : ''}`)}
|
|
9577
|
+
</slot>
|
|
9578
|
+
</div>
|
|
9579
|
+
<div class="accents right"></div>
|
|
9580
|
+
</div>
|
|
9581
|
+
`;
|
|
9582
|
+
};
|
|
9583
|
+
|
|
9584
|
+
/**
|
|
9585
|
+
* Render the help text for the counter group.
|
|
9586
|
+
* @returns {TemplateResult} The help text template.
|
|
9587
|
+
* @private
|
|
9588
|
+
*/
|
|
9589
|
+
renderHelpText() {
|
|
9590
|
+
return html$1`
|
|
9591
|
+
<div slot="helpText">
|
|
9592
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
9593
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
9594
|
+
<slot name="helpText"></slot>
|
|
9595
|
+
</p>
|
|
9596
|
+
</${this.helpTextTag}>
|
|
9597
|
+
</div>
|
|
9598
|
+
`;
|
|
9599
|
+
}
|
|
9600
|
+
|
|
9601
|
+
/**
|
|
9602
|
+
* Render the dropdown bib template for the dropdown.
|
|
9603
|
+
* @returns {TemplateResult} The bib template.
|
|
9604
|
+
* @private
|
|
9605
|
+
*/
|
|
9606
|
+
renderBibTemplate() {
|
|
9607
|
+
return html$1`
|
|
9608
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
9609
|
+
${this.renderCounterGroup(true)}
|
|
9610
|
+
</${this.bibtemplateTag}>
|
|
9611
|
+
`;
|
|
9612
|
+
}
|
|
9613
|
+
|
|
9614
|
+
/**
|
|
9615
|
+
* Render the fullscreen bib slots for the dropdown.
|
|
9616
|
+
* @returns {TemplateResult} The fullscreen slots template.
|
|
9617
|
+
* @private
|
|
9618
|
+
*/
|
|
9619
|
+
renderFullscreenSlots() {
|
|
9620
|
+
return html$1`
|
|
7902
9621
|
<div id="slotHolder">
|
|
7903
9622
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7904
9623
|
<slot name="bib.fullscreen.footer" @slotchange="${this.handleSlotChange}"></slot>
|
|
7905
9624
|
</div>
|
|
7906
|
-
|
|
7907
|
-
|
|
9625
|
+
`;
|
|
9626
|
+
}
|
|
9627
|
+
|
|
9628
|
+
/**
|
|
9629
|
+
* Render the counter group container.
|
|
9630
|
+
* @param {boolean} isInDropdown - Whether the counter group is inside a dropdown.
|
|
9631
|
+
* @returns {TemplateResult} The counter group template.
|
|
9632
|
+
* @private
|
|
9633
|
+
*/
|
|
9634
|
+
renderCounterGroup(isInDropdown = this.isDropdown) {
|
|
9635
|
+
return html$1`
|
|
9636
|
+
<auro-counter-wrapper ?isInDropdown="${isInDropdown}">
|
|
9637
|
+
<div class="counters">
|
|
9638
|
+
<slot @slotchange=${() => this.isDropdown ? this.configureDropdownCounters() : this.configureCounters()}></slot>
|
|
9639
|
+
</div>
|
|
9640
|
+
</auro-counter-wrapper>
|
|
9641
|
+
`;
|
|
9642
|
+
}
|
|
9643
|
+
|
|
9644
|
+
/**
|
|
9645
|
+
* Render the classic layout.
|
|
9646
|
+
* @returns {TemplateResult} The classic layout template.
|
|
9647
|
+
* @private
|
|
9648
|
+
*/
|
|
9649
|
+
renderLayoutClassic() {
|
|
9650
|
+
this.shape = this.shape || "classic";
|
|
9651
|
+
this.layout = this.layout || "classic";
|
|
9652
|
+
this.size = this.size || "xl";
|
|
9653
|
+
|
|
9654
|
+
return html$1`
|
|
9655
|
+
${this.isDropdown
|
|
9656
|
+
? this.renderCounterDropdown()
|
|
9657
|
+
: this.renderCounterGroup()
|
|
9658
|
+
}`;
|
|
9659
|
+
}
|
|
9660
|
+
|
|
9661
|
+
/**
|
|
9662
|
+
* Render the snowflake layout.
|
|
9663
|
+
* @returns {TemplateResult} The snowflake layout template.
|
|
9664
|
+
* @private
|
|
9665
|
+
*/
|
|
9666
|
+
renderLayoutSnowflake() {
|
|
9667
|
+
this.layout = this.layout || "snowflake";
|
|
9668
|
+
this.shape = this.shape || "snowflake";
|
|
9669
|
+
this.size = this.size || "lg";
|
|
9670
|
+
|
|
9671
|
+
return html$1`
|
|
9672
|
+
${this.isDropdown
|
|
9673
|
+
? this.renderCounterDropdown()
|
|
9674
|
+
: this.renderCounterGroup()
|
|
7908
9675
|
}`;
|
|
7909
9676
|
}
|
|
9677
|
+
|
|
9678
|
+
/**
|
|
9679
|
+
* Renders the component by layout type.
|
|
9680
|
+
* @param {string} [ForcedLayout] - Optionally force a specific layout for rendering.
|
|
9681
|
+
* @returns {TemplateResult} The layout template.
|
|
9682
|
+
* @private
|
|
9683
|
+
*/
|
|
9684
|
+
renderLayout(ForcedLayout) {
|
|
9685
|
+
const layout = ForcedLayout || this.layout;
|
|
9686
|
+
|
|
9687
|
+
switch (layout) {
|
|
9688
|
+
|
|
9689
|
+
case 'snowflake':
|
|
9690
|
+
return this.renderLayoutSnowflake();
|
|
9691
|
+
case 'classic':
|
|
9692
|
+
return this.renderLayoutClassic();
|
|
9693
|
+
default:
|
|
9694
|
+
return this.renderLayoutClassic();
|
|
9695
|
+
}
|
|
9696
|
+
}
|
|
7910
9697
|
}
|
|
7911
9698
|
|
|
7912
9699
|
export { AuroCounter, AuroCounterGroup };
|