@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.1 → 0.0.0-pr624.11
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.md +30 -29
- package/components/combobox/demo/api.min.js +598 -428
- package/components/combobox/demo/index.html +0 -1
- package/components/combobox/demo/index.md +43 -0
- package/components/combobox/demo/index.min.js +596 -426
- package/components/combobox/dist/auro-combobox.d.ts +13 -18
- package/components/combobox/dist/index.js +458 -273
- package/components/combobox/dist/registered.js +458 -273
- package/components/counter/demo/api.min.js +377 -62
- package/components/counter/demo/index.min.js +377 -62
- package/components/counter/dist/index.js +377 -62
- package/components/counter/dist/registered.js +377 -62
- package/components/datepicker/demo/api.md +13 -5
- package/components/datepicker/demo/api.min.js +847 -324
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +847 -324
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +677 -154
- package/components/datepicker/dist/registered.js +677 -154
- package/components/dropdown/demo/api.md +2 -2
- package/components/dropdown/demo/api.min.js +199 -37
- package/components/dropdown/demo/index.md +45 -0
- package/components/dropdown/demo/index.min.js +199 -37
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +199 -37
- package/components/dropdown/dist/registered.js +199 -37
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/demo/api.md +53 -49
- package/components/input/demo/api.min.js +121 -27
- package/components/input/demo/index.min.js +121 -27
- package/components/input/dist/auro-input.d.ts +22 -14
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +121 -27
- package/components/input/dist/registered.js +121 -27
- package/components/layoutElement/dist/index.d.ts +1 -0
- package/components/layoutElement/dist/index.js +95 -1
- package/components/menu/demo/api.md +11 -11
- package/components/menu/demo/api.min.js +115 -130
- package/components/menu/demo/index.min.js +115 -130
- package/components/menu/dist/auro-menu-utils.d.ts +0 -8
- package/components/menu/dist/auro-menu.d.ts +3 -8
- package/components/menu/dist/index.d.ts +1 -1
- package/components/menu/dist/index.js +116 -90
- package/components/menu/dist/registered.js +115 -130
- 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.js +2 -0
- package/components/select/demo/api.md +108 -42
- package/components/select/demo/api.min.js +1264 -353
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1251 -352
- package/components/select/dist/auro-select.d.ts +110 -18
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +1105 -191
- package/components/select/dist/registered.js +1105 -191
- 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 → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/emphasized}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{style-css.d.ts → classic/bibStyles-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
|
|
|
@@ -3256,7 +3374,7 @@ const cacheFetch$2 = (uri, options = {}) => {
|
|
|
3256
3374
|
return _fetchMap$2.get(uri);
|
|
3257
3375
|
};
|
|
3258
3376
|
|
|
3259
|
-
var styleCss$
|
|
3377
|
+
var styleCss$2$2 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
3260
3378
|
|
|
3261
3379
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3262
3380
|
// See LICENSE in the project root for license information.
|
|
@@ -3299,7 +3417,7 @@ let BaseIcon$2 = class BaseIcon extends AuroElement$1$1 {
|
|
|
3299
3417
|
|
|
3300
3418
|
static get styles() {
|
|
3301
3419
|
return i$5`
|
|
3302
|
-
${styleCss$
|
|
3420
|
+
${styleCss$2$2}
|
|
3303
3421
|
`;
|
|
3304
3422
|
}
|
|
3305
3423
|
|
|
@@ -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
|
|
@@ -3431,7 +3619,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
3431
3619
|
return [
|
|
3432
3620
|
super.styles,
|
|
3433
3621
|
i$5`${tokensCss$2$1}`,
|
|
3434
|
-
i$5`${styleCss$
|
|
3622
|
+
i$5`${styleCss$2$2}`,
|
|
3435
3623
|
i$5`${colorCss$3$1}`
|
|
3436
3624
|
];
|
|
3437
3625
|
}
|
|
@@ -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$
|
|
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,12 +3735,12 @@ 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() {
|
|
3555
3742
|
return [
|
|
3556
|
-
styleCss$
|
|
3743
|
+
styleCss$1$2,
|
|
3557
3744
|
colorCss$2$1,
|
|
3558
3745
|
tokensCss$1$1
|
|
3559
3746
|
];
|
|
@@ -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,21 +3875,23 @@ class AuroDropdownBib extends i$2 {
|
|
|
3640
3875
|
|
|
3641
3876
|
var dropdownVersion$1 = '3.0.0';
|
|
3642
3877
|
|
|
3643
|
-
var shapeSizeCss = i$5`.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:
|
|
3644
|
-
|
|
3645
|
-
var styleCss$1$2 = i$5`:host([layout*=classic]){position:relative;display:inline-block;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{position:relative;display:flex;align-items:center}:host([layout*=classic]) .trigger[showBorder]{border-width:1px;border-style:solid;cursor:pointer;outline-style:solid;outline-width:1px}@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)}`;
|
|
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}`;
|
|
3646
3879
|
|
|
3647
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)}`;
|
|
3648
3881
|
|
|
3649
|
-
var
|
|
3882
|
+
var classicColorCss = i$5`:host([layout*=classic]) .label{color:var(--ds-auro-dropdown-label-text-color)}:host([layout*=classic]) .trigger{border-color:var(--ds-auro-dropdown-trigger-border-color);background-color:var(--ds-auro-dropdown-trigger-container-color);color:var(--ds-auro-dropdown-trigger-text-color);outline-color:var(--ds-auro-dropdown-trigger-outline-color)}:host([layout*=classic]) .trigger:focus-within,:host([layout*=classic]) .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[disabled]{--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host([layout*=classic])[common],:host([layout*=classic])[bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-bold, #585e67)}:host([layout*=classic])[common] .trigger:active,:host([layout*=classic])[common] .trigger:focus-within,:host([layout*=classic])[bordered] .trigger:active,:host([layout*=classic])[bordered] .trigger:focus-within{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[error]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-status-error, #e31f26)}:host([layout*=classic])[error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[error] .trigger:focus-within,:host([layout*=classic])[error] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused, #01426a);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused, #01426a)}:host([layout*=classic])[disabled][common],:host([layout*=classic])[disabled][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-subtle, #dddddd)}:host([layout*=classic])[onDark]{--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([layout*=classic])[onDark]:focus-within,:host([layout*=classic])[onDark]:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][disabled]{--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([layout*=classic])[onDark][common],:host([layout*=classic])[onDark][bordered]{--ds-auro-dropdown-trigger-border-color: var(--ds-basic-color-border-inverse, #ffffff)}:host([layout*=classic])[onDark][common] .trigger:focus-within,:host([layout*=classic])[onDark][common] .trigger:active,:host([layout*=classic])[onDark][bordered] .trigger:focus-within,:host([layout*=classic])[onDark][bordered] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][error]{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8)}:host([layout*=classic])[onDark][error] .trigger{outline:solid 1px var(--ds-auro-dropdown-trigger-border-color)}:host([layout*=classic])[onDark][error] .trigger:focus-within,:host([layout*=classic])[onDark][error] .trigger:active{--ds-auro-dropdown-trigger-border-color: var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-dropdown-trigger-outline-color: var(--ds-advanced-color-state-focused-inverse, #ffffff)}:host([layout*=classic])[onDark][disabled][common],:host([layout*=classic])[onDark][disabled][bordered]{--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse-disabled, rgba(255, 255, 255, 0.1))}`;
|
|
3883
|
+
|
|
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
|
|
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{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=emphasized][shape*=pill]:not([layout*=right])) .leftIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left])) .rightIndent{width:calc(100% - var(--ds-size-300, 1.5rem));margin-right:var(--ds-size-300, 1.5rem)}:host([layout*=emphasized][shape*=pill]:not([layout*=left]):not([layout*=right])) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3652
3887
|
|
|
3653
|
-
var
|
|
3888
|
+
var styleSnowflakeCss = i$5`:host{display:block}.wrapper{display:flex;flex-direction:row}.trigger{display:flex;flex:1;align-items:center;justify-content:center;outline:none}.triggerContentWrapper{display:flex;width:100%;flex:1;align-items:center;justify-content:center}.triggerContent{display:flex;overflow:hidden;width:100%;flex:1;align-items:center;justify-content:center;text-overflow:ellipsis;white-space:nowrap}:host([layout*=snowflake]) .leftIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-left:var(--ds-size-300, 1.5rem)}:host([layout*=snowflake]) .rightIndent{width:calc(100% - var(--ds-size-600, 3rem));margin-right:var(--ds-size-300, 1.5rem)}.layout-snowflake .chevron,.layout-snowflake-left .chevron,.layout-snowflake-right .chevron{margin-right:var(--ds-size-300, 1.5rem)}`;
|
|
3654
3889
|
|
|
3655
|
-
var
|
|
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
|
|
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}`;
|
|
3893
|
+
|
|
3894
|
+
var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
3658
3895
|
|
|
3659
3896
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3660
3897
|
// See LICENSE in the project root for license information.
|
|
@@ -3663,7 +3900,7 @@ var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3663
3900
|
|
|
3664
3901
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3665
3902
|
|
|
3666
|
-
let AuroLibraryRuntimeUtils$
|
|
3903
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
3667
3904
|
|
|
3668
3905
|
/* eslint-disable jsdoc/require-param */
|
|
3669
3906
|
|
|
@@ -3735,7 +3972,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
3735
3972
|
*
|
|
3736
3973
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
3737
3974
|
*/
|
|
3738
|
-
class AuroHelpText extends i$2 {
|
|
3975
|
+
let AuroHelpText$1 = class AuroHelpText extends i$2 {
|
|
3739
3976
|
|
|
3740
3977
|
constructor() {
|
|
3741
3978
|
super();
|
|
@@ -3744,14 +3981,14 @@ class AuroHelpText extends i$2 {
|
|
|
3744
3981
|
this.onDark = false;
|
|
3745
3982
|
this.hasTextContent = false;
|
|
3746
3983
|
|
|
3747
|
-
AuroLibraryRuntimeUtils$
|
|
3984
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3748
3985
|
}
|
|
3749
3986
|
|
|
3750
3987
|
static get styles() {
|
|
3751
3988
|
return [
|
|
3752
|
-
colorCss$
|
|
3753
|
-
styleCss$
|
|
3754
|
-
tokensCss$
|
|
3989
|
+
colorCss$5,
|
|
3990
|
+
styleCss$6,
|
|
3991
|
+
tokensCss$4
|
|
3755
3992
|
];
|
|
3756
3993
|
}
|
|
3757
3994
|
|
|
@@ -3800,7 +4037,7 @@ class AuroHelpText extends i$2 {
|
|
|
3800
4037
|
*
|
|
3801
4038
|
*/
|
|
3802
4039
|
static register(name = "auro-helptext") {
|
|
3803
|
-
AuroLibraryRuntimeUtils$
|
|
4040
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
3804
4041
|
}
|
|
3805
4042
|
|
|
3806
4043
|
updated() {
|
|
@@ -3854,9 +4091,9 @@ class AuroHelpText extends i$2 {
|
|
|
3854
4091
|
</div>
|
|
3855
4092
|
`;
|
|
3856
4093
|
}
|
|
3857
|
-
}
|
|
4094
|
+
};
|
|
3858
4095
|
|
|
3859
|
-
var helpTextVersion = '1.0.0';
|
|
4096
|
+
var helpTextVersion$1 = '1.0.0';
|
|
3860
4097
|
|
|
3861
4098
|
let AuroElement$2 = class AuroElement extends i$2 {
|
|
3862
4099
|
static get properties() {
|
|
@@ -3976,12 +4213,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
3976
4213
|
this.matchWidth = false;
|
|
3977
4214
|
this.noHideOnThisFocusLoss = false;
|
|
3978
4215
|
|
|
3979
|
-
this.errorMessage = ''; // TODO
|
|
4216
|
+
this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
|
|
3980
4217
|
|
|
3981
4218
|
// Layout Config
|
|
3982
|
-
this.layout = '
|
|
4219
|
+
this.layout = 'classic';
|
|
3983
4220
|
this.shape = 'rounded';
|
|
3984
4221
|
this.size = 'xl';
|
|
4222
|
+
this.parentBorder = false;
|
|
3985
4223
|
|
|
3986
4224
|
this.privateDefaults();
|
|
3987
4225
|
}
|
|
@@ -3997,7 +4235,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
3997
4235
|
'trigger': true,
|
|
3998
4236
|
'wrapper': true,
|
|
3999
4237
|
'hasFocus': this.hasFocus,
|
|
4000
|
-
'simple': this.simple
|
|
4238
|
+
'simple': this.simple,
|
|
4239
|
+
'parentBorder': this.parentBorder
|
|
4001
4240
|
};
|
|
4002
4241
|
}
|
|
4003
4242
|
|
|
@@ -4049,7 +4288,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4049
4288
|
/**
|
|
4050
4289
|
* @private
|
|
4051
4290
|
*/
|
|
4052
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4291
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
4053
4292
|
|
|
4054
4293
|
/**
|
|
4055
4294
|
* @private
|
|
@@ -4074,7 +4313,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4074
4313
|
/**
|
|
4075
4314
|
* @private
|
|
4076
4315
|
*/
|
|
4077
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4316
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion$1, AuroHelpText$1);
|
|
4078
4317
|
|
|
4079
4318
|
/**
|
|
4080
4319
|
* @private
|
|
@@ -4264,6 +4503,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4264
4503
|
reflect: true
|
|
4265
4504
|
},
|
|
4266
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
|
+
|
|
4267
4515
|
/**
|
|
4268
4516
|
* If declared, the popover and trigger will be set to the same width.
|
|
4269
4517
|
*/
|
|
@@ -4366,10 +4614,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4366
4614
|
static get styles() {
|
|
4367
4615
|
return [
|
|
4368
4616
|
colorCss$1$2,
|
|
4369
|
-
styleCss$1$2,
|
|
4370
4617
|
tokensCss$1$1,
|
|
4618
|
+
|
|
4619
|
+
// default layout
|
|
4620
|
+
classicColorCss,
|
|
4621
|
+
classicLayoutCss,
|
|
4622
|
+
|
|
4623
|
+
// emphasized layout
|
|
4371
4624
|
styleEmphasizedCss,
|
|
4625
|
+
|
|
4626
|
+
// snowflake layout
|
|
4372
4627
|
styleSnowflakeCss,
|
|
4628
|
+
|
|
4373
4629
|
shapeSizeCss
|
|
4374
4630
|
];
|
|
4375
4631
|
}
|
|
@@ -4383,7 +4639,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4383
4639
|
*
|
|
4384
4640
|
*/
|
|
4385
4641
|
static register(name = "auro-dropdown") {
|
|
4386
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
4642
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
|
|
4387
4643
|
}
|
|
4388
4644
|
|
|
4389
4645
|
/**
|
|
@@ -4716,11 +4972,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4716
4972
|
*
|
|
4717
4973
|
* @private
|
|
4718
4974
|
* @method handleDefaultSlot
|
|
4719
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4720
4975
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4721
4976
|
*/
|
|
4722
|
-
handleDefaultSlot(
|
|
4723
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
4977
|
+
handleDefaultSlot() {
|
|
4724
4978
|
|
|
4725
4979
|
if (this.onSlotChange) {
|
|
4726
4980
|
this.onSlotChange();
|
|
@@ -4763,7 +5017,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4763
5017
|
id="trigger"
|
|
4764
5018
|
class="${e(this.commonWrapperClasses)}" part="wrapper"
|
|
4765
5019
|
tabindex="${this.tabIndex}"
|
|
4766
|
-
?showBorder="${this.showTriggerBorders}"
|
|
4767
5020
|
role="${o(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4768
5021
|
aria-expanded="${o(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4769
5022
|
aria-controls="${o(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -4783,6 +5036,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4783
5036
|
${this.chevron || this.common ? u`
|
|
4784
5037
|
<div
|
|
4785
5038
|
id="showStateIcon"
|
|
5039
|
+
class="chevron"
|
|
4786
5040
|
part="chevron">
|
|
4787
5041
|
<${this.iconTag}
|
|
4788
5042
|
category="interface"
|
|
@@ -4797,9 +5051,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4797
5051
|
<div class="${e(helpTextClasses)}">
|
|
4798
5052
|
<slot name="helpText"></slot>
|
|
4799
5053
|
</div>
|
|
4800
|
-
<div class="slotContent">
|
|
4801
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4802
|
-
</div>
|
|
4803
5054
|
<div id="bibSizer" part="size"></div>
|
|
4804
5055
|
<${this.dropdownBibTag}
|
|
4805
5056
|
id="bib"
|
|
@@ -4808,6 +5059,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4808
5059
|
?common="${this.common}"
|
|
4809
5060
|
?rounded="${this.common || this.rounded}"
|
|
4810
5061
|
?inset="${this.common || this.inset}">
|
|
5062
|
+
<div class="slotContent">
|
|
5063
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5064
|
+
</div>
|
|
4811
5065
|
</${this.dropdownBibTag}>
|
|
4812
5066
|
</div>
|
|
4813
5067
|
`;
|
|
@@ -4819,6 +5073,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4819
5073
|
* @returns {html} - Returns HTML for the classic layout.
|
|
4820
5074
|
*/
|
|
4821
5075
|
renderLayoutClassic() {
|
|
5076
|
+
|
|
4822
5077
|
return u`
|
|
4823
5078
|
<div>
|
|
4824
5079
|
<div
|
|
@@ -4856,9 +5111,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4856
5111
|
</div>
|
|
4857
5112
|
` : undefined }
|
|
4858
5113
|
</div>
|
|
4859
|
-
|
|
4860
|
-
<slot
|
|
4861
|
-
|
|
5114
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5115
|
+
<slot name="helpText"></slot>
|
|
5116
|
+
</${this.helpTextTag}>
|
|
5117
|
+
|
|
4862
5118
|
<div id="bibSizer" part="size"></div>
|
|
4863
5119
|
<${this.dropdownBibTag}
|
|
4864
5120
|
id="bib"
|
|
@@ -4868,6 +5124,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4868
5124
|
?rounded="${this.common || this.rounded}"
|
|
4869
5125
|
?inset="${this.common || this.inset}"
|
|
4870
5126
|
>
|
|
5127
|
+
<div class="slotContent">
|
|
5128
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5129
|
+
</div>
|
|
4871
5130
|
</${this.dropdownBibTag}>
|
|
4872
5131
|
</div>
|
|
4873
5132
|
`;
|
|
@@ -4950,7 +5209,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
4950
5209
|
|
|
4951
5210
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4952
5211
|
|
|
4953
|
-
class AuroLibraryRuntimeUtils {
|
|
5212
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
4954
5213
|
|
|
4955
5214
|
/* eslint-disable jsdoc/require-param */
|
|
4956
5215
|
|
|
@@ -5011,7 +5270,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
5011
5270
|
|
|
5012
5271
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
5013
5272
|
}
|
|
5014
|
-
}
|
|
5273
|
+
};
|
|
5015
5274
|
|
|
5016
5275
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5017
5276
|
// See LICENSE in the project root for license information.
|
|
@@ -5203,35 +5462,105 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
5203
5462
|
}
|
|
5204
5463
|
};
|
|
5205
5464
|
|
|
5206
|
-
var tokensCss$
|
|
5465
|
+
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)}`;
|
|
5207
5466
|
|
|
5208
|
-
var colorCss$
|
|
5467
|
+
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)}`;
|
|
5209
5468
|
|
|
5210
|
-
// Copyright (c)
|
|
5469
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5211
5470
|
// See LICENSE in the project root for license information.
|
|
5212
5471
|
|
|
5472
|
+
// ---------------------------------------------------------------------
|
|
5213
5473
|
|
|
5214
|
-
|
|
5215
|
-
constructor() {
|
|
5216
|
-
super();
|
|
5474
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5217
5475
|
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5476
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5477
|
+
|
|
5478
|
+
/* eslint-disable jsdoc/require-param */
|
|
5221
5479
|
|
|
5222
5480
|
/**
|
|
5223
|
-
*
|
|
5224
|
-
* @
|
|
5481
|
+
* This will register a new custom element with the browser.
|
|
5482
|
+
* @param {String} name - The name of the custom element.
|
|
5483
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5225
5484
|
* @returns {void}
|
|
5226
5485
|
*/
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5486
|
+
registerComponent(name, componentClass) {
|
|
5487
|
+
if (!customElements.get(name)) {
|
|
5488
|
+
customElements.define(name, class extends componentClass {});
|
|
5489
|
+
}
|
|
5230
5490
|
}
|
|
5231
5491
|
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5492
|
+
/**
|
|
5493
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5494
|
+
* @returns {void}
|
|
5495
|
+
*/
|
|
5496
|
+
closestElement(
|
|
5497
|
+
selector, // selector like in .closest()
|
|
5498
|
+
base = this, // extra functionality to skip a parent
|
|
5499
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5500
|
+
!el || el === document || el === window
|
|
5501
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5502
|
+
: found
|
|
5503
|
+
? found // found a selector INside this element
|
|
5504
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5505
|
+
) {
|
|
5506
|
+
return __Closest(base);
|
|
5507
|
+
}
|
|
5508
|
+
/* eslint-enable jsdoc/require-param */
|
|
5509
|
+
|
|
5510
|
+
/**
|
|
5511
|
+
* 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.
|
|
5512
|
+
* @param {Object} elem - The element to check.
|
|
5513
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5514
|
+
* @returns {void}
|
|
5515
|
+
*/
|
|
5516
|
+
handleComponentTagRename(elem, tagName) {
|
|
5517
|
+
const tag = tagName.toLowerCase();
|
|
5518
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5519
|
+
|
|
5520
|
+
if (elemTag !== tag) {
|
|
5521
|
+
elem.setAttribute(tag, true);
|
|
5522
|
+
}
|
|
5523
|
+
}
|
|
5524
|
+
|
|
5525
|
+
/**
|
|
5526
|
+
* Validates if an element is a specific Auro component.
|
|
5527
|
+
* @param {Object} elem - The element to validate.
|
|
5528
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5529
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5530
|
+
*/
|
|
5531
|
+
elementMatch(elem, tagName) {
|
|
5532
|
+
const tag = tagName.toLowerCase();
|
|
5533
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5534
|
+
|
|
5535
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5536
|
+
}
|
|
5537
|
+
};
|
|
5538
|
+
|
|
5539
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5540
|
+
// See LICENSE in the project root for license information.
|
|
5541
|
+
|
|
5542
|
+
|
|
5543
|
+
let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
5544
|
+
constructor() {
|
|
5545
|
+
super();
|
|
5546
|
+
|
|
5547
|
+
this.variant = undefined;
|
|
5548
|
+
this.privateDefaults();
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5551
|
+
/**
|
|
5552
|
+
* Internal Defaults.
|
|
5553
|
+
* @private
|
|
5554
|
+
* @returns {void}
|
|
5555
|
+
*/
|
|
5556
|
+
privateDefaults() {
|
|
5557
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5558
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5559
|
+
}
|
|
5560
|
+
|
|
5561
|
+
// function to define props used within the scope of this component
|
|
5562
|
+
static get properties() {
|
|
5563
|
+
return {
|
|
5235
5564
|
...super.properties,
|
|
5236
5565
|
|
|
5237
5566
|
/**
|
|
@@ -5293,9 +5622,9 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5293
5622
|
static get styles() {
|
|
5294
5623
|
return [
|
|
5295
5624
|
super.styles,
|
|
5296
|
-
i$5`${tokensCss$
|
|
5625
|
+
i$5`${tokensCss$3}`,
|
|
5297
5626
|
i$5`${styleCss$1$1}`,
|
|
5298
|
-
i$5`${colorCss$
|
|
5627
|
+
i$5`${colorCss$4}`
|
|
5299
5628
|
];
|
|
5300
5629
|
}
|
|
5301
5630
|
|
|
@@ -5308,7 +5637,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5308
5637
|
*
|
|
5309
5638
|
*/
|
|
5310
5639
|
static register(name = "auro-icon") {
|
|
5311
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
5640
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
5312
5641
|
}
|
|
5313
5642
|
|
|
5314
5643
|
connectedCallback() {
|
|
@@ -5376,7 +5705,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
5376
5705
|
|
|
5377
5706
|
var iconVersion$1 = '8.0.3';
|
|
5378
5707
|
|
|
5379
|
-
var styleCss$
|
|
5708
|
+
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)}`;
|
|
5380
5709
|
|
|
5381
5710
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5382
5711
|
// See LICENSE in the project root for license information.
|
|
@@ -5405,7 +5734,7 @@ class AuroHeader extends i$2 {
|
|
|
5405
5734
|
/**
|
|
5406
5735
|
* @private
|
|
5407
5736
|
*/
|
|
5408
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5737
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
5409
5738
|
}
|
|
5410
5739
|
|
|
5411
5740
|
// function to define props used within the scope of this component
|
|
@@ -5423,7 +5752,7 @@ class AuroHeader extends i$2 {
|
|
|
5423
5752
|
}
|
|
5424
5753
|
|
|
5425
5754
|
static get styles() {
|
|
5426
|
-
return [styleCss$
|
|
5755
|
+
return [styleCss$5];
|
|
5427
5756
|
}
|
|
5428
5757
|
|
|
5429
5758
|
/**
|
|
@@ -5435,7 +5764,7 @@ class AuroHeader extends i$2 {
|
|
|
5435
5764
|
*
|
|
5436
5765
|
*/
|
|
5437
5766
|
static register(name = "auro-header") {
|
|
5438
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
5767
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroHeader);
|
|
5439
5768
|
}
|
|
5440
5769
|
|
|
5441
5770
|
firstUpdated() {
|
|
@@ -5531,7 +5860,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
5531
5860
|
|
|
5532
5861
|
this.large = false;
|
|
5533
5862
|
|
|
5534
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5863
|
+
AuroLibraryRuntimeUtils$1$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5535
5864
|
|
|
5536
5865
|
const versioning = new AuroDependencyVersioning();
|
|
5537
5866
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
@@ -5570,7 +5899,7 @@ class AuroBibtemplate extends i$2 {
|
|
|
5570
5899
|
*
|
|
5571
5900
|
*/
|
|
5572
5901
|
static register(name = "auro-bibtemplate") {
|
|
5573
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
5902
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
5574
5903
|
}
|
|
5575
5904
|
|
|
5576
5905
|
/**
|
|
@@ -5610,6 +5939,18 @@ class AuroBibtemplate extends i$2 {
|
|
|
5610
5939
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
5611
5940
|
}
|
|
5612
5941
|
|
|
5942
|
+
firstUpdated(changedProperties) {
|
|
5943
|
+
super.firstUpdated(changedProperties);
|
|
5944
|
+
|
|
5945
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
5946
|
+
bubbles: true,
|
|
5947
|
+
composed: true,
|
|
5948
|
+
detail: {
|
|
5949
|
+
element: this
|
|
5950
|
+
}
|
|
5951
|
+
}));
|
|
5952
|
+
}
|
|
5953
|
+
|
|
5613
5954
|
// function that renders the HTML and CSS into the scope of the component
|
|
5614
5955
|
render() {
|
|
5615
5956
|
return u`
|
|
@@ -5631,16 +5972,224 @@ class AuroBibtemplate extends i$2 {
|
|
|
5631
5972
|
<slot></slot>
|
|
5632
5973
|
</div>
|
|
5633
5974
|
|
|
5634
|
-
${this.isFullscreen ? u`
|
|
5635
|
-
<div id="footerContainer">
|
|
5636
|
-
<slot name="footer"></slot>
|
|
5637
|
-
</div>` : null}
|
|
5975
|
+
${this.isFullscreen ? u`
|
|
5976
|
+
<div id="footerContainer">
|
|
5977
|
+
<slot name="footer"></slot>
|
|
5978
|
+
</div>` : null}
|
|
5979
|
+
</div>
|
|
5980
|
+
`;
|
|
5981
|
+
}
|
|
5982
|
+
}
|
|
5983
|
+
|
|
5984
|
+
var bibTemplateVersion = '1.0.0';
|
|
5985
|
+
|
|
5986
|
+
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)}`;
|
|
5987
|
+
|
|
5988
|
+
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}`;
|
|
5989
|
+
|
|
5990
|
+
var tokensCss$2 = i$5`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5991
|
+
|
|
5992
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5993
|
+
// See LICENSE in the project root for license information.
|
|
5994
|
+
|
|
5995
|
+
// ---------------------------------------------------------------------
|
|
5996
|
+
|
|
5997
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5998
|
+
|
|
5999
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
6000
|
+
|
|
6001
|
+
/* eslint-disable jsdoc/require-param */
|
|
6002
|
+
|
|
6003
|
+
/**
|
|
6004
|
+
* This will register a new custom element with the browser.
|
|
6005
|
+
* @param {String} name - The name of the custom element.
|
|
6006
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6007
|
+
* @returns {void}
|
|
6008
|
+
*/
|
|
6009
|
+
registerComponent(name, componentClass) {
|
|
6010
|
+
if (!customElements.get(name)) {
|
|
6011
|
+
customElements.define(name, class extends componentClass {});
|
|
6012
|
+
}
|
|
6013
|
+
}
|
|
6014
|
+
|
|
6015
|
+
/**
|
|
6016
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6017
|
+
* @returns {void}
|
|
6018
|
+
*/
|
|
6019
|
+
closestElement(
|
|
6020
|
+
selector, // selector like in .closest()
|
|
6021
|
+
base = this, // extra functionality to skip a parent
|
|
6022
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6023
|
+
!el || el === document || el === window
|
|
6024
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6025
|
+
: found
|
|
6026
|
+
? found // found a selector INside this element
|
|
6027
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6028
|
+
) {
|
|
6029
|
+
return __Closest(base);
|
|
6030
|
+
}
|
|
6031
|
+
/* eslint-enable jsdoc/require-param */
|
|
6032
|
+
|
|
6033
|
+
/**
|
|
6034
|
+
* 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.
|
|
6035
|
+
* @param {Object} elem - The element to check.
|
|
6036
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6037
|
+
* @returns {void}
|
|
6038
|
+
*/
|
|
6039
|
+
handleComponentTagRename(elem, tagName) {
|
|
6040
|
+
const tag = tagName.toLowerCase();
|
|
6041
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6042
|
+
|
|
6043
|
+
if (elemTag !== tag) {
|
|
6044
|
+
elem.setAttribute(tag, true);
|
|
6045
|
+
}
|
|
6046
|
+
}
|
|
6047
|
+
|
|
6048
|
+
/**
|
|
6049
|
+
* Validates if an element is a specific Auro component.
|
|
6050
|
+
* @param {Object} elem - The element to validate.
|
|
6051
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6052
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6053
|
+
*/
|
|
6054
|
+
elementMatch(elem, tagName) {
|
|
6055
|
+
const tag = tagName.toLowerCase();
|
|
6056
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6057
|
+
|
|
6058
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6059
|
+
}
|
|
6060
|
+
};
|
|
6061
|
+
|
|
6062
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6063
|
+
// See LICENSE in the project root for license information.
|
|
6064
|
+
|
|
6065
|
+
|
|
6066
|
+
/**
|
|
6067
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6068
|
+
*
|
|
6069
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6070
|
+
*/
|
|
6071
|
+
class AuroHelpText extends i$2 {
|
|
6072
|
+
|
|
6073
|
+
constructor() {
|
|
6074
|
+
super();
|
|
6075
|
+
|
|
6076
|
+
this.error = false;
|
|
6077
|
+
this.onDark = false;
|
|
6078
|
+
this.hasTextContent = false;
|
|
6079
|
+
|
|
6080
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
6081
|
+
}
|
|
6082
|
+
|
|
6083
|
+
static get styles() {
|
|
6084
|
+
return [
|
|
6085
|
+
colorCss$3,
|
|
6086
|
+
styleCss$4,
|
|
6087
|
+
tokensCss$2
|
|
6088
|
+
];
|
|
6089
|
+
}
|
|
6090
|
+
|
|
6091
|
+
// function to define props used within the scope of this component
|
|
6092
|
+
static get properties() {
|
|
6093
|
+
return {
|
|
6094
|
+
|
|
6095
|
+
/**
|
|
6096
|
+
* @private
|
|
6097
|
+
*/
|
|
6098
|
+
slotNodes: {
|
|
6099
|
+
type: Boolean,
|
|
6100
|
+
},
|
|
6101
|
+
|
|
6102
|
+
/**
|
|
6103
|
+
* @private
|
|
6104
|
+
*/
|
|
6105
|
+
hasTextContent: {
|
|
6106
|
+
type: Boolean,
|
|
6107
|
+
},
|
|
6108
|
+
|
|
6109
|
+
/**
|
|
6110
|
+
* If declared, make font color red.
|
|
6111
|
+
*/
|
|
6112
|
+
error: {
|
|
6113
|
+
type: Boolean,
|
|
6114
|
+
reflect: true,
|
|
6115
|
+
},
|
|
6116
|
+
|
|
6117
|
+
/**
|
|
6118
|
+
* If declared, will apply onDark styles.
|
|
6119
|
+
*/
|
|
6120
|
+
onDark: {
|
|
6121
|
+
type: Boolean,
|
|
6122
|
+
reflect: true
|
|
6123
|
+
}
|
|
6124
|
+
};
|
|
6125
|
+
}
|
|
6126
|
+
|
|
6127
|
+
/**
|
|
6128
|
+
* This will register this element with the browser.
|
|
6129
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
6130
|
+
*
|
|
6131
|
+
* @example
|
|
6132
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
6133
|
+
*
|
|
6134
|
+
*/
|
|
6135
|
+
static register(name = "auro-helptext") {
|
|
6136
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHelpText);
|
|
6137
|
+
}
|
|
6138
|
+
|
|
6139
|
+
updated() {
|
|
6140
|
+
this.handleSlotChange();
|
|
6141
|
+
}
|
|
6142
|
+
|
|
6143
|
+
handleSlotChange(event) {
|
|
6144
|
+
if (event) {
|
|
6145
|
+
this.slotNodes = event.target.assignedNodes();
|
|
6146
|
+
}
|
|
6147
|
+
|
|
6148
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
6149
|
+
}
|
|
6150
|
+
|
|
6151
|
+
/**
|
|
6152
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
6153
|
+
*
|
|
6154
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
6155
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
6156
|
+
* @private
|
|
6157
|
+
*/
|
|
6158
|
+
checkSlotsForContent(nodes) {
|
|
6159
|
+
if (!nodes) {
|
|
6160
|
+
return false;
|
|
6161
|
+
}
|
|
6162
|
+
|
|
6163
|
+
return nodes.some((node) => {
|
|
6164
|
+
if (node.textContent.trim()) {
|
|
6165
|
+
return true;
|
|
6166
|
+
}
|
|
6167
|
+
|
|
6168
|
+
if (!node.querySelector) {
|
|
6169
|
+
return false;
|
|
6170
|
+
}
|
|
6171
|
+
|
|
6172
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
6173
|
+
if (!nestedSlot) {
|
|
6174
|
+
return false;
|
|
6175
|
+
}
|
|
6176
|
+
|
|
6177
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
6178
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
6179
|
+
});
|
|
6180
|
+
}
|
|
6181
|
+
|
|
6182
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6183
|
+
render() {
|
|
6184
|
+
return x`
|
|
6185
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
6186
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
5638
6187
|
</div>
|
|
5639
|
-
|
|
6188
|
+
`;
|
|
5640
6189
|
}
|
|
5641
6190
|
}
|
|
5642
6191
|
|
|
5643
|
-
var
|
|
6192
|
+
var helpTextVersion = '1.0.0';
|
|
5644
6193
|
|
|
5645
6194
|
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)}`;
|
|
5646
6195
|
|
|
@@ -5664,7 +6213,7 @@ i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-border-divider, rgb
|
|
|
5664
6213
|
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
5665
6214
|
* or if the value cannot be parsed into an array from a JSON string.
|
|
5666
6215
|
*/
|
|
5667
|
-
function arrayConverter
|
|
6216
|
+
function arrayConverter(value) {
|
|
5668
6217
|
// Allow undefined
|
|
5669
6218
|
if (value === undefined) {
|
|
5670
6219
|
return undefined;
|
|
@@ -5693,61 +6242,6 @@ function arrayConverter$1(value) {
|
|
|
5693
6242
|
throw new Error('Invalid value: Input must be an array or undefined');
|
|
5694
6243
|
}
|
|
5695
6244
|
|
|
5696
|
-
/**
|
|
5697
|
-
* Compare two arrays for equality.
|
|
5698
|
-
* @private
|
|
5699
|
-
* @param {Array} arr1 - First array to compare.
|
|
5700
|
-
* @param {Array} arr2 - Second array to compare.
|
|
5701
|
-
* @returns {boolean} True if arrays are equal.
|
|
5702
|
-
*/
|
|
5703
|
-
function arraysAreEqual$1(arr1, arr2) {
|
|
5704
|
-
// If both arrays undefined, they are equal (true)
|
|
5705
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
5706
|
-
return arr1 === arr2;
|
|
5707
|
-
}
|
|
5708
|
-
|
|
5709
|
-
// If arrays have different lengths, they are not equal
|
|
5710
|
-
if (arr1.length !== arr2.length) {
|
|
5711
|
-
return false;
|
|
5712
|
-
}
|
|
5713
|
-
|
|
5714
|
-
// If every item at each index is the same, return true
|
|
5715
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
5716
|
-
if (arr1[index] !== arr2[index]) {
|
|
5717
|
-
return false;
|
|
5718
|
-
}
|
|
5719
|
-
}
|
|
5720
|
-
return true;
|
|
5721
|
-
}
|
|
5722
|
-
|
|
5723
|
-
/**
|
|
5724
|
-
* Compares array for changes.
|
|
5725
|
-
* @private
|
|
5726
|
-
* @param {Array|any} newVal - New value to compare.
|
|
5727
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
5728
|
-
* @returns {boolean} True if arrays have changed.
|
|
5729
|
-
*/
|
|
5730
|
-
function arrayOrUndefinedHasChanged$1(newVal, oldVal) {
|
|
5731
|
-
try {
|
|
5732
|
-
// Check if values are undefined or arrays
|
|
5733
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
5734
|
-
|
|
5735
|
-
// If non-array or non-undefined, throw error
|
|
5736
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
5737
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
5738
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
5739
|
-
}
|
|
5740
|
-
|
|
5741
|
-
// Return true if arrays have changed, false if they are the same
|
|
5742
|
-
return !arraysAreEqual$1(newVal, oldVal);
|
|
5743
|
-
} catch (error) {
|
|
5744
|
-
/* eslint-disable no-console */
|
|
5745
|
-
console.error(error);
|
|
5746
|
-
// If validation fails, it has changed
|
|
5747
|
-
return true;
|
|
5748
|
-
}
|
|
5749
|
-
}
|
|
5750
|
-
|
|
5751
6245
|
i$5`:host{display:flex;align-items:center;padding:var(--ds-size-50, 0.25rem) var(--ds-size-200, 1rem) var(--ds-size-50, 0.25rem) 0;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host [auro-icon]{--ds-auro-icon-size: var(--ds-size-300, 1.5rem);margin-right:var(--ds-size-150, 0.75rem);margin-left:var(--ds-size-100, 0.5rem)}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--ds-size-300, 1.5rem)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){user-select:none;pointer-events:none}`;
|
|
5752
6246
|
|
|
5753
6247
|
i$5`:host{background-color:var(--ds-auro-menuoption-container-color);color:var(--ds-auro-menuoption-text-color)}:host svg{fill:var(--ds-auro-menuoption-icon-color)}:host([disabled]){--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:hover),:host(.active){--ds-auro-menuoption-container-color: var(--ds-basic-color-surface-neutral-subtle, #f7f7f7)}:host([selected]){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected, #01426a);--ds-auro-menuoption-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-menuoption-icon-color: var(--ds-basic-color-texticon-inverse, #ffffff)}:host([selected]):host(:hover),:host([selected]):host(.active){--ds-auro-menuoption-container-color: var(--ds-advanced-color-state-selected-hover, #00274a)}`;
|
|
@@ -5758,7 +6252,7 @@ i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
|
|
|
5758
6252
|
|
|
5759
6253
|
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)}`;
|
|
5760
6254
|
|
|
5761
|
-
var styleCss$3 = i$5
|
|
6255
|
+
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:1;flex-direction:column;align-items:center;justify-content:center}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;align-items:center;justify-content: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;width:100%;align-items:center;justify-content:center;padding:0 8px 0 24px}.layout-emphasized .triggerContent,.layout-snowflake .triggerContent{display:flex;width:100%;align-items:center;justify-content:center;padding:0 8px 0 24px}.layout-classic .triggerContent{display:flex;width:100%;align-items:center;justify-content:center;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}`;
|
|
5762
6256
|
|
|
5763
6257
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5764
6258
|
// See LICENSE in the project root for license information.
|
|
@@ -5773,14 +6267,15 @@ var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
5773
6267
|
* @slot label - Defines the content of the label.
|
|
5774
6268
|
* @slot helpText - Defines the content of the helpText.
|
|
5775
6269
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6270
|
+
* @slot valueText - Dropdown value text display.
|
|
5776
6271
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
5777
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
6272
|
+
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
5778
6273
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
5779
6274
|
* @csspart helpText - Apply CSS to the help text.
|
|
5780
6275
|
*/
|
|
5781
6276
|
|
|
5782
6277
|
// build the component class
|
|
5783
|
-
class AuroSelect extends
|
|
6278
|
+
class AuroSelect extends AuroElement$3 {
|
|
5784
6279
|
constructor() {
|
|
5785
6280
|
super();
|
|
5786
6281
|
|
|
@@ -5790,12 +6285,21 @@ class AuroSelect extends i$2 {
|
|
|
5790
6285
|
const idSubstrEnd = 8;
|
|
5791
6286
|
const idSubstrStart = 2;
|
|
5792
6287
|
|
|
6288
|
+
this.matchWidth = true;
|
|
6289
|
+
|
|
6290
|
+
// Layout Config
|
|
6291
|
+
this.layout = 'classic';
|
|
6292
|
+
this.shape = 'classic';
|
|
6293
|
+
this.size = 'xl';
|
|
6294
|
+
|
|
5793
6295
|
// floaterConfig
|
|
5794
6296
|
this.placement = 'bottom-start';
|
|
5795
6297
|
this.offset = 0;
|
|
5796
6298
|
this.noFlip = false;
|
|
5797
6299
|
this.autoPlacement = false;
|
|
5798
6300
|
|
|
6301
|
+
this.forceDisplayValue = false;
|
|
6302
|
+
|
|
5799
6303
|
/**
|
|
5800
6304
|
* @private
|
|
5801
6305
|
*/
|
|
@@ -5811,7 +6315,7 @@ class AuroSelect extends i$2 {
|
|
|
5811
6315
|
/**
|
|
5812
6316
|
* @private
|
|
5813
6317
|
*/
|
|
5814
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6318
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5815
6319
|
|
|
5816
6320
|
/**
|
|
5817
6321
|
* Generate unique names for dependency components.
|
|
@@ -5828,10 +6332,25 @@ class AuroSelect extends i$2 {
|
|
|
5828
6332
|
*/
|
|
5829
6333
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-select-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
5830
6334
|
|
|
6335
|
+
/**
|
|
6336
|
+
* @private
|
|
6337
|
+
*/
|
|
6338
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
6339
|
+
|
|
5831
6340
|
/**
|
|
5832
6341
|
* @private
|
|
5833
6342
|
*/
|
|
5834
6343
|
this.isHiddenWhileLoading = false;
|
|
6344
|
+
|
|
6345
|
+
/**
|
|
6346
|
+
* @private
|
|
6347
|
+
*/
|
|
6348
|
+
this.hasFocus = false;
|
|
6349
|
+
|
|
6350
|
+
/**
|
|
6351
|
+
* @private
|
|
6352
|
+
*/
|
|
6353
|
+
this.hasDisplayValueContent = false;
|
|
5835
6354
|
}
|
|
5836
6355
|
|
|
5837
6356
|
/**
|
|
@@ -5845,6 +6364,7 @@ class AuroSelect extends i$2 {
|
|
|
5845
6364
|
this.value = undefined;
|
|
5846
6365
|
this.fullscreenBreakpoint = 'sm';
|
|
5847
6366
|
this.onDark = false;
|
|
6367
|
+
this.isPopoverVisible = false;
|
|
5848
6368
|
}
|
|
5849
6369
|
|
|
5850
6370
|
// This function is to define props used within the scope of this component
|
|
@@ -5861,6 +6381,14 @@ class AuroSelect extends i$2 {
|
|
|
5861
6381
|
reflect: true
|
|
5862
6382
|
},
|
|
5863
6383
|
|
|
6384
|
+
/**
|
|
6385
|
+
* If declared, the label and value will be visually hidden and the displayValue will render 100% of the time.
|
|
6386
|
+
*/
|
|
6387
|
+
forceDisplayValue: {
|
|
6388
|
+
type: Boolean,
|
|
6389
|
+
reflect: true
|
|
6390
|
+
},
|
|
6391
|
+
|
|
5864
6392
|
/**
|
|
5865
6393
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
5866
6394
|
* @default false
|
|
@@ -5878,6 +6406,22 @@ class AuroSelect extends i$2 {
|
|
|
5878
6406
|
reflect: true
|
|
5879
6407
|
},
|
|
5880
6408
|
|
|
6409
|
+
/**
|
|
6410
|
+
* @private
|
|
6411
|
+
*/
|
|
6412
|
+
isPopoverVisible: {
|
|
6413
|
+
type: Boolean,
|
|
6414
|
+
reflect: false
|
|
6415
|
+
},
|
|
6416
|
+
|
|
6417
|
+
/**
|
|
6418
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
6419
|
+
*/
|
|
6420
|
+
matchWidth: {
|
|
6421
|
+
type: Boolean,
|
|
6422
|
+
reflect: true
|
|
6423
|
+
},
|
|
6424
|
+
|
|
5881
6425
|
/**
|
|
5882
6426
|
* The name for the select element.
|
|
5883
6427
|
*/
|
|
@@ -5909,7 +6453,7 @@ class AuroSelect extends i$2 {
|
|
|
5909
6453
|
|
|
5910
6454
|
/**
|
|
5911
6455
|
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
5912
|
-
* Otherwise, Heading 600
|
|
6456
|
+
* Otherwise, Heading 600.
|
|
5913
6457
|
*/
|
|
5914
6458
|
largeFullscreenHeadline: {
|
|
5915
6459
|
type: Boolean,
|
|
@@ -5967,12 +6511,11 @@ class AuroSelect extends i$2 {
|
|
|
5967
6511
|
},
|
|
5968
6512
|
|
|
5969
6513
|
/**
|
|
5970
|
-
* Specifies the current selected menuOption.
|
|
6514
|
+
* Specifies the current selected menuOption. Default type is `HTMLElement`, changing to `Array<HTMLElement>` when `multiSelect` is true.
|
|
6515
|
+
* @type {HTMLElement|Array<HTMLElement>}
|
|
5971
6516
|
*/
|
|
5972
6517
|
optionSelected: {
|
|
5973
|
-
|
|
5974
|
-
converter: arrayConverter$1,
|
|
5975
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
6518
|
+
type: Object
|
|
5976
6519
|
},
|
|
5977
6520
|
|
|
5978
6521
|
/**
|
|
@@ -6042,12 +6585,11 @@ class AuroSelect extends i$2 {
|
|
|
6042
6585
|
},
|
|
6043
6586
|
|
|
6044
6587
|
/**
|
|
6045
|
-
* Value selected for the component.
|
|
6588
|
+
* Value selected for the component. Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
6589
|
+
* @type {String|Array<String>}
|
|
6046
6590
|
*/
|
|
6047
6591
|
value: {
|
|
6048
|
-
|
|
6049
|
-
converter: arrayConverter$1,
|
|
6050
|
-
hasChanged: arrayOrUndefinedHasChanged$1
|
|
6592
|
+
type: Object
|
|
6051
6593
|
},
|
|
6052
6594
|
|
|
6053
6595
|
/**
|
|
@@ -6069,12 +6611,45 @@ class AuroSelect extends i$2 {
|
|
|
6069
6611
|
type: Boolean,
|
|
6070
6612
|
reflect: true,
|
|
6071
6613
|
attribute: false
|
|
6072
|
-
}
|
|
6614
|
+
},
|
|
6615
|
+
|
|
6616
|
+
/**
|
|
6617
|
+
* @private
|
|
6618
|
+
*/
|
|
6619
|
+
hasFocus: {
|
|
6620
|
+
type: Boolean,
|
|
6621
|
+
reflect: false,
|
|
6622
|
+
attribute: false
|
|
6623
|
+
},
|
|
6624
|
+
|
|
6625
|
+
/**
|
|
6626
|
+
* @private
|
|
6627
|
+
*/
|
|
6628
|
+
hasDisplayValueContent: {
|
|
6629
|
+
type: Boolean,
|
|
6630
|
+
reflect: false,
|
|
6631
|
+
attribute: false
|
|
6632
|
+
},
|
|
6073
6633
|
};
|
|
6074
6634
|
}
|
|
6075
6635
|
|
|
6076
6636
|
static get styles() {
|
|
6077
|
-
return [
|
|
6637
|
+
return [
|
|
6638
|
+
i$5`${shapeSizeCss$1}`,
|
|
6639
|
+
i$5`${tokensCss$5}`,
|
|
6640
|
+
i$5`${styleCss$3}`,
|
|
6641
|
+
];
|
|
6642
|
+
}
|
|
6643
|
+
|
|
6644
|
+
/**
|
|
6645
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
6646
|
+
* @private
|
|
6647
|
+
* @returns {object} - Returns classmap.
|
|
6648
|
+
*/
|
|
6649
|
+
get commonWrapperClasses() {
|
|
6650
|
+
return {
|
|
6651
|
+
'wrapper': true
|
|
6652
|
+
};
|
|
6078
6653
|
}
|
|
6079
6654
|
|
|
6080
6655
|
/**
|
|
@@ -6084,11 +6659,13 @@ class AuroSelect extends i$2 {
|
|
|
6084
6659
|
*/
|
|
6085
6660
|
configureDropdown() {
|
|
6086
6661
|
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
6087
|
-
|
|
6662
|
+
|
|
6663
|
+
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6664
|
+
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
6665
|
+
});
|
|
6088
6666
|
|
|
6089
6667
|
// setting up bibtemplate
|
|
6090
|
-
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6091
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
6668
|
+
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$);
|
|
6092
6669
|
|
|
6093
6670
|
if (this.customBibWidth) {
|
|
6094
6671
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6107,7 +6684,7 @@ class AuroSelect extends i$2 {
|
|
|
6107
6684
|
*
|
|
6108
6685
|
*/
|
|
6109
6686
|
static register(name = "auro-select") {
|
|
6110
|
-
AuroLibraryRuntimeUtils$
|
|
6687
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroSelect);
|
|
6111
6688
|
}
|
|
6112
6689
|
|
|
6113
6690
|
/**
|
|
@@ -6118,21 +6695,34 @@ class AuroSelect extends i$2 {
|
|
|
6118
6695
|
updateDisplayedValue() {
|
|
6119
6696
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
6120
6697
|
|
|
6121
|
-
// Clear
|
|
6122
|
-
const
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
triggerContentEl.appendChild(placeholder);
|
|
6698
|
+
// Clear out old value
|
|
6699
|
+
const valueElem = triggerContentEl.querySelector('#value');
|
|
6700
|
+
if (valueElem) {
|
|
6701
|
+
valueElem.innerHTML = '';
|
|
6126
6702
|
}
|
|
6127
6703
|
|
|
6704
|
+
const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
|
|
6705
|
+
const slottedElements = slot.assignedElements();
|
|
6706
|
+
|
|
6707
|
+
slottedElements.forEach((element) => {
|
|
6708
|
+
element.remove();
|
|
6709
|
+
});
|
|
6710
|
+
|
|
6128
6711
|
// Handle selected options
|
|
6129
|
-
if (this.optionSelected
|
|
6130
|
-
|
|
6131
|
-
|
|
6712
|
+
if (this.optionSelected) {
|
|
6713
|
+
if (this.multiSelect && this.optionSelected.length > 0) {
|
|
6714
|
+
const displayText = this.optionSelected.map((option) => option.textContent).join(', ');
|
|
6715
|
+
|
|
6716
|
+
valueElem.textContent = displayText;
|
|
6717
|
+
} else {
|
|
6718
|
+
valueElem.innerHTML = this.optionSelected.innerHTML;
|
|
6719
|
+
const displayValueEl = this.optionSelected.querySelector("[slot='displayValue']");
|
|
6132
6720
|
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6721
|
+
if (displayValueEl) {
|
|
6722
|
+
this.appendChild(displayValueEl.cloneNode(true));
|
|
6723
|
+
}
|
|
6724
|
+
this.hasDisplayValueContent = displayValueEl !== null;
|
|
6725
|
+
}
|
|
6136
6726
|
}
|
|
6137
6727
|
|
|
6138
6728
|
this.dropdown.requestUpdate();
|
|
@@ -6211,8 +6801,6 @@ class AuroSelect extends i$2 {
|
|
|
6211
6801
|
* @returns {void}
|
|
6212
6802
|
*/
|
|
6213
6803
|
configureSelect() {
|
|
6214
|
-
// inject menu into menuWrapper
|
|
6215
|
-
this.menuWrapper.append(this.menu);
|
|
6216
6804
|
|
|
6217
6805
|
this.addEventListener('keydown', (evt) => {
|
|
6218
6806
|
if (evt.key === 'ArrowUp') {
|
|
@@ -6266,6 +6854,7 @@ class AuroSelect extends i$2 {
|
|
|
6266
6854
|
|
|
6267
6855
|
this.addEventListener('blur', () => {
|
|
6268
6856
|
this.validation.validate(this);
|
|
6857
|
+
this.hasFocus = false;
|
|
6269
6858
|
});
|
|
6270
6859
|
}
|
|
6271
6860
|
|
|
@@ -6341,6 +6930,7 @@ class AuroSelect extends i$2 {
|
|
|
6341
6930
|
*/
|
|
6342
6931
|
handleFocusin() {
|
|
6343
6932
|
|
|
6933
|
+
this.hasFocus = true;
|
|
6344
6934
|
this.touched = true;
|
|
6345
6935
|
}
|
|
6346
6936
|
|
|
@@ -6376,6 +6966,17 @@ class AuroSelect extends i$2 {
|
|
|
6376
6966
|
}
|
|
6377
6967
|
}
|
|
6378
6968
|
|
|
6969
|
+
/**
|
|
6970
|
+
* Resets all options to their default state.
|
|
6971
|
+
* @private
|
|
6972
|
+
*/
|
|
6973
|
+
clearSelection() {
|
|
6974
|
+
this.value = undefined;
|
|
6975
|
+
this.optionSelected = undefined;
|
|
6976
|
+
|
|
6977
|
+
this.menu.multiSelect = this.multiSelect;
|
|
6978
|
+
}
|
|
6979
|
+
|
|
6379
6980
|
/**
|
|
6380
6981
|
* Handle element attributes on update.
|
|
6381
6982
|
* @private
|
|
@@ -6412,13 +7013,20 @@ class AuroSelect extends i$2 {
|
|
|
6412
7013
|
|
|
6413
7014
|
// Set the initial value in auro-menu if defined
|
|
6414
7015
|
if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
|
|
7016
|
+
this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
|
|
6415
7017
|
this.menu.value = this.value;
|
|
6416
7018
|
}
|
|
6417
7019
|
}
|
|
6418
7020
|
|
|
6419
7021
|
async updated(changedProperties) {
|
|
7022
|
+
if (changedProperties.has('multiSelect')) {
|
|
7023
|
+
this.clearSelection();
|
|
7024
|
+
}
|
|
7025
|
+
|
|
6420
7026
|
if (changedProperties.has('value')) {
|
|
6421
7027
|
if (this.value) {
|
|
7028
|
+
this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
|
|
7029
|
+
|
|
6422
7030
|
this.menu.value = this.value;
|
|
6423
7031
|
|
|
6424
7032
|
// Wait for menu to finish updating its value
|
|
@@ -6443,6 +7051,10 @@ class AuroSelect extends i$2 {
|
|
|
6443
7051
|
bubbles: true,
|
|
6444
7052
|
cancelable: true,
|
|
6445
7053
|
composed: true,
|
|
7054
|
+
detail: {
|
|
7055
|
+
optionSelected: this.optionSelected,
|
|
7056
|
+
value: this.value
|
|
7057
|
+
}
|
|
6446
7058
|
}));
|
|
6447
7059
|
}
|
|
6448
7060
|
|
|
@@ -6464,56 +7076,350 @@ class AuroSelect extends i$2 {
|
|
|
6464
7076
|
}
|
|
6465
7077
|
|
|
6466
7078
|
/**
|
|
6467
|
-
* Hide dropdownbib.
|
|
7079
|
+
* Hide dropdownbib.
|
|
7080
|
+
* @private
|
|
7081
|
+
*/
|
|
7082
|
+
hideBib() {
|
|
7083
|
+
if (this.dropdown) {
|
|
7084
|
+
this.dropdown.hide();
|
|
7085
|
+
}
|
|
7086
|
+
}
|
|
7087
|
+
|
|
7088
|
+
/**
|
|
7089
|
+
* Validates value.
|
|
7090
|
+
* @param {boolean} [force=false] - Whether to force validation.
|
|
7091
|
+
*/
|
|
7092
|
+
validate(force = false) {
|
|
7093
|
+
this.validation.validate(this, force);
|
|
7094
|
+
}
|
|
7095
|
+
|
|
7096
|
+
/**
|
|
7097
|
+
* Syncs the value from the native select element to the component's value.
|
|
7098
|
+
* @param {Event} event // The change event from the native select element.
|
|
7099
|
+
* @returns {void}
|
|
7100
|
+
* @private
|
|
7101
|
+
*/
|
|
7102
|
+
_handleNativeSelectChange(event) {
|
|
7103
|
+
const selectedOption = event.target.options[event.target.selectedIndex];
|
|
7104
|
+
const selectedValue = selectedOption.value;
|
|
7105
|
+
|
|
7106
|
+
if (this.multiSelect) {
|
|
7107
|
+
const currentArray = Array.isArray(this.value) ? this.value : [];
|
|
7108
|
+
|
|
7109
|
+
if (!currentArray.includes(selectedValue)) {
|
|
7110
|
+
this.value = [
|
|
7111
|
+
...currentArray,
|
|
7112
|
+
selectedValue
|
|
7113
|
+
];
|
|
7114
|
+
}
|
|
7115
|
+
} else {
|
|
7116
|
+
const currentValue = this.value;
|
|
7117
|
+
|
|
7118
|
+
if (currentValue !== selectedValue) {
|
|
7119
|
+
this.value = selectedValue;
|
|
7120
|
+
}
|
|
7121
|
+
}
|
|
7122
|
+
}
|
|
7123
|
+
|
|
7124
|
+
/**
|
|
7125
|
+
* Updates the native select element's value based on the component's value.
|
|
7126
|
+
* @returns {void}
|
|
7127
|
+
* @private
|
|
7128
|
+
*/
|
|
7129
|
+
_updateNativeSelect() {
|
|
7130
|
+
const nativeSelect = this.shadowRoot.querySelector('select');
|
|
7131
|
+
if (!nativeSelect) {
|
|
7132
|
+
return;
|
|
7133
|
+
}
|
|
7134
|
+
|
|
7135
|
+
if (this.multiSelect) {
|
|
7136
|
+
nativeSelect.value = this.value ? this.value[0] : '';
|
|
7137
|
+
} else {
|
|
7138
|
+
nativeSelect.value = this.value || '';
|
|
7139
|
+
}
|
|
7140
|
+
}
|
|
7141
|
+
|
|
7142
|
+
renderAriaHtml() {
|
|
7143
|
+
return u`
|
|
7144
|
+
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7145
|
+
${this.optionActive && this.options.length > 0
|
|
7146
|
+
? u`
|
|
7147
|
+
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7148
|
+
`
|
|
7149
|
+
: undefined
|
|
7150
|
+
};
|
|
7151
|
+
|
|
7152
|
+
${this.optionSelected && this.options.length > 0
|
|
7153
|
+
? u`
|
|
7154
|
+
${`${this.optionSelected.innerText} selected`}
|
|
7155
|
+
`
|
|
7156
|
+
: undefined
|
|
7157
|
+
};
|
|
7158
|
+
</div>
|
|
7159
|
+
`;
|
|
7160
|
+
}
|
|
7161
|
+
|
|
7162
|
+
renderNativeSelect() {
|
|
7163
|
+
return u`
|
|
7164
|
+
<div class="nativeSelectWrapper">
|
|
7165
|
+
<select
|
|
7166
|
+
tabindex="-1"
|
|
7167
|
+
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7168
|
+
name="${this.name || ''}"
|
|
7169
|
+
?disabled="${this.disabled}"
|
|
7170
|
+
?required="${this.required}"
|
|
7171
|
+
aria-hidden="true"
|
|
7172
|
+
autocomplete="${o(this.autocomplete)}"
|
|
7173
|
+
@change="${this._handleNativeSelectChange}">
|
|
7174
|
+
<option value="" ?selected="${!this.value}"></option>
|
|
7175
|
+
${this.options.map((option) => {
|
|
7176
|
+
const optionValue = option.value || option.textContent;
|
|
7177
|
+
return u`
|
|
7178
|
+
<option
|
|
7179
|
+
value="${optionValue}"
|
|
7180
|
+
?selected="${this.value === optionValue}">
|
|
7181
|
+
${option.textContent}
|
|
7182
|
+
</option>
|
|
7183
|
+
`;
|
|
7184
|
+
})}
|
|
7185
|
+
</select>
|
|
7186
|
+
</div>
|
|
7187
|
+
`;
|
|
7188
|
+
}
|
|
7189
|
+
|
|
7190
|
+
/**
|
|
7191
|
+
* Returns HTML for the help text and error message.
|
|
7192
|
+
* @private
|
|
7193
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
7194
|
+
*/
|
|
7195
|
+
renderHtmlHelpText() {
|
|
7196
|
+
return u`
|
|
7197
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7198
|
+
? u`
|
|
7199
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7200
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
7201
|
+
<slot name="helptext"></slot>
|
|
7202
|
+
</p>
|
|
7203
|
+
</${this.helpTextTag}>
|
|
7204
|
+
`
|
|
7205
|
+
: u`
|
|
7206
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7207
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7208
|
+
ERROR MESSAGE ${this.errorMessage}
|
|
7209
|
+
</p>
|
|
7210
|
+
</${this.helpTextTag}>
|
|
7211
|
+
`
|
|
7212
|
+
}
|
|
7213
|
+
`;
|
|
7214
|
+
}
|
|
7215
|
+
|
|
7216
|
+
/**
|
|
7217
|
+
* Returns HTML for the emphasized layout.
|
|
7218
|
+
* @private
|
|
7219
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7220
|
+
*/
|
|
7221
|
+
renderLayoutEmphasized() {
|
|
7222
|
+
const placeholderClass = {
|
|
7223
|
+
hidden: this.value,
|
|
7224
|
+
};
|
|
7225
|
+
|
|
7226
|
+
const displayValueClasses = {
|
|
7227
|
+
'displayValue': true,
|
|
7228
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7229
|
+
'hasFocus': this.isPopoverVisible,
|
|
7230
|
+
'withValue': this.value && this.value.length > 0,
|
|
7231
|
+
'force': this.forceDisplayValue,
|
|
7232
|
+
};
|
|
7233
|
+
|
|
7234
|
+
const valueContainerClasses = {
|
|
7235
|
+
'valueContainer': true,
|
|
7236
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7237
|
+
};
|
|
7238
|
+
|
|
7239
|
+
return u`
|
|
7240
|
+
<div
|
|
7241
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7242
|
+
part="wrapper">
|
|
7243
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7244
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7245
|
+
</div>
|
|
7246
|
+
<${this.dropdownTag}
|
|
7247
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7248
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7249
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7250
|
+
?noFlip="${this.noFlip}"
|
|
7251
|
+
?onDark="${this.onDark}"
|
|
7252
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7253
|
+
.offset="${this.offset}"
|
|
7254
|
+
.placement="${this.placement}"
|
|
7255
|
+
chevron
|
|
7256
|
+
fluid
|
|
7257
|
+
for="selectMenu"
|
|
7258
|
+
layout="${this.layout}"
|
|
7259
|
+
part="dropdown"
|
|
7260
|
+
shape="${this.shape}"
|
|
7261
|
+
size="${this.size}">
|
|
7262
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7263
|
+
<div class="accents left">
|
|
7264
|
+
<slot name="typeIcon"></slot>
|
|
7265
|
+
</div>
|
|
7266
|
+
<div class="mainContent">
|
|
7267
|
+
<div class="${e(valueContainerClasses)}">
|
|
7268
|
+
<label>
|
|
7269
|
+
<slot name="label"></slot>
|
|
7270
|
+
</label>
|
|
7271
|
+
<div class="value" id="value"></div>
|
|
7272
|
+
${this.value ? undefined : u`
|
|
7273
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
7274
|
+
<slot name="placeholder"></slot>
|
|
7275
|
+
</div>
|
|
7276
|
+
`}
|
|
7277
|
+
</div>
|
|
7278
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7279
|
+
<slot name="displayValue"></slot>
|
|
7280
|
+
</div>
|
|
7281
|
+
</div>
|
|
7282
|
+
<div class="accents right"></div>
|
|
7283
|
+
</div>
|
|
7284
|
+
<div class="menuWrapper"></div>
|
|
7285
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7286
|
+
<slot></slot>
|
|
7287
|
+
</${this.bibtemplateTag}>
|
|
7288
|
+
<div slot="helpText">
|
|
7289
|
+
${this.renderHtmlHelpText()}
|
|
7290
|
+
</div>
|
|
7291
|
+
</${this.dropdownTag}>
|
|
7292
|
+
</div>
|
|
7293
|
+
`;
|
|
7294
|
+
}
|
|
7295
|
+
|
|
7296
|
+
/**
|
|
7297
|
+
* Returns HTML for the snowflake layout.
|
|
6468
7298
|
* @private
|
|
7299
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the snowflake layout.
|
|
6469
7300
|
*/
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
this.
|
|
6473
|
-
}
|
|
6474
|
-
}
|
|
7301
|
+
renderLayoutSnowflake() {
|
|
7302
|
+
const placeholderClass = {
|
|
7303
|
+
hidden: this.value,
|
|
7304
|
+
};
|
|
6475
7305
|
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
7306
|
+
const displayValueClasses = {
|
|
7307
|
+
'displayValue': true,
|
|
7308
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7309
|
+
'hasFocus': this.isPopoverVisible,
|
|
7310
|
+
'withValue': this.value && this.value.length > 0,
|
|
7311
|
+
'force': this.forceDisplayValue,
|
|
7312
|
+
};
|
|
7313
|
+
|
|
7314
|
+
const valueContainerClasses = {
|
|
7315
|
+
'valueContainer': true,
|
|
7316
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7317
|
+
};
|
|
7318
|
+
|
|
7319
|
+
return u`
|
|
7320
|
+
<div
|
|
7321
|
+
class="${e(this.commonWrapperClasses)}"
|
|
7322
|
+
part="wrapper">
|
|
7323
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7324
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7325
|
+
</div>
|
|
7326
|
+
<${this.dropdownTag}
|
|
7327
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7328
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7329
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7330
|
+
?noFlip="${this.noFlip}"
|
|
7331
|
+
?onDark="${this.onDark}"
|
|
7332
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7333
|
+
.offset="${this.offset}"
|
|
7334
|
+
.placement="${this.placement}"
|
|
7335
|
+
chevron
|
|
7336
|
+
fluid
|
|
7337
|
+
for="selectMenu"
|
|
7338
|
+
layout="${this.layout}"
|
|
7339
|
+
part="dropdown"
|
|
7340
|
+
shape="${this.shape}"
|
|
7341
|
+
size="${this.size}">
|
|
7342
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7343
|
+
<div class="accents left">
|
|
7344
|
+
<slot name="typeIcon"></slot>
|
|
7345
|
+
</div>
|
|
7346
|
+
<div class="mainContent">
|
|
7347
|
+
<div class="${e(valueContainerClasses)}">
|
|
7348
|
+
<label>
|
|
7349
|
+
<slot name="label"></slot>
|
|
7350
|
+
</label>
|
|
7351
|
+
<div class="value" id="value"></div>
|
|
7352
|
+
${this.value ? undefined : u`
|
|
7353
|
+
<div id="placeholder" class="${e(placeholderClass)}">
|
|
7354
|
+
<slot name="placeholder"></slot>
|
|
7355
|
+
</div>
|
|
7356
|
+
`}
|
|
7357
|
+
</div>
|
|
7358
|
+
<div class="${e(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7359
|
+
<slot name="displayValue"></slot>
|
|
7360
|
+
</div>
|
|
7361
|
+
</div>
|
|
7362
|
+
<div class="accents right"></div>
|
|
7363
|
+
</div>
|
|
7364
|
+
<div class="menuWrapper"></div>
|
|
7365
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7366
|
+
<slot></slot>
|
|
7367
|
+
</${this.bibtemplateTag}>
|
|
7368
|
+
<div slot="helpText">
|
|
7369
|
+
${this.renderHtmlHelpText()}
|
|
7370
|
+
</div>
|
|
7371
|
+
</${this.dropdownTag}>
|
|
7372
|
+
</div>
|
|
7373
|
+
`;
|
|
6482
7374
|
}
|
|
6483
7375
|
|
|
6484
7376
|
/**
|
|
6485
|
-
*
|
|
6486
|
-
* @param {Event} event // The change event from the native select element.
|
|
6487
|
-
* @returns {void}
|
|
7377
|
+
* Returns HTML for the classic layout.
|
|
6488
7378
|
* @private
|
|
7379
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
6489
7380
|
*/
|
|
6490
|
-
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
7381
|
+
renderLayoutClassic() {
|
|
7382
|
+
return u`
|
|
7383
|
+
<div
|
|
7384
|
+
class="${e(this.commonWrapperClasses)} thin"
|
|
7385
|
+
part="wrapper">
|
|
7386
|
+
classic
|
|
7387
|
+
</div>
|
|
7388
|
+
`;
|
|
6495
7389
|
}
|
|
6496
7390
|
|
|
6497
7391
|
/**
|
|
6498
|
-
*
|
|
6499
|
-
* @returns {void}
|
|
7392
|
+
* Logic to determine the layout of the component.
|
|
6500
7393
|
* @private
|
|
7394
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
7395
|
+
* @returns {void}
|
|
6501
7396
|
*/
|
|
6502
|
-
|
|
6503
|
-
const
|
|
6504
|
-
|
|
6505
|
-
|
|
7397
|
+
renderLayout(ForcedLayout) {
|
|
7398
|
+
const layout = ForcedLayout || this.layout;
|
|
7399
|
+
|
|
7400
|
+
switch (layout) {
|
|
7401
|
+
case 'emphasized':
|
|
7402
|
+
return this.renderLayoutEmphasized();
|
|
7403
|
+
case 'emphasized-left':
|
|
7404
|
+
return this.renderLayoutEmphasized();
|
|
7405
|
+
case 'emphasized-right':
|
|
7406
|
+
return this.renderLayoutEmphasized();
|
|
7407
|
+
case 'snowflake':
|
|
7408
|
+
return this.renderLayoutSnowflake();
|
|
7409
|
+
case 'snowflake-left':
|
|
7410
|
+
return this.renderLayoutSnowflake();
|
|
7411
|
+
case 'snowflake-right':
|
|
7412
|
+
return this.renderLayoutSnowflake();
|
|
7413
|
+
default:
|
|
7414
|
+
return this.renderLayoutClassic();
|
|
6506
7415
|
}
|
|
6507
|
-
const [value] = this.value || [];
|
|
6508
|
-
nativeSelect.value = value || '';
|
|
6509
7416
|
}
|
|
6510
7417
|
|
|
6511
|
-
|
|
6512
7418
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6513
7419
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6514
7420
|
|
|
6515
7421
|
// function that renders the HTML and CSS into the scope of the component
|
|
6516
|
-
|
|
7422
|
+
renderBACKUP() {
|
|
6517
7423
|
const placeholderClass = {
|
|
6518
7424
|
hidden: this.value,
|
|
6519
7425
|
};
|
|
@@ -6539,27 +7445,34 @@ class AuroSelect extends i$2 {
|
|
|
6539
7445
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
6540
7446
|
</div>
|
|
6541
7447
|
<${this.dropdownTag}
|
|
6542
|
-
|
|
7448
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7449
|
+
?disabled="${this.disabled}"
|
|
6543
7450
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7451
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7452
|
+
?noFlip="${this.noFlip}"
|
|
6544
7453
|
?onDark="${this.onDark}"
|
|
6545
|
-
common
|
|
6546
|
-
fluid
|
|
6547
7454
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
6548
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
6549
|
-
chevron
|
|
6550
|
-
.placement="${this.placement}"
|
|
6551
7455
|
.offset="${this.offset}"
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
7456
|
+
.placement="${this.placement}"
|
|
7457
|
+
chevron
|
|
7458
|
+
fluid
|
|
7459
|
+
for="selectMenu"
|
|
7460
|
+
layout="${this.layout}"
|
|
7461
|
+
part="dropdown"
|
|
7462
|
+
shape="${this.shape}"
|
|
7463
|
+
size="${this.size}">
|
|
6555
7464
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6556
|
-
<span id="placeholder"
|
|
7465
|
+
<span id="placeholder"
|
|
7466
|
+
class="${e(placeholderClass)}"
|
|
7467
|
+
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7468
|
+
>
|
|
7469
|
+
<slot name="placeholder"></slot>
|
|
7470
|
+
</span>
|
|
7471
|
+
<slot name="valueText" id="valueText"></slot>
|
|
6557
7472
|
</span>
|
|
6558
7473
|
|
|
6559
|
-
<div class="menuWrapper">
|
|
6560
|
-
</div>
|
|
6561
|
-
|
|
6562
7474
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7475
|
+
<slot></slot>
|
|
6563
7476
|
</${this.bibtemplateTag}>
|
|
6564
7477
|
<slot name="label" slot="label"></slot>
|
|
6565
7478
|
<p slot="helpText">
|
|
@@ -6599,6 +7512,7 @@ class AuroSelect extends i$2 {
|
|
|
6599
7512
|
</select>
|
|
6600
7513
|
</div>
|
|
6601
7514
|
<!-- Help text and error message template -->
|
|
7515
|
+
${this.renderHtmlHelpText()}
|
|
6602
7516
|
</div>
|
|
6603
7517
|
`;
|
|
6604
7518
|
}
|
|
@@ -6613,102 +7527,6 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-basic-color-b
|
|
|
6613
7527
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6614
7528
|
// See LICENSE in the project root for license information.
|
|
6615
7529
|
|
|
6616
|
-
// ---------------------------------------------------------------------
|
|
6617
|
-
|
|
6618
|
-
/**
|
|
6619
|
-
* Converts value to an array.
|
|
6620
|
-
* If the value is a JSON string representing an array, it will be parsed.
|
|
6621
|
-
* If the value is already an array, it is returned.
|
|
6622
|
-
* If the value is undefined, it returns undefined.
|
|
6623
|
-
* @private
|
|
6624
|
-
* @param {any} value - The value to be converted. Can be a string, array, or undefined.
|
|
6625
|
-
* @returns {Array|undefined} - The converted array or undefined.
|
|
6626
|
-
* @throws {Error} - Throws an error if the value is not an array, undefined,
|
|
6627
|
-
* or if the value cannot be parsed into an array from a JSON string.
|
|
6628
|
-
*/
|
|
6629
|
-
function arrayConverter(value) {
|
|
6630
|
-
// Allow undefined
|
|
6631
|
-
if (value === undefined) {
|
|
6632
|
-
return undefined;
|
|
6633
|
-
}
|
|
6634
|
-
|
|
6635
|
-
// Return the value if it is already an array
|
|
6636
|
-
if (Array.isArray(value)) {
|
|
6637
|
-
return value;
|
|
6638
|
-
}
|
|
6639
|
-
|
|
6640
|
-
try {
|
|
6641
|
-
// If value is a JSON string, parse it
|
|
6642
|
-
const parsed = typeof value === 'string' ? JSON.parse(value) : value;
|
|
6643
|
-
|
|
6644
|
-
// Check if the parsed value is an array
|
|
6645
|
-
if (Array.isArray(parsed)) {
|
|
6646
|
-
return parsed;
|
|
6647
|
-
}
|
|
6648
|
-
} catch (error) {
|
|
6649
|
-
// If JSON parsing fails, continue to throw an error below
|
|
6650
|
-
/* eslint-disable no-console */
|
|
6651
|
-
console.error('JSON parsing failed:', error);
|
|
6652
|
-
}
|
|
6653
|
-
|
|
6654
|
-
// Throw error if the input is not an array or undefined
|
|
6655
|
-
throw new Error('Invalid value: Input must be an array or undefined');
|
|
6656
|
-
}
|
|
6657
|
-
|
|
6658
|
-
/**
|
|
6659
|
-
* Compare two arrays for equality.
|
|
6660
|
-
* @private
|
|
6661
|
-
* @param {Array} arr1 - First array to compare.
|
|
6662
|
-
* @param {Array} arr2 - Second array to compare.
|
|
6663
|
-
* @returns {boolean} True if arrays are equal.
|
|
6664
|
-
*/
|
|
6665
|
-
function arraysAreEqual(arr1, arr2) {
|
|
6666
|
-
// If both arrays undefined, they are equal (true)
|
|
6667
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
6668
|
-
return arr1 === arr2;
|
|
6669
|
-
}
|
|
6670
|
-
|
|
6671
|
-
// If arrays have different lengths, they are not equal
|
|
6672
|
-
if (arr1.length !== arr2.length) {
|
|
6673
|
-
return false;
|
|
6674
|
-
}
|
|
6675
|
-
|
|
6676
|
-
// If every item at each index is the same, return true
|
|
6677
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
6678
|
-
if (arr1[index] !== arr2[index]) {
|
|
6679
|
-
return false;
|
|
6680
|
-
}
|
|
6681
|
-
}
|
|
6682
|
-
return true;
|
|
6683
|
-
}
|
|
6684
|
-
|
|
6685
|
-
/**
|
|
6686
|
-
* Compares array for changes.
|
|
6687
|
-
* @private
|
|
6688
|
-
* @param {Array|any} newVal - New value to compare.
|
|
6689
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
6690
|
-
* @returns {boolean} True if arrays have changed.
|
|
6691
|
-
*/
|
|
6692
|
-
function arrayOrUndefinedHasChanged(newVal, oldVal) {
|
|
6693
|
-
try {
|
|
6694
|
-
// Check if values are undefined or arrays
|
|
6695
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
6696
|
-
|
|
6697
|
-
// If non-array or non-undefined, throw error
|
|
6698
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
6699
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
6700
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
6701
|
-
}
|
|
6702
|
-
|
|
6703
|
-
// Return true if arrays have changed, false if they are the same
|
|
6704
|
-
return !arraysAreEqual(newVal, oldVal);
|
|
6705
|
-
} catch (error) {
|
|
6706
|
-
/* eslint-disable no-console */
|
|
6707
|
-
console.error(error);
|
|
6708
|
-
// If validation fails, it has changed
|
|
6709
|
-
return true;
|
|
6710
|
-
}
|
|
6711
|
-
}
|
|
6712
7530
|
|
|
6713
7531
|
/**
|
|
6714
7532
|
* Validates if an option can be interacted with.
|
|
@@ -6742,7 +7560,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
6742
7560
|
element.dispatchEvent(new CustomEvent(eventName, eventConfig));
|
|
6743
7561
|
}
|
|
6744
7562
|
|
|
6745
|
-
// Copyright (c)
|
|
7563
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6746
7564
|
// See LICENSE in the project root for license information.
|
|
6747
7565
|
|
|
6748
7566
|
|
|
@@ -6750,14 +7568,14 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
6750
7568
|
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
6751
7569
|
/**
|
|
6752
7570
|
* The auro-menu element provides users a way to select from a list of options.
|
|
6753
|
-
* @attr {Array<HTMLElement
|
|
7571
|
+
* @attr {HTMLElement|Array<HTMLElement>} optionSelected - An array of currently selected menu options, type `HTMLElement` by default. In multi-select mode, `optionSelected` is an array of HTML elements.
|
|
6754
7572
|
* @attr {object} optionactive - Specifies the current active menuOption.
|
|
6755
7573
|
* @attr {string} matchword - Specifies a string used to highlight matched string parts in options.
|
|
6756
7574
|
* @attr {boolean} disabled - When true, the entire menu and all options are disabled;
|
|
6757
7575
|
* @attr {boolean} nocheckmark - When true, selected option will not show the checkmark.
|
|
6758
7576
|
* @attr {boolean} loading - When true, displays a loading state using the loadingIcon and loadingText slots if provided.
|
|
6759
7577
|
* @attr {boolean} multiselect - When true, the selected option can be multiple options.
|
|
6760
|
-
* @attr {Array<string
|
|
7578
|
+
* @attr {String|Array<string>} value - Value selected for the menu, type `string` by default. In multi-select mode, `value` is an array of strings.
|
|
6761
7579
|
* @prop {boolean} hasLoadingPlaceholder - Indicates whether the menu has a loadingIcon or loadingText to render when in a loading state.
|
|
6762
7580
|
* @event {CustomEvent<Element>} auroMenu-activatedOption - Notifies that a menuoption has been made `active`.
|
|
6763
7581
|
* @event {CustomEvent<any>} auroMenu-customEventFired - Notifies that a custom event has been fired.
|
|
@@ -6770,7 +7588,7 @@ function dispatchMenuEvent(element, eventName, detail = null) {
|
|
|
6770
7588
|
* @slot - Slot for insertion of menu options.
|
|
6771
7589
|
*/
|
|
6772
7590
|
|
|
6773
|
-
/* eslint-disable no-magic-numbers, max-lines */
|
|
7591
|
+
/* eslint-disable no-magic-numbers, max-lines, no-extra-parens */
|
|
6774
7592
|
|
|
6775
7593
|
class AuroMenu extends i$2 {
|
|
6776
7594
|
constructor() {
|
|
@@ -6850,9 +7668,8 @@ class AuroMenu extends i$2 {
|
|
|
6850
7668
|
reflect: true
|
|
6851
7669
|
},
|
|
6852
7670
|
optionSelected: {
|
|
6853
|
-
// Allow HTMLElement[] arrays and undefined
|
|
6854
|
-
|
|
6855
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
7671
|
+
// Allow HTMLElement, HTMLElement[] arrays and undefined
|
|
7672
|
+
type: Object
|
|
6856
7673
|
},
|
|
6857
7674
|
optionActive: {
|
|
6858
7675
|
type: Object,
|
|
@@ -6868,10 +7685,8 @@ class AuroMenu extends i$2 {
|
|
|
6868
7685
|
attribute: 'multiselect'
|
|
6869
7686
|
},
|
|
6870
7687
|
value: {
|
|
6871
|
-
// Allow string[] arrays and undefined
|
|
6872
|
-
type: Object
|
|
6873
|
-
converter: arrayConverter,
|
|
6874
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
7688
|
+
// Allow string, string[] arrays and undefined
|
|
7689
|
+
type: Object
|
|
6875
7690
|
}
|
|
6876
7691
|
};
|
|
6877
7692
|
}
|
|
@@ -6893,7 +7708,7 @@ class AuroMenu extends i$2 {
|
|
|
6893
7708
|
*
|
|
6894
7709
|
*/
|
|
6895
7710
|
static register(name = "auro-menu") {
|
|
6896
|
-
AuroLibraryRuntimeUtils$
|
|
7711
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenu);
|
|
6897
7712
|
}
|
|
6898
7713
|
|
|
6899
7714
|
// Lifecycle Methods
|
|
@@ -6917,37 +7732,46 @@ class AuroMenu extends i$2 {
|
|
|
6917
7732
|
}
|
|
6918
7733
|
|
|
6919
7734
|
firstUpdated() {
|
|
6920
|
-
AuroLibraryRuntimeUtils$
|
|
7735
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
6921
7736
|
|
|
6922
7737
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
6923
7738
|
this.initializeMenu();
|
|
6924
7739
|
}
|
|
6925
7740
|
|
|
6926
7741
|
updated(changedProperties) {
|
|
7742
|
+
if (changedProperties.has('multiSelect')) {
|
|
7743
|
+
// Reset selection if multiSelect mode changes
|
|
7744
|
+
this.clearSelection();
|
|
7745
|
+
}
|
|
7746
|
+
|
|
6927
7747
|
if (changedProperties.has('value')) {
|
|
6928
7748
|
// Handle null/undefined case
|
|
6929
7749
|
if (this.value === undefined || this.value === null) {
|
|
6930
7750
|
this.optionSelected = undefined;
|
|
6931
|
-
// Reset index tracking
|
|
6932
7751
|
this.index = -1;
|
|
6933
7752
|
} else {
|
|
6934
|
-
|
|
6935
|
-
|
|
7753
|
+
if (this.multiSelect) {
|
|
7754
|
+
// In multiselect mode, this.value should be an array of strings
|
|
7755
|
+
const valueArray = Array.isArray(this.value) ? this.value : [this.value];
|
|
7756
|
+
const matchingOptions = this.items.filter((item) => valueArray.includes(item.value));
|
|
6936
7757
|
|
|
6937
|
-
|
|
6938
|
-
|
|
7758
|
+
this.optionSelected = matchingOptions.length > 0 ? matchingOptions : undefined;
|
|
7759
|
+
} else {
|
|
7760
|
+
// In single-select mode, this.value should be a string
|
|
7761
|
+
const matchingOptions = this.items.find((item) => item.value === this.value);
|
|
6939
7762
|
|
|
6940
|
-
|
|
6941
|
-
if (this.multiSelect) {
|
|
6942
|
-
// For multiselect, keep all matching options
|
|
7763
|
+
if (matchingOptions) {
|
|
6943
7764
|
this.optionSelected = matchingOptions;
|
|
7765
|
+
this.index = this.items.indexOf(matchingOptions);
|
|
6944
7766
|
} else {
|
|
6945
|
-
//
|
|
6946
|
-
this.optionSelected =
|
|
6947
|
-
this.index =
|
|
7767
|
+
// If no matching option found, reset selection
|
|
7768
|
+
this.optionSelected = undefined;
|
|
7769
|
+
this.index = -1;
|
|
6948
7770
|
}
|
|
6949
|
-
}
|
|
6950
|
-
|
|
7771
|
+
}
|
|
7772
|
+
|
|
7773
|
+
// If no matching options were found in either mode
|
|
7774
|
+
if (!this.optionSelected || (Array.isArray(this.optionSelected) && this.optionSelected.length === 0)) {
|
|
6951
7775
|
dispatchMenuEvent(this, 'auroMenu-selectValueFailure');
|
|
6952
7776
|
this.optionSelected = undefined;
|
|
6953
7777
|
this.index = -1;
|
|
@@ -7099,8 +7923,8 @@ class AuroMenu extends i$2 {
|
|
|
7099
7923
|
}
|
|
7100
7924
|
} else {
|
|
7101
7925
|
// Single select - use arrays with single values
|
|
7102
|
-
this.value =
|
|
7103
|
-
this.optionSelected =
|
|
7926
|
+
this.value = option.value;
|
|
7927
|
+
this.optionSelected = option;
|
|
7104
7928
|
}
|
|
7105
7929
|
|
|
7106
7930
|
this.index = this.items.indexOf(option);
|
|
@@ -7422,8 +8246,13 @@ class AuroMenu extends i$2 {
|
|
|
7422
8246
|
if (!this.optionSelected) {
|
|
7423
8247
|
return false;
|
|
7424
8248
|
}
|
|
7425
|
-
|
|
7426
|
-
|
|
8249
|
+
|
|
8250
|
+
if (this.multiSelect) {
|
|
8251
|
+
// In multi-select mode, check if the option is in the selected array
|
|
8252
|
+
return Array.isArray(this.optionSelected) && this.optionSelected.some((selectedOption) => selectedOption === option);
|
|
8253
|
+
}
|
|
8254
|
+
|
|
8255
|
+
return this.optionSelected === option;
|
|
7427
8256
|
}
|
|
7428
8257
|
|
|
7429
8258
|
/**
|
|
@@ -7612,6 +8441,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-def
|
|
|
7612
8441
|
|
|
7613
8442
|
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)}`;
|
|
7614
8443
|
|
|
8444
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
8445
|
+
// See LICENSE in the project root for license information.
|
|
8446
|
+
|
|
8447
|
+
// ---------------------------------------------------------------------
|
|
8448
|
+
|
|
8449
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
8450
|
+
|
|
8451
|
+
class AuroLibraryRuntimeUtils {
|
|
8452
|
+
|
|
8453
|
+
/* eslint-disable jsdoc/require-param */
|
|
8454
|
+
|
|
8455
|
+
/**
|
|
8456
|
+
* This will register a new custom element with the browser.
|
|
8457
|
+
* @param {String} name - The name of the custom element.
|
|
8458
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
8459
|
+
* @returns {void}
|
|
8460
|
+
*/
|
|
8461
|
+
registerComponent(name, componentClass) {
|
|
8462
|
+
if (!customElements.get(name)) {
|
|
8463
|
+
customElements.define(name, class extends componentClass {});
|
|
8464
|
+
}
|
|
8465
|
+
}
|
|
8466
|
+
|
|
8467
|
+
/**
|
|
8468
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
8469
|
+
* @returns {void}
|
|
8470
|
+
*/
|
|
8471
|
+
closestElement(
|
|
8472
|
+
selector, // selector like in .closest()
|
|
8473
|
+
base = this, // extra functionality to skip a parent
|
|
8474
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
8475
|
+
!el || el === document || el === window
|
|
8476
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
8477
|
+
: found
|
|
8478
|
+
? found // found a selector INside this element
|
|
8479
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
8480
|
+
) {
|
|
8481
|
+
return __Closest(base);
|
|
8482
|
+
}
|
|
8483
|
+
/* eslint-enable jsdoc/require-param */
|
|
8484
|
+
|
|
8485
|
+
/**
|
|
8486
|
+
* 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.
|
|
8487
|
+
* @param {Object} elem - The element to check.
|
|
8488
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
8489
|
+
* @returns {void}
|
|
8490
|
+
*/
|
|
8491
|
+
handleComponentTagRename(elem, tagName) {
|
|
8492
|
+
const tag = tagName.toLowerCase();
|
|
8493
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8494
|
+
|
|
8495
|
+
if (elemTag !== tag) {
|
|
8496
|
+
elem.setAttribute(tag, true);
|
|
8497
|
+
}
|
|
8498
|
+
}
|
|
8499
|
+
|
|
8500
|
+
/**
|
|
8501
|
+
* Validates if an element is a specific Auro component.
|
|
8502
|
+
* @param {Object} elem - The element to validate.
|
|
8503
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
8504
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
8505
|
+
*/
|
|
8506
|
+
elementMatch(elem, tagName) {
|
|
8507
|
+
const tag = tagName.toLowerCase();
|
|
8508
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
8509
|
+
|
|
8510
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
8511
|
+
}
|
|
8512
|
+
}
|
|
8513
|
+
|
|
7615
8514
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
7616
8515
|
// See LICENSE in the project root for license information.
|
|
7617
8516
|
|
|
@@ -7631,7 +8530,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7631
8530
|
*/
|
|
7632
8531
|
privateDefaults() {
|
|
7633
8532
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
7634
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
8533
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
7635
8534
|
}
|
|
7636
8535
|
|
|
7637
8536
|
// function to define props used within the scope of this component
|
|
@@ -7713,7 +8612,7 @@ class AuroIcon extends BaseIcon {
|
|
|
7713
8612
|
*
|
|
7714
8613
|
*/
|
|
7715
8614
|
static register(name = "auro-icon") {
|
|
7716
|
-
AuroLibraryRuntimeUtils
|
|
8615
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
7717
8616
|
}
|
|
7718
8617
|
|
|
7719
8618
|
connectedCallback() {
|
|
@@ -7819,7 +8718,7 @@ class AuroMenuOption extends i$2 {
|
|
|
7819
8718
|
/**
|
|
7820
8719
|
* @private
|
|
7821
8720
|
*/
|
|
7822
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
8721
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
7823
8722
|
}
|
|
7824
8723
|
|
|
7825
8724
|
static get properties() {
|
|
@@ -7863,7 +8762,7 @@ class AuroMenuOption extends i$2 {
|
|
|
7863
8762
|
*
|
|
7864
8763
|
*/
|
|
7865
8764
|
static register(name = "auro-menuoption") {
|
|
7866
|
-
AuroLibraryRuntimeUtils$
|
|
8765
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroMenuOption);
|
|
7867
8766
|
}
|
|
7868
8767
|
|
|
7869
8768
|
firstUpdated() {
|