@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.5 → 0.0.0-pr624.7
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 +1 -0
- package/components/bibtemplate/dist/index.js +88 -6
- package/components/bibtemplate/dist/registered.js +88 -6
- package/components/checkbox/demo/api.min.js +4 -3
- package/components/checkbox/demo/index.min.js +4 -3
- package/components/checkbox/dist/index.js +4 -3
- package/components/checkbox/dist/registered.js +4 -3
- package/components/combobox/demo/api.min.js +514 -172
- package/components/combobox/demo/index.min.js +514 -172
- package/components/combobox/dist/auro-combobox.d.ts +0 -8
- package/components/combobox/dist/index.js +425 -153
- package/components/combobox/dist/registered.js +425 -153
- package/components/counter/demo/api.min.js +404 -106
- package/components/counter/demo/index.min.js +404 -106
- package/components/counter/dist/index.js +404 -106
- package/components/counter/dist/registered.js +404 -106
- package/components/datepicker/demo/api.md +13 -5
- package/components/datepicker/demo/api.min.js +876 -383
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +876 -383
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +679 -186
- package/components/datepicker/dist/registered.js +679 -186
- package/components/datepicker/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/demo/api.md +1 -1
- package/components/dropdown/demo/api.min.js +226 -81
- package/components/dropdown/demo/index.min.js +226 -81
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +226 -81
- package/components/dropdown/dist/registered.js +226 -81
- package/components/input/demo/api.md +46 -48
- package/components/input/demo/api.min.js +96 -15
- package/components/input/demo/index.min.js +96 -15
- package/components/input/dist/auro-input.d.ts +17 -15
- package/components/input/dist/index.js +96 -15
- package/components/input/dist/registered.js +96 -15
- package/components/menu/demo/api.min.js +76 -6
- package/components/menu/demo/index.min.js +76 -6
- package/components/menu/dist/index.js +76 -6
- package/components/menu/dist/registered.js +76 -6
- package/components/radio/demo/api.min.js +4 -3
- package/components/radio/demo/index.min.js +4 -3
- package/components/radio/dist/index.js +4 -3
- package/components/radio/dist/registered.js +4 -3
- package/components/select/demo/api.md +12 -4
- package/components/select/demo/api.min.js +1178 -200
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1178 -200
- package/components/select/dist/auro-select.d.ts +96 -4
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +1106 -198
- package/components/select/dist/registered.js +1106 -198
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +3 -3
- /package/components/{dropdown/dist/styles/style-css.d.ts → datepicker/dist/styles/default/color-css.d.ts} +0 -0
|
@@ -147,6 +147,102 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
147
147
|
*/
|
|
148
148
|
const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(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);
|
|
149
149
|
|
|
150
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
151
|
+
static get properties() {
|
|
152
|
+
return {
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Defines the language of an element.
|
|
156
|
+
* @default {'default'}
|
|
157
|
+
*/
|
|
158
|
+
layout: {
|
|
159
|
+
type: String,
|
|
160
|
+
attribute: "layout",
|
|
161
|
+
reflect: true
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
shape: {
|
|
165
|
+
type: String,
|
|
166
|
+
attribute: "shape",
|
|
167
|
+
reflect: true
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
size: {
|
|
171
|
+
type: String,
|
|
172
|
+
attribute: "size",
|
|
173
|
+
reflect: true
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
onDark: {
|
|
177
|
+
type: Boolean,
|
|
178
|
+
attribute: "ondark",
|
|
179
|
+
reflect: true
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
resetShapeClasses() {
|
|
185
|
+
if (this.shape && this.size) {
|
|
186
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
187
|
+
|
|
188
|
+
if (wrapper) {
|
|
189
|
+
wrapper.classList.forEach((className) => {
|
|
190
|
+
if (className.startsWith('shape-')) {
|
|
191
|
+
wrapper.classList.remove(className);
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
resetLayoutClasses() {
|
|
201
|
+
if (this.layout) {
|
|
202
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
203
|
+
|
|
204
|
+
if (wrapper) {
|
|
205
|
+
wrapper.classList.forEach((className) => {
|
|
206
|
+
if (className.startsWith('layout-')) {
|
|
207
|
+
wrapper.classList.remove(className);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
updateComponentArchitecture() {
|
|
217
|
+
this.resetLayoutClasses();
|
|
218
|
+
this.resetShapeClasses();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
updated(changedProperties) {
|
|
222
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
223
|
+
this.updateComponentArchitecture();
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
228
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
229
|
+
render() {
|
|
230
|
+
try {
|
|
231
|
+
return this.renderLayout();
|
|
232
|
+
} catch (error) {
|
|
233
|
+
// failed to get the defined layout
|
|
234
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
235
|
+
|
|
236
|
+
// fallback to the default layout
|
|
237
|
+
return this.getLayout('default');
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
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}.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:72px;max-height:72px;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}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;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}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;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}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;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}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;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}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
243
|
+
|
|
244
|
+
var tokensCss$5 = i$5`:host(:not([ondark])){--ds-auro-select-border-color: var(--ds-basic-color-border-bold, #585e67);--ds-auro-select-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-select-error-icon-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-select-outline-color: transparent}:host([ondark]){--ds-auro-select-border-color: var(--ds-basic-color-border-inverse, #ffffff);--ds-auro-select-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-select-label-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-placeholder-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-select-error-icon-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-select-outline-color: transparent}`;
|
|
245
|
+
|
|
150
246
|
class DateFormatter {
|
|
151
247
|
|
|
152
248
|
constructor() {
|
|
@@ -203,9 +299,10 @@ class DateFormatter {
|
|
|
203
299
|
/**
|
|
204
300
|
* Convert a date object to string format.
|
|
205
301
|
* @param {Object} date - Date to convert to string.
|
|
206
|
-
* @
|
|
302
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
303
|
+
* @returns {String} Returns the date as a string.
|
|
207
304
|
*/
|
|
208
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
305
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
209
306
|
year: "numeric",
|
|
210
307
|
month: "2-digit",
|
|
211
308
|
day: "2-digit",
|
|
@@ -397,7 +494,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
397
494
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
398
495
|
|
|
399
496
|
// Get the date string of the date object we created from the string date
|
|
400
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
497
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
401
498
|
|
|
402
499
|
// Guard Clause: Generated date matches date string input
|
|
403
500
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -562,7 +659,7 @@ const {
|
|
|
562
659
|
|
|
563
660
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
564
661
|
|
|
565
|
-
let AuroLibraryRuntimeUtils$
|
|
662
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
566
663
|
|
|
567
664
|
/* eslint-disable jsdoc/require-param */
|
|
568
665
|
|
|
@@ -632,7 +729,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
632
729
|
class AuroFormValidation {
|
|
633
730
|
|
|
634
731
|
constructor() {
|
|
635
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
732
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
636
733
|
}
|
|
637
734
|
|
|
638
735
|
/**
|
|
@@ -1044,7 +1141,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
1044
1141
|
|
|
1045
1142
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1046
1143
|
|
|
1047
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
1144
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
1048
1145
|
|
|
1049
1146
|
/* eslint-disable jsdoc/require-param */
|
|
1050
1147
|
|
|
@@ -1627,10 +1724,11 @@ const flip$1 = function (options) {
|
|
|
1627
1724
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1628
1725
|
const nextPlacement = placements[nextIndex];
|
|
1629
1726
|
if (nextPlacement) {
|
|
1630
|
-
var _overflowsData$;
|
|
1631
1727
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1632
|
-
|
|
1633
|
-
if
|
|
1728
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1729
|
+
// We leave the current main axis only if every placement on that axis
|
|
1730
|
+
// overflows the main axis.
|
|
1731
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
1634
1732
|
// Try next placement and re-run the lifecycle.
|
|
1635
1733
|
return {
|
|
1636
1734
|
data: {
|
|
@@ -2651,8 +2749,28 @@ class AuroFloatingUI {
|
|
|
2651
2749
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
2652
2750
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
2653
2751
|
|
|
2752
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
2753
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
2754
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2755
|
+
}
|
|
2654
2756
|
const mouseEventGlobalHandler = (event) => {
|
|
2655
|
-
|
|
2757
|
+
const isPressed = event.type === 'mousedown';
|
|
2758
|
+
if (isPressed) {
|
|
2759
|
+
// Clear any pending timeout to prevent race condition
|
|
2760
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
2761
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
2762
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2763
|
+
}
|
|
2764
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
2765
|
+
AuroFloatingUI.isMousePressed = true;
|
|
2766
|
+
}
|
|
2767
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
2768
|
+
// Schedule reset and track timeout ID
|
|
2769
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
2770
|
+
AuroFloatingUI.isMousePressed = false;
|
|
2771
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2772
|
+
}, 0);
|
|
2773
|
+
}
|
|
2656
2774
|
};
|
|
2657
2775
|
|
|
2658
2776
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -2779,6 +2897,7 @@ class AuroFloatingUI {
|
|
|
2779
2897
|
|
|
2780
2898
|
// Compute the position of the bib
|
|
2781
2899
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2900
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
2782
2901
|
placement: this.element.floaterConfig?.placement,
|
|
2783
2902
|
middleware: middleware || []
|
|
2784
2903
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -2913,8 +3032,9 @@ class AuroFloatingUI {
|
|
|
2913
3032
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2914
3033
|
return;
|
|
2915
3034
|
}
|
|
2916
|
-
|
|
2917
|
-
if
|
|
3035
|
+
|
|
3036
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
3037
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2918
3038
|
return;
|
|
2919
3039
|
}
|
|
2920
3040
|
|
|
@@ -3215,8 +3335,6 @@ class AuroFloatingUI {
|
|
|
3215
3335
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
3216
3336
|
}
|
|
3217
3337
|
|
|
3218
|
-
document.body.append(this.element.bib);
|
|
3219
|
-
|
|
3220
3338
|
this.regenerateBibId();
|
|
3221
3339
|
this.handleTriggerTabIndex();
|
|
3222
3340
|
|
|
@@ -3447,6 +3565,76 @@ var tokensCss$2$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
3447
3565
|
|
|
3448
3566
|
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)}`;
|
|
3449
3567
|
|
|
3568
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3569
|
+
// See LICENSE in the project root for license information.
|
|
3570
|
+
|
|
3571
|
+
// ---------------------------------------------------------------------
|
|
3572
|
+
|
|
3573
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3574
|
+
|
|
3575
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
3576
|
+
|
|
3577
|
+
/* eslint-disable jsdoc/require-param */
|
|
3578
|
+
|
|
3579
|
+
/**
|
|
3580
|
+
* This will register a new custom element with the browser.
|
|
3581
|
+
* @param {String} name - The name of the custom element.
|
|
3582
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3583
|
+
* @returns {void}
|
|
3584
|
+
*/
|
|
3585
|
+
registerComponent(name, componentClass) {
|
|
3586
|
+
if (!customElements.get(name)) {
|
|
3587
|
+
customElements.define(name, class extends componentClass {});
|
|
3588
|
+
}
|
|
3589
|
+
}
|
|
3590
|
+
|
|
3591
|
+
/**
|
|
3592
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3593
|
+
* @returns {void}
|
|
3594
|
+
*/
|
|
3595
|
+
closestElement(
|
|
3596
|
+
selector, // selector like in .closest()
|
|
3597
|
+
base = this, // extra functionality to skip a parent
|
|
3598
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3599
|
+
!el || el === document || el === window
|
|
3600
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3601
|
+
: found
|
|
3602
|
+
? found // found a selector INside this element
|
|
3603
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3604
|
+
) {
|
|
3605
|
+
return __Closest(base);
|
|
3606
|
+
}
|
|
3607
|
+
/* eslint-enable jsdoc/require-param */
|
|
3608
|
+
|
|
3609
|
+
/**
|
|
3610
|
+
* 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.
|
|
3611
|
+
* @param {Object} elem - The element to check.
|
|
3612
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3613
|
+
* @returns {void}
|
|
3614
|
+
*/
|
|
3615
|
+
handleComponentTagRename(elem, tagName) {
|
|
3616
|
+
const tag = tagName.toLowerCase();
|
|
3617
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3618
|
+
|
|
3619
|
+
if (elemTag !== tag) {
|
|
3620
|
+
elem.setAttribute(tag, true);
|
|
3621
|
+
}
|
|
3622
|
+
}
|
|
3623
|
+
|
|
3624
|
+
/**
|
|
3625
|
+
* Validates if an element is a specific Auro component.
|
|
3626
|
+
* @param {Object} elem - The element to validate.
|
|
3627
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3628
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3629
|
+
*/
|
|
3630
|
+
elementMatch(elem, tagName) {
|
|
3631
|
+
const tag = tagName.toLowerCase();
|
|
3632
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3633
|
+
|
|
3634
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3635
|
+
}
|
|
3636
|
+
};
|
|
3637
|
+
|
|
3450
3638
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3451
3639
|
// See LICENSE in the project root for license information.
|
|
3452
3640
|
|
|
@@ -3466,7 +3654,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3466
3654
|
*/
|
|
3467
3655
|
privateDefaults() {
|
|
3468
3656
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3469
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
3657
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$2();
|
|
3470
3658
|
}
|
|
3471
3659
|
|
|
3472
3660
|
// function to define props used within the scope of this component
|
|
@@ -3548,7 +3736,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3548
3736
|
*
|
|
3549
3737
|
*/
|
|
3550
3738
|
static register(name = "auro-icon") {
|
|
3551
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
3739
|
+
AuroLibraryRuntimeUtils$1$2.prototype.registerComponent(name, AuroIcon);
|
|
3552
3740
|
}
|
|
3553
3741
|
|
|
3554
3742
|
connectedCallback() {
|
|
@@ -3616,7 +3804,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3616
3804
|
|
|
3617
3805
|
var iconVersion$2 = '6.1.2';
|
|
3618
3806
|
|
|
3619
|
-
var styleCss$1$2 = i$5`:host{position:
|
|
3807
|
+
var styleCss$1$2 = i$5`:host{position:fixed;z-index:var(--depth-tooltip, 400);display:none;isolation:isolate}.container{display:inline-block;overflow:auto;box-sizing:border-box;margin:var(--ds-size-50, 0.25rem) 0}: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}`;
|
|
3620
3808
|
|
|
3621
3809
|
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)}`;
|
|
3622
3810
|
|
|
@@ -3626,7 +3814,6 @@ var tokensCss$1$1 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-colo
|
|
|
3626
3814
|
// See LICENSE in the project root for license information.
|
|
3627
3815
|
|
|
3628
3816
|
|
|
3629
|
-
|
|
3630
3817
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
3631
3818
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
3632
3819
|
'xl',
|
|
@@ -3651,7 +3838,7 @@ class AuroDropdownBib extends i$2 {
|
|
|
3651
3838
|
*/
|
|
3652
3839
|
this._mobileBreakpointValue = undefined;
|
|
3653
3840
|
|
|
3654
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3841
|
+
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3655
3842
|
}
|
|
3656
3843
|
|
|
3657
3844
|
static get styles() {
|
|
@@ -3696,6 +3883,13 @@ class AuroDropdownBib extends i$2 {
|
|
|
3696
3883
|
type: Boolean,
|
|
3697
3884
|
reflect: true
|
|
3698
3885
|
},
|
|
3886
|
+
|
|
3887
|
+
/**
|
|
3888
|
+
* A reference to the associated bib template element.
|
|
3889
|
+
*/
|
|
3890
|
+
bibTemplate: {
|
|
3891
|
+
type: Object
|
|
3892
|
+
}
|
|
3699
3893
|
};
|
|
3700
3894
|
}
|
|
3701
3895
|
|
|
@@ -3728,9 +3922,50 @@ class AuroDropdownBib extends i$2 {
|
|
|
3728
3922
|
}
|
|
3729
3923
|
}
|
|
3730
3924
|
});
|
|
3925
|
+
|
|
3926
|
+
if (this.bibTemplate) {
|
|
3927
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3928
|
+
if (this.isFullscreen) {
|
|
3929
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3930
|
+
} else {
|
|
3931
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
3932
|
+
}
|
|
3933
|
+
}
|
|
3731
3934
|
}
|
|
3732
3935
|
}
|
|
3733
3936
|
|
|
3937
|
+
connectedCallback() {
|
|
3938
|
+
super.connectedCallback();
|
|
3939
|
+
|
|
3940
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3941
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3942
|
+
const bibTemplate = event.detail.element;
|
|
3943
|
+
this.bibTemplate = bibTemplate;
|
|
3944
|
+
|
|
3945
|
+
if (bibTemplate) {
|
|
3946
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3947
|
+
if (this.isFullscreen) {
|
|
3948
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3949
|
+
} else {
|
|
3950
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
3951
|
+
}
|
|
3952
|
+
}
|
|
3953
|
+
});
|
|
3954
|
+
}
|
|
3955
|
+
|
|
3956
|
+
firstUpdated(changedProperties) {
|
|
3957
|
+
super.firstUpdated(changedProperties);
|
|
3958
|
+
|
|
3959
|
+
// Dispatch a custom event when the component is connected
|
|
3960
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
3961
|
+
bubbles: true,
|
|
3962
|
+
composed: true,
|
|
3963
|
+
detail: {
|
|
3964
|
+
element: this
|
|
3965
|
+
}
|
|
3966
|
+
}));
|
|
3967
|
+
}
|
|
3968
|
+
|
|
3734
3969
|
// function that renders the HTML and CSS into the scope of the component
|
|
3735
3970
|
render() {
|
|
3736
3971
|
return u`
|
|
@@ -3743,7 +3978,7 @@ class AuroDropdownBib extends i$2 {
|
|
|
3743
3978
|
|
|
3744
3979
|
var dropdownVersion$1 = '3.0.0';
|
|
3745
3980
|
|
|
3746
|
-
var shapeSizeCss = i$5`.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-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-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-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-pill-xl{min-height:
|
|
3981
|
+
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:72px;max-height:72px;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}.shape-pill-left-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-left-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-right-xl{min-height:72px;max-height:72px;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}.shape-pill-right-xl.thin{border-width:1px;min-height:70px;max-height:70px;background-color:unset}.shape-pill-right-xl.parentBorder{border:0;min-height:68px;max-height:68px}.shape-pill-md{min-height:72px;max-height:72px;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}.shape-pill-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-left-md{min-height:72px;max-height:72px;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}.shape-pill-left-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-left-md.parentBorder{border:0;min-height:44px;max-height:44px}.shape-pill-right-md{min-height:72px;max-height:72px;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}.shape-pill-right-md.thin{border-width:1px;min-height:46px;max-height:46px;background-color:unset}.shape-pill-right-md.parentBorder{border:0;min-height:44px;max-height:44px}`;
|
|
3747
3982
|
|
|
3748
3983
|
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)}`;
|
|
3749
3984
|
|
|
@@ -3751,15 +3986,15 @@ var classicColorCss = i$5`:host([layout*=classic]) .label{color:var(--ds-auro-dr
|
|
|
3751
3986
|
|
|
3752
3987
|
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;margin-left:var(--ds-size-100, 0.5rem)}: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][fluid]){display:block}:host([layout*=classic][matchwidth]) #bibSizer{width:100%}:host([layout*=classic][disabled]){pointer-events:none}:host([layout*=classic][inset]) .trigger{padding:var(--ds-size-150, 0.75rem) var(--ds-size-200, 1rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][inset][bordered]) .trigger{padding:var(--ds-size-200, 1rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][inset][bordered][labeled]) .trigger{padding:var(--ds-size-100, 0.5rem) var(--ds-size-150, 0.75rem)}:host([layout*=classic][common]) .trigger,:host([layout*=classic][rounded]) .trigger{border-radius:var(--ds-border-radius, 0.375rem)}`;
|
|
3753
3988
|
|
|
3754
|
-
var styleEmphasizedCss = i$5`:host{display:block}.wrapper{display:flex;flex-direction:
|
|
3989
|
+
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{flex:1;display:flex;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{flex:1;display:flex;align-items:center;justify-content:center;width:100%}.triggerContent{overflow:hidden;flex:1;display:flex;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap;width:100%}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{margin-left:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-300, 1.5rem))}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{margin-right:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-300, 1.5rem))}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{margin-right:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-600, 3rem))}`;
|
|
3755
3990
|
|
|
3756
|
-
var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex-direction:
|
|
3991
|
+
var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex-direction:wrapper}.trigger{flex:1;display:flex;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{flex:1;display:flex;align-items:center;justify-content:center;width:100%}.triggerContent{overflow:hidden;flex:1;display:flex;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap;width:100%}:host([layout*=snowflake]) .leftIndent{margin-left:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-600, 3rem))}:host([layout*=snowflake]) .rightIndent{margin-right:var(--ds-size-300, 1.5rem);width:calc(100% - var(--ds-size-600, 3rem))}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3757
3992
|
|
|
3758
|
-
var colorCss$
|
|
3993
|
+
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)}`;
|
|
3759
3994
|
|
|
3760
|
-
var styleCss$
|
|
3995
|
+
var styleCss$6 = i$5`.helptext-wrapper{display:none;font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px)}:host([large]) .helptext-wrapper{font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-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}`;
|
|
3761
3996
|
|
|
3762
|
-
var tokensCss$
|
|
3997
|
+
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3763
3998
|
|
|
3764
3999
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3765
4000
|
// See LICENSE in the project root for license information.
|
|
@@ -3768,7 +4003,7 @@ var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3768
4003
|
|
|
3769
4004
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3770
4005
|
|
|
3771
|
-
let AuroLibraryRuntimeUtils$
|
|
4006
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
3772
4007
|
|
|
3773
4008
|
/* eslint-disable jsdoc/require-param */
|
|
3774
4009
|
|
|
@@ -3840,7 +4075,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
3840
4075
|
*
|
|
3841
4076
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
3842
4077
|
*/
|
|
3843
|
-
class AuroHelpText extends i$2 {
|
|
4078
|
+
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
3844
4079
|
|
|
3845
4080
|
constructor() {
|
|
3846
4081
|
super();
|
|
@@ -3849,14 +4084,14 @@ class AuroHelpText extends i$2 {
|
|
|
3849
4084
|
this.onDark = false;
|
|
3850
4085
|
this.hasTextContent = false;
|
|
3851
4086
|
|
|
3852
|
-
AuroLibraryRuntimeUtils$
|
|
4087
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3853
4088
|
}
|
|
3854
4089
|
|
|
3855
4090
|
static get styles() {
|
|
3856
4091
|
return [
|
|
3857
|
-
colorCss$
|
|
3858
|
-
styleCss$
|
|
3859
|
-
tokensCss$
|
|
4092
|
+
colorCss$5,
|
|
4093
|
+
styleCss$6,
|
|
4094
|
+
tokensCss$4
|
|
3860
4095
|
];
|
|
3861
4096
|
}
|
|
3862
4097
|
|
|
@@ -3905,7 +4140,7 @@ class AuroHelpText extends i$2 {
|
|
|
3905
4140
|
*
|
|
3906
4141
|
*/
|
|
3907
4142
|
static register(name = "auro-helptext") {
|
|
3908
|
-
AuroLibraryRuntimeUtils$
|
|
4143
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
3909
4144
|
}
|
|
3910
4145
|
|
|
3911
4146
|
updated() {
|
|
@@ -3959,9 +4194,9 @@ class AuroHelpText extends i$2 {
|
|
|
3959
4194
|
</div>
|
|
3960
4195
|
`;
|
|
3961
4196
|
}
|
|
3962
|
-
}
|
|
4197
|
+
};
|
|
3963
4198
|
|
|
3964
|
-
var helpTextVersion = '1.0.0';
|
|
4199
|
+
var helpTextVersion$1 = '1.0.0';
|
|
3965
4200
|
|
|
3966
4201
|
let AuroElement$2 = class AuroElement extends i$2 {
|
|
3967
4202
|
static get properties() {
|
|
@@ -4087,6 +4322,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4087
4322
|
this.layout = 'classic';
|
|
4088
4323
|
this.shape = 'rounded';
|
|
4089
4324
|
this.size = 'xl';
|
|
4325
|
+
this.parentBorder = false;
|
|
4090
4326
|
|
|
4091
4327
|
this.privateDefaults();
|
|
4092
4328
|
}
|
|
@@ -4102,7 +4338,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4102
4338
|
'trigger': true,
|
|
4103
4339
|
'wrapper': true,
|
|
4104
4340
|
'hasFocus': this.hasFocus,
|
|
4105
|
-
'simple': this.simple
|
|
4341
|
+
'simple': this.simple,
|
|
4342
|
+
'parentBorder': this.parentBorder
|
|
4106
4343
|
};
|
|
4107
4344
|
}
|
|
4108
4345
|
|
|
@@ -4154,7 +4391,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4154
4391
|
/**
|
|
4155
4392
|
* @private
|
|
4156
4393
|
*/
|
|
4157
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4394
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
4158
4395
|
|
|
4159
4396
|
/**
|
|
4160
4397
|
* @private
|
|
@@ -4179,7 +4416,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4179
4416
|
/**
|
|
4180
4417
|
* @private
|
|
4181
4418
|
*/
|
|
4182
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4419
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion$1, AuroHelpText$1);
|
|
4183
4420
|
|
|
4184
4421
|
/**
|
|
4185
4422
|
* @private
|
|
@@ -4369,6 +4606,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4369
4606
|
reflect: true
|
|
4370
4607
|
},
|
|
4371
4608
|
|
|
4609
|
+
/**
|
|
4610
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4611
|
+
* @private
|
|
4612
|
+
*/
|
|
4613
|
+
parentBorder: {
|
|
4614
|
+
type: Boolean,
|
|
4615
|
+
reflect: true
|
|
4616
|
+
},
|
|
4617
|
+
|
|
4372
4618
|
/**
|
|
4373
4619
|
* If declared, the popover and trigger will be set to the same width.
|
|
4374
4620
|
*/
|
|
@@ -4496,7 +4742,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4496
4742
|
*
|
|
4497
4743
|
*/
|
|
4498
4744
|
static register(name = "auro-dropdown") {
|
|
4499
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
4745
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
|
|
4500
4746
|
}
|
|
4501
4747
|
|
|
4502
4748
|
/**
|
|
@@ -4832,8 +5078,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4832
5078
|
* @param {Event} event - The event object representing the slot change.
|
|
4833
5079
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4834
5080
|
*/
|
|
4835
|
-
handleDefaultSlot(
|
|
4836
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
5081
|
+
handleDefaultSlot() {
|
|
4837
5082
|
|
|
4838
5083
|
if (this.onSlotChange) {
|
|
4839
5084
|
this.onSlotChange();
|
|
@@ -4895,6 +5140,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4895
5140
|
${this.chevron || this.common ? u`
|
|
4896
5141
|
<div
|
|
4897
5142
|
id="showStateIcon"
|
|
5143
|
+
class="chevron"
|
|
4898
5144
|
part="chevron">
|
|
4899
5145
|
<${this.iconTag}
|
|
4900
5146
|
category="interface"
|
|
@@ -4909,9 +5155,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4909
5155
|
<div class="${e(helpTextClasses)}">
|
|
4910
5156
|
<slot name="helpText"></slot>
|
|
4911
5157
|
</div>
|
|
4912
|
-
<div class="slotContent">
|
|
4913
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4914
|
-
</div>
|
|
4915
5158
|
<div id="bibSizer" part="size"></div>
|
|
4916
5159
|
<${this.dropdownBibTag}
|
|
4917
5160
|
id="bib"
|
|
@@ -4920,6 +5163,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4920
5163
|
?common="${this.common}"
|
|
4921
5164
|
?rounded="${this.common || this.rounded}"
|
|
4922
5165
|
?inset="${this.common || this.inset}">
|
|
5166
|
+
<div class="slotContent">
|
|
5167
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5168
|
+
</div>
|
|
4923
5169
|
</${this.dropdownBibTag}>
|
|
4924
5170
|
</div>
|
|
4925
5171
|
`;
|
|
@@ -4931,108 +5177,104 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4931
5177
|
* @returns {html} - Returns HTML for the classic layout.
|
|
4932
5178
|
*/
|
|
4933
5179
|
renderLayoutClassic() {
|
|
4934
|
-
const helpTextClasses = {
|
|
4935
|
-
'helpText': true,
|
|
4936
|
-
'leftIndent': false,
|
|
4937
|
-
'rightIndent': false
|
|
4938
|
-
};
|
|
4939
|
-
|
|
4940
|
-
return u`
|
|
4941
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
4942
|
-
`;
|
|
4943
|
-
// return html`
|
|
4944
|
-
// <div>
|
|
4945
|
-
// <div
|
|
4946
|
-
// id="trigger"
|
|
4947
|
-
// class="trigger"
|
|
4948
|
-
// part="trigger"
|
|
4949
|
-
// tabindex="${this.tabIndex}"
|
|
4950
|
-
// ?showBorder="${this.showTriggerBorders}"
|
|
4951
|
-
// role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4952
|
-
// aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4953
|
-
// aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4954
|
-
// aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4955
|
-
// >
|
|
4956
|
-
// <div class="triggerContentWrapper">
|
|
4957
|
-
// <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
4958
|
-
// <slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
4959
|
-
// </label>
|
|
4960
|
-
// <div class="triggerContent">
|
|
4961
|
-
// <slot
|
|
4962
|
-
// name="trigger"
|
|
4963
|
-
// @slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4964
|
-
// </div>
|
|
4965
|
-
// </div>
|
|
4966
|
-
// ${this.chevron || this.common ? html`
|
|
4967
|
-
// <div
|
|
4968
|
-
// id="showStateIcon"
|
|
4969
|
-
// part="chevron">
|
|
4970
|
-
// <${this.iconTag}
|
|
4971
|
-
// category="interface"
|
|
4972
|
-
// name="chevron-down"
|
|
4973
|
-
// ?onDark="${this.onDark}"
|
|
4974
|
-
// variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
4975
|
-
// >
|
|
4976
|
-
// </${this.iconTag}>
|
|
4977
|
-
// </div>
|
|
4978
|
-
// ` : undefined }
|
|
4979
|
-
// </div>
|
|
4980
|
-
// <div class="slotContent">
|
|
4981
|
-
// <slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4982
|
-
// </div>
|
|
4983
|
-
// <div id="bibSizer" part="size"></div>
|
|
4984
|
-
// <${this.dropdownBibTag}
|
|
4985
|
-
// id="bib"
|
|
4986
|
-
// ?data-show="${this.isPopoverVisible}"
|
|
4987
|
-
// ?isfullscreen="${this.isBibFullscreen}"
|
|
4988
|
-
// ?common="${this.common}"
|
|
4989
|
-
// ?rounded="${this.common || this.rounded}"
|
|
4990
|
-
// ?inset="${this.common || this.inset}"
|
|
4991
|
-
// >
|
|
4992
|
-
// </${this.dropdownBibTag}>
|
|
4993
|
-
// </div>
|
|
4994
|
-
// `;
|
|
4995
|
-
}
|
|
4996
|
-
|
|
4997
|
-
/**
|
|
4998
|
-
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
4999
|
-
* @private
|
|
5000
|
-
* @returns {html} - Returns HTML for the snowflake layout.
|
|
5001
|
-
*/
|
|
5002
|
-
renderLayoutSnowflake() {
|
|
5003
|
-
const helpTextClasses = {
|
|
5004
|
-
'helpText': true,
|
|
5005
|
-
'leftIndent': true,
|
|
5006
|
-
'rightIndent': true
|
|
5007
|
-
};
|
|
5008
|
-
|
|
5009
|
-
return u`
|
|
5010
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
5011
|
-
`;
|
|
5012
|
-
}
|
|
5013
|
-
|
|
5014
|
-
/**
|
|
5015
|
-
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
5016
|
-
* @private
|
|
5017
|
-
* @returns {html} - Returns HTML for the emphasized layout.
|
|
5018
|
-
*/
|
|
5019
|
-
renderLayoutEmphasized() {
|
|
5020
|
-
const helpTextClasses = {
|
|
5021
|
-
'helpText': true,
|
|
5022
|
-
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5023
|
-
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5024
|
-
};
|
|
5025
5180
|
|
|
5026
5181
|
return u`
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5182
|
+
<div>
|
|
5183
|
+
<div
|
|
5184
|
+
id="trigger"
|
|
5185
|
+
class="trigger"
|
|
5186
|
+
part="trigger"
|
|
5187
|
+
tabindex="${this.tabIndex}"
|
|
5188
|
+
?showBorder="${this.showTriggerBorders}"
|
|
5189
|
+
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5190
|
+
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5191
|
+
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5192
|
+
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5193
|
+
>
|
|
5194
|
+
<div class="triggerContentWrapper">
|
|
5195
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5196
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5197
|
+
</label>
|
|
5198
|
+
<div class="triggerContent">
|
|
5199
|
+
<slot
|
|
5200
|
+
name="trigger"
|
|
5201
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5202
|
+
</div>
|
|
5203
|
+
</div>
|
|
5204
|
+
${this.chevron || this.common ? u`
|
|
5205
|
+
<div
|
|
5206
|
+
id="showStateIcon"
|
|
5207
|
+
part="chevron">
|
|
5208
|
+
<${this.iconTag}
|
|
5209
|
+
category="interface"
|
|
5210
|
+
name="chevron-down"
|
|
5211
|
+
?onDark="${this.onDark}"
|
|
5212
|
+
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5213
|
+
>
|
|
5214
|
+
</${this.iconTag}>
|
|
5215
|
+
</div>
|
|
5216
|
+
` : undefined }
|
|
5217
|
+
</div>
|
|
5218
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5219
|
+
<slot name="helpText"></slot>
|
|
5220
|
+
</${this.helpTextTag}>
|
|
5221
|
+
|
|
5222
|
+
<div id="bibSizer" part="size"></div>
|
|
5223
|
+
<${this.dropdownBibTag}
|
|
5224
|
+
id="bib"
|
|
5225
|
+
?data-show="${this.isPopoverVisible}"
|
|
5226
|
+
?isfullscreen="${this.isBibFullscreen}"
|
|
5227
|
+
?common="${this.common}"
|
|
5228
|
+
?rounded="${this.common || this.rounded}"
|
|
5229
|
+
?inset="${this.common || this.inset}"
|
|
5230
|
+
>
|
|
5231
|
+
<div class="slotContent">
|
|
5232
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5233
|
+
</div>
|
|
5234
|
+
</${this.dropdownBibTag}>
|
|
5235
|
+
</div>
|
|
5236
|
+
`;
|
|
5237
|
+
}
|
|
5238
|
+
|
|
5239
|
+
/**
|
|
5240
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
5241
|
+
* @private
|
|
5242
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
5243
|
+
*/
|
|
5244
|
+
renderLayoutSnowflake() {
|
|
5245
|
+
const helpTextClasses = {
|
|
5246
|
+
'helpText': true,
|
|
5247
|
+
'leftIndent': true,
|
|
5248
|
+
'rightIndent': true
|
|
5249
|
+
};
|
|
5250
|
+
|
|
5251
|
+
return u`
|
|
5252
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5253
|
+
`;
|
|
5254
|
+
}
|
|
5255
|
+
|
|
5256
|
+
/**
|
|
5257
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
5258
|
+
* @private
|
|
5259
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
5260
|
+
*/
|
|
5261
|
+
renderLayoutEmphasized() {
|
|
5262
|
+
const helpTextClasses = {
|
|
5263
|
+
'helpText': true,
|
|
5264
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5265
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5266
|
+
};
|
|
5267
|
+
|
|
5268
|
+
return u`
|
|
5269
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5270
|
+
`;
|
|
5271
|
+
}
|
|
5272
|
+
|
|
5273
|
+
/**
|
|
5274
|
+
* Logic to determine the layout of the component.
|
|
5275
|
+
* @private
|
|
5276
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
5277
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
5036
5278
|
*/
|
|
5037
5279
|
renderLayout(ForcedLayout) {
|
|
5038
5280
|
const layout = ForcedLayout || this.layout;
|
|
@@ -5071,7 +5313,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5071
5313
|
|
|
5072
5314
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5073
5315
|
|
|
5074
|
-
class AuroLibraryRuntimeUtils {
|
|
5316
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
5075
5317
|
|
|
5076
5318
|
/* eslint-disable jsdoc/require-param */
|
|
5077
5319
|
|
|
@@ -5132,7 +5374,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
5132
5374
|
|
|
5133
5375
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
5134
5376
|
}
|
|
5135
|
-
}
|
|
5377
|
+
};
|
|
5136
5378
|
|
|
5137
5379
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5138
5380
|
// See LICENSE in the project root for license information.
|
|
@@ -5324,9 +5566,79 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
5324
5566
|
}
|
|
5325
5567
|
};
|
|
5326
5568
|
|
|
5327
|
-
var tokensCss$
|
|
5569
|
+
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)}`;
|
|
5570
|
+
|
|
5571
|
+
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)}`;
|
|
5572
|
+
|
|
5573
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5574
|
+
// See LICENSE in the project root for license information.
|
|
5575
|
+
|
|
5576
|
+
// ---------------------------------------------------------------------
|
|
5577
|
+
|
|
5578
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5579
|
+
|
|
5580
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5581
|
+
|
|
5582
|
+
/* eslint-disable jsdoc/require-param */
|
|
5583
|
+
|
|
5584
|
+
/**
|
|
5585
|
+
* This will register a new custom element with the browser.
|
|
5586
|
+
* @param {String} name - The name of the custom element.
|
|
5587
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5588
|
+
* @returns {void}
|
|
5589
|
+
*/
|
|
5590
|
+
registerComponent(name, componentClass) {
|
|
5591
|
+
if (!customElements.get(name)) {
|
|
5592
|
+
customElements.define(name, class extends componentClass {});
|
|
5593
|
+
}
|
|
5594
|
+
}
|
|
5595
|
+
|
|
5596
|
+
/**
|
|
5597
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5598
|
+
* @returns {void}
|
|
5599
|
+
*/
|
|
5600
|
+
closestElement(
|
|
5601
|
+
selector, // selector like in .closest()
|
|
5602
|
+
base = this, // extra functionality to skip a parent
|
|
5603
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5604
|
+
!el || el === document || el === window
|
|
5605
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5606
|
+
: found
|
|
5607
|
+
? found // found a selector INside this element
|
|
5608
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5609
|
+
) {
|
|
5610
|
+
return __Closest(base);
|
|
5611
|
+
}
|
|
5612
|
+
/* eslint-enable jsdoc/require-param */
|
|
5613
|
+
|
|
5614
|
+
/**
|
|
5615
|
+
* 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.
|
|
5616
|
+
* @param {Object} elem - The element to check.
|
|
5617
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5618
|
+
* @returns {void}
|
|
5619
|
+
*/
|
|
5620
|
+
handleComponentTagRename(elem, tagName) {
|
|
5621
|
+
const tag = tagName.toLowerCase();
|
|
5622
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5623
|
+
|
|
5624
|
+
if (elemTag !== tag) {
|
|
5625
|
+
elem.setAttribute(tag, true);
|
|
5626
|
+
}
|
|
5627
|
+
}
|
|
5328
5628
|
|
|
5329
|
-
|
|
5629
|
+
/**
|
|
5630
|
+
* Validates if an element is a specific Auro component.
|
|
5631
|
+
* @param {Object} elem - The element to validate.
|
|
5632
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5633
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5634
|
+
*/
|
|
5635
|
+
elementMatch(elem, tagName) {
|
|
5636
|
+
const tag = tagName.toLowerCase();
|
|
5637
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5638
|
+
|
|
5639
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5640
|
+
}
|
|
5641
|
+
};
|
|
5330
5642
|
|
|
5331
5643
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5332
5644
|
// See LICENSE in the project root for license information.
|
|
@@ -5347,7 +5659,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5347
5659
|
*/
|
|
5348
5660
|
privateDefaults() {
|
|
5349
5661
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5350
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5662
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5351
5663
|
}
|
|
5352
5664
|
|
|
5353
5665
|
// function to define props used within the scope of this component
|
|
@@ -5414,9 +5726,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5414
5726
|
static get styles() {
|
|
5415
5727
|
return [
|
|
5416
5728
|
super.styles,
|
|
5417
|
-
i$5`${tokensCss$
|
|
5729
|
+
i$5`${tokensCss$3}`,
|
|
5418
5730
|
i$5`${styleCss$1$1}`,
|
|
5419
|
-
i$5`${colorCss$
|
|
5731
|
+
i$5`${colorCss$4}`
|
|
5420
5732
|
];
|
|
5421
5733
|
}
|
|
5422
5734
|
|
|
@@ -5429,7 +5741,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5429
5741
|
*
|
|
5430
5742
|
*/
|
|
5431
5743
|
static register(name = "auro-icon") {
|
|
5432
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
5744
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
5433
5745
|
}
|
|
5434
5746
|
|
|
5435
5747
|
connectedCallback() {
|
|
@@ -5497,7 +5809,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5497
5809
|
|
|
5498
5810
|
var iconVersion$1 = '8.0.3';
|
|
5499
5811
|
|
|
5500
|
-
var styleCss$
|
|
5812
|
+
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)}`;
|
|
5501
5813
|
|
|
5502
5814
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5503
5815
|
// See LICENSE in the project root for license information.
|
|
@@ -5526,7 +5838,7 @@ class AuroHeader extends i$2 {
|
|
|
5526
5838
|
/**
|
|
5527
5839
|
* @private
|
|
5528
5840
|
*/
|
|
5529
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5841
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5530
5842
|
}
|
|
5531
5843
|
|
|
5532
5844
|
// function to define props used within the scope of this component
|
|
@@ -5544,7 +5856,7 @@ class AuroHeader extends i$2 {
|
|
|
5544
5856
|
}
|
|
5545
5857
|
|
|
5546
5858
|
static get styles() {
|
|
5547
|
-
return [styleCss$
|
|
5859
|
+
return [styleCss$5];
|
|
5548
5860
|
}
|
|
5549
5861
|
|
|
5550
5862
|
/**
|
|
@@ -5556,7 +5868,7 @@ class AuroHeader extends i$2 {
|
|
|
5556
5868
|
*
|
|
5557
5869
|
*/
|
|
5558
5870
|
static register(name = "auro-header") {
|
|
5559
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
5871
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroHeader);
|
|
5560
5872
|
}
|
|
5561
5873
|
|
|
5562
5874
|
firstUpdated() {
|
|
@@ -5652,7 +5964,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
5652
5964
|
|
|
5653
5965
|
this.large = false;
|
|
5654
5966
|
|
|
5655
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5967
|
+
AuroLibraryRuntimeUtils$1$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5656
5968
|
|
|
5657
5969
|
const versioning = new AuroDependencyVersioning();
|
|
5658
5970
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
@@ -5691,7 +6003,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
5691
6003
|
*
|
|
5692
6004
|
*/
|
|
5693
6005
|
static register(name = "auro-bibtemplate") {
|
|
5694
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
6006
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
5695
6007
|
}
|
|
5696
6008
|
|
|
5697
6009
|
/**
|
|
@@ -5731,6 +6043,18 @@ class AuroBibtemplate extends i$2 {
|
|
|
5731
6043
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
5732
6044
|
}
|
|
5733
6045
|
|
|
6046
|
+
firstUpdated(changedProperties) {
|
|
6047
|
+
super.firstUpdated(changedProperties);
|
|
6048
|
+
|
|
6049
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
6050
|
+
bubbles: true,
|
|
6051
|
+
composed: true,
|
|
6052
|
+
detail: {
|
|
6053
|
+
element: this
|
|
6054
|
+
}
|
|
6055
|
+
}));
|
|
6056
|
+
}
|
|
6057
|
+
|
|
5734
6058
|
// function that renders the HTML and CSS into the scope of the component
|
|
5735
6059
|
render() {
|
|
5736
6060
|
return u`
|
|
@@ -5763,6 +6087,214 @@ class AuroBibtemplate extends i$2 {
|
|
|
5763
6087
|
|
|
5764
6088
|
var bibTemplateVersion = '1.0.0';
|
|
5765
6089
|
|
|
6090
|
+
var colorCss$3 = 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)}`;
|
|
6091
|
+
|
|
6092
|
+
var styleCss$4 = i$5`.helptext-wrapper{display:none;font-size:var(--ds-basic-text-body-xs-font-size, 12px);font-weight:var(--ds-basic-text-body-xs-font-weight, 450);letter-spacing:var(--ds-basic-text-body-xs-letter-spacing, 0);line-height:var(--ds-basic-text-body-xs-line-height, 16px)}:host([large]) .helptext-wrapper{font-size:var(--ds-basic-text-body-default-font-size, 16px);font-weight:var(--ds-basic-text-body-default-font-weight, 450);letter-spacing:var(--ds-basic-text-body-default-letter-spacing, 0);line-height:var(--ds-basic-text-body-default-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}`;
|
|
6093
|
+
|
|
6094
|
+
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
6095
|
+
|
|
6096
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6097
|
+
// See LICENSE in the project root for license information.
|
|
6098
|
+
|
|
6099
|
+
// ---------------------------------------------------------------------
|
|
6100
|
+
|
|
6101
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6102
|
+
|
|
6103
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6104
|
+
|
|
6105
|
+
/* eslint-disable jsdoc/require-param */
|
|
6106
|
+
|
|
6107
|
+
/**
|
|
6108
|
+
* This will register a new custom element with the browser.
|
|
6109
|
+
* @param {String} name - The name of the custom element.
|
|
6110
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6111
|
+
* @returns {void}
|
|
6112
|
+
*/
|
|
6113
|
+
registerComponent(name, componentClass) {
|
|
6114
|
+
if (!customElements.get(name)) {
|
|
6115
|
+
customElements.define(name, class extends componentClass {});
|
|
6116
|
+
}
|
|
6117
|
+
}
|
|
6118
|
+
|
|
6119
|
+
/**
|
|
6120
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6121
|
+
* @returns {void}
|
|
6122
|
+
*/
|
|
6123
|
+
closestElement(
|
|
6124
|
+
selector, // selector like in .closest()
|
|
6125
|
+
base = this, // extra functionality to skip a parent
|
|
6126
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6127
|
+
!el || el === document || el === window
|
|
6128
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6129
|
+
: found
|
|
6130
|
+
? found // found a selector INside this element
|
|
6131
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6132
|
+
) {
|
|
6133
|
+
return __Closest(base);
|
|
6134
|
+
}
|
|
6135
|
+
/* eslint-enable jsdoc/require-param */
|
|
6136
|
+
|
|
6137
|
+
/**
|
|
6138
|
+
* 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.
|
|
6139
|
+
* @param {Object} elem - The element to check.
|
|
6140
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6141
|
+
* @returns {void}
|
|
6142
|
+
*/
|
|
6143
|
+
handleComponentTagRename(elem, tagName) {
|
|
6144
|
+
const tag = tagName.toLowerCase();
|
|
6145
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6146
|
+
|
|
6147
|
+
if (elemTag !== tag) {
|
|
6148
|
+
elem.setAttribute(tag, true);
|
|
6149
|
+
}
|
|
6150
|
+
}
|
|
6151
|
+
|
|
6152
|
+
/**
|
|
6153
|
+
* Validates if an element is a specific Auro component.
|
|
6154
|
+
* @param {Object} elem - The element to validate.
|
|
6155
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6156
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6157
|
+
*/
|
|
6158
|
+
elementMatch(elem, tagName) {
|
|
6159
|
+
const tag = tagName.toLowerCase();
|
|
6160
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6161
|
+
|
|
6162
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6163
|
+
}
|
|
6164
|
+
};
|
|
6165
|
+
|
|
6166
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6167
|
+
// See LICENSE in the project root for license information.
|
|
6168
|
+
|
|
6169
|
+
|
|
6170
|
+
/**
|
|
6171
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6172
|
+
*
|
|
6173
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6174
|
+
*/
|
|
6175
|
+
class AuroHelpText extends i$2 {
|
|
6176
|
+
|
|
6177
|
+
constructor() {
|
|
6178
|
+
super();
|
|
6179
|
+
|
|
6180
|
+
this.error = false;
|
|
6181
|
+
this.onDark = false;
|
|
6182
|
+
this.hasTextContent = false;
|
|
6183
|
+
|
|
6184
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
6185
|
+
}
|
|
6186
|
+
|
|
6187
|
+
static get styles() {
|
|
6188
|
+
return [
|
|
6189
|
+
colorCss$3,
|
|
6190
|
+
styleCss$4,
|
|
6191
|
+
tokensCss$2
|
|
6192
|
+
];
|
|
6193
|
+
}
|
|
6194
|
+
|
|
6195
|
+
// function to define props used within the scope of this component
|
|
6196
|
+
static get properties() {
|
|
6197
|
+
return {
|
|
6198
|
+
|
|
6199
|
+
/**
|
|
6200
|
+
* @private
|
|
6201
|
+
*/
|
|
6202
|
+
slotNodes: {
|
|
6203
|
+
type: Boolean,
|
|
6204
|
+
},
|
|
6205
|
+
|
|
6206
|
+
/**
|
|
6207
|
+
* @private
|
|
6208
|
+
*/
|
|
6209
|
+
hasTextContent: {
|
|
6210
|
+
type: Boolean,
|
|
6211
|
+
},
|
|
6212
|
+
|
|
6213
|
+
/**
|
|
6214
|
+
* If declared, make font color red.
|
|
6215
|
+
*/
|
|
6216
|
+
error: {
|
|
6217
|
+
type: Boolean,
|
|
6218
|
+
reflect: true,
|
|
6219
|
+
},
|
|
6220
|
+
|
|
6221
|
+
/**
|
|
6222
|
+
* If declared, will apply onDark styles.
|
|
6223
|
+
*/
|
|
6224
|
+
onDark: {
|
|
6225
|
+
type: Boolean,
|
|
6226
|
+
reflect: true
|
|
6227
|
+
}
|
|
6228
|
+
};
|
|
6229
|
+
}
|
|
6230
|
+
|
|
6231
|
+
/**
|
|
6232
|
+
* This will register this element with the browser.
|
|
6233
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
6234
|
+
*
|
|
6235
|
+
* @example
|
|
6236
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
6237
|
+
*
|
|
6238
|
+
*/
|
|
6239
|
+
static register(name = "auro-helptext") {
|
|
6240
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHelpText);
|
|
6241
|
+
}
|
|
6242
|
+
|
|
6243
|
+
updated() {
|
|
6244
|
+
this.handleSlotChange();
|
|
6245
|
+
}
|
|
6246
|
+
|
|
6247
|
+
handleSlotChange(event) {
|
|
6248
|
+
if (event) {
|
|
6249
|
+
this.slotNodes = event.target.assignedNodes();
|
|
6250
|
+
}
|
|
6251
|
+
|
|
6252
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
6253
|
+
}
|
|
6254
|
+
|
|
6255
|
+
/**
|
|
6256
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
6257
|
+
*
|
|
6258
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
6259
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
6260
|
+
* @private
|
|
6261
|
+
*/
|
|
6262
|
+
checkSlotsForContent(nodes) {
|
|
6263
|
+
if (!nodes) {
|
|
6264
|
+
return false;
|
|
6265
|
+
}
|
|
6266
|
+
|
|
6267
|
+
return nodes.some((node) => {
|
|
6268
|
+
if (node.textContent.trim()) {
|
|
6269
|
+
return true;
|
|
6270
|
+
}
|
|
6271
|
+
|
|
6272
|
+
if (!node.querySelector) {
|
|
6273
|
+
return false;
|
|
6274
|
+
}
|
|
6275
|
+
|
|
6276
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
6277
|
+
if (!nestedSlot) {
|
|
6278
|
+
return false;
|
|
6279
|
+
}
|
|
6280
|
+
|
|
6281
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
6282
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
6283
|
+
});
|
|
6284
|
+
}
|
|
6285
|
+
|
|
6286
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6287
|
+
render() {
|
|
6288
|
+
return x`
|
|
6289
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
6290
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6291
|
+
</div>
|
|
6292
|
+
`;
|
|
6293
|
+
}
|
|
6294
|
+
}
|
|
6295
|
+
|
|
6296
|
+
var helpTextVersion = '1.0.0';
|
|
6297
|
+
|
|
5766
6298
|
i$5`:focus:not(:focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption),:host ::slotted([auro-menuoption]),:host auro-menuoption[loadingplaceholder]{padding-left:calc(var(--ds-size-150, 0.75rem) + 24px + var(--ds-size-100, 0.5rem))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box !important;height:0 !important;overflow:visible !important;margin:var(--ds-size-100, 0.5rem) 0 !important;border-width:0 !important;border-top-width:1px !important;border-top-style:solid !important}:host([nocheckmark]) ::slotted(auro-menuoption),:host([nocheckmark]) auro-menuoption[loadingplaceholder]{padding-left:var(--ds-size-200, 1rem)}:host([root]){overflow-y:auto}[loadingplaceholder].empty{opacity:0;position:absolute}[loadingplaceholder] slot[name=loadingIcon]{vertical-align:middle;line-height:1;display:inline-block}[loadingplaceholder] slot[name=loadingIcon]::slotted(*){margin-right:var(--ds-size-150, 0.75rem)}`;
|
|
5767
6299
|
|
|
5768
6300
|
i$5`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
@@ -5824,7 +6356,7 @@ i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
|
|
|
5824
6356
|
|
|
5825
6357
|
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)}`;
|
|
5826
6358
|
|
|
5827
|
-
var styleCss$3 = i$5
|
|
6359
|
+
var styleCss$3 = i$5`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;justify-content:center;align-items:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
|
|
5828
6360
|
|
|
5829
6361
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5830
6362
|
// See LICENSE in the project root for license information.
|
|
@@ -5847,7 +6379,7 @@ var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
5847
6379
|
*/
|
|
5848
6380
|
|
|
5849
6381
|
// build the component class
|
|
5850
|
-
class AuroSelect extends
|
|
6382
|
+
class AuroSelect extends AuroElement$3 {
|
|
5851
6383
|
constructor() {
|
|
5852
6384
|
super();
|
|
5853
6385
|
|
|
@@ -5857,12 +6389,21 @@ class AuroSelect extends i$2 {
|
|
|
5857
6389
|
const idSubstrEnd = 8;
|
|
5858
6390
|
const idSubstrStart = 2;
|
|
5859
6391
|
|
|
6392
|
+
this.matchWidth = true;
|
|
6393
|
+
|
|
6394
|
+
// Layout Config
|
|
6395
|
+
this.layout = 'classic';
|
|
6396
|
+
this.shape = 'classic';
|
|
6397
|
+
this.size = 'xl';
|
|
6398
|
+
|
|
5860
6399
|
// floaterConfig
|
|
5861
6400
|
this.placement = 'bottom-start';
|
|
5862
6401
|
this.offset = 0;
|
|
5863
6402
|
this.noFlip = false;
|
|
5864
6403
|
this.autoPlacement = false;
|
|
5865
6404
|
|
|
6405
|
+
this.forceDisplayValue = false;
|
|
6406
|
+
|
|
5866
6407
|
/**
|
|
5867
6408
|
* @private
|
|
5868
6409
|
*/
|
|
@@ -5878,7 +6419,7 @@ class AuroSelect extends i$2 {
|
|
|
5878
6419
|
/**
|
|
5879
6420
|
* @private
|
|
5880
6421
|
*/
|
|
5881
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6422
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5882
6423
|
|
|
5883
6424
|
/**
|
|
5884
6425
|
* Generate unique names for dependency components.
|
|
@@ -5895,10 +6436,25 @@ class AuroSelect extends i$2 {
|
|
|
5895
6436
|
*/
|
|
5896
6437
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-select-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
5897
6438
|
|
|
6439
|
+
/**
|
|
6440
|
+
* @private
|
|
6441
|
+
*/
|
|
6442
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
6443
|
+
|
|
5898
6444
|
/**
|
|
5899
6445
|
* @private
|
|
5900
6446
|
*/
|
|
5901
6447
|
this.isHiddenWhileLoading = false;
|
|
6448
|
+
|
|
6449
|
+
/**
|
|
6450
|
+
* @private
|
|
6451
|
+
*/
|
|
6452
|
+
this.hasFocus = false;
|
|
6453
|
+
|
|
6454
|
+
/**
|
|
6455
|
+
* @private
|
|
6456
|
+
*/
|
|
6457
|
+
this.hasDisplayValueContent = false;
|
|
5902
6458
|
}
|
|
5903
6459
|
|
|
5904
6460
|
/**
|
|
@@ -5912,6 +6468,7 @@ class AuroSelect extends i$2 {
|
|
|
5912
6468
|
this.value = undefined;
|
|
5913
6469
|
this.fullscreenBreakpoint = 'sm';
|
|
5914
6470
|
this.onDark = false;
|
|
6471
|
+
this.isPopoverVisible = false;
|
|
5915
6472
|
}
|
|
5916
6473
|
|
|
5917
6474
|
// This function is to define props used within the scope of this component
|
|
@@ -5928,6 +6485,14 @@ class AuroSelect extends i$2 {
|
|
|
5928
6485
|
reflect: true
|
|
5929
6486
|
},
|
|
5930
6487
|
|
|
6488
|
+
/**
|
|
6489
|
+
* If declared, the label and value will be visually hidden and the displayValue will render 100% of the time.
|
|
6490
|
+
*/
|
|
6491
|
+
forceDisplayValue: {
|
|
6492
|
+
type: Boolean,
|
|
6493
|
+
reflect: true
|
|
6494
|
+
},
|
|
6495
|
+
|
|
5931
6496
|
/**
|
|
5932
6497
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
5933
6498
|
* @default false
|
|
@@ -5945,6 +6510,22 @@ class AuroSelect extends i$2 {
|
|
|
5945
6510
|
reflect: true
|
|
5946
6511
|
},
|
|
5947
6512
|
|
|
6513
|
+
/**
|
|
6514
|
+
* @private
|
|
6515
|
+
*/
|
|
6516
|
+
isPopoverVisible: {
|
|
6517
|
+
type: Boolean,
|
|
6518
|
+
reflect: false
|
|
6519
|
+
},
|
|
6520
|
+
|
|
6521
|
+
/**
|
|
6522
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
6523
|
+
*/
|
|
6524
|
+
matchWidth: {
|
|
6525
|
+
type: Boolean,
|
|
6526
|
+
reflect: true
|
|
6527
|
+
},
|
|
6528
|
+
|
|
5948
6529
|
/**
|
|
5949
6530
|
* The name for the select element.
|
|
5950
6531
|
*/
|
|
@@ -6125,21 +6706,54 @@ class AuroSelect extends i$2 {
|
|
|
6125
6706
|
},
|
|
6126
6707
|
|
|
6127
6708
|
/**
|
|
6128
|
-
* Indicates whether the input is in a dirty state (has been interacted with).
|
|
6129
|
-
* @type {boolean}
|
|
6130
|
-
* @default false
|
|
6709
|
+
* Indicates whether the input is in a dirty state (has been interacted with).
|
|
6710
|
+
* @type {boolean}
|
|
6711
|
+
* @default false
|
|
6712
|
+
* @private
|
|
6713
|
+
*/
|
|
6714
|
+
touched: {
|
|
6715
|
+
type: Boolean,
|
|
6716
|
+
reflect: true,
|
|
6717
|
+
attribute: false
|
|
6718
|
+
},
|
|
6719
|
+
|
|
6720
|
+
/**
|
|
6721
|
+
* @private
|
|
6722
|
+
*/
|
|
6723
|
+
hasFocus: {
|
|
6724
|
+
type: Boolean,
|
|
6725
|
+
reflect: false,
|
|
6726
|
+
attribute: false
|
|
6727
|
+
},
|
|
6728
|
+
|
|
6729
|
+
/**
|
|
6131
6730
|
* @private
|
|
6132
6731
|
*/
|
|
6133
|
-
|
|
6732
|
+
hasDisplayValueContent: {
|
|
6134
6733
|
type: Boolean,
|
|
6135
|
-
reflect:
|
|
6734
|
+
reflect: false,
|
|
6136
6735
|
attribute: false
|
|
6137
|
-
}
|
|
6736
|
+
},
|
|
6138
6737
|
};
|
|
6139
6738
|
}
|
|
6140
6739
|
|
|
6141
6740
|
static get styles() {
|
|
6142
|
-
return [
|
|
6741
|
+
return [
|
|
6742
|
+
i$5`${shapeSizeCss$1}`,
|
|
6743
|
+
i$5`${tokensCss$5}`,
|
|
6744
|
+
i$5`${styleCss$3}`,
|
|
6745
|
+
];
|
|
6746
|
+
}
|
|
6747
|
+
|
|
6748
|
+
/**
|
|
6749
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
6750
|
+
* @private
|
|
6751
|
+
* @return {object} - Returns classmap.
|
|
6752
|
+
*/
|
|
6753
|
+
get commonWrapperClasses() {
|
|
6754
|
+
return {
|
|
6755
|
+
'wrapper': true
|
|
6756
|
+
};
|
|
6143
6757
|
}
|
|
6144
6758
|
|
|
6145
6759
|
/**
|
|
@@ -6149,11 +6763,13 @@ class AuroSelect extends i$2 {
|
|
|
6149
6763
|
*/
|
|
6150
6764
|
configureDropdown() {
|
|
6151
6765
|
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
6152
|
-
|
|
6766
|
+
|
|
6767
|
+
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6768
|
+
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
6769
|
+
});
|
|
6153
6770
|
|
|
6154
6771
|
// setting up bibtemplate
|
|
6155
6772
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$); // eslint-disable-line no-underscore-dangle
|
|
6156
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
6157
6773
|
|
|
6158
6774
|
if (this.customBibWidth) {
|
|
6159
6775
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6172,7 +6788,7 @@ class AuroSelect extends i$2 {
|
|
|
6172
6788
|
*
|
|
6173
6789
|
*/
|
|
6174
6790
|
static register(name = "auro-select") {
|
|
6175
|
-
AuroLibraryRuntimeUtils$
|
|
6791
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroSelect);
|
|
6176
6792
|
}
|
|
6177
6793
|
|
|
6178
6794
|
/**
|
|
@@ -6183,21 +6799,34 @@ class AuroSelect extends i$2 {
|
|
|
6183
6799
|
updateDisplayedValue() {
|
|
6184
6800
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
6185
6801
|
|
|
6186
|
-
|
|
6187
|
-
|
|
6802
|
+
// Clear out old value
|
|
6803
|
+
const valueElem = triggerContentEl.querySelector('#value');
|
|
6804
|
+
if (valueElem) {
|
|
6805
|
+
valueElem.innerHTML = '';
|
|
6806
|
+
}
|
|
6807
|
+
|
|
6808
|
+
const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
|
|
6809
|
+
const slottedElements = slot.assignedElements();
|
|
6810
|
+
|
|
6811
|
+
slottedElements.forEach((element) => {
|
|
6812
|
+
element.remove();
|
|
6813
|
+
});
|
|
6188
6814
|
|
|
6189
6815
|
// Handle selected options
|
|
6190
6816
|
if (this.optionSelected) {
|
|
6191
|
-
let displayText = '';
|
|
6192
|
-
|
|
6193
6817
|
if (this.multiSelect && this.optionSelected.length > 0) {
|
|
6194
|
-
|
|
6195
|
-
|
|
6818
|
+
const displayText = this.optionSelected.map((option) => option.textContent).join(', ');
|
|
6819
|
+
|
|
6820
|
+
valueElem.textContent = displayText;
|
|
6196
6821
|
} else {
|
|
6197
|
-
|
|
6198
|
-
|
|
6822
|
+
valueElem.innerHTML = this.optionSelected.innerHTML;
|
|
6823
|
+
const displayValueEl = this.optionSelected.querySelector("[slot='displayValue']");
|
|
6199
6824
|
|
|
6200
|
-
|
|
6825
|
+
if (displayValueEl) {
|
|
6826
|
+
this.appendChild(displayValueEl.cloneNode(true));
|
|
6827
|
+
}
|
|
6828
|
+
this.hasDisplayValueContent = displayValueEl !== null;
|
|
6829
|
+
}
|
|
6201
6830
|
}
|
|
6202
6831
|
|
|
6203
6832
|
this.dropdown.requestUpdate();
|
|
@@ -6276,8 +6905,6 @@ class AuroSelect extends i$2 {
|
|
|
6276
6905
|
* @returns {void}
|
|
6277
6906
|
*/
|
|
6278
6907
|
configureSelect() {
|
|
6279
|
-
// inject menu into menuWrapper
|
|
6280
|
-
this.menuWrapper.append(this.menu);
|
|
6281
6908
|
|
|
6282
6909
|
this.addEventListener('keydown', (evt) => {
|
|
6283
6910
|
if (evt.key === 'ArrowUp') {
|
|
@@ -6331,6 +6958,7 @@ class AuroSelect extends i$2 {
|
|
|
6331
6958
|
|
|
6332
6959
|
this.addEventListener('blur', () => {
|
|
6333
6960
|
this.validation.validate(this);
|
|
6961
|
+
this.hasFocus = false;
|
|
6334
6962
|
});
|
|
6335
6963
|
}
|
|
6336
6964
|
|
|
@@ -6406,6 +7034,7 @@ class AuroSelect extends i$2 {
|
|
|
6406
7034
|
*/
|
|
6407
7035
|
handleFocusin() {
|
|
6408
7036
|
|
|
7037
|
+
this.hasFocus = true;
|
|
6409
7038
|
this.touched = true;
|
|
6410
7039
|
}
|
|
6411
7040
|
|
|
@@ -6614,11 +7243,288 @@ class AuroSelect extends i$2 {
|
|
|
6614
7243
|
}
|
|
6615
7244
|
}
|
|
6616
7245
|
|
|
7246
|
+
renderAriaHtml() {
|
|
7247
|
+
return u`
|
|
7248
|
+
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7249
|
+
${this.optionActive && this.options.length > 0
|
|
7250
|
+
? u`
|
|
7251
|
+
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7252
|
+
`
|
|
7253
|
+
: undefined
|
|
7254
|
+
};
|
|
7255
|
+
|
|
7256
|
+
${this.optionSelected && this.options.length > 0
|
|
7257
|
+
? u`
|
|
7258
|
+
${`${this.optionSelected.innerText} selected`}
|
|
7259
|
+
`
|
|
7260
|
+
: undefined
|
|
7261
|
+
};
|
|
7262
|
+
</div>
|
|
7263
|
+
`;
|
|
7264
|
+
}
|
|
7265
|
+
|
|
7266
|
+
renderNativeSelect() {
|
|
7267
|
+
return u`
|
|
7268
|
+
<div class="nativeSelectWrapper">
|
|
7269
|
+
<select
|
|
7270
|
+
tabindex="-1"
|
|
7271
|
+
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7272
|
+
name="${this.name || ''}"
|
|
7273
|
+
?disabled="${this.disabled}"
|
|
7274
|
+
?required="${this.required}"
|
|
7275
|
+
aria-hidden="true"
|
|
7276
|
+
autocomplete="${o(this.autocomplete)}"
|
|
7277
|
+
@change="${this._handleNativeSelectChange}">
|
|
7278
|
+
<option value="" ?selected="${!this.value}"></option>
|
|
7279
|
+
${this.options.map((option) => {
|
|
7280
|
+
const optionValue = option.value || option.textContent;
|
|
7281
|
+
return u`
|
|
7282
|
+
<option
|
|
7283
|
+
value="${optionValue}"
|
|
7284
|
+
?selected="${this.value === optionValue}">
|
|
7285
|
+
${option.textContent}
|
|
7286
|
+
</option>
|
|
7287
|
+
`;
|
|
7288
|
+
})}
|
|
7289
|
+
</select>
|
|
7290
|
+
</div>
|
|
7291
|
+
`;
|
|
7292
|
+
}
|
|
7293
|
+
|
|
7294
|
+
/**
|
|
7295
|
+
* Returns HTML for the help text and error message.
|
|
7296
|
+
* @private
|
|
7297
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
7298
|
+
*/
|
|
7299
|
+
renderHtmlHelpText() {
|
|
7300
|
+
return u`
|
|
7301
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7302
|
+
? u`
|
|
7303
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7304
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
7305
|
+
<slot name="helptext"></slot>
|
|
7306
|
+
</p>
|
|
7307
|
+
</${this.helpTextTag}>
|
|
7308
|
+
`
|
|
7309
|
+
: u`
|
|
7310
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7311
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7312
|
+
ERROR MESSAGE ${this.errorMessage}
|
|
7313
|
+
</p>
|
|
7314
|
+
</${this.helpTextTag}>
|
|
7315
|
+
`
|
|
7316
|
+
}
|
|
7317
|
+
`;
|
|
7318
|
+
}
|
|
7319
|
+
|
|
7320
|
+
/**
|
|
7321
|
+
* Returns HTML for the emphasized layout.
|
|
7322
|
+
* @private
|
|
7323
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7324
|
+
*/
|
|
7325
|
+
// TODO update to use util class
|
|
7326
|
+
renderLayoutEmphasized() {
|
|
7327
|
+
const placeholderClass = {
|
|
7328
|
+
hidden: this.value,
|
|
7329
|
+
};
|
|
7330
|
+
|
|
7331
|
+
const displayValueClasses = {
|
|
7332
|
+
'displayValue': true,
|
|
7333
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7334
|
+
'hasFocus': this.isPopoverVisible,
|
|
7335
|
+
'withValue': this.value && this.value.length > 0,
|
|
7336
|
+
'force': this.forceDisplayValue,
|
|
7337
|
+
};
|
|
7338
|
+
|
|
7339
|
+
const valueContainerClasses = {
|
|
7340
|
+
'valueContainer': true,
|
|
7341
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7342
|
+
};
|
|
7343
|
+
|
|
7344
|
+
return u`
|
|
7345
|
+
<div
|
|
7346
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7347
|
+
part="wrapper">
|
|
7348
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7349
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7350
|
+
</div>
|
|
7351
|
+
<${this.dropdownTag}
|
|
7352
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7353
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7354
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7355
|
+
?noFlip="${this.noFlip}"
|
|
7356
|
+
?onDark="${this.onDark}"
|
|
7357
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7358
|
+
.offset="${this.offset}"
|
|
7359
|
+
.placement="${this.placement}"
|
|
7360
|
+
chevron
|
|
7361
|
+
fluid
|
|
7362
|
+
for="selectMenu"
|
|
7363
|
+
layout="${this.layout}"
|
|
7364
|
+
part="dropdown"
|
|
7365
|
+
shape="${this.shape}"
|
|
7366
|
+
size="${this.size}">
|
|
7367
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7368
|
+
<div class="accents left">
|
|
7369
|
+
<slot name="typeIcon"></slot>
|
|
7370
|
+
</div>
|
|
7371
|
+
<div class="mainContent">
|
|
7372
|
+
<div class="${e(valueContainerClasses)}">
|
|
7373
|
+
<label>
|
|
7374
|
+
<slot name="label"></slot>
|
|
7375
|
+
</label>
|
|
7376
|
+
<div class="value" id="value"></div>
|
|
7377
|
+
${this.value ? undefined : u`
|
|
7378
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
7379
|
+
<slot name="placeholder"></slot>
|
|
7380
|
+
</div>
|
|
7381
|
+
`}
|
|
7382
|
+
</div>
|
|
7383
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7384
|
+
<slot name="displayValue"></slot>
|
|
7385
|
+
</div>
|
|
7386
|
+
</div>
|
|
7387
|
+
<div class="accents right"></div>
|
|
7388
|
+
</div>
|
|
7389
|
+
<div class="menuWrapper"></div>
|
|
7390
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7391
|
+
<slot></slot>
|
|
7392
|
+
</${this.bibtemplateTag}>
|
|
7393
|
+
<div slot="helpText">
|
|
7394
|
+
${this.renderHtmlHelpText()}
|
|
7395
|
+
</div>
|
|
7396
|
+
</${this.dropdownTag}>
|
|
7397
|
+
</div>
|
|
7398
|
+
`;
|
|
7399
|
+
}
|
|
7400
|
+
|
|
7401
|
+
/**
|
|
7402
|
+
* Returns HTML for the snowflake layout.
|
|
7403
|
+
* @private
|
|
7404
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the snowflake layout.
|
|
7405
|
+
*/
|
|
7406
|
+
renderLayoutSnowflake() {
|
|
7407
|
+
const placeholderClass = {
|
|
7408
|
+
hidden: this.value,
|
|
7409
|
+
};
|
|
7410
|
+
|
|
7411
|
+
const displayValueClasses = {
|
|
7412
|
+
'displayValue': true,
|
|
7413
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7414
|
+
'hasFocus': this.isPopoverVisible,
|
|
7415
|
+
'withValue': this.value && this.value.length > 0,
|
|
7416
|
+
'force': this.forceDisplayValue,
|
|
7417
|
+
};
|
|
7418
|
+
|
|
7419
|
+
const valueContainerClasses = {
|
|
7420
|
+
'valueContainer': true,
|
|
7421
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7422
|
+
};
|
|
7423
|
+
|
|
7424
|
+
return u`
|
|
7425
|
+
<div
|
|
7426
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7427
|
+
part="wrapper">
|
|
7428
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7429
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7430
|
+
</div>
|
|
7431
|
+
<${this.dropdownTag}
|
|
7432
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7433
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7434
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7435
|
+
?noFlip="${this.noFlip}"
|
|
7436
|
+
?onDark="${this.onDark}"
|
|
7437
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7438
|
+
.offset="${this.offset}"
|
|
7439
|
+
.placement="${this.placement}"
|
|
7440
|
+
chevron
|
|
7441
|
+
fluid
|
|
7442
|
+
for="selectMenu"
|
|
7443
|
+
layout="${this.layout}"
|
|
7444
|
+
part="dropdown"
|
|
7445
|
+
shape="${this.shape}"
|
|
7446
|
+
size="${this.size}">
|
|
7447
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7448
|
+
<div class="accents left">
|
|
7449
|
+
<slot name="typeIcon"></slot>
|
|
7450
|
+
</div>
|
|
7451
|
+
<div class="mainContent">
|
|
7452
|
+
<div class="${e(valueContainerClasses)}">
|
|
7453
|
+
<label>
|
|
7454
|
+
<slot name="label"></slot>
|
|
7455
|
+
</label>
|
|
7456
|
+
<div class="value" id="value"></div>
|
|
7457
|
+
${this.value ? undefined : u`
|
|
7458
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
7459
|
+
<slot name="placeholder"></slot>
|
|
7460
|
+
</div>
|
|
7461
|
+
`}
|
|
7462
|
+
</div>
|
|
7463
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7464
|
+
<slot name="displayValue"></slot>
|
|
7465
|
+
</div>
|
|
7466
|
+
</div>
|
|
7467
|
+
<div class="accents right"></div>
|
|
7468
|
+
</div>
|
|
7469
|
+
<div class="menuWrapper"></div>
|
|
7470
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7471
|
+
<slot></slot>
|
|
7472
|
+
</${this.bibtemplateTag}>
|
|
7473
|
+
<div slot="helpText">
|
|
7474
|
+
${this.renderHtmlHelpText()}
|
|
7475
|
+
</div>
|
|
7476
|
+
</${this.dropdownTag}>
|
|
7477
|
+
</div>
|
|
7478
|
+
`;
|
|
7479
|
+
}
|
|
7480
|
+
|
|
7481
|
+
/**
|
|
7482
|
+
* Returns HTML for the classic layout.
|
|
7483
|
+
* @private
|
|
7484
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7485
|
+
*/
|
|
7486
|
+
renderLayoutClassic() {
|
|
7487
|
+
return u`
|
|
7488
|
+
<div
|
|
7489
|
+
class="${e(this.commonWrapperClasses)} thin"
|
|
7490
|
+
part="wrapper">
|
|
7491
|
+
classic
|
|
7492
|
+
</div>
|
|
7493
|
+
`;
|
|
7494
|
+
}
|
|
7495
|
+
|
|
7496
|
+
/**
|
|
7497
|
+
* Logic to determine the layout of the component.
|
|
7498
|
+
* @private
|
|
7499
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
7500
|
+
* @returns {void}
|
|
7501
|
+
*/
|
|
7502
|
+
renderLayout(ForcedLayout) {
|
|
7503
|
+
const layout = ForcedLayout || this.layout;
|
|
7504
|
+
|
|
7505
|
+
switch (layout) {
|
|
7506
|
+
case 'emphasized':
|
|
7507
|
+
return this.renderLayoutEmphasized();
|
|
7508
|
+
case 'emphasized-left':
|
|
7509
|
+
return this.renderLayoutEmphasized();
|
|
7510
|
+
case 'emphasized-right':
|
|
7511
|
+
return this.renderLayoutEmphasized();
|
|
7512
|
+
case 'snowflake':
|
|
7513
|
+
return this.renderLayoutSnowflake();
|
|
7514
|
+
case 'snowflake-left':
|
|
7515
|
+
return this.renderLayoutSnowflake();
|
|
7516
|
+
case 'snowflake-right':
|
|
7517
|
+
return this.renderLayoutSnowflake();
|
|
7518
|
+
default:
|
|
7519
|
+
return this.renderLayoutClassic();
|
|
7520
|
+
}
|
|
7521
|
+
}
|
|
7522
|
+
|
|
6617
7523
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6618
7524
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6619
7525
|
|
|
6620
7526
|
// function that renders the HTML and CSS into the scope of the component
|
|
6621
|
-
|
|
7527
|
+
renderBACKUP() {
|
|
6622
7528
|
const placeholderClass = {
|
|
6623
7529
|
hidden: this.value,
|
|
6624
7530
|
};
|
|
@@ -6644,19 +7550,22 @@ class AuroSelect extends i$2 {
|
|
|
6644
7550
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
6645
7551
|
</div>
|
|
6646
7552
|
<${this.dropdownTag}
|
|
6647
|
-
|
|
7553
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7554
|
+
?disabled="${this.disabled}"
|
|
6648
7555
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7556
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7557
|
+
?noFlip="${this.noFlip}"
|
|
6649
7558
|
?onDark="${this.onDark}"
|
|
6650
|
-
common
|
|
6651
|
-
fluid
|
|
6652
7559
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
6653
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
6654
|
-
chevron
|
|
6655
|
-
.placement="${this.placement}"
|
|
6656
7560
|
.offset="${this.offset}"
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
7561
|
+
.placement="${this.placement}"
|
|
7562
|
+
chevron
|
|
7563
|
+
fluid
|
|
7564
|
+
for="selectMenu"
|
|
7565
|
+
layout="${this.layout}"
|
|
7566
|
+
part="dropdown"
|
|
7567
|
+
shape="${this.shape}"
|
|
7568
|
+
size="${this.size}">
|
|
6660
7569
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6661
7570
|
<span id="placeholder"
|
|
6662
7571
|
class="${e(placeholderClass)}"
|
|
@@ -6667,10 +7576,8 @@ class AuroSelect extends i$2 {
|
|
|
6667
7576
|
<slot name="valueText" id="valueText"></slot>
|
|
6668
7577
|
</span>
|
|
6669
7578
|
|
|
6670
|
-
<div class="menuWrapper">
|
|
6671
|
-
</div>
|
|
6672
|
-
|
|
6673
7579
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7580
|
+
<slot></slot>
|
|
6674
7581
|
</${this.bibtemplateTag}>
|
|
6675
7582
|
<slot name="label" slot="label"></slot>
|
|
6676
7583
|
<p slot="helpText">
|
|
@@ -6710,6 +7617,7 @@ class AuroSelect extends i$2 {
|
|
|
6710
7617
|
</select>
|
|
6711
7618
|
</div>
|
|
6712
7619
|
<!-- Help text and error message template -->
|
|
7620
|
+
${this.renderHtmlHelpText()}
|
|
6713
7621
|
</div>
|
|
6714
7622
|
`;
|
|
6715
7623
|
}
|
|
@@ -6905,7 +7813,7 @@ class AuroMenu extends i$2 {
|
|
|
6905
7813
|
*
|
|
6906
7814
|
*/
|
|
6907
7815
|
static register(name = "auro-menu") {
|
|
6908
|
-
AuroLibraryRuntimeUtils$
|
|
7816
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenu);
|
|
6909
7817
|
}
|
|
6910
7818
|
|
|
6911
7819
|
// Lifecycle Methods
|
|
@@ -6929,7 +7837,7 @@ class AuroMenu extends i$2 {
|
|
|
6929
7837
|
}
|
|
6930
7838
|
|
|
6931
7839
|
firstUpdated() {
|
|
6932
|
-
AuroLibraryRuntimeUtils$
|
|
7840
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
6933
7841
|
|
|
6934
7842
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
6935
7843
|
this.initializeMenu();
|
|
@@ -7638,6 +8546,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
7638
8546
|
|
|
7639
8547
|
var colorCss = 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)}`;
|
|
7640
8548
|
|
|
8549
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8550
|
+
// See LICENSE in the project root for license information.
|
|
8551
|
+
|
|
8552
|
+
// ---------------------------------------------------------------------
|
|
8553
|
+
|
|
8554
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8555
|
+
|
|
8556
|
+
class AuroLibraryRuntimeUtils {
|
|
8557
|
+
|
|
8558
|
+
/* eslint-disable jsdoc/require-param */
|
|
8559
|
+
|
|
8560
|
+
/**
|
|
8561
|
+
* This will register a new custom element with the browser.
|
|
8562
|
+
* @param {String} name - The name of the custom element.
|
|
8563
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
8564
|
+
* @returns {void}
|
|
8565
|
+
*/
|
|
8566
|
+
registerComponent(name, componentClass) {
|
|
8567
|
+
if (!customElements.get(name)) {
|
|
8568
|
+
customElements.define(name, class extends componentClass {});
|
|
8569
|
+
}
|
|
8570
|
+
}
|
|
8571
|
+
|
|
8572
|
+
/**
|
|
8573
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
8574
|
+
* @returns {void}
|
|
8575
|
+
*/
|
|
8576
|
+
closestElement(
|
|
8577
|
+
selector, // selector like in .closest()
|
|
8578
|
+
base = this, // extra functionality to skip a parent
|
|
8579
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8580
|
+
!el || el === document || el === window
|
|
8581
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
8582
|
+
: found
|
|
8583
|
+
? found // found a selector INside this element
|
|
8584
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8585
|
+
) {
|
|
8586
|
+
return __Closest(base);
|
|
8587
|
+
}
|
|
8588
|
+
/* eslint-enable jsdoc/require-param */
|
|
8589
|
+
|
|
8590
|
+
/**
|
|
8591
|
+
* 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.
|
|
8592
|
+
* @param {Object} elem - The element to check.
|
|
8593
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8594
|
+
* @returns {void}
|
|
8595
|
+
*/
|
|
8596
|
+
handleComponentTagRename(elem, tagName) {
|
|
8597
|
+
const tag = tagName.toLowerCase();
|
|
8598
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8599
|
+
|
|
8600
|
+
if (elemTag !== tag) {
|
|
8601
|
+
elem.setAttribute(tag, true);
|
|
8602
|
+
}
|
|
8603
|
+
}
|
|
8604
|
+
|
|
8605
|
+
/**
|
|
8606
|
+
* Validates if an element is a specific Auro component.
|
|
8607
|
+
* @param {Object} elem - The element to validate.
|
|
8608
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
8609
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8610
|
+
*/
|
|
8611
|
+
elementMatch(elem, tagName) {
|
|
8612
|
+
const tag = tagName.toLowerCase();
|
|
8613
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8614
|
+
|
|
8615
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
8616
|
+
}
|
|
8617
|
+
}
|
|
8618
|
+
|
|
7641
8619
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7642
8620
|
// See LICENSE in the project root for license information.
|
|
7643
8621
|
|
|
@@ -7657,7 +8635,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7657
8635
|
*/
|
|
7658
8636
|
privateDefaults() {
|
|
7659
8637
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
7660
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
8638
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
7661
8639
|
}
|
|
7662
8640
|
|
|
7663
8641
|
// function to define props used within the scope of this component
|
|
@@ -7739,7 +8717,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7739
8717
|
*
|
|
7740
8718
|
*/
|
|
7741
8719
|
static register(name = "auro-icon") {
|
|
7742
|
-
AuroLibraryRuntimeUtils
|
|
8720
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
7743
8721
|
}
|
|
7744
8722
|
|
|
7745
8723
|
connectedCallback() {
|
|
@@ -7845,7 +8823,7 @@ class AuroMenuOption extends i$2 {
|
|
|
7845
8823
|
/**
|
|
7846
8824
|
* @private
|
|
7847
8825
|
*/
|
|
7848
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
8826
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
7849
8827
|
}
|
|
7850
8828
|
|
|
7851
8829
|
static get properties() {
|
|
@@ -7889,7 +8867,7 @@ class AuroMenuOption extends i$2 {
|
|
|
7889
8867
|
*
|
|
7890
8868
|
*/
|
|
7891
8869
|
static register(name = "auro-menuoption") {
|
|
7892
|
-
AuroLibraryRuntimeUtils$
|
|
8870
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenuOption);
|
|
7893
8871
|
}
|
|
7894
8872
|
|
|
7895
8873
|
firstUpdated() {
|