@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
|
@@ -33,9 +33,475 @@ const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litS
|
|
|
33
33
|
|
|
34
34
|
var tokensCss$7 = i$5`: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))}`;
|
|
35
35
|
|
|
36
|
-
var styleButtonColorCss = i$5`.
|
|
36
|
+
var styleButtonColorCss = i$5`.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))}}`;
|
|
37
37
|
|
|
38
|
-
var styleButtonCss = i$5`: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)}.
|
|
38
|
+
var styleButtonCss = i$5`: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}`;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
42
|
+
*/
|
|
43
|
+
const _observers$1 = new WeakMap();
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
47
|
+
* Structure: {
|
|
48
|
+
* host: {
|
|
49
|
+
* matchers: Set<Function>,
|
|
50
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
51
|
+
* }
|
|
52
|
+
* }
|
|
53
|
+
*/
|
|
54
|
+
const _transportConfig$1 = new WeakMap();
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
58
|
+
*
|
|
59
|
+
* @param {Object} params - The parameters for the function.
|
|
60
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
61
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
62
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
63
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
64
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
65
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
66
|
+
*/
|
|
67
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
68
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
69
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
70
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
74
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
75
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Guard Clause: Ensure match is a function
|
|
79
|
+
if (typeof match !== 'function') {
|
|
80
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
84
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
85
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Register this transport and get cleanup function
|
|
89
|
+
return _registerTransport$1({
|
|
90
|
+
host,
|
|
91
|
+
target,
|
|
92
|
+
matcher: match,
|
|
93
|
+
removeOriginal
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
99
|
+
*
|
|
100
|
+
* @param {Object} params - The parameters object.
|
|
101
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
102
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
103
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
104
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
105
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
106
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
107
|
+
* @private
|
|
108
|
+
*/
|
|
109
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
110
|
+
// Initialize config for this host if it doesn't exist
|
|
111
|
+
if (!_transportConfig$1.has(host)) {
|
|
112
|
+
_transportConfig$1.set(host, {
|
|
113
|
+
matchers: new Set(),
|
|
114
|
+
targets: new Map()
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const config = _transportConfig$1.get(host);
|
|
119
|
+
|
|
120
|
+
// Add the matcher to the set of matchers for this host
|
|
121
|
+
config.matchers.add(matcher);
|
|
122
|
+
|
|
123
|
+
// Initialize target entry if it doesn't exist
|
|
124
|
+
if (!config.targets.has(target)) {
|
|
125
|
+
config.targets.set(target, new Map());
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
129
|
+
config.targets.get(target).set(matcher, {
|
|
130
|
+
removeOriginal,
|
|
131
|
+
currentAttributes: new Map()
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
// Perform initial attribute transport
|
|
135
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
136
|
+
|
|
137
|
+
// Attach observer
|
|
138
|
+
_attachObserver$1(host);
|
|
139
|
+
|
|
140
|
+
// Return cleanup function and utility functions
|
|
141
|
+
return {
|
|
142
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
143
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
144
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
150
|
+
*
|
|
151
|
+
* @param {HTMLElement} host - The host element
|
|
152
|
+
* @param {HTMLElement} target - The target element
|
|
153
|
+
* @param {Function} matcher - The matcher function
|
|
154
|
+
* @private
|
|
155
|
+
*/
|
|
156
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
157
|
+
const config = _transportConfig$1.get(host);
|
|
158
|
+
if (!config) return;
|
|
159
|
+
|
|
160
|
+
// Remove this matcher from this target
|
|
161
|
+
const targetMatchers = config.targets.get(target);
|
|
162
|
+
if (targetMatchers) {
|
|
163
|
+
targetMatchers.delete(matcher);
|
|
164
|
+
|
|
165
|
+
// If this target has no more matchers, remove it
|
|
166
|
+
if (targetMatchers.size === 0) {
|
|
167
|
+
config.targets.delete(target);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// Check if this matcher is still used by any target
|
|
172
|
+
let matcherStillUsed = false;
|
|
173
|
+
for (const matcherMap of config.targets.values()) {
|
|
174
|
+
if (matcherMap.has(matcher)) {
|
|
175
|
+
matcherStillUsed = true;
|
|
176
|
+
break;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// If not used anymore, remove from matchers set
|
|
181
|
+
if (!matcherStillUsed) {
|
|
182
|
+
config.matchers.delete(matcher);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// If no more targets or matchers, detach observer
|
|
186
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
187
|
+
_detachObserver$1(host);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
193
|
+
*
|
|
194
|
+
* @param {Object} params - The parameters object.
|
|
195
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
196
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
197
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
198
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
199
|
+
* @returns {void}
|
|
200
|
+
* @private
|
|
201
|
+
*/
|
|
202
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
203
|
+
// Get a list of all matching attributes on the host element and their values
|
|
204
|
+
const matchingAttributes = host.getAttributeNames()
|
|
205
|
+
.filter(attr => matcher(attr))
|
|
206
|
+
.reduce((acc, attr) => {
|
|
207
|
+
acc[attr] = host.getAttribute(attr);
|
|
208
|
+
return acc;
|
|
209
|
+
}, {});
|
|
210
|
+
|
|
211
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
212
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
213
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
214
|
+
target.setAttribute(key, value);
|
|
215
|
+
if (removeOriginal) {
|
|
216
|
+
host.removeAttribute(key);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
223
|
+
*
|
|
224
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
225
|
+
* @returns {MutationObserver} The observer instance.
|
|
226
|
+
* @private
|
|
227
|
+
*/
|
|
228
|
+
const _attachObserver$1 = (host) => {
|
|
229
|
+
// If an observer for this host already exists, return it
|
|
230
|
+
if (_observers$1.has(host)) {
|
|
231
|
+
return _observers$1.get(host);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// Create a new MutationObserver
|
|
235
|
+
const observer = new MutationObserver((mutations) => {
|
|
236
|
+
const config = _transportConfig$1.get(host);
|
|
237
|
+
if (!config) return;
|
|
238
|
+
|
|
239
|
+
// For each mutation affecting attributes
|
|
240
|
+
mutations
|
|
241
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
242
|
+
.forEach(mutation => {
|
|
243
|
+
const attributeName = mutation.attributeName;
|
|
244
|
+
|
|
245
|
+
// Find matchers that care about this attribute
|
|
246
|
+
for (const matcher of config.matchers) {
|
|
247
|
+
if (matcher(attributeName)) {
|
|
248
|
+
// For each target that uses this matcher
|
|
249
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
250
|
+
if (matcherConfigs.has(matcher)) {
|
|
251
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
252
|
+
_transportAttributes$1({
|
|
253
|
+
host,
|
|
254
|
+
target,
|
|
255
|
+
matcher,
|
|
256
|
+
removeOriginal
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
// Start observing attribute changes
|
|
266
|
+
observer.observe(host, { attributes: true });
|
|
267
|
+
|
|
268
|
+
// Store the observer
|
|
269
|
+
_observers$1.set(host, observer);
|
|
270
|
+
|
|
271
|
+
return observer;
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
276
|
+
*
|
|
277
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
278
|
+
* @private
|
|
279
|
+
*/
|
|
280
|
+
const _detachObserver$1 = (host) => {
|
|
281
|
+
if (_observers$1.has(host)) {
|
|
282
|
+
const observer = _observers$1.get(host);
|
|
283
|
+
observer.disconnect();
|
|
284
|
+
_observers$1.delete(host);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// Clean up the transport config as well
|
|
288
|
+
if (_transportConfig$1.has(host)) {
|
|
289
|
+
_transportConfig$1.delete(host);
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
295
|
+
* @param {HTMLElement} host - The host element
|
|
296
|
+
* @param {HTMLElement} target - The target element
|
|
297
|
+
* @param {Function} matcher - The matcher function
|
|
298
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
299
|
+
* @private
|
|
300
|
+
*/
|
|
301
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
302
|
+
const config = _transportConfig$1.get(host);
|
|
303
|
+
if (!config) return undefined;
|
|
304
|
+
|
|
305
|
+
const targetMatchers = config.targets.get(target);
|
|
306
|
+
if (!targetMatchers) return undefined;
|
|
307
|
+
|
|
308
|
+
return targetMatchers.get(matcher);
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Sets an observed attribute value
|
|
313
|
+
* @param {HTMLElement} host - The host element
|
|
314
|
+
* @param {HTMLElement} target - The target element
|
|
315
|
+
* @param {Function} matcher - The matcher function
|
|
316
|
+
* @param {string} key - The attribute name
|
|
317
|
+
* @param {string} value - The attribute value
|
|
318
|
+
* @private
|
|
319
|
+
*/
|
|
320
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
321
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
322
|
+
if (matcherConfig) {
|
|
323
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
324
|
+
}
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
328
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
329
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
330
|
+
return undefined;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
334
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
335
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
336
|
+
return [];
|
|
337
|
+
};
|
|
338
|
+
|
|
339
|
+
const _matchers$1 = {
|
|
340
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
341
|
+
'role': attr => attr.match(/^role$/)
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
345
|
+
return transportAttributes$1({
|
|
346
|
+
host,
|
|
347
|
+
target,
|
|
348
|
+
match: attr => {
|
|
349
|
+
for (const key in _matchers$1) {
|
|
350
|
+
if (_matchers$1[key](attr)) return true;
|
|
351
|
+
}
|
|
352
|
+
return false;
|
|
353
|
+
},
|
|
354
|
+
removeOriginal
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
let AuroElement$4 = class AuroElement extends i$2 {
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
362
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
363
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
364
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
365
|
+
* @private
|
|
366
|
+
*/
|
|
367
|
+
attributeWatcher;
|
|
368
|
+
|
|
369
|
+
static get properties() {
|
|
370
|
+
return {
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Defines the layout of an element.
|
|
374
|
+
* @default {'default'}
|
|
375
|
+
*/
|
|
376
|
+
layout: {
|
|
377
|
+
type: String,
|
|
378
|
+
attribute: "layout",
|
|
379
|
+
reflect: true
|
|
380
|
+
},
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Defines the shape of an element.
|
|
384
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
385
|
+
* @default {'default'}
|
|
386
|
+
*/
|
|
387
|
+
shape: {
|
|
388
|
+
type: String,
|
|
389
|
+
attribute: "shape",
|
|
390
|
+
reflect: true
|
|
391
|
+
},
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Defines the size of an element.
|
|
395
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
396
|
+
* @default {'md'}
|
|
397
|
+
*/
|
|
398
|
+
size: {
|
|
399
|
+
type: String,
|
|
400
|
+
attribute: "size",
|
|
401
|
+
reflect: true
|
|
402
|
+
},
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
406
|
+
* @default {false}
|
|
407
|
+
*/
|
|
408
|
+
onDark: {
|
|
409
|
+
type: Boolean,
|
|
410
|
+
attribute: "ondark",
|
|
411
|
+
reflect: true
|
|
412
|
+
},
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
416
|
+
* This is used to apply layout and shape classes dynamically.
|
|
417
|
+
* @type {HTMLElement|null}
|
|
418
|
+
* @default {null}
|
|
419
|
+
* @private
|
|
420
|
+
*/
|
|
421
|
+
wrapper: {
|
|
422
|
+
type: HTMLElement,
|
|
423
|
+
attribute: false,
|
|
424
|
+
reflect: false
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
resetShapeClasses() {
|
|
432
|
+
if (this.shape && this.size) {
|
|
433
|
+
|
|
434
|
+
if (this.wrapper) {
|
|
435
|
+
this.wrapper.classList.forEach((className) => {
|
|
436
|
+
if (className.startsWith('shape-')) {
|
|
437
|
+
this.wrapper.classList.remove(className);
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
resetLayoutClasses() {
|
|
447
|
+
if (this.layout) {
|
|
448
|
+
if (this.wrapper) {
|
|
449
|
+
this.wrapper.classList.forEach((className) => {
|
|
450
|
+
if (className.startsWith('layout-')) {
|
|
451
|
+
this.wrapper.classList.remove(className);
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
updateComponentArchitecture() {
|
|
461
|
+
this.resetLayoutClasses();
|
|
462
|
+
this.resetShapeClasses();
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
updated(changedProperties) {
|
|
466
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
467
|
+
this.updateComponentArchitecture();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
firstUpdated() {
|
|
472
|
+
super.firstUpdated();
|
|
473
|
+
|
|
474
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
475
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
476
|
+
|
|
477
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
478
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
disconnectedCallback() {
|
|
482
|
+
super.disconnectedCallback();
|
|
483
|
+
|
|
484
|
+
// Cleanup the ARIA observer if it exists
|
|
485
|
+
if (this.attributeWatcher) {
|
|
486
|
+
this.attributeWatcher.cleanup();
|
|
487
|
+
this.attributeWatcher = null;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
492
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
493
|
+
render() {
|
|
494
|
+
try {
|
|
495
|
+
return this.renderLayout();
|
|
496
|
+
} catch (error) {
|
|
497
|
+
// failed to get the defined layout
|
|
498
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
499
|
+
|
|
500
|
+
// fallback to the default layout
|
|
501
|
+
return this.getLayout('default');
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
};
|
|
39
505
|
|
|
40
506
|
/**
|
|
41
507
|
* @license
|
|
@@ -60,7 +526,7 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{cons
|
|
|
60
526
|
// See LICENSE in the project root for license information.
|
|
61
527
|
|
|
62
528
|
|
|
63
|
-
let AuroDependencyVersioning$
|
|
529
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
64
530
|
|
|
65
531
|
/**
|
|
66
532
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -166,11 +632,13 @@ let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
|
166
632
|
}
|
|
167
633
|
};
|
|
168
634
|
|
|
169
|
-
var styleCss$
|
|
635
|
+
var styleCss$b = i$5`: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}`;
|
|
170
636
|
|
|
171
|
-
var colorCss$8 = i$5`[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}`;
|
|
637
|
+
var colorCss$9 = i$5`[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)}`;
|
|
172
638
|
|
|
173
|
-
var tokensCss$6 = i$5`: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}`;
|
|
639
|
+
var tokensCss$6 = i$5`: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}`;
|
|
640
|
+
|
|
641
|
+
var shapeSize$1 = i$5`.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}`;
|
|
174
642
|
|
|
175
643
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
176
644
|
// See LICENSE in the project root for license information.
|
|
@@ -242,9 +710,9 @@ let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
|
242
710
|
}
|
|
243
711
|
};
|
|
244
712
|
|
|
245
|
-
var styleCss$
|
|
713
|
+
var styleCss$a = i$5`: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}}`;
|
|
246
714
|
|
|
247
|
-
var colorCss$
|
|
715
|
+
var colorCss$8 = i$5`: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}`;
|
|
248
716
|
|
|
249
717
|
var tokensCss$5 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
250
718
|
|
|
@@ -252,7 +720,7 @@ var tokensCss$5 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-
|
|
|
252
720
|
// See LICENSE in the project root for license information.
|
|
253
721
|
|
|
254
722
|
|
|
255
|
-
class AuroLoader extends i$2 {
|
|
723
|
+
let AuroLoader$1 = class AuroLoader extends i$2 {
|
|
256
724
|
constructor() {
|
|
257
725
|
super();
|
|
258
726
|
|
|
@@ -322,8 +790,8 @@ class AuroLoader extends i$2 {
|
|
|
322
790
|
|
|
323
791
|
static get styles() {
|
|
324
792
|
return [
|
|
325
|
-
i$5`${styleCss$
|
|
326
|
-
i$5`${colorCss$
|
|
793
|
+
i$5`${styleCss$a}`,
|
|
794
|
+
i$5`${colorCss$8}`,
|
|
327
795
|
i$5`${tokensCss$5}`
|
|
328
796
|
];
|
|
329
797
|
}
|
|
@@ -385,11 +853,11 @@ class AuroLoader extends i$2 {
|
|
|
385
853
|
}
|
|
386
854
|
`;
|
|
387
855
|
}
|
|
388
|
-
}
|
|
856
|
+
};
|
|
389
857
|
|
|
390
|
-
var loaderVersion = '5.0.0';
|
|
858
|
+
var loaderVersion$1 = '5.0.0';
|
|
391
859
|
|
|
392
|
-
/* eslint-disable max-lines */
|
|
860
|
+
/* eslint-disable max-lines, curly */
|
|
393
861
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
394
862
|
// See LICENSE in the project root for license information.
|
|
395
863
|
|
|
@@ -405,7 +873,18 @@ var loaderVersion = '5.0.0';
|
|
|
405
873
|
|
|
406
874
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
407
875
|
|
|
408
|
-
|
|
876
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
880
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
881
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
882
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
883
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
884
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
885
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
886
|
+
*/
|
|
887
|
+
let AuroButton$1 = class AuroButton extends AuroElement$4 {
|
|
409
888
|
|
|
410
889
|
/**
|
|
411
890
|
* Enables form association for this element.
|
|
@@ -420,13 +899,10 @@ class AuroButton extends i$2 {
|
|
|
420
899
|
super();
|
|
421
900
|
this.autofocus = false;
|
|
422
901
|
this.disabled = false;
|
|
423
|
-
this.iconOnly = false;
|
|
424
902
|
this.loading = false;
|
|
903
|
+
this.size = "md";
|
|
904
|
+
this.shape = "rounded";
|
|
425
905
|
this.onDark = false;
|
|
426
|
-
this.secondary = false;
|
|
427
|
-
this.tertiary = false;
|
|
428
|
-
this.rounded = false;
|
|
429
|
-
this.slim = false;
|
|
430
906
|
this.fluid = false;
|
|
431
907
|
this.loadingText = this.loadingText || 'Loading...';
|
|
432
908
|
|
|
@@ -443,55 +919,50 @@ class AuroButton extends i$2 {
|
|
|
443
919
|
/**
|
|
444
920
|
* Generate unique names for dependency components.
|
|
445
921
|
*/
|
|
446
|
-
const versioning = new AuroDependencyVersioning$
|
|
922
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
447
923
|
|
|
448
924
|
/**
|
|
449
925
|
* @private
|
|
450
926
|
*/
|
|
451
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
927
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
452
928
|
}
|
|
453
929
|
|
|
454
930
|
static get styles() {
|
|
455
931
|
return [
|
|
456
932
|
tokensCss$6,
|
|
457
|
-
styleCss$
|
|
458
|
-
colorCss$
|
|
933
|
+
styleCss$b,
|
|
934
|
+
colorCss$9,
|
|
935
|
+
shapeSize$1
|
|
459
936
|
];
|
|
460
937
|
}
|
|
461
938
|
|
|
462
939
|
static get properties() {
|
|
463
940
|
return {
|
|
464
941
|
|
|
465
|
-
|
|
466
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
467
|
-
*/
|
|
468
|
-
autofocus: {
|
|
469
|
-
type: Boolean,
|
|
470
|
-
reflect: true
|
|
471
|
-
},
|
|
942
|
+
...super.properties,
|
|
472
943
|
|
|
473
944
|
/**
|
|
474
|
-
*
|
|
945
|
+
* Override layout since it isn't used in this component.
|
|
946
|
+
* @private
|
|
475
947
|
*/
|
|
476
|
-
|
|
948
|
+
layout: {
|
|
477
949
|
type: Boolean,
|
|
478
|
-
|
|
950
|
+
attribute: false,
|
|
951
|
+
reflect: false
|
|
479
952
|
},
|
|
480
953
|
|
|
481
954
|
/**
|
|
482
|
-
*
|
|
483
|
-
* @deprecated
|
|
955
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
484
956
|
*/
|
|
485
|
-
|
|
957
|
+
autofocus: {
|
|
486
958
|
type: Boolean,
|
|
487
959
|
reflect: true
|
|
488
960
|
},
|
|
489
961
|
|
|
490
962
|
/**
|
|
491
|
-
*
|
|
492
|
-
* @deprecated
|
|
963
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
493
964
|
*/
|
|
494
|
-
|
|
965
|
+
disabled: {
|
|
495
966
|
type: Boolean,
|
|
496
967
|
reflect: true
|
|
497
968
|
},
|
|
@@ -499,15 +970,7 @@ class AuroButton extends i$2 {
|
|
|
499
970
|
/**
|
|
500
971
|
* Alters the shape of the button to be full width of its parent container.
|
|
501
972
|
*/
|
|
502
|
-
fluid:
|
|
503
|
-
type: Boolean,
|
|
504
|
-
reflect: true
|
|
505
|
-
},
|
|
506
|
-
|
|
507
|
-
/**
|
|
508
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
509
|
-
*/
|
|
510
|
-
iconOnly: {
|
|
973
|
+
fluid: {
|
|
511
974
|
type: Boolean,
|
|
512
975
|
reflect: true
|
|
513
976
|
},
|
|
@@ -515,7 +978,7 @@ class AuroButton extends i$2 {
|
|
|
515
978
|
/**
|
|
516
979
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
517
980
|
*/
|
|
518
|
-
loading:
|
|
981
|
+
loading: {
|
|
519
982
|
type: Boolean,
|
|
520
983
|
reflect: true
|
|
521
984
|
},
|
|
@@ -523,112 +986,50 @@ class AuroButton extends i$2 {
|
|
|
523
986
|
/**
|
|
524
987
|
* 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.
|
|
525
988
|
*/
|
|
526
|
-
loadingText:
|
|
989
|
+
loadingText: {
|
|
527
990
|
type: String
|
|
528
991
|
},
|
|
529
992
|
|
|
530
993
|
/**
|
|
531
|
-
*
|
|
532
|
-
*/
|
|
533
|
-
onDark: {
|
|
534
|
-
type: Boolean,
|
|
535
|
-
reflect: true
|
|
536
|
-
},
|
|
537
|
-
|
|
538
|
-
/**
|
|
539
|
-
* If set to true, the button will have a rounded shape.
|
|
994
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
540
995
|
*/
|
|
541
|
-
|
|
542
|
-
type:
|
|
996
|
+
tIndex: {
|
|
997
|
+
type: String,
|
|
543
998
|
reflect: true
|
|
544
999
|
},
|
|
545
1000
|
|
|
546
1001
|
/**
|
|
547
|
-
*
|
|
1002
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
548
1003
|
*/
|
|
549
|
-
|
|
550
|
-
type:
|
|
1004
|
+
title: {
|
|
1005
|
+
type: String,
|
|
551
1006
|
reflect: true
|
|
552
1007
|
},
|
|
553
1008
|
|
|
554
1009
|
/**
|
|
555
|
-
*
|
|
1010
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
556
1011
|
*/
|
|
557
|
-
|
|
1012
|
+
type: {
|
|
558
1013
|
type: String,
|
|
559
1014
|
reflect: true
|
|
560
1015
|
},
|
|
561
1016
|
|
|
562
1017
|
/**
|
|
563
|
-
*
|
|
1018
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
564
1019
|
*/
|
|
565
|
-
|
|
1020
|
+
value: {
|
|
566
1021
|
type: String,
|
|
567
|
-
reflect: true
|
|
1022
|
+
reflect: true
|
|
568
1023
|
},
|
|
569
1024
|
|
|
570
1025
|
/**
|
|
571
|
-
*
|
|
572
|
-
*
|
|
573
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
1026
|
+
* Sets button variant option.
|
|
1027
|
+
* @default primary
|
|
574
1028
|
*/
|
|
575
|
-
|
|
1029
|
+
variant: {
|
|
576
1030
|
type: String,
|
|
577
1031
|
reflect: true
|
|
578
1032
|
},
|
|
579
|
-
|
|
580
|
-
/**
|
|
581
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
582
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
583
|
-
* List multiple element IDs in a space delimited fashion.
|
|
584
|
-
*/
|
|
585
|
-
arialabelledby: {
|
|
586
|
-
type: String,
|
|
587
|
-
reflect: true
|
|
588
|
-
},
|
|
589
|
-
|
|
590
|
-
/**
|
|
591
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
592
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
593
|
-
* This is an optional attribute for buttons.
|
|
594
|
-
*/
|
|
595
|
-
ariaexpanded: {
|
|
596
|
-
type: Boolean,
|
|
597
|
-
reflect: true
|
|
598
|
-
},
|
|
599
|
-
|
|
600
|
-
/**
|
|
601
|
-
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
602
|
-
*/
|
|
603
|
-
title: {
|
|
604
|
-
type: String,
|
|
605
|
-
reflect: true
|
|
606
|
-
},
|
|
607
|
-
|
|
608
|
-
/**
|
|
609
|
-
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
610
|
-
*/
|
|
611
|
-
type: {
|
|
612
|
-
type: String,
|
|
613
|
-
reflect: true
|
|
614
|
-
},
|
|
615
|
-
|
|
616
|
-
/**
|
|
617
|
-
* Defines the value associated with the button which is submitted with the form data.
|
|
618
|
-
*/
|
|
619
|
-
value: {
|
|
620
|
-
type: String,
|
|
621
|
-
reflect: true
|
|
622
|
-
},
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
* Sets button variant option. Possible values are: `secondary`, `tertiary`.
|
|
626
|
-
*/
|
|
627
|
-
variant: {
|
|
628
|
-
type: String,
|
|
629
|
-
reflect: true
|
|
630
|
-
},
|
|
631
|
-
ready: { type: Boolean },
|
|
632
1033
|
};
|
|
633
1034
|
}
|
|
634
1035
|
|
|
@@ -653,17 +1054,6 @@ class AuroButton extends i$2 {
|
|
|
653
1054
|
this.renderRoot.querySelector('button').focus();
|
|
654
1055
|
}
|
|
655
1056
|
|
|
656
|
-
updated() {
|
|
657
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
658
|
-
if (this.secondary) {
|
|
659
|
-
this.setAttribute('variant', 'secondary');
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
if (this.tertiary) {
|
|
663
|
-
this.setAttribute('variant', 'tertiary');
|
|
664
|
-
}
|
|
665
|
-
}
|
|
666
|
-
|
|
667
1057
|
/**
|
|
668
1058
|
* Submits the form that this button is associated with.
|
|
669
1059
|
* @private
|
|
@@ -684,25 +1074,56 @@ class AuroButton extends i$2 {
|
|
|
684
1074
|
return this.internals ? this.internals.form : null;
|
|
685
1075
|
}
|
|
686
1076
|
|
|
687
|
-
|
|
1077
|
+
/**
|
|
1078
|
+
* @private
|
|
1079
|
+
* @returns {Boolean}
|
|
1080
|
+
*/
|
|
1081
|
+
get hideText() {
|
|
1082
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
1083
|
+
}
|
|
1084
|
+
|
|
1085
|
+
/**
|
|
1086
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
1087
|
+
* @returns {string | undefined}
|
|
1088
|
+
* @private
|
|
1089
|
+
*/
|
|
1090
|
+
get currentAriaLabel() {
|
|
1091
|
+
if (!this.attributeWatcher) return undefined;
|
|
1092
|
+
|
|
1093
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
1094
|
+
return ariaLabel || undefined;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
1099
|
+
* @returns {string | undefined}
|
|
1100
|
+
* @private
|
|
1101
|
+
*/
|
|
1102
|
+
get currentAriaLabelledBy() {
|
|
1103
|
+
if (!this.attributeWatcher) return undefined;
|
|
1104
|
+
|
|
1105
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
1106
|
+
return ariaLabelledBy || undefined;
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* Renders the default layout for the button.
|
|
1111
|
+
* @returns {TemplateResult}
|
|
1112
|
+
* @private
|
|
1113
|
+
*/
|
|
1114
|
+
renderLayoutDefault() {
|
|
688
1115
|
const classes = {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
'auro-button--slim': this.slim,
|
|
694
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
695
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
696
|
-
'loading': this.loading
|
|
1116
|
+
"util_insetLg--squish": true,
|
|
1117
|
+
"auro-button": true,
|
|
1118
|
+
wrapper: true,
|
|
1119
|
+
loading: this.loading,
|
|
697
1120
|
};
|
|
698
1121
|
|
|
699
1122
|
return u`
|
|
700
1123
|
<button
|
|
701
1124
|
part="button"
|
|
702
|
-
aria-
|
|
703
|
-
aria-
|
|
704
|
-
aria-labelledby="${o(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
705
|
-
aria-expanded="${o(this.ariaexpanded)}"
|
|
1125
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
1126
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
706
1127
|
tabIndex="${o(this.tIndex)}"
|
|
707
1128
|
?autofocus="${this.autofocus}"
|
|
708
1129
|
class="${e(classes)}"
|
|
@@ -719,7 +1140,7 @@ class AuroButton extends i$2 {
|
|
|
719
1140
|
|
|
720
1141
|
<span class="contentWrapper">
|
|
721
1142
|
<span class="textSlot" part="text">
|
|
722
|
-
${this.
|
|
1143
|
+
${this.hideText ? undefined : u`<slot></slot>`}
|
|
723
1144
|
</span>
|
|
724
1145
|
|
|
725
1146
|
<span part="icon">
|
|
@@ -729,75 +1150,14 @@ class AuroButton extends i$2 {
|
|
|
729
1150
|
</button>
|
|
730
1151
|
`;
|
|
731
1152
|
}
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
735
|
-
// See LICENSE in the project root for license information.
|
|
736
|
-
|
|
737
|
-
// ---------------------------------------------------------------------
|
|
738
|
-
|
|
739
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
740
|
-
|
|
741
|
-
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
742
|
-
|
|
743
|
-
/* eslint-disable jsdoc/require-param */
|
|
744
|
-
|
|
745
|
-
/**
|
|
746
|
-
* This will register a new custom element with the browser.
|
|
747
|
-
* @param {String} name - The name of the custom element.
|
|
748
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
749
|
-
* @returns {void}
|
|
750
|
-
*/
|
|
751
|
-
registerComponent(name, componentClass) {
|
|
752
|
-
if (!customElements.get(name)) {
|
|
753
|
-
customElements.define(name, class extends componentClass {});
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* Finds and returns the closest HTML Element based on a selector.
|
|
759
|
-
* @returns {void}
|
|
760
|
-
*/
|
|
761
|
-
closestElement(
|
|
762
|
-
selector, // selector like in .closest()
|
|
763
|
-
base = this, // extra functionality to skip a parent
|
|
764
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
765
|
-
!el || el === document || el === window
|
|
766
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
767
|
-
: found
|
|
768
|
-
? found // found a selector INside this element
|
|
769
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
770
|
-
) {
|
|
771
|
-
return __Closest(base);
|
|
772
|
-
}
|
|
773
|
-
/* eslint-enable jsdoc/require-param */
|
|
774
|
-
|
|
775
|
-
/**
|
|
776
|
-
* 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.
|
|
777
|
-
* @param {Object} elem - The element to check.
|
|
778
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
779
|
-
* @returns {void}
|
|
780
|
-
*/
|
|
781
|
-
handleComponentTagRename(elem, tagName) {
|
|
782
|
-
const tag = tagName.toLowerCase();
|
|
783
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
784
|
-
|
|
785
|
-
if (elemTag !== tag) {
|
|
786
|
-
elem.setAttribute(tag, true);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
1153
|
|
|
790
1154
|
/**
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
793
|
-
* @
|
|
794
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1155
|
+
* Renders the layout of the button
|
|
1156
|
+
* @returns {TemplateResult}
|
|
1157
|
+
* @private
|
|
795
1158
|
*/
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
799
|
-
|
|
800
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
1159
|
+
renderLayout() {
|
|
1160
|
+
return this.renderLayoutDefault();
|
|
801
1161
|
}
|
|
802
1162
|
};
|
|
803
1163
|
|
|
@@ -806,7 +1166,14 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
806
1166
|
|
|
807
1167
|
|
|
808
1168
|
// build the component class
|
|
809
|
-
class AuroCounterButton extends AuroButton {
|
|
1169
|
+
class AuroCounterButton extends AuroButton$1 {
|
|
1170
|
+
|
|
1171
|
+
constructor() {
|
|
1172
|
+
super();
|
|
1173
|
+
|
|
1174
|
+
this.size = "sm";
|
|
1175
|
+
this.shape = "rounded";
|
|
1176
|
+
}
|
|
810
1177
|
|
|
811
1178
|
static get styles() {
|
|
812
1179
|
return [
|
|
@@ -825,7 +1192,7 @@ class AuroCounterButton extends AuroButton {
|
|
|
825
1192
|
*
|
|
826
1193
|
*/
|
|
827
1194
|
static register(name = "auro-counter-button") {
|
|
828
|
-
AuroLibraryRuntimeUtils$
|
|
1195
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounterButton);
|
|
829
1196
|
}
|
|
830
1197
|
}
|
|
831
1198
|
|
|
@@ -835,46 +1202,6 @@ if (!customElements.get("auro-counter-button")) {
|
|
|
835
1202
|
customElements.define("auro-counter-button", AuroCounterButton);
|
|
836
1203
|
}
|
|
837
1204
|
|
|
838
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
839
|
-
// See LICENSE in the project root for license information.
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
843
|
-
|
|
844
|
-
/**
|
|
845
|
-
* Generates a unique string to be used for child auro element naming.
|
|
846
|
-
* @private
|
|
847
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
848
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
849
|
-
* @returns {string} - Unique string to be used for naming.
|
|
850
|
-
*/
|
|
851
|
-
generateElementName(baseName, version) {
|
|
852
|
-
let result = baseName;
|
|
853
|
-
|
|
854
|
-
result += '-';
|
|
855
|
-
result += version.replace(/[.]/g, '_');
|
|
856
|
-
|
|
857
|
-
return result;
|
|
858
|
-
}
|
|
859
|
-
|
|
860
|
-
/**
|
|
861
|
-
* Generates a unique string to be used for child auro element naming.
|
|
862
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
863
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
864
|
-
* @returns {string} - Unique string to be used for naming.
|
|
865
|
-
*/
|
|
866
|
-
generateTag(baseName, version, tagClass) {
|
|
867
|
-
const elementName = this.generateElementName(baseName, version);
|
|
868
|
-
const tag = i$1`${s(elementName)}`;
|
|
869
|
-
|
|
870
|
-
if (!customElements.get(elementName)) {
|
|
871
|
-
customElements.define(elementName, class extends tagClass {});
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
return tag;
|
|
875
|
-
}
|
|
876
|
-
};
|
|
877
|
-
|
|
878
1205
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
879
1206
|
// See LICENSE in the project root for license information.
|
|
880
1207
|
|
|
@@ -941,7 +1268,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
941
1268
|
return _fetchMap$2.get(uri);
|
|
942
1269
|
};
|
|
943
1270
|
|
|
944
|
-
var styleCss$
|
|
1271
|
+
var styleCss$9 = i$5`: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}`;
|
|
945
1272
|
|
|
946
1273
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
947
1274
|
// See LICENSE in the project root for license information.
|
|
@@ -984,7 +1311,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
984
1311
|
|
|
985
1312
|
static get styles() {
|
|
986
1313
|
return i$5`
|
|
987
|
-
${styleCss$
|
|
1314
|
+
${styleCss$9}
|
|
988
1315
|
`;
|
|
989
1316
|
}
|
|
990
1317
|
|
|
@@ -1027,7 +1354,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
1027
1354
|
|
|
1028
1355
|
var tokensCss$4 = i$5`: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)}`;
|
|
1029
1356
|
|
|
1030
|
-
var colorCss$
|
|
1357
|
+
var colorCss$7 = i$5`: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)}`;
|
|
1031
1358
|
|
|
1032
1359
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1033
1360
|
// See LICENSE in the project root for license information.
|
|
@@ -1036,7 +1363,7 @@ var colorCss$6 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
1036
1363
|
|
|
1037
1364
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1038
1365
|
|
|
1039
|
-
let AuroLibraryRuntimeUtils$
|
|
1366
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
1040
1367
|
|
|
1041
1368
|
/* eslint-disable jsdoc/require-param */
|
|
1042
1369
|
|
|
@@ -1118,7 +1445,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1118
1445
|
*/
|
|
1119
1446
|
privateDefaults() {
|
|
1120
1447
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1121
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1448
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
1122
1449
|
}
|
|
1123
1450
|
|
|
1124
1451
|
// function to define props used within the scope of this component
|
|
@@ -1186,8 +1513,8 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1186
1513
|
return [
|
|
1187
1514
|
super.styles,
|
|
1188
1515
|
i$5`${tokensCss$4}`,
|
|
1189
|
-
i$5`${styleCss$
|
|
1190
|
-
i$5`${colorCss$
|
|
1516
|
+
i$5`${styleCss$9}`,
|
|
1517
|
+
i$5`${colorCss$7}`
|
|
1191
1518
|
];
|
|
1192
1519
|
}
|
|
1193
1520
|
|
|
@@ -1200,7 +1527,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1200
1527
|
*
|
|
1201
1528
|
*/
|
|
1202
1529
|
static register(name = "auro-icon") {
|
|
1203
|
-
AuroLibraryRuntimeUtils$
|
|
1530
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroIcon);
|
|
1204
1531
|
}
|
|
1205
1532
|
|
|
1206
1533
|
connectedCallback() {
|
|
@@ -1221,8 +1548,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1221
1548
|
async firstUpdated() {
|
|
1222
1549
|
await super.firstUpdated();
|
|
1223
1550
|
|
|
1224
|
-
|
|
1225
|
-
|
|
1551
|
+
/**
|
|
1552
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
1553
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
1554
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
1555
|
+
*/
|
|
1556
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
1226
1557
|
const svgDesc = this.svg.querySelector('desc');
|
|
1227
1558
|
|
|
1228
1559
|
if (svgDesc) {
|
|
@@ -1266,7 +1597,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1266
1597
|
}
|
|
1267
1598
|
};
|
|
1268
1599
|
|
|
1269
|
-
var iconVersion$2 = '8.0.
|
|
1600
|
+
var iconVersion$2 = '8.0.4';
|
|
1270
1601
|
|
|
1271
1602
|
class DateFormatter {
|
|
1272
1603
|
|
|
@@ -1684,7 +2015,7 @@ const {
|
|
|
1684
2015
|
class AuroFormValidation {
|
|
1685
2016
|
|
|
1686
2017
|
constructor() {
|
|
1687
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
2018
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
1688
2019
|
}
|
|
1689
2020
|
|
|
1690
2021
|
/**
|
|
@@ -2072,9 +2403,9 @@ var plusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width"
|
|
|
2072
2403
|
|
|
2073
2404
|
var minusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","height":"var(--auro-size-lg, var(--ds-size-300, 1.5rem))","xmlns":"http://www.w3.org/2000/svg","xmlns_xlink":"http://www.w3.org/1999/xlink","viewBox":"0 0 24 24","path":"/icons","style":"ico_squareLarge","type":"icon","name":"minus-lg","category":"interface","deprecated":true,"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-hidden=\"true\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><path d=\"M5.75 12.75h12.5a.75.75 0 1 0 0-1.5H5.75a.75.75 0 1 0 0 1.5\"/></svg>"};
|
|
2074
2405
|
|
|
2075
|
-
var colorCss$
|
|
2406
|
+
var colorCss$6 = i$5`.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)}`;
|
|
2076
2407
|
|
|
2077
|
-
var styleCss$
|
|
2408
|
+
var styleCss$8 = i$5`.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}`;
|
|
2078
2409
|
|
|
2079
2410
|
/* eslint-disable lit/binding-positions, lit/no-invalid-html, max-lines */
|
|
2080
2411
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -2232,14 +2563,14 @@ class AuroCounter extends i$2 {
|
|
|
2232
2563
|
* AuroCounter.register("custom-counter") // registers <custom-counter/>
|
|
2233
2564
|
*/
|
|
2234
2565
|
static register(name = "auro-counter") {
|
|
2235
|
-
AuroLibraryRuntimeUtils$
|
|
2566
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounter);
|
|
2236
2567
|
}
|
|
2237
2568
|
|
|
2238
2569
|
static get styles() {
|
|
2239
2570
|
return [
|
|
2240
2571
|
tokensCss$7,
|
|
2241
|
-
colorCss$
|
|
2242
|
-
styleCss$
|
|
2572
|
+
colorCss$6,
|
|
2573
|
+
styleCss$8
|
|
2243
2574
|
];
|
|
2244
2575
|
}
|
|
2245
2576
|
|
|
@@ -2378,14 +2709,13 @@ class AuroCounter extends i$2 {
|
|
|
2378
2709
|
<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}">
|
|
2379
2710
|
<auro-counter-button
|
|
2380
2711
|
aria-hidden="true"
|
|
2381
|
-
|
|
2382
|
-
tabindex="-1"
|
|
2712
|
+
tindex="-1"
|
|
2383
2713
|
part="controlMinus"
|
|
2384
2714
|
@click="${() => this.decrement()}"
|
|
2385
2715
|
?onDark="${this.onDark}"
|
|
2386
2716
|
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
2387
2717
|
>
|
|
2388
|
-
<${this.iconTag} class="controlIcon"
|
|
2718
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
2389
2719
|
</auro-counter-button>
|
|
2390
2720
|
|
|
2391
2721
|
<div class="quantityWrapper">
|
|
@@ -2394,14 +2724,13 @@ class AuroCounter extends i$2 {
|
|
|
2394
2724
|
|
|
2395
2725
|
<auro-counter-button
|
|
2396
2726
|
aria-hidden="true"
|
|
2397
|
-
|
|
2398
|
-
tabindex="-1"
|
|
2727
|
+
tindex="-1"
|
|
2399
2728
|
part="controlPlus"
|
|
2400
2729
|
@click="${() => this.increment()}"
|
|
2401
2730
|
?onDark="${this.onDark}"
|
|
2402
2731
|
?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
|
|
2403
2732
|
>
|
|
2404
|
-
<${this.iconTag} class="controlIcon"
|
|
2733
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(plusIcon)} </${this.iconTag}>
|
|
2405
2734
|
</auro-counter-button>
|
|
2406
2735
|
</div>
|
|
2407
2736
|
</div>
|
|
@@ -2409,7 +2738,7 @@ class AuroCounter extends i$2 {
|
|
|
2409
2738
|
}
|
|
2410
2739
|
}
|
|
2411
2740
|
|
|
2412
|
-
var styleCss$
|
|
2741
|
+
var styleCss$7 = i$5`: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}`;
|
|
2413
2742
|
|
|
2414
2743
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2415
2744
|
// See LICENSE in the project root for license information.
|
|
@@ -4698,7 +5027,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
4698
5027
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
4699
5028
|
*/
|
|
4700
5029
|
|
|
4701
|
-
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5030
|
+
let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
4702
5031
|
|
|
4703
5032
|
// function to define props used within the scope of this component
|
|
4704
5033
|
static get properties() {
|
|
@@ -4766,7 +5095,7 @@ var styleCss$2$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
4766
5095
|
*/
|
|
4767
5096
|
|
|
4768
5097
|
// build the component class
|
|
4769
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
5098
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
4770
5099
|
constructor() {
|
|
4771
5100
|
super();
|
|
4772
5101
|
this.onDark = false;
|
|
@@ -4838,9 +5167,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
4838
5167
|
}
|
|
4839
5168
|
};
|
|
4840
5169
|
|
|
4841
|
-
var tokensCss$2 = i$5`: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)}`;
|
|
5170
|
+
var tokensCss$2$1 = i$5`: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)}`;
|
|
4842
5171
|
|
|
4843
|
-
var colorCss$3 = i$5`: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)}`;
|
|
5172
|
+
var colorCss$3$1 = i$5`: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)}`;
|
|
4844
5173
|
|
|
4845
5174
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4846
5175
|
// See LICENSE in the project root for license information.
|
|
@@ -4998,9 +5327,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4998
5327
|
static get styles() {
|
|
4999
5328
|
return [
|
|
5000
5329
|
super.styles,
|
|
5001
|
-
i$5`${tokensCss$2}`,
|
|
5330
|
+
i$5`${tokensCss$2$1}`,
|
|
5002
5331
|
i$5`${styleCss$2$1}`,
|
|
5003
|
-
i$5`${colorCss$3}`
|
|
5332
|
+
i$5`${colorCss$3$1}`
|
|
5004
5333
|
];
|
|
5005
5334
|
}
|
|
5006
5335
|
|
|
@@ -5034,8 +5363,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5034
5363
|
async firstUpdated() {
|
|
5035
5364
|
await super.firstUpdated();
|
|
5036
5365
|
|
|
5037
|
-
|
|
5038
|
-
|
|
5366
|
+
/**
|
|
5367
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
5368
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
5369
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
5370
|
+
*/
|
|
5371
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5039
5372
|
const svgDesc = this.svg.querySelector('desc');
|
|
5040
5373
|
|
|
5041
5374
|
if (svgDesc) {
|
|
@@ -5085,7 +5418,7 @@ var styleCss$1$1 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);di
|
|
|
5085
5418
|
|
|
5086
5419
|
var colorCss$2$1 = i$5`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
5087
5420
|
|
|
5088
|
-
var tokensCss$1 = i$5`: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)}`;
|
|
5421
|
+
var tokensCss$1$1 = i$5`: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)}`;
|
|
5089
5422
|
|
|
5090
5423
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5091
5424
|
// See LICENSE in the project root for license information.
|
|
@@ -5125,7 +5458,7 @@ class AuroDropdownBib extends i$2 {
|
|
|
5125
5458
|
return [
|
|
5126
5459
|
styleCss$1$1,
|
|
5127
5460
|
colorCss$2$1,
|
|
5128
|
-
tokensCss$1
|
|
5461
|
+
tokensCss$1$1
|
|
5129
5462
|
];
|
|
5130
5463
|
}
|
|
5131
5464
|
|
|
@@ -5292,9 +5625,9 @@ var styleEmphasizedCss = i$5`:host{display:block}.layout-emphasized .chevron,.la
|
|
|
5292
5625
|
|
|
5293
5626
|
var styleSnowflakeCss = i$5`: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)}`;
|
|
5294
5627
|
|
|
5295
|
-
var colorCss$
|
|
5628
|
+
var colorCss$5 = i$5`: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)}`;
|
|
5296
5629
|
|
|
5297
|
-
var styleCss$
|
|
5630
|
+
var styleCss$6 = i$5`.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}`;
|
|
5298
5631
|
|
|
5299
5632
|
var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5300
5633
|
|
|
@@ -5305,7 +5638,7 @@ var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
5305
5638
|
|
|
5306
5639
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5307
5640
|
|
|
5308
|
-
let AuroLibraryRuntimeUtils$
|
|
5641
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
5309
5642
|
|
|
5310
5643
|
/* eslint-disable jsdoc/require-param */
|
|
5311
5644
|
|
|
@@ -5386,13 +5719,13 @@ class AuroHelpText extends i$2 {
|
|
|
5386
5719
|
this.onDark = false;
|
|
5387
5720
|
this.hasTextContent = false;
|
|
5388
5721
|
|
|
5389
|
-
AuroLibraryRuntimeUtils$
|
|
5722
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
5390
5723
|
}
|
|
5391
5724
|
|
|
5392
5725
|
static get styles() {
|
|
5393
5726
|
return [
|
|
5394
|
-
colorCss$
|
|
5395
|
-
styleCss$
|
|
5727
|
+
colorCss$5,
|
|
5728
|
+
styleCss$6,
|
|
5396
5729
|
tokensCss$3
|
|
5397
5730
|
];
|
|
5398
5731
|
}
|
|
@@ -5442,7 +5775,7 @@ class AuroHelpText extends i$2 {
|
|
|
5442
5775
|
*
|
|
5443
5776
|
*/
|
|
5444
5777
|
static register(name = "auro-helptext") {
|
|
5445
|
-
AuroLibraryRuntimeUtils$
|
|
5778
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
5446
5779
|
}
|
|
5447
5780
|
|
|
5448
5781
|
updated() {
|
|
@@ -6017,7 +6350,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6017
6350
|
static get styles() {
|
|
6018
6351
|
return [
|
|
6019
6352
|
colorCss$1$1,
|
|
6020
|
-
tokensCss$1,
|
|
6353
|
+
tokensCss$1$1,
|
|
6021
6354
|
|
|
6022
6355
|
// default layout
|
|
6023
6356
|
classicColorCss,
|
|
@@ -6442,202 +6775,1199 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6442
6775
|
`;
|
|
6443
6776
|
}
|
|
6444
6777
|
|
|
6445
|
-
/**
|
|
6446
|
-
* Returns HTML for the classic layout. Does not support type="*".
|
|
6447
|
-
* @private
|
|
6448
|
-
* @returns {html} - Returns HTML for the classic layout.
|
|
6449
|
-
*/
|
|
6450
|
-
renderLayoutClassic() {
|
|
6451
|
-
// TODO: check with Doug why this was never used?
|
|
6452
|
-
const helpTextClasses = {
|
|
6453
|
-
'helpText': true
|
|
6454
|
-
};
|
|
6778
|
+
/**
|
|
6779
|
+
* Returns HTML for the classic layout. Does not support type="*".
|
|
6780
|
+
* @private
|
|
6781
|
+
* @returns {html} - Returns HTML for the classic layout.
|
|
6782
|
+
*/
|
|
6783
|
+
renderLayoutClassic() {
|
|
6784
|
+
// TODO: check with Doug why this was never used?
|
|
6785
|
+
const helpTextClasses = {
|
|
6786
|
+
'helpText': true
|
|
6787
|
+
};
|
|
6788
|
+
|
|
6789
|
+
return u`
|
|
6790
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6791
|
+
`;
|
|
6792
|
+
}
|
|
6793
|
+
|
|
6794
|
+
/**
|
|
6795
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
6796
|
+
* @private
|
|
6797
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
6798
|
+
*/
|
|
6799
|
+
renderLayoutSnowflake() {
|
|
6800
|
+
const helpTextClasses = {
|
|
6801
|
+
'helpText': true,
|
|
6802
|
+
'leftIndent': true,
|
|
6803
|
+
'rightIndent': true
|
|
6804
|
+
};
|
|
6805
|
+
|
|
6806
|
+
return u`
|
|
6807
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6808
|
+
`;
|
|
6809
|
+
}
|
|
6810
|
+
|
|
6811
|
+
/**
|
|
6812
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
6813
|
+
* @private
|
|
6814
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
6815
|
+
*/
|
|
6816
|
+
renderLayoutEmphasized() {
|
|
6817
|
+
const helpTextClasses = {
|
|
6818
|
+
'helpText': true,
|
|
6819
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
6820
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
6821
|
+
};
|
|
6822
|
+
|
|
6823
|
+
return u`
|
|
6824
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6825
|
+
`;
|
|
6826
|
+
}
|
|
6827
|
+
|
|
6828
|
+
/**
|
|
6829
|
+
* Logic to determine the layout of the component.
|
|
6830
|
+
* @private
|
|
6831
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
6832
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
6833
|
+
*/
|
|
6834
|
+
renderLayout(ForcedLayout) {
|
|
6835
|
+
const layout = ForcedLayout || this.layout;
|
|
6836
|
+
|
|
6837
|
+
switch (layout) {
|
|
6838
|
+
case 'emphasized':
|
|
6839
|
+
return this.renderLayoutEmphasized();
|
|
6840
|
+
case 'emphasized-left':
|
|
6841
|
+
return this.renderLayoutEmphasized();
|
|
6842
|
+
case 'emphasized-right':
|
|
6843
|
+
return this.renderLayoutEmphasized();
|
|
6844
|
+
case 'snowflake':
|
|
6845
|
+
return this.renderLayoutSnowflake();
|
|
6846
|
+
case 'snowflake-left':
|
|
6847
|
+
return this.renderLayoutSnowflake();
|
|
6848
|
+
case 'snowflake-right':
|
|
6849
|
+
return this.renderLayoutSnowflake();
|
|
6850
|
+
default:
|
|
6851
|
+
return this.renderLayoutClassic();
|
|
6852
|
+
}
|
|
6853
|
+
}
|
|
6854
|
+
}
|
|
6855
|
+
|
|
6856
|
+
var dropdownVersion = '3.0.0';
|
|
6857
|
+
|
|
6858
|
+
var colorCss$3 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
6859
|
+
|
|
6860
|
+
var styleCss$4 = i$5`#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)}`;
|
|
6861
|
+
|
|
6862
|
+
var tokenCss = i$5`: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)}`;
|
|
6863
|
+
|
|
6864
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6865
|
+
// See LICENSE in the project root for license information.
|
|
6866
|
+
|
|
6867
|
+
// ---------------------------------------------------------------------
|
|
6868
|
+
|
|
6869
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6870
|
+
|
|
6871
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
6872
|
+
|
|
6873
|
+
/* eslint-disable jsdoc/require-param */
|
|
6874
|
+
|
|
6875
|
+
/**
|
|
6876
|
+
* This will register a new custom element with the browser.
|
|
6877
|
+
* @param {String} name - The name of the custom element.
|
|
6878
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6879
|
+
* @returns {void}
|
|
6880
|
+
*/
|
|
6881
|
+
registerComponent(name, componentClass) {
|
|
6882
|
+
if (!customElements.get(name)) {
|
|
6883
|
+
customElements.define(name, class extends componentClass {});
|
|
6884
|
+
}
|
|
6885
|
+
}
|
|
6886
|
+
|
|
6887
|
+
/**
|
|
6888
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6889
|
+
* @returns {void}
|
|
6890
|
+
*/
|
|
6891
|
+
closestElement(
|
|
6892
|
+
selector, // selector like in .closest()
|
|
6893
|
+
base = this, // extra functionality to skip a parent
|
|
6894
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6895
|
+
!el || el === document || el === window
|
|
6896
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6897
|
+
: found
|
|
6898
|
+
? found // found a selector INside this element
|
|
6899
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6900
|
+
) {
|
|
6901
|
+
return __Closest(base);
|
|
6902
|
+
}
|
|
6903
|
+
/* eslint-enable jsdoc/require-param */
|
|
6904
|
+
|
|
6905
|
+
/**
|
|
6906
|
+
* 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.
|
|
6907
|
+
* @param {Object} elem - The element to check.
|
|
6908
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6909
|
+
* @returns {void}
|
|
6910
|
+
*/
|
|
6911
|
+
handleComponentTagRename(elem, tagName) {
|
|
6912
|
+
const tag = tagName.toLowerCase();
|
|
6913
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6914
|
+
|
|
6915
|
+
if (elemTag !== tag) {
|
|
6916
|
+
elem.setAttribute(tag, true);
|
|
6917
|
+
}
|
|
6918
|
+
}
|
|
6919
|
+
|
|
6920
|
+
/**
|
|
6921
|
+
* Validates if an element is a specific Auro component.
|
|
6922
|
+
* @param {Object} elem - The element to validate.
|
|
6923
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6924
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6925
|
+
*/
|
|
6926
|
+
elementMatch(elem, tagName) {
|
|
6927
|
+
const tag = tagName.toLowerCase();
|
|
6928
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6929
|
+
|
|
6930
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6931
|
+
}
|
|
6932
|
+
};
|
|
6933
|
+
|
|
6934
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6935
|
+
// See LICENSE in the project root for license information.
|
|
6936
|
+
|
|
6937
|
+
|
|
6938
|
+
class AuroDependencyVersioning {
|
|
6939
|
+
|
|
6940
|
+
/**
|
|
6941
|
+
* Generates a unique string to be used for child auro element naming.
|
|
6942
|
+
* @private
|
|
6943
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
6944
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
6945
|
+
* @returns {string} - Unique string to be used for naming.
|
|
6946
|
+
*/
|
|
6947
|
+
generateElementName(baseName, version) {
|
|
6948
|
+
let result = baseName;
|
|
6949
|
+
|
|
6950
|
+
result += '-';
|
|
6951
|
+
result += version.replace(/[.]/g, '_');
|
|
6952
|
+
|
|
6953
|
+
return result;
|
|
6954
|
+
}
|
|
6955
|
+
|
|
6956
|
+
/**
|
|
6957
|
+
* Generates a unique string to be used for child auro element naming.
|
|
6958
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
6959
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
6960
|
+
* @returns {string} - Unique string to be used for naming.
|
|
6961
|
+
*/
|
|
6962
|
+
generateTag(baseName, version, tagClass) {
|
|
6963
|
+
const elementName = this.generateElementName(baseName, version);
|
|
6964
|
+
const tag = i$1`${s(elementName)}`;
|
|
6965
|
+
|
|
6966
|
+
if (!customElements.get(elementName)) {
|
|
6967
|
+
customElements.define(elementName, class extends tagClass {});
|
|
6968
|
+
}
|
|
6969
|
+
|
|
6970
|
+
return tag;
|
|
6971
|
+
}
|
|
6972
|
+
}
|
|
6973
|
+
|
|
6974
|
+
/**
|
|
6975
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6976
|
+
*/
|
|
6977
|
+
const _observers = new WeakMap();
|
|
6978
|
+
|
|
6979
|
+
/**
|
|
6980
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6981
|
+
* Structure: {
|
|
6982
|
+
* host: {
|
|
6983
|
+
* matchers: Set<Function>,
|
|
6984
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6985
|
+
* }
|
|
6986
|
+
* }
|
|
6987
|
+
*/
|
|
6988
|
+
const _transportConfig = new WeakMap();
|
|
6989
|
+
|
|
6990
|
+
/**
|
|
6991
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6992
|
+
*
|
|
6993
|
+
* @param {Object} params - The parameters for the function.
|
|
6994
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6995
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6996
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6997
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6998
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6999
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
7000
|
+
*/
|
|
7001
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
7002
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
7003
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
7004
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
7005
|
+
}
|
|
7006
|
+
|
|
7007
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
7008
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
7009
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
7010
|
+
}
|
|
7011
|
+
|
|
7012
|
+
// Guard Clause: Ensure match is a function
|
|
7013
|
+
if (typeof match !== 'function') {
|
|
7014
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
7015
|
+
}
|
|
7016
|
+
|
|
7017
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
7018
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
7019
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
7020
|
+
}
|
|
7021
|
+
|
|
7022
|
+
// Register this transport and get cleanup function
|
|
7023
|
+
return _registerTransport({
|
|
7024
|
+
host,
|
|
7025
|
+
target,
|
|
7026
|
+
matcher: match,
|
|
7027
|
+
removeOriginal
|
|
7028
|
+
});
|
|
7029
|
+
};
|
|
7030
|
+
|
|
7031
|
+
/**
|
|
7032
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
7033
|
+
*
|
|
7034
|
+
* @param {Object} params - The parameters object.
|
|
7035
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
7036
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
7037
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
7038
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
7039
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
7040
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
7041
|
+
* @private
|
|
7042
|
+
*/
|
|
7043
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
7044
|
+
// Initialize config for this host if it doesn't exist
|
|
7045
|
+
if (!_transportConfig.has(host)) {
|
|
7046
|
+
_transportConfig.set(host, {
|
|
7047
|
+
matchers: new Set(),
|
|
7048
|
+
targets: new Map()
|
|
7049
|
+
});
|
|
7050
|
+
}
|
|
7051
|
+
|
|
7052
|
+
const config = _transportConfig.get(host);
|
|
7053
|
+
|
|
7054
|
+
// Add the matcher to the set of matchers for this host
|
|
7055
|
+
config.matchers.add(matcher);
|
|
7056
|
+
|
|
7057
|
+
// Initialize target entry if it doesn't exist
|
|
7058
|
+
if (!config.targets.has(target)) {
|
|
7059
|
+
config.targets.set(target, new Map());
|
|
7060
|
+
}
|
|
7061
|
+
|
|
7062
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
7063
|
+
config.targets.get(target).set(matcher, {
|
|
7064
|
+
removeOriginal,
|
|
7065
|
+
currentAttributes: new Map()
|
|
7066
|
+
});
|
|
7067
|
+
|
|
7068
|
+
// Perform initial attribute transport
|
|
7069
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
7070
|
+
|
|
7071
|
+
// Attach observer
|
|
7072
|
+
_attachObserver(host);
|
|
7073
|
+
|
|
7074
|
+
// Return cleanup function and utility functions
|
|
7075
|
+
return {
|
|
7076
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
7077
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
7078
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
7079
|
+
}
|
|
7080
|
+
};
|
|
7081
|
+
|
|
7082
|
+
/**
|
|
7083
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
7084
|
+
*
|
|
7085
|
+
* @param {HTMLElement} host - The host element
|
|
7086
|
+
* @param {HTMLElement} target - The target element
|
|
7087
|
+
* @param {Function} matcher - The matcher function
|
|
7088
|
+
* @private
|
|
7089
|
+
*/
|
|
7090
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
7091
|
+
const config = _transportConfig.get(host);
|
|
7092
|
+
if (!config) return;
|
|
7093
|
+
|
|
7094
|
+
// Remove this matcher from this target
|
|
7095
|
+
const targetMatchers = config.targets.get(target);
|
|
7096
|
+
if (targetMatchers) {
|
|
7097
|
+
targetMatchers.delete(matcher);
|
|
7098
|
+
|
|
7099
|
+
// If this target has no more matchers, remove it
|
|
7100
|
+
if (targetMatchers.size === 0) {
|
|
7101
|
+
config.targets.delete(target);
|
|
7102
|
+
}
|
|
7103
|
+
}
|
|
7104
|
+
|
|
7105
|
+
// Check if this matcher is still used by any target
|
|
7106
|
+
let matcherStillUsed = false;
|
|
7107
|
+
for (const matcherMap of config.targets.values()) {
|
|
7108
|
+
if (matcherMap.has(matcher)) {
|
|
7109
|
+
matcherStillUsed = true;
|
|
7110
|
+
break;
|
|
7111
|
+
}
|
|
7112
|
+
}
|
|
7113
|
+
|
|
7114
|
+
// If not used anymore, remove from matchers set
|
|
7115
|
+
if (!matcherStillUsed) {
|
|
7116
|
+
config.matchers.delete(matcher);
|
|
7117
|
+
}
|
|
7118
|
+
|
|
7119
|
+
// If no more targets or matchers, detach observer
|
|
7120
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
7121
|
+
_detachObserver(host);
|
|
7122
|
+
}
|
|
7123
|
+
};
|
|
7124
|
+
|
|
7125
|
+
/**
|
|
7126
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
7127
|
+
*
|
|
7128
|
+
* @param {Object} params - The parameters object.
|
|
7129
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
7130
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
7131
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
7132
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
7133
|
+
* @returns {void}
|
|
7134
|
+
* @private
|
|
7135
|
+
*/
|
|
7136
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
7137
|
+
// Get a list of all matching attributes on the host element and their values
|
|
7138
|
+
const matchingAttributes = host.getAttributeNames()
|
|
7139
|
+
.filter(attr => matcher(attr))
|
|
7140
|
+
.reduce((acc, attr) => {
|
|
7141
|
+
acc[attr] = host.getAttribute(attr);
|
|
7142
|
+
return acc;
|
|
7143
|
+
}, {});
|
|
7144
|
+
|
|
7145
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
7146
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
7147
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
7148
|
+
target.setAttribute(key, value);
|
|
7149
|
+
if (removeOriginal) {
|
|
7150
|
+
host.removeAttribute(key);
|
|
7151
|
+
}
|
|
7152
|
+
});
|
|
7153
|
+
};
|
|
7154
|
+
|
|
7155
|
+
/**
|
|
7156
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
7157
|
+
*
|
|
7158
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
7159
|
+
* @returns {MutationObserver} The observer instance.
|
|
7160
|
+
* @private
|
|
7161
|
+
*/
|
|
7162
|
+
const _attachObserver = (host) => {
|
|
7163
|
+
// If an observer for this host already exists, return it
|
|
7164
|
+
if (_observers.has(host)) {
|
|
7165
|
+
return _observers.get(host);
|
|
7166
|
+
}
|
|
7167
|
+
|
|
7168
|
+
// Create a new MutationObserver
|
|
7169
|
+
const observer = new MutationObserver((mutations) => {
|
|
7170
|
+
const config = _transportConfig.get(host);
|
|
7171
|
+
if (!config) return;
|
|
7172
|
+
|
|
7173
|
+
// For each mutation affecting attributes
|
|
7174
|
+
mutations
|
|
7175
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
7176
|
+
.forEach(mutation => {
|
|
7177
|
+
const attributeName = mutation.attributeName;
|
|
7178
|
+
|
|
7179
|
+
// Find matchers that care about this attribute
|
|
7180
|
+
for (const matcher of config.matchers) {
|
|
7181
|
+
if (matcher(attributeName)) {
|
|
7182
|
+
// For each target that uses this matcher
|
|
7183
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
7184
|
+
if (matcherConfigs.has(matcher)) {
|
|
7185
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
7186
|
+
_transportAttributes({
|
|
7187
|
+
host,
|
|
7188
|
+
target,
|
|
7189
|
+
matcher,
|
|
7190
|
+
removeOriginal
|
|
7191
|
+
});
|
|
7192
|
+
}
|
|
7193
|
+
}
|
|
7194
|
+
}
|
|
7195
|
+
}
|
|
7196
|
+
});
|
|
7197
|
+
});
|
|
7198
|
+
|
|
7199
|
+
// Start observing attribute changes
|
|
7200
|
+
observer.observe(host, { attributes: true });
|
|
7201
|
+
|
|
7202
|
+
// Store the observer
|
|
7203
|
+
_observers.set(host, observer);
|
|
7204
|
+
|
|
7205
|
+
return observer;
|
|
7206
|
+
};
|
|
7207
|
+
|
|
7208
|
+
/**
|
|
7209
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
7210
|
+
*
|
|
7211
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
7212
|
+
* @private
|
|
7213
|
+
*/
|
|
7214
|
+
const _detachObserver = (host) => {
|
|
7215
|
+
if (_observers.has(host)) {
|
|
7216
|
+
const observer = _observers.get(host);
|
|
7217
|
+
observer.disconnect();
|
|
7218
|
+
_observers.delete(host);
|
|
7219
|
+
}
|
|
7220
|
+
|
|
7221
|
+
// Clean up the transport config as well
|
|
7222
|
+
if (_transportConfig.has(host)) {
|
|
7223
|
+
_transportConfig.delete(host);
|
|
7224
|
+
}
|
|
7225
|
+
};
|
|
7226
|
+
|
|
7227
|
+
/**
|
|
7228
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
7229
|
+
* @param {HTMLElement} host - The host element
|
|
7230
|
+
* @param {HTMLElement} target - The target element
|
|
7231
|
+
* @param {Function} matcher - The matcher function
|
|
7232
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
7233
|
+
* @private
|
|
7234
|
+
*/
|
|
7235
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
7236
|
+
const config = _transportConfig.get(host);
|
|
7237
|
+
if (!config) return undefined;
|
|
7238
|
+
|
|
7239
|
+
const targetMatchers = config.targets.get(target);
|
|
7240
|
+
if (!targetMatchers) return undefined;
|
|
7241
|
+
|
|
7242
|
+
return targetMatchers.get(matcher);
|
|
7243
|
+
};
|
|
7244
|
+
|
|
7245
|
+
/**
|
|
7246
|
+
* Sets an observed attribute value
|
|
7247
|
+
* @param {HTMLElement} host - The host element
|
|
7248
|
+
* @param {HTMLElement} target - The target element
|
|
7249
|
+
* @param {Function} matcher - The matcher function
|
|
7250
|
+
* @param {string} key - The attribute name
|
|
7251
|
+
* @param {string} value - The attribute value
|
|
7252
|
+
* @private
|
|
7253
|
+
*/
|
|
7254
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
7255
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7256
|
+
if (matcherConfig) {
|
|
7257
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
7258
|
+
}
|
|
7259
|
+
};
|
|
7260
|
+
|
|
7261
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
7262
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7263
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
7264
|
+
return undefined;
|
|
7265
|
+
};
|
|
7266
|
+
|
|
7267
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
7268
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7269
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
7270
|
+
return [];
|
|
7271
|
+
};
|
|
7272
|
+
|
|
7273
|
+
const _matchers = {
|
|
7274
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
7275
|
+
'role': attr => attr.match(/^role$/)
|
|
7276
|
+
};
|
|
7277
|
+
|
|
7278
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
7279
|
+
return transportAttributes({
|
|
7280
|
+
host,
|
|
7281
|
+
target,
|
|
7282
|
+
match: attr => {
|
|
7283
|
+
for (const key in _matchers) {
|
|
7284
|
+
if (_matchers[key](attr)) return true;
|
|
7285
|
+
}
|
|
7286
|
+
return false;
|
|
7287
|
+
},
|
|
7288
|
+
removeOriginal
|
|
7289
|
+
});
|
|
7290
|
+
};
|
|
7291
|
+
|
|
7292
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
7293
|
+
|
|
7294
|
+
/**
|
|
7295
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
7296
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
7297
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
7298
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
7299
|
+
* @private
|
|
7300
|
+
*/
|
|
7301
|
+
attributeWatcher;
|
|
7302
|
+
|
|
7303
|
+
static get properties() {
|
|
7304
|
+
return {
|
|
7305
|
+
|
|
7306
|
+
/**
|
|
7307
|
+
* Defines the layout of an element.
|
|
7308
|
+
* @default {'default'}
|
|
7309
|
+
*/
|
|
7310
|
+
layout: {
|
|
7311
|
+
type: String,
|
|
7312
|
+
attribute: "layout",
|
|
7313
|
+
reflect: true
|
|
7314
|
+
},
|
|
7315
|
+
|
|
7316
|
+
/**
|
|
7317
|
+
* Defines the shape of an element.
|
|
7318
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
7319
|
+
* @default {'default'}
|
|
7320
|
+
*/
|
|
7321
|
+
shape: {
|
|
7322
|
+
type: String,
|
|
7323
|
+
attribute: "shape",
|
|
7324
|
+
reflect: true
|
|
7325
|
+
},
|
|
7326
|
+
|
|
7327
|
+
/**
|
|
7328
|
+
* Defines the size of an element.
|
|
7329
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
7330
|
+
* @default {'md'}
|
|
7331
|
+
*/
|
|
7332
|
+
size: {
|
|
7333
|
+
type: String,
|
|
7334
|
+
attribute: "size",
|
|
7335
|
+
reflect: true
|
|
7336
|
+
},
|
|
7337
|
+
|
|
7338
|
+
/**
|
|
7339
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
7340
|
+
* @default {false}
|
|
7341
|
+
*/
|
|
7342
|
+
onDark: {
|
|
7343
|
+
type: Boolean,
|
|
7344
|
+
attribute: "ondark",
|
|
7345
|
+
reflect: true
|
|
7346
|
+
},
|
|
7347
|
+
|
|
7348
|
+
/**
|
|
7349
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
7350
|
+
* This is used to apply layout and shape classes dynamically.
|
|
7351
|
+
* @type {HTMLElement|null}
|
|
7352
|
+
* @default {null}
|
|
7353
|
+
* @private
|
|
7354
|
+
*/
|
|
7355
|
+
wrapper: {
|
|
7356
|
+
type: HTMLElement,
|
|
7357
|
+
attribute: false,
|
|
7358
|
+
reflect: false
|
|
7359
|
+
}
|
|
7360
|
+
};
|
|
7361
|
+
}
|
|
7362
|
+
|
|
7363
|
+
|
|
7364
|
+
|
|
7365
|
+
resetShapeClasses() {
|
|
7366
|
+
if (this.shape && this.size) {
|
|
7367
|
+
|
|
7368
|
+
if (this.wrapper) {
|
|
7369
|
+
this.wrapper.classList.forEach((className) => {
|
|
7370
|
+
if (className.startsWith('shape-')) {
|
|
7371
|
+
this.wrapper.classList.remove(className);
|
|
7372
|
+
}
|
|
7373
|
+
});
|
|
7374
|
+
|
|
7375
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
7376
|
+
}
|
|
7377
|
+
}
|
|
7378
|
+
}
|
|
7379
|
+
|
|
7380
|
+
resetLayoutClasses() {
|
|
7381
|
+
if (this.layout) {
|
|
7382
|
+
if (this.wrapper) {
|
|
7383
|
+
this.wrapper.classList.forEach((className) => {
|
|
7384
|
+
if (className.startsWith('layout-')) {
|
|
7385
|
+
this.wrapper.classList.remove(className);
|
|
7386
|
+
}
|
|
7387
|
+
});
|
|
7388
|
+
|
|
7389
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
7390
|
+
}
|
|
7391
|
+
}
|
|
7392
|
+
}
|
|
7393
|
+
|
|
7394
|
+
updateComponentArchitecture() {
|
|
7395
|
+
this.resetLayoutClasses();
|
|
7396
|
+
this.resetShapeClasses();
|
|
7397
|
+
}
|
|
7398
|
+
|
|
7399
|
+
updated(changedProperties) {
|
|
7400
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
7401
|
+
this.updateComponentArchitecture();
|
|
7402
|
+
}
|
|
7403
|
+
}
|
|
7404
|
+
|
|
7405
|
+
firstUpdated() {
|
|
7406
|
+
super.firstUpdated();
|
|
7407
|
+
|
|
7408
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
7409
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
7410
|
+
|
|
7411
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
7412
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
7413
|
+
}
|
|
7414
|
+
|
|
7415
|
+
disconnectedCallback() {
|
|
7416
|
+
super.disconnectedCallback();
|
|
7417
|
+
|
|
7418
|
+
// Cleanup the ARIA observer if it exists
|
|
7419
|
+
if (this.attributeWatcher) {
|
|
7420
|
+
this.attributeWatcher.cleanup();
|
|
7421
|
+
this.attributeWatcher = null;
|
|
7422
|
+
}
|
|
7423
|
+
}
|
|
7424
|
+
|
|
7425
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
7426
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
7427
|
+
render() {
|
|
7428
|
+
try {
|
|
7429
|
+
return this.renderLayout();
|
|
7430
|
+
} catch (error) {
|
|
7431
|
+
// failed to get the defined layout
|
|
7432
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
7433
|
+
|
|
7434
|
+
// fallback to the default layout
|
|
7435
|
+
return this.getLayout('default');
|
|
7436
|
+
}
|
|
7437
|
+
}
|
|
7438
|
+
};
|
|
7439
|
+
|
|
7440
|
+
var styleCss$3 = i$5`: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}`;
|
|
7441
|
+
|
|
7442
|
+
var colorCss$2 = i$5`[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)}`;
|
|
7443
|
+
|
|
7444
|
+
var tokensCss$2 = i$5`: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}`;
|
|
7445
|
+
|
|
7446
|
+
var shapeSize = i$5`.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}`;
|
|
7447
|
+
|
|
7448
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7449
|
+
// See LICENSE in the project root for license information.
|
|
7450
|
+
|
|
7451
|
+
// ---------------------------------------------------------------------
|
|
7452
|
+
|
|
7453
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7454
|
+
|
|
7455
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
7456
|
+
|
|
7457
|
+
/* eslint-disable jsdoc/require-param */
|
|
7458
|
+
|
|
7459
|
+
/**
|
|
7460
|
+
* This will register a new custom element with the browser.
|
|
7461
|
+
* @param {String} name - The name of the custom element.
|
|
7462
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7463
|
+
* @returns {void}
|
|
7464
|
+
*/
|
|
7465
|
+
registerComponent(name, componentClass) {
|
|
7466
|
+
if (!customElements.get(name)) {
|
|
7467
|
+
customElements.define(name, class extends componentClass {});
|
|
7468
|
+
}
|
|
7469
|
+
}
|
|
7470
|
+
|
|
7471
|
+
/**
|
|
7472
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7473
|
+
* @returns {void}
|
|
7474
|
+
*/
|
|
7475
|
+
closestElement(
|
|
7476
|
+
selector, // selector like in .closest()
|
|
7477
|
+
base = this, // extra functionality to skip a parent
|
|
7478
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7479
|
+
!el || el === document || el === window
|
|
7480
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7481
|
+
: found
|
|
7482
|
+
? found // found a selector INside this element
|
|
7483
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7484
|
+
) {
|
|
7485
|
+
return __Closest(base);
|
|
7486
|
+
}
|
|
7487
|
+
/* eslint-enable jsdoc/require-param */
|
|
7488
|
+
|
|
7489
|
+
/**
|
|
7490
|
+
* 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.
|
|
7491
|
+
* @param {Object} elem - The element to check.
|
|
7492
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7493
|
+
* @returns {void}
|
|
7494
|
+
*/
|
|
7495
|
+
handleComponentTagRename(elem, tagName) {
|
|
7496
|
+
const tag = tagName.toLowerCase();
|
|
7497
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7498
|
+
|
|
7499
|
+
if (elemTag !== tag) {
|
|
7500
|
+
elem.setAttribute(tag, true);
|
|
7501
|
+
}
|
|
7502
|
+
}
|
|
7503
|
+
|
|
7504
|
+
/**
|
|
7505
|
+
* Validates if an element is a specific Auro component.
|
|
7506
|
+
* @param {Object} elem - The element to validate.
|
|
7507
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7508
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7509
|
+
*/
|
|
7510
|
+
elementMatch(elem, tagName) {
|
|
7511
|
+
const tag = tagName.toLowerCase();
|
|
7512
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7513
|
+
|
|
7514
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7515
|
+
}
|
|
7516
|
+
};
|
|
7517
|
+
|
|
7518
|
+
var styleCss$2 = i$5`: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}}`;
|
|
7519
|
+
|
|
7520
|
+
var colorCss$1 = i$5`: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}`;
|
|
7521
|
+
|
|
7522
|
+
var tokensCss$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
7523
|
+
|
|
7524
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7525
|
+
// See LICENSE in the project root for license information.
|
|
7526
|
+
|
|
7527
|
+
|
|
7528
|
+
class AuroLoader extends i$2 {
|
|
7529
|
+
constructor() {
|
|
7530
|
+
super();
|
|
7531
|
+
|
|
7532
|
+
/**
|
|
7533
|
+
* @private
|
|
7534
|
+
*/
|
|
7535
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
7536
|
+
|
|
7537
|
+
/**
|
|
7538
|
+
* @private
|
|
7539
|
+
*/
|
|
7540
|
+
this.mdCount = 3;
|
|
7541
|
+
|
|
7542
|
+
/**
|
|
7543
|
+
* @private
|
|
7544
|
+
*/
|
|
7545
|
+
this.smCount = 2;
|
|
7546
|
+
|
|
7547
|
+
/**
|
|
7548
|
+
* @private
|
|
7549
|
+
*/
|
|
7550
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
7551
|
+
|
|
7552
|
+
this.orbit = false;
|
|
7553
|
+
this.ringworm = false;
|
|
7554
|
+
this.laser = false;
|
|
7555
|
+
this.pulse = false;
|
|
7556
|
+
}
|
|
7557
|
+
|
|
7558
|
+
// function to define props used within the scope of this component
|
|
7559
|
+
static get properties() {
|
|
7560
|
+
return {
|
|
7561
|
+
|
|
7562
|
+
/**
|
|
7563
|
+
* Sets loader to laser type.
|
|
7564
|
+
*/
|
|
7565
|
+
laser: {
|
|
7566
|
+
type: Boolean,
|
|
7567
|
+
reflect: true
|
|
7568
|
+
},
|
|
7569
|
+
|
|
7570
|
+
/**
|
|
7571
|
+
* Sets loader to orbit type.
|
|
7572
|
+
*/
|
|
7573
|
+
orbit: {
|
|
7574
|
+
type: Boolean,
|
|
7575
|
+
reflect: true
|
|
7576
|
+
},
|
|
7577
|
+
|
|
7578
|
+
/**
|
|
7579
|
+
* Sets loader to pulse type.
|
|
7580
|
+
*/
|
|
7581
|
+
pulse: {
|
|
7582
|
+
type: Boolean,
|
|
7583
|
+
reflect: true
|
|
7584
|
+
},
|
|
7585
|
+
|
|
7586
|
+
/**
|
|
7587
|
+
* Sets loader to ringworm type.
|
|
7588
|
+
*/
|
|
7589
|
+
ringworm: {
|
|
7590
|
+
type: Boolean,
|
|
7591
|
+
reflect: true
|
|
7592
|
+
}
|
|
7593
|
+
};
|
|
7594
|
+
}
|
|
7595
|
+
|
|
7596
|
+
static get styles() {
|
|
7597
|
+
return [
|
|
7598
|
+
i$5`${styleCss$2}`,
|
|
7599
|
+
i$5`${colorCss$1}`,
|
|
7600
|
+
i$5`${tokensCss$1}`
|
|
7601
|
+
];
|
|
7602
|
+
}
|
|
7603
|
+
|
|
7604
|
+
/**
|
|
7605
|
+
* This will register this element with the browser.
|
|
7606
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
7607
|
+
*
|
|
7608
|
+
* @example
|
|
7609
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
7610
|
+
*
|
|
7611
|
+
*/
|
|
7612
|
+
static register(name = "auro-loader") {
|
|
7613
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
7614
|
+
}
|
|
7615
|
+
|
|
7616
|
+
firstUpdated() {
|
|
7617
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
7618
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
7619
|
+
}
|
|
7620
|
+
|
|
7621
|
+
connectedCallback() {
|
|
7622
|
+
super.connectedCallback();
|
|
7623
|
+
}
|
|
7624
|
+
|
|
7625
|
+
/**
|
|
7626
|
+
* @private
|
|
7627
|
+
* @returns {Array} Numbered array for template map.
|
|
7628
|
+
*/
|
|
7629
|
+
defineTemplate() {
|
|
7630
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
7631
|
+
|
|
7632
|
+
if (this.orbit || this.laser) {
|
|
7633
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
7634
|
+
} else if (this.ringworm) {
|
|
7635
|
+
nodes = Array.from(Array(0).keys());
|
|
7636
|
+
}
|
|
7637
|
+
|
|
7638
|
+
return nodes;
|
|
7639
|
+
}
|
|
7640
|
+
|
|
7641
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7642
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7643
|
+
|
|
7644
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
7645
|
+
render() {
|
|
7646
|
+
return x`
|
|
7647
|
+
${this.defineTemplate().map((idx) => x`
|
|
7648
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
7649
|
+
`)}
|
|
7650
|
+
|
|
7651
|
+
<div class="no-animation">Loading...</div>
|
|
7652
|
+
|
|
7653
|
+
${this.ringworm ? x`
|
|
7654
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
7655
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
7656
|
+
</svg>`
|
|
7657
|
+
: ``
|
|
7658
|
+
}
|
|
7659
|
+
`;
|
|
7660
|
+
}
|
|
7661
|
+
}
|
|
7662
|
+
|
|
7663
|
+
var loaderVersion = '5.0.0';
|
|
7664
|
+
|
|
7665
|
+
/* eslint-disable max-lines, curly */
|
|
7666
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7667
|
+
// See LICENSE in the project root for license information.
|
|
7668
|
+
|
|
7669
|
+
|
|
7670
|
+
/**
|
|
7671
|
+
* @slot - Default slot for the text of the button.
|
|
7672
|
+
* @slot icon - Slot to provide auro-icon for the button.
|
|
7673
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
7674
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
7675
|
+
* @csspart text - Apply CSS to text slot.
|
|
7676
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
7677
|
+
*/
|
|
7678
|
+
|
|
7679
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
7680
|
+
|
|
7681
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7682
|
+
|
|
7683
|
+
/**
|
|
7684
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7685
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7686
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7687
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7688
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7689
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7690
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7691
|
+
*/
|
|
7692
|
+
class AuroButton extends AuroElement$1 {
|
|
7693
|
+
|
|
7694
|
+
/**
|
|
7695
|
+
* Enables form association for this element.
|
|
7696
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
7697
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
7698
|
+
*/
|
|
7699
|
+
static get formAssociated() {
|
|
7700
|
+
return true;
|
|
7701
|
+
}
|
|
7702
|
+
|
|
7703
|
+
constructor() {
|
|
7704
|
+
super();
|
|
7705
|
+
this.autofocus = false;
|
|
7706
|
+
this.disabled = false;
|
|
7707
|
+
this.loading = false;
|
|
7708
|
+
this.size = "md";
|
|
7709
|
+
this.shape = "rounded";
|
|
7710
|
+
this.onDark = false;
|
|
7711
|
+
this.fluid = false;
|
|
7712
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
7713
|
+
|
|
7714
|
+
// Support for HTML5 forms
|
|
7715
|
+
if (typeof this.attachInternals === 'function') {
|
|
7716
|
+
this.internals = this.attachInternals();
|
|
7717
|
+
} else {
|
|
7718
|
+
this.internals = null;
|
|
7719
|
+
|
|
7720
|
+
// eslint-disable-next-line no-console
|
|
7721
|
+
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.');
|
|
7722
|
+
}
|
|
7723
|
+
|
|
7724
|
+
/**
|
|
7725
|
+
* Generate unique names for dependency components.
|
|
7726
|
+
*/
|
|
7727
|
+
const versioning = new AuroDependencyVersioning();
|
|
7728
|
+
|
|
7729
|
+
/**
|
|
7730
|
+
* @private
|
|
7731
|
+
*/
|
|
7732
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7733
|
+
}
|
|
7734
|
+
|
|
7735
|
+
static get styles() {
|
|
7736
|
+
return [
|
|
7737
|
+
tokensCss$2,
|
|
7738
|
+
styleCss$3,
|
|
7739
|
+
colorCss$2,
|
|
7740
|
+
shapeSize
|
|
7741
|
+
];
|
|
7742
|
+
}
|
|
7743
|
+
|
|
7744
|
+
static get properties() {
|
|
7745
|
+
return {
|
|
7746
|
+
|
|
7747
|
+
...super.properties,
|
|
7748
|
+
|
|
7749
|
+
/**
|
|
7750
|
+
* Override layout since it isn't used in this component.
|
|
7751
|
+
* @private
|
|
7752
|
+
*/
|
|
7753
|
+
layout: {
|
|
7754
|
+
type: Boolean,
|
|
7755
|
+
attribute: false,
|
|
7756
|
+
reflect: false
|
|
7757
|
+
},
|
|
7758
|
+
|
|
7759
|
+
/**
|
|
7760
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
7761
|
+
*/
|
|
7762
|
+
autofocus: {
|
|
7763
|
+
type: Boolean,
|
|
7764
|
+
reflect: true
|
|
7765
|
+
},
|
|
7766
|
+
|
|
7767
|
+
/**
|
|
7768
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
7769
|
+
*/
|
|
7770
|
+
disabled: {
|
|
7771
|
+
type: Boolean,
|
|
7772
|
+
reflect: true
|
|
7773
|
+
},
|
|
7774
|
+
|
|
7775
|
+
/**
|
|
7776
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
7777
|
+
*/
|
|
7778
|
+
fluid: {
|
|
7779
|
+
type: Boolean,
|
|
7780
|
+
reflect: true
|
|
7781
|
+
},
|
|
7782
|
+
|
|
7783
|
+
/**
|
|
7784
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
7785
|
+
*/
|
|
7786
|
+
loading: {
|
|
7787
|
+
type: Boolean,
|
|
7788
|
+
reflect: true
|
|
7789
|
+
},
|
|
7790
|
+
|
|
7791
|
+
/**
|
|
7792
|
+
* 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.
|
|
7793
|
+
*/
|
|
7794
|
+
loadingText: {
|
|
7795
|
+
type: String
|
|
7796
|
+
},
|
|
7797
|
+
|
|
7798
|
+
/**
|
|
7799
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
7800
|
+
*/
|
|
7801
|
+
tIndex: {
|
|
7802
|
+
type: String,
|
|
7803
|
+
reflect: true
|
|
7804
|
+
},
|
|
6455
7805
|
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
7806
|
+
/**
|
|
7807
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
7808
|
+
*/
|
|
7809
|
+
title: {
|
|
7810
|
+
type: String,
|
|
7811
|
+
reflect: true
|
|
7812
|
+
},
|
|
7813
|
+
|
|
7814
|
+
/**
|
|
7815
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
7816
|
+
*/
|
|
7817
|
+
type: {
|
|
7818
|
+
type: String,
|
|
7819
|
+
reflect: true
|
|
7820
|
+
},
|
|
7821
|
+
|
|
7822
|
+
/**
|
|
7823
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
7824
|
+
*/
|
|
7825
|
+
value: {
|
|
7826
|
+
type: String,
|
|
7827
|
+
reflect: true
|
|
7828
|
+
},
|
|
7829
|
+
|
|
7830
|
+
/**
|
|
7831
|
+
* Sets button variant option.
|
|
7832
|
+
* @default primary
|
|
7833
|
+
*/
|
|
7834
|
+
variant: {
|
|
7835
|
+
type: String,
|
|
7836
|
+
reflect: true
|
|
7837
|
+
},
|
|
7838
|
+
};
|
|
6459
7839
|
}
|
|
6460
7840
|
|
|
6461
7841
|
/**
|
|
6462
|
-
*
|
|
6463
|
-
* @
|
|
6464
|
-
*
|
|
7842
|
+
* This will register this element with the browser.
|
|
7843
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
7844
|
+
*
|
|
7845
|
+
* @example
|
|
7846
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
7847
|
+
*
|
|
6465
7848
|
*/
|
|
6466
|
-
|
|
6467
|
-
|
|
6468
|
-
'helpText': true,
|
|
6469
|
-
'leftIndent': true,
|
|
6470
|
-
'rightIndent': true
|
|
6471
|
-
};
|
|
6472
|
-
|
|
6473
|
-
return u`
|
|
6474
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
6475
|
-
`;
|
|
7849
|
+
static register(name = "auro-button") {
|
|
7850
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
6476
7851
|
}
|
|
6477
7852
|
|
|
6478
7853
|
/**
|
|
6479
|
-
*
|
|
7854
|
+
* Internal method to apply focus to the HTML5 button.
|
|
6480
7855
|
* @private
|
|
6481
|
-
* @returns {
|
|
7856
|
+
* @returns {void}
|
|
6482
7857
|
*/
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
'helpText': true,
|
|
6486
|
-
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
6487
|
-
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
6488
|
-
};
|
|
6489
|
-
|
|
6490
|
-
return u`
|
|
6491
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
6492
|
-
`;
|
|
7858
|
+
focus() {
|
|
7859
|
+
this.renderRoot.querySelector('button').focus();
|
|
6493
7860
|
}
|
|
6494
7861
|
|
|
6495
7862
|
/**
|
|
6496
|
-
*
|
|
7863
|
+
* Submits the form that this button is associated with.
|
|
6497
7864
|
* @private
|
|
6498
|
-
* @
|
|
6499
|
-
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
7865
|
+
* @returns {void}
|
|
6500
7866
|
*/
|
|
6501
|
-
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
switch (layout) {
|
|
6505
|
-
case 'emphasized':
|
|
6506
|
-
return this.renderLayoutEmphasized();
|
|
6507
|
-
case 'emphasized-left':
|
|
6508
|
-
return this.renderLayoutEmphasized();
|
|
6509
|
-
case 'emphasized-right':
|
|
6510
|
-
return this.renderLayoutEmphasized();
|
|
6511
|
-
case 'snowflake':
|
|
6512
|
-
return this.renderLayoutSnowflake();
|
|
6513
|
-
case 'snowflake-left':
|
|
6514
|
-
return this.renderLayoutSnowflake();
|
|
6515
|
-
case 'snowflake-right':
|
|
6516
|
-
return this.renderLayoutSnowflake();
|
|
6517
|
-
default:
|
|
6518
|
-
return this.renderLayoutClassic();
|
|
7867
|
+
surfaceSubmitEvent() {
|
|
7868
|
+
if (this.form) {
|
|
7869
|
+
this.form.requestSubmit();
|
|
6519
7870
|
}
|
|
6520
7871
|
}
|
|
6521
|
-
}
|
|
6522
|
-
|
|
6523
|
-
var dropdownVersion = '3.0.0';
|
|
6524
|
-
|
|
6525
|
-
var colorCss$1 = i$5`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
6526
|
-
|
|
6527
|
-
var styleCss$2 = i$5`#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)}`;
|
|
6528
|
-
|
|
6529
|
-
var tokenCss = i$5`: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)}`;
|
|
6530
|
-
|
|
6531
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6532
|
-
// See LICENSE in the project root for license information.
|
|
6533
|
-
|
|
6534
|
-
// ---------------------------------------------------------------------
|
|
6535
|
-
|
|
6536
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6537
|
-
|
|
6538
|
-
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
6539
|
-
|
|
6540
|
-
/* eslint-disable jsdoc/require-param */
|
|
6541
7872
|
|
|
6542
7873
|
/**
|
|
6543
|
-
*
|
|
6544
|
-
* @
|
|
6545
|
-
* @
|
|
6546
|
-
* @returns {void}
|
|
7874
|
+
* Returns the form element that this button is associated with.
|
|
7875
|
+
* @private
|
|
7876
|
+
* @returns {HTMLFormElement | null}
|
|
6547
7877
|
*/
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
customElements.define(name, class extends componentClass {});
|
|
6551
|
-
}
|
|
7878
|
+
get form() {
|
|
7879
|
+
return this.internals ? this.internals.form : null;
|
|
6552
7880
|
}
|
|
6553
7881
|
|
|
6554
7882
|
/**
|
|
6555
|
-
*
|
|
6556
|
-
* @returns {
|
|
7883
|
+
* @private
|
|
7884
|
+
* @returns {Boolean}
|
|
6557
7885
|
*/
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
base = this, // extra functionality to skip a parent
|
|
6561
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6562
|
-
!el || el === document || el === window
|
|
6563
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
6564
|
-
: found
|
|
6565
|
-
? found // found a selector INside this element
|
|
6566
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6567
|
-
) {
|
|
6568
|
-
return __Closest(base);
|
|
7886
|
+
get hideText() {
|
|
7887
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
6569
7888
|
}
|
|
6570
|
-
/* eslint-enable jsdoc/require-param */
|
|
6571
7889
|
|
|
6572
7890
|
/**
|
|
6573
|
-
*
|
|
6574
|
-
* @
|
|
6575
|
-
* @
|
|
6576
|
-
* @returns {void}
|
|
7891
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7892
|
+
* @returns {string | undefined}
|
|
7893
|
+
* @private
|
|
6577
7894
|
*/
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
7895
|
+
get currentAriaLabel() {
|
|
7896
|
+
if (!this.attributeWatcher) return undefined;
|
|
6581
7897
|
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
}
|
|
7898
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7899
|
+
return ariaLabel || undefined;
|
|
6585
7900
|
}
|
|
6586
7901
|
|
|
6587
7902
|
/**
|
|
6588
|
-
*
|
|
6589
|
-
* @
|
|
6590
|
-
* @
|
|
6591
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7903
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7904
|
+
* @returns {string | undefined}
|
|
7905
|
+
* @private
|
|
6592
7906
|
*/
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
7907
|
+
get currentAriaLabelledBy() {
|
|
7908
|
+
if (!this.attributeWatcher) return undefined;
|
|
6596
7909
|
|
|
6597
|
-
|
|
7910
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7911
|
+
return ariaLabelledBy || undefined;
|
|
6598
7912
|
}
|
|
6599
|
-
};
|
|
6600
|
-
|
|
6601
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6602
|
-
// See LICENSE in the project root for license information.
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
class AuroDependencyVersioning {
|
|
6606
7913
|
|
|
6607
7914
|
/**
|
|
6608
|
-
*
|
|
7915
|
+
* Renders the default layout for the button.
|
|
7916
|
+
* @returns {TemplateResult}
|
|
6609
7917
|
* @private
|
|
6610
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
6611
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
6612
|
-
* @returns {string} - Unique string to be used for naming.
|
|
6613
7918
|
*/
|
|
6614
|
-
|
|
6615
|
-
|
|
7919
|
+
renderLayoutDefault() {
|
|
7920
|
+
const classes = {
|
|
7921
|
+
"util_insetLg--squish": true,
|
|
7922
|
+
"auro-button": true,
|
|
7923
|
+
wrapper: true,
|
|
7924
|
+
loading: this.loading,
|
|
7925
|
+
};
|
|
6616
7926
|
|
|
6617
|
-
|
|
6618
|
-
|
|
7927
|
+
return u`
|
|
7928
|
+
<button
|
|
7929
|
+
part="button"
|
|
7930
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7931
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7932
|
+
tabIndex="${o(this.tIndex)}"
|
|
7933
|
+
?autofocus="${this.autofocus}"
|
|
7934
|
+
class="${e(classes)}"
|
|
7935
|
+
?disabled="${this.disabled || this.loading}"
|
|
7936
|
+
?onDark="${this.onDark}"
|
|
7937
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
7938
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
7939
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
7940
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
7941
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
7942
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7943
|
+
>
|
|
7944
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6619
7945
|
|
|
6620
|
-
|
|
7946
|
+
<span class="contentWrapper">
|
|
7947
|
+
<span class="textSlot" part="text">
|
|
7948
|
+
${this.hideText ? undefined : u`<slot></slot>`}
|
|
7949
|
+
</span>
|
|
7950
|
+
|
|
7951
|
+
<span part="icon">
|
|
7952
|
+
<slot name="icon"></slot>
|
|
7953
|
+
</span>
|
|
7954
|
+
</span>
|
|
7955
|
+
</button>
|
|
7956
|
+
`;
|
|
6621
7957
|
}
|
|
6622
7958
|
|
|
6623
7959
|
/**
|
|
6624
|
-
*
|
|
6625
|
-
* @
|
|
6626
|
-
* @
|
|
6627
|
-
* @returns {string} - Unique string to be used for naming.
|
|
7960
|
+
* Renders the layout of the button
|
|
7961
|
+
* @returns {TemplateResult}
|
|
7962
|
+
* @private
|
|
6628
7963
|
*/
|
|
6629
|
-
|
|
6630
|
-
|
|
6631
|
-
const tag = i$1`${s(elementName)}`;
|
|
6632
|
-
|
|
6633
|
-
if (!customElements.get(elementName)) {
|
|
6634
|
-
customElements.define(elementName, class extends tagClass {});
|
|
6635
|
-
}
|
|
6636
|
-
|
|
6637
|
-
return tag;
|
|
7964
|
+
renderLayout() {
|
|
7965
|
+
return this.renderLayoutDefault();
|
|
6638
7966
|
}
|
|
6639
7967
|
}
|
|
6640
7968
|
|
|
7969
|
+
var buttonVersion = '10.0.0';
|
|
7970
|
+
|
|
6641
7971
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6642
7972
|
// See LICENSE in the project root for license information.
|
|
6643
7973
|
|
|
@@ -6790,7 +8120,7 @@ class BaseIcon extends AuroElement {
|
|
|
6790
8120
|
|
|
6791
8121
|
var tokensCss = i$5`: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)}`;
|
|
6792
8122
|
|
|
6793
|
-
var colorCss$
|
|
8123
|
+
var colorCss$4 = i$5`: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)}`;
|
|
6794
8124
|
|
|
6795
8125
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6796
8126
|
// See LICENSE in the project root for license information.
|
|
@@ -6950,7 +8280,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6950
8280
|
super.styles,
|
|
6951
8281
|
i$5`${tokensCss}`,
|
|
6952
8282
|
i$5`${styleCss$1}`,
|
|
6953
|
-
i$5`${colorCss$
|
|
8283
|
+
i$5`${colorCss$4}`
|
|
6954
8284
|
];
|
|
6955
8285
|
}
|
|
6956
8286
|
|
|
@@ -6984,8 +8314,12 @@ class AuroIcon extends BaseIcon {
|
|
|
6984
8314
|
async firstUpdated() {
|
|
6985
8315
|
await super.firstUpdated();
|
|
6986
8316
|
|
|
6987
|
-
|
|
6988
|
-
|
|
8317
|
+
/**
|
|
8318
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
8319
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
8320
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
8321
|
+
*/
|
|
8322
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
6989
8323
|
const svgDesc = this.svg.querySelector('desc');
|
|
6990
8324
|
|
|
6991
8325
|
if (svgDesc) {
|
|
@@ -7029,7 +8363,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7029
8363
|
}
|
|
7030
8364
|
}
|
|
7031
8365
|
|
|
7032
|
-
var iconVersion = '8.0.
|
|
8366
|
+
var iconVersion = '8.0.4';
|
|
7033
8367
|
|
|
7034
8368
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7035
8369
|
// See LICENSE in the project root for license information.
|
|
@@ -7101,7 +8435,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
7101
8435
|
}
|
|
7102
8436
|
}
|
|
7103
8437
|
|
|
7104
|
-
var styleCss$
|
|
8438
|
+
var styleCss$5 = i$5`.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)}`;
|
|
7105
8439
|
|
|
7106
8440
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7107
8441
|
// See LICENSE in the project root for license information.
|
|
@@ -7148,7 +8482,7 @@ class AuroHeader extends i$2 {
|
|
|
7148
8482
|
}
|
|
7149
8483
|
|
|
7150
8484
|
static get styles() {
|
|
7151
|
-
return [styleCss$
|
|
8485
|
+
return [styleCss$5];
|
|
7152
8486
|
}
|
|
7153
8487
|
|
|
7154
8488
|
/**
|
|
@@ -7256,17 +8590,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
7256
8590
|
|
|
7257
8591
|
this.large = false;
|
|
7258
8592
|
|
|
7259
|
-
AuroLibraryRuntimeUtils$
|
|
8593
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
7260
8594
|
|
|
7261
8595
|
const versioning = new AuroDependencyVersioning();
|
|
8596
|
+
|
|
8597
|
+
/**
|
|
8598
|
+
* @private
|
|
8599
|
+
*/
|
|
7262
8600
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
8601
|
+
|
|
8602
|
+
/**
|
|
8603
|
+
* @private
|
|
8604
|
+
*/
|
|
7263
8605
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
8606
|
+
|
|
8607
|
+
/**
|
|
8608
|
+
* @private
|
|
8609
|
+
*/
|
|
8610
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
7264
8611
|
}
|
|
7265
8612
|
|
|
7266
8613
|
static get styles() {
|
|
7267
8614
|
return [
|
|
7268
|
-
colorCss$
|
|
7269
|
-
styleCss$
|
|
8615
|
+
colorCss$3,
|
|
8616
|
+
styleCss$4,
|
|
7270
8617
|
tokenCss
|
|
7271
8618
|
];
|
|
7272
8619
|
}
|
|
@@ -7295,7 +8642,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
7295
8642
|
*
|
|
7296
8643
|
*/
|
|
7297
8644
|
static register(name = "auro-bibtemplate") {
|
|
7298
|
-
AuroLibraryRuntimeUtils$
|
|
8645
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
7299
8646
|
}
|
|
7300
8647
|
|
|
7301
8648
|
/**
|
|
@@ -7353,9 +8700,9 @@ class AuroBibtemplate extends i$2 {
|
|
|
7353
8700
|
<div id="bibTemplate" part="bibtemplate">
|
|
7354
8701
|
${this.isFullscreen ? u`
|
|
7355
8702
|
<div id="headerContainer">
|
|
7356
|
-
|
|
8703
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
7357
8704
|
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
7358
|
-
|
|
8705
|
+
</${this.buttonTag}>
|
|
7359
8706
|
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
7360
8707
|
<slot name="header"></slot>
|
|
7361
8708
|
</${this.headerTag}>
|
|
@@ -7414,7 +8761,7 @@ class AuroCounterWrapper extends i$2 {
|
|
|
7414
8761
|
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
7415
8762
|
*/
|
|
7416
8763
|
static register(name = "auro-counter-wrapper") {
|
|
7417
|
-
AuroLibraryRuntimeUtils$
|
|
8764
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounterWrapper);
|
|
7418
8765
|
}
|
|
7419
8766
|
|
|
7420
8767
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -7506,7 +8853,7 @@ class AuroCounterGroup extends i$2 {
|
|
|
7506
8853
|
}
|
|
7507
8854
|
|
|
7508
8855
|
static get styles() {
|
|
7509
|
-
return [styleCss$
|
|
8856
|
+
return [styleCss$7];
|
|
7510
8857
|
}
|
|
7511
8858
|
|
|
7512
8859
|
static get properties() {
|
|
@@ -7868,7 +9215,7 @@ class AuroCounterGroup extends i$2 {
|
|
|
7868
9215
|
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
7869
9216
|
*/
|
|
7870
9217
|
static register(name = "auro-counter-group") {
|
|
7871
|
-
AuroLibraryRuntimeUtils$
|
|
9218
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroCounterGroup);
|
|
7872
9219
|
}
|
|
7873
9220
|
|
|
7874
9221
|
// function that renders the HTML and CSS into the scope of the component
|