@aurodesignsystem-dev/auro-formkit 0.0.0-pr681.1 → 0.0.0-pr684.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/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 +1026 -12
- package/components/bibtemplate/dist/registered.js +1026 -12
- package/components/combobox/demo/api.min.js +1830 -478
- package/components/combobox/demo/index.min.js +1830 -478
- package/components/combobox/dist/index.js +1703 -355
- package/components/combobox/dist/registered.js +1703 -355
- package/components/counter/demo/api.min.js +1813 -466
- package/components/counter/demo/index.min.js +1813 -466
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +1813 -466
- package/components/counter/dist/registered.js +1813 -466
- package/components/datepicker/demo/api.min.js +2319 -643
- package/components/datepicker/demo/index.min.js +2319 -643
- package/components/datepicker/dist/index.js +2319 -643
- package/components/datepicker/dist/registered.js +2319 -643
- package/components/dropdown/demo/api.min.js +6 -2
- package/components/dropdown/demo/index.min.js +6 -2
- package/components/dropdown/dist/index.js +6 -2
- package/components/dropdown/dist/registered.js +6 -2
- package/components/input/demo/api.min.js +565 -235
- package/components/input/demo/index.min.js +565 -235
- package/components/input/dist/index.js +565 -235
- package/components/input/dist/registered.js +565 -235
- package/components/menu/demo/api.min.js +7 -3
- package/components/menu/demo/index.min.js +7 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +7 -3
- package/components/menu/dist/registered.js +7 -3
- package/components/select/demo/api.min.js +1166 -144
- package/components/select/demo/index.min.js +1166 -144
- package/components/select/dist/index.js +1159 -141
- package/components/select/dist/registered.js +1159 -141
- package/package.json +1 -1
|
@@ -5,15 +5,481 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
5
5
|
|
|
6
6
|
var tokensCss$7 = css`:host{--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-label-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--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))}`;
|
|
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$4 = 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.
|
|
@@ -119,11 +585,13 @@ let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
|
119
585
|
}
|
|
120
586
|
};
|
|
121
587
|
|
|
122
|
-
var styleCss$
|
|
588
|
+
var styleCss$b = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--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$6 = css`:host{--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}`;
|
|
592
|
+
var tokensCss$6 = 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.
|
|
@@ -195,9 +663,9 @@ let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
|
195
663
|
}
|
|
196
664
|
};
|
|
197
665
|
|
|
198
|
-
var styleCss$
|
|
666
|
+
var styleCss$a = css`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
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
670
|
var tokensCss$5 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
203
671
|
|
|
@@ -205,7 +673,7 @@ var tokensCss$5 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-
|
|
|
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
|
|
|
@@ -275,8 +743,8 @@ class AuroLoader extends LitElement {
|
|
|
275
743
|
|
|
276
744
|
static get styles() {
|
|
277
745
|
return [
|
|
278
|
-
css`${styleCss$
|
|
279
|
-
css`${colorCss$
|
|
746
|
+
css`${styleCss$a}`,
|
|
747
|
+
css`${colorCss$8}`,
|
|
280
748
|
css`${tokensCss$5}`
|
|
281
749
|
];
|
|
282
750
|
}
|
|
@@ -338,11 +806,11 @@ 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
|
|
|
@@ -358,7 +826,18 @@ var loaderVersion = '5.0.0';
|
|
|
358
826
|
|
|
359
827
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
360
828
|
|
|
361
|
-
|
|
829
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
833
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
834
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
835
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
836
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
837
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
838
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
839
|
+
*/
|
|
840
|
+
let AuroButton$1 = class AuroButton extends AuroElement$4 {
|
|
362
841
|
|
|
363
842
|
/**
|
|
364
843
|
* Enables form association for this element.
|
|
@@ -373,13 +852,10 @@ class AuroButton extends LitElement {
|
|
|
373
852
|
super();
|
|
374
853
|
this.autofocus = false;
|
|
375
854
|
this.disabled = false;
|
|
376
|
-
this.iconOnly = false;
|
|
377
855
|
this.loading = false;
|
|
856
|
+
this.size = "md";
|
|
857
|
+
this.shape = "rounded";
|
|
378
858
|
this.onDark = false;
|
|
379
|
-
this.secondary = false;
|
|
380
|
-
this.tertiary = false;
|
|
381
|
-
this.rounded = false;
|
|
382
|
-
this.slim = false;
|
|
383
859
|
this.fluid = false;
|
|
384
860
|
this.loadingText = this.loadingText || 'Loading...';
|
|
385
861
|
|
|
@@ -396,55 +872,50 @@ class AuroButton extends LitElement {
|
|
|
396
872
|
/**
|
|
397
873
|
* Generate unique names for dependency components.
|
|
398
874
|
*/
|
|
399
|
-
const versioning = new AuroDependencyVersioning$
|
|
875
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
400
876
|
|
|
401
877
|
/**
|
|
402
878
|
* @private
|
|
403
879
|
*/
|
|
404
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
880
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
405
881
|
}
|
|
406
882
|
|
|
407
883
|
static get styles() {
|
|
408
884
|
return [
|
|
409
885
|
tokensCss$6,
|
|
410
|
-
styleCss$
|
|
411
|
-
colorCss$
|
|
886
|
+
styleCss$b,
|
|
887
|
+
colorCss$9,
|
|
888
|
+
shapeSize$1
|
|
412
889
|
];
|
|
413
890
|
}
|
|
414
891
|
|
|
415
892
|
static get properties() {
|
|
416
893
|
return {
|
|
417
894
|
|
|
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
|
-
},
|
|
895
|
+
...super.properties,
|
|
425
896
|
|
|
426
897
|
/**
|
|
427
|
-
*
|
|
898
|
+
* Override layout since it isn't used in this component.
|
|
899
|
+
* @private
|
|
428
900
|
*/
|
|
429
|
-
|
|
901
|
+
layout: {
|
|
430
902
|
type: Boolean,
|
|
431
|
-
|
|
903
|
+
attribute: false,
|
|
904
|
+
reflect: false
|
|
432
905
|
},
|
|
433
906
|
|
|
434
907
|
/**
|
|
435
|
-
*
|
|
436
|
-
* @deprecated
|
|
908
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
437
909
|
*/
|
|
438
|
-
|
|
910
|
+
autofocus: {
|
|
439
911
|
type: Boolean,
|
|
440
912
|
reflect: true
|
|
441
913
|
},
|
|
442
914
|
|
|
443
915
|
/**
|
|
444
|
-
*
|
|
445
|
-
* @deprecated
|
|
916
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
446
917
|
*/
|
|
447
|
-
|
|
918
|
+
disabled: {
|
|
448
919
|
type: Boolean,
|
|
449
920
|
reflect: true
|
|
450
921
|
},
|
|
@@ -452,15 +923,7 @@ class AuroButton extends LitElement {
|
|
|
452
923
|
/**
|
|
453
924
|
* Alters the shape of the button to be full width of its parent container.
|
|
454
925
|
*/
|
|
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: {
|
|
926
|
+
fluid: {
|
|
464
927
|
type: Boolean,
|
|
465
928
|
reflect: true
|
|
466
929
|
},
|
|
@@ -468,7 +931,7 @@ class AuroButton extends LitElement {
|
|
|
468
931
|
/**
|
|
469
932
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
470
933
|
*/
|
|
471
|
-
loading:
|
|
934
|
+
loading: {
|
|
472
935
|
type: Boolean,
|
|
473
936
|
reflect: true
|
|
474
937
|
},
|
|
@@ -476,112 +939,50 @@ class AuroButton extends LitElement {
|
|
|
476
939
|
/**
|
|
477
940
|
* 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
941
|
*/
|
|
479
|
-
loadingText:
|
|
942
|
+
loadingText: {
|
|
480
943
|
type: String
|
|
481
944
|
},
|
|
482
945
|
|
|
483
946
|
/**
|
|
484
|
-
*
|
|
485
|
-
*/
|
|
486
|
-
onDark: {
|
|
487
|
-
type: Boolean,
|
|
488
|
-
reflect: true
|
|
489
|
-
},
|
|
490
|
-
|
|
491
|
-
/**
|
|
492
|
-
* If set to true, the button will have a rounded shape.
|
|
947
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
493
948
|
*/
|
|
494
|
-
|
|
495
|
-
type:
|
|
949
|
+
tIndex: {
|
|
950
|
+
type: String,
|
|
496
951
|
reflect: true
|
|
497
952
|
},
|
|
498
953
|
|
|
499
954
|
/**
|
|
500
|
-
*
|
|
955
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
501
956
|
*/
|
|
502
|
-
|
|
503
|
-
type:
|
|
957
|
+
title: {
|
|
958
|
+
type: String,
|
|
504
959
|
reflect: true
|
|
505
960
|
},
|
|
506
961
|
|
|
507
962
|
/**
|
|
508
|
-
*
|
|
963
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
509
964
|
*/
|
|
510
|
-
|
|
965
|
+
type: {
|
|
511
966
|
type: String,
|
|
512
967
|
reflect: true
|
|
513
968
|
},
|
|
514
969
|
|
|
515
970
|
/**
|
|
516
|
-
*
|
|
971
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
517
972
|
*/
|
|
518
|
-
|
|
973
|
+
value: {
|
|
519
974
|
type: String,
|
|
520
|
-
reflect: true
|
|
975
|
+
reflect: true
|
|
521
976
|
},
|
|
522
977
|
|
|
523
978
|
/**
|
|
524
|
-
*
|
|
525
|
-
*
|
|
526
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
979
|
+
* Sets button variant option.
|
|
980
|
+
* @default primary
|
|
527
981
|
*/
|
|
528
|
-
|
|
982
|
+
variant: {
|
|
529
983
|
type: String,
|
|
530
984
|
reflect: true
|
|
531
985
|
},
|
|
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: {
|
|
581
|
-
type: String,
|
|
582
|
-
reflect: true
|
|
583
|
-
},
|
|
584
|
-
ready: { type: Boolean },
|
|
585
986
|
};
|
|
586
987
|
}
|
|
587
988
|
|
|
@@ -606,17 +1007,6 @@ class AuroButton extends LitElement {
|
|
|
606
1007
|
this.renderRoot.querySelector('button').focus();
|
|
607
1008
|
}
|
|
608
1009
|
|
|
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
1010
|
/**
|
|
621
1011
|
* Submits the form that this button is associated with.
|
|
622
1012
|
* @private
|
|
@@ -637,25 +1027,56 @@ class AuroButton extends LitElement {
|
|
|
637
1027
|
return this.internals ? this.internals.form : null;
|
|
638
1028
|
}
|
|
639
1029
|
|
|
640
|
-
|
|
1030
|
+
/**
|
|
1031
|
+
* @private
|
|
1032
|
+
* @returns {Boolean}
|
|
1033
|
+
*/
|
|
1034
|
+
get hideText() {
|
|
1035
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
/**
|
|
1039
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
1040
|
+
* @returns {string | undefined}
|
|
1041
|
+
* @private
|
|
1042
|
+
*/
|
|
1043
|
+
get currentAriaLabel() {
|
|
1044
|
+
if (!this.attributeWatcher) return undefined;
|
|
1045
|
+
|
|
1046
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
1047
|
+
return ariaLabel || undefined;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
1052
|
+
* @returns {string | undefined}
|
|
1053
|
+
* @private
|
|
1054
|
+
*/
|
|
1055
|
+
get currentAriaLabelledBy() {
|
|
1056
|
+
if (!this.attributeWatcher) return undefined;
|
|
1057
|
+
|
|
1058
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
1059
|
+
return ariaLabelledBy || undefined;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Renders the default layout for the button.
|
|
1064
|
+
* @returns {TemplateResult}
|
|
1065
|
+
* @private
|
|
1066
|
+
*/
|
|
1067
|
+
renderLayoutDefault() {
|
|
641
1068
|
const classes = {
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
'auro-button--slim': this.slim,
|
|
647
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
648
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
649
|
-
'loading': this.loading
|
|
1069
|
+
"util_insetLg--squish": true,
|
|
1070
|
+
"auro-button": true,
|
|
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,7 +1093,7 @@ class AuroButton extends LitElement {
|
|
|
672
1093
|
|
|
673
1094
|
<span class="contentWrapper">
|
|
674
1095
|
<span class="textSlot" part="text">
|
|
675
|
-
${this.
|
|
1096
|
+
${this.hideText ? undefined : html$1`<slot></slot>`}
|
|
676
1097
|
</span>
|
|
677
1098
|
|
|
678
1099
|
<span part="icon">
|
|
@@ -682,75 +1103,14 @@ class AuroButton extends LitElement {
|
|
|
682
1103
|
</button>
|
|
683
1104
|
`;
|
|
684
1105
|
}
|
|
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
1106
|
|
|
743
1107
|
/**
|
|
744
|
-
*
|
|
745
|
-
* @
|
|
746
|
-
* @
|
|
747
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1108
|
+
* Renders the layout of the button
|
|
1109
|
+
* @returns {TemplateResult}
|
|
1110
|
+
* @private
|
|
748
1111
|
*/
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
752
|
-
|
|
753
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
1112
|
+
renderLayout() {
|
|
1113
|
+
return this.renderLayoutDefault();
|
|
754
1114
|
}
|
|
755
1115
|
};
|
|
756
1116
|
|
|
@@ -759,7 +1119,14 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
759
1119
|
|
|
760
1120
|
|
|
761
1121
|
// build the component class
|
|
762
|
-
class AuroCounterButton extends AuroButton {
|
|
1122
|
+
class AuroCounterButton extends AuroButton$1 {
|
|
1123
|
+
|
|
1124
|
+
constructor() {
|
|
1125
|
+
super();
|
|
1126
|
+
|
|
1127
|
+
this.size = "sm";
|
|
1128
|
+
this.shape = "rounded";
|
|
1129
|
+
}
|
|
763
1130
|
|
|
764
1131
|
static get styles() {
|
|
765
1132
|
return [
|
|
@@ -778,7 +1145,7 @@ class AuroCounterButton extends AuroButton {
|
|
|
778
1145
|
*
|
|
779
1146
|
*/
|
|
780
1147
|
static register(name = "auro-counter-button") {
|
|
781
|
-
AuroLibraryRuntimeUtils$
|
|
1148
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounterButton);
|
|
782
1149
|
}
|
|
783
1150
|
}
|
|
784
1151
|
|
|
@@ -788,46 +1155,6 @@ if (!customElements.get("auro-counter-button")) {
|
|
|
788
1155
|
customElements.define("auro-counter-button", AuroCounterButton);
|
|
789
1156
|
}
|
|
790
1157
|
|
|
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
1158
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
832
1159
|
// See LICENSE in the project root for license information.
|
|
833
1160
|
|
|
@@ -894,7 +1221,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
894
1221
|
return _fetchMap$2.get(uri);
|
|
895
1222
|
};
|
|
896
1223
|
|
|
897
|
-
var styleCss$
|
|
1224
|
+
var styleCss$9 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
898
1225
|
|
|
899
1226
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
900
1227
|
// See LICENSE in the project root for license information.
|
|
@@ -937,7 +1264,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
937
1264
|
|
|
938
1265
|
static get styles() {
|
|
939
1266
|
return css`
|
|
940
|
-
${styleCss$
|
|
1267
|
+
${styleCss$9}
|
|
941
1268
|
`;
|
|
942
1269
|
}
|
|
943
1270
|
|
|
@@ -980,7 +1307,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
980
1307
|
|
|
981
1308
|
var tokensCss$4 = 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
1309
|
|
|
983
|
-
var colorCss$
|
|
1310
|
+
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
1311
|
|
|
985
1312
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
986
1313
|
// See LICENSE in the project root for license information.
|
|
@@ -989,7 +1316,7 @@ var colorCss$6 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
989
1316
|
|
|
990
1317
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
991
1318
|
|
|
992
|
-
let AuroLibraryRuntimeUtils$
|
|
1319
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
993
1320
|
|
|
994
1321
|
/* eslint-disable jsdoc/require-param */
|
|
995
1322
|
|
|
@@ -1071,7 +1398,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1071
1398
|
*/
|
|
1072
1399
|
privateDefaults() {
|
|
1073
1400
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1074
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1401
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
1075
1402
|
}
|
|
1076
1403
|
|
|
1077
1404
|
// function to define props used within the scope of this component
|
|
@@ -1139,8 +1466,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1139
1466
|
return [
|
|
1140
1467
|
super.styles,
|
|
1141
1468
|
css`${tokensCss$4}`,
|
|
1142
|
-
css`${styleCss$
|
|
1143
|
-
css`${colorCss$
|
|
1469
|
+
css`${styleCss$9}`,
|
|
1470
|
+
css`${colorCss$7}`
|
|
1144
1471
|
];
|
|
1145
1472
|
}
|
|
1146
1473
|
|
|
@@ -1153,7 +1480,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1153
1480
|
*
|
|
1154
1481
|
*/
|
|
1155
1482
|
static register(name = "auro-icon") {
|
|
1156
|
-
AuroLibraryRuntimeUtils$
|
|
1483
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroIcon);
|
|
1157
1484
|
}
|
|
1158
1485
|
|
|
1159
1486
|
connectedCallback() {
|
|
@@ -1174,8 +1501,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1174
1501
|
async firstUpdated() {
|
|
1175
1502
|
await super.firstUpdated();
|
|
1176
1503
|
|
|
1177
|
-
|
|
1178
|
-
|
|
1504
|
+
/**
|
|
1505
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
1506
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
1507
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
1508
|
+
*/
|
|
1509
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
1179
1510
|
const svgDesc = this.svg.querySelector('desc');
|
|
1180
1511
|
|
|
1181
1512
|
if (svgDesc) {
|
|
@@ -1219,7 +1550,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1219
1550
|
}
|
|
1220
1551
|
};
|
|
1221
1552
|
|
|
1222
|
-
var iconVersion$2 = '8.0.
|
|
1553
|
+
var iconVersion$2 = '8.0.4';
|
|
1223
1554
|
|
|
1224
1555
|
class DateFormatter {
|
|
1225
1556
|
|
|
@@ -1637,7 +1968,7 @@ const {
|
|
|
1637
1968
|
class AuroFormValidation {
|
|
1638
1969
|
|
|
1639
1970
|
constructor() {
|
|
1640
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1971
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
1641
1972
|
}
|
|
1642
1973
|
|
|
1643
1974
|
/**
|
|
@@ -2025,9 +2356,9 @@ var plusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width"
|
|
|
2025
2356
|
|
|
2026
2357
|
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>"};
|
|
2027
2358
|
|
|
2028
|
-
var colorCss$
|
|
2359
|
+
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)}`;
|
|
2029
2360
|
|
|
2030
|
-
var styleCss$
|
|
2361
|
+
var styleCss$8 = css`.counter{display:flex;align-items:center;justify-content:space-between;column-gap:var(--ds-size-150, 0.75rem)}.content{display:flex;flex-flow:column}[name=description]::slotted(*){display:block;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}.quantityWrapper{width:var(--ds-size-400, 2rem);height:calc(var(--ds-size-25, 0.125rem) + var(--ds-size-400, 2rem));align-content:center;cursor:default;font-size:12px;font-weight:450;letter-spacing:0;line-height:16px;text-align:center}:host{position:relative}:host::part(counterControl){display:flex;border-radius:var(--ds-size-500, 2.5rem);line-height:0;touch-action:manipulation}:host::part(counterControl):focus-visible{outline-offset:0;outline-style:solid;outline-width:var(--ds-size-25, 0.125rem)}:host::part(controlMinus){--ds-auro-counter-control-border-radius: var(--ds-size-500, 2.5rem) 0 0 var(--ds-size-500, 2.5rem);--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem)}:host::part(controlPlus){--ds-auro-counter-control-border-radius: 0 var(--ds-size-500, 2.5rem) var(--ds-size-500, 2.5rem) 0;--ds-auro-counter-control-padding: var(--ds-size-50, 0.25rem) var(--ds-size-100, 0.5rem) var(--ds-size-50, 0.25rem) var(--ds-size-50, 0.25rem)}auro-counter-button{display:flex}`;
|
|
2031
2362
|
|
|
2032
2363
|
/* eslint-disable lit/binding-positions, lit/no-invalid-html, max-lines */
|
|
2033
2364
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -2185,14 +2516,14 @@ class AuroCounter extends LitElement {
|
|
|
2185
2516
|
* AuroCounter.register("custom-counter") // registers <custom-counter/>
|
|
2186
2517
|
*/
|
|
2187
2518
|
static register(name = "auro-counter") {
|
|
2188
|
-
AuroLibraryRuntimeUtils$
|
|
2519
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounter);
|
|
2189
2520
|
}
|
|
2190
2521
|
|
|
2191
2522
|
static get styles() {
|
|
2192
2523
|
return [
|
|
2193
2524
|
tokensCss$7,
|
|
2194
|
-
colorCss$
|
|
2195
|
-
styleCss$
|
|
2525
|
+
colorCss$6,
|
|
2526
|
+
styleCss$8
|
|
2196
2527
|
];
|
|
2197
2528
|
}
|
|
2198
2529
|
|
|
@@ -2331,14 +2662,13 @@ class AuroCounter extends LitElement {
|
|
|
2331
2662
|
<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}">
|
|
2332
2663
|
<auro-counter-button
|
|
2333
2664
|
aria-hidden="true"
|
|
2334
|
-
|
|
2335
|
-
tabindex="-1"
|
|
2665
|
+
tindex="-1"
|
|
2336
2666
|
part="controlMinus"
|
|
2337
2667
|
@click="${() => this.decrement()}"
|
|
2338
2668
|
?onDark="${this.onDark}"
|
|
2339
2669
|
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
2340
2670
|
>
|
|
2341
|
-
<${this.iconTag} class="controlIcon"
|
|
2671
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
2342
2672
|
</auro-counter-button>
|
|
2343
2673
|
|
|
2344
2674
|
<div class="quantityWrapper">
|
|
@@ -2347,14 +2677,13 @@ class AuroCounter extends LitElement {
|
|
|
2347
2677
|
|
|
2348
2678
|
<auro-counter-button
|
|
2349
2679
|
aria-hidden="true"
|
|
2350
|
-
|
|
2351
|
-
tabindex="-1"
|
|
2680
|
+
tindex="-1"
|
|
2352
2681
|
part="controlPlus"
|
|
2353
2682
|
@click="${() => this.increment()}"
|
|
2354
2683
|
?onDark="${this.onDark}"
|
|
2355
2684
|
?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
|
|
2356
2685
|
>
|
|
2357
|
-
<${this.iconTag} class="controlIcon"
|
|
2686
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(plusIcon)} </${this.iconTag}>
|
|
2358
2687
|
</auro-counter-button>
|
|
2359
2688
|
</div>
|
|
2360
2689
|
</div>
|
|
@@ -2362,7 +2691,7 @@ class AuroCounter extends LitElement {
|
|
|
2362
2691
|
}
|
|
2363
2692
|
}
|
|
2364
2693
|
|
|
2365
|
-
var styleCss$
|
|
2694
|
+
var styleCss$7 = css`:host{position:relative;display:block}[slot=trigger],::slotted([slot=valueText]){display:block;overflow:hidden;text-overflow:ellipsis}[auro-dropdown]{display:block}[auro-dropdown]::part(trigger){max-height:var(--ds-size-300, 1.5rem)}#slotHolder{display:none}`;
|
|
2366
2695
|
|
|
2367
2696
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2368
2697
|
// See LICENSE in the project root for license information.
|
|
@@ -4651,7 +4980,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
4651
4980
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
4652
4981
|
*/
|
|
4653
4982
|
|
|
4654
|
-
let AuroElement$1 = class AuroElement extends LitElement {
|
|
4983
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
4655
4984
|
|
|
4656
4985
|
// function to define props used within the scope of this component
|
|
4657
4986
|
static get properties() {
|
|
@@ -4719,7 +5048,7 @@ var styleCss$2$1 = css`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
4719
5048
|
*/
|
|
4720
5049
|
|
|
4721
5050
|
// build the component class
|
|
4722
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
5051
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
4723
5052
|
constructor() {
|
|
4724
5053
|
super();
|
|
4725
5054
|
this.onDark = false;
|
|
@@ -4791,9 +5120,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
4791
5120
|
}
|
|
4792
5121
|
};
|
|
4793
5122
|
|
|
4794
|
-
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)}`;
|
|
5123
|
+
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)}`;
|
|
4795
5124
|
|
|
4796
|
-
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)}`;
|
|
5125
|
+
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)}`;
|
|
4797
5126
|
|
|
4798
5127
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4799
5128
|
// See LICENSE in the project root for license information.
|
|
@@ -4951,9 +5280,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4951
5280
|
static get styles() {
|
|
4952
5281
|
return [
|
|
4953
5282
|
super.styles,
|
|
4954
|
-
css`${tokensCss$2}`,
|
|
5283
|
+
css`${tokensCss$2$1}`,
|
|
4955
5284
|
css`${styleCss$2$1}`,
|
|
4956
|
-
css`${colorCss$3}`
|
|
5285
|
+
css`${colorCss$3$1}`
|
|
4957
5286
|
];
|
|
4958
5287
|
}
|
|
4959
5288
|
|
|
@@ -4987,8 +5316,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4987
5316
|
async firstUpdated() {
|
|
4988
5317
|
await super.firstUpdated();
|
|
4989
5318
|
|
|
4990
|
-
|
|
4991
|
-
|
|
5319
|
+
/**
|
|
5320
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
5321
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
5322
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
5323
|
+
*/
|
|
5324
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
4992
5325
|
const svgDesc = this.svg.querySelector('desc');
|
|
4993
5326
|
|
|
4994
5327
|
if (svgDesc) {
|
|
@@ -5038,7 +5371,7 @@ var styleCss$1$1 = css`:host{position:fixed;z-index:var(--depth-tooltip, 400);di
|
|
|
5038
5371
|
|
|
5039
5372
|
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)}`;
|
|
5040
5373
|
|
|
5041
|
-
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: 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)}`;
|
|
5374
|
+
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)}`;
|
|
5042
5375
|
|
|
5043
5376
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5044
5377
|
// See LICENSE in the project root for license information.
|
|
@@ -5078,7 +5411,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
5078
5411
|
return [
|
|
5079
5412
|
styleCss$1$1,
|
|
5080
5413
|
colorCss$2$1,
|
|
5081
|
-
tokensCss$1
|
|
5414
|
+
tokensCss$1$1
|
|
5082
5415
|
];
|
|
5083
5416
|
}
|
|
5084
5417
|
|
|
@@ -5245,9 +5578,9 @@ var styleEmphasizedCss = css`:host{display:block}.layout-emphasized .chevron,.la
|
|
|
5245
5578
|
|
|
5246
5579
|
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)}`;
|
|
5247
5580
|
|
|
5248
|
-
var colorCss$
|
|
5581
|
+
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)}`;
|
|
5249
5582
|
|
|
5250
|
-
var styleCss$
|
|
5583
|
+
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}`;
|
|
5251
5584
|
|
|
5252
5585
|
var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5253
5586
|
|
|
@@ -5258,7 +5591,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
5258
5591
|
|
|
5259
5592
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5260
5593
|
|
|
5261
|
-
let AuroLibraryRuntimeUtils$
|
|
5594
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
5262
5595
|
|
|
5263
5596
|
/* eslint-disable jsdoc/require-param */
|
|
5264
5597
|
|
|
@@ -5339,13 +5672,13 @@ class AuroHelpText extends LitElement {
|
|
|
5339
5672
|
this.onDark = false;
|
|
5340
5673
|
this.hasTextContent = false;
|
|
5341
5674
|
|
|
5342
|
-
AuroLibraryRuntimeUtils$
|
|
5675
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
5343
5676
|
}
|
|
5344
5677
|
|
|
5345
5678
|
static get styles() {
|
|
5346
5679
|
return [
|
|
5347
|
-
colorCss$
|
|
5348
|
-
styleCss$
|
|
5680
|
+
colorCss$5,
|
|
5681
|
+
styleCss$6,
|
|
5349
5682
|
tokensCss$3
|
|
5350
5683
|
];
|
|
5351
5684
|
}
|
|
@@ -5395,7 +5728,7 @@ class AuroHelpText extends LitElement {
|
|
|
5395
5728
|
*
|
|
5396
5729
|
*/
|
|
5397
5730
|
static register(name = "auro-helptext") {
|
|
5398
|
-
AuroLibraryRuntimeUtils$
|
|
5731
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
5399
5732
|
}
|
|
5400
5733
|
|
|
5401
5734
|
updated() {
|
|
@@ -5970,7 +6303,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5970
6303
|
static get styles() {
|
|
5971
6304
|
return [
|
|
5972
6305
|
colorCss$1$1,
|
|
5973
|
-
tokensCss$1,
|
|
6306
|
+
tokensCss$1$1,
|
|
5974
6307
|
|
|
5975
6308
|
// default layout
|
|
5976
6309
|
classicColorCss,
|
|
@@ -6395,202 +6728,1199 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6395
6728
|
`;
|
|
6396
6729
|
}
|
|
6397
6730
|
|
|
6398
|
-
/**
|
|
6399
|
-
* Returns HTML for the classic layout. Does not support type="*".
|
|
6400
|
-
* @private
|
|
6401
|
-
* @returns {html} - Returns HTML for the classic layout.
|
|
6402
|
-
*/
|
|
6403
|
-
renderLayoutClassic() {
|
|
6404
|
-
// TODO: check with Doug why this was never used?
|
|
6405
|
-
const helpTextClasses = {
|
|
6406
|
-
'helpText': true
|
|
6407
|
-
};
|
|
6731
|
+
/**
|
|
6732
|
+
* Returns HTML for the classic layout. Does not support type="*".
|
|
6733
|
+
* @private
|
|
6734
|
+
* @returns {html} - Returns HTML for the classic layout.
|
|
6735
|
+
*/
|
|
6736
|
+
renderLayoutClassic() {
|
|
6737
|
+
// TODO: check with Doug why this was never used?
|
|
6738
|
+
const helpTextClasses = {
|
|
6739
|
+
'helpText': true
|
|
6740
|
+
};
|
|
6741
|
+
|
|
6742
|
+
return html$1`
|
|
6743
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6744
|
+
`;
|
|
6745
|
+
}
|
|
6746
|
+
|
|
6747
|
+
/**
|
|
6748
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
6749
|
+
* @private
|
|
6750
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
6751
|
+
*/
|
|
6752
|
+
renderLayoutSnowflake() {
|
|
6753
|
+
const helpTextClasses = {
|
|
6754
|
+
'helpText': true,
|
|
6755
|
+
'leftIndent': true,
|
|
6756
|
+
'rightIndent': true
|
|
6757
|
+
};
|
|
6758
|
+
|
|
6759
|
+
return html$1`
|
|
6760
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6761
|
+
`;
|
|
6762
|
+
}
|
|
6763
|
+
|
|
6764
|
+
/**
|
|
6765
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
6766
|
+
* @private
|
|
6767
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
6768
|
+
*/
|
|
6769
|
+
renderLayoutEmphasized() {
|
|
6770
|
+
const helpTextClasses = {
|
|
6771
|
+
'helpText': true,
|
|
6772
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
6773
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
6774
|
+
};
|
|
6775
|
+
|
|
6776
|
+
return html$1`
|
|
6777
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6778
|
+
`;
|
|
6779
|
+
}
|
|
6780
|
+
|
|
6781
|
+
/**
|
|
6782
|
+
* Logic to determine the layout of the component.
|
|
6783
|
+
* @private
|
|
6784
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
6785
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
6786
|
+
*/
|
|
6787
|
+
renderLayout(ForcedLayout) {
|
|
6788
|
+
const layout = ForcedLayout || this.layout;
|
|
6789
|
+
|
|
6790
|
+
switch (layout) {
|
|
6791
|
+
case 'emphasized':
|
|
6792
|
+
return this.renderLayoutEmphasized();
|
|
6793
|
+
case 'emphasized-left':
|
|
6794
|
+
return this.renderLayoutEmphasized();
|
|
6795
|
+
case 'emphasized-right':
|
|
6796
|
+
return this.renderLayoutEmphasized();
|
|
6797
|
+
case 'snowflake':
|
|
6798
|
+
return this.renderLayoutSnowflake();
|
|
6799
|
+
case 'snowflake-left':
|
|
6800
|
+
return this.renderLayoutSnowflake();
|
|
6801
|
+
case 'snowflake-right':
|
|
6802
|
+
return this.renderLayoutSnowflake();
|
|
6803
|
+
default:
|
|
6804
|
+
return this.renderLayoutClassic();
|
|
6805
|
+
}
|
|
6806
|
+
}
|
|
6807
|
+
}
|
|
6808
|
+
|
|
6809
|
+
var dropdownVersion = '3.0.0';
|
|
6810
|
+
|
|
6811
|
+
var colorCss$3 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
6812
|
+
|
|
6813
|
+
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)}`;
|
|
6814
|
+
|
|
6815
|
+
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)}`;
|
|
6816
|
+
|
|
6817
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6818
|
+
// See LICENSE in the project root for license information.
|
|
6819
|
+
|
|
6820
|
+
// ---------------------------------------------------------------------
|
|
6821
|
+
|
|
6822
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6823
|
+
|
|
6824
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
6825
|
+
|
|
6826
|
+
/* eslint-disable jsdoc/require-param */
|
|
6827
|
+
|
|
6828
|
+
/**
|
|
6829
|
+
* This will register a new custom element with the browser.
|
|
6830
|
+
* @param {String} name - The name of the custom element.
|
|
6831
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6832
|
+
* @returns {void}
|
|
6833
|
+
*/
|
|
6834
|
+
registerComponent(name, componentClass) {
|
|
6835
|
+
if (!customElements.get(name)) {
|
|
6836
|
+
customElements.define(name, class extends componentClass {});
|
|
6837
|
+
}
|
|
6838
|
+
}
|
|
6839
|
+
|
|
6840
|
+
/**
|
|
6841
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6842
|
+
* @returns {void}
|
|
6843
|
+
*/
|
|
6844
|
+
closestElement(
|
|
6845
|
+
selector, // selector like in .closest()
|
|
6846
|
+
base = this, // extra functionality to skip a parent
|
|
6847
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6848
|
+
!el || el === document || el === window
|
|
6849
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6850
|
+
: found
|
|
6851
|
+
? found // found a selector INside this element
|
|
6852
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6853
|
+
) {
|
|
6854
|
+
return __Closest(base);
|
|
6855
|
+
}
|
|
6856
|
+
/* eslint-enable jsdoc/require-param */
|
|
6857
|
+
|
|
6858
|
+
/**
|
|
6859
|
+
* 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.
|
|
6860
|
+
* @param {Object} elem - The element to check.
|
|
6861
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6862
|
+
* @returns {void}
|
|
6863
|
+
*/
|
|
6864
|
+
handleComponentTagRename(elem, tagName) {
|
|
6865
|
+
const tag = tagName.toLowerCase();
|
|
6866
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6867
|
+
|
|
6868
|
+
if (elemTag !== tag) {
|
|
6869
|
+
elem.setAttribute(tag, true);
|
|
6870
|
+
}
|
|
6871
|
+
}
|
|
6872
|
+
|
|
6873
|
+
/**
|
|
6874
|
+
* Validates if an element is a specific Auro component.
|
|
6875
|
+
* @param {Object} elem - The element to validate.
|
|
6876
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6877
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6878
|
+
*/
|
|
6879
|
+
elementMatch(elem, tagName) {
|
|
6880
|
+
const tag = tagName.toLowerCase();
|
|
6881
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6882
|
+
|
|
6883
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6884
|
+
}
|
|
6885
|
+
};
|
|
6886
|
+
|
|
6887
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6888
|
+
// See LICENSE in the project root for license information.
|
|
6889
|
+
|
|
6890
|
+
|
|
6891
|
+
class AuroDependencyVersioning {
|
|
6892
|
+
|
|
6893
|
+
/**
|
|
6894
|
+
* Generates a unique string to be used for child auro element naming.
|
|
6895
|
+
* @private
|
|
6896
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
6897
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
6898
|
+
* @returns {string} - Unique string to be used for naming.
|
|
6899
|
+
*/
|
|
6900
|
+
generateElementName(baseName, version) {
|
|
6901
|
+
let result = baseName;
|
|
6902
|
+
|
|
6903
|
+
result += '-';
|
|
6904
|
+
result += version.replace(/[.]/g, '_');
|
|
6905
|
+
|
|
6906
|
+
return result;
|
|
6907
|
+
}
|
|
6908
|
+
|
|
6909
|
+
/**
|
|
6910
|
+
* Generates a unique string to be used for child auro element naming.
|
|
6911
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
6912
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
6913
|
+
* @returns {string} - Unique string to be used for naming.
|
|
6914
|
+
*/
|
|
6915
|
+
generateTag(baseName, version, tagClass) {
|
|
6916
|
+
const elementName = this.generateElementName(baseName, version);
|
|
6917
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
6918
|
+
|
|
6919
|
+
if (!customElements.get(elementName)) {
|
|
6920
|
+
customElements.define(elementName, class extends tagClass {});
|
|
6921
|
+
}
|
|
6922
|
+
|
|
6923
|
+
return tag;
|
|
6924
|
+
}
|
|
6925
|
+
}
|
|
6926
|
+
|
|
6927
|
+
/**
|
|
6928
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6929
|
+
*/
|
|
6930
|
+
const _observers = new WeakMap();
|
|
6931
|
+
|
|
6932
|
+
/**
|
|
6933
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6934
|
+
* Structure: {
|
|
6935
|
+
* host: {
|
|
6936
|
+
* matchers: Set<Function>,
|
|
6937
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6938
|
+
* }
|
|
6939
|
+
* }
|
|
6940
|
+
*/
|
|
6941
|
+
const _transportConfig = new WeakMap();
|
|
6942
|
+
|
|
6943
|
+
/**
|
|
6944
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6945
|
+
*
|
|
6946
|
+
* @param {Object} params - The parameters for the function.
|
|
6947
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6948
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6949
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6950
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6951
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6952
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
6953
|
+
*/
|
|
6954
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
6955
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
6956
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
6957
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
6958
|
+
}
|
|
6959
|
+
|
|
6960
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
6961
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
6962
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
6963
|
+
}
|
|
6964
|
+
|
|
6965
|
+
// Guard Clause: Ensure match is a function
|
|
6966
|
+
if (typeof match !== 'function') {
|
|
6967
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
6971
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
6972
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
6973
|
+
}
|
|
6974
|
+
|
|
6975
|
+
// Register this transport and get cleanup function
|
|
6976
|
+
return _registerTransport({
|
|
6977
|
+
host,
|
|
6978
|
+
target,
|
|
6979
|
+
matcher: match,
|
|
6980
|
+
removeOriginal
|
|
6981
|
+
});
|
|
6982
|
+
};
|
|
6983
|
+
|
|
6984
|
+
/**
|
|
6985
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
6986
|
+
*
|
|
6987
|
+
* @param {Object} params - The parameters object.
|
|
6988
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
6989
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
6990
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
6991
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
6992
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
6993
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
6994
|
+
* @private
|
|
6995
|
+
*/
|
|
6996
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
6997
|
+
// Initialize config for this host if it doesn't exist
|
|
6998
|
+
if (!_transportConfig.has(host)) {
|
|
6999
|
+
_transportConfig.set(host, {
|
|
7000
|
+
matchers: new Set(),
|
|
7001
|
+
targets: new Map()
|
|
7002
|
+
});
|
|
7003
|
+
}
|
|
7004
|
+
|
|
7005
|
+
const config = _transportConfig.get(host);
|
|
7006
|
+
|
|
7007
|
+
// Add the matcher to the set of matchers for this host
|
|
7008
|
+
config.matchers.add(matcher);
|
|
7009
|
+
|
|
7010
|
+
// Initialize target entry if it doesn't exist
|
|
7011
|
+
if (!config.targets.has(target)) {
|
|
7012
|
+
config.targets.set(target, new Map());
|
|
7013
|
+
}
|
|
7014
|
+
|
|
7015
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
7016
|
+
config.targets.get(target).set(matcher, {
|
|
7017
|
+
removeOriginal,
|
|
7018
|
+
currentAttributes: new Map()
|
|
7019
|
+
});
|
|
7020
|
+
|
|
7021
|
+
// Perform initial attribute transport
|
|
7022
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
7023
|
+
|
|
7024
|
+
// Attach observer
|
|
7025
|
+
_attachObserver(host);
|
|
7026
|
+
|
|
7027
|
+
// Return cleanup function and utility functions
|
|
7028
|
+
return {
|
|
7029
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
7030
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
7031
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
7032
|
+
}
|
|
7033
|
+
};
|
|
7034
|
+
|
|
7035
|
+
/**
|
|
7036
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
7037
|
+
*
|
|
7038
|
+
* @param {HTMLElement} host - The host element
|
|
7039
|
+
* @param {HTMLElement} target - The target element
|
|
7040
|
+
* @param {Function} matcher - The matcher function
|
|
7041
|
+
* @private
|
|
7042
|
+
*/
|
|
7043
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
7044
|
+
const config = _transportConfig.get(host);
|
|
7045
|
+
if (!config) return;
|
|
7046
|
+
|
|
7047
|
+
// Remove this matcher from this target
|
|
7048
|
+
const targetMatchers = config.targets.get(target);
|
|
7049
|
+
if (targetMatchers) {
|
|
7050
|
+
targetMatchers.delete(matcher);
|
|
7051
|
+
|
|
7052
|
+
// If this target has no more matchers, remove it
|
|
7053
|
+
if (targetMatchers.size === 0) {
|
|
7054
|
+
config.targets.delete(target);
|
|
7055
|
+
}
|
|
7056
|
+
}
|
|
7057
|
+
|
|
7058
|
+
// Check if this matcher is still used by any target
|
|
7059
|
+
let matcherStillUsed = false;
|
|
7060
|
+
for (const matcherMap of config.targets.values()) {
|
|
7061
|
+
if (matcherMap.has(matcher)) {
|
|
7062
|
+
matcherStillUsed = true;
|
|
7063
|
+
break;
|
|
7064
|
+
}
|
|
7065
|
+
}
|
|
7066
|
+
|
|
7067
|
+
// If not used anymore, remove from matchers set
|
|
7068
|
+
if (!matcherStillUsed) {
|
|
7069
|
+
config.matchers.delete(matcher);
|
|
7070
|
+
}
|
|
7071
|
+
|
|
7072
|
+
// If no more targets or matchers, detach observer
|
|
7073
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
7074
|
+
_detachObserver(host);
|
|
7075
|
+
}
|
|
7076
|
+
};
|
|
7077
|
+
|
|
7078
|
+
/**
|
|
7079
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
7080
|
+
*
|
|
7081
|
+
* @param {Object} params - The parameters object.
|
|
7082
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
7083
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
7084
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
7085
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
7086
|
+
* @returns {void}
|
|
7087
|
+
* @private
|
|
7088
|
+
*/
|
|
7089
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
7090
|
+
// Get a list of all matching attributes on the host element and their values
|
|
7091
|
+
const matchingAttributes = host.getAttributeNames()
|
|
7092
|
+
.filter(attr => matcher(attr))
|
|
7093
|
+
.reduce((acc, attr) => {
|
|
7094
|
+
acc[attr] = host.getAttribute(attr);
|
|
7095
|
+
return acc;
|
|
7096
|
+
}, {});
|
|
7097
|
+
|
|
7098
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
7099
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
7100
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
7101
|
+
target.setAttribute(key, value);
|
|
7102
|
+
if (removeOriginal) {
|
|
7103
|
+
host.removeAttribute(key);
|
|
7104
|
+
}
|
|
7105
|
+
});
|
|
7106
|
+
};
|
|
7107
|
+
|
|
7108
|
+
/**
|
|
7109
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
7110
|
+
*
|
|
7111
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
7112
|
+
* @returns {MutationObserver} The observer instance.
|
|
7113
|
+
* @private
|
|
7114
|
+
*/
|
|
7115
|
+
const _attachObserver = (host) => {
|
|
7116
|
+
// If an observer for this host already exists, return it
|
|
7117
|
+
if (_observers.has(host)) {
|
|
7118
|
+
return _observers.get(host);
|
|
7119
|
+
}
|
|
7120
|
+
|
|
7121
|
+
// Create a new MutationObserver
|
|
7122
|
+
const observer = new MutationObserver((mutations) => {
|
|
7123
|
+
const config = _transportConfig.get(host);
|
|
7124
|
+
if (!config) return;
|
|
7125
|
+
|
|
7126
|
+
// For each mutation affecting attributes
|
|
7127
|
+
mutations
|
|
7128
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
7129
|
+
.forEach(mutation => {
|
|
7130
|
+
const attributeName = mutation.attributeName;
|
|
7131
|
+
|
|
7132
|
+
// Find matchers that care about this attribute
|
|
7133
|
+
for (const matcher of config.matchers) {
|
|
7134
|
+
if (matcher(attributeName)) {
|
|
7135
|
+
// For each target that uses this matcher
|
|
7136
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
7137
|
+
if (matcherConfigs.has(matcher)) {
|
|
7138
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
7139
|
+
_transportAttributes({
|
|
7140
|
+
host,
|
|
7141
|
+
target,
|
|
7142
|
+
matcher,
|
|
7143
|
+
removeOriginal
|
|
7144
|
+
});
|
|
7145
|
+
}
|
|
7146
|
+
}
|
|
7147
|
+
}
|
|
7148
|
+
}
|
|
7149
|
+
});
|
|
7150
|
+
});
|
|
7151
|
+
|
|
7152
|
+
// Start observing attribute changes
|
|
7153
|
+
observer.observe(host, { attributes: true });
|
|
7154
|
+
|
|
7155
|
+
// Store the observer
|
|
7156
|
+
_observers.set(host, observer);
|
|
7157
|
+
|
|
7158
|
+
return observer;
|
|
7159
|
+
};
|
|
7160
|
+
|
|
7161
|
+
/**
|
|
7162
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
7163
|
+
*
|
|
7164
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
7165
|
+
* @private
|
|
7166
|
+
*/
|
|
7167
|
+
const _detachObserver = (host) => {
|
|
7168
|
+
if (_observers.has(host)) {
|
|
7169
|
+
const observer = _observers.get(host);
|
|
7170
|
+
observer.disconnect();
|
|
7171
|
+
_observers.delete(host);
|
|
7172
|
+
}
|
|
7173
|
+
|
|
7174
|
+
// Clean up the transport config as well
|
|
7175
|
+
if (_transportConfig.has(host)) {
|
|
7176
|
+
_transportConfig.delete(host);
|
|
7177
|
+
}
|
|
7178
|
+
};
|
|
7179
|
+
|
|
7180
|
+
/**
|
|
7181
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
7182
|
+
* @param {HTMLElement} host - The host element
|
|
7183
|
+
* @param {HTMLElement} target - The target element
|
|
7184
|
+
* @param {Function} matcher - The matcher function
|
|
7185
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
7186
|
+
* @private
|
|
7187
|
+
*/
|
|
7188
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
7189
|
+
const config = _transportConfig.get(host);
|
|
7190
|
+
if (!config) return undefined;
|
|
7191
|
+
|
|
7192
|
+
const targetMatchers = config.targets.get(target);
|
|
7193
|
+
if (!targetMatchers) return undefined;
|
|
7194
|
+
|
|
7195
|
+
return targetMatchers.get(matcher);
|
|
7196
|
+
};
|
|
7197
|
+
|
|
7198
|
+
/**
|
|
7199
|
+
* Sets an observed attribute value
|
|
7200
|
+
* @param {HTMLElement} host - The host element
|
|
7201
|
+
* @param {HTMLElement} target - The target element
|
|
7202
|
+
* @param {Function} matcher - The matcher function
|
|
7203
|
+
* @param {string} key - The attribute name
|
|
7204
|
+
* @param {string} value - The attribute value
|
|
7205
|
+
* @private
|
|
7206
|
+
*/
|
|
7207
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
7208
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7209
|
+
if (matcherConfig) {
|
|
7210
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
7211
|
+
}
|
|
7212
|
+
};
|
|
7213
|
+
|
|
7214
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
7215
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7216
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
7217
|
+
return undefined;
|
|
7218
|
+
};
|
|
7219
|
+
|
|
7220
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
7221
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7222
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
7223
|
+
return [];
|
|
7224
|
+
};
|
|
7225
|
+
|
|
7226
|
+
const _matchers = {
|
|
7227
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
7228
|
+
'role': attr => attr.match(/^role$/)
|
|
7229
|
+
};
|
|
7230
|
+
|
|
7231
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
7232
|
+
return transportAttributes({
|
|
7233
|
+
host,
|
|
7234
|
+
target,
|
|
7235
|
+
match: attr => {
|
|
7236
|
+
for (const key in _matchers) {
|
|
7237
|
+
if (_matchers[key](attr)) return true;
|
|
7238
|
+
}
|
|
7239
|
+
return false;
|
|
7240
|
+
},
|
|
7241
|
+
removeOriginal
|
|
7242
|
+
});
|
|
7243
|
+
};
|
|
7244
|
+
|
|
7245
|
+
let AuroElement$1 = class AuroElement extends LitElement {
|
|
7246
|
+
|
|
7247
|
+
/**
|
|
7248
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
7249
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
7250
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
7251
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
7252
|
+
* @private
|
|
7253
|
+
*/
|
|
7254
|
+
attributeWatcher;
|
|
7255
|
+
|
|
7256
|
+
static get properties() {
|
|
7257
|
+
return {
|
|
7258
|
+
|
|
7259
|
+
/**
|
|
7260
|
+
* Defines the layout of an element.
|
|
7261
|
+
* @default {'default'}
|
|
7262
|
+
*/
|
|
7263
|
+
layout: {
|
|
7264
|
+
type: String,
|
|
7265
|
+
attribute: "layout",
|
|
7266
|
+
reflect: true
|
|
7267
|
+
},
|
|
7268
|
+
|
|
7269
|
+
/**
|
|
7270
|
+
* Defines the shape of an element.
|
|
7271
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
7272
|
+
* @default {'default'}
|
|
7273
|
+
*/
|
|
7274
|
+
shape: {
|
|
7275
|
+
type: String,
|
|
7276
|
+
attribute: "shape",
|
|
7277
|
+
reflect: true
|
|
7278
|
+
},
|
|
7279
|
+
|
|
7280
|
+
/**
|
|
7281
|
+
* Defines the size of an element.
|
|
7282
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
7283
|
+
* @default {'md'}
|
|
7284
|
+
*/
|
|
7285
|
+
size: {
|
|
7286
|
+
type: String,
|
|
7287
|
+
attribute: "size",
|
|
7288
|
+
reflect: true
|
|
7289
|
+
},
|
|
7290
|
+
|
|
7291
|
+
/**
|
|
7292
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
7293
|
+
* @default {false}
|
|
7294
|
+
*/
|
|
7295
|
+
onDark: {
|
|
7296
|
+
type: Boolean,
|
|
7297
|
+
attribute: "ondark",
|
|
7298
|
+
reflect: true
|
|
7299
|
+
},
|
|
7300
|
+
|
|
7301
|
+
/**
|
|
7302
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
7303
|
+
* This is used to apply layout and shape classes dynamically.
|
|
7304
|
+
* @type {HTMLElement|null}
|
|
7305
|
+
* @default {null}
|
|
7306
|
+
* @private
|
|
7307
|
+
*/
|
|
7308
|
+
wrapper: {
|
|
7309
|
+
type: HTMLElement,
|
|
7310
|
+
attribute: false,
|
|
7311
|
+
reflect: false
|
|
7312
|
+
}
|
|
7313
|
+
};
|
|
7314
|
+
}
|
|
7315
|
+
|
|
7316
|
+
|
|
7317
|
+
|
|
7318
|
+
resetShapeClasses() {
|
|
7319
|
+
if (this.shape && this.size) {
|
|
7320
|
+
|
|
7321
|
+
if (this.wrapper) {
|
|
7322
|
+
this.wrapper.classList.forEach((className) => {
|
|
7323
|
+
if (className.startsWith('shape-')) {
|
|
7324
|
+
this.wrapper.classList.remove(className);
|
|
7325
|
+
}
|
|
7326
|
+
});
|
|
7327
|
+
|
|
7328
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
7329
|
+
}
|
|
7330
|
+
}
|
|
7331
|
+
}
|
|
7332
|
+
|
|
7333
|
+
resetLayoutClasses() {
|
|
7334
|
+
if (this.layout) {
|
|
7335
|
+
if (this.wrapper) {
|
|
7336
|
+
this.wrapper.classList.forEach((className) => {
|
|
7337
|
+
if (className.startsWith('layout-')) {
|
|
7338
|
+
this.wrapper.classList.remove(className);
|
|
7339
|
+
}
|
|
7340
|
+
});
|
|
7341
|
+
|
|
7342
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
7343
|
+
}
|
|
7344
|
+
}
|
|
7345
|
+
}
|
|
7346
|
+
|
|
7347
|
+
updateComponentArchitecture() {
|
|
7348
|
+
this.resetLayoutClasses();
|
|
7349
|
+
this.resetShapeClasses();
|
|
7350
|
+
}
|
|
7351
|
+
|
|
7352
|
+
updated(changedProperties) {
|
|
7353
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
7354
|
+
this.updateComponentArchitecture();
|
|
7355
|
+
}
|
|
7356
|
+
}
|
|
7357
|
+
|
|
7358
|
+
firstUpdated() {
|
|
7359
|
+
super.firstUpdated();
|
|
7360
|
+
|
|
7361
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
7362
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
7363
|
+
|
|
7364
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
7365
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
7366
|
+
}
|
|
7367
|
+
|
|
7368
|
+
disconnectedCallback() {
|
|
7369
|
+
super.disconnectedCallback();
|
|
7370
|
+
|
|
7371
|
+
// Cleanup the ARIA observer if it exists
|
|
7372
|
+
if (this.attributeWatcher) {
|
|
7373
|
+
this.attributeWatcher.cleanup();
|
|
7374
|
+
this.attributeWatcher = null;
|
|
7375
|
+
}
|
|
7376
|
+
}
|
|
7377
|
+
|
|
7378
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
7379
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
7380
|
+
render() {
|
|
7381
|
+
try {
|
|
7382
|
+
return this.renderLayout();
|
|
7383
|
+
} catch (error) {
|
|
7384
|
+
// failed to get the defined layout
|
|
7385
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
7386
|
+
|
|
7387
|
+
// fallback to the default layout
|
|
7388
|
+
return this.getLayout('default');
|
|
7389
|
+
}
|
|
7390
|
+
}
|
|
7391
|
+
};
|
|
7392
|
+
|
|
7393
|
+
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--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}`;
|
|
7394
|
+
|
|
7395
|
+
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)}`;
|
|
7396
|
+
|
|
7397
|
+
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}`;
|
|
7398
|
+
|
|
7399
|
+
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}`;
|
|
7400
|
+
|
|
7401
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7402
|
+
// See LICENSE in the project root for license information.
|
|
7403
|
+
|
|
7404
|
+
// ---------------------------------------------------------------------
|
|
7405
|
+
|
|
7406
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7407
|
+
|
|
7408
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
7409
|
+
|
|
7410
|
+
/* eslint-disable jsdoc/require-param */
|
|
7411
|
+
|
|
7412
|
+
/**
|
|
7413
|
+
* This will register a new custom element with the browser.
|
|
7414
|
+
* @param {String} name - The name of the custom element.
|
|
7415
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7416
|
+
* @returns {void}
|
|
7417
|
+
*/
|
|
7418
|
+
registerComponent(name, componentClass) {
|
|
7419
|
+
if (!customElements.get(name)) {
|
|
7420
|
+
customElements.define(name, class extends componentClass {});
|
|
7421
|
+
}
|
|
7422
|
+
}
|
|
7423
|
+
|
|
7424
|
+
/**
|
|
7425
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7426
|
+
* @returns {void}
|
|
7427
|
+
*/
|
|
7428
|
+
closestElement(
|
|
7429
|
+
selector, // selector like in .closest()
|
|
7430
|
+
base = this, // extra functionality to skip a parent
|
|
7431
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7432
|
+
!el || el === document || el === window
|
|
7433
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7434
|
+
: found
|
|
7435
|
+
? found // found a selector INside this element
|
|
7436
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7437
|
+
) {
|
|
7438
|
+
return __Closest(base);
|
|
7439
|
+
}
|
|
7440
|
+
/* eslint-enable jsdoc/require-param */
|
|
7441
|
+
|
|
7442
|
+
/**
|
|
7443
|
+
* 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.
|
|
7444
|
+
* @param {Object} elem - The element to check.
|
|
7445
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7446
|
+
* @returns {void}
|
|
7447
|
+
*/
|
|
7448
|
+
handleComponentTagRename(elem, tagName) {
|
|
7449
|
+
const tag = tagName.toLowerCase();
|
|
7450
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7451
|
+
|
|
7452
|
+
if (elemTag !== tag) {
|
|
7453
|
+
elem.setAttribute(tag, true);
|
|
7454
|
+
}
|
|
7455
|
+
}
|
|
7456
|
+
|
|
7457
|
+
/**
|
|
7458
|
+
* Validates if an element is a specific Auro component.
|
|
7459
|
+
* @param {Object} elem - The element to validate.
|
|
7460
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7461
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7462
|
+
*/
|
|
7463
|
+
elementMatch(elem, tagName) {
|
|
7464
|
+
const tag = tagName.toLowerCase();
|
|
7465
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7466
|
+
|
|
7467
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7468
|
+
}
|
|
7469
|
+
};
|
|
7470
|
+
|
|
7471
|
+
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}}`;
|
|
7472
|
+
|
|
7473
|
+
var colorCss$1 = css`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
7474
|
+
|
|
7475
|
+
var tokensCss$1 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
7476
|
+
|
|
7477
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7478
|
+
// See LICENSE in the project root for license information.
|
|
7479
|
+
|
|
7480
|
+
|
|
7481
|
+
class AuroLoader extends LitElement {
|
|
7482
|
+
constructor() {
|
|
7483
|
+
super();
|
|
7484
|
+
|
|
7485
|
+
/**
|
|
7486
|
+
* @private
|
|
7487
|
+
*/
|
|
7488
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
7489
|
+
|
|
7490
|
+
/**
|
|
7491
|
+
* @private
|
|
7492
|
+
*/
|
|
7493
|
+
this.mdCount = 3;
|
|
7494
|
+
|
|
7495
|
+
/**
|
|
7496
|
+
* @private
|
|
7497
|
+
*/
|
|
7498
|
+
this.smCount = 2;
|
|
7499
|
+
|
|
7500
|
+
/**
|
|
7501
|
+
* @private
|
|
7502
|
+
*/
|
|
7503
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
7504
|
+
|
|
7505
|
+
this.orbit = false;
|
|
7506
|
+
this.ringworm = false;
|
|
7507
|
+
this.laser = false;
|
|
7508
|
+
this.pulse = false;
|
|
7509
|
+
}
|
|
7510
|
+
|
|
7511
|
+
// function to define props used within the scope of this component
|
|
7512
|
+
static get properties() {
|
|
7513
|
+
return {
|
|
7514
|
+
|
|
7515
|
+
/**
|
|
7516
|
+
* Sets loader to laser type.
|
|
7517
|
+
*/
|
|
7518
|
+
laser: {
|
|
7519
|
+
type: Boolean,
|
|
7520
|
+
reflect: true
|
|
7521
|
+
},
|
|
7522
|
+
|
|
7523
|
+
/**
|
|
7524
|
+
* Sets loader to orbit type.
|
|
7525
|
+
*/
|
|
7526
|
+
orbit: {
|
|
7527
|
+
type: Boolean,
|
|
7528
|
+
reflect: true
|
|
7529
|
+
},
|
|
7530
|
+
|
|
7531
|
+
/**
|
|
7532
|
+
* Sets loader to pulse type.
|
|
7533
|
+
*/
|
|
7534
|
+
pulse: {
|
|
7535
|
+
type: Boolean,
|
|
7536
|
+
reflect: true
|
|
7537
|
+
},
|
|
7538
|
+
|
|
7539
|
+
/**
|
|
7540
|
+
* Sets loader to ringworm type.
|
|
7541
|
+
*/
|
|
7542
|
+
ringworm: {
|
|
7543
|
+
type: Boolean,
|
|
7544
|
+
reflect: true
|
|
7545
|
+
}
|
|
7546
|
+
};
|
|
7547
|
+
}
|
|
7548
|
+
|
|
7549
|
+
static get styles() {
|
|
7550
|
+
return [
|
|
7551
|
+
css`${styleCss$2}`,
|
|
7552
|
+
css`${colorCss$1}`,
|
|
7553
|
+
css`${tokensCss$1}`
|
|
7554
|
+
];
|
|
7555
|
+
}
|
|
7556
|
+
|
|
7557
|
+
/**
|
|
7558
|
+
* This will register this element with the browser.
|
|
7559
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
7560
|
+
*
|
|
7561
|
+
* @example
|
|
7562
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
7563
|
+
*
|
|
7564
|
+
*/
|
|
7565
|
+
static register(name = "auro-loader") {
|
|
7566
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
7567
|
+
}
|
|
7568
|
+
|
|
7569
|
+
firstUpdated() {
|
|
7570
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
7571
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
7572
|
+
}
|
|
7573
|
+
|
|
7574
|
+
connectedCallback() {
|
|
7575
|
+
super.connectedCallback();
|
|
7576
|
+
}
|
|
7577
|
+
|
|
7578
|
+
/**
|
|
7579
|
+
* @private
|
|
7580
|
+
* @returns {Array} Numbered array for template map.
|
|
7581
|
+
*/
|
|
7582
|
+
defineTemplate() {
|
|
7583
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
7584
|
+
|
|
7585
|
+
if (this.orbit || this.laser) {
|
|
7586
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
7587
|
+
} else if (this.ringworm) {
|
|
7588
|
+
nodes = Array.from(Array(0).keys());
|
|
7589
|
+
}
|
|
7590
|
+
|
|
7591
|
+
return nodes;
|
|
7592
|
+
}
|
|
7593
|
+
|
|
7594
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7595
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7596
|
+
|
|
7597
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
7598
|
+
render() {
|
|
7599
|
+
return html`
|
|
7600
|
+
${this.defineTemplate().map((idx) => html`
|
|
7601
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
7602
|
+
`)}
|
|
7603
|
+
|
|
7604
|
+
<div class="no-animation">Loading...</div>
|
|
7605
|
+
|
|
7606
|
+
${this.ringworm ? html`
|
|
7607
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
7608
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
7609
|
+
</svg>`
|
|
7610
|
+
: ``
|
|
7611
|
+
}
|
|
7612
|
+
`;
|
|
7613
|
+
}
|
|
7614
|
+
}
|
|
7615
|
+
|
|
7616
|
+
var loaderVersion = '5.0.0';
|
|
7617
|
+
|
|
7618
|
+
/* eslint-disable max-lines, curly */
|
|
7619
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7620
|
+
// See LICENSE in the project root for license information.
|
|
7621
|
+
|
|
7622
|
+
|
|
7623
|
+
/**
|
|
7624
|
+
* @slot - Default slot for the text of the button.
|
|
7625
|
+
* @slot icon - Slot to provide auro-icon for the button.
|
|
7626
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
7627
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
7628
|
+
* @csspart text - Apply CSS to text slot.
|
|
7629
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
7630
|
+
*/
|
|
7631
|
+
|
|
7632
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
7633
|
+
|
|
7634
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7635
|
+
|
|
7636
|
+
/**
|
|
7637
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7638
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7639
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7640
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7641
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7642
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7643
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7644
|
+
*/
|
|
7645
|
+
class AuroButton extends AuroElement$1 {
|
|
7646
|
+
|
|
7647
|
+
/**
|
|
7648
|
+
* Enables form association for this element.
|
|
7649
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
7650
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
7651
|
+
*/
|
|
7652
|
+
static get formAssociated() {
|
|
7653
|
+
return true;
|
|
7654
|
+
}
|
|
7655
|
+
|
|
7656
|
+
constructor() {
|
|
7657
|
+
super();
|
|
7658
|
+
this.autofocus = false;
|
|
7659
|
+
this.disabled = false;
|
|
7660
|
+
this.loading = false;
|
|
7661
|
+
this.size = "md";
|
|
7662
|
+
this.shape = "rounded";
|
|
7663
|
+
this.onDark = false;
|
|
7664
|
+
this.fluid = false;
|
|
7665
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
7666
|
+
|
|
7667
|
+
// Support for HTML5 forms
|
|
7668
|
+
if (typeof this.attachInternals === 'function') {
|
|
7669
|
+
this.internals = this.attachInternals();
|
|
7670
|
+
} else {
|
|
7671
|
+
this.internals = null;
|
|
7672
|
+
|
|
7673
|
+
// eslint-disable-next-line no-console
|
|
7674
|
+
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.');
|
|
7675
|
+
}
|
|
7676
|
+
|
|
7677
|
+
/**
|
|
7678
|
+
* Generate unique names for dependency components.
|
|
7679
|
+
*/
|
|
7680
|
+
const versioning = new AuroDependencyVersioning();
|
|
7681
|
+
|
|
7682
|
+
/**
|
|
7683
|
+
* @private
|
|
7684
|
+
*/
|
|
7685
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7686
|
+
}
|
|
7687
|
+
|
|
7688
|
+
static get styles() {
|
|
7689
|
+
return [
|
|
7690
|
+
tokensCss$2,
|
|
7691
|
+
styleCss$3,
|
|
7692
|
+
colorCss$2,
|
|
7693
|
+
shapeSize
|
|
7694
|
+
];
|
|
7695
|
+
}
|
|
7696
|
+
|
|
7697
|
+
static get properties() {
|
|
7698
|
+
return {
|
|
7699
|
+
|
|
7700
|
+
...super.properties,
|
|
7701
|
+
|
|
7702
|
+
/**
|
|
7703
|
+
* Override layout since it isn't used in this component.
|
|
7704
|
+
* @private
|
|
7705
|
+
*/
|
|
7706
|
+
layout: {
|
|
7707
|
+
type: Boolean,
|
|
7708
|
+
attribute: false,
|
|
7709
|
+
reflect: false
|
|
7710
|
+
},
|
|
7711
|
+
|
|
7712
|
+
/**
|
|
7713
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
7714
|
+
*/
|
|
7715
|
+
autofocus: {
|
|
7716
|
+
type: Boolean,
|
|
7717
|
+
reflect: true
|
|
7718
|
+
},
|
|
7719
|
+
|
|
7720
|
+
/**
|
|
7721
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
7722
|
+
*/
|
|
7723
|
+
disabled: {
|
|
7724
|
+
type: Boolean,
|
|
7725
|
+
reflect: true
|
|
7726
|
+
},
|
|
7727
|
+
|
|
7728
|
+
/**
|
|
7729
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
7730
|
+
*/
|
|
7731
|
+
fluid: {
|
|
7732
|
+
type: Boolean,
|
|
7733
|
+
reflect: true
|
|
7734
|
+
},
|
|
7735
|
+
|
|
7736
|
+
/**
|
|
7737
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
7738
|
+
*/
|
|
7739
|
+
loading: {
|
|
7740
|
+
type: Boolean,
|
|
7741
|
+
reflect: true
|
|
7742
|
+
},
|
|
7743
|
+
|
|
7744
|
+
/**
|
|
7745
|
+
* 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.
|
|
7746
|
+
*/
|
|
7747
|
+
loadingText: {
|
|
7748
|
+
type: String
|
|
7749
|
+
},
|
|
7750
|
+
|
|
7751
|
+
/**
|
|
7752
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
7753
|
+
*/
|
|
7754
|
+
tIndex: {
|
|
7755
|
+
type: String,
|
|
7756
|
+
reflect: true
|
|
7757
|
+
},
|
|
6408
7758
|
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
7759
|
+
/**
|
|
7760
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
7761
|
+
*/
|
|
7762
|
+
title: {
|
|
7763
|
+
type: String,
|
|
7764
|
+
reflect: true
|
|
7765
|
+
},
|
|
7766
|
+
|
|
7767
|
+
/**
|
|
7768
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
7769
|
+
*/
|
|
7770
|
+
type: {
|
|
7771
|
+
type: String,
|
|
7772
|
+
reflect: true
|
|
7773
|
+
},
|
|
7774
|
+
|
|
7775
|
+
/**
|
|
7776
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
7777
|
+
*/
|
|
7778
|
+
value: {
|
|
7779
|
+
type: String,
|
|
7780
|
+
reflect: true
|
|
7781
|
+
},
|
|
7782
|
+
|
|
7783
|
+
/**
|
|
7784
|
+
* Sets button variant option.
|
|
7785
|
+
* @default primary
|
|
7786
|
+
*/
|
|
7787
|
+
variant: {
|
|
7788
|
+
type: String,
|
|
7789
|
+
reflect: true
|
|
7790
|
+
},
|
|
7791
|
+
};
|
|
6412
7792
|
}
|
|
6413
7793
|
|
|
6414
7794
|
/**
|
|
6415
|
-
*
|
|
6416
|
-
* @
|
|
6417
|
-
*
|
|
7795
|
+
* This will register this element with the browser.
|
|
7796
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
7797
|
+
*
|
|
7798
|
+
* @example
|
|
7799
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
7800
|
+
*
|
|
6418
7801
|
*/
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
'helpText': true,
|
|
6422
|
-
'leftIndent': true,
|
|
6423
|
-
'rightIndent': true
|
|
6424
|
-
};
|
|
6425
|
-
|
|
6426
|
-
return html$1`
|
|
6427
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
6428
|
-
`;
|
|
7802
|
+
static register(name = "auro-button") {
|
|
7803
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6429
7804
|
}
|
|
6430
7805
|
|
|
6431
7806
|
/**
|
|
6432
|
-
*
|
|
7807
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6433
7808
|
* @private
|
|
6434
|
-
* @returns {
|
|
7809
|
+
* @returns {void}
|
|
6435
7810
|
*/
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
'helpText': true,
|
|
6439
|
-
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
6440
|
-
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
6441
|
-
};
|
|
6442
|
-
|
|
6443
|
-
return html$1`
|
|
6444
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
6445
|
-
`;
|
|
7811
|
+
focus() {
|
|
7812
|
+
this.renderRoot.querySelector('button').focus();
|
|
6446
7813
|
}
|
|
6447
7814
|
|
|
6448
7815
|
/**
|
|
6449
|
-
*
|
|
7816
|
+
* Submits the form that this button is associated with.
|
|
6450
7817
|
* @private
|
|
6451
|
-
* @
|
|
6452
|
-
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
7818
|
+
* @returns {void}
|
|
6453
7819
|
*/
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
switch (layout) {
|
|
6458
|
-
case 'emphasized':
|
|
6459
|
-
return this.renderLayoutEmphasized();
|
|
6460
|
-
case 'emphasized-left':
|
|
6461
|
-
return this.renderLayoutEmphasized();
|
|
6462
|
-
case 'emphasized-right':
|
|
6463
|
-
return this.renderLayoutEmphasized();
|
|
6464
|
-
case 'snowflake':
|
|
6465
|
-
return this.renderLayoutSnowflake();
|
|
6466
|
-
case 'snowflake-left':
|
|
6467
|
-
return this.renderLayoutSnowflake();
|
|
6468
|
-
case 'snowflake-right':
|
|
6469
|
-
return this.renderLayoutSnowflake();
|
|
6470
|
-
default:
|
|
6471
|
-
return this.renderLayoutClassic();
|
|
7820
|
+
surfaceSubmitEvent() {
|
|
7821
|
+
if (this.form) {
|
|
7822
|
+
this.form.requestSubmit();
|
|
6472
7823
|
}
|
|
6473
7824
|
}
|
|
6474
|
-
}
|
|
6475
|
-
|
|
6476
|
-
var dropdownVersion = '3.0.0';
|
|
6477
|
-
|
|
6478
|
-
var colorCss$1 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
6479
|
-
|
|
6480
|
-
var styleCss$2 = 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}#closeButton [auro-icon]{--ds-auro-icon-size: var(--ds-size-500, 2.5rem)}#bodyContainer{position:relative;overflow:auto;flex:1 1 100%}:host([isfullscreen]) #bibTemplate{max-height:100dvh}:host([isfullscreen]) #bodyContainer{margin-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
6481
|
-
|
|
6482
|
-
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)}`;
|
|
6483
|
-
|
|
6484
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6485
|
-
// See LICENSE in the project root for license information.
|
|
6486
|
-
|
|
6487
|
-
// ---------------------------------------------------------------------
|
|
6488
|
-
|
|
6489
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6490
|
-
|
|
6491
|
-
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6492
|
-
|
|
6493
|
-
/* eslint-disable jsdoc/require-param */
|
|
6494
7825
|
|
|
6495
7826
|
/**
|
|
6496
|
-
*
|
|
6497
|
-
* @
|
|
6498
|
-
* @
|
|
6499
|
-
* @returns {void}
|
|
7827
|
+
* Returns the form element that this button is associated with.
|
|
7828
|
+
* @private
|
|
7829
|
+
* @returns {HTMLFormElement | null}
|
|
6500
7830
|
*/
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
customElements.define(name, class extends componentClass {});
|
|
6504
|
-
}
|
|
7831
|
+
get form() {
|
|
7832
|
+
return this.internals ? this.internals.form : null;
|
|
6505
7833
|
}
|
|
6506
7834
|
|
|
6507
7835
|
/**
|
|
6508
|
-
*
|
|
6509
|
-
* @returns {
|
|
7836
|
+
* @private
|
|
7837
|
+
* @returns {Boolean}
|
|
6510
7838
|
*/
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
base = this, // extra functionality to skip a parent
|
|
6514
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6515
|
-
!el || el === document || el === window
|
|
6516
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
6517
|
-
: found
|
|
6518
|
-
? found // found a selector INside this element
|
|
6519
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6520
|
-
) {
|
|
6521
|
-
return __Closest(base);
|
|
7839
|
+
get hideText() {
|
|
7840
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6522
7841
|
}
|
|
6523
|
-
/* eslint-enable jsdoc/require-param */
|
|
6524
7842
|
|
|
6525
7843
|
/**
|
|
6526
|
-
*
|
|
6527
|
-
* @
|
|
6528
|
-
* @
|
|
6529
|
-
* @returns {void}
|
|
7844
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7845
|
+
* @returns {string | undefined}
|
|
7846
|
+
* @private
|
|
6530
7847
|
*/
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
7848
|
+
get currentAriaLabel() {
|
|
7849
|
+
if (!this.attributeWatcher) return undefined;
|
|
6534
7850
|
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
}
|
|
7851
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7852
|
+
return ariaLabel || undefined;
|
|
6538
7853
|
}
|
|
6539
7854
|
|
|
6540
7855
|
/**
|
|
6541
|
-
*
|
|
6542
|
-
* @
|
|
6543
|
-
* @
|
|
6544
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7856
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7857
|
+
* @returns {string | undefined}
|
|
7858
|
+
* @private
|
|
6545
7859
|
*/
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
7860
|
+
get currentAriaLabelledBy() {
|
|
7861
|
+
if (!this.attributeWatcher) return undefined;
|
|
6549
7862
|
|
|
6550
|
-
|
|
7863
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7864
|
+
return ariaLabelledBy || undefined;
|
|
6551
7865
|
}
|
|
6552
|
-
};
|
|
6553
|
-
|
|
6554
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6555
|
-
// See LICENSE in the project root for license information.
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
class AuroDependencyVersioning {
|
|
6559
7866
|
|
|
6560
7867
|
/**
|
|
6561
|
-
*
|
|
7868
|
+
* Renders the default layout for the button.
|
|
7869
|
+
* @returns {TemplateResult}
|
|
6562
7870
|
* @private
|
|
6563
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
6564
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
6565
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6566
7871
|
*/
|
|
6567
|
-
|
|
6568
|
-
|
|
7872
|
+
renderLayoutDefault() {
|
|
7873
|
+
const classes = {
|
|
7874
|
+
"util_insetLg--squish": true,
|
|
7875
|
+
"auro-button": true,
|
|
7876
|
+
wrapper: true,
|
|
7877
|
+
loading: this.loading,
|
|
7878
|
+
};
|
|
6569
7879
|
|
|
6570
|
-
|
|
6571
|
-
|
|
7880
|
+
return html$1`
|
|
7881
|
+
<button
|
|
7882
|
+
part="button"
|
|
7883
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7884
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7885
|
+
tabIndex="${ifDefined(this.tIndex)}"
|
|
7886
|
+
?autofocus="${this.autofocus}"
|
|
7887
|
+
class="${classMap(classes)}"
|
|
7888
|
+
?disabled="${this.disabled || this.loading}"
|
|
7889
|
+
?onDark="${this.onDark}"
|
|
7890
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
7891
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
7892
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
7893
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
7894
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
7895
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7896
|
+
>
|
|
7897
|
+
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6572
7898
|
|
|
6573
|
-
|
|
7899
|
+
<span class="contentWrapper">
|
|
7900
|
+
<span class="textSlot" part="text">
|
|
7901
|
+
${this.hideText ? undefined : html$1`<slot></slot>`}
|
|
7902
|
+
</span>
|
|
7903
|
+
|
|
7904
|
+
<span part="icon">
|
|
7905
|
+
<slot name="icon"></slot>
|
|
7906
|
+
</span>
|
|
7907
|
+
</span>
|
|
7908
|
+
</button>
|
|
7909
|
+
`;
|
|
6574
7910
|
}
|
|
6575
7911
|
|
|
6576
7912
|
/**
|
|
6577
|
-
*
|
|
6578
|
-
* @
|
|
6579
|
-
* @
|
|
6580
|
-
* @returns {string} - Unique string to be used for naming.
|
|
7913
|
+
* Renders the layout of the button
|
|
7914
|
+
* @returns {TemplateResult}
|
|
7915
|
+
* @private
|
|
6581
7916
|
*/
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
const tag = literal`${unsafeStatic(elementName)}`;
|
|
6585
|
-
|
|
6586
|
-
if (!customElements.get(elementName)) {
|
|
6587
|
-
customElements.define(elementName, class extends tagClass {});
|
|
6588
|
-
}
|
|
6589
|
-
|
|
6590
|
-
return tag;
|
|
7917
|
+
renderLayout() {
|
|
7918
|
+
return this.renderLayoutDefault();
|
|
6591
7919
|
}
|
|
6592
7920
|
}
|
|
6593
7921
|
|
|
7922
|
+
var buttonVersion = '10.0.0';
|
|
7923
|
+
|
|
6594
7924
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6595
7925
|
// See LICENSE in the project root for license information.
|
|
6596
7926
|
|
|
@@ -6743,7 +8073,7 @@ class BaseIcon extends AuroElement {
|
|
|
6743
8073
|
|
|
6744
8074
|
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)}`;
|
|
6745
8075
|
|
|
6746
|
-
var colorCss$
|
|
8076
|
+
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)}`;
|
|
6747
8077
|
|
|
6748
8078
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6749
8079
|
// See LICENSE in the project root for license information.
|
|
@@ -6903,7 +8233,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6903
8233
|
super.styles,
|
|
6904
8234
|
css`${tokensCss}`,
|
|
6905
8235
|
css`${styleCss$1}`,
|
|
6906
|
-
css`${colorCss$
|
|
8236
|
+
css`${colorCss$4}`
|
|
6907
8237
|
];
|
|
6908
8238
|
}
|
|
6909
8239
|
|
|
@@ -6937,8 +8267,12 @@ class AuroIcon extends BaseIcon {
|
|
|
6937
8267
|
async firstUpdated() {
|
|
6938
8268
|
await super.firstUpdated();
|
|
6939
8269
|
|
|
6940
|
-
|
|
6941
|
-
|
|
8270
|
+
/**
|
|
8271
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
8272
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
8273
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
8274
|
+
*/
|
|
8275
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
6942
8276
|
const svgDesc = this.svg.querySelector('desc');
|
|
6943
8277
|
|
|
6944
8278
|
if (svgDesc) {
|
|
@@ -6982,7 +8316,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6982
8316
|
}
|
|
6983
8317
|
}
|
|
6984
8318
|
|
|
6985
|
-
var iconVersion = '8.0.
|
|
8319
|
+
var iconVersion = '8.0.4';
|
|
6986
8320
|
|
|
6987
8321
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6988
8322
|
// See LICENSE in the project root for license information.
|
|
@@ -7054,7 +8388,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
7054
8388
|
}
|
|
7055
8389
|
}
|
|
7056
8390
|
|
|
7057
|
-
var styleCss$
|
|
8391
|
+
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)}`;
|
|
7058
8392
|
|
|
7059
8393
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7060
8394
|
// See LICENSE in the project root for license information.
|
|
@@ -7101,7 +8435,7 @@ class AuroHeader extends LitElement {
|
|
|
7101
8435
|
}
|
|
7102
8436
|
|
|
7103
8437
|
static get styles() {
|
|
7104
|
-
return [styleCss$
|
|
8438
|
+
return [styleCss$5];
|
|
7105
8439
|
}
|
|
7106
8440
|
|
|
7107
8441
|
/**
|
|
@@ -7209,17 +8543,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
7209
8543
|
|
|
7210
8544
|
this.large = false;
|
|
7211
8545
|
|
|
7212
|
-
AuroLibraryRuntimeUtils$
|
|
8546
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
7213
8547
|
|
|
7214
8548
|
const versioning = new AuroDependencyVersioning();
|
|
8549
|
+
|
|
8550
|
+
/**
|
|
8551
|
+
* @private
|
|
8552
|
+
*/
|
|
7215
8553
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
8554
|
+
|
|
8555
|
+
/**
|
|
8556
|
+
* @private
|
|
8557
|
+
*/
|
|
7216
8558
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
8559
|
+
|
|
8560
|
+
/**
|
|
8561
|
+
* @private
|
|
8562
|
+
*/
|
|
8563
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
7217
8564
|
}
|
|
7218
8565
|
|
|
7219
8566
|
static get styles() {
|
|
7220
8567
|
return [
|
|
7221
|
-
colorCss$
|
|
7222
|
-
styleCss$
|
|
8568
|
+
colorCss$3,
|
|
8569
|
+
styleCss$4,
|
|
7223
8570
|
tokenCss
|
|
7224
8571
|
];
|
|
7225
8572
|
}
|
|
@@ -7248,7 +8595,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
7248
8595
|
*
|
|
7249
8596
|
*/
|
|
7250
8597
|
static register(name = "auro-bibtemplate") {
|
|
7251
|
-
AuroLibraryRuntimeUtils$
|
|
8598
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
7252
8599
|
}
|
|
7253
8600
|
|
|
7254
8601
|
/**
|
|
@@ -7306,9 +8653,9 @@ class AuroBibtemplate extends LitElement {
|
|
|
7306
8653
|
<div id="bibTemplate" part="bibtemplate">
|
|
7307
8654
|
${this.isFullscreen ? html$1`
|
|
7308
8655
|
<div id="headerContainer">
|
|
7309
|
-
|
|
8656
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7310
8657
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
7311
|
-
|
|
8658
|
+
</${this.buttonTag}>
|
|
7312
8659
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
7313
8660
|
<slot name="header"></slot>
|
|
7314
8661
|
</${this.headerTag}>
|
|
@@ -7367,7 +8714,7 @@ class AuroCounterWrapper extends LitElement {
|
|
|
7367
8714
|
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
7368
8715
|
*/
|
|
7369
8716
|
static register(name = "auro-counter-wrapper") {
|
|
7370
|
-
AuroLibraryRuntimeUtils$
|
|
8717
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounterWrapper);
|
|
7371
8718
|
}
|
|
7372
8719
|
|
|
7373
8720
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -7459,7 +8806,7 @@ class AuroCounterGroup extends LitElement {
|
|
|
7459
8806
|
}
|
|
7460
8807
|
|
|
7461
8808
|
static get styles() {
|
|
7462
|
-
return [styleCss$
|
|
8809
|
+
return [styleCss$7];
|
|
7463
8810
|
}
|
|
7464
8811
|
|
|
7465
8812
|
static get properties() {
|
|
@@ -7821,7 +9168,7 @@ class AuroCounterGroup extends LitElement {
|
|
|
7821
9168
|
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
7822
9169
|
*/
|
|
7823
9170
|
static register(name = "auro-counter-group") {
|
|
7824
|
-
AuroLibraryRuntimeUtils$
|
|
9171
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounterGroup);
|
|
7825
9172
|
}
|
|
7826
9173
|
|
|
7827
9174
|
// function that renders the HTML and CSS into the scope of the component
|