@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.14 → 0.0.0-pr624.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1022 -12
- package/components/bibtemplate/dist/registered.js +1022 -12
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.md +2 -2
- package/components/checkbox/demo/api.min.js +24 -19
- package/components/checkbox/demo/index.md +2 -2
- package/components/checkbox/demo/index.min.js +24 -19
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +3 -3
- package/components/checkbox/dist/index.js +24 -19
- package/components/checkbox/dist/registered.js +24 -19
- package/components/combobox/demo/api.md +52 -0
- package/components/combobox/demo/api.min.js +2059 -651
- package/components/combobox/demo/index.md +6 -0
- package/components/combobox/demo/index.min.js +2059 -651
- package/components/combobox/dist/auro-combobox.d.ts +4 -4
- package/components/combobox/dist/index.js +1978 -629
- package/components/combobox/dist/registered.js +1978 -629
- package/components/counter/demo/api.md +21 -19
- package/components/counter/demo/api.min.js +2326 -539
- package/components/counter/demo/index.md +99 -34
- package/components/counter/demo/index.min.js +2326 -539
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/auro-counter-group.d.ts +92 -1
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +2326 -539
- package/components/counter/dist/registered.js +2326 -539
- package/components/datepicker/demo/api.md +3 -1
- package/components/datepicker/demo/api.min.js +5402 -3158
- package/components/datepicker/demo/index.md +6 -1
- package/components/datepicker/demo/index.min.js +5402 -3158
- package/components/datepicker/dist/auro-datepicker.d.ts +17 -7
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +5402 -3158
- package/components/datepicker/dist/registered.js +5402 -3158
- package/components/dropdown/demo/api.md +3 -4
- package/components/dropdown/demo/api.min.js +69 -119
- package/components/dropdown/demo/index.md +57 -9
- package/components/dropdown/demo/index.min.js +69 -119
- package/components/dropdown/dist/auro-dropdown.d.ts +0 -8
- package/components/dropdown/dist/auro-dropdownBib.d.ts +14 -0
- package/components/dropdown/dist/index.js +69 -119
- package/components/dropdown/dist/registered.js +69 -119
- package/components/input/demo/api.md +12 -5
- package/components/input/demo/api.min.js +665 -285
- package/components/input/demo/index.min.js +665 -285
- package/components/input/dist/auro-input.d.ts +6 -0
- package/components/input/dist/base-input.d.ts +29 -6
- package/components/input/dist/buttonVersion.d.ts +1 -1
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +665 -285
- package/components/input/dist/registered.js +665 -285
- package/components/layoutElement/dist/index.js +13 -10
- package/components/menu/demo/api.html +38 -0
- package/components/menu/demo/api.md +63 -2
- package/components/menu/demo/api.min.js +190 -36
- package/components/menu/demo/index.min.js +190 -36
- package/components/menu/dist/auro-menu.d.ts +22 -5
- package/components/menu/dist/auro-menuoption.d.ts +15 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +190 -36
- package/components/menu/dist/registered.js +190 -36
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/demo/api.min.js +4 -2
- package/components/radio/demo/index.min.js +4 -2
- package/components/radio/dist/auro-radio.d.ts +1 -1
- package/components/radio/dist/index.js +4 -2
- package/components/radio/dist/registered.js +4 -2
- package/components/select/demo/api.md +5 -5
- package/components/select/demo/api.min.js +1412 -293
- package/components/select/demo/index.md +42 -1
- package/components/select/demo/index.min.js +1412 -293
- package/components/select/dist/auro-select.d.ts +8 -8
- package/components/select/dist/index.js +1321 -261
- package/components/select/dist/registered.js +1321 -261
- package/package.json +2 -2
- /package/components/{menu/dist/styles/color-menu-css.d.ts → counter/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{color-menuoption-css.d.ts → default/color-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menu-css.d.ts → default/color-menuoption-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{style-menuoption-css.d.ts → default/style-menu-css.d.ts} +0 -0
- /package/components/menu/dist/styles/{tokens-css.d.ts → default/style-menuoption-css.d.ts} +0 -0
|
@@ -31,11 +31,477 @@ const t$1=globalThis,i$3=t$1.trustedTypes,s$2=i$3?i$3.createPolicy("lit-html",{c
|
|
|
31
31
|
*/
|
|
32
32
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i$1=(t,...r)=>({_$litStatic$:r.reduce(((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(e)+t[a+1]),t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=false;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o$1(i));)c+=s+r[++$],f=true;$!==a&&u.push(i),n.push(c),$++;}if($===a&&n.push(r[a]),f){const t=n.join("$$lit$$");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u;}return t(r,...e)},u=n(x);
|
|
33
33
|
|
|
34
|
-
var
|
|
34
|
+
var tokens = i$5`:host(:not([ondark])){--ds-auro-counter-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-counter-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider, rgba(0, 0, 0, 0.15))}:host([ondark]){--ds-auro-counter-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-counter-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-counter-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-counter-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-counter-outline-color: transparent;--ds-auro-counter-control-background-color: var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-counter-control-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-counter-description-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-counter-icon-color: var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-counter-quantity-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-counter-divider-color: var(--ds-basic-color-border-divider-inverse, rgba(255, 255, 255, 0.4))}`;
|
|
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$5 = 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.
|
|
@@ -103,7 +569,7 @@ let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
|
103
569
|
|
|
104
570
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
105
571
|
|
|
106
|
-
let AuroLibraryRuntimeUtils$
|
|
572
|
+
let AuroLibraryRuntimeUtils$8 = class AuroLibraryRuntimeUtils {
|
|
107
573
|
|
|
108
574
|
/* eslint-disable jsdoc/require-param */
|
|
109
575
|
|
|
@@ -166,11 +632,13 @@ let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
|
166
632
|
}
|
|
167
633
|
};
|
|
168
634
|
|
|
169
|
-
var styleCss$
|
|
635
|
+
var styleCss$a = 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.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
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$
|
|
639
|
+
var tokensCss$7 = 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.
|
|
@@ -179,7 +647,7 @@ var tokensCss$6 = i$5`:host{--ds-auro-button-border-color:var(--ds-advanced-colo
|
|
|
179
647
|
|
|
180
648
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
181
649
|
|
|
182
|
-
let AuroLibraryRuntimeUtils$
|
|
650
|
+
let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
183
651
|
|
|
184
652
|
/* eslint-disable jsdoc/require-param */
|
|
185
653
|
|
|
@@ -242,17 +710,17 @@ let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
|
242
710
|
}
|
|
243
711
|
};
|
|
244
712
|
|
|
245
|
-
var styleCss$
|
|
713
|
+
var styleCss$9 = 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
|
-
var tokensCss$
|
|
717
|
+
var tokensCss$6 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
250
718
|
|
|
251
719
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
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
|
|
|
@@ -274,7 +742,7 @@ class AuroLoader extends i$2 {
|
|
|
274
742
|
/**
|
|
275
743
|
* @private
|
|
276
744
|
*/
|
|
277
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
745
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
278
746
|
|
|
279
747
|
this.orbit = false;
|
|
280
748
|
this.ringworm = false;
|
|
@@ -322,9 +790,9 @@ class AuroLoader extends i$2 {
|
|
|
322
790
|
|
|
323
791
|
static get styles() {
|
|
324
792
|
return [
|
|
325
|
-
i$5`${styleCss$
|
|
326
|
-
i$5`${colorCss$
|
|
327
|
-
i$5`${tokensCss$
|
|
793
|
+
i$5`${styleCss$9}`,
|
|
794
|
+
i$5`${colorCss$8}`,
|
|
795
|
+
i$5`${tokensCss$6}`
|
|
328
796
|
];
|
|
329
797
|
}
|
|
330
798
|
|
|
@@ -337,7 +805,7 @@ class AuroLoader extends i$2 {
|
|
|
337
805
|
*
|
|
338
806
|
*/
|
|
339
807
|
static register(name = "auro-loader") {
|
|
340
|
-
AuroLibraryRuntimeUtils$
|
|
808
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroLoader);
|
|
341
809
|
}
|
|
342
810
|
|
|
343
811
|
firstUpdated() {
|
|
@@ -385,18 +853,17 @@ 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
|
|
|
396
864
|
|
|
397
865
|
/**
|
|
398
866
|
* @slot - Default slot for the text of the button.
|
|
399
|
-
* @slot icon - Slot to provide auro-icon for the button.
|
|
400
867
|
* @csspart button - Apply CSS to HTML5 button.
|
|
401
868
|
* @csspart loader - Apply CSS to auro-loader.
|
|
402
869
|
* @csspart text - Apply CSS to text slot.
|
|
@@ -405,7 +872,18 @@ var loaderVersion = '5.0.0';
|
|
|
405
872
|
|
|
406
873
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
407
874
|
|
|
408
|
-
|
|
875
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
876
|
+
|
|
877
|
+
/**
|
|
878
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
879
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
880
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
881
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
882
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
883
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
884
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
885
|
+
*/
|
|
886
|
+
let AuroButton$1 = class AuroButton extends AuroElement$5 {
|
|
409
887
|
|
|
410
888
|
/**
|
|
411
889
|
* Enables form association for this element.
|
|
@@ -420,13 +898,10 @@ class AuroButton extends i$2 {
|
|
|
420
898
|
super();
|
|
421
899
|
this.autofocus = false;
|
|
422
900
|
this.disabled = false;
|
|
423
|
-
this.iconOnly = false;
|
|
424
901
|
this.loading = false;
|
|
902
|
+
this.size = "md";
|
|
903
|
+
this.shape = "rounded";
|
|
425
904
|
this.onDark = false;
|
|
426
|
-
this.secondary = false;
|
|
427
|
-
this.tertiary = false;
|
|
428
|
-
this.rounded = false;
|
|
429
|
-
this.slim = false;
|
|
430
905
|
this.fluid = false;
|
|
431
906
|
this.loadingText = this.loadingText || 'Loading...';
|
|
432
907
|
|
|
@@ -443,55 +918,50 @@ class AuroButton extends i$2 {
|
|
|
443
918
|
/**
|
|
444
919
|
* Generate unique names for dependency components.
|
|
445
920
|
*/
|
|
446
|
-
const versioning = new AuroDependencyVersioning$
|
|
921
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
447
922
|
|
|
448
923
|
/**
|
|
449
924
|
* @private
|
|
450
925
|
*/
|
|
451
|
-
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
926
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$1, AuroLoader$1);
|
|
452
927
|
}
|
|
453
928
|
|
|
454
929
|
static get styles() {
|
|
455
930
|
return [
|
|
456
|
-
tokensCss$
|
|
457
|
-
styleCss$
|
|
458
|
-
colorCss$
|
|
931
|
+
tokensCss$7,
|
|
932
|
+
styleCss$a,
|
|
933
|
+
colorCss$9,
|
|
934
|
+
shapeSize$1
|
|
459
935
|
];
|
|
460
936
|
}
|
|
461
937
|
|
|
462
938
|
static get properties() {
|
|
463
939
|
return {
|
|
464
940
|
|
|
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
|
-
},
|
|
941
|
+
...super.properties,
|
|
472
942
|
|
|
473
943
|
/**
|
|
474
|
-
*
|
|
944
|
+
* Override layout since it isn't used in this component.
|
|
945
|
+
* @private
|
|
475
946
|
*/
|
|
476
|
-
|
|
947
|
+
layout: {
|
|
477
948
|
type: Boolean,
|
|
478
|
-
|
|
949
|
+
attribute: false,
|
|
950
|
+
reflect: false
|
|
479
951
|
},
|
|
480
952
|
|
|
481
953
|
/**
|
|
482
|
-
*
|
|
483
|
-
* @deprecated
|
|
954
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
484
955
|
*/
|
|
485
|
-
|
|
956
|
+
autofocus: {
|
|
486
957
|
type: Boolean,
|
|
487
958
|
reflect: true
|
|
488
959
|
},
|
|
489
960
|
|
|
490
961
|
/**
|
|
491
|
-
*
|
|
492
|
-
* @deprecated
|
|
962
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
493
963
|
*/
|
|
494
|
-
|
|
964
|
+
disabled: {
|
|
495
965
|
type: Boolean,
|
|
496
966
|
reflect: true
|
|
497
967
|
},
|
|
@@ -499,15 +969,7 @@ class AuroButton extends i$2 {
|
|
|
499
969
|
/**
|
|
500
970
|
* Alters the shape of the button to be full width of its parent container.
|
|
501
971
|
*/
|
|
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: {
|
|
972
|
+
fluid: {
|
|
511
973
|
type: Boolean,
|
|
512
974
|
reflect: true
|
|
513
975
|
},
|
|
@@ -515,7 +977,7 @@ class AuroButton extends i$2 {
|
|
|
515
977
|
/**
|
|
516
978
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
517
979
|
*/
|
|
518
|
-
loading:
|
|
980
|
+
loading: {
|
|
519
981
|
type: Boolean,
|
|
520
982
|
reflect: true
|
|
521
983
|
},
|
|
@@ -523,112 +985,50 @@ class AuroButton extends i$2 {
|
|
|
523
985
|
/**
|
|
524
986
|
* 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
987
|
*/
|
|
526
|
-
loadingText:
|
|
988
|
+
loadingText: {
|
|
527
989
|
type: String
|
|
528
990
|
},
|
|
529
991
|
|
|
530
992
|
/**
|
|
531
|
-
*
|
|
993
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
532
994
|
*/
|
|
533
|
-
|
|
534
|
-
type:
|
|
995
|
+
tIndex: {
|
|
996
|
+
type: String,
|
|
535
997
|
reflect: true
|
|
536
998
|
},
|
|
537
999
|
|
|
538
1000
|
/**
|
|
539
|
-
*
|
|
1001
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
540
1002
|
*/
|
|
541
|
-
|
|
542
|
-
type:
|
|
1003
|
+
title: {
|
|
1004
|
+
type: String,
|
|
543
1005
|
reflect: true
|
|
544
1006
|
},
|
|
545
1007
|
|
|
546
1008
|
/**
|
|
547
|
-
*
|
|
1009
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
548
1010
|
*/
|
|
549
|
-
|
|
550
|
-
type:
|
|
1011
|
+
type: {
|
|
1012
|
+
type: String,
|
|
551
1013
|
reflect: true
|
|
552
1014
|
},
|
|
553
1015
|
|
|
554
1016
|
/**
|
|
555
|
-
*
|
|
1017
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
556
1018
|
*/
|
|
557
|
-
|
|
1019
|
+
value: {
|
|
558
1020
|
type: String,
|
|
559
1021
|
reflect: true
|
|
560
1022
|
},
|
|
561
1023
|
|
|
562
1024
|
/**
|
|
563
|
-
*
|
|
1025
|
+
* Sets button variant option.
|
|
1026
|
+
* @default primary
|
|
564
1027
|
*/
|
|
565
|
-
|
|
566
|
-
type: String,
|
|
567
|
-
reflect: true,
|
|
568
|
-
},
|
|
569
|
-
|
|
570
|
-
/**
|
|
571
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
572
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
573
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
574
|
-
*/
|
|
575
|
-
arialabel: {
|
|
576
|
-
type: String,
|
|
577
|
-
reflect: true
|
|
578
|
-
},
|
|
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: {
|
|
1028
|
+
variant: {
|
|
628
1029
|
type: String,
|
|
629
1030
|
reflect: true
|
|
630
1031
|
},
|
|
631
|
-
ready: { type: Boolean },
|
|
632
1032
|
};
|
|
633
1033
|
}
|
|
634
1034
|
|
|
@@ -641,7 +1041,7 @@ class AuroButton extends i$2 {
|
|
|
641
1041
|
*
|
|
642
1042
|
*/
|
|
643
1043
|
static register(name = "auro-button") {
|
|
644
|
-
AuroLibraryRuntimeUtils$
|
|
1044
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroButton);
|
|
645
1045
|
}
|
|
646
1046
|
|
|
647
1047
|
/**
|
|
@@ -653,17 +1053,6 @@ class AuroButton extends i$2 {
|
|
|
653
1053
|
this.renderRoot.querySelector('button').focus();
|
|
654
1054
|
}
|
|
655
1055
|
|
|
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
1056
|
/**
|
|
668
1057
|
* Submits the form that this button is associated with.
|
|
669
1058
|
* @private
|
|
@@ -684,25 +1073,57 @@ class AuroButton extends i$2 {
|
|
|
684
1073
|
return this.internals ? this.internals.form : null;
|
|
685
1074
|
}
|
|
686
1075
|
|
|
687
|
-
|
|
1076
|
+
/**
|
|
1077
|
+
* @private
|
|
1078
|
+
* @returns {Boolean}
|
|
1079
|
+
*/
|
|
1080
|
+
get hideText() {
|
|
1081
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
/**
|
|
1085
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
1086
|
+
* @returns {string | undefined}
|
|
1087
|
+
* @private
|
|
1088
|
+
*/
|
|
1089
|
+
get currentAriaLabel() {
|
|
1090
|
+
if (!this.attributeWatcher) return undefined;
|
|
1091
|
+
|
|
1092
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
1093
|
+
return ariaLabel || undefined;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
1098
|
+
* @returns {string | undefined}
|
|
1099
|
+
* @private
|
|
1100
|
+
*/
|
|
1101
|
+
get currentAriaLabelledBy() {
|
|
1102
|
+
if (!this.attributeWatcher) return undefined;
|
|
1103
|
+
|
|
1104
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
1105
|
+
return ariaLabelledBy || undefined;
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
/**
|
|
1109
|
+
* Renders the default layout for the button.
|
|
1110
|
+
* @returns {TemplateResult}
|
|
1111
|
+
* @private
|
|
1112
|
+
*/
|
|
1113
|
+
renderLayoutDefault() {
|
|
688
1114
|
const classes = {
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
695
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
696
|
-
'loading': this.loading
|
|
1115
|
+
"util_insetLg--squish": true,
|
|
1116
|
+
"auro-button": true,
|
|
1117
|
+
"icon-only": this.hideText,
|
|
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,85 +1140,20 @@ class AuroButton extends i$2 {
|
|
|
719
1140
|
|
|
720
1141
|
<span class="contentWrapper">
|
|
721
1142
|
<span class="textSlot" part="text">
|
|
722
|
-
|
|
723
|
-
</span>
|
|
724
|
-
|
|
725
|
-
<span part="icon">
|
|
726
|
-
<slot name="icon"></slot>
|
|
1143
|
+
<slot></slot>
|
|
727
1144
|
</span>
|
|
728
1145
|
</span>
|
|
729
1146
|
</button>
|
|
730
1147
|
`;
|
|
731
1148
|
}
|
|
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
1149
|
|
|
790
1150
|
/**
|
|
791
|
-
*
|
|
792
|
-
* @
|
|
793
|
-
* @
|
|
794
|
-
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1151
|
+
* Renders the layout of the button
|
|
1152
|
+
* @returns {TemplateResult}
|
|
1153
|
+
* @private
|
|
795
1154
|
*/
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
799
|
-
|
|
800
|
-
return elemTag === tag || elem.hasAttribute(tag);
|
|
1155
|
+
renderLayout() {
|
|
1156
|
+
return this.renderLayoutDefault();
|
|
801
1157
|
}
|
|
802
1158
|
};
|
|
803
1159
|
|
|
@@ -806,13 +1162,20 @@ let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
|
806
1162
|
|
|
807
1163
|
|
|
808
1164
|
// build the component class
|
|
809
|
-
class AuroCounterButton extends AuroButton {
|
|
1165
|
+
class AuroCounterButton extends AuroButton$1 {
|
|
1166
|
+
|
|
1167
|
+
constructor() {
|
|
1168
|
+
super();
|
|
1169
|
+
|
|
1170
|
+
this.size = "sm";
|
|
1171
|
+
this.shape = "rounded";
|
|
1172
|
+
}
|
|
810
1173
|
|
|
811
1174
|
static get styles() {
|
|
812
1175
|
return [
|
|
813
1176
|
styleButtonCss,
|
|
814
1177
|
styleButtonColorCss,
|
|
815
|
-
|
|
1178
|
+
tokens
|
|
816
1179
|
];
|
|
817
1180
|
}
|
|
818
1181
|
|
|
@@ -825,7 +1188,7 @@ class AuroCounterButton extends AuroButton {
|
|
|
825
1188
|
*
|
|
826
1189
|
*/
|
|
827
1190
|
static register(name = "auro-counter-button") {
|
|
828
|
-
AuroLibraryRuntimeUtils$
|
|
1191
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterButton);
|
|
829
1192
|
}
|
|
830
1193
|
}
|
|
831
1194
|
|
|
@@ -835,46 +1198,6 @@ if (!customElements.get("auro-counter-button")) {
|
|
|
835
1198
|
customElements.define("auro-counter-button", AuroCounterButton);
|
|
836
1199
|
}
|
|
837
1200
|
|
|
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
1201
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
879
1202
|
// See LICENSE in the project root for license information.
|
|
880
1203
|
|
|
@@ -885,7 +1208,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
885
1208
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
886
1209
|
*/
|
|
887
1210
|
|
|
888
|
-
let AuroElement$
|
|
1211
|
+
let AuroElement$4 = class AuroElement extends i$2 {
|
|
889
1212
|
|
|
890
1213
|
// function to define props used within the scope of this component
|
|
891
1214
|
static get properties() {
|
|
@@ -941,7 +1264,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
941
1264
|
return _fetchMap$2.get(uri);
|
|
942
1265
|
};
|
|
943
1266
|
|
|
944
|
-
var styleCss$
|
|
1267
|
+
var styleCss$8 = 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
1268
|
|
|
946
1269
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
947
1270
|
// See LICENSE in the project root for license information.
|
|
@@ -953,7 +1276,7 @@ var styleCss$7 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
953
1276
|
*/
|
|
954
1277
|
|
|
955
1278
|
// build the component class
|
|
956
|
-
let BaseIcon$2 = class BaseIcon extends AuroElement$
|
|
1279
|
+
let BaseIcon$2 = class BaseIcon extends AuroElement$4 {
|
|
957
1280
|
constructor() {
|
|
958
1281
|
super();
|
|
959
1282
|
this.onDark = false;
|
|
@@ -984,7 +1307,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
984
1307
|
|
|
985
1308
|
static get styles() {
|
|
986
1309
|
return i$5`
|
|
987
|
-
${styleCss$
|
|
1310
|
+
${styleCss$8}
|
|
988
1311
|
`;
|
|
989
1312
|
}
|
|
990
1313
|
|
|
@@ -1025,9 +1348,9 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$3 {
|
|
|
1025
1348
|
}
|
|
1026
1349
|
};
|
|
1027
1350
|
|
|
1028
|
-
var tokensCss$
|
|
1351
|
+
var tokensCss$5 = 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
1352
|
|
|
1030
|
-
var colorCss$
|
|
1353
|
+
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
1354
|
|
|
1032
1355
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1033
1356
|
// See LICENSE in the project root for license information.
|
|
@@ -1036,7 +1359,7 @@ var colorCss$6 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
1036
1359
|
|
|
1037
1360
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1038
1361
|
|
|
1039
|
-
let AuroLibraryRuntimeUtils$
|
|
1362
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
1040
1363
|
|
|
1041
1364
|
/* eslint-disable jsdoc/require-param */
|
|
1042
1365
|
|
|
@@ -1118,7 +1441,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1118
1441
|
*/
|
|
1119
1442
|
privateDefaults() {
|
|
1120
1443
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1121
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1444
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
1122
1445
|
}
|
|
1123
1446
|
|
|
1124
1447
|
// function to define props used within the scope of this component
|
|
@@ -1185,9 +1508,9 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1185
1508
|
static get styles() {
|
|
1186
1509
|
return [
|
|
1187
1510
|
super.styles,
|
|
1188
|
-
i$5`${tokensCss$
|
|
1189
|
-
i$5`${styleCss$
|
|
1190
|
-
i$5`${colorCss$
|
|
1511
|
+
i$5`${tokensCss$5}`,
|
|
1512
|
+
i$5`${styleCss$8}`,
|
|
1513
|
+
i$5`${colorCss$7}`
|
|
1191
1514
|
];
|
|
1192
1515
|
}
|
|
1193
1516
|
|
|
@@ -1200,7 +1523,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1200
1523
|
*
|
|
1201
1524
|
*/
|
|
1202
1525
|
static register(name = "auro-icon") {
|
|
1203
|
-
AuroLibraryRuntimeUtils$
|
|
1526
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroIcon);
|
|
1204
1527
|
}
|
|
1205
1528
|
|
|
1206
1529
|
connectedCallback() {
|
|
@@ -1221,8 +1544,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1221
1544
|
async firstUpdated() {
|
|
1222
1545
|
await super.firstUpdated();
|
|
1223
1546
|
|
|
1224
|
-
|
|
1225
|
-
|
|
1547
|
+
/**
|
|
1548
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
1549
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
1550
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
1551
|
+
*/
|
|
1552
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
1226
1553
|
const svgDesc = this.svg.querySelector('desc');
|
|
1227
1554
|
|
|
1228
1555
|
if (svgDesc) {
|
|
@@ -1266,7 +1593,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
1266
1593
|
}
|
|
1267
1594
|
};
|
|
1268
1595
|
|
|
1269
|
-
var iconVersion$2 = '8.0.
|
|
1596
|
+
var iconVersion$2 = '8.0.4';
|
|
1270
1597
|
|
|
1271
1598
|
class DateFormatter {
|
|
1272
1599
|
|
|
@@ -1684,7 +2011,7 @@ const {
|
|
|
1684
2011
|
class AuroFormValidation {
|
|
1685
2012
|
|
|
1686
2013
|
constructor() {
|
|
1687
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
2014
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$8();
|
|
1688
2015
|
}
|
|
1689
2016
|
|
|
1690
2017
|
/**
|
|
@@ -1963,7 +2290,9 @@ class AuroFormValidation {
|
|
|
1963
2290
|
elem.validity = this.auroInputElements[0].validity;
|
|
1964
2291
|
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
1965
2292
|
|
|
1966
|
-
|
|
2293
|
+
// combobox has 2 inputs but no need to check validity on the 2nd one which is in fullscreen bib.
|
|
2294
|
+
// combobox's 2nd input will have noValidate set true.
|
|
2295
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1 && !this.auroInputElements[1].noValidate) {
|
|
1967
2296
|
elem.validity = this.auroInputElements[1].validity;
|
|
1968
2297
|
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
1969
2298
|
}
|
|
@@ -2070,9 +2399,9 @@ var plusIcon = {"role":"img","color":"currentColor","title":"","desc":"","width"
|
|
|
2070
2399
|
|
|
2071
2400
|
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>"};
|
|
2072
2401
|
|
|
2073
|
-
var colorCss$
|
|
2402
|
+
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)}`;
|
|
2074
2403
|
|
|
2075
|
-
var styleCss$
|
|
2404
|
+
var styleCss$7 = 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}`;
|
|
2076
2405
|
|
|
2077
2406
|
/* eslint-disable lit/binding-positions, lit/no-invalid-html, max-lines */
|
|
2078
2407
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -2230,14 +2559,14 @@ class AuroCounter extends i$2 {
|
|
|
2230
2559
|
* AuroCounter.register("custom-counter") // registers <custom-counter/>
|
|
2231
2560
|
*/
|
|
2232
2561
|
static register(name = "auro-counter") {
|
|
2233
|
-
AuroLibraryRuntimeUtils$
|
|
2562
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounter);
|
|
2234
2563
|
}
|
|
2235
2564
|
|
|
2236
2565
|
static get styles() {
|
|
2237
2566
|
return [
|
|
2238
|
-
|
|
2239
|
-
colorCss$
|
|
2240
|
-
styleCss$
|
|
2567
|
+
tokens,
|
|
2568
|
+
colorCss$6,
|
|
2569
|
+
styleCss$7
|
|
2241
2570
|
];
|
|
2242
2571
|
}
|
|
2243
2572
|
|
|
@@ -2376,14 +2705,13 @@ class AuroCounter extends i$2 {
|
|
|
2376
2705
|
<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}">
|
|
2377
2706
|
<auro-counter-button
|
|
2378
2707
|
aria-hidden="true"
|
|
2379
|
-
|
|
2380
|
-
tabindex="-1"
|
|
2708
|
+
tindex="-1"
|
|
2381
2709
|
part="controlMinus"
|
|
2382
2710
|
@click="${() => this.decrement()}"
|
|
2383
2711
|
?onDark="${this.onDark}"
|
|
2384
2712
|
?disabled="${this.disabled || this.disableMin || this.isIncrementDisabled(this.min)}"
|
|
2385
2713
|
>
|
|
2386
|
-
<${this.iconTag} class="controlIcon"
|
|
2714
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(minusIcon)} </${this.iconTag}>
|
|
2387
2715
|
</auro-counter-button>
|
|
2388
2716
|
|
|
2389
2717
|
<div class="quantityWrapper">
|
|
@@ -2392,14 +2720,13 @@ class AuroCounter extends i$2 {
|
|
|
2392
2720
|
|
|
2393
2721
|
<auro-counter-button
|
|
2394
2722
|
aria-hidden="true"
|
|
2395
|
-
|
|
2396
|
-
tabindex="-1"
|
|
2723
|
+
tindex="-1"
|
|
2397
2724
|
part="controlPlus"
|
|
2398
2725
|
@click="${() => this.increment()}"
|
|
2399
2726
|
?onDark="${this.onDark}"
|
|
2400
2727
|
?disabled="${this.disabled || this.disableMax || this.isIncrementDisabled(this.max)}"
|
|
2401
2728
|
>
|
|
2402
|
-
<${this.iconTag} class="controlIcon"
|
|
2729
|
+
<${this.iconTag} class="controlIcon" customSvg> ${IconUtil.generateSvgHtml(plusIcon)} </${this.iconTag}>
|
|
2403
2730
|
</auro-counter-button>
|
|
2404
2731
|
</div>
|
|
2405
2732
|
</div>
|
|
@@ -2407,7 +2734,9 @@ class AuroCounter extends i$2 {
|
|
|
2407
2734
|
}
|
|
2408
2735
|
}
|
|
2409
2736
|
|
|
2410
|
-
var
|
|
2737
|
+
var counterGroupStyles = i$5`:host(:not([layout=classic])) .triggerContent{padding:0 8px 0 24px}:host(:not([layout=classic])) [auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-counter-trigger-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-counter-trigger-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-counter-trigger-background-color)}.triggerContent{display:flex;width:100%;align-items:center;justify-content:center}.mainContent{display:flex;width:100%;flex-direction:column;align-items:flex-start;justify-content:center}label{font-size:var(--ds-text-body-size-default, 1rem);line-height:20px}label.filled{font-size:var(--ds-text-body-size-xs, 0.75rem)}slot[name=valueText]{font-size:var(--ds-text-body-size-default, 1rem);overflow-x:hidden;text-overflow:ellipsis;white-space:nowrap}.counters{display:flex;flex-direction:column;gap:var(--ds-size-300, 1.5rem)}.counters ::slotted(auro-counter:not(:first-of-type)){padding-top:var(--ds-size-300, 1.5rem);border-top-width:1px;border-top-style:solid}`;
|
|
2738
|
+
|
|
2739
|
+
var shapeSizeCss$1 = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
2411
2740
|
|
|
2412
2741
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2413
2742
|
// See LICENSE in the project root for license information.
|
|
@@ -4696,7 +5025,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
4696
5025
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
4697
5026
|
*/
|
|
4698
5027
|
|
|
4699
|
-
let AuroElement$1 = class AuroElement extends i$2 {
|
|
5028
|
+
let AuroElement$1$1 = class AuroElement extends i$2 {
|
|
4700
5029
|
|
|
4701
5030
|
// function to define props used within the scope of this component
|
|
4702
5031
|
static get properties() {
|
|
@@ -4764,7 +5093,7 @@ var styleCss$2$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}
|
|
|
4764
5093
|
*/
|
|
4765
5094
|
|
|
4766
5095
|
// build the component class
|
|
4767
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
5096
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
4768
5097
|
constructor() {
|
|
4769
5098
|
super();
|
|
4770
5099
|
this.onDark = false;
|
|
@@ -4836,9 +5165,9 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
4836
5165
|
}
|
|
4837
5166
|
};
|
|
4838
5167
|
|
|
4839
|
-
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)}`;
|
|
5168
|
+
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)}`;
|
|
4840
5169
|
|
|
4841
|
-
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)}`;
|
|
5170
|
+
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)}`;
|
|
4842
5171
|
|
|
4843
5172
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4844
5173
|
// See LICENSE in the project root for license information.
|
|
@@ -4996,9 +5325,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4996
5325
|
static get styles() {
|
|
4997
5326
|
return [
|
|
4998
5327
|
super.styles,
|
|
4999
|
-
i$5`${tokensCss$2}`,
|
|
5328
|
+
i$5`${tokensCss$2$1}`,
|
|
5000
5329
|
i$5`${styleCss$2$1}`,
|
|
5001
|
-
i$5`${colorCss$3}`
|
|
5330
|
+
i$5`${colorCss$3$1}`
|
|
5002
5331
|
];
|
|
5003
5332
|
}
|
|
5004
5333
|
|
|
@@ -5032,8 +5361,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5032
5361
|
async firstUpdated() {
|
|
5033
5362
|
await super.firstUpdated();
|
|
5034
5363
|
|
|
5035
|
-
|
|
5036
|
-
|
|
5364
|
+
/**
|
|
5365
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
5366
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
5367
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
5368
|
+
*/
|
|
5369
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
5037
5370
|
const svgDesc = this.svg.querySelector('desc');
|
|
5038
5371
|
|
|
5039
5372
|
if (svgDesc) {
|
|
@@ -5079,11 +5412,11 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5079
5412
|
|
|
5080
5413
|
var iconVersion$1 = '6.1.2';
|
|
5081
5414
|
|
|
5082
|
-
var styleCss$1$
|
|
5415
|
+
var styleCss$1$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}:host(:not([matchWidth])) .container{min-width:fit-content}:host([isfullscreen]){position:fixed;top:0;left:0}:host([isfullscreen]) .container{width:100dvw;max-width:none;height:100dvh;max-height:none;border-radius:unset;margin-top:0;box-shadow:unset;overscroll-behavior:contain}:host([data-show]){display:flex}:host([common]:not([isfullscreen])) .container,:host([rounded]:not([isfullscreen])) .container{border-radius:var(--ds-border-radius, 0.375rem)}:host([common][isfullscreen]) .container,:host([rounded][isfullscreen]) .container{border-radius:unset;box-shadow:unset}:host(:not([isfullscreen])) .container.shape-box{border-radius:unset}:host(:not([isfullscreen])) .container[class*=shape-pill],:host(:not([isfullscreen])) .container[class*=shape-snowflake]{border-radius:30px}.container{display:inline-block;overflow:auto;box-sizing:border-box;border-radius:var(--ds-border-radius, 0.375rem);margin:var(--ds-size-50, 0.25rem) 0}`;
|
|
5083
5416
|
|
|
5084
5417
|
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)}`;
|
|
5085
5418
|
|
|
5086
|
-
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:
|
|
5419
|
+
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)}`;
|
|
5087
5420
|
|
|
5088
5421
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5089
5422
|
// See LICENSE in the project root for license information.
|
|
@@ -5104,7 +5437,7 @@ const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
|
5104
5437
|
*/
|
|
5105
5438
|
|
|
5106
5439
|
class AuroDropdownBib extends i$2 {
|
|
5107
|
-
|
|
5440
|
+
// not extending AuroElement because Bib needs only `shape` prop
|
|
5108
5441
|
constructor() {
|
|
5109
5442
|
super();
|
|
5110
5443
|
|
|
@@ -5114,13 +5447,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
5114
5447
|
this._mobileBreakpointValue = undefined;
|
|
5115
5448
|
|
|
5116
5449
|
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
5450
|
+
|
|
5451
|
+
this.shape = "rounded";
|
|
5452
|
+
this.matchWidth = false;
|
|
5117
5453
|
}
|
|
5118
5454
|
|
|
5119
5455
|
static get styles() {
|
|
5120
5456
|
return [
|
|
5121
|
-
styleCss$1$
|
|
5457
|
+
styleCss$1$2,
|
|
5122
5458
|
colorCss$2$1,
|
|
5123
|
-
tokensCss$1
|
|
5459
|
+
tokensCss$1$1
|
|
5124
5460
|
];
|
|
5125
5461
|
}
|
|
5126
5462
|
|
|
@@ -5151,6 +5487,15 @@ class AuroDropdownBib extends i$2 {
|
|
|
5151
5487
|
reflect: true
|
|
5152
5488
|
},
|
|
5153
5489
|
|
|
5490
|
+
/**
|
|
5491
|
+
* If declared, the bib width will match the trigger width.
|
|
5492
|
+
* @private
|
|
5493
|
+
*/
|
|
5494
|
+
matchWidth: {
|
|
5495
|
+
type: Boolean,
|
|
5496
|
+
reflect: true
|
|
5497
|
+
},
|
|
5498
|
+
|
|
5154
5499
|
/**
|
|
5155
5500
|
* If declared, will apply border-radius to the bib.
|
|
5156
5501
|
*/
|
|
@@ -5164,6 +5509,11 @@ class AuroDropdownBib extends i$2 {
|
|
|
5164
5509
|
*/
|
|
5165
5510
|
bibTemplate: {
|
|
5166
5511
|
type: Object
|
|
5512
|
+
},
|
|
5513
|
+
|
|
5514
|
+
shape: {
|
|
5515
|
+
type: String,
|
|
5516
|
+
reflect: true
|
|
5167
5517
|
}
|
|
5168
5518
|
};
|
|
5169
5519
|
}
|
|
@@ -5243,8 +5593,16 @@ class AuroDropdownBib extends i$2 {
|
|
|
5243
5593
|
|
|
5244
5594
|
// function that renders the HTML and CSS into the scope of the component
|
|
5245
5595
|
render() {
|
|
5596
|
+
const classes = {
|
|
5597
|
+
container: true
|
|
5598
|
+
};
|
|
5599
|
+
|
|
5600
|
+
// Since this class does not inherit from AuroElement, we apply the shape-related class within the `render` function,
|
|
5601
|
+
// mimicking the class naming convention used in AuroElement.resetShapeClasses.
|
|
5602
|
+
classes[`shape-${this.shape}`] = true;
|
|
5603
|
+
|
|
5246
5604
|
return u`
|
|
5247
|
-
<div class="
|
|
5605
|
+
<div class="${e(classes)}" part="bibContainer">
|
|
5248
5606
|
<slot></slot>
|
|
5249
5607
|
</div>
|
|
5250
5608
|
`;
|
|
@@ -5253,23 +5611,23 @@ class AuroDropdownBib extends i$2 {
|
|
|
5253
5611
|
|
|
5254
5612
|
var dropdownVersion$1 = '3.0.0';
|
|
5255
5613
|
|
|
5256
|
-
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:
|
|
5614
|
+
var shapeSizeCss = i$5`.wrapper{overflow:hidden}.shape-classic-xl,.shape-classic-lg,.shape-classic-md,.shape-classic-sm,.shape-classic-xs{min-height:58px;max-height:58px;border-style:solid;border-width:1px;border-radius:var(--ds-border-radius, 0.375rem)}.shape-classic-xl.simple,.shape-classic-lg.simple,.shape-classic-md.simple,.shape-classic-sm.simple,.shape-classic-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-classic-xl.thin,.shape-classic-lg.thin,.shape-classic-md.thin,.shape-classic-sm.thin,.shape-classic-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-classic-xl.parentBorder,.shape-classic-lg.parentBorder,.shape-classic-md.parentBorder,.shape-classic-sm.parentBorder,.shape-classic-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-snowflake-xl,.shape-snowflake-lg,.shape-snowflake-md,.shape-snowflake-sm,.shape-snowflake-xs{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:30px}.shape-snowflake-xl.simple,.shape-snowflake-lg.simple,.shape-snowflake-md.simple,.shape-snowflake-sm.simple,.shape-snowflake-xs.simple{border-width:0px;min-height:60px;max-height:60px;background-color:unset;box-shadow:none}.shape-snowflake-xl.thin,.shape-snowflake-lg.thin,.shape-snowflake-md.thin,.shape-snowflake-sm.thin,.shape-snowflake-xs.thin{border-width:1px;min-height:58px;max-height:58px;background-color:unset}.shape-snowflake-xl.parentBorder,.shape-snowflake-lg.parentBorder,.shape-snowflake-md.parentBorder,.shape-snowflake-sm.parentBorder,.shape-snowflake-xs.parentBorder{border:0;box-shadow:unset;min-height:56px;max-height:56px}.shape-box-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent}.shape-box-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-box-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-box-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-rounded-lg{min-height:56px;max-height:56px;border-style:solid;border-width:2px;border-color:transparent;border-radius:6px}.shape-rounded-lg.simple{border-width:0px;min-height:56px;max-height:56px;background-color:unset;box-shadow:none}.shape-rounded-lg.thin{border-width:1px;min-height:54px;max-height:54px;background-color:unset}.shape-rounded-lg.parentBorder{border:0;box-shadow:unset;min-height:52px;max-height:52px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-xl.simple{border-width:0px;min-height:72px;max-height:72px;background-color:unset;box-shadow:none}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;box-shadow:unset;min-height:68px;max-height:68px}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px}.shape-pill-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:36px 0 0 36px}.shape-pill-left-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-width:2px;border-color:transparent;border-radius:0 36px 36px 0}.shape-pill-right-md.simple{border-width:0px;min-height:48px;max-height:48px;background-color:unset;box-shadow:none}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;box-shadow:unset;min-height:44px;max-height:44px}`;
|
|
5257
5615
|
|
|
5258
|
-
var colorCss$1$
|
|
5616
|
+
var colorCss$1$2 = i$5`:host .wrapper{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-background-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host(:not([ondark])) .wrapper:focus,:host(:not([ondark])) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-brand, #00274a)}:host([ondark]) .wrapper:focus,:host([ondark]) .wrapper:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([error]:not([ondark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([error][ondark]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}.helpText{color:var(--ds-auro-dropdown-helptext-text-color)}`;
|
|
5259
5617
|
|
|
5260
|
-
var classicColorCss = i$5`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)
|
|
5618
|
+
var classicColorCss = i$5`:host([layout*=classic]:not([onDark])) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]:not([onDark])) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic]:not([onDark])) .trigger:focus-within,:host([layout*=classic]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][disabled]:not([onDark])){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic][error]:not([onDark])){--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic][error]:not([onDark])) .trigger:focus-within,:host([layout*=classic][error]:not([onDark])) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic][onDark]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic][onDark]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color)}:host([layout*=classic][onDark]) .trigger:focus-within,:host([layout*=classic][onDark]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic][onDark][disabled]){--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}:host([layout*=classic][onDark][error]){--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic][onDark][error]) .trigger:focus-within,:host([layout*=classic][onDark][error]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
5261
5619
|
|
|
5262
|
-
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;
|
|
5620
|
+
var classicLayoutCss = i$5`:host([layout*=classic]){position:relative;max-width:100%}:host([layout*=classic]) #bibSizer{position:absolute;z-index:-1;opacity:0;pointer-events:none}:host([layout*=classic]) .label{font-size:var(--ds-text-body-size-xs, 0.75rem);line-height:var(--ds-text-body-size-default, 1rem);transition:font-size .3s cubic-bezier(0.215, 0.61, 0.355, 1);white-space:normal}:host([layout*=classic]) .label[hasTrigger=false]{font-size:var(--ds-text-body-size-default, 1rem)}:host([layout*=classic]) .trigger{display:flex;flex-direction:row;box-shadow:inset 0 0 0 1px var(--ds-auro-dropdown-trigger-outline-color)}@media(hover: hover){:host([layout*=classic]) .trigger:hover{cursor:pointer}}:host([layout*=classic]) .triggerContentWrapper{overflow:hidden;flex:1;justify-content:start;text-overflow:ellipsis;white-space:nowrap}:host([layout*=classic]) #showStateIcon{display:flex;overflow:hidden;height:100%;align-items:center;padding-right:var(--ds-size-150, 0.75rem)}:host([layout*=classic]) #showStateIcon [auro-icon]{height:var(--ds-size-300, 1.5rem);line-height:var(--ds-size-300, 1.5rem)}:host([layout*=classic]) #showStateIcon[data-expanded=true] [auro-icon]{transform:rotate(-180deg)}:host([layout*=classic]:not([simple])) .triggerContentWrapper{padding-left:var(--ds-size-150, 0.75rem)}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}`;
|
|
5263
5621
|
|
|
5264
|
-
var styleEmphasizedCss = i$5`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;
|
|
5622
|
+
var styleEmphasizedCss = i$5`:host{display:block}.layout-emphasized .chevron,.layout-emphasized-left .chevron,.layout-emphasized-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
5265
5623
|
|
|
5266
|
-
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;
|
|
5624
|
+
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)}`;
|
|
5267
5625
|
|
|
5268
|
-
var colorCss$
|
|
5626
|
+
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)}`;
|
|
5269
5627
|
|
|
5270
|
-
var styleCss$
|
|
5628
|
+
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}`;
|
|
5271
5629
|
|
|
5272
|
-
var tokensCss$
|
|
5630
|
+
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5273
5631
|
|
|
5274
5632
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5275
5633
|
// See LICENSE in the project root for license information.
|
|
@@ -5278,7 +5636,7 @@ var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
5278
5636
|
|
|
5279
5637
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5280
5638
|
|
|
5281
|
-
let AuroLibraryRuntimeUtils$
|
|
5639
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
5282
5640
|
|
|
5283
5641
|
/* eslint-disable jsdoc/require-param */
|
|
5284
5642
|
|
|
@@ -5350,7 +5708,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
5350
5708
|
*
|
|
5351
5709
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
5352
5710
|
*/
|
|
5353
|
-
class AuroHelpText extends i$2 {
|
|
5711
|
+
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
5354
5712
|
|
|
5355
5713
|
constructor() {
|
|
5356
5714
|
super();
|
|
@@ -5359,14 +5717,14 @@ class AuroHelpText extends i$2 {
|
|
|
5359
5717
|
this.onDark = false;
|
|
5360
5718
|
this.hasTextContent = false;
|
|
5361
5719
|
|
|
5362
|
-
AuroLibraryRuntimeUtils$
|
|
5720
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
5363
5721
|
}
|
|
5364
5722
|
|
|
5365
5723
|
static get styles() {
|
|
5366
5724
|
return [
|
|
5367
|
-
colorCss$
|
|
5368
|
-
styleCss$
|
|
5369
|
-
tokensCss$
|
|
5725
|
+
colorCss$5,
|
|
5726
|
+
styleCss$6,
|
|
5727
|
+
tokensCss$4
|
|
5370
5728
|
];
|
|
5371
5729
|
}
|
|
5372
5730
|
|
|
@@ -5415,7 +5773,7 @@ class AuroHelpText extends i$2 {
|
|
|
5415
5773
|
*
|
|
5416
5774
|
*/
|
|
5417
5775
|
static register(name = "auro-helptext") {
|
|
5418
|
-
AuroLibraryRuntimeUtils$
|
|
5776
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
5419
5777
|
}
|
|
5420
5778
|
|
|
5421
5779
|
updated() {
|
|
@@ -5469,11 +5827,11 @@ class AuroHelpText extends i$2 {
|
|
|
5469
5827
|
</div>
|
|
5470
5828
|
`;
|
|
5471
5829
|
}
|
|
5472
|
-
}
|
|
5830
|
+
};
|
|
5473
5831
|
|
|
5474
5832
|
var helpTextVersion = '1.0.0';
|
|
5475
5833
|
|
|
5476
|
-
let AuroElement$
|
|
5834
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
5477
5835
|
static get properties() {
|
|
5478
5836
|
return {
|
|
5479
5837
|
|
|
@@ -5508,18 +5866,21 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
5508
5866
|
}
|
|
5509
5867
|
|
|
5510
5868
|
resetShapeClasses() {
|
|
5511
|
-
|
|
5512
|
-
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5869
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
5513
5870
|
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5871
|
+
if (wrapper) {
|
|
5872
|
+
wrapper.classList.forEach((className) => {
|
|
5873
|
+
if (className.startsWith('shape-')) {
|
|
5874
|
+
wrapper.classList.remove(className);
|
|
5875
|
+
}
|
|
5876
|
+
});
|
|
5520
5877
|
|
|
5521
|
-
|
|
5522
|
-
|
|
5878
|
+
}
|
|
5879
|
+
|
|
5880
|
+
if (this.shape && this.size) {
|
|
5881
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
5882
|
+
} else {
|
|
5883
|
+
wrapper.classList.add('shape-none');
|
|
5523
5884
|
}
|
|
5524
5885
|
}
|
|
5525
5886
|
|
|
@@ -5582,7 +5943,7 @@ let AuroElement$2 = class AuroElement extends i$2 {
|
|
|
5582
5943
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
5583
5944
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
5584
5945
|
*/
|
|
5585
|
-
class AuroDropdown extends AuroElement$
|
|
5946
|
+
class AuroDropdown extends AuroElement$3 {
|
|
5586
5947
|
constructor() {
|
|
5587
5948
|
super();
|
|
5588
5949
|
|
|
@@ -5595,19 +5956,14 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5595
5956
|
|
|
5596
5957
|
// Layout Config
|
|
5597
5958
|
this.layout = 'classic';
|
|
5598
|
-
this.shape = '
|
|
5959
|
+
this.shape = 'classic';
|
|
5599
5960
|
this.size = 'xl';
|
|
5961
|
+
|
|
5600
5962
|
this.parentBorder = false;
|
|
5601
5963
|
|
|
5602
5964
|
this.privateDefaults();
|
|
5603
5965
|
}
|
|
5604
5966
|
|
|
5605
|
-
get commonLabelClasses() {
|
|
5606
|
-
return {
|
|
5607
|
-
// 'withValue': this.value && this.value.length > 0
|
|
5608
|
-
};
|
|
5609
|
-
}
|
|
5610
|
-
|
|
5611
5967
|
get commonWrapperClasses() {
|
|
5612
5968
|
return {
|
|
5613
5969
|
'trigger': true,
|
|
@@ -5691,7 +6047,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5691
6047
|
/**
|
|
5692
6048
|
* @private
|
|
5693
6049
|
*/
|
|
5694
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
6050
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText$1);
|
|
5695
6051
|
|
|
5696
6052
|
/**
|
|
5697
6053
|
* @private
|
|
@@ -5991,8 +6347,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
5991
6347
|
|
|
5992
6348
|
static get styles() {
|
|
5993
6349
|
return [
|
|
5994
|
-
colorCss$1$
|
|
5995
|
-
tokensCss$1,
|
|
6350
|
+
colorCss$1$2,
|
|
6351
|
+
tokensCss$1$1,
|
|
5996
6352
|
|
|
5997
6353
|
// default layout
|
|
5998
6354
|
classicColorCss,
|
|
@@ -6280,14 +6636,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6280
6636
|
* @returns {void}
|
|
6281
6637
|
*/
|
|
6282
6638
|
handleTriggerContentSlotChange(event) {
|
|
6283
|
-
|
|
6284
6639
|
this.floater.handleTriggerTabIndex();
|
|
6285
6640
|
|
|
6286
6641
|
// Get the trigger
|
|
6287
6642
|
const trigger = this.shadowRoot.querySelector('#trigger');
|
|
6288
6643
|
|
|
6289
6644
|
// Get the trigger slot
|
|
6290
|
-
const triggerSlot = this.shadowRoot.querySelector('.
|
|
6645
|
+
const triggerSlot = this.shadowRoot.querySelector('.triggerContentWrapper slot');
|
|
6291
6646
|
|
|
6292
6647
|
// If there's a trigger slot
|
|
6293
6648
|
if (triggerSlot) {
|
|
@@ -6360,33 +6715,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6360
6715
|
}
|
|
6361
6716
|
|
|
6362
6717
|
/**
|
|
6718
|
+
* Returns HTML for the common portion of the layouts.
|
|
6363
6719
|
* @private
|
|
6364
|
-
* @
|
|
6365
|
-
* @
|
|
6366
|
-
* @description Handles the slot change event for the label slot.
|
|
6367
|
-
*/
|
|
6368
|
-
handleLabelSlotChange (event) {
|
|
6369
|
-
|
|
6370
|
-
// Get the nodes from the event
|
|
6371
|
-
const nodes = event.target.assignedNodes();
|
|
6372
|
-
|
|
6373
|
-
// Guard clause for no nodes
|
|
6374
|
-
if (!nodes) {
|
|
6375
|
-
return;
|
|
6376
|
-
}
|
|
6377
|
-
|
|
6378
|
-
// Convert the nodes to a measurable array so we can get the length
|
|
6379
|
-
const nodesArr = Array.from(nodes);
|
|
6380
|
-
|
|
6381
|
-
// If the nodes array has a length, the dropdown is labeled
|
|
6382
|
-
this.labeled = nodesArr.length > 0;
|
|
6383
|
-
}
|
|
6384
|
-
|
|
6385
|
-
/**
|
|
6386
|
-
* Returns HTML for the common portion of the layouts.
|
|
6387
|
-
* @private
|
|
6388
|
-
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
6389
|
-
* @returns {html} - Returns HTML.
|
|
6720
|
+
* @param {Object} helpTextClasses - Classes to apply to the help text container.
|
|
6721
|
+
* @returns {html} - Returns HTML.
|
|
6390
6722
|
*/
|
|
6391
6723
|
renderBasicHtml(helpTextClasses) {
|
|
6392
6724
|
return u`
|
|
@@ -6396,22 +6728,17 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6396
6728
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
6397
6729
|
tabindex="${this.tabIndex}"
|
|
6398
6730
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
6399
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6400
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6731
|
+
aria-expanded="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6732
|
+
aria-controls="${o(this.a11yRole === 'button' || this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6401
6733
|
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
6402
6734
|
@focusin="${this.handleFocusin}"
|
|
6403
6735
|
@blur="${this.handleFocusOut}">
|
|
6404
|
-
<div class="triggerContentWrapper">
|
|
6405
|
-
<
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
<div class="triggerContent">
|
|
6409
|
-
<slot
|
|
6410
|
-
name="trigger"
|
|
6411
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
6412
|
-
</div>
|
|
6736
|
+
<div class="triggerContentWrapper" id="triggerLabel">
|
|
6737
|
+
<slot
|
|
6738
|
+
name="trigger"
|
|
6739
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
6413
6740
|
</div>
|
|
6414
|
-
${this.chevron
|
|
6741
|
+
${this.chevron ? u`
|
|
6415
6742
|
<div
|
|
6416
6743
|
id="showStateIcon"
|
|
6417
6744
|
class="chevron"
|
|
@@ -6432,6 +6759,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6432
6759
|
<div id="bibSizer" part="size"></div>
|
|
6433
6760
|
<${this.dropdownBibTag}
|
|
6434
6761
|
id="bib"
|
|
6762
|
+
shape="${this.shape}"
|
|
6435
6763
|
?data-show="${this.isPopoverVisible}"
|
|
6436
6764
|
?isfullscreen="${this.isBibFullscreen}"
|
|
6437
6765
|
?common="${this.common}"
|
|
@@ -6451,62 +6779,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6451
6779
|
* @returns {html} - Returns HTML for the classic layout.
|
|
6452
6780
|
*/
|
|
6453
6781
|
renderLayoutClassic() {
|
|
6782
|
+
// TODO: check with Doug why this was never used?
|
|
6783
|
+
const helpTextClasses = {
|
|
6784
|
+
'helpText': true
|
|
6785
|
+
};
|
|
6454
6786
|
|
|
6455
6787
|
return u`
|
|
6456
|
-
|
|
6457
|
-
<div
|
|
6458
|
-
id="trigger"
|
|
6459
|
-
class="trigger"
|
|
6460
|
-
part="trigger"
|
|
6461
|
-
tabindex="${this.tabIndex}"
|
|
6462
|
-
?showBorder="${this.showTriggerBorders}"
|
|
6463
|
-
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
6464
|
-
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
6465
|
-
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
6466
|
-
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
6467
|
-
>
|
|
6468
|
-
<div class="triggerContentWrapper">
|
|
6469
|
-
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
6470
|
-
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
6471
|
-
</label>
|
|
6472
|
-
<div class="triggerContent">
|
|
6473
|
-
<slot
|
|
6474
|
-
name="trigger"
|
|
6475
|
-
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
6476
|
-
</div>
|
|
6477
|
-
</div>
|
|
6478
|
-
${this.chevron || this.common ? u`
|
|
6479
|
-
<div
|
|
6480
|
-
id="showStateIcon"
|
|
6481
|
-
part="chevron">
|
|
6482
|
-
<${this.iconTag}
|
|
6483
|
-
category="interface"
|
|
6484
|
-
name="chevron-down"
|
|
6485
|
-
?onDark="${this.onDark}"
|
|
6486
|
-
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
6487
|
-
>
|
|
6488
|
-
</${this.iconTag}>
|
|
6489
|
-
</div>
|
|
6490
|
-
` : undefined }
|
|
6491
|
-
</div>
|
|
6492
|
-
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
6493
|
-
<slot name="helpText"></slot>
|
|
6494
|
-
</${this.helpTextTag}>
|
|
6495
|
-
|
|
6496
|
-
<div id="bibSizer" part="size"></div>
|
|
6497
|
-
<${this.dropdownBibTag}
|
|
6498
|
-
id="bib"
|
|
6499
|
-
?data-show="${this.isPopoverVisible}"
|
|
6500
|
-
?isfullscreen="${this.isBibFullscreen}"
|
|
6501
|
-
?common="${this.common}"
|
|
6502
|
-
?rounded="${this.common || this.rounded}"
|
|
6503
|
-
?inset="${this.common || this.inset}"
|
|
6504
|
-
>
|
|
6505
|
-
<div class="slotContent">
|
|
6506
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
6507
|
-
</div>
|
|
6508
|
-
</${this.dropdownBibTag}>
|
|
6509
|
-
</div>
|
|
6788
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
6510
6789
|
`;
|
|
6511
6790
|
}
|
|
6512
6791
|
|
|
@@ -6574,9 +6853,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
6574
6853
|
|
|
6575
6854
|
var dropdownVersion = '3.0.0';
|
|
6576
6855
|
|
|
6577
|
-
var colorCss$
|
|
6856
|
+
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)}`;
|
|
6578
6857
|
|
|
6579
|
-
var styleCss$
|
|
6858
|
+
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)}`;
|
|
6580
6859
|
|
|
6581
6860
|
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)}`;
|
|
6582
6861
|
|
|
@@ -6587,7 +6866,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
6587
6866
|
|
|
6588
6867
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6589
6868
|
|
|
6590
|
-
let AuroLibraryRuntimeUtils$
|
|
6869
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
6591
6870
|
|
|
6592
6871
|
/* eslint-disable jsdoc/require-param */
|
|
6593
6872
|
|
|
@@ -6686,10 +6965,1003 @@ class AuroDependencyVersioning {
|
|
|
6686
6965
|
customElements.define(elementName, class extends tagClass {});
|
|
6687
6966
|
}
|
|
6688
6967
|
|
|
6689
|
-
return tag;
|
|
6968
|
+
return tag;
|
|
6969
|
+
}
|
|
6970
|
+
}
|
|
6971
|
+
|
|
6972
|
+
/**
|
|
6973
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
6974
|
+
*/
|
|
6975
|
+
const _observers = new WeakMap();
|
|
6976
|
+
|
|
6977
|
+
/**
|
|
6978
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
6979
|
+
* Structure: {
|
|
6980
|
+
* host: {
|
|
6981
|
+
* matchers: Set<Function>,
|
|
6982
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
6983
|
+
* }
|
|
6984
|
+
* }
|
|
6985
|
+
*/
|
|
6986
|
+
const _transportConfig = new WeakMap();
|
|
6987
|
+
|
|
6988
|
+
/**
|
|
6989
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
6990
|
+
*
|
|
6991
|
+
* @param {Object} params - The parameters for the function.
|
|
6992
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
6993
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
6994
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
6995
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
6996
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
6997
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
6998
|
+
*/
|
|
6999
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
7000
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
7001
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
7002
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
7003
|
+
}
|
|
7004
|
+
|
|
7005
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
7006
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
7007
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
7008
|
+
}
|
|
7009
|
+
|
|
7010
|
+
// Guard Clause: Ensure match is a function
|
|
7011
|
+
if (typeof match !== 'function') {
|
|
7012
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
7013
|
+
}
|
|
7014
|
+
|
|
7015
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
7016
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
7017
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
7018
|
+
}
|
|
7019
|
+
|
|
7020
|
+
// Register this transport and get cleanup function
|
|
7021
|
+
return _registerTransport({
|
|
7022
|
+
host,
|
|
7023
|
+
target,
|
|
7024
|
+
matcher: match,
|
|
7025
|
+
removeOriginal
|
|
7026
|
+
});
|
|
7027
|
+
};
|
|
7028
|
+
|
|
7029
|
+
/**
|
|
7030
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
7031
|
+
*
|
|
7032
|
+
* @param {Object} params - The parameters object.
|
|
7033
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
7034
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
7035
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
7036
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
7037
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
7038
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
7039
|
+
* @private
|
|
7040
|
+
*/
|
|
7041
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
7042
|
+
// Initialize config for this host if it doesn't exist
|
|
7043
|
+
if (!_transportConfig.has(host)) {
|
|
7044
|
+
_transportConfig.set(host, {
|
|
7045
|
+
matchers: new Set(),
|
|
7046
|
+
targets: new Map()
|
|
7047
|
+
});
|
|
7048
|
+
}
|
|
7049
|
+
|
|
7050
|
+
const config = _transportConfig.get(host);
|
|
7051
|
+
|
|
7052
|
+
// Add the matcher to the set of matchers for this host
|
|
7053
|
+
config.matchers.add(matcher);
|
|
7054
|
+
|
|
7055
|
+
// Initialize target entry if it doesn't exist
|
|
7056
|
+
if (!config.targets.has(target)) {
|
|
7057
|
+
config.targets.set(target, new Map());
|
|
7058
|
+
}
|
|
7059
|
+
|
|
7060
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
7061
|
+
config.targets.get(target).set(matcher, {
|
|
7062
|
+
removeOriginal,
|
|
7063
|
+
currentAttributes: new Map()
|
|
7064
|
+
});
|
|
7065
|
+
|
|
7066
|
+
// Perform initial attribute transport
|
|
7067
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
7068
|
+
|
|
7069
|
+
// Attach observer
|
|
7070
|
+
_attachObserver(host);
|
|
7071
|
+
|
|
7072
|
+
// Return cleanup function and utility functions
|
|
7073
|
+
return {
|
|
7074
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
7075
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
7076
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
7077
|
+
}
|
|
7078
|
+
};
|
|
7079
|
+
|
|
7080
|
+
/**
|
|
7081
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
7082
|
+
*
|
|
7083
|
+
* @param {HTMLElement} host - The host element
|
|
7084
|
+
* @param {HTMLElement} target - The target element
|
|
7085
|
+
* @param {Function} matcher - The matcher function
|
|
7086
|
+
* @private
|
|
7087
|
+
*/
|
|
7088
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
7089
|
+
const config = _transportConfig.get(host);
|
|
7090
|
+
if (!config) return;
|
|
7091
|
+
|
|
7092
|
+
// Remove this matcher from this target
|
|
7093
|
+
const targetMatchers = config.targets.get(target);
|
|
7094
|
+
if (targetMatchers) {
|
|
7095
|
+
targetMatchers.delete(matcher);
|
|
7096
|
+
|
|
7097
|
+
// If this target has no more matchers, remove it
|
|
7098
|
+
if (targetMatchers.size === 0) {
|
|
7099
|
+
config.targets.delete(target);
|
|
7100
|
+
}
|
|
7101
|
+
}
|
|
7102
|
+
|
|
7103
|
+
// Check if this matcher is still used by any target
|
|
7104
|
+
let matcherStillUsed = false;
|
|
7105
|
+
for (const matcherMap of config.targets.values()) {
|
|
7106
|
+
if (matcherMap.has(matcher)) {
|
|
7107
|
+
matcherStillUsed = true;
|
|
7108
|
+
break;
|
|
7109
|
+
}
|
|
7110
|
+
}
|
|
7111
|
+
|
|
7112
|
+
// If not used anymore, remove from matchers set
|
|
7113
|
+
if (!matcherStillUsed) {
|
|
7114
|
+
config.matchers.delete(matcher);
|
|
7115
|
+
}
|
|
7116
|
+
|
|
7117
|
+
// If no more targets or matchers, detach observer
|
|
7118
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
7119
|
+
_detachObserver(host);
|
|
7120
|
+
}
|
|
7121
|
+
};
|
|
7122
|
+
|
|
7123
|
+
/**
|
|
7124
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
7125
|
+
*
|
|
7126
|
+
* @param {Object} params - The parameters object.
|
|
7127
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
7128
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
7129
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
7130
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
7131
|
+
* @returns {void}
|
|
7132
|
+
* @private
|
|
7133
|
+
*/
|
|
7134
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
7135
|
+
// Get a list of all matching attributes on the host element and their values
|
|
7136
|
+
const matchingAttributes = host.getAttributeNames()
|
|
7137
|
+
.filter(attr => matcher(attr))
|
|
7138
|
+
.reduce((acc, attr) => {
|
|
7139
|
+
acc[attr] = host.getAttribute(attr);
|
|
7140
|
+
return acc;
|
|
7141
|
+
}, {});
|
|
7142
|
+
|
|
7143
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
7144
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
7145
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
7146
|
+
target.setAttribute(key, value);
|
|
7147
|
+
if (removeOriginal) {
|
|
7148
|
+
host.removeAttribute(key);
|
|
7149
|
+
}
|
|
7150
|
+
});
|
|
7151
|
+
};
|
|
7152
|
+
|
|
7153
|
+
/**
|
|
7154
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
7155
|
+
*
|
|
7156
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
7157
|
+
* @returns {MutationObserver} The observer instance.
|
|
7158
|
+
* @private
|
|
7159
|
+
*/
|
|
7160
|
+
const _attachObserver = (host) => {
|
|
7161
|
+
// If an observer for this host already exists, return it
|
|
7162
|
+
if (_observers.has(host)) {
|
|
7163
|
+
return _observers.get(host);
|
|
7164
|
+
}
|
|
7165
|
+
|
|
7166
|
+
// Create a new MutationObserver
|
|
7167
|
+
const observer = new MutationObserver((mutations) => {
|
|
7168
|
+
const config = _transportConfig.get(host);
|
|
7169
|
+
if (!config) return;
|
|
7170
|
+
|
|
7171
|
+
// For each mutation affecting attributes
|
|
7172
|
+
mutations
|
|
7173
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
7174
|
+
.forEach(mutation => {
|
|
7175
|
+
const attributeName = mutation.attributeName;
|
|
7176
|
+
|
|
7177
|
+
// Find matchers that care about this attribute
|
|
7178
|
+
for (const matcher of config.matchers) {
|
|
7179
|
+
if (matcher(attributeName)) {
|
|
7180
|
+
// For each target that uses this matcher
|
|
7181
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
7182
|
+
if (matcherConfigs.has(matcher)) {
|
|
7183
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
7184
|
+
_transportAttributes({
|
|
7185
|
+
host,
|
|
7186
|
+
target,
|
|
7187
|
+
matcher,
|
|
7188
|
+
removeOriginal
|
|
7189
|
+
});
|
|
7190
|
+
}
|
|
7191
|
+
}
|
|
7192
|
+
}
|
|
7193
|
+
}
|
|
7194
|
+
});
|
|
7195
|
+
});
|
|
7196
|
+
|
|
7197
|
+
// Start observing attribute changes
|
|
7198
|
+
observer.observe(host, { attributes: true });
|
|
7199
|
+
|
|
7200
|
+
// Store the observer
|
|
7201
|
+
_observers.set(host, observer);
|
|
7202
|
+
|
|
7203
|
+
return observer;
|
|
7204
|
+
};
|
|
7205
|
+
|
|
7206
|
+
/**
|
|
7207
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
7208
|
+
*
|
|
7209
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
7210
|
+
* @private
|
|
7211
|
+
*/
|
|
7212
|
+
const _detachObserver = (host) => {
|
|
7213
|
+
if (_observers.has(host)) {
|
|
7214
|
+
const observer = _observers.get(host);
|
|
7215
|
+
observer.disconnect();
|
|
7216
|
+
_observers.delete(host);
|
|
7217
|
+
}
|
|
7218
|
+
|
|
7219
|
+
// Clean up the transport config as well
|
|
7220
|
+
if (_transportConfig.has(host)) {
|
|
7221
|
+
_transportConfig.delete(host);
|
|
7222
|
+
}
|
|
7223
|
+
};
|
|
7224
|
+
|
|
7225
|
+
/**
|
|
7226
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
7227
|
+
* @param {HTMLElement} host - The host element
|
|
7228
|
+
* @param {HTMLElement} target - The target element
|
|
7229
|
+
* @param {Function} matcher - The matcher function
|
|
7230
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
7231
|
+
* @private
|
|
7232
|
+
*/
|
|
7233
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
7234
|
+
const config = _transportConfig.get(host);
|
|
7235
|
+
if (!config) return undefined;
|
|
7236
|
+
|
|
7237
|
+
const targetMatchers = config.targets.get(target);
|
|
7238
|
+
if (!targetMatchers) return undefined;
|
|
7239
|
+
|
|
7240
|
+
return targetMatchers.get(matcher);
|
|
7241
|
+
};
|
|
7242
|
+
|
|
7243
|
+
/**
|
|
7244
|
+
* Sets an observed attribute value
|
|
7245
|
+
* @param {HTMLElement} host - The host element
|
|
7246
|
+
* @param {HTMLElement} target - The target element
|
|
7247
|
+
* @param {Function} matcher - The matcher function
|
|
7248
|
+
* @param {string} key - The attribute name
|
|
7249
|
+
* @param {string} value - The attribute value
|
|
7250
|
+
* @private
|
|
7251
|
+
*/
|
|
7252
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
7253
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7254
|
+
if (matcherConfig) {
|
|
7255
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
7256
|
+
}
|
|
7257
|
+
};
|
|
7258
|
+
|
|
7259
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
7260
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7261
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
7262
|
+
return undefined;
|
|
7263
|
+
};
|
|
7264
|
+
|
|
7265
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
7266
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
7267
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
7268
|
+
return [];
|
|
7269
|
+
};
|
|
7270
|
+
|
|
7271
|
+
const _matchers = {
|
|
7272
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
7273
|
+
'role': attr => attr.match(/^role$/)
|
|
7274
|
+
};
|
|
7275
|
+
|
|
7276
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
7277
|
+
return transportAttributes({
|
|
7278
|
+
host,
|
|
7279
|
+
target,
|
|
7280
|
+
match: attr => {
|
|
7281
|
+
for (const key in _matchers) {
|
|
7282
|
+
if (_matchers[key](attr)) return true;
|
|
7283
|
+
}
|
|
7284
|
+
return false;
|
|
7285
|
+
},
|
|
7286
|
+
removeOriginal
|
|
7287
|
+
});
|
|
7288
|
+
};
|
|
7289
|
+
|
|
7290
|
+
let AuroElement$1 = class AuroElement extends i$2 {
|
|
7291
|
+
|
|
7292
|
+
/**
|
|
7293
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
7294
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
7295
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
7296
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
7297
|
+
* @private
|
|
7298
|
+
*/
|
|
7299
|
+
attributeWatcher;
|
|
7300
|
+
|
|
7301
|
+
static get properties() {
|
|
7302
|
+
return {
|
|
7303
|
+
|
|
7304
|
+
/**
|
|
7305
|
+
* Defines the layout of an element.
|
|
7306
|
+
* @default {'default'}
|
|
7307
|
+
*/
|
|
7308
|
+
layout: {
|
|
7309
|
+
type: String,
|
|
7310
|
+
attribute: "layout",
|
|
7311
|
+
reflect: true
|
|
7312
|
+
},
|
|
7313
|
+
|
|
7314
|
+
/**
|
|
7315
|
+
* Defines the shape of an element.
|
|
7316
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
7317
|
+
* @default {'default'}
|
|
7318
|
+
*/
|
|
7319
|
+
shape: {
|
|
7320
|
+
type: String,
|
|
7321
|
+
attribute: "shape",
|
|
7322
|
+
reflect: true
|
|
7323
|
+
},
|
|
7324
|
+
|
|
7325
|
+
/**
|
|
7326
|
+
* Defines the size of an element.
|
|
7327
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
7328
|
+
* @default {'md'}
|
|
7329
|
+
*/
|
|
7330
|
+
size: {
|
|
7331
|
+
type: String,
|
|
7332
|
+
attribute: "size",
|
|
7333
|
+
reflect: true
|
|
7334
|
+
},
|
|
7335
|
+
|
|
7336
|
+
/**
|
|
7337
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
7338
|
+
* @default {false}
|
|
7339
|
+
*/
|
|
7340
|
+
onDark: {
|
|
7341
|
+
type: Boolean,
|
|
7342
|
+
attribute: "ondark",
|
|
7343
|
+
reflect: true
|
|
7344
|
+
},
|
|
7345
|
+
|
|
7346
|
+
/**
|
|
7347
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
7348
|
+
* This is used to apply layout and shape classes dynamically.
|
|
7349
|
+
* @type {HTMLElement|null}
|
|
7350
|
+
* @default {null}
|
|
7351
|
+
* @private
|
|
7352
|
+
*/
|
|
7353
|
+
wrapper: {
|
|
7354
|
+
type: HTMLElement,
|
|
7355
|
+
attribute: false,
|
|
7356
|
+
reflect: false
|
|
7357
|
+
}
|
|
7358
|
+
};
|
|
7359
|
+
}
|
|
7360
|
+
|
|
7361
|
+
|
|
7362
|
+
|
|
7363
|
+
resetShapeClasses() {
|
|
7364
|
+
if (this.shape && this.size) {
|
|
7365
|
+
|
|
7366
|
+
if (this.wrapper) {
|
|
7367
|
+
this.wrapper.classList.forEach((className) => {
|
|
7368
|
+
if (className.startsWith('shape-')) {
|
|
7369
|
+
this.wrapper.classList.remove(className);
|
|
7370
|
+
}
|
|
7371
|
+
});
|
|
7372
|
+
|
|
7373
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
7374
|
+
}
|
|
7375
|
+
}
|
|
7376
|
+
}
|
|
7377
|
+
|
|
7378
|
+
resetLayoutClasses() {
|
|
7379
|
+
if (this.layout) {
|
|
7380
|
+
if (this.wrapper) {
|
|
7381
|
+
this.wrapper.classList.forEach((className) => {
|
|
7382
|
+
if (className.startsWith('layout-')) {
|
|
7383
|
+
this.wrapper.classList.remove(className);
|
|
7384
|
+
}
|
|
7385
|
+
});
|
|
7386
|
+
|
|
7387
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
7388
|
+
}
|
|
7389
|
+
}
|
|
7390
|
+
}
|
|
7391
|
+
|
|
7392
|
+
updateComponentArchitecture() {
|
|
7393
|
+
this.resetLayoutClasses();
|
|
7394
|
+
this.resetShapeClasses();
|
|
7395
|
+
}
|
|
7396
|
+
|
|
7397
|
+
updated(changedProperties) {
|
|
7398
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
7399
|
+
this.updateComponentArchitecture();
|
|
7400
|
+
}
|
|
7401
|
+
}
|
|
7402
|
+
|
|
7403
|
+
firstUpdated() {
|
|
7404
|
+
super.firstUpdated();
|
|
7405
|
+
|
|
7406
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
7407
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
7408
|
+
|
|
7409
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
7410
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
7411
|
+
}
|
|
7412
|
+
|
|
7413
|
+
disconnectedCallback() {
|
|
7414
|
+
super.disconnectedCallback();
|
|
7415
|
+
|
|
7416
|
+
// Cleanup the ARIA observer if it exists
|
|
7417
|
+
if (this.attributeWatcher) {
|
|
7418
|
+
this.attributeWatcher.cleanup();
|
|
7419
|
+
this.attributeWatcher = null;
|
|
7420
|
+
}
|
|
7421
|
+
}
|
|
7422
|
+
|
|
7423
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
7424
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
7425
|
+
render() {
|
|
7426
|
+
try {
|
|
7427
|
+
return this.renderLayout();
|
|
7428
|
+
} catch (error) {
|
|
7429
|
+
// failed to get the defined layout
|
|
7430
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
7431
|
+
|
|
7432
|
+
// fallback to the default layout
|
|
7433
|
+
return this.getLayout('default');
|
|
7434
|
+
}
|
|
7435
|
+
}
|
|
7436
|
+
};
|
|
7437
|
+
|
|
7438
|
+
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.icon-only ::slotted(:not(auro-icon):not([auro-icon])){display:none}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
7439
|
+
|
|
7440
|
+
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)}`;
|
|
7441
|
+
|
|
7442
|
+
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}`;
|
|
7443
|
+
|
|
7444
|
+
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}`;
|
|
7445
|
+
|
|
7446
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7447
|
+
// See LICENSE in the project root for license information.
|
|
7448
|
+
|
|
7449
|
+
// ---------------------------------------------------------------------
|
|
7450
|
+
|
|
7451
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7452
|
+
|
|
7453
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
7454
|
+
|
|
7455
|
+
/* eslint-disable jsdoc/require-param */
|
|
7456
|
+
|
|
7457
|
+
/**
|
|
7458
|
+
* This will register a new custom element with the browser.
|
|
7459
|
+
* @param {String} name - The name of the custom element.
|
|
7460
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
7461
|
+
* @returns {void}
|
|
7462
|
+
*/
|
|
7463
|
+
registerComponent(name, componentClass) {
|
|
7464
|
+
if (!customElements.get(name)) {
|
|
7465
|
+
customElements.define(name, class extends componentClass {});
|
|
7466
|
+
}
|
|
7467
|
+
}
|
|
7468
|
+
|
|
7469
|
+
/**
|
|
7470
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
7471
|
+
* @returns {void}
|
|
7472
|
+
*/
|
|
7473
|
+
closestElement(
|
|
7474
|
+
selector, // selector like in .closest()
|
|
7475
|
+
base = this, // extra functionality to skip a parent
|
|
7476
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
7477
|
+
!el || el === document || el === window
|
|
7478
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
7479
|
+
: found
|
|
7480
|
+
? found // found a selector INside this element
|
|
7481
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
7482
|
+
) {
|
|
7483
|
+
return __Closest(base);
|
|
7484
|
+
}
|
|
7485
|
+
/* eslint-enable jsdoc/require-param */
|
|
7486
|
+
|
|
7487
|
+
/**
|
|
7488
|
+
* 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.
|
|
7489
|
+
* @param {Object} elem - The element to check.
|
|
7490
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
7491
|
+
* @returns {void}
|
|
7492
|
+
*/
|
|
7493
|
+
handleComponentTagRename(elem, tagName) {
|
|
7494
|
+
const tag = tagName.toLowerCase();
|
|
7495
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7496
|
+
|
|
7497
|
+
if (elemTag !== tag) {
|
|
7498
|
+
elem.setAttribute(tag, true);
|
|
7499
|
+
}
|
|
7500
|
+
}
|
|
7501
|
+
|
|
7502
|
+
/**
|
|
7503
|
+
* Validates if an element is a specific Auro component.
|
|
7504
|
+
* @param {Object} elem - The element to validate.
|
|
7505
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
7506
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
7507
|
+
*/
|
|
7508
|
+
elementMatch(elem, tagName) {
|
|
7509
|
+
const tag = tagName.toLowerCase();
|
|
7510
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
7511
|
+
|
|
7512
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
7513
|
+
}
|
|
7514
|
+
};
|
|
7515
|
+
|
|
7516
|
+
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}}`;
|
|
7517
|
+
|
|
7518
|
+
var colorCss$1$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}`;
|
|
7519
|
+
|
|
7520
|
+
var tokensCss$1 = i$5`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
7521
|
+
|
|
7522
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7523
|
+
// See LICENSE in the project root for license information.
|
|
7524
|
+
|
|
7525
|
+
|
|
7526
|
+
class AuroLoader extends i$2 {
|
|
7527
|
+
constructor() {
|
|
7528
|
+
super();
|
|
7529
|
+
|
|
7530
|
+
/**
|
|
7531
|
+
* @private
|
|
7532
|
+
*/
|
|
7533
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
7534
|
+
|
|
7535
|
+
/**
|
|
7536
|
+
* @private
|
|
7537
|
+
*/
|
|
7538
|
+
this.mdCount = 3;
|
|
7539
|
+
|
|
7540
|
+
/**
|
|
7541
|
+
* @private
|
|
7542
|
+
*/
|
|
7543
|
+
this.smCount = 2;
|
|
7544
|
+
|
|
7545
|
+
/**
|
|
7546
|
+
* @private
|
|
7547
|
+
*/
|
|
7548
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
7549
|
+
|
|
7550
|
+
this.orbit = false;
|
|
7551
|
+
this.ringworm = false;
|
|
7552
|
+
this.laser = false;
|
|
7553
|
+
this.pulse = false;
|
|
7554
|
+
}
|
|
7555
|
+
|
|
7556
|
+
// function to define props used within the scope of this component
|
|
7557
|
+
static get properties() {
|
|
7558
|
+
return {
|
|
7559
|
+
|
|
7560
|
+
/**
|
|
7561
|
+
* Sets loader to laser type.
|
|
7562
|
+
*/
|
|
7563
|
+
laser: {
|
|
7564
|
+
type: Boolean,
|
|
7565
|
+
reflect: true
|
|
7566
|
+
},
|
|
7567
|
+
|
|
7568
|
+
/**
|
|
7569
|
+
* Sets loader to orbit type.
|
|
7570
|
+
*/
|
|
7571
|
+
orbit: {
|
|
7572
|
+
type: Boolean,
|
|
7573
|
+
reflect: true
|
|
7574
|
+
},
|
|
7575
|
+
|
|
7576
|
+
/**
|
|
7577
|
+
* Sets loader to pulse type.
|
|
7578
|
+
*/
|
|
7579
|
+
pulse: {
|
|
7580
|
+
type: Boolean,
|
|
7581
|
+
reflect: true
|
|
7582
|
+
},
|
|
7583
|
+
|
|
7584
|
+
/**
|
|
7585
|
+
* Sets loader to ringworm type.
|
|
7586
|
+
*/
|
|
7587
|
+
ringworm: {
|
|
7588
|
+
type: Boolean,
|
|
7589
|
+
reflect: true
|
|
7590
|
+
}
|
|
7591
|
+
};
|
|
7592
|
+
}
|
|
7593
|
+
|
|
7594
|
+
static get styles() {
|
|
7595
|
+
return [
|
|
7596
|
+
i$5`${styleCss$2}`,
|
|
7597
|
+
i$5`${colorCss$1$1}`,
|
|
7598
|
+
i$5`${tokensCss$1}`
|
|
7599
|
+
];
|
|
7600
|
+
}
|
|
7601
|
+
|
|
7602
|
+
/**
|
|
7603
|
+
* This will register this element with the browser.
|
|
7604
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
7605
|
+
*
|
|
7606
|
+
* @example
|
|
7607
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
7608
|
+
*
|
|
7609
|
+
*/
|
|
7610
|
+
static register(name = "auro-loader") {
|
|
7611
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroLoader);
|
|
7612
|
+
}
|
|
7613
|
+
|
|
7614
|
+
firstUpdated() {
|
|
7615
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
7616
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
7617
|
+
}
|
|
7618
|
+
|
|
7619
|
+
connectedCallback() {
|
|
7620
|
+
super.connectedCallback();
|
|
7621
|
+
}
|
|
7622
|
+
|
|
7623
|
+
/**
|
|
7624
|
+
* @private
|
|
7625
|
+
* @returns {Array} Numbered array for template map.
|
|
7626
|
+
*/
|
|
7627
|
+
defineTemplate() {
|
|
7628
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
7629
|
+
|
|
7630
|
+
if (this.orbit || this.laser) {
|
|
7631
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
7632
|
+
} else if (this.ringworm) {
|
|
7633
|
+
nodes = Array.from(Array(0).keys());
|
|
7634
|
+
}
|
|
7635
|
+
|
|
7636
|
+
return nodes;
|
|
7637
|
+
}
|
|
7638
|
+
|
|
7639
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
7640
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
7641
|
+
|
|
7642
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
7643
|
+
render() {
|
|
7644
|
+
return x`
|
|
7645
|
+
${this.defineTemplate().map((idx) => x`
|
|
7646
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
7647
|
+
`)}
|
|
7648
|
+
|
|
7649
|
+
<div class="no-animation">Loading...</div>
|
|
7650
|
+
|
|
7651
|
+
${this.ringworm ? x`
|
|
7652
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
7653
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
7654
|
+
</svg>`
|
|
7655
|
+
: ``
|
|
7656
|
+
}
|
|
7657
|
+
`;
|
|
7658
|
+
}
|
|
7659
|
+
}
|
|
7660
|
+
|
|
7661
|
+
var loaderVersion = '5.0.0';
|
|
7662
|
+
|
|
7663
|
+
/* eslint-disable max-lines, curly */
|
|
7664
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7665
|
+
// See LICENSE in the project root for license information.
|
|
7666
|
+
|
|
7667
|
+
|
|
7668
|
+
/**
|
|
7669
|
+
* @slot - Default slot for the text of the button.
|
|
7670
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
7671
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
7672
|
+
* @csspart text - Apply CSS to text slot.
|
|
7673
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
7674
|
+
*/
|
|
7675
|
+
|
|
7676
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
7677
|
+
|
|
7678
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
7679
|
+
|
|
7680
|
+
/**
|
|
7681
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
7682
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
7683
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
7684
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
7685
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
7686
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
7687
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
7688
|
+
*/
|
|
7689
|
+
class AuroButton extends AuroElement$1 {
|
|
7690
|
+
|
|
7691
|
+
/**
|
|
7692
|
+
* Enables form association for this element.
|
|
7693
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
7694
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
7695
|
+
*/
|
|
7696
|
+
static get formAssociated() {
|
|
7697
|
+
return true;
|
|
7698
|
+
}
|
|
7699
|
+
|
|
7700
|
+
constructor() {
|
|
7701
|
+
super();
|
|
7702
|
+
this.autofocus = false;
|
|
7703
|
+
this.disabled = false;
|
|
7704
|
+
this.loading = false;
|
|
7705
|
+
this.size = "md";
|
|
7706
|
+
this.shape = "rounded";
|
|
7707
|
+
this.onDark = false;
|
|
7708
|
+
this.fluid = false;
|
|
7709
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
7710
|
+
|
|
7711
|
+
// Support for HTML5 forms
|
|
7712
|
+
if (typeof this.attachInternals === 'function') {
|
|
7713
|
+
this.internals = this.attachInternals();
|
|
7714
|
+
} else {
|
|
7715
|
+
this.internals = null;
|
|
7716
|
+
|
|
7717
|
+
// eslint-disable-next-line no-console
|
|
7718
|
+
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.');
|
|
7719
|
+
}
|
|
7720
|
+
|
|
7721
|
+
/**
|
|
7722
|
+
* Generate unique names for dependency components.
|
|
7723
|
+
*/
|
|
7724
|
+
const versioning = new AuroDependencyVersioning();
|
|
7725
|
+
|
|
7726
|
+
/**
|
|
7727
|
+
* @private
|
|
7728
|
+
*/
|
|
7729
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7730
|
+
}
|
|
7731
|
+
|
|
7732
|
+
static get styles() {
|
|
7733
|
+
return [
|
|
7734
|
+
tokensCss$2,
|
|
7735
|
+
styleCss$3,
|
|
7736
|
+
colorCss$2,
|
|
7737
|
+
shapeSize
|
|
7738
|
+
];
|
|
7739
|
+
}
|
|
7740
|
+
|
|
7741
|
+
static get properties() {
|
|
7742
|
+
return {
|
|
7743
|
+
|
|
7744
|
+
...super.properties,
|
|
7745
|
+
|
|
7746
|
+
/**
|
|
7747
|
+
* Override layout since it isn't used in this component.
|
|
7748
|
+
* @private
|
|
7749
|
+
*/
|
|
7750
|
+
layout: {
|
|
7751
|
+
type: Boolean,
|
|
7752
|
+
attribute: false,
|
|
7753
|
+
reflect: false
|
|
7754
|
+
},
|
|
7755
|
+
|
|
7756
|
+
/**
|
|
7757
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
7758
|
+
*/
|
|
7759
|
+
autofocus: {
|
|
7760
|
+
type: Boolean,
|
|
7761
|
+
reflect: true
|
|
7762
|
+
},
|
|
7763
|
+
|
|
7764
|
+
/**
|
|
7765
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
7766
|
+
*/
|
|
7767
|
+
disabled: {
|
|
7768
|
+
type: Boolean,
|
|
7769
|
+
reflect: true
|
|
7770
|
+
},
|
|
7771
|
+
|
|
7772
|
+
/**
|
|
7773
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
7774
|
+
*/
|
|
7775
|
+
fluid: {
|
|
7776
|
+
type: Boolean,
|
|
7777
|
+
reflect: true
|
|
7778
|
+
},
|
|
7779
|
+
|
|
7780
|
+
/**
|
|
7781
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
7782
|
+
*/
|
|
7783
|
+
loading: {
|
|
7784
|
+
type: Boolean,
|
|
7785
|
+
reflect: true
|
|
7786
|
+
},
|
|
7787
|
+
|
|
7788
|
+
/**
|
|
7789
|
+
* 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.
|
|
7790
|
+
*/
|
|
7791
|
+
loadingText: {
|
|
7792
|
+
type: String
|
|
7793
|
+
},
|
|
7794
|
+
|
|
7795
|
+
/**
|
|
7796
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
7797
|
+
*/
|
|
7798
|
+
tIndex: {
|
|
7799
|
+
type: String,
|
|
7800
|
+
reflect: true
|
|
7801
|
+
},
|
|
7802
|
+
|
|
7803
|
+
/**
|
|
7804
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
7805
|
+
*/
|
|
7806
|
+
title: {
|
|
7807
|
+
type: String,
|
|
7808
|
+
reflect: true
|
|
7809
|
+
},
|
|
7810
|
+
|
|
7811
|
+
/**
|
|
7812
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
7813
|
+
*/
|
|
7814
|
+
type: {
|
|
7815
|
+
type: String,
|
|
7816
|
+
reflect: true
|
|
7817
|
+
},
|
|
7818
|
+
|
|
7819
|
+
/**
|
|
7820
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
7821
|
+
*/
|
|
7822
|
+
value: {
|
|
7823
|
+
type: String,
|
|
7824
|
+
reflect: true
|
|
7825
|
+
},
|
|
7826
|
+
|
|
7827
|
+
/**
|
|
7828
|
+
* Sets button variant option.
|
|
7829
|
+
* @default primary
|
|
7830
|
+
*/
|
|
7831
|
+
variant: {
|
|
7832
|
+
type: String,
|
|
7833
|
+
reflect: true
|
|
7834
|
+
},
|
|
7835
|
+
};
|
|
7836
|
+
}
|
|
7837
|
+
|
|
7838
|
+
/**
|
|
7839
|
+
* This will register this element with the browser.
|
|
7840
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
7841
|
+
*
|
|
7842
|
+
* @example
|
|
7843
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
7844
|
+
*
|
|
7845
|
+
*/
|
|
7846
|
+
static register(name = "auro-button") {
|
|
7847
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
7848
|
+
}
|
|
7849
|
+
|
|
7850
|
+
/**
|
|
7851
|
+
* Internal method to apply focus to the HTML5 button.
|
|
7852
|
+
* @private
|
|
7853
|
+
* @returns {void}
|
|
7854
|
+
*/
|
|
7855
|
+
focus() {
|
|
7856
|
+
this.renderRoot.querySelector('button').focus();
|
|
7857
|
+
}
|
|
7858
|
+
|
|
7859
|
+
/**
|
|
7860
|
+
* Submits the form that this button is associated with.
|
|
7861
|
+
* @private
|
|
7862
|
+
* @returns {void}
|
|
7863
|
+
*/
|
|
7864
|
+
surfaceSubmitEvent() {
|
|
7865
|
+
if (this.form) {
|
|
7866
|
+
this.form.requestSubmit();
|
|
7867
|
+
}
|
|
7868
|
+
}
|
|
7869
|
+
|
|
7870
|
+
/**
|
|
7871
|
+
* Returns the form element that this button is associated with.
|
|
7872
|
+
* @private
|
|
7873
|
+
* @returns {HTMLFormElement | null}
|
|
7874
|
+
*/
|
|
7875
|
+
get form() {
|
|
7876
|
+
return this.internals ? this.internals.form : null;
|
|
7877
|
+
}
|
|
7878
|
+
|
|
7879
|
+
/**
|
|
7880
|
+
* @private
|
|
7881
|
+
* @returns {Boolean}
|
|
7882
|
+
*/
|
|
7883
|
+
get hideText() {
|
|
7884
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
7885
|
+
}
|
|
7886
|
+
|
|
7887
|
+
/**
|
|
7888
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
7889
|
+
* @returns {string | undefined}
|
|
7890
|
+
* @private
|
|
7891
|
+
*/
|
|
7892
|
+
get currentAriaLabel() {
|
|
7893
|
+
if (!this.attributeWatcher) return undefined;
|
|
7894
|
+
|
|
7895
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
7896
|
+
return ariaLabel || undefined;
|
|
7897
|
+
}
|
|
7898
|
+
|
|
7899
|
+
/**
|
|
7900
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
7901
|
+
* @returns {string | undefined}
|
|
7902
|
+
* @private
|
|
7903
|
+
*/
|
|
7904
|
+
get currentAriaLabelledBy() {
|
|
7905
|
+
if (!this.attributeWatcher) return undefined;
|
|
7906
|
+
|
|
7907
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
7908
|
+
return ariaLabelledBy || undefined;
|
|
7909
|
+
}
|
|
7910
|
+
|
|
7911
|
+
/**
|
|
7912
|
+
* Renders the default layout for the button.
|
|
7913
|
+
* @returns {TemplateResult}
|
|
7914
|
+
* @private
|
|
7915
|
+
*/
|
|
7916
|
+
renderLayoutDefault() {
|
|
7917
|
+
const classes = {
|
|
7918
|
+
"util_insetLg--squish": true,
|
|
7919
|
+
"auro-button": true,
|
|
7920
|
+
"icon-only": this.hideText,
|
|
7921
|
+
wrapper: true,
|
|
7922
|
+
loading: this.loading,
|
|
7923
|
+
};
|
|
7924
|
+
|
|
7925
|
+
return u`
|
|
7926
|
+
<button
|
|
7927
|
+
part="button"
|
|
7928
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7929
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7930
|
+
tabIndex="${o(this.tIndex)}"
|
|
7931
|
+
?autofocus="${this.autofocus}"
|
|
7932
|
+
class="${e(classes)}"
|
|
7933
|
+
?disabled="${this.disabled || this.loading}"
|
|
7934
|
+
?onDark="${this.onDark}"
|
|
7935
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
7936
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
7937
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
7938
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
7939
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
7940
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7941
|
+
>
|
|
7942
|
+
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
7943
|
+
|
|
7944
|
+
<span class="contentWrapper">
|
|
7945
|
+
<span class="textSlot" part="text">
|
|
7946
|
+
<slot></slot>
|
|
7947
|
+
</span>
|
|
7948
|
+
</span>
|
|
7949
|
+
</button>
|
|
7950
|
+
`;
|
|
7951
|
+
}
|
|
7952
|
+
|
|
7953
|
+
/**
|
|
7954
|
+
* Renders the layout of the button
|
|
7955
|
+
* @returns {TemplateResult}
|
|
7956
|
+
* @private
|
|
7957
|
+
*/
|
|
7958
|
+
renderLayout() {
|
|
7959
|
+
return this.renderLayoutDefault();
|
|
6690
7960
|
}
|
|
6691
7961
|
}
|
|
6692
7962
|
|
|
7963
|
+
var buttonVersion = '11.0.0';
|
|
7964
|
+
|
|
6693
7965
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6694
7966
|
// See LICENSE in the project root for license information.
|
|
6695
7967
|
|
|
@@ -6700,7 +7972,7 @@ class AuroDependencyVersioning {
|
|
|
6700
7972
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
6701
7973
|
*/
|
|
6702
7974
|
|
|
6703
|
-
class AuroElement extends i$2 {
|
|
7975
|
+
let AuroElement$2 = class AuroElement extends i$2 {
|
|
6704
7976
|
|
|
6705
7977
|
// function to define props used within the scope of this component
|
|
6706
7978
|
static get properties() {
|
|
@@ -6724,7 +7996,7 @@ class AuroElement extends i$2 {
|
|
|
6724
7996
|
|
|
6725
7997
|
return 'false'
|
|
6726
7998
|
}
|
|
6727
|
-
}
|
|
7999
|
+
};
|
|
6728
8000
|
|
|
6729
8001
|
var error = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
6730
8002
|
|
|
@@ -6756,7 +8028,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
6756
8028
|
return _fetchMap.get(uri);
|
|
6757
8029
|
};
|
|
6758
8030
|
|
|
6759
|
-
var styleCss$1 = 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}`;
|
|
8031
|
+
var styleCss$1$1 = 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}`;
|
|
6760
8032
|
|
|
6761
8033
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6762
8034
|
// See LICENSE in the project root for license information.
|
|
@@ -6768,7 +8040,7 @@ var styleCss$1 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
6768
8040
|
*/
|
|
6769
8041
|
|
|
6770
8042
|
// build the component class
|
|
6771
|
-
class BaseIcon extends AuroElement {
|
|
8043
|
+
class BaseIcon extends AuroElement$2 {
|
|
6772
8044
|
constructor() {
|
|
6773
8045
|
super();
|
|
6774
8046
|
this.onDark = false;
|
|
@@ -6799,7 +8071,7 @@ class BaseIcon extends AuroElement {
|
|
|
6799
8071
|
|
|
6800
8072
|
static get styles() {
|
|
6801
8073
|
return i$5`
|
|
6802
|
-
${styleCss$1}
|
|
8074
|
+
${styleCss$1$1}
|
|
6803
8075
|
`;
|
|
6804
8076
|
}
|
|
6805
8077
|
|
|
@@ -6840,9 +8112,9 @@ class BaseIcon extends AuroElement {
|
|
|
6840
8112
|
}
|
|
6841
8113
|
}
|
|
6842
8114
|
|
|
6843
|
-
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)}`;
|
|
8115
|
+
var tokensCss$3 = 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)}`;
|
|
6844
8116
|
|
|
6845
|
-
var colorCss$
|
|
8117
|
+
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)}`;
|
|
6846
8118
|
|
|
6847
8119
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6848
8120
|
// See LICENSE in the project root for license information.
|
|
@@ -7000,9 +8272,9 @@ class AuroIcon extends BaseIcon {
|
|
|
7000
8272
|
static get styles() {
|
|
7001
8273
|
return [
|
|
7002
8274
|
super.styles,
|
|
7003
|
-
i$5`${tokensCss}`,
|
|
7004
|
-
i$5`${styleCss$1}`,
|
|
7005
|
-
i$5`${colorCss$
|
|
8275
|
+
i$5`${tokensCss$3}`,
|
|
8276
|
+
i$5`${styleCss$1$1}`,
|
|
8277
|
+
i$5`${colorCss$4}`
|
|
7006
8278
|
];
|
|
7007
8279
|
}
|
|
7008
8280
|
|
|
@@ -7036,8 +8308,12 @@ class AuroIcon extends BaseIcon {
|
|
|
7036
8308
|
async firstUpdated() {
|
|
7037
8309
|
await super.firstUpdated();
|
|
7038
8310
|
|
|
7039
|
-
|
|
7040
|
-
|
|
8311
|
+
/**
|
|
8312
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
8313
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
8314
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
8315
|
+
*/
|
|
8316
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
7041
8317
|
const svgDesc = this.svg.querySelector('desc');
|
|
7042
8318
|
|
|
7043
8319
|
if (svgDesc) {
|
|
@@ -7081,7 +8357,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7081
8357
|
}
|
|
7082
8358
|
}
|
|
7083
8359
|
|
|
7084
|
-
var iconVersion = '8.0.
|
|
8360
|
+
var iconVersion = '8.0.4';
|
|
7085
8361
|
|
|
7086
8362
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7087
8363
|
// See LICENSE in the project root for license information.
|
|
@@ -7090,7 +8366,7 @@ var iconVersion = '8.0.3';
|
|
|
7090
8366
|
|
|
7091
8367
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7092
8368
|
|
|
7093
|
-
class AuroLibraryRuntimeUtils {
|
|
8369
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
7094
8370
|
|
|
7095
8371
|
/* eslint-disable jsdoc/require-param */
|
|
7096
8372
|
|
|
@@ -7151,9 +8427,9 @@ class AuroLibraryRuntimeUtils {
|
|
|
7151
8427
|
|
|
7152
8428
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
7153
8429
|
}
|
|
7154
|
-
}
|
|
8430
|
+
};
|
|
7155
8431
|
|
|
7156
|
-
var styleCss$
|
|
8432
|
+
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)}`;
|
|
7157
8433
|
|
|
7158
8434
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7159
8435
|
// See LICENSE in the project root for license information.
|
|
@@ -7182,7 +8458,7 @@ class AuroHeader extends i$2 {
|
|
|
7182
8458
|
/**
|
|
7183
8459
|
* @private
|
|
7184
8460
|
*/
|
|
7185
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
8461
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
7186
8462
|
}
|
|
7187
8463
|
|
|
7188
8464
|
// function to define props used within the scope of this component
|
|
@@ -7200,7 +8476,7 @@ class AuroHeader extends i$2 {
|
|
|
7200
8476
|
}
|
|
7201
8477
|
|
|
7202
8478
|
static get styles() {
|
|
7203
|
-
return [styleCss$
|
|
8479
|
+
return [styleCss$5];
|
|
7204
8480
|
}
|
|
7205
8481
|
|
|
7206
8482
|
/**
|
|
@@ -7212,7 +8488,7 @@ class AuroHeader extends i$2 {
|
|
|
7212
8488
|
*
|
|
7213
8489
|
*/
|
|
7214
8490
|
static register(name = "auro-header") {
|
|
7215
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
8491
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHeader);
|
|
7216
8492
|
}
|
|
7217
8493
|
|
|
7218
8494
|
firstUpdated() {
|
|
@@ -7308,17 +8584,30 @@ class AuroBibtemplate extends i$2 {
|
|
|
7308
8584
|
|
|
7309
8585
|
this.large = false;
|
|
7310
8586
|
|
|
7311
|
-
AuroLibraryRuntimeUtils$
|
|
8587
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
7312
8588
|
|
|
7313
8589
|
const versioning = new AuroDependencyVersioning();
|
|
8590
|
+
|
|
8591
|
+
/**
|
|
8592
|
+
* @private
|
|
8593
|
+
*/
|
|
7314
8594
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
8595
|
+
|
|
8596
|
+
/**
|
|
8597
|
+
* @private
|
|
8598
|
+
*/
|
|
7315
8599
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
8600
|
+
|
|
8601
|
+
/**
|
|
8602
|
+
* @private
|
|
8603
|
+
*/
|
|
8604
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion, AuroButton);
|
|
7316
8605
|
}
|
|
7317
8606
|
|
|
7318
8607
|
static get styles() {
|
|
7319
8608
|
return [
|
|
7320
|
-
colorCss$
|
|
7321
|
-
styleCss$
|
|
8609
|
+
colorCss$3,
|
|
8610
|
+
styleCss$4,
|
|
7322
8611
|
tokenCss
|
|
7323
8612
|
];
|
|
7324
8613
|
}
|
|
@@ -7347,7 +8636,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
7347
8636
|
*
|
|
7348
8637
|
*/
|
|
7349
8638
|
static register(name = "auro-bibtemplate") {
|
|
7350
|
-
AuroLibraryRuntimeUtils$
|
|
8639
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroBibtemplate);
|
|
7351
8640
|
}
|
|
7352
8641
|
|
|
7353
8642
|
/**
|
|
@@ -7401,37 +8690,245 @@ class AuroBibtemplate extends i$2 {
|
|
|
7401
8690
|
|
|
7402
8691
|
// function that renders the HTML and CSS into the scope of the component
|
|
7403
8692
|
render() {
|
|
7404
|
-
return u`
|
|
7405
|
-
<div id="bibTemplate" part="bibtemplate">
|
|
7406
|
-
${this.isFullscreen ? u`
|
|
7407
|
-
<div id="headerContainer">
|
|
7408
|
-
|
|
7409
|
-
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
7410
|
-
|
|
7411
|
-
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
7412
|
-
<slot name="header"></slot>
|
|
7413
|
-
</${this.headerTag}>
|
|
7414
|
-
<span id="subheader">
|
|
7415
|
-
<slot name="subheader"></slot>
|
|
7416
|
-
</span>
|
|
7417
|
-
</div>` : null}
|
|
7418
|
-
|
|
7419
|
-
<div id="bodyContainer">
|
|
7420
|
-
<slot></slot>
|
|
7421
|
-
</div>
|
|
7422
|
-
|
|
7423
|
-
${this.isFullscreen ? u`
|
|
7424
|
-
<div id="footerContainer">
|
|
7425
|
-
<slot name="footer"></slot>
|
|
7426
|
-
</div>` : null}
|
|
8693
|
+
return u`
|
|
8694
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
8695
|
+
${this.isFullscreen ? u`
|
|
8696
|
+
<div id="headerContainer">
|
|
8697
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
8698
|
+
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
8699
|
+
</${this.buttonTag}>
|
|
8700
|
+
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
8701
|
+
<slot name="header"></slot>
|
|
8702
|
+
</${this.headerTag}>
|
|
8703
|
+
<span id="subheader">
|
|
8704
|
+
<slot name="subheader"></slot>
|
|
8705
|
+
</span>
|
|
8706
|
+
</div>` : null}
|
|
8707
|
+
|
|
8708
|
+
<div id="bodyContainer">
|
|
8709
|
+
<slot></slot>
|
|
8710
|
+
</div>
|
|
8711
|
+
|
|
8712
|
+
${this.isFullscreen ? u`
|
|
8713
|
+
<div id="footerContainer">
|
|
8714
|
+
<slot name="footer"></slot>
|
|
8715
|
+
</div>` : null}
|
|
8716
|
+
</div>
|
|
8717
|
+
`;
|
|
8718
|
+
}
|
|
8719
|
+
}
|
|
8720
|
+
|
|
8721
|
+
var bibTemplateVersion = '1.0.0';
|
|
8722
|
+
|
|
8723
|
+
var colorCss$1 = 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)}`;
|
|
8724
|
+
|
|
8725
|
+
var styleCss$1 = 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}`;
|
|
8726
|
+
|
|
8727
|
+
var tokensCss = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
8728
|
+
|
|
8729
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8730
|
+
// See LICENSE in the project root for license information.
|
|
8731
|
+
|
|
8732
|
+
// ---------------------------------------------------------------------
|
|
8733
|
+
|
|
8734
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8735
|
+
|
|
8736
|
+
class AuroLibraryRuntimeUtils {
|
|
8737
|
+
|
|
8738
|
+
/* eslint-disable jsdoc/require-param */
|
|
8739
|
+
|
|
8740
|
+
/**
|
|
8741
|
+
* This will register a new custom element with the browser.
|
|
8742
|
+
* @param {String} name - The name of the custom element.
|
|
8743
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
8744
|
+
* @returns {void}
|
|
8745
|
+
*/
|
|
8746
|
+
registerComponent(name, componentClass) {
|
|
8747
|
+
if (!customElements.get(name)) {
|
|
8748
|
+
customElements.define(name, class extends componentClass {});
|
|
8749
|
+
}
|
|
8750
|
+
}
|
|
8751
|
+
|
|
8752
|
+
/**
|
|
8753
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
8754
|
+
* @returns {void}
|
|
8755
|
+
*/
|
|
8756
|
+
closestElement(
|
|
8757
|
+
selector, // selector like in .closest()
|
|
8758
|
+
base = this, // extra functionality to skip a parent
|
|
8759
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8760
|
+
!el || el === document || el === window
|
|
8761
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
8762
|
+
: found
|
|
8763
|
+
? found // found a selector INside this element
|
|
8764
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8765
|
+
) {
|
|
8766
|
+
return __Closest(base);
|
|
8767
|
+
}
|
|
8768
|
+
/* eslint-enable jsdoc/require-param */
|
|
8769
|
+
|
|
8770
|
+
/**
|
|
8771
|
+
* 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.
|
|
8772
|
+
* @param {Object} elem - The element to check.
|
|
8773
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8774
|
+
* @returns {void}
|
|
8775
|
+
*/
|
|
8776
|
+
handleComponentTagRename(elem, tagName) {
|
|
8777
|
+
const tag = tagName.toLowerCase();
|
|
8778
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8779
|
+
|
|
8780
|
+
if (elemTag !== tag) {
|
|
8781
|
+
elem.setAttribute(tag, true);
|
|
8782
|
+
}
|
|
8783
|
+
}
|
|
8784
|
+
|
|
8785
|
+
/**
|
|
8786
|
+
* Validates if an element is a specific Auro component.
|
|
8787
|
+
* @param {Object} elem - The element to validate.
|
|
8788
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
8789
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8790
|
+
*/
|
|
8791
|
+
elementMatch(elem, tagName) {
|
|
8792
|
+
const tag = tagName.toLowerCase();
|
|
8793
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8794
|
+
|
|
8795
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
8796
|
+
}
|
|
8797
|
+
}
|
|
8798
|
+
|
|
8799
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
8800
|
+
// See LICENSE in the project root for license information.
|
|
8801
|
+
|
|
8802
|
+
|
|
8803
|
+
/**
|
|
8804
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
8805
|
+
*
|
|
8806
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
8807
|
+
*/
|
|
8808
|
+
class AuroHelpText extends i$2 {
|
|
8809
|
+
|
|
8810
|
+
constructor() {
|
|
8811
|
+
super();
|
|
8812
|
+
|
|
8813
|
+
this.error = false;
|
|
8814
|
+
this.onDark = false;
|
|
8815
|
+
this.hasTextContent = false;
|
|
8816
|
+
|
|
8817
|
+
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
8818
|
+
}
|
|
8819
|
+
|
|
8820
|
+
static get styles() {
|
|
8821
|
+
return [
|
|
8822
|
+
colorCss$1,
|
|
8823
|
+
styleCss$1,
|
|
8824
|
+
tokensCss
|
|
8825
|
+
];
|
|
8826
|
+
}
|
|
8827
|
+
|
|
8828
|
+
// function to define props used within the scope of this component
|
|
8829
|
+
static get properties() {
|
|
8830
|
+
return {
|
|
8831
|
+
|
|
8832
|
+
/**
|
|
8833
|
+
* @private
|
|
8834
|
+
*/
|
|
8835
|
+
slotNodes: {
|
|
8836
|
+
type: Boolean,
|
|
8837
|
+
},
|
|
8838
|
+
|
|
8839
|
+
/**
|
|
8840
|
+
* @private
|
|
8841
|
+
*/
|
|
8842
|
+
hasTextContent: {
|
|
8843
|
+
type: Boolean,
|
|
8844
|
+
},
|
|
8845
|
+
|
|
8846
|
+
/**
|
|
8847
|
+
* If declared, make font color red.
|
|
8848
|
+
*/
|
|
8849
|
+
error: {
|
|
8850
|
+
type: Boolean,
|
|
8851
|
+
reflect: true,
|
|
8852
|
+
},
|
|
8853
|
+
|
|
8854
|
+
/**
|
|
8855
|
+
* If declared, will apply onDark styles.
|
|
8856
|
+
*/
|
|
8857
|
+
onDark: {
|
|
8858
|
+
type: Boolean,
|
|
8859
|
+
reflect: true
|
|
8860
|
+
}
|
|
8861
|
+
};
|
|
8862
|
+
}
|
|
8863
|
+
|
|
8864
|
+
/**
|
|
8865
|
+
* This will register this element with the browser.
|
|
8866
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
8867
|
+
*
|
|
8868
|
+
* @example
|
|
8869
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
8870
|
+
*
|
|
8871
|
+
*/
|
|
8872
|
+
static register(name = "auro-helptext") {
|
|
8873
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
8874
|
+
}
|
|
8875
|
+
|
|
8876
|
+
updated() {
|
|
8877
|
+
this.handleSlotChange();
|
|
8878
|
+
}
|
|
8879
|
+
|
|
8880
|
+
handleSlotChange(event) {
|
|
8881
|
+
if (event) {
|
|
8882
|
+
this.slotNodes = event.target.assignedNodes();
|
|
8883
|
+
}
|
|
8884
|
+
|
|
8885
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
8886
|
+
}
|
|
8887
|
+
|
|
8888
|
+
/**
|
|
8889
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
8890
|
+
*
|
|
8891
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
8892
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
8893
|
+
* @private
|
|
8894
|
+
*/
|
|
8895
|
+
checkSlotsForContent(nodes) {
|
|
8896
|
+
if (!nodes) {
|
|
8897
|
+
return false;
|
|
8898
|
+
}
|
|
8899
|
+
|
|
8900
|
+
return nodes.some((node) => {
|
|
8901
|
+
if (node.textContent.trim()) {
|
|
8902
|
+
return true;
|
|
8903
|
+
}
|
|
8904
|
+
|
|
8905
|
+
if (!node.querySelector) {
|
|
8906
|
+
return false;
|
|
8907
|
+
}
|
|
8908
|
+
|
|
8909
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
8910
|
+
if (!nestedSlot) {
|
|
8911
|
+
return false;
|
|
8912
|
+
}
|
|
8913
|
+
|
|
8914
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
8915
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
8916
|
+
});
|
|
8917
|
+
}
|
|
8918
|
+
|
|
8919
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
8920
|
+
render() {
|
|
8921
|
+
return x`
|
|
8922
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
8923
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
7427
8924
|
</div>
|
|
7428
|
-
|
|
8925
|
+
`;
|
|
7429
8926
|
}
|
|
7430
8927
|
}
|
|
7431
8928
|
|
|
7432
|
-
var
|
|
8929
|
+
var helptextVersion = '1.0.0';
|
|
7433
8930
|
|
|
7434
|
-
var styleCss = i$5
|
|
8931
|
+
var styleCss = i$5`:host([isindropdown]) .wrapper{padding:var(--ds-size-300, 1.5rem)}`;
|
|
7435
8932
|
|
|
7436
8933
|
var colorCss = i$5`:host ::slotted(*:not(:first-child)){border-color:var(--ds-auro-counter-divider-color)}`;
|
|
7437
8934
|
|
|
@@ -7455,7 +8952,7 @@ class AuroCounterWrapper extends i$2 {
|
|
|
7455
8952
|
return [
|
|
7456
8953
|
colorCss,
|
|
7457
8954
|
styleCss,
|
|
7458
|
-
|
|
8955
|
+
tokens
|
|
7459
8956
|
];
|
|
7460
8957
|
}
|
|
7461
8958
|
|
|
@@ -7466,7 +8963,7 @@ class AuroCounterWrapper extends i$2 {
|
|
|
7466
8963
|
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
7467
8964
|
*/
|
|
7468
8965
|
static register(name = "auro-counter-wrapper") {
|
|
7469
|
-
AuroLibraryRuntimeUtils$
|
|
8966
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterWrapper);
|
|
7470
8967
|
}
|
|
7471
8968
|
|
|
7472
8969
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -7481,7 +8978,102 @@ if (!customElements.get("auro-counter-wrapper")) {
|
|
|
7481
8978
|
customElements.define("auro-counter-wrapper", AuroCounterWrapper);
|
|
7482
8979
|
}
|
|
7483
8980
|
|
|
7484
|
-
|
|
8981
|
+
class AuroElement extends i$2 {
|
|
8982
|
+
static get properties() {
|
|
8983
|
+
return {
|
|
8984
|
+
|
|
8985
|
+
/**
|
|
8986
|
+
* Defines the language of an element.
|
|
8987
|
+
* @default {'default'}
|
|
8988
|
+
*/
|
|
8989
|
+
layout: {
|
|
8990
|
+
type: String,
|
|
8991
|
+
attribute: "layout",
|
|
8992
|
+
reflect: true
|
|
8993
|
+
},
|
|
8994
|
+
|
|
8995
|
+
shape: {
|
|
8996
|
+
type: String,
|
|
8997
|
+
attribute: "shape",
|
|
8998
|
+
reflect: true
|
|
8999
|
+
},
|
|
9000
|
+
|
|
9001
|
+
size: {
|
|
9002
|
+
type: String,
|
|
9003
|
+
attribute: "size",
|
|
9004
|
+
reflect: true
|
|
9005
|
+
},
|
|
9006
|
+
|
|
9007
|
+
onDark: {
|
|
9008
|
+
type: Boolean,
|
|
9009
|
+
attribute: "ondark",
|
|
9010
|
+
reflect: true
|
|
9011
|
+
}
|
|
9012
|
+
};
|
|
9013
|
+
}
|
|
9014
|
+
|
|
9015
|
+
resetShapeClasses() {
|
|
9016
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9017
|
+
|
|
9018
|
+
if (wrapper) {
|
|
9019
|
+
wrapper.classList.forEach((className) => {
|
|
9020
|
+
if (className.startsWith('shape-')) {
|
|
9021
|
+
wrapper.classList.remove(className);
|
|
9022
|
+
}
|
|
9023
|
+
});
|
|
9024
|
+
|
|
9025
|
+
}
|
|
9026
|
+
|
|
9027
|
+
if (this.shape && this.size) {
|
|
9028
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
9029
|
+
} else {
|
|
9030
|
+
wrapper.classList.add('shape-none');
|
|
9031
|
+
}
|
|
9032
|
+
}
|
|
9033
|
+
|
|
9034
|
+
resetLayoutClasses() {
|
|
9035
|
+
if (this.layout) {
|
|
9036
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
9037
|
+
|
|
9038
|
+
if (wrapper) {
|
|
9039
|
+
wrapper.classList.forEach((className) => {
|
|
9040
|
+
if (className.startsWith('layout-')) {
|
|
9041
|
+
wrapper.classList.remove(className);
|
|
9042
|
+
}
|
|
9043
|
+
});
|
|
9044
|
+
|
|
9045
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
9046
|
+
}
|
|
9047
|
+
}
|
|
9048
|
+
}
|
|
9049
|
+
|
|
9050
|
+
updateComponentArchitecture() {
|
|
9051
|
+
this.resetLayoutClasses();
|
|
9052
|
+
this.resetShapeClasses();
|
|
9053
|
+
}
|
|
9054
|
+
|
|
9055
|
+
updated(changedProperties) {
|
|
9056
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
9057
|
+
this.updateComponentArchitecture();
|
|
9058
|
+
}
|
|
9059
|
+
}
|
|
9060
|
+
|
|
9061
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
9062
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
9063
|
+
render() {
|
|
9064
|
+
try {
|
|
9065
|
+
return this.renderLayout();
|
|
9066
|
+
} catch (error) {
|
|
9067
|
+
// failed to get the defined layout
|
|
9068
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
9069
|
+
|
|
9070
|
+
// fallback to the default layout
|
|
9071
|
+
return this.getLayout('default');
|
|
9072
|
+
}
|
|
9073
|
+
}
|
|
9074
|
+
}
|
|
9075
|
+
|
|
9076
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions, max-lines, prefer-destructuring, no-underscore-dangle, arrow-parens, no-confusing-arrow, curly */
|
|
7485
9077
|
|
|
7486
9078
|
|
|
7487
9079
|
/**
|
|
@@ -7498,8 +9090,9 @@ if (!customElements.get("auro-counter-wrapper")) {
|
|
|
7498
9090
|
* @slot label - Dropdown label content. Only used when `isDropdown` is true.
|
|
7499
9091
|
* @slot valueText - Dropdown value text display. Only used when `isDropdown` is true.
|
|
7500
9092
|
* @slot helpText - Dropdown help text content. Only used when `isDropdown` is true.
|
|
9093
|
+
* @property {'classic'|'snowflake'} layout - Determines the layout style of the counter group when it is a dropdown. Options are 'classic' or 'snowflake'. Default is 'classic'.
|
|
7501
9094
|
*/
|
|
7502
|
-
class AuroCounterGroup extends
|
|
9095
|
+
class AuroCounterGroup extends AuroElement {
|
|
7503
9096
|
constructor() {
|
|
7504
9097
|
super();
|
|
7505
9098
|
|
|
@@ -7510,12 +9103,15 @@ class AuroCounterGroup extends i$2 {
|
|
|
7510
9103
|
this.validity = undefined;
|
|
7511
9104
|
this.value = undefined;
|
|
7512
9105
|
|
|
9106
|
+
this.matchWidth = false;
|
|
7513
9107
|
this.isDropdown = false;
|
|
7514
9108
|
this.fullscreenBreakpoint = 'sm';
|
|
7515
9109
|
this.largeFullscreenHeadline = false;
|
|
7516
9110
|
this.autoPlacement = false;
|
|
7517
9111
|
this.noFlip = false;
|
|
7518
9112
|
|
|
9113
|
+
this.placement = 'bottom-start';
|
|
9114
|
+
|
|
7519
9115
|
/**
|
|
7520
9116
|
* @private
|
|
7521
9117
|
*/
|
|
@@ -7555,10 +9151,21 @@ class AuroCounterGroup extends i$2 {
|
|
|
7555
9151
|
* @type {string}
|
|
7556
9152
|
*/
|
|
7557
9153
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-counter-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
9154
|
+
|
|
9155
|
+
/**
|
|
9156
|
+
* Dynamically generated helptext tag.
|
|
9157
|
+
* @private
|
|
9158
|
+
* @type {string}
|
|
9159
|
+
*/
|
|
9160
|
+
this.helpTextTag = versioning.generateTag("auro-formkit-counter-helptext", helptextVersion, AuroHelpText);
|
|
7558
9161
|
}
|
|
7559
9162
|
|
|
7560
9163
|
static get styles() {
|
|
7561
|
-
return [
|
|
9164
|
+
return [
|
|
9165
|
+
tokens,
|
|
9166
|
+
counterGroupStyles,
|
|
9167
|
+
shapeSizeCss$1
|
|
9168
|
+
];
|
|
7562
9169
|
}
|
|
7563
9170
|
|
|
7564
9171
|
static get properties() {
|
|
@@ -7593,6 +9200,15 @@ class AuroCounterGroup extends i$2 {
|
|
|
7593
9200
|
type: Boolean
|
|
7594
9201
|
},
|
|
7595
9202
|
|
|
9203
|
+
/**
|
|
9204
|
+
* If declared, the dropdown will expand to the width of its parent container.
|
|
9205
|
+
* Otherwise, the dropdown width will be determined by its content.
|
|
9206
|
+
*/
|
|
9207
|
+
matchWidth: {
|
|
9208
|
+
type: Boolean,
|
|
9209
|
+
reflect: true
|
|
9210
|
+
},
|
|
9211
|
+
|
|
7596
9212
|
/**
|
|
7597
9213
|
* The maximum value allowed for the whole group of counters.
|
|
7598
9214
|
*/
|
|
@@ -7680,6 +9296,16 @@ class AuroCounterGroup extends i$2 {
|
|
|
7680
9296
|
value: {
|
|
7681
9297
|
type: Object,
|
|
7682
9298
|
},
|
|
9299
|
+
|
|
9300
|
+
/**
|
|
9301
|
+
* The current text in the valueText slot.
|
|
9302
|
+
* @private
|
|
9303
|
+
*/
|
|
9304
|
+
valueText: {
|
|
9305
|
+
type: String,
|
|
9306
|
+
reflect: false,
|
|
9307
|
+
attribute: false
|
|
9308
|
+
}
|
|
7683
9309
|
};
|
|
7684
9310
|
}
|
|
7685
9311
|
|
|
@@ -7780,13 +9406,8 @@ class AuroCounterGroup extends i$2 {
|
|
|
7780
9406
|
});
|
|
7781
9407
|
|
|
7782
9408
|
const counterWrapper = this.shadowRoot.querySelector('auro-counter-wrapper');
|
|
7783
|
-
|
|
7784
|
-
|
|
7785
|
-
this.counters.forEach((counter) => {
|
|
7786
|
-
counterWrapper.append(counter);
|
|
7787
|
-
});
|
|
7788
|
-
|
|
7789
|
-
this.counters = counterWrapper.querySelectorAll("auro-counter, [auro-counter]");
|
|
9409
|
+
const counterSlot = counterWrapper.querySelector('slot');
|
|
9410
|
+
this.counters = counterSlot.assignedElements().filter(el => el.tagName.toLowerCase() === 'auro-counter' || el.hasAttribute('auro-counter'));
|
|
7790
9411
|
|
|
7791
9412
|
if (this.keydownHandler) {
|
|
7792
9413
|
counterWrapper.removeEventListener('keydown', this.keydownHandler);
|
|
@@ -7867,6 +9488,10 @@ class AuroCounterGroup extends i$2 {
|
|
|
7867
9488
|
* @private
|
|
7868
9489
|
*/
|
|
7869
9490
|
updateValue() {
|
|
9491
|
+
if (!this.counters) {
|
|
9492
|
+
return;
|
|
9493
|
+
}
|
|
9494
|
+
|
|
7870
9495
|
this.value = Array.from(this.counters).reduce((acc, counter, index) => {
|
|
7871
9496
|
const name = counter.hasAttribute('name') ? counter.getAttribute('name') : `counter-${index}`;
|
|
7872
9497
|
acc[name] = this.safeNumberConversion(counter.value);
|
|
@@ -7883,6 +9508,20 @@ class AuroCounterGroup extends i$2 {
|
|
|
7883
9508
|
});
|
|
7884
9509
|
}
|
|
7885
9510
|
|
|
9511
|
+
/**
|
|
9512
|
+
* Updates the value text in the dropdown trigger based on the counters in the counter group.
|
|
9513
|
+
* @private
|
|
9514
|
+
*/
|
|
9515
|
+
updateValueText() {
|
|
9516
|
+
const valueTextSlot = this.shadowRoot.querySelector('slot[name="valueText"]');
|
|
9517
|
+
if (valueTextSlot) {
|
|
9518
|
+
const assignedNodes = valueTextSlot.assignedNodes({ flatten: true });
|
|
9519
|
+
this.valueText = assignedNodes.map((node) => node.textContent).join(', ');
|
|
9520
|
+
} else {
|
|
9521
|
+
this.valueText = '';
|
|
9522
|
+
}
|
|
9523
|
+
}
|
|
9524
|
+
|
|
7886
9525
|
/**
|
|
7887
9526
|
* Validates value.
|
|
7888
9527
|
* @param {boolean} [force=false] - Whether to force validation.
|
|
@@ -7913,6 +9552,12 @@ class AuroCounterGroup extends i$2 {
|
|
|
7913
9552
|
}
|
|
7914
9553
|
}
|
|
7915
9554
|
|
|
9555
|
+
firstUpdated() {
|
|
9556
|
+
super.firstUpdated();
|
|
9557
|
+
this.updateValue();
|
|
9558
|
+
this.updateValueText();
|
|
9559
|
+
}
|
|
9560
|
+
|
|
7916
9561
|
/**
|
|
7917
9562
|
* Registers the custom element with the browser.
|
|
7918
9563
|
* @param {string} [name="auro-counter-group"] - Custom element name to register.
|
|
@@ -7920,40 +9565,182 @@ class AuroCounterGroup extends i$2 {
|
|
|
7920
9565
|
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
7921
9566
|
*/
|
|
7922
9567
|
static register(name = "auro-counter-group") {
|
|
7923
|
-
AuroLibraryRuntimeUtils$
|
|
9568
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroCounterGroup);
|
|
7924
9569
|
}
|
|
7925
9570
|
|
|
7926
|
-
|
|
7927
|
-
|
|
9571
|
+
/**
|
|
9572
|
+
* Render the dropdown structure for the counter group.
|
|
9573
|
+
* @returns {TemplateResult} The dropdown template.
|
|
9574
|
+
* @private
|
|
9575
|
+
*/
|
|
9576
|
+
renderCounterDropdown() {
|
|
7928
9577
|
return u`
|
|
7929
|
-
|
|
7930
|
-
|
|
9578
|
+
<${this.dropdownTag}
|
|
9579
|
+
chevron common fluid
|
|
9580
|
+
part="dropdown"
|
|
9581
|
+
?autoPlacement="${this.autoPlacement}"
|
|
9582
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
9583
|
+
?matchWidth="${this.matchWidth}"
|
|
9584
|
+
?noFlip="${this.noFlip}"
|
|
9585
|
+
?onDark="${this.onDark}"
|
|
7931
9586
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7932
|
-
.placement="${this.placement}"
|
|
7933
9587
|
.offset="${this.offset}"
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
7944
|
-
<auro-counter-wrapper isInDropdown>
|
|
7945
|
-
</auro-counter-wrapper>
|
|
7946
|
-
</${this.bibtemplateTag}>
|
|
9588
|
+
.placement="${this.placement}"
|
|
9589
|
+
.layout="${this.layout}"
|
|
9590
|
+
.shape="${this.shape}"
|
|
9591
|
+
.size="${this.size}"
|
|
9592
|
+
.ondark="${this.onDark}"
|
|
9593
|
+
>
|
|
9594
|
+
${this.renderDropdownTrigger()}
|
|
9595
|
+
${this.renderBibTemplate()}
|
|
9596
|
+
${this.renderHelpText()}
|
|
7947
9597
|
</${this.dropdownTag}>
|
|
7948
|
-
|
|
9598
|
+
${this.renderFullscreenSlots()}
|
|
9599
|
+
`;
|
|
9600
|
+
}
|
|
9601
|
+
|
|
9602
|
+
/**
|
|
9603
|
+
* Render the dropdown trigger for the dropdown.
|
|
9604
|
+
* @returns {TemplateResult} The dropdown trigger template.
|
|
9605
|
+
* @private
|
|
9606
|
+
*/
|
|
9607
|
+
renderDropdownTrigger() {
|
|
9608
|
+
|
|
9609
|
+
const labelClasses = {
|
|
9610
|
+
filled: typeof this.valueText === 'string' && this.valueText.length
|
|
9611
|
+
};
|
|
9612
|
+
|
|
9613
|
+
return u`
|
|
9614
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
9615
|
+
<div class="accents left">
|
|
9616
|
+
<slot name="typeIcon"></slot>
|
|
9617
|
+
</div>
|
|
9618
|
+
<div class="mainContent">
|
|
9619
|
+
<label class="${e(labelClasses)}">
|
|
9620
|
+
<slot name="label"></slot>
|
|
9621
|
+
</label>
|
|
9622
|
+
<slot name="valueText" @slotChange="${this.updateValueText}">
|
|
9623
|
+
${this.counters && Array.from(this.counters).map((counter, index) => u`${counter.value} ${counter.defaultSlot}${index !== this.counters.length - 1 ? ', ' : ''}`)}
|
|
9624
|
+
</slot>
|
|
9625
|
+
</div>
|
|
9626
|
+
<div class="accents right"></div>
|
|
9627
|
+
</div>
|
|
9628
|
+
`;
|
|
9629
|
+
};
|
|
9630
|
+
|
|
9631
|
+
/**
|
|
9632
|
+
* Render the help text for the counter group.
|
|
9633
|
+
* @returns {TemplateResult} The help text template.
|
|
9634
|
+
* @private
|
|
9635
|
+
*/
|
|
9636
|
+
renderHelpText() {
|
|
9637
|
+
return u`
|
|
9638
|
+
<div slot="helpText">
|
|
9639
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
9640
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
9641
|
+
<slot name="helpText"></slot>
|
|
9642
|
+
</p>
|
|
9643
|
+
</${this.helpTextTag}>
|
|
9644
|
+
</div>
|
|
9645
|
+
`;
|
|
9646
|
+
}
|
|
9647
|
+
|
|
9648
|
+
/**
|
|
9649
|
+
* Render the dropdown bib template for the dropdown.
|
|
9650
|
+
* @returns {TemplateResult} The bib template.
|
|
9651
|
+
* @private
|
|
9652
|
+
*/
|
|
9653
|
+
renderBibTemplate() {
|
|
9654
|
+
return u`
|
|
9655
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}">
|
|
9656
|
+
${this.renderCounterGroup(true)}
|
|
9657
|
+
</${this.bibtemplateTag}>
|
|
9658
|
+
`;
|
|
9659
|
+
}
|
|
9660
|
+
|
|
9661
|
+
/**
|
|
9662
|
+
* Render the fullscreen bib slots for the dropdown.
|
|
9663
|
+
* @returns {TemplateResult} The fullscreen slots template.
|
|
9664
|
+
* @private
|
|
9665
|
+
*/
|
|
9666
|
+
renderFullscreenSlots() {
|
|
9667
|
+
return u`
|
|
7949
9668
|
<div id="slotHolder">
|
|
7950
9669
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7951
9670
|
<slot name="bib.fullscreen.footer" @slotchange="${this.handleSlotChange}"></slot>
|
|
7952
9671
|
</div>
|
|
7953
|
-
|
|
7954
|
-
|
|
9672
|
+
`;
|
|
9673
|
+
}
|
|
9674
|
+
|
|
9675
|
+
/**
|
|
9676
|
+
* Render the counter group container.
|
|
9677
|
+
* @param {boolean} isInDropdown - Whether the counter group is inside a dropdown.
|
|
9678
|
+
* @returns {TemplateResult} The counter group template.
|
|
9679
|
+
* @private
|
|
9680
|
+
*/
|
|
9681
|
+
renderCounterGroup(isInDropdown = this.isDropdown) {
|
|
9682
|
+
return u`
|
|
9683
|
+
<auro-counter-wrapper ?isInDropdown="${isInDropdown}">
|
|
9684
|
+
<div class="counters">
|
|
9685
|
+
<slot @slotchange=${() => this.isDropdown ? this.configureDropdownCounters() : this.configureCounters()}></slot>
|
|
9686
|
+
</div>
|
|
9687
|
+
</auro-counter-wrapper>
|
|
9688
|
+
`;
|
|
9689
|
+
}
|
|
9690
|
+
|
|
9691
|
+
/**
|
|
9692
|
+
* Render the classic layout.
|
|
9693
|
+
* @returns {TemplateResult} The classic layout template.
|
|
9694
|
+
* @private
|
|
9695
|
+
*/
|
|
9696
|
+
renderLayoutClassic() {
|
|
9697
|
+
this.shape = this.shape || "classic";
|
|
9698
|
+
this.layout = this.layout || "classic";
|
|
9699
|
+
this.size = this.size || "xl";
|
|
9700
|
+
|
|
9701
|
+
return u`
|
|
9702
|
+
${this.isDropdown
|
|
9703
|
+
? this.renderCounterDropdown()
|
|
9704
|
+
: this.renderCounterGroup()
|
|
9705
|
+
}`;
|
|
9706
|
+
}
|
|
9707
|
+
|
|
9708
|
+
/**
|
|
9709
|
+
* Render the snowflake layout.
|
|
9710
|
+
* @returns {TemplateResult} The snowflake layout template.
|
|
9711
|
+
* @private
|
|
9712
|
+
*/
|
|
9713
|
+
renderLayoutSnowflake() {
|
|
9714
|
+
this.layout = this.layout || "snowflake";
|
|
9715
|
+
this.shape = this.shape || "snowflake";
|
|
9716
|
+
this.size = this.size || "lg";
|
|
9717
|
+
|
|
9718
|
+
return u`
|
|
9719
|
+
${this.isDropdown
|
|
9720
|
+
? this.renderCounterDropdown()
|
|
9721
|
+
: this.renderCounterGroup()
|
|
7955
9722
|
}`;
|
|
7956
9723
|
}
|
|
9724
|
+
|
|
9725
|
+
/**
|
|
9726
|
+
* Renders the component by layout type.
|
|
9727
|
+
* @param {string} [ForcedLayout] - Optionally force a specific layout for rendering.
|
|
9728
|
+
* @returns {TemplateResult} The layout template.
|
|
9729
|
+
* @private
|
|
9730
|
+
*/
|
|
9731
|
+
renderLayout(ForcedLayout) {
|
|
9732
|
+
const layout = ForcedLayout || this.layout;
|
|
9733
|
+
|
|
9734
|
+
switch (layout) {
|
|
9735
|
+
|
|
9736
|
+
case 'snowflake':
|
|
9737
|
+
return this.renderLayoutSnowflake();
|
|
9738
|
+
case 'classic':
|
|
9739
|
+
return this.renderLayoutClassic();
|
|
9740
|
+
default:
|
|
9741
|
+
return this.renderLayoutClassic();
|
|
9742
|
+
}
|
|
9743
|
+
}
|
|
7957
9744
|
}
|
|
7958
9745
|
|
|
7959
9746
|
AuroCounter.register();
|