@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
|
@@ -44,6 +44,102 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});let i$1 = cl
|
|
|
44
44
|
*/
|
|
45
45
|
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);
|
|
46
46
|
|
|
47
|
+
let AuroElement$3 = class AuroElement extends i$2 {
|
|
48
|
+
static get properties() {
|
|
49
|
+
return {
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Defines the language of an element.
|
|
53
|
+
* @default {'default'}
|
|
54
|
+
*/
|
|
55
|
+
layout: {
|
|
56
|
+
type: String,
|
|
57
|
+
attribute: "layout",
|
|
58
|
+
reflect: true
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
shape: {
|
|
62
|
+
type: String,
|
|
63
|
+
attribute: "shape",
|
|
64
|
+
reflect: true
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
size: {
|
|
68
|
+
type: String,
|
|
69
|
+
attribute: "size",
|
|
70
|
+
reflect: true
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
onDark: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
attribute: "ondark",
|
|
76
|
+
reflect: true
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
resetShapeClasses() {
|
|
82
|
+
if (this.shape && this.size) {
|
|
83
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
84
|
+
|
|
85
|
+
if (wrapper) {
|
|
86
|
+
wrapper.classList.forEach((className) => {
|
|
87
|
+
if (className.startsWith('shape-')) {
|
|
88
|
+
wrapper.classList.remove(className);
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
resetLayoutClasses() {
|
|
98
|
+
if (this.layout) {
|
|
99
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
100
|
+
|
|
101
|
+
if (wrapper) {
|
|
102
|
+
wrapper.classList.forEach((className) => {
|
|
103
|
+
if (className.startsWith('layout-')) {
|
|
104
|
+
wrapper.classList.remove(className);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
updateComponentArchitecture() {
|
|
114
|
+
this.resetLayoutClasses();
|
|
115
|
+
this.resetShapeClasses();
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
updated(changedProperties) {
|
|
119
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
120
|
+
this.updateComponentArchitecture();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
125
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
126
|
+
render() {
|
|
127
|
+
try {
|
|
128
|
+
return this.renderLayout();
|
|
129
|
+
} catch (error) {
|
|
130
|
+
// failed to get the defined layout
|
|
131
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
132
|
+
|
|
133
|
+
// fallback to the default layout
|
|
134
|
+
return this.getLayout('default');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
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}`;
|
|
140
|
+
|
|
141
|
+
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}`;
|
|
142
|
+
|
|
47
143
|
class DateFormatter {
|
|
48
144
|
|
|
49
145
|
constructor() {
|
|
@@ -100,9 +196,10 @@ class DateFormatter {
|
|
|
100
196
|
/**
|
|
101
197
|
* Convert a date object to string format.
|
|
102
198
|
* @param {Object} date - Date to convert to string.
|
|
103
|
-
* @
|
|
199
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
200
|
+
* @returns {String} Returns the date as a string.
|
|
104
201
|
*/
|
|
105
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
202
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
106
203
|
year: "numeric",
|
|
107
204
|
month: "2-digit",
|
|
108
205
|
day: "2-digit",
|
|
@@ -294,7 +391,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
294
391
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
295
392
|
|
|
296
393
|
// Get the date string of the date object we created from the string date
|
|
297
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
394
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
298
395
|
|
|
299
396
|
// Guard Clause: Generated date matches date string input
|
|
300
397
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -459,7 +556,7 @@ const {
|
|
|
459
556
|
|
|
460
557
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
461
558
|
|
|
462
|
-
let AuroLibraryRuntimeUtils$
|
|
559
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
463
560
|
|
|
464
561
|
/* eslint-disable jsdoc/require-param */
|
|
465
562
|
|
|
@@ -529,7 +626,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
529
626
|
class AuroFormValidation {
|
|
530
627
|
|
|
531
628
|
constructor() {
|
|
532
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
629
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
533
630
|
}
|
|
534
631
|
|
|
535
632
|
/**
|
|
@@ -941,7 +1038,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
941
1038
|
|
|
942
1039
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
943
1040
|
|
|
944
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
1041
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
945
1042
|
|
|
946
1043
|
/* eslint-disable jsdoc/require-param */
|
|
947
1044
|
|
|
@@ -1524,10 +1621,11 @@ const flip$1 = function (options) {
|
|
|
1524
1621
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1525
1622
|
const nextPlacement = placements[nextIndex];
|
|
1526
1623
|
if (nextPlacement) {
|
|
1527
|
-
var _overflowsData$;
|
|
1528
1624
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1529
|
-
|
|
1530
|
-
if
|
|
1625
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1626
|
+
// We leave the current main axis only if every placement on that axis
|
|
1627
|
+
// overflows the main axis.
|
|
1628
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
1531
1629
|
// Try next placement and re-run the lifecycle.
|
|
1532
1630
|
return {
|
|
1533
1631
|
data: {
|
|
@@ -2548,8 +2646,28 @@ class AuroFloatingUI {
|
|
|
2548
2646
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
2549
2647
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
2550
2648
|
|
|
2649
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
2650
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
2651
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2652
|
+
}
|
|
2551
2653
|
const mouseEventGlobalHandler = (event) => {
|
|
2552
|
-
|
|
2654
|
+
const isPressed = event.type === 'mousedown';
|
|
2655
|
+
if (isPressed) {
|
|
2656
|
+
// Clear any pending timeout to prevent race condition
|
|
2657
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
2658
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
2659
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2660
|
+
}
|
|
2661
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
2662
|
+
AuroFloatingUI.isMousePressed = true;
|
|
2663
|
+
}
|
|
2664
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
2665
|
+
// Schedule reset and track timeout ID
|
|
2666
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
2667
|
+
AuroFloatingUI.isMousePressed = false;
|
|
2668
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2669
|
+
}, 0);
|
|
2670
|
+
}
|
|
2553
2671
|
};
|
|
2554
2672
|
|
|
2555
2673
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -2676,6 +2794,7 @@ class AuroFloatingUI {
|
|
|
2676
2794
|
|
|
2677
2795
|
// Compute the position of the bib
|
|
2678
2796
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2797
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
2679
2798
|
placement: this.element.floaterConfig?.placement,
|
|
2680
2799
|
middleware: middleware || []
|
|
2681
2800
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -2810,8 +2929,9 @@ class AuroFloatingUI {
|
|
|
2810
2929
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2811
2930
|
return;
|
|
2812
2931
|
}
|
|
2813
|
-
|
|
2814
|
-
if
|
|
2932
|
+
|
|
2933
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
2934
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2815
2935
|
return;
|
|
2816
2936
|
}
|
|
2817
2937
|
|
|
@@ -3112,8 +3232,6 @@ class AuroFloatingUI {
|
|
|
3112
3232
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
3113
3233
|
}
|
|
3114
3234
|
|
|
3115
|
-
document.body.append(this.element.bib);
|
|
3116
|
-
|
|
3117
3235
|
this.regenerateBibId();
|
|
3118
3236
|
this.handleTriggerTabIndex();
|
|
3119
3237
|
|
|
@@ -3344,6 +3462,76 @@ var tokensCss$2$1 = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon
|
|
|
3344
3462
|
|
|
3345
3463
|
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)}`;
|
|
3346
3464
|
|
|
3465
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3466
|
+
// See LICENSE in the project root for license information.
|
|
3467
|
+
|
|
3468
|
+
// ---------------------------------------------------------------------
|
|
3469
|
+
|
|
3470
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3471
|
+
|
|
3472
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
3473
|
+
|
|
3474
|
+
/* eslint-disable jsdoc/require-param */
|
|
3475
|
+
|
|
3476
|
+
/**
|
|
3477
|
+
* This will register a new custom element with the browser.
|
|
3478
|
+
* @param {String} name - The name of the custom element.
|
|
3479
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3480
|
+
* @returns {void}
|
|
3481
|
+
*/
|
|
3482
|
+
registerComponent(name, componentClass) {
|
|
3483
|
+
if (!customElements.get(name)) {
|
|
3484
|
+
customElements.define(name, class extends componentClass {});
|
|
3485
|
+
}
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
/**
|
|
3489
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3490
|
+
* @returns {void}
|
|
3491
|
+
*/
|
|
3492
|
+
closestElement(
|
|
3493
|
+
selector, // selector like in .closest()
|
|
3494
|
+
base = this, // extra functionality to skip a parent
|
|
3495
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3496
|
+
!el || el === document || el === window
|
|
3497
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3498
|
+
: found
|
|
3499
|
+
? found // found a selector INside this element
|
|
3500
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3501
|
+
) {
|
|
3502
|
+
return __Closest(base);
|
|
3503
|
+
}
|
|
3504
|
+
/* eslint-enable jsdoc/require-param */
|
|
3505
|
+
|
|
3506
|
+
/**
|
|
3507
|
+
* 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.
|
|
3508
|
+
* @param {Object} elem - The element to check.
|
|
3509
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3510
|
+
* @returns {void}
|
|
3511
|
+
*/
|
|
3512
|
+
handleComponentTagRename(elem, tagName) {
|
|
3513
|
+
const tag = tagName.toLowerCase();
|
|
3514
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3515
|
+
|
|
3516
|
+
if (elemTag !== tag) {
|
|
3517
|
+
elem.setAttribute(tag, true);
|
|
3518
|
+
}
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
/**
|
|
3522
|
+
* Validates if an element is a specific Auro component.
|
|
3523
|
+
* @param {Object} elem - The element to validate.
|
|
3524
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3525
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3526
|
+
*/
|
|
3527
|
+
elementMatch(elem, tagName) {
|
|
3528
|
+
const tag = tagName.toLowerCase();
|
|
3529
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3530
|
+
|
|
3531
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3532
|
+
}
|
|
3533
|
+
};
|
|
3534
|
+
|
|
3347
3535
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3348
3536
|
// See LICENSE in the project root for license information.
|
|
3349
3537
|
|
|
@@ -3363,7 +3551,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3363
3551
|
*/
|
|
3364
3552
|
privateDefaults() {
|
|
3365
3553
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3366
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
3554
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$2();
|
|
3367
3555
|
}
|
|
3368
3556
|
|
|
3369
3557
|
// function to define props used within the scope of this component
|
|
@@ -3445,7 +3633,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3445
3633
|
*
|
|
3446
3634
|
*/
|
|
3447
3635
|
static register(name = "auro-icon") {
|
|
3448
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
3636
|
+
AuroLibraryRuntimeUtils$1$2.prototype.registerComponent(name, AuroIcon);
|
|
3449
3637
|
}
|
|
3450
3638
|
|
|
3451
3639
|
connectedCallback() {
|
|
@@ -3513,7 +3701,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3513
3701
|
|
|
3514
3702
|
var iconVersion$2 = '6.1.2';
|
|
3515
3703
|
|
|
3516
|
-
var styleCss$1$2 = i$5`:host{position:
|
|
3704
|
+
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}`;
|
|
3517
3705
|
|
|
3518
3706
|
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)}`;
|
|
3519
3707
|
|
|
@@ -3523,7 +3711,6 @@ var tokensCss$1$1 = i$5`:host(:not([ondark])){--ds-auro-dropdown-label-text-colo
|
|
|
3523
3711
|
// See LICENSE in the project root for license information.
|
|
3524
3712
|
|
|
3525
3713
|
|
|
3526
|
-
|
|
3527
3714
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
3528
3715
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
3529
3716
|
'xl',
|
|
@@ -3548,7 +3735,7 @@ class AuroDropdownBib extends i$2 {
|
|
|
3548
3735
|
*/
|
|
3549
3736
|
this._mobileBreakpointValue = undefined;
|
|
3550
3737
|
|
|
3551
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3738
|
+
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3552
3739
|
}
|
|
3553
3740
|
|
|
3554
3741
|
static get styles() {
|
|
@@ -3593,6 +3780,13 @@ class AuroDropdownBib extends i$2 {
|
|
|
3593
3780
|
type: Boolean,
|
|
3594
3781
|
reflect: true
|
|
3595
3782
|
},
|
|
3783
|
+
|
|
3784
|
+
/**
|
|
3785
|
+
* A reference to the associated bib template element.
|
|
3786
|
+
*/
|
|
3787
|
+
bibTemplate: {
|
|
3788
|
+
type: Object
|
|
3789
|
+
}
|
|
3596
3790
|
};
|
|
3597
3791
|
}
|
|
3598
3792
|
|
|
@@ -3625,9 +3819,50 @@ class AuroDropdownBib extends i$2 {
|
|
|
3625
3819
|
}
|
|
3626
3820
|
}
|
|
3627
3821
|
});
|
|
3822
|
+
|
|
3823
|
+
if (this.bibTemplate) {
|
|
3824
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3825
|
+
if (this.isFullscreen) {
|
|
3826
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3827
|
+
} else {
|
|
3828
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
3829
|
+
}
|
|
3830
|
+
}
|
|
3628
3831
|
}
|
|
3629
3832
|
}
|
|
3630
3833
|
|
|
3834
|
+
connectedCallback() {
|
|
3835
|
+
super.connectedCallback();
|
|
3836
|
+
|
|
3837
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3838
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3839
|
+
const bibTemplate = event.detail.element;
|
|
3840
|
+
this.bibTemplate = bibTemplate;
|
|
3841
|
+
|
|
3842
|
+
if (bibTemplate) {
|
|
3843
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3844
|
+
if (this.isFullscreen) {
|
|
3845
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3846
|
+
} else {
|
|
3847
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
3848
|
+
}
|
|
3849
|
+
}
|
|
3850
|
+
});
|
|
3851
|
+
}
|
|
3852
|
+
|
|
3853
|
+
firstUpdated(changedProperties) {
|
|
3854
|
+
super.firstUpdated(changedProperties);
|
|
3855
|
+
|
|
3856
|
+
// Dispatch a custom event when the component is connected
|
|
3857
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
3858
|
+
bubbles: true,
|
|
3859
|
+
composed: true,
|
|
3860
|
+
detail: {
|
|
3861
|
+
element: this
|
|
3862
|
+
}
|
|
3863
|
+
}));
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3631
3866
|
// function that renders the HTML and CSS into the scope of the component
|
|
3632
3867
|
render() {
|
|
3633
3868
|
return u`
|
|
@@ -3640,7 +3875,7 @@ class AuroDropdownBib extends i$2 {
|
|
|
3640
3875
|
|
|
3641
3876
|
var dropdownVersion$1 = '3.0.0';
|
|
3642
3877
|
|
|
3643
|
-
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:
|
|
3878
|
+
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}`;
|
|
3644
3879
|
|
|
3645
3880
|
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)}`;
|
|
3646
3881
|
|
|
@@ -3648,15 +3883,15 @@ var classicColorCss = i$5`:host([layout*=classic]) .label{color:var(--ds-auro-dr
|
|
|
3648
3883
|
|
|
3649
3884
|
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)}`;
|
|
3650
3885
|
|
|
3651
|
-
var styleEmphasizedCss = i$5`:host{display:block}.wrapper{display:flex;flex-direction:
|
|
3886
|
+
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))}`;
|
|
3652
3887
|
|
|
3653
|
-
var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex-direction:
|
|
3888
|
+
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)}`;
|
|
3654
3889
|
|
|
3655
|
-
var colorCss$
|
|
3890
|
+
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)}`;
|
|
3656
3891
|
|
|
3657
|
-
var styleCss$
|
|
3892
|
+
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}`;
|
|
3658
3893
|
|
|
3659
|
-
var tokensCss$
|
|
3894
|
+
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3660
3895
|
|
|
3661
3896
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3662
3897
|
// See LICENSE in the project root for license information.
|
|
@@ -3665,7 +3900,7 @@ var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3665
3900
|
|
|
3666
3901
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3667
3902
|
|
|
3668
|
-
let AuroLibraryRuntimeUtils$
|
|
3903
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
3669
3904
|
|
|
3670
3905
|
/* eslint-disable jsdoc/require-param */
|
|
3671
3906
|
|
|
@@ -3737,7 +3972,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
3737
3972
|
*
|
|
3738
3973
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
3739
3974
|
*/
|
|
3740
|
-
class AuroHelpText extends i$2 {
|
|
3975
|
+
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
3741
3976
|
|
|
3742
3977
|
constructor() {
|
|
3743
3978
|
super();
|
|
@@ -3746,14 +3981,14 @@ class AuroHelpText extends i$2 {
|
|
|
3746
3981
|
this.onDark = false;
|
|
3747
3982
|
this.hasTextContent = false;
|
|
3748
3983
|
|
|
3749
|
-
AuroLibraryRuntimeUtils$
|
|
3984
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3750
3985
|
}
|
|
3751
3986
|
|
|
3752
3987
|
static get styles() {
|
|
3753
3988
|
return [
|
|
3754
|
-
colorCss$
|
|
3755
|
-
styleCss$
|
|
3756
|
-
tokensCss$
|
|
3989
|
+
colorCss$5,
|
|
3990
|
+
styleCss$6,
|
|
3991
|
+
tokensCss$4
|
|
3757
3992
|
];
|
|
3758
3993
|
}
|
|
3759
3994
|
|
|
@@ -3802,7 +4037,7 @@ class AuroHelpText extends i$2 {
|
|
|
3802
4037
|
*
|
|
3803
4038
|
*/
|
|
3804
4039
|
static register(name = "auro-helptext") {
|
|
3805
|
-
AuroLibraryRuntimeUtils$
|
|
4040
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
3806
4041
|
}
|
|
3807
4042
|
|
|
3808
4043
|
updated() {
|
|
@@ -3856,9 +4091,9 @@ class AuroHelpText extends i$2 {
|
|
|
3856
4091
|
</div>
|
|
3857
4092
|
`;
|
|
3858
4093
|
}
|
|
3859
|
-
}
|
|
4094
|
+
};
|
|
3860
4095
|
|
|
3861
|
-
var helpTextVersion = '1.0.0';
|
|
4096
|
+
var helpTextVersion$1 = '1.0.0';
|
|
3862
4097
|
|
|
3863
4098
|
let AuroElement$2 = class AuroElement extends i$2 {
|
|
3864
4099
|
static get properties() {
|
|
@@ -3984,6 +4219,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
3984
4219
|
this.layout = 'classic';
|
|
3985
4220
|
this.shape = 'rounded';
|
|
3986
4221
|
this.size = 'xl';
|
|
4222
|
+
this.parentBorder = false;
|
|
3987
4223
|
|
|
3988
4224
|
this.privateDefaults();
|
|
3989
4225
|
}
|
|
@@ -3999,7 +4235,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
3999
4235
|
'trigger': true,
|
|
4000
4236
|
'wrapper': true,
|
|
4001
4237
|
'hasFocus': this.hasFocus,
|
|
4002
|
-
'simple': this.simple
|
|
4238
|
+
'simple': this.simple,
|
|
4239
|
+
'parentBorder': this.parentBorder
|
|
4003
4240
|
};
|
|
4004
4241
|
}
|
|
4005
4242
|
|
|
@@ -4051,7 +4288,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4051
4288
|
/**
|
|
4052
4289
|
* @private
|
|
4053
4290
|
*/
|
|
4054
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4291
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
4055
4292
|
|
|
4056
4293
|
/**
|
|
4057
4294
|
* @private
|
|
@@ -4076,7 +4313,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4076
4313
|
/**
|
|
4077
4314
|
* @private
|
|
4078
4315
|
*/
|
|
4079
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4316
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion$1, AuroHelpText$1);
|
|
4080
4317
|
|
|
4081
4318
|
/**
|
|
4082
4319
|
* @private
|
|
@@ -4266,6 +4503,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4266
4503
|
reflect: true
|
|
4267
4504
|
},
|
|
4268
4505
|
|
|
4506
|
+
/**
|
|
4507
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4508
|
+
* @private
|
|
4509
|
+
*/
|
|
4510
|
+
parentBorder: {
|
|
4511
|
+
type: Boolean,
|
|
4512
|
+
reflect: true
|
|
4513
|
+
},
|
|
4514
|
+
|
|
4269
4515
|
/**
|
|
4270
4516
|
* If declared, the popover and trigger will be set to the same width.
|
|
4271
4517
|
*/
|
|
@@ -4393,7 +4639,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4393
4639
|
*
|
|
4394
4640
|
*/
|
|
4395
4641
|
static register(name = "auro-dropdown") {
|
|
4396
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
4642
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
|
|
4397
4643
|
}
|
|
4398
4644
|
|
|
4399
4645
|
/**
|
|
@@ -4729,8 +4975,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4729
4975
|
* @param {Event} event - The event object representing the slot change.
|
|
4730
4976
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4731
4977
|
*/
|
|
4732
|
-
handleDefaultSlot(
|
|
4733
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
4978
|
+
handleDefaultSlot() {
|
|
4734
4979
|
|
|
4735
4980
|
if (this.onSlotChange) {
|
|
4736
4981
|
this.onSlotChange();
|
|
@@ -4792,6 +5037,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4792
5037
|
${this.chevron || this.common ? u`
|
|
4793
5038
|
<div
|
|
4794
5039
|
id="showStateIcon"
|
|
5040
|
+
class="chevron"
|
|
4795
5041
|
part="chevron">
|
|
4796
5042
|
<${this.iconTag}
|
|
4797
5043
|
category="interface"
|
|
@@ -4806,9 +5052,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4806
5052
|
<div class="${e(helpTextClasses)}">
|
|
4807
5053
|
<slot name="helpText"></slot>
|
|
4808
5054
|
</div>
|
|
4809
|
-
<div class="slotContent">
|
|
4810
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4811
|
-
</div>
|
|
4812
5055
|
<div id="bibSizer" part="size"></div>
|
|
4813
5056
|
<${this.dropdownBibTag}
|
|
4814
5057
|
id="bib"
|
|
@@ -4817,6 +5060,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4817
5060
|
?common="${this.common}"
|
|
4818
5061
|
?rounded="${this.common || this.rounded}"
|
|
4819
5062
|
?inset="${this.common || this.inset}">
|
|
5063
|
+
<div class="slotContent">
|
|
5064
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5065
|
+
</div>
|
|
4820
5066
|
</${this.dropdownBibTag}>
|
|
4821
5067
|
</div>
|
|
4822
5068
|
`;
|
|
@@ -4828,108 +5074,104 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4828
5074
|
* @returns {html} - Returns HTML for the classic layout.
|
|
4829
5075
|
*/
|
|
4830
5076
|
renderLayoutClassic() {
|
|
4831
|
-
const helpTextClasses = {
|
|
4832
|
-
'helpText': true,
|
|
4833
|
-
'leftIndent': false,
|
|
4834
|
-
'rightIndent': false
|
|
4835
|
-
};
|
|
4836
|
-
|
|
4837
|
-
return u`
|
|
4838
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
4839
|
-
`;
|
|
4840
|
-
// return html`
|
|
4841
|
-
// <div>
|
|
4842
|
-
// <div
|
|
4843
|
-
// id="trigger"
|
|
4844
|
-
// class="trigger"
|
|
4845
|
-
// part="trigger"
|
|
4846
|
-
// tabindex="${this.tabIndex}"
|
|
4847
|
-
// ?showBorder="${this.showTriggerBorders}"
|
|
4848
|
-
// role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4849
|
-
// aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4850
|
-
// aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
4851
|
-
// aria-labelledby="${ifDefined(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
4852
|
-
// >
|
|
4853
|
-
// <div class="triggerContentWrapper">
|
|
4854
|
-
// <label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
4855
|
-
// <slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
4856
|
-
// </label>
|
|
4857
|
-
// <div class="triggerContent">
|
|
4858
|
-
// <slot
|
|
4859
|
-
// name="trigger"
|
|
4860
|
-
// @slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
4861
|
-
// </div>
|
|
4862
|
-
// </div>
|
|
4863
|
-
// ${this.chevron || this.common ? html`
|
|
4864
|
-
// <div
|
|
4865
|
-
// id="showStateIcon"
|
|
4866
|
-
// part="chevron">
|
|
4867
|
-
// <${this.iconTag}
|
|
4868
|
-
// category="interface"
|
|
4869
|
-
// name="chevron-down"
|
|
4870
|
-
// ?onDark="${this.onDark}"
|
|
4871
|
-
// variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
4872
|
-
// >
|
|
4873
|
-
// </${this.iconTag}>
|
|
4874
|
-
// </div>
|
|
4875
|
-
// ` : undefined }
|
|
4876
|
-
// </div>
|
|
4877
|
-
// <div class="slotContent">
|
|
4878
|
-
// <slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4879
|
-
// </div>
|
|
4880
|
-
// <div id="bibSizer" part="size"></div>
|
|
4881
|
-
// <${this.dropdownBibTag}
|
|
4882
|
-
// id="bib"
|
|
4883
|
-
// ?data-show="${this.isPopoverVisible}"
|
|
4884
|
-
// ?isfullscreen="${this.isBibFullscreen}"
|
|
4885
|
-
// ?common="${this.common}"
|
|
4886
|
-
// ?rounded="${this.common || this.rounded}"
|
|
4887
|
-
// ?inset="${this.common || this.inset}"
|
|
4888
|
-
// >
|
|
4889
|
-
// </${this.dropdownBibTag}>
|
|
4890
|
-
// </div>
|
|
4891
|
-
// `;
|
|
4892
|
-
}
|
|
4893
|
-
|
|
4894
|
-
/**
|
|
4895
|
-
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
4896
|
-
* @private
|
|
4897
|
-
* @returns {html} - Returns HTML for the snowflake layout.
|
|
4898
|
-
*/
|
|
4899
|
-
renderLayoutSnowflake() {
|
|
4900
|
-
const helpTextClasses = {
|
|
4901
|
-
'helpText': true,
|
|
4902
|
-
'leftIndent': true,
|
|
4903
|
-
'rightIndent': true
|
|
4904
|
-
};
|
|
4905
|
-
|
|
4906
|
-
return u`
|
|
4907
|
-
${this.renderBasicHtml(helpTextClasses)}
|
|
4908
|
-
`;
|
|
4909
|
-
}
|
|
4910
|
-
|
|
4911
|
-
/**
|
|
4912
|
-
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
4913
|
-
* @private
|
|
4914
|
-
* @returns {html} - Returns HTML for the emphasized layout.
|
|
4915
|
-
*/
|
|
4916
|
-
renderLayoutEmphasized() {
|
|
4917
|
-
const helpTextClasses = {
|
|
4918
|
-
'helpText': true,
|
|
4919
|
-
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
4920
|
-
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
4921
|
-
};
|
|
4922
5077
|
|
|
4923
5078
|
return u`
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
5079
|
+
<div>
|
|
5080
|
+
<div
|
|
5081
|
+
id="trigger"
|
|
5082
|
+
class="trigger"
|
|
5083
|
+
part="trigger"
|
|
5084
|
+
tabindex="${this.tabIndex}"
|
|
5085
|
+
?showBorder="${this.showTriggerBorders}"
|
|
5086
|
+
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
5087
|
+
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
5088
|
+
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
5089
|
+
aria-labelledby="${o(this.triggerContentFocusable ? undefined : 'triggerLabel')}"
|
|
5090
|
+
>
|
|
5091
|
+
<div class="triggerContentWrapper">
|
|
5092
|
+
<label class="label" id="triggerLabel" hasTrigger=${this.hasTriggerContent}>
|
|
5093
|
+
<slot name="label" @slotchange="${this.handleLabelSlotChange}"></slot>
|
|
5094
|
+
</label>
|
|
5095
|
+
<div class="triggerContent">
|
|
5096
|
+
<slot
|
|
5097
|
+
name="trigger"
|
|
5098
|
+
@slotchange="${this.handleTriggerContentSlotChange}"></slot>
|
|
5099
|
+
</div>
|
|
5100
|
+
</div>
|
|
5101
|
+
${this.chevron || this.common ? u`
|
|
5102
|
+
<div
|
|
5103
|
+
id="showStateIcon"
|
|
5104
|
+
part="chevron">
|
|
5105
|
+
<${this.iconTag}
|
|
5106
|
+
category="interface"
|
|
5107
|
+
name="chevron-down"
|
|
5108
|
+
?onDark="${this.onDark}"
|
|
5109
|
+
variant="${this.disabled ? 'disabled' : 'muted'}">
|
|
5110
|
+
>
|
|
5111
|
+
</${this.iconTag}>
|
|
5112
|
+
</div>
|
|
5113
|
+
` : undefined }
|
|
5114
|
+
</div>
|
|
5115
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5116
|
+
<slot name="helpText"></slot>
|
|
5117
|
+
</${this.helpTextTag}>
|
|
5118
|
+
|
|
5119
|
+
<div id="bibSizer" part="size"></div>
|
|
5120
|
+
<${this.dropdownBibTag}
|
|
5121
|
+
id="bib"
|
|
5122
|
+
?data-show="${this.isPopoverVisible}"
|
|
5123
|
+
?isfullscreen="${this.isBibFullscreen}"
|
|
5124
|
+
?common="${this.common}"
|
|
5125
|
+
?rounded="${this.common || this.rounded}"
|
|
5126
|
+
?inset="${this.common || this.inset}"
|
|
5127
|
+
>
|
|
5128
|
+
<div class="slotContent">
|
|
5129
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5130
|
+
</div>
|
|
5131
|
+
</${this.dropdownBibTag}>
|
|
5132
|
+
</div>
|
|
5133
|
+
`;
|
|
5134
|
+
}
|
|
5135
|
+
|
|
5136
|
+
/**
|
|
5137
|
+
* Returns HTML for the snowflake layout. Does not support type="*".
|
|
5138
|
+
* @private
|
|
5139
|
+
* @returns {html} - Returns HTML for the snowflake layout.
|
|
5140
|
+
*/
|
|
5141
|
+
renderLayoutSnowflake() {
|
|
5142
|
+
const helpTextClasses = {
|
|
5143
|
+
'helpText': true,
|
|
5144
|
+
'leftIndent': true,
|
|
5145
|
+
'rightIndent': true
|
|
5146
|
+
};
|
|
5147
|
+
|
|
5148
|
+
return u`
|
|
5149
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5150
|
+
`;
|
|
5151
|
+
}
|
|
5152
|
+
|
|
5153
|
+
/**
|
|
5154
|
+
* Returns HTML for the emphasized layout. Does not support type="*".
|
|
5155
|
+
* @private
|
|
5156
|
+
* @returns {html} - Returns HTML for the emphasized layout.
|
|
5157
|
+
*/
|
|
5158
|
+
renderLayoutEmphasized() {
|
|
5159
|
+
const helpTextClasses = {
|
|
5160
|
+
'helpText': true,
|
|
5161
|
+
'leftIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('right'),
|
|
5162
|
+
'rightIndent': this.shape.toLowerCase().includes('pill') && !this.shape.toLowerCase().includes('left')
|
|
5163
|
+
};
|
|
5164
|
+
|
|
5165
|
+
return u`
|
|
5166
|
+
${this.renderBasicHtml(helpTextClasses)}
|
|
5167
|
+
`;
|
|
5168
|
+
}
|
|
5169
|
+
|
|
5170
|
+
/**
|
|
5171
|
+
* Logic to determine the layout of the component.
|
|
5172
|
+
* @private
|
|
5173
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
5174
|
+
* @returns {HTMLCollection} - Returns the HTML for the layout.
|
|
4933
5175
|
*/
|
|
4934
5176
|
renderLayout(ForcedLayout) {
|
|
4935
5177
|
const layout = ForcedLayout || this.layout;
|
|
@@ -4968,7 +5210,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
4968
5210
|
|
|
4969
5211
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4970
5212
|
|
|
4971
|
-
class AuroLibraryRuntimeUtils {
|
|
5213
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
4972
5214
|
|
|
4973
5215
|
/* eslint-disable jsdoc/require-param */
|
|
4974
5216
|
|
|
@@ -5029,7 +5271,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
5029
5271
|
|
|
5030
5272
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
5031
5273
|
}
|
|
5032
|
-
}
|
|
5274
|
+
};
|
|
5033
5275
|
|
|
5034
5276
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5035
5277
|
// See LICENSE in the project root for license information.
|
|
@@ -5221,9 +5463,79 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
5221
5463
|
}
|
|
5222
5464
|
};
|
|
5223
5465
|
|
|
5224
|
-
var tokensCss$
|
|
5466
|
+
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)}`;
|
|
5467
|
+
|
|
5468
|
+
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)}`;
|
|
5469
|
+
|
|
5470
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5471
|
+
// See LICENSE in the project root for license information.
|
|
5472
|
+
|
|
5473
|
+
// ---------------------------------------------------------------------
|
|
5474
|
+
|
|
5475
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5476
|
+
|
|
5477
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5478
|
+
|
|
5479
|
+
/* eslint-disable jsdoc/require-param */
|
|
5480
|
+
|
|
5481
|
+
/**
|
|
5482
|
+
* This will register a new custom element with the browser.
|
|
5483
|
+
* @param {String} name - The name of the custom element.
|
|
5484
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5485
|
+
* @returns {void}
|
|
5486
|
+
*/
|
|
5487
|
+
registerComponent(name, componentClass) {
|
|
5488
|
+
if (!customElements.get(name)) {
|
|
5489
|
+
customElements.define(name, class extends componentClass {});
|
|
5490
|
+
}
|
|
5491
|
+
}
|
|
5492
|
+
|
|
5493
|
+
/**
|
|
5494
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5495
|
+
* @returns {void}
|
|
5496
|
+
*/
|
|
5497
|
+
closestElement(
|
|
5498
|
+
selector, // selector like in .closest()
|
|
5499
|
+
base = this, // extra functionality to skip a parent
|
|
5500
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5501
|
+
!el || el === document || el === window
|
|
5502
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5503
|
+
: found
|
|
5504
|
+
? found // found a selector INside this element
|
|
5505
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5506
|
+
) {
|
|
5507
|
+
return __Closest(base);
|
|
5508
|
+
}
|
|
5509
|
+
/* eslint-enable jsdoc/require-param */
|
|
5510
|
+
|
|
5511
|
+
/**
|
|
5512
|
+
* 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.
|
|
5513
|
+
* @param {Object} elem - The element to check.
|
|
5514
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5515
|
+
* @returns {void}
|
|
5516
|
+
*/
|
|
5517
|
+
handleComponentTagRename(elem, tagName) {
|
|
5518
|
+
const tag = tagName.toLowerCase();
|
|
5519
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5520
|
+
|
|
5521
|
+
if (elemTag !== tag) {
|
|
5522
|
+
elem.setAttribute(tag, true);
|
|
5523
|
+
}
|
|
5524
|
+
}
|
|
5225
5525
|
|
|
5226
|
-
|
|
5526
|
+
/**
|
|
5527
|
+
* Validates if an element is a specific Auro component.
|
|
5528
|
+
* @param {Object} elem - The element to validate.
|
|
5529
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5530
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5531
|
+
*/
|
|
5532
|
+
elementMatch(elem, tagName) {
|
|
5533
|
+
const tag = tagName.toLowerCase();
|
|
5534
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5535
|
+
|
|
5536
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5537
|
+
}
|
|
5538
|
+
};
|
|
5227
5539
|
|
|
5228
5540
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5229
5541
|
// See LICENSE in the project root for license information.
|
|
@@ -5244,7 +5556,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5244
5556
|
*/
|
|
5245
5557
|
privateDefaults() {
|
|
5246
5558
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5247
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5559
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5248
5560
|
}
|
|
5249
5561
|
|
|
5250
5562
|
// function to define props used within the scope of this component
|
|
@@ -5311,9 +5623,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5311
5623
|
static get styles() {
|
|
5312
5624
|
return [
|
|
5313
5625
|
super.styles,
|
|
5314
|
-
i$5`${tokensCss$
|
|
5626
|
+
i$5`${tokensCss$3}`,
|
|
5315
5627
|
i$5`${styleCss$1$1}`,
|
|
5316
|
-
i$5`${colorCss$
|
|
5628
|
+
i$5`${colorCss$4}`
|
|
5317
5629
|
];
|
|
5318
5630
|
}
|
|
5319
5631
|
|
|
@@ -5326,7 +5638,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5326
5638
|
*
|
|
5327
5639
|
*/
|
|
5328
5640
|
static register(name = "auro-icon") {
|
|
5329
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
5641
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
5330
5642
|
}
|
|
5331
5643
|
|
|
5332
5644
|
connectedCallback() {
|
|
@@ -5394,7 +5706,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5394
5706
|
|
|
5395
5707
|
var iconVersion$1 = '8.0.3';
|
|
5396
5708
|
|
|
5397
|
-
var styleCss$
|
|
5709
|
+
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)}`;
|
|
5398
5710
|
|
|
5399
5711
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5400
5712
|
// See LICENSE in the project root for license information.
|
|
@@ -5423,7 +5735,7 @@ class AuroHeader extends i$2 {
|
|
|
5423
5735
|
/**
|
|
5424
5736
|
* @private
|
|
5425
5737
|
*/
|
|
5426
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5738
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5427
5739
|
}
|
|
5428
5740
|
|
|
5429
5741
|
// function to define props used within the scope of this component
|
|
@@ -5441,7 +5753,7 @@ class AuroHeader extends i$2 {
|
|
|
5441
5753
|
}
|
|
5442
5754
|
|
|
5443
5755
|
static get styles() {
|
|
5444
|
-
return [styleCss$
|
|
5756
|
+
return [styleCss$5];
|
|
5445
5757
|
}
|
|
5446
5758
|
|
|
5447
5759
|
/**
|
|
@@ -5453,7 +5765,7 @@ class AuroHeader extends i$2 {
|
|
|
5453
5765
|
*
|
|
5454
5766
|
*/
|
|
5455
5767
|
static register(name = "auro-header") {
|
|
5456
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
5768
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroHeader);
|
|
5457
5769
|
}
|
|
5458
5770
|
|
|
5459
5771
|
firstUpdated() {
|
|
@@ -5549,7 +5861,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
5549
5861
|
|
|
5550
5862
|
this.large = false;
|
|
5551
5863
|
|
|
5552
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5864
|
+
AuroLibraryRuntimeUtils$1$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5553
5865
|
|
|
5554
5866
|
const versioning = new AuroDependencyVersioning();
|
|
5555
5867
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
@@ -5588,7 +5900,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
5588
5900
|
*
|
|
5589
5901
|
*/
|
|
5590
5902
|
static register(name = "auro-bibtemplate") {
|
|
5591
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
5903
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
5592
5904
|
}
|
|
5593
5905
|
|
|
5594
5906
|
/**
|
|
@@ -5628,6 +5940,18 @@ class AuroBibtemplate extends i$2 {
|
|
|
5628
5940
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
5629
5941
|
}
|
|
5630
5942
|
|
|
5943
|
+
firstUpdated(changedProperties) {
|
|
5944
|
+
super.firstUpdated(changedProperties);
|
|
5945
|
+
|
|
5946
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
5947
|
+
bubbles: true,
|
|
5948
|
+
composed: true,
|
|
5949
|
+
detail: {
|
|
5950
|
+
element: this
|
|
5951
|
+
}
|
|
5952
|
+
}));
|
|
5953
|
+
}
|
|
5954
|
+
|
|
5631
5955
|
// function that renders the HTML and CSS into the scope of the component
|
|
5632
5956
|
render() {
|
|
5633
5957
|
return u`
|
|
@@ -5660,6 +5984,214 @@ class AuroBibtemplate extends i$2 {
|
|
|
5660
5984
|
|
|
5661
5985
|
var bibTemplateVersion = '1.0.0';
|
|
5662
5986
|
|
|
5987
|
+
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)}`;
|
|
5988
|
+
|
|
5989
|
+
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}`;
|
|
5990
|
+
|
|
5991
|
+
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5992
|
+
|
|
5993
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5994
|
+
// See LICENSE in the project root for license information.
|
|
5995
|
+
|
|
5996
|
+
// ---------------------------------------------------------------------
|
|
5997
|
+
|
|
5998
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5999
|
+
|
|
6000
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6001
|
+
|
|
6002
|
+
/* eslint-disable jsdoc/require-param */
|
|
6003
|
+
|
|
6004
|
+
/**
|
|
6005
|
+
* This will register a new custom element with the browser.
|
|
6006
|
+
* @param {String} name - The name of the custom element.
|
|
6007
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6008
|
+
* @returns {void}
|
|
6009
|
+
*/
|
|
6010
|
+
registerComponent(name, componentClass) {
|
|
6011
|
+
if (!customElements.get(name)) {
|
|
6012
|
+
customElements.define(name, class extends componentClass {});
|
|
6013
|
+
}
|
|
6014
|
+
}
|
|
6015
|
+
|
|
6016
|
+
/**
|
|
6017
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6018
|
+
* @returns {void}
|
|
6019
|
+
*/
|
|
6020
|
+
closestElement(
|
|
6021
|
+
selector, // selector like in .closest()
|
|
6022
|
+
base = this, // extra functionality to skip a parent
|
|
6023
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6024
|
+
!el || el === document || el === window
|
|
6025
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6026
|
+
: found
|
|
6027
|
+
? found // found a selector INside this element
|
|
6028
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6029
|
+
) {
|
|
6030
|
+
return __Closest(base);
|
|
6031
|
+
}
|
|
6032
|
+
/* eslint-enable jsdoc/require-param */
|
|
6033
|
+
|
|
6034
|
+
/**
|
|
6035
|
+
* 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.
|
|
6036
|
+
* @param {Object} elem - The element to check.
|
|
6037
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6038
|
+
* @returns {void}
|
|
6039
|
+
*/
|
|
6040
|
+
handleComponentTagRename(elem, tagName) {
|
|
6041
|
+
const tag = tagName.toLowerCase();
|
|
6042
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6043
|
+
|
|
6044
|
+
if (elemTag !== tag) {
|
|
6045
|
+
elem.setAttribute(tag, true);
|
|
6046
|
+
}
|
|
6047
|
+
}
|
|
6048
|
+
|
|
6049
|
+
/**
|
|
6050
|
+
* Validates if an element is a specific Auro component.
|
|
6051
|
+
* @param {Object} elem - The element to validate.
|
|
6052
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6053
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6054
|
+
*/
|
|
6055
|
+
elementMatch(elem, tagName) {
|
|
6056
|
+
const tag = tagName.toLowerCase();
|
|
6057
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6058
|
+
|
|
6059
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6060
|
+
}
|
|
6061
|
+
};
|
|
6062
|
+
|
|
6063
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6064
|
+
// See LICENSE in the project root for license information.
|
|
6065
|
+
|
|
6066
|
+
|
|
6067
|
+
/**
|
|
6068
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6069
|
+
*
|
|
6070
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6071
|
+
*/
|
|
6072
|
+
class AuroHelpText extends i$2 {
|
|
6073
|
+
|
|
6074
|
+
constructor() {
|
|
6075
|
+
super();
|
|
6076
|
+
|
|
6077
|
+
this.error = false;
|
|
6078
|
+
this.onDark = false;
|
|
6079
|
+
this.hasTextContent = false;
|
|
6080
|
+
|
|
6081
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
6082
|
+
}
|
|
6083
|
+
|
|
6084
|
+
static get styles() {
|
|
6085
|
+
return [
|
|
6086
|
+
colorCss$3,
|
|
6087
|
+
styleCss$4,
|
|
6088
|
+
tokensCss$2
|
|
6089
|
+
];
|
|
6090
|
+
}
|
|
6091
|
+
|
|
6092
|
+
// function to define props used within the scope of this component
|
|
6093
|
+
static get properties() {
|
|
6094
|
+
return {
|
|
6095
|
+
|
|
6096
|
+
/**
|
|
6097
|
+
* @private
|
|
6098
|
+
*/
|
|
6099
|
+
slotNodes: {
|
|
6100
|
+
type: Boolean,
|
|
6101
|
+
},
|
|
6102
|
+
|
|
6103
|
+
/**
|
|
6104
|
+
* @private
|
|
6105
|
+
*/
|
|
6106
|
+
hasTextContent: {
|
|
6107
|
+
type: Boolean,
|
|
6108
|
+
},
|
|
6109
|
+
|
|
6110
|
+
/**
|
|
6111
|
+
* If declared, make font color red.
|
|
6112
|
+
*/
|
|
6113
|
+
error: {
|
|
6114
|
+
type: Boolean,
|
|
6115
|
+
reflect: true,
|
|
6116
|
+
},
|
|
6117
|
+
|
|
6118
|
+
/**
|
|
6119
|
+
* If declared, will apply onDark styles.
|
|
6120
|
+
*/
|
|
6121
|
+
onDark: {
|
|
6122
|
+
type: Boolean,
|
|
6123
|
+
reflect: true
|
|
6124
|
+
}
|
|
6125
|
+
};
|
|
6126
|
+
}
|
|
6127
|
+
|
|
6128
|
+
/**
|
|
6129
|
+
* This will register this element with the browser.
|
|
6130
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
6131
|
+
*
|
|
6132
|
+
* @example
|
|
6133
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
6134
|
+
*
|
|
6135
|
+
*/
|
|
6136
|
+
static register(name = "auro-helptext") {
|
|
6137
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHelpText);
|
|
6138
|
+
}
|
|
6139
|
+
|
|
6140
|
+
updated() {
|
|
6141
|
+
this.handleSlotChange();
|
|
6142
|
+
}
|
|
6143
|
+
|
|
6144
|
+
handleSlotChange(event) {
|
|
6145
|
+
if (event) {
|
|
6146
|
+
this.slotNodes = event.target.assignedNodes();
|
|
6147
|
+
}
|
|
6148
|
+
|
|
6149
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
6150
|
+
}
|
|
6151
|
+
|
|
6152
|
+
/**
|
|
6153
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
6154
|
+
*
|
|
6155
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
6156
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
6157
|
+
* @private
|
|
6158
|
+
*/
|
|
6159
|
+
checkSlotsForContent(nodes) {
|
|
6160
|
+
if (!nodes) {
|
|
6161
|
+
return false;
|
|
6162
|
+
}
|
|
6163
|
+
|
|
6164
|
+
return nodes.some((node) => {
|
|
6165
|
+
if (node.textContent.trim()) {
|
|
6166
|
+
return true;
|
|
6167
|
+
}
|
|
6168
|
+
|
|
6169
|
+
if (!node.querySelector) {
|
|
6170
|
+
return false;
|
|
6171
|
+
}
|
|
6172
|
+
|
|
6173
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
6174
|
+
if (!nestedSlot) {
|
|
6175
|
+
return false;
|
|
6176
|
+
}
|
|
6177
|
+
|
|
6178
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
6179
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
6180
|
+
});
|
|
6181
|
+
}
|
|
6182
|
+
|
|
6183
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6184
|
+
render() {
|
|
6185
|
+
return x`
|
|
6186
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
6187
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6188
|
+
</div>
|
|
6189
|
+
`;
|
|
6190
|
+
}
|
|
6191
|
+
}
|
|
6192
|
+
|
|
6193
|
+
var helpTextVersion = '1.0.0';
|
|
6194
|
+
|
|
5663
6195
|
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)}`;
|
|
5664
6196
|
|
|
5665
6197
|
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)}`;
|
|
@@ -5721,7 +6253,7 @@ i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
|
|
|
5721
6253
|
|
|
5722
6254
|
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)}`;
|
|
5723
6255
|
|
|
5724
|
-
var styleCss$3 = i$5
|
|
6256
|
+
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}`;
|
|
5725
6257
|
|
|
5726
6258
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5727
6259
|
// See LICENSE in the project root for license information.
|
|
@@ -5744,7 +6276,7 @@ var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
5744
6276
|
*/
|
|
5745
6277
|
|
|
5746
6278
|
// build the component class
|
|
5747
|
-
class AuroSelect extends
|
|
6279
|
+
class AuroSelect extends AuroElement$3 {
|
|
5748
6280
|
constructor() {
|
|
5749
6281
|
super();
|
|
5750
6282
|
|
|
@@ -5754,12 +6286,21 @@ class AuroSelect extends i$2 {
|
|
|
5754
6286
|
const idSubstrEnd = 8;
|
|
5755
6287
|
const idSubstrStart = 2;
|
|
5756
6288
|
|
|
6289
|
+
this.matchWidth = true;
|
|
6290
|
+
|
|
6291
|
+
// Layout Config
|
|
6292
|
+
this.layout = 'classic';
|
|
6293
|
+
this.shape = 'classic';
|
|
6294
|
+
this.size = 'xl';
|
|
6295
|
+
|
|
5757
6296
|
// floaterConfig
|
|
5758
6297
|
this.placement = 'bottom-start';
|
|
5759
6298
|
this.offset = 0;
|
|
5760
6299
|
this.noFlip = false;
|
|
5761
6300
|
this.autoPlacement = false;
|
|
5762
6301
|
|
|
6302
|
+
this.forceDisplayValue = false;
|
|
6303
|
+
|
|
5763
6304
|
/**
|
|
5764
6305
|
* @private
|
|
5765
6306
|
*/
|
|
@@ -5775,7 +6316,7 @@ class AuroSelect extends i$2 {
|
|
|
5775
6316
|
/**
|
|
5776
6317
|
* @private
|
|
5777
6318
|
*/
|
|
5778
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6319
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5779
6320
|
|
|
5780
6321
|
/**
|
|
5781
6322
|
* Generate unique names for dependency components.
|
|
@@ -5792,10 +6333,25 @@ class AuroSelect extends i$2 {
|
|
|
5792
6333
|
*/
|
|
5793
6334
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-select-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
5794
6335
|
|
|
6336
|
+
/**
|
|
6337
|
+
* @private
|
|
6338
|
+
*/
|
|
6339
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
6340
|
+
|
|
5795
6341
|
/**
|
|
5796
6342
|
* @private
|
|
5797
6343
|
*/
|
|
5798
6344
|
this.isHiddenWhileLoading = false;
|
|
6345
|
+
|
|
6346
|
+
/**
|
|
6347
|
+
* @private
|
|
6348
|
+
*/
|
|
6349
|
+
this.hasFocus = false;
|
|
6350
|
+
|
|
6351
|
+
/**
|
|
6352
|
+
* @private
|
|
6353
|
+
*/
|
|
6354
|
+
this.hasDisplayValueContent = false;
|
|
5799
6355
|
}
|
|
5800
6356
|
|
|
5801
6357
|
/**
|
|
@@ -5809,6 +6365,7 @@ class AuroSelect extends i$2 {
|
|
|
5809
6365
|
this.value = undefined;
|
|
5810
6366
|
this.fullscreenBreakpoint = 'sm';
|
|
5811
6367
|
this.onDark = false;
|
|
6368
|
+
this.isPopoverVisible = false;
|
|
5812
6369
|
}
|
|
5813
6370
|
|
|
5814
6371
|
// This function is to define props used within the scope of this component
|
|
@@ -5825,6 +6382,14 @@ class AuroSelect extends i$2 {
|
|
|
5825
6382
|
reflect: true
|
|
5826
6383
|
},
|
|
5827
6384
|
|
|
6385
|
+
/**
|
|
6386
|
+
* If declared, the label and value will be visually hidden and the displayValue will render 100% of the time.
|
|
6387
|
+
*/
|
|
6388
|
+
forceDisplayValue: {
|
|
6389
|
+
type: Boolean,
|
|
6390
|
+
reflect: true
|
|
6391
|
+
},
|
|
6392
|
+
|
|
5828
6393
|
/**
|
|
5829
6394
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
5830
6395
|
* @default false
|
|
@@ -5842,6 +6407,22 @@ class AuroSelect extends i$2 {
|
|
|
5842
6407
|
reflect: true
|
|
5843
6408
|
},
|
|
5844
6409
|
|
|
6410
|
+
/**
|
|
6411
|
+
* @private
|
|
6412
|
+
*/
|
|
6413
|
+
isPopoverVisible: {
|
|
6414
|
+
type: Boolean,
|
|
6415
|
+
reflect: false
|
|
6416
|
+
},
|
|
6417
|
+
|
|
6418
|
+
/**
|
|
6419
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
6420
|
+
*/
|
|
6421
|
+
matchWidth: {
|
|
6422
|
+
type: Boolean,
|
|
6423
|
+
reflect: true
|
|
6424
|
+
},
|
|
6425
|
+
|
|
5845
6426
|
/**
|
|
5846
6427
|
* The name for the select element.
|
|
5847
6428
|
*/
|
|
@@ -6022,21 +6603,54 @@ class AuroSelect extends i$2 {
|
|
|
6022
6603
|
},
|
|
6023
6604
|
|
|
6024
6605
|
/**
|
|
6025
|
-
* Indicates whether the input is in a dirty state (has been interacted with).
|
|
6026
|
-
* @type {boolean}
|
|
6027
|
-
* @default false
|
|
6606
|
+
* Indicates whether the input is in a dirty state (has been interacted with).
|
|
6607
|
+
* @type {boolean}
|
|
6608
|
+
* @default false
|
|
6609
|
+
* @private
|
|
6610
|
+
*/
|
|
6611
|
+
touched: {
|
|
6612
|
+
type: Boolean,
|
|
6613
|
+
reflect: true,
|
|
6614
|
+
attribute: false
|
|
6615
|
+
},
|
|
6616
|
+
|
|
6617
|
+
/**
|
|
6618
|
+
* @private
|
|
6619
|
+
*/
|
|
6620
|
+
hasFocus: {
|
|
6621
|
+
type: Boolean,
|
|
6622
|
+
reflect: false,
|
|
6623
|
+
attribute: false
|
|
6624
|
+
},
|
|
6625
|
+
|
|
6626
|
+
/**
|
|
6028
6627
|
* @private
|
|
6029
6628
|
*/
|
|
6030
|
-
|
|
6629
|
+
hasDisplayValueContent: {
|
|
6031
6630
|
type: Boolean,
|
|
6032
|
-
reflect:
|
|
6631
|
+
reflect: false,
|
|
6033
6632
|
attribute: false
|
|
6034
|
-
}
|
|
6633
|
+
},
|
|
6035
6634
|
};
|
|
6036
6635
|
}
|
|
6037
6636
|
|
|
6038
6637
|
static get styles() {
|
|
6039
|
-
return [
|
|
6638
|
+
return [
|
|
6639
|
+
i$5`${shapeSizeCss$1}`,
|
|
6640
|
+
i$5`${tokensCss$5}`,
|
|
6641
|
+
i$5`${styleCss$3}`,
|
|
6642
|
+
];
|
|
6643
|
+
}
|
|
6644
|
+
|
|
6645
|
+
/**
|
|
6646
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
6647
|
+
* @private
|
|
6648
|
+
* @return {object} - Returns classmap.
|
|
6649
|
+
*/
|
|
6650
|
+
get commonWrapperClasses() {
|
|
6651
|
+
return {
|
|
6652
|
+
'wrapper': true
|
|
6653
|
+
};
|
|
6040
6654
|
}
|
|
6041
6655
|
|
|
6042
6656
|
/**
|
|
@@ -6046,11 +6660,13 @@ class AuroSelect extends i$2 {
|
|
|
6046
6660
|
*/
|
|
6047
6661
|
configureDropdown() {
|
|
6048
6662
|
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
6049
|
-
|
|
6663
|
+
|
|
6664
|
+
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6665
|
+
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
6666
|
+
});
|
|
6050
6667
|
|
|
6051
6668
|
// setting up bibtemplate
|
|
6052
6669
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$); // eslint-disable-line no-underscore-dangle
|
|
6053
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
6054
6670
|
|
|
6055
6671
|
if (this.customBibWidth) {
|
|
6056
6672
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6069,7 +6685,7 @@ class AuroSelect extends i$2 {
|
|
|
6069
6685
|
*
|
|
6070
6686
|
*/
|
|
6071
6687
|
static register(name = "auro-select") {
|
|
6072
|
-
AuroLibraryRuntimeUtils$
|
|
6688
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroSelect);
|
|
6073
6689
|
}
|
|
6074
6690
|
|
|
6075
6691
|
/**
|
|
@@ -6080,21 +6696,34 @@ class AuroSelect extends i$2 {
|
|
|
6080
6696
|
updateDisplayedValue() {
|
|
6081
6697
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
6082
6698
|
|
|
6083
|
-
|
|
6084
|
-
|
|
6699
|
+
// Clear out old value
|
|
6700
|
+
const valueElem = triggerContentEl.querySelector('#value');
|
|
6701
|
+
if (valueElem) {
|
|
6702
|
+
valueElem.innerHTML = '';
|
|
6703
|
+
}
|
|
6704
|
+
|
|
6705
|
+
const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
|
|
6706
|
+
const slottedElements = slot.assignedElements();
|
|
6707
|
+
|
|
6708
|
+
slottedElements.forEach((element) => {
|
|
6709
|
+
element.remove();
|
|
6710
|
+
});
|
|
6085
6711
|
|
|
6086
6712
|
// Handle selected options
|
|
6087
6713
|
if (this.optionSelected) {
|
|
6088
|
-
let displayText = '';
|
|
6089
|
-
|
|
6090
6714
|
if (this.multiSelect && this.optionSelected.length > 0) {
|
|
6091
|
-
|
|
6092
|
-
|
|
6715
|
+
const displayText = this.optionSelected.map((option) => option.textContent).join(', ');
|
|
6716
|
+
|
|
6717
|
+
valueElem.textContent = displayText;
|
|
6093
6718
|
} else {
|
|
6094
|
-
|
|
6095
|
-
|
|
6719
|
+
valueElem.innerHTML = this.optionSelected.innerHTML;
|
|
6720
|
+
const displayValueEl = this.optionSelected.querySelector("[slot='displayValue']");
|
|
6096
6721
|
|
|
6097
|
-
|
|
6722
|
+
if (displayValueEl) {
|
|
6723
|
+
this.appendChild(displayValueEl.cloneNode(true));
|
|
6724
|
+
}
|
|
6725
|
+
this.hasDisplayValueContent = displayValueEl !== null;
|
|
6726
|
+
}
|
|
6098
6727
|
}
|
|
6099
6728
|
|
|
6100
6729
|
this.dropdown.requestUpdate();
|
|
@@ -6173,8 +6802,6 @@ class AuroSelect extends i$2 {
|
|
|
6173
6802
|
* @returns {void}
|
|
6174
6803
|
*/
|
|
6175
6804
|
configureSelect() {
|
|
6176
|
-
// inject menu into menuWrapper
|
|
6177
|
-
this.menuWrapper.append(this.menu);
|
|
6178
6805
|
|
|
6179
6806
|
this.addEventListener('keydown', (evt) => {
|
|
6180
6807
|
if (evt.key === 'ArrowUp') {
|
|
@@ -6228,6 +6855,7 @@ class AuroSelect extends i$2 {
|
|
|
6228
6855
|
|
|
6229
6856
|
this.addEventListener('blur', () => {
|
|
6230
6857
|
this.validation.validate(this);
|
|
6858
|
+
this.hasFocus = false;
|
|
6231
6859
|
});
|
|
6232
6860
|
}
|
|
6233
6861
|
|
|
@@ -6303,6 +6931,7 @@ class AuroSelect extends i$2 {
|
|
|
6303
6931
|
*/
|
|
6304
6932
|
handleFocusin() {
|
|
6305
6933
|
|
|
6934
|
+
this.hasFocus = true;
|
|
6306
6935
|
this.touched = true;
|
|
6307
6936
|
}
|
|
6308
6937
|
|
|
@@ -6511,11 +7140,288 @@ class AuroSelect extends i$2 {
|
|
|
6511
7140
|
}
|
|
6512
7141
|
}
|
|
6513
7142
|
|
|
7143
|
+
renderAriaHtml() {
|
|
7144
|
+
return u`
|
|
7145
|
+
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7146
|
+
${this.optionActive && this.options.length > 0
|
|
7147
|
+
? u`
|
|
7148
|
+
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7149
|
+
`
|
|
7150
|
+
: undefined
|
|
7151
|
+
};
|
|
7152
|
+
|
|
7153
|
+
${this.optionSelected && this.options.length > 0
|
|
7154
|
+
? u`
|
|
7155
|
+
${`${this.optionSelected.innerText} selected`}
|
|
7156
|
+
`
|
|
7157
|
+
: undefined
|
|
7158
|
+
};
|
|
7159
|
+
</div>
|
|
7160
|
+
`;
|
|
7161
|
+
}
|
|
7162
|
+
|
|
7163
|
+
renderNativeSelect() {
|
|
7164
|
+
return u`
|
|
7165
|
+
<div class="nativeSelectWrapper">
|
|
7166
|
+
<select
|
|
7167
|
+
tabindex="-1"
|
|
7168
|
+
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7169
|
+
name="${this.name || ''}"
|
|
7170
|
+
?disabled="${this.disabled}"
|
|
7171
|
+
?required="${this.required}"
|
|
7172
|
+
aria-hidden="true"
|
|
7173
|
+
autocomplete="${o(this.autocomplete)}"
|
|
7174
|
+
@change="${this._handleNativeSelectChange}">
|
|
7175
|
+
<option value="" ?selected="${!this.value}"></option>
|
|
7176
|
+
${this.options.map((option) => {
|
|
7177
|
+
const optionValue = option.value || option.textContent;
|
|
7178
|
+
return u`
|
|
7179
|
+
<option
|
|
7180
|
+
value="${optionValue}"
|
|
7181
|
+
?selected="${this.value === optionValue}">
|
|
7182
|
+
${option.textContent}
|
|
7183
|
+
</option>
|
|
7184
|
+
`;
|
|
7185
|
+
})}
|
|
7186
|
+
</select>
|
|
7187
|
+
</div>
|
|
7188
|
+
`;
|
|
7189
|
+
}
|
|
7190
|
+
|
|
7191
|
+
/**
|
|
7192
|
+
* Returns HTML for the help text and error message.
|
|
7193
|
+
* @private
|
|
7194
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
7195
|
+
*/
|
|
7196
|
+
renderHtmlHelpText() {
|
|
7197
|
+
return u`
|
|
7198
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7199
|
+
? u`
|
|
7200
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7201
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
7202
|
+
<slot name="helptext"></slot>
|
|
7203
|
+
</p>
|
|
7204
|
+
</${this.helpTextTag}>
|
|
7205
|
+
`
|
|
7206
|
+
: u`
|
|
7207
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7208
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7209
|
+
ERROR MESSAGE ${this.errorMessage}
|
|
7210
|
+
</p>
|
|
7211
|
+
</${this.helpTextTag}>
|
|
7212
|
+
`
|
|
7213
|
+
}
|
|
7214
|
+
`;
|
|
7215
|
+
}
|
|
7216
|
+
|
|
7217
|
+
/**
|
|
7218
|
+
* Returns HTML for the emphasized layout.
|
|
7219
|
+
* @private
|
|
7220
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7221
|
+
*/
|
|
7222
|
+
// TODO update to use util class
|
|
7223
|
+
renderLayoutEmphasized() {
|
|
7224
|
+
const placeholderClass = {
|
|
7225
|
+
hidden: this.value,
|
|
7226
|
+
};
|
|
7227
|
+
|
|
7228
|
+
const displayValueClasses = {
|
|
7229
|
+
'displayValue': true,
|
|
7230
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7231
|
+
'hasFocus': this.isPopoverVisible,
|
|
7232
|
+
'withValue': this.value && this.value.length > 0,
|
|
7233
|
+
'force': this.forceDisplayValue,
|
|
7234
|
+
};
|
|
7235
|
+
|
|
7236
|
+
const valueContainerClasses = {
|
|
7237
|
+
'valueContainer': true,
|
|
7238
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7239
|
+
};
|
|
7240
|
+
|
|
7241
|
+
return u`
|
|
7242
|
+
<div
|
|
7243
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7244
|
+
part="wrapper">
|
|
7245
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7246
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7247
|
+
</div>
|
|
7248
|
+
<${this.dropdownTag}
|
|
7249
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7250
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7251
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7252
|
+
?noFlip="${this.noFlip}"
|
|
7253
|
+
?onDark="${this.onDark}"
|
|
7254
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7255
|
+
.offset="${this.offset}"
|
|
7256
|
+
.placement="${this.placement}"
|
|
7257
|
+
chevron
|
|
7258
|
+
fluid
|
|
7259
|
+
for="selectMenu"
|
|
7260
|
+
layout="${this.layout}"
|
|
7261
|
+
part="dropdown"
|
|
7262
|
+
shape="${this.shape}"
|
|
7263
|
+
size="${this.size}">
|
|
7264
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7265
|
+
<div class="accents left">
|
|
7266
|
+
<slot name="typeIcon"></slot>
|
|
7267
|
+
</div>
|
|
7268
|
+
<div class="mainContent">
|
|
7269
|
+
<div class="${e(valueContainerClasses)}">
|
|
7270
|
+
<label>
|
|
7271
|
+
<slot name="label"></slot>
|
|
7272
|
+
</label>
|
|
7273
|
+
<div class="value" id="value"></div>
|
|
7274
|
+
${this.value ? undefined : u`
|
|
7275
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
7276
|
+
<slot name="placeholder"></slot>
|
|
7277
|
+
</div>
|
|
7278
|
+
`}
|
|
7279
|
+
</div>
|
|
7280
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7281
|
+
<slot name="displayValue"></slot>
|
|
7282
|
+
</div>
|
|
7283
|
+
</div>
|
|
7284
|
+
<div class="accents right"></div>
|
|
7285
|
+
</div>
|
|
7286
|
+
<div class="menuWrapper"></div>
|
|
7287
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7288
|
+
<slot></slot>
|
|
7289
|
+
</${this.bibtemplateTag}>
|
|
7290
|
+
<div slot="helpText">
|
|
7291
|
+
${this.renderHtmlHelpText()}
|
|
7292
|
+
</div>
|
|
7293
|
+
</${this.dropdownTag}>
|
|
7294
|
+
</div>
|
|
7295
|
+
`;
|
|
7296
|
+
}
|
|
7297
|
+
|
|
7298
|
+
/**
|
|
7299
|
+
* Returns HTML for the snowflake layout.
|
|
7300
|
+
* @private
|
|
7301
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the snowflake layout.
|
|
7302
|
+
*/
|
|
7303
|
+
renderLayoutSnowflake() {
|
|
7304
|
+
const placeholderClass = {
|
|
7305
|
+
hidden: this.value,
|
|
7306
|
+
};
|
|
7307
|
+
|
|
7308
|
+
const displayValueClasses = {
|
|
7309
|
+
'displayValue': true,
|
|
7310
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7311
|
+
'hasFocus': this.isPopoverVisible,
|
|
7312
|
+
'withValue': this.value && this.value.length > 0,
|
|
7313
|
+
'force': this.forceDisplayValue,
|
|
7314
|
+
};
|
|
7315
|
+
|
|
7316
|
+
const valueContainerClasses = {
|
|
7317
|
+
'valueContainer': true,
|
|
7318
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7319
|
+
};
|
|
7320
|
+
|
|
7321
|
+
return u`
|
|
7322
|
+
<div
|
|
7323
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7324
|
+
part="wrapper">
|
|
7325
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7326
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7327
|
+
</div>
|
|
7328
|
+
<${this.dropdownTag}
|
|
7329
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7330
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7331
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7332
|
+
?noFlip="${this.noFlip}"
|
|
7333
|
+
?onDark="${this.onDark}"
|
|
7334
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7335
|
+
.offset="${this.offset}"
|
|
7336
|
+
.placement="${this.placement}"
|
|
7337
|
+
chevron
|
|
7338
|
+
fluid
|
|
7339
|
+
for="selectMenu"
|
|
7340
|
+
layout="${this.layout}"
|
|
7341
|
+
part="dropdown"
|
|
7342
|
+
shape="${this.shape}"
|
|
7343
|
+
size="${this.size}">
|
|
7344
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7345
|
+
<div class="accents left">
|
|
7346
|
+
<slot name="typeIcon"></slot>
|
|
7347
|
+
</div>
|
|
7348
|
+
<div class="mainContent">
|
|
7349
|
+
<div class="${e(valueContainerClasses)}">
|
|
7350
|
+
<label>
|
|
7351
|
+
<slot name="label"></slot>
|
|
7352
|
+
</label>
|
|
7353
|
+
<div class="value" id="value"></div>
|
|
7354
|
+
${this.value ? undefined : u`
|
|
7355
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
7356
|
+
<slot name="placeholder"></slot>
|
|
7357
|
+
</div>
|
|
7358
|
+
`}
|
|
7359
|
+
</div>
|
|
7360
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7361
|
+
<slot name="displayValue"></slot>
|
|
7362
|
+
</div>
|
|
7363
|
+
</div>
|
|
7364
|
+
<div class="accents right"></div>
|
|
7365
|
+
</div>
|
|
7366
|
+
<div class="menuWrapper"></div>
|
|
7367
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7368
|
+
<slot></slot>
|
|
7369
|
+
</${this.bibtemplateTag}>
|
|
7370
|
+
<div slot="helpText">
|
|
7371
|
+
${this.renderHtmlHelpText()}
|
|
7372
|
+
</div>
|
|
7373
|
+
</${this.dropdownTag}>
|
|
7374
|
+
</div>
|
|
7375
|
+
`;
|
|
7376
|
+
}
|
|
7377
|
+
|
|
7378
|
+
/**
|
|
7379
|
+
* Returns HTML for the classic layout.
|
|
7380
|
+
* @private
|
|
7381
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7382
|
+
*/
|
|
7383
|
+
renderLayoutClassic() {
|
|
7384
|
+
return u`
|
|
7385
|
+
<div
|
|
7386
|
+
class="${e(this.commonWrapperClasses)} thin"
|
|
7387
|
+
part="wrapper">
|
|
7388
|
+
classic
|
|
7389
|
+
</div>
|
|
7390
|
+
`;
|
|
7391
|
+
}
|
|
7392
|
+
|
|
7393
|
+
/**
|
|
7394
|
+
* Logic to determine the layout of the component.
|
|
7395
|
+
* @private
|
|
7396
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
7397
|
+
* @returns {void}
|
|
7398
|
+
*/
|
|
7399
|
+
renderLayout(ForcedLayout) {
|
|
7400
|
+
const layout = ForcedLayout || this.layout;
|
|
7401
|
+
|
|
7402
|
+
switch (layout) {
|
|
7403
|
+
case 'emphasized':
|
|
7404
|
+
return this.renderLayoutEmphasized();
|
|
7405
|
+
case 'emphasized-left':
|
|
7406
|
+
return this.renderLayoutEmphasized();
|
|
7407
|
+
case 'emphasized-right':
|
|
7408
|
+
return this.renderLayoutEmphasized();
|
|
7409
|
+
case 'snowflake':
|
|
7410
|
+
return this.renderLayoutSnowflake();
|
|
7411
|
+
case 'snowflake-left':
|
|
7412
|
+
return this.renderLayoutSnowflake();
|
|
7413
|
+
case 'snowflake-right':
|
|
7414
|
+
return this.renderLayoutSnowflake();
|
|
7415
|
+
default:
|
|
7416
|
+
return this.renderLayoutClassic();
|
|
7417
|
+
}
|
|
7418
|
+
}
|
|
7419
|
+
|
|
6514
7420
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6515
7421
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6516
7422
|
|
|
6517
7423
|
// function that renders the HTML and CSS into the scope of the component
|
|
6518
|
-
|
|
7424
|
+
renderBACKUP() {
|
|
6519
7425
|
const placeholderClass = {
|
|
6520
7426
|
hidden: this.value,
|
|
6521
7427
|
};
|
|
@@ -6541,19 +7447,22 @@ class AuroSelect extends i$2 {
|
|
|
6541
7447
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
6542
7448
|
</div>
|
|
6543
7449
|
<${this.dropdownTag}
|
|
6544
|
-
|
|
7450
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7451
|
+
?disabled="${this.disabled}"
|
|
6545
7452
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7453
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7454
|
+
?noFlip="${this.noFlip}"
|
|
6546
7455
|
?onDark="${this.onDark}"
|
|
6547
|
-
common
|
|
6548
|
-
fluid
|
|
6549
7456
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
6550
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
6551
|
-
chevron
|
|
6552
|
-
.placement="${this.placement}"
|
|
6553
7457
|
.offset="${this.offset}"
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
7458
|
+
.placement="${this.placement}"
|
|
7459
|
+
chevron
|
|
7460
|
+
fluid
|
|
7461
|
+
for="selectMenu"
|
|
7462
|
+
layout="${this.layout}"
|
|
7463
|
+
part="dropdown"
|
|
7464
|
+
shape="${this.shape}"
|
|
7465
|
+
size="${this.size}">
|
|
6557
7466
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6558
7467
|
<span id="placeholder"
|
|
6559
7468
|
class="${e(placeholderClass)}"
|
|
@@ -6564,10 +7473,8 @@ class AuroSelect extends i$2 {
|
|
|
6564
7473
|
<slot name="valueText" id="valueText"></slot>
|
|
6565
7474
|
</span>
|
|
6566
7475
|
|
|
6567
|
-
<div class="menuWrapper">
|
|
6568
|
-
</div>
|
|
6569
|
-
|
|
6570
7476
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7477
|
+
<slot></slot>
|
|
6571
7478
|
</${this.bibtemplateTag}>
|
|
6572
7479
|
<slot name="label" slot="label"></slot>
|
|
6573
7480
|
<p slot="helpText">
|
|
@@ -6607,6 +7514,7 @@ class AuroSelect extends i$2 {
|
|
|
6607
7514
|
</select>
|
|
6608
7515
|
</div>
|
|
6609
7516
|
<!-- Help text and error message template -->
|
|
7517
|
+
${this.renderHtmlHelpText()}
|
|
6610
7518
|
</div>
|
|
6611
7519
|
`;
|
|
6612
7520
|
}
|
|
@@ -6802,7 +7710,7 @@ class AuroMenu extends i$2 {
|
|
|
6802
7710
|
*
|
|
6803
7711
|
*/
|
|
6804
7712
|
static register(name = "auro-menu") {
|
|
6805
|
-
AuroLibraryRuntimeUtils$
|
|
7713
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenu);
|
|
6806
7714
|
}
|
|
6807
7715
|
|
|
6808
7716
|
// Lifecycle Methods
|
|
@@ -6826,7 +7734,7 @@ class AuroMenu extends i$2 {
|
|
|
6826
7734
|
}
|
|
6827
7735
|
|
|
6828
7736
|
firstUpdated() {
|
|
6829
|
-
AuroLibraryRuntimeUtils$
|
|
7737
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
6830
7738
|
|
|
6831
7739
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
6832
7740
|
this.initializeMenu();
|
|
@@ -7535,6 +8443,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
7535
8443
|
|
|
7536
8444
|
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)}`;
|
|
7537
8445
|
|
|
8446
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8447
|
+
// See LICENSE in the project root for license information.
|
|
8448
|
+
|
|
8449
|
+
// ---------------------------------------------------------------------
|
|
8450
|
+
|
|
8451
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8452
|
+
|
|
8453
|
+
class AuroLibraryRuntimeUtils {
|
|
8454
|
+
|
|
8455
|
+
/* eslint-disable jsdoc/require-param */
|
|
8456
|
+
|
|
8457
|
+
/**
|
|
8458
|
+
* This will register a new custom element with the browser.
|
|
8459
|
+
* @param {String} name - The name of the custom element.
|
|
8460
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
8461
|
+
* @returns {void}
|
|
8462
|
+
*/
|
|
8463
|
+
registerComponent(name, componentClass) {
|
|
8464
|
+
if (!customElements.get(name)) {
|
|
8465
|
+
customElements.define(name, class extends componentClass {});
|
|
8466
|
+
}
|
|
8467
|
+
}
|
|
8468
|
+
|
|
8469
|
+
/**
|
|
8470
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
8471
|
+
* @returns {void}
|
|
8472
|
+
*/
|
|
8473
|
+
closestElement(
|
|
8474
|
+
selector, // selector like in .closest()
|
|
8475
|
+
base = this, // extra functionality to skip a parent
|
|
8476
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8477
|
+
!el || el === document || el === window
|
|
8478
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
8479
|
+
: found
|
|
8480
|
+
? found // found a selector INside this element
|
|
8481
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8482
|
+
) {
|
|
8483
|
+
return __Closest(base);
|
|
8484
|
+
}
|
|
8485
|
+
/* eslint-enable jsdoc/require-param */
|
|
8486
|
+
|
|
8487
|
+
/**
|
|
8488
|
+
* 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.
|
|
8489
|
+
* @param {Object} elem - The element to check.
|
|
8490
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8491
|
+
* @returns {void}
|
|
8492
|
+
*/
|
|
8493
|
+
handleComponentTagRename(elem, tagName) {
|
|
8494
|
+
const tag = tagName.toLowerCase();
|
|
8495
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8496
|
+
|
|
8497
|
+
if (elemTag !== tag) {
|
|
8498
|
+
elem.setAttribute(tag, true);
|
|
8499
|
+
}
|
|
8500
|
+
}
|
|
8501
|
+
|
|
8502
|
+
/**
|
|
8503
|
+
* Validates if an element is a specific Auro component.
|
|
8504
|
+
* @param {Object} elem - The element to validate.
|
|
8505
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
8506
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8507
|
+
*/
|
|
8508
|
+
elementMatch(elem, tagName) {
|
|
8509
|
+
const tag = tagName.toLowerCase();
|
|
8510
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8511
|
+
|
|
8512
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
8513
|
+
}
|
|
8514
|
+
}
|
|
8515
|
+
|
|
7538
8516
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7539
8517
|
// See LICENSE in the project root for license information.
|
|
7540
8518
|
|
|
@@ -7554,7 +8532,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7554
8532
|
*/
|
|
7555
8533
|
privateDefaults() {
|
|
7556
8534
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
7557
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
8535
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
7558
8536
|
}
|
|
7559
8537
|
|
|
7560
8538
|
// function to define props used within the scope of this component
|
|
@@ -7636,7 +8614,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7636
8614
|
*
|
|
7637
8615
|
*/
|
|
7638
8616
|
static register(name = "auro-icon") {
|
|
7639
|
-
AuroLibraryRuntimeUtils
|
|
8617
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
7640
8618
|
}
|
|
7641
8619
|
|
|
7642
8620
|
connectedCallback() {
|
|
@@ -7742,7 +8720,7 @@ class AuroMenuOption extends i$2 {
|
|
|
7742
8720
|
/**
|
|
7743
8721
|
* @private
|
|
7744
8722
|
*/
|
|
7745
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
8723
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
7746
8724
|
}
|
|
7747
8725
|
|
|
7748
8726
|
static get properties() {
|
|
@@ -7786,7 +8764,7 @@ class AuroMenuOption extends i$2 {
|
|
|
7786
8764
|
*
|
|
7787
8765
|
*/
|
|
7788
8766
|
static register(name = "auro-menuoption") {
|
|
7789
|
-
AuroLibraryRuntimeUtils$
|
|
8767
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenuOption);
|
|
7790
8768
|
}
|
|
7791
8769
|
|
|
7792
8770
|
firstUpdated() {
|