@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.0 → 0.0.0-pr624.10
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 +609 -532
- package/components/combobox/demo/index.html +0 -1
- package/components/combobox/demo/index.md +43 -0
- package/components/combobox/demo/index.min.js +607 -530
- package/components/combobox/dist/auro-combobox.d.ts +13 -18
- package/components/combobox/dist/index.js +479 -387
- package/components/combobox/dist/registered.js +479 -387
- 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 +868 -438
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +868 -438
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +710 -280
- package/components/datepicker/dist/registered.js +710 -280
- 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/README.md +1 -1
- package/components/input/demo/api.md +57 -53
- package/components/input/demo/api.min.js +142 -141
- package/components/input/demo/index.md +4 -4
- package/components/input/demo/index.min.js +142 -141
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/auro-input.d.ts +22 -13
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +142 -141
- package/components/input/dist/registered.js +142 -141
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- 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 -352
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1251 -351
- 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 -190
- package/components/select/dist/registered.js +1105 -190
- 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
|
@@ -1,9 +1,105 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LitElement, css, html as html$1 } from 'lit';
|
|
2
2
|
import { classMap } from 'lit/directives/class-map.js';
|
|
3
3
|
import { unsafeStatic, literal, html } from 'lit/static-html.js';
|
|
4
4
|
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
5
5
|
import { ifDefined as ifDefined$1 } from 'lit-html/directives/if-defined.js';
|
|
6
6
|
|
|
7
|
+
let AuroElement$3 = class AuroElement extends LitElement {
|
|
8
|
+
static get properties() {
|
|
9
|
+
return {
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Defines the language of an element.
|
|
13
|
+
* @default {'default'}
|
|
14
|
+
*/
|
|
15
|
+
layout: {
|
|
16
|
+
type: String,
|
|
17
|
+
attribute: "layout",
|
|
18
|
+
reflect: true
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
shape: {
|
|
22
|
+
type: String,
|
|
23
|
+
attribute: "shape",
|
|
24
|
+
reflect: true
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
size: {
|
|
28
|
+
type: String,
|
|
29
|
+
attribute: "size",
|
|
30
|
+
reflect: true
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
onDark: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
attribute: "ondark",
|
|
36
|
+
reflect: true
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
resetShapeClasses() {
|
|
42
|
+
if (this.shape && this.size) {
|
|
43
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
44
|
+
|
|
45
|
+
if (wrapper) {
|
|
46
|
+
wrapper.classList.forEach((className) => {
|
|
47
|
+
if (className.startsWith('shape-')) {
|
|
48
|
+
wrapper.classList.remove(className);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
resetLayoutClasses() {
|
|
58
|
+
if (this.layout) {
|
|
59
|
+
const wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
60
|
+
|
|
61
|
+
if (wrapper) {
|
|
62
|
+
wrapper.classList.forEach((className) => {
|
|
63
|
+
if (className.startsWith('layout-')) {
|
|
64
|
+
wrapper.classList.remove(className);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
updateComponentArchitecture() {
|
|
74
|
+
this.resetLayoutClasses();
|
|
75
|
+
this.resetShapeClasses();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
updated(changedProperties) {
|
|
79
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
80
|
+
this.updateComponentArchitecture();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
85
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
86
|
+
render() {
|
|
87
|
+
try {
|
|
88
|
+
return this.renderLayout();
|
|
89
|
+
} catch (error) {
|
|
90
|
+
// failed to get the defined layout
|
|
91
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
92
|
+
|
|
93
|
+
// fallback to the default layout
|
|
94
|
+
return this.getLayout('default');
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
var shapeSizeCss$1 = css`.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}`;
|
|
100
|
+
|
|
101
|
+
var tokensCss$4 = css`: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}`;
|
|
102
|
+
|
|
7
103
|
class DateFormatter {
|
|
8
104
|
|
|
9
105
|
constructor() {
|
|
@@ -60,9 +156,10 @@ class DateFormatter {
|
|
|
60
156
|
/**
|
|
61
157
|
* Convert a date object to string format.
|
|
62
158
|
* @param {Object} date - Date to convert to string.
|
|
63
|
-
* @
|
|
159
|
+
* @param {String} locale - Optional locale to use for the date string. Defaults to user's locale.
|
|
160
|
+
* @returns {String} Returns the date as a string.
|
|
64
161
|
*/
|
|
65
|
-
this.getDateAsString = (date) => date.toLocaleDateString(
|
|
162
|
+
this.getDateAsString = (date, locale = undefined) => date.toLocaleDateString(locale, {
|
|
66
163
|
year: "numeric",
|
|
67
164
|
month: "2-digit",
|
|
68
165
|
day: "2-digit",
|
|
@@ -254,7 +351,7 @@ class AuroDateUtilities extends AuroDateUtilitiesBase {
|
|
|
254
351
|
const dateObj = new Date(this.getFourDigitYear(dateParts.year), dateParts.month - 1, dateParts.day || 1);
|
|
255
352
|
|
|
256
353
|
// Get the date string of the date object we created from the string date
|
|
257
|
-
const actualDateStr = dateFormatter.getDateAsString(dateObj);
|
|
354
|
+
const actualDateStr = dateFormatter.getDateAsString(dateObj, "en-US");
|
|
258
355
|
|
|
259
356
|
// Guard Clause: Generated date matches date string input
|
|
260
357
|
if (expectedDateStr !== actualDateStr) {
|
|
@@ -419,7 +516,7 @@ const {
|
|
|
419
516
|
|
|
420
517
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
421
518
|
|
|
422
|
-
let AuroLibraryRuntimeUtils$
|
|
519
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
423
520
|
|
|
424
521
|
/* eslint-disable jsdoc/require-param */
|
|
425
522
|
|
|
@@ -489,7 +586,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
489
586
|
class AuroFormValidation {
|
|
490
587
|
|
|
491
588
|
constructor() {
|
|
492
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
589
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
493
590
|
}
|
|
494
591
|
|
|
495
592
|
/**
|
|
@@ -895,7 +992,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
895
992
|
|
|
896
993
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
897
994
|
|
|
898
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
995
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
899
996
|
|
|
900
997
|
/* eslint-disable jsdoc/require-param */
|
|
901
998
|
|
|
@@ -1478,10 +1575,11 @@ const flip$1 = function (options) {
|
|
|
1478
1575
|
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1479
1576
|
const nextPlacement = placements[nextIndex];
|
|
1480
1577
|
if (nextPlacement) {
|
|
1481
|
-
var _overflowsData$;
|
|
1482
1578
|
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1483
|
-
|
|
1484
|
-
if
|
|
1579
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1580
|
+
// We leave the current main axis only if every placement on that axis
|
|
1581
|
+
// overflows the main axis.
|
|
1582
|
+
overflowsData.every(d => d.overflows[0] > 0 && getSideAxis(d.placement) === initialSideAxis)) {
|
|
1485
1583
|
// Try next placement and re-run the lifecycle.
|
|
1486
1584
|
return {
|
|
1487
1585
|
data: {
|
|
@@ -2502,8 +2600,28 @@ class AuroFloatingUI {
|
|
|
2502
2600
|
if (!AuroFloatingUI.isMousePressHandlerInitialized && window && window.addEventListener) {
|
|
2503
2601
|
AuroFloatingUI.isMousePressHandlerInitialized = true;
|
|
2504
2602
|
|
|
2603
|
+
// Track timeout for isMousePressed reset to avoid race conditions
|
|
2604
|
+
if (!AuroFloatingUI._mousePressedTimeout) {
|
|
2605
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2606
|
+
}
|
|
2505
2607
|
const mouseEventGlobalHandler = (event) => {
|
|
2506
|
-
|
|
2608
|
+
const isPressed = event.type === 'mousedown';
|
|
2609
|
+
if (isPressed) {
|
|
2610
|
+
// Clear any pending timeout to prevent race condition
|
|
2611
|
+
if (AuroFloatingUI._mousePressedTimeout !== null) {
|
|
2612
|
+
clearTimeout(AuroFloatingUI._mousePressedTimeout);
|
|
2613
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2614
|
+
}
|
|
2615
|
+
if (!AuroFloatingUI.isMousePressed) {
|
|
2616
|
+
AuroFloatingUI.isMousePressed = true;
|
|
2617
|
+
}
|
|
2618
|
+
} else if (AuroFloatingUI.isMousePressed && !isPressed) {
|
|
2619
|
+
// Schedule reset and track timeout ID
|
|
2620
|
+
AuroFloatingUI._mousePressedTimeout = setTimeout(() => {
|
|
2621
|
+
AuroFloatingUI.isMousePressed = false;
|
|
2622
|
+
AuroFloatingUI._mousePressedTimeout = null;
|
|
2623
|
+
}, 0);
|
|
2624
|
+
}
|
|
2507
2625
|
};
|
|
2508
2626
|
|
|
2509
2627
|
window.addEventListener('mousedown', mouseEventGlobalHandler);
|
|
@@ -2630,6 +2748,7 @@ class AuroFloatingUI {
|
|
|
2630
2748
|
|
|
2631
2749
|
// Compute the position of the bib
|
|
2632
2750
|
computePosition(this.element.trigger, this.element.bib, {
|
|
2751
|
+
strategy: this.element.floaterConfig?.strategy || 'fixed',
|
|
2633
2752
|
placement: this.element.floaterConfig?.placement,
|
|
2634
2753
|
middleware: middleware || []
|
|
2635
2754
|
}).then(({ x, y }) => { // eslint-disable-line id-length
|
|
@@ -2764,8 +2883,9 @@ class AuroFloatingUI {
|
|
|
2764
2883
|
if (this.element.contains(activeElement) || this.element.bib?.contains(activeElement)) {
|
|
2765
2884
|
return;
|
|
2766
2885
|
}
|
|
2767
|
-
|
|
2768
|
-
if
|
|
2886
|
+
|
|
2887
|
+
// if fullscreen bib is in fullscreen mode, do not close
|
|
2888
|
+
if (this.element.bib.hasAttribute('isfullscreen')) {
|
|
2769
2889
|
return;
|
|
2770
2890
|
}
|
|
2771
2891
|
|
|
@@ -3066,8 +3186,6 @@ class AuroFloatingUI {
|
|
|
3066
3186
|
this.element.hoverToggle = this.element.floaterConfig.hoverToggle;
|
|
3067
3187
|
}
|
|
3068
3188
|
|
|
3069
|
-
document.body.append(this.element.bib);
|
|
3070
|
-
|
|
3071
3189
|
this.regenerateBibId();
|
|
3072
3190
|
this.handleTriggerTabIndex();
|
|
3073
3191
|
|
|
@@ -3210,7 +3328,7 @@ const cacheFetch$1 = (uri, options = {}) => {
|
|
|
3210
3328
|
return _fetchMap$1.get(uri);
|
|
3211
3329
|
};
|
|
3212
3330
|
|
|
3213
|
-
var styleCss$
|
|
3331
|
+
var styleCss$2$1 = css`: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}`;
|
|
3214
3332
|
|
|
3215
3333
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3216
3334
|
// See LICENSE in the project root for license information.
|
|
@@ -3253,7 +3371,7 @@ let BaseIcon$1 = class BaseIcon extends AuroElement$1 {
|
|
|
3253
3371
|
|
|
3254
3372
|
static get styles() {
|
|
3255
3373
|
return css`
|
|
3256
|
-
${styleCss$
|
|
3374
|
+
${styleCss$2$1}
|
|
3257
3375
|
`;
|
|
3258
3376
|
}
|
|
3259
3377
|
|
|
@@ -3298,6 +3416,76 @@ var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-d
|
|
|
3298
3416
|
|
|
3299
3417
|
var colorCss$3 = css`: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)}`;
|
|
3300
3418
|
|
|
3419
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3420
|
+
// See LICENSE in the project root for license information.
|
|
3421
|
+
|
|
3422
|
+
// ---------------------------------------------------------------------
|
|
3423
|
+
|
|
3424
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3425
|
+
|
|
3426
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
3427
|
+
|
|
3428
|
+
/* eslint-disable jsdoc/require-param */
|
|
3429
|
+
|
|
3430
|
+
/**
|
|
3431
|
+
* This will register a new custom element with the browser.
|
|
3432
|
+
* @param {String} name - The name of the custom element.
|
|
3433
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
3434
|
+
* @returns {void}
|
|
3435
|
+
*/
|
|
3436
|
+
registerComponent(name, componentClass) {
|
|
3437
|
+
if (!customElements.get(name)) {
|
|
3438
|
+
customElements.define(name, class extends componentClass {});
|
|
3439
|
+
}
|
|
3440
|
+
}
|
|
3441
|
+
|
|
3442
|
+
/**
|
|
3443
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
3444
|
+
* @returns {void}
|
|
3445
|
+
*/
|
|
3446
|
+
closestElement(
|
|
3447
|
+
selector, // selector like in .closest()
|
|
3448
|
+
base = this, // extra functionality to skip a parent
|
|
3449
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
3450
|
+
!el || el === document || el === window
|
|
3451
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
3452
|
+
: found
|
|
3453
|
+
? found // found a selector INside this element
|
|
3454
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
3455
|
+
) {
|
|
3456
|
+
return __Closest(base);
|
|
3457
|
+
}
|
|
3458
|
+
/* eslint-enable jsdoc/require-param */
|
|
3459
|
+
|
|
3460
|
+
/**
|
|
3461
|
+
* 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.
|
|
3462
|
+
* @param {Object} elem - The element to check.
|
|
3463
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
3464
|
+
* @returns {void}
|
|
3465
|
+
*/
|
|
3466
|
+
handleComponentTagRename(elem, tagName) {
|
|
3467
|
+
const tag = tagName.toLowerCase();
|
|
3468
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3469
|
+
|
|
3470
|
+
if (elemTag !== tag) {
|
|
3471
|
+
elem.setAttribute(tag, true);
|
|
3472
|
+
}
|
|
3473
|
+
}
|
|
3474
|
+
|
|
3475
|
+
/**
|
|
3476
|
+
* Validates if an element is a specific Auro component.
|
|
3477
|
+
* @param {Object} elem - The element to validate.
|
|
3478
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
3479
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
3480
|
+
*/
|
|
3481
|
+
elementMatch(elem, tagName) {
|
|
3482
|
+
const tag = tagName.toLowerCase();
|
|
3483
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
3484
|
+
|
|
3485
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
3486
|
+
}
|
|
3487
|
+
};
|
|
3488
|
+
|
|
3301
3489
|
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3302
3490
|
// See LICENSE in the project root for license information.
|
|
3303
3491
|
|
|
@@ -3317,7 +3505,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3317
3505
|
*/
|
|
3318
3506
|
privateDefaults() {
|
|
3319
3507
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3320
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
3508
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
3321
3509
|
}
|
|
3322
3510
|
|
|
3323
3511
|
// function to define props used within the scope of this component
|
|
@@ -3385,7 +3573,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3385
3573
|
return [
|
|
3386
3574
|
super.styles,
|
|
3387
3575
|
css`${tokensCss$2}`,
|
|
3388
|
-
css`${styleCss$
|
|
3576
|
+
css`${styleCss$2$1}`,
|
|
3389
3577
|
css`${colorCss$3}`
|
|
3390
3578
|
];
|
|
3391
3579
|
}
|
|
@@ -3399,7 +3587,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3399
3587
|
*
|
|
3400
3588
|
*/
|
|
3401
3589
|
static register(name = "auro-icon") {
|
|
3402
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
3590
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
|
|
3403
3591
|
}
|
|
3404
3592
|
|
|
3405
3593
|
connectedCallback() {
|
|
@@ -3467,17 +3655,16 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3467
3655
|
|
|
3468
3656
|
var iconVersion$1 = '6.1.2';
|
|
3469
3657
|
|
|
3470
|
-
var styleCss$2
|
|
3658
|
+
var styleCss$1$2 = css`: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}`;
|
|
3471
3659
|
|
|
3472
|
-
var colorCss$2 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3660
|
+
var colorCss$2$1 = css`.container{background-color:var(--ds-auro-dropdownbib-container-color);box-shadow:var(--ds-auro-dropdownbib-boxshadow-color);color:var(--ds-auro-dropdownbib-text-color)}`;
|
|
3473
3661
|
|
|
3474
|
-
var tokensCss$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
3662
|
+
var tokensCss$1$1 = css`:host(:not([ondark])){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-muted, #676767);--ds-auro-dropdown-trigger-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]){--ds-auro-dropdown-label-text-color: var(--ds-basic-color-texticon-inverse-muted, #ccd2db);--ds-auro-dropdown-trigger-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdown-trigger-border-color: transparent;--ds-auro-dropdown-trigger-outline-color: transparent;--ds-auro-dropdown-trigger-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff);--ds-auro-dropdownbib-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-background-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-container-color: var(--ds-advanced-color-shared-background-inverse, rgba(255, 255, 255, 0.15));--ds-auro-dropdownbib-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}`;
|
|
3475
3663
|
|
|
3476
3664
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3477
3665
|
// See LICENSE in the project root for license information.
|
|
3478
3666
|
|
|
3479
3667
|
|
|
3480
|
-
|
|
3481
3668
|
const DESIGN_TOKEN_BREAKPOINT_PREFIX = '--ds-grid-breakpoint-';
|
|
3482
3669
|
const DESIGN_TOKEN_BREAKPOINT_OPTIONS = [
|
|
3483
3670
|
'xl',
|
|
@@ -3502,14 +3689,14 @@ class AuroDropdownBib extends LitElement {
|
|
|
3502
3689
|
*/
|
|
3503
3690
|
this._mobileBreakpointValue = undefined;
|
|
3504
3691
|
|
|
3505
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3692
|
+
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3506
3693
|
}
|
|
3507
3694
|
|
|
3508
3695
|
static get styles() {
|
|
3509
3696
|
return [
|
|
3510
|
-
styleCss$2
|
|
3511
|
-
colorCss$2,
|
|
3512
|
-
tokensCss$1
|
|
3697
|
+
styleCss$1$2,
|
|
3698
|
+
colorCss$2$1,
|
|
3699
|
+
tokensCss$1$1
|
|
3513
3700
|
];
|
|
3514
3701
|
}
|
|
3515
3702
|
|
|
@@ -3547,6 +3734,13 @@ class AuroDropdownBib extends LitElement {
|
|
|
3547
3734
|
type: Boolean,
|
|
3548
3735
|
reflect: true
|
|
3549
3736
|
},
|
|
3737
|
+
|
|
3738
|
+
/**
|
|
3739
|
+
* A reference to the associated bib template element.
|
|
3740
|
+
*/
|
|
3741
|
+
bibTemplate: {
|
|
3742
|
+
type: Object
|
|
3743
|
+
}
|
|
3550
3744
|
};
|
|
3551
3745
|
}
|
|
3552
3746
|
|
|
@@ -3579,9 +3773,50 @@ class AuroDropdownBib extends LitElement {
|
|
|
3579
3773
|
}
|
|
3580
3774
|
}
|
|
3581
3775
|
});
|
|
3776
|
+
|
|
3777
|
+
if (this.bibTemplate) {
|
|
3778
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3779
|
+
if (this.isFullscreen) {
|
|
3780
|
+
this.bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3781
|
+
} else {
|
|
3782
|
+
this.bibTemplate.removeAttribute('isFullscreen');
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3582
3785
|
}
|
|
3583
3786
|
}
|
|
3584
3787
|
|
|
3788
|
+
connectedCallback() {
|
|
3789
|
+
super.connectedCallback();
|
|
3790
|
+
|
|
3791
|
+
// Listen for the auro-bibtemplate-connected event to set the fullscreen attribute
|
|
3792
|
+
this.addEventListener('auro-bibtemplate-connected', (event) => {
|
|
3793
|
+
const bibTemplate = event.detail.element;
|
|
3794
|
+
this.bibTemplate = bibTemplate;
|
|
3795
|
+
|
|
3796
|
+
if (bibTemplate) {
|
|
3797
|
+
// If the bib template is found, set the fullscreen attribute
|
|
3798
|
+
if (this.isFullscreen) {
|
|
3799
|
+
bibTemplate.setAttribute('isFullscreen', 'true');
|
|
3800
|
+
} else {
|
|
3801
|
+
bibTemplate.removeAttribute('isFullscreen');
|
|
3802
|
+
}
|
|
3803
|
+
}
|
|
3804
|
+
});
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
firstUpdated(changedProperties) {
|
|
3808
|
+
super.firstUpdated(changedProperties);
|
|
3809
|
+
|
|
3810
|
+
// Dispatch a custom event when the component is connected
|
|
3811
|
+
this.dispatchEvent(new CustomEvent('auro-dropdownbib-connected', {
|
|
3812
|
+
bubbles: true,
|
|
3813
|
+
composed: true,
|
|
3814
|
+
detail: {
|
|
3815
|
+
element: this
|
|
3816
|
+
}
|
|
3817
|
+
}));
|
|
3818
|
+
}
|
|
3819
|
+
|
|
3585
3820
|
// function that renders the HTML and CSS into the scope of the component
|
|
3586
3821
|
render() {
|
|
3587
3822
|
return html`
|
|
@@ -3594,15 +3829,17 @@ class AuroDropdownBib extends LitElement {
|
|
|
3594
3829
|
|
|
3595
3830
|
var dropdownVersion$1 = '3.0.0';
|
|
3596
3831
|
|
|
3597
|
-
var shapeSizeCss = css`.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:
|
|
3598
|
-
|
|
3599
|
-
var styleCss$1$1 = css`: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)}`;
|
|
3832
|
+
var shapeSizeCss = css`.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}`;
|
|
3600
3833
|
|
|
3601
3834
|
var colorCss$1$1 = css`: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)}`;
|
|
3602
3835
|
|
|
3603
|
-
var
|
|
3836
|
+
var classicColorCss = css`: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))}`;
|
|
3837
|
+
|
|
3838
|
+
var classicLayoutCss = css`: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)}`;
|
|
3604
3839
|
|
|
3605
|
-
var
|
|
3840
|
+
var styleEmphasizedCss = css`: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)}`;
|
|
3841
|
+
|
|
3842
|
+
var styleSnowflakeCss = css`: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)}`;
|
|
3606
3843
|
|
|
3607
3844
|
var colorCss$4 = css`: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)}`;
|
|
3608
3845
|
|
|
@@ -3617,7 +3854,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
3617
3854
|
|
|
3618
3855
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3619
3856
|
|
|
3620
|
-
let AuroLibraryRuntimeUtils$
|
|
3857
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
3621
3858
|
|
|
3622
3859
|
/* eslint-disable jsdoc/require-param */
|
|
3623
3860
|
|
|
@@ -3689,7 +3926,7 @@ let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
|
3689
3926
|
*
|
|
3690
3927
|
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
3691
3928
|
*/
|
|
3692
|
-
class AuroHelpText extends LitElement {
|
|
3929
|
+
let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
3693
3930
|
|
|
3694
3931
|
constructor() {
|
|
3695
3932
|
super();
|
|
@@ -3698,7 +3935,7 @@ class AuroHelpText extends LitElement {
|
|
|
3698
3935
|
this.onDark = false;
|
|
3699
3936
|
this.hasTextContent = false;
|
|
3700
3937
|
|
|
3701
|
-
AuroLibraryRuntimeUtils$
|
|
3938
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3702
3939
|
}
|
|
3703
3940
|
|
|
3704
3941
|
static get styles() {
|
|
@@ -3754,7 +3991,7 @@ class AuroHelpText extends LitElement {
|
|
|
3754
3991
|
*
|
|
3755
3992
|
*/
|
|
3756
3993
|
static register(name = "auro-helptext") {
|
|
3757
|
-
AuroLibraryRuntimeUtils$
|
|
3994
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
3758
3995
|
}
|
|
3759
3996
|
|
|
3760
3997
|
updated() {
|
|
@@ -3808,9 +4045,9 @@ class AuroHelpText extends LitElement {
|
|
|
3808
4045
|
</div>
|
|
3809
4046
|
`;
|
|
3810
4047
|
}
|
|
3811
|
-
}
|
|
4048
|
+
};
|
|
3812
4049
|
|
|
3813
|
-
var helpTextVersion = '1.0.0';
|
|
4050
|
+
var helpTextVersion$1 = '1.0.0';
|
|
3814
4051
|
|
|
3815
4052
|
let AuroElement$2 = class AuroElement extends LitElement {
|
|
3816
4053
|
static get properties() {
|
|
@@ -3930,12 +4167,13 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
3930
4167
|
this.matchWidth = false;
|
|
3931
4168
|
this.noHideOnThisFocusLoss = false;
|
|
3932
4169
|
|
|
3933
|
-
this.errorMessage = ''; // TODO
|
|
4170
|
+
this.errorMessage = ''; // TODO - check with Doug if there is still more to do here
|
|
3934
4171
|
|
|
3935
4172
|
// Layout Config
|
|
3936
|
-
this.layout = '
|
|
4173
|
+
this.layout = 'classic';
|
|
3937
4174
|
this.shape = 'rounded';
|
|
3938
4175
|
this.size = 'xl';
|
|
4176
|
+
this.parentBorder = false;
|
|
3939
4177
|
|
|
3940
4178
|
this.privateDefaults();
|
|
3941
4179
|
}
|
|
@@ -3951,7 +4189,8 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
3951
4189
|
'trigger': true,
|
|
3952
4190
|
'wrapper': true,
|
|
3953
4191
|
'hasFocus': this.hasFocus,
|
|
3954
|
-
'simple': this.simple
|
|
4192
|
+
'simple': this.simple,
|
|
4193
|
+
'parentBorder': this.parentBorder
|
|
3955
4194
|
};
|
|
3956
4195
|
}
|
|
3957
4196
|
|
|
@@ -4003,7 +4242,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4003
4242
|
/**
|
|
4004
4243
|
* @private
|
|
4005
4244
|
*/
|
|
4006
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4245
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
4007
4246
|
|
|
4008
4247
|
/**
|
|
4009
4248
|
* @private
|
|
@@ -4028,7 +4267,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4028
4267
|
/**
|
|
4029
4268
|
* @private
|
|
4030
4269
|
*/
|
|
4031
|
-
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4270
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion$1, AuroHelpText$1);
|
|
4032
4271
|
|
|
4033
4272
|
/**
|
|
4034
4273
|
* @private
|
|
@@ -4218,6 +4457,15 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4218
4457
|
reflect: true
|
|
4219
4458
|
},
|
|
4220
4459
|
|
|
4460
|
+
/**
|
|
4461
|
+
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
4462
|
+
* @private
|
|
4463
|
+
*/
|
|
4464
|
+
parentBorder: {
|
|
4465
|
+
type: Boolean,
|
|
4466
|
+
reflect: true
|
|
4467
|
+
},
|
|
4468
|
+
|
|
4221
4469
|
/**
|
|
4222
4470
|
* If declared, the popover and trigger will be set to the same width.
|
|
4223
4471
|
*/
|
|
@@ -4320,10 +4568,18 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4320
4568
|
static get styles() {
|
|
4321
4569
|
return [
|
|
4322
4570
|
colorCss$1$1,
|
|
4323
|
-
|
|
4324
|
-
|
|
4571
|
+
tokensCss$1$1,
|
|
4572
|
+
|
|
4573
|
+
// default layout
|
|
4574
|
+
classicColorCss,
|
|
4575
|
+
classicLayoutCss,
|
|
4576
|
+
|
|
4577
|
+
// emphasized layout
|
|
4325
4578
|
styleEmphasizedCss,
|
|
4579
|
+
|
|
4580
|
+
// snowflake layout
|
|
4326
4581
|
styleSnowflakeCss,
|
|
4582
|
+
|
|
4327
4583
|
shapeSizeCss
|
|
4328
4584
|
];
|
|
4329
4585
|
}
|
|
@@ -4337,7 +4593,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4337
4593
|
*
|
|
4338
4594
|
*/
|
|
4339
4595
|
static register(name = "auro-dropdown") {
|
|
4340
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
4596
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
|
|
4341
4597
|
}
|
|
4342
4598
|
|
|
4343
4599
|
/**
|
|
@@ -4670,11 +4926,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4670
4926
|
*
|
|
4671
4927
|
* @private
|
|
4672
4928
|
* @method handleDefaultSlot
|
|
4673
|
-
* @param {Event} event - The event object representing the slot change.
|
|
4674
4929
|
* @fires Function#onSlotChange - Optional callback invoked when the slot content changes.
|
|
4675
4930
|
*/
|
|
4676
|
-
handleDefaultSlot(
|
|
4677
|
-
[...event.target.assignedNodes()].forEach((node) => this.bibContent.append(node));
|
|
4931
|
+
handleDefaultSlot() {
|
|
4678
4932
|
|
|
4679
4933
|
if (this.onSlotChange) {
|
|
4680
4934
|
this.onSlotChange();
|
|
@@ -4717,7 +4971,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4717
4971
|
id="trigger"
|
|
4718
4972
|
class="${classMap(this.commonWrapperClasses)}" part="wrapper"
|
|
4719
4973
|
tabindex="${this.tabIndex}"
|
|
4720
|
-
?showBorder="${this.showTriggerBorders}"
|
|
4721
4974
|
role="${ifDefined(this.triggerContentFocusable ? undefined : this.a11yRole)}"
|
|
4722
4975
|
aria-expanded="${ifDefined(this.triggerContentFocusable ? undefined : this.isPopoverVisible)}"
|
|
4723
4976
|
aria-controls="${ifDefined(this.triggerContentFocusable ? undefined : this.dropdownId)}"
|
|
@@ -4737,6 +4990,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4737
4990
|
${this.chevron || this.common ? html`
|
|
4738
4991
|
<div
|
|
4739
4992
|
id="showStateIcon"
|
|
4993
|
+
class="chevron"
|
|
4740
4994
|
part="chevron">
|
|
4741
4995
|
<${this.iconTag}
|
|
4742
4996
|
category="interface"
|
|
@@ -4751,9 +5005,6 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4751
5005
|
<div class="${classMap(helpTextClasses)}">
|
|
4752
5006
|
<slot name="helpText"></slot>
|
|
4753
5007
|
</div>
|
|
4754
|
-
<div class="slotContent">
|
|
4755
|
-
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
4756
|
-
</div>
|
|
4757
5008
|
<div id="bibSizer" part="size"></div>
|
|
4758
5009
|
<${this.dropdownBibTag}
|
|
4759
5010
|
id="bib"
|
|
@@ -4762,6 +5013,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4762
5013
|
?common="${this.common}"
|
|
4763
5014
|
?rounded="${this.common || this.rounded}"
|
|
4764
5015
|
?inset="${this.common || this.inset}">
|
|
5016
|
+
<div class="slotContent">
|
|
5017
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5018
|
+
</div>
|
|
4765
5019
|
</${this.dropdownBibTag}>
|
|
4766
5020
|
</div>
|
|
4767
5021
|
`;
|
|
@@ -4773,6 +5027,7 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4773
5027
|
* @returns {html} - Returns HTML for the classic layout.
|
|
4774
5028
|
*/
|
|
4775
5029
|
renderLayoutClassic() {
|
|
5030
|
+
|
|
4776
5031
|
return html`
|
|
4777
5032
|
<div>
|
|
4778
5033
|
<div
|
|
@@ -4810,9 +5065,10 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4810
5065
|
</div>
|
|
4811
5066
|
` : undefined }
|
|
4812
5067
|
</div>
|
|
4813
|
-
|
|
4814
|
-
<slot
|
|
4815
|
-
|
|
5068
|
+
<${this.helpTextTag} part="helpText" ?onDark=${this.onDark} ?error="${this.error}">
|
|
5069
|
+
<slot name="helpText"></slot>
|
|
5070
|
+
</${this.helpTextTag}>
|
|
5071
|
+
|
|
4816
5072
|
<div id="bibSizer" part="size"></div>
|
|
4817
5073
|
<${this.dropdownBibTag}
|
|
4818
5074
|
id="bib"
|
|
@@ -4822,6 +5078,9 @@ class AuroDropdown extends AuroElement$2 {
|
|
|
4822
5078
|
?rounded="${this.common || this.rounded}"
|
|
4823
5079
|
?inset="${this.common || this.inset}"
|
|
4824
5080
|
>
|
|
5081
|
+
<div class="slotContent">
|
|
5082
|
+
<slot @slotchange="${this.handleDefaultSlot}"></slot>
|
|
5083
|
+
</div>
|
|
4825
5084
|
</${this.dropdownBibTag}>
|
|
4826
5085
|
</div>
|
|
4827
5086
|
`;
|
|
@@ -4904,7 +5163,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
4904
5163
|
|
|
4905
5164
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4906
5165
|
|
|
4907
|
-
class AuroLibraryRuntimeUtils {
|
|
5166
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
4908
5167
|
|
|
4909
5168
|
/* eslint-disable jsdoc/require-param */
|
|
4910
5169
|
|
|
@@ -4965,7 +5224,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
4965
5224
|
|
|
4966
5225
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
4967
5226
|
}
|
|
4968
|
-
}
|
|
5227
|
+
};
|
|
4969
5228
|
|
|
4970
5229
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4971
5230
|
// See LICENSE in the project root for license information.
|
|
@@ -5073,7 +5332,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
5073
5332
|
return _fetchMap.get(uri);
|
|
5074
5333
|
};
|
|
5075
5334
|
|
|
5076
|
-
var styleCss$1 = css`: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}`;
|
|
5335
|
+
var styleCss$1$1 = css`: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}`;
|
|
5077
5336
|
|
|
5078
5337
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5079
5338
|
// See LICENSE in the project root for license information.
|
|
@@ -5116,7 +5375,7 @@ class BaseIcon extends AuroElement {
|
|
|
5116
5375
|
|
|
5117
5376
|
static get styles() {
|
|
5118
5377
|
return css`
|
|
5119
|
-
${styleCss$1}
|
|
5378
|
+
${styleCss$1$1}
|
|
5120
5379
|
`;
|
|
5121
5380
|
}
|
|
5122
5381
|
|
|
@@ -5157,35 +5416,105 @@ class BaseIcon extends AuroElement {
|
|
|
5157
5416
|
}
|
|
5158
5417
|
}
|
|
5159
5418
|
|
|
5160
|
-
var tokensCss = css`: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)}`;
|
|
5419
|
+
var tokensCss$1 = css`: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)}`;
|
|
5161
5420
|
|
|
5162
|
-
var colorCss = css`: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)}`;
|
|
5421
|
+
var colorCss$2 = css`: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)}`;
|
|
5163
5422
|
|
|
5164
|
-
// Copyright (c)
|
|
5423
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5165
5424
|
// See LICENSE in the project root for license information.
|
|
5166
5425
|
|
|
5426
|
+
// ---------------------------------------------------------------------
|
|
5167
5427
|
|
|
5168
|
-
|
|
5169
|
-
constructor() {
|
|
5170
|
-
super();
|
|
5428
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5171
5429
|
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5430
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5431
|
+
|
|
5432
|
+
/* eslint-disable jsdoc/require-param */
|
|
5175
5433
|
|
|
5176
5434
|
/**
|
|
5177
|
-
*
|
|
5178
|
-
* @
|
|
5435
|
+
* This will register a new custom element with the browser.
|
|
5436
|
+
* @param {String} name - The name of the custom element.
|
|
5437
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5179
5438
|
* @returns {void}
|
|
5180
5439
|
*/
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5440
|
+
registerComponent(name, componentClass) {
|
|
5441
|
+
if (!customElements.get(name)) {
|
|
5442
|
+
customElements.define(name, class extends componentClass {});
|
|
5443
|
+
}
|
|
5184
5444
|
}
|
|
5185
5445
|
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5446
|
+
/**
|
|
5447
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5448
|
+
* @returns {void}
|
|
5449
|
+
*/
|
|
5450
|
+
closestElement(
|
|
5451
|
+
selector, // selector like in .closest()
|
|
5452
|
+
base = this, // extra functionality to skip a parent
|
|
5453
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5454
|
+
!el || el === document || el === window
|
|
5455
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5456
|
+
: found
|
|
5457
|
+
? found // found a selector INside this element
|
|
5458
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5459
|
+
) {
|
|
5460
|
+
return __Closest(base);
|
|
5461
|
+
}
|
|
5462
|
+
/* eslint-enable jsdoc/require-param */
|
|
5463
|
+
|
|
5464
|
+
/**
|
|
5465
|
+
* 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.
|
|
5466
|
+
* @param {Object} elem - The element to check.
|
|
5467
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5468
|
+
* @returns {void}
|
|
5469
|
+
*/
|
|
5470
|
+
handleComponentTagRename(elem, tagName) {
|
|
5471
|
+
const tag = tagName.toLowerCase();
|
|
5472
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5473
|
+
|
|
5474
|
+
if (elemTag !== tag) {
|
|
5475
|
+
elem.setAttribute(tag, true);
|
|
5476
|
+
}
|
|
5477
|
+
}
|
|
5478
|
+
|
|
5479
|
+
/**
|
|
5480
|
+
* Validates if an element is a specific Auro component.
|
|
5481
|
+
* @param {Object} elem - The element to validate.
|
|
5482
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5483
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5484
|
+
*/
|
|
5485
|
+
elementMatch(elem, tagName) {
|
|
5486
|
+
const tag = tagName.toLowerCase();
|
|
5487
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5488
|
+
|
|
5489
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5490
|
+
}
|
|
5491
|
+
};
|
|
5492
|
+
|
|
5493
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5494
|
+
// See LICENSE in the project root for license information.
|
|
5495
|
+
|
|
5496
|
+
|
|
5497
|
+
class AuroIcon extends BaseIcon {
|
|
5498
|
+
constructor() {
|
|
5499
|
+
super();
|
|
5500
|
+
|
|
5501
|
+
this.variant = undefined;
|
|
5502
|
+
this.privateDefaults();
|
|
5503
|
+
}
|
|
5504
|
+
|
|
5505
|
+
/**
|
|
5506
|
+
* Internal Defaults.
|
|
5507
|
+
* @private
|
|
5508
|
+
* @returns {void}
|
|
5509
|
+
*/
|
|
5510
|
+
privateDefaults() {
|
|
5511
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5512
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
5513
|
+
}
|
|
5514
|
+
|
|
5515
|
+
// function to define props used within the scope of this component
|
|
5516
|
+
static get properties() {
|
|
5517
|
+
return {
|
|
5189
5518
|
...super.properties,
|
|
5190
5519
|
|
|
5191
5520
|
/**
|
|
@@ -5247,9 +5576,9 @@ class AuroIcon extends BaseIcon {
|
|
|
5247
5576
|
static get styles() {
|
|
5248
5577
|
return [
|
|
5249
5578
|
super.styles,
|
|
5250
|
-
css`${tokensCss}`,
|
|
5251
|
-
css`${styleCss$1}`,
|
|
5252
|
-
css`${colorCss}`
|
|
5579
|
+
css`${tokensCss$1}`,
|
|
5580
|
+
css`${styleCss$1$1}`,
|
|
5581
|
+
css`${colorCss$2}`
|
|
5253
5582
|
];
|
|
5254
5583
|
}
|
|
5255
5584
|
|
|
@@ -5262,7 +5591,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5262
5591
|
*
|
|
5263
5592
|
*/
|
|
5264
5593
|
static register(name = "auro-icon") {
|
|
5265
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
5594
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
5266
5595
|
}
|
|
5267
5596
|
|
|
5268
5597
|
connectedCallback() {
|
|
@@ -5359,7 +5688,7 @@ class AuroHeader extends LitElement {
|
|
|
5359
5688
|
/**
|
|
5360
5689
|
* @private
|
|
5361
5690
|
*/
|
|
5362
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5691
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
5363
5692
|
}
|
|
5364
5693
|
|
|
5365
5694
|
// function to define props used within the scope of this component
|
|
@@ -5389,7 +5718,7 @@ class AuroHeader extends LitElement {
|
|
|
5389
5718
|
*
|
|
5390
5719
|
*/
|
|
5391
5720
|
static register(name = "auro-header") {
|
|
5392
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
5721
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroHeader);
|
|
5393
5722
|
}
|
|
5394
5723
|
|
|
5395
5724
|
firstUpdated() {
|
|
@@ -5485,7 +5814,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
5485
5814
|
|
|
5486
5815
|
this.large = false;
|
|
5487
5816
|
|
|
5488
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5817
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5489
5818
|
|
|
5490
5819
|
const versioning = new AuroDependencyVersioning();
|
|
5491
5820
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
@@ -5524,7 +5853,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
5524
5853
|
*
|
|
5525
5854
|
*/
|
|
5526
5855
|
static register(name = "auro-bibtemplate") {
|
|
5527
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
5856
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
5528
5857
|
}
|
|
5529
5858
|
|
|
5530
5859
|
/**
|
|
@@ -5564,6 +5893,18 @@ class AuroBibtemplate extends LitElement {
|
|
|
5564
5893
|
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
5565
5894
|
}
|
|
5566
5895
|
|
|
5896
|
+
firstUpdated(changedProperties) {
|
|
5897
|
+
super.firstUpdated(changedProperties);
|
|
5898
|
+
|
|
5899
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
5900
|
+
bubbles: true,
|
|
5901
|
+
composed: true,
|
|
5902
|
+
detail: {
|
|
5903
|
+
element: this
|
|
5904
|
+
}
|
|
5905
|
+
}));
|
|
5906
|
+
}
|
|
5907
|
+
|
|
5567
5908
|
// function that renders the HTML and CSS into the scope of the component
|
|
5568
5909
|
render() {
|
|
5569
5910
|
return html`
|
|
@@ -5596,6 +5937,214 @@ class AuroBibtemplate extends LitElement {
|
|
|
5596
5937
|
|
|
5597
5938
|
var bibTemplateVersion = '1.0.0';
|
|
5598
5939
|
|
|
5940
|
+
var colorCss = css`: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)}`;
|
|
5941
|
+
|
|
5942
|
+
var styleCss$1 = css`.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}`;
|
|
5943
|
+
|
|
5944
|
+
var tokensCss = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texticon-muted, #676767)}`;
|
|
5945
|
+
|
|
5946
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5947
|
+
// See LICENSE in the project root for license information.
|
|
5948
|
+
|
|
5949
|
+
// ---------------------------------------------------------------------
|
|
5950
|
+
|
|
5951
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5952
|
+
|
|
5953
|
+
class AuroLibraryRuntimeUtils {
|
|
5954
|
+
|
|
5955
|
+
/* eslint-disable jsdoc/require-param */
|
|
5956
|
+
|
|
5957
|
+
/**
|
|
5958
|
+
* This will register a new custom element with the browser.
|
|
5959
|
+
* @param {String} name - The name of the custom element.
|
|
5960
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5961
|
+
* @returns {void}
|
|
5962
|
+
*/
|
|
5963
|
+
registerComponent(name, componentClass) {
|
|
5964
|
+
if (!customElements.get(name)) {
|
|
5965
|
+
customElements.define(name, class extends componentClass {});
|
|
5966
|
+
}
|
|
5967
|
+
}
|
|
5968
|
+
|
|
5969
|
+
/**
|
|
5970
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5971
|
+
* @returns {void}
|
|
5972
|
+
*/
|
|
5973
|
+
closestElement(
|
|
5974
|
+
selector, // selector like in .closest()
|
|
5975
|
+
base = this, // extra functionality to skip a parent
|
|
5976
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5977
|
+
!el || el === document || el === window
|
|
5978
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5979
|
+
: found
|
|
5980
|
+
? found // found a selector INside this element
|
|
5981
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5982
|
+
) {
|
|
5983
|
+
return __Closest(base);
|
|
5984
|
+
}
|
|
5985
|
+
/* eslint-enable jsdoc/require-param */
|
|
5986
|
+
|
|
5987
|
+
/**
|
|
5988
|
+
* 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.
|
|
5989
|
+
* @param {Object} elem - The element to check.
|
|
5990
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5991
|
+
* @returns {void}
|
|
5992
|
+
*/
|
|
5993
|
+
handleComponentTagRename(elem, tagName) {
|
|
5994
|
+
const tag = tagName.toLowerCase();
|
|
5995
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5996
|
+
|
|
5997
|
+
if (elemTag !== tag) {
|
|
5998
|
+
elem.setAttribute(tag, true);
|
|
5999
|
+
}
|
|
6000
|
+
}
|
|
6001
|
+
|
|
6002
|
+
/**
|
|
6003
|
+
* Validates if an element is a specific Auro component.
|
|
6004
|
+
* @param {Object} elem - The element to validate.
|
|
6005
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6006
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6007
|
+
*/
|
|
6008
|
+
elementMatch(elem, tagName) {
|
|
6009
|
+
const tag = tagName.toLowerCase();
|
|
6010
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6011
|
+
|
|
6012
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6013
|
+
}
|
|
6014
|
+
}
|
|
6015
|
+
|
|
6016
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6017
|
+
// See LICENSE in the project root for license information.
|
|
6018
|
+
|
|
6019
|
+
|
|
6020
|
+
/**
|
|
6021
|
+
* Displays help text or error messages within form elements - Internal Use Only.
|
|
6022
|
+
*
|
|
6023
|
+
* @attr { Boolean } large - If declared, make font-size to 1rem(16px).
|
|
6024
|
+
*/
|
|
6025
|
+
class AuroHelpText extends LitElement {
|
|
6026
|
+
|
|
6027
|
+
constructor() {
|
|
6028
|
+
super();
|
|
6029
|
+
|
|
6030
|
+
this.error = false;
|
|
6031
|
+
this.onDark = false;
|
|
6032
|
+
this.hasTextContent = false;
|
|
6033
|
+
|
|
6034
|
+
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
6035
|
+
}
|
|
6036
|
+
|
|
6037
|
+
static get styles() {
|
|
6038
|
+
return [
|
|
6039
|
+
colorCss,
|
|
6040
|
+
styleCss$1,
|
|
6041
|
+
tokensCss
|
|
6042
|
+
];
|
|
6043
|
+
}
|
|
6044
|
+
|
|
6045
|
+
// function to define props used within the scope of this component
|
|
6046
|
+
static get properties() {
|
|
6047
|
+
return {
|
|
6048
|
+
|
|
6049
|
+
/**
|
|
6050
|
+
* @private
|
|
6051
|
+
*/
|
|
6052
|
+
slotNodes: {
|
|
6053
|
+
type: Boolean,
|
|
6054
|
+
},
|
|
6055
|
+
|
|
6056
|
+
/**
|
|
6057
|
+
* @private
|
|
6058
|
+
*/
|
|
6059
|
+
hasTextContent: {
|
|
6060
|
+
type: Boolean,
|
|
6061
|
+
},
|
|
6062
|
+
|
|
6063
|
+
/**
|
|
6064
|
+
* If declared, make font color red.
|
|
6065
|
+
*/
|
|
6066
|
+
error: {
|
|
6067
|
+
type: Boolean,
|
|
6068
|
+
reflect: true,
|
|
6069
|
+
},
|
|
6070
|
+
|
|
6071
|
+
/**
|
|
6072
|
+
* If declared, will apply onDark styles.
|
|
6073
|
+
*/
|
|
6074
|
+
onDark: {
|
|
6075
|
+
type: Boolean,
|
|
6076
|
+
reflect: true
|
|
6077
|
+
}
|
|
6078
|
+
};
|
|
6079
|
+
}
|
|
6080
|
+
|
|
6081
|
+
/**
|
|
6082
|
+
* This will register this element with the browser.
|
|
6083
|
+
* @param {string} [name="auro-helptext"] - The name of element that you want to register to.
|
|
6084
|
+
*
|
|
6085
|
+
* @example
|
|
6086
|
+
* AuroCheckbox.register("custom-helptext") // this will register this element to <custom-helptext/>
|
|
6087
|
+
*
|
|
6088
|
+
*/
|
|
6089
|
+
static register(name = "auro-helptext") {
|
|
6090
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHelpText);
|
|
6091
|
+
}
|
|
6092
|
+
|
|
6093
|
+
updated() {
|
|
6094
|
+
this.handleSlotChange();
|
|
6095
|
+
}
|
|
6096
|
+
|
|
6097
|
+
handleSlotChange(event) {
|
|
6098
|
+
if (event) {
|
|
6099
|
+
this.slotNodes = event.target.assignedNodes();
|
|
6100
|
+
}
|
|
6101
|
+
|
|
6102
|
+
this.hasTextContent = this.checkSlotsForContent(this.slotNodes);
|
|
6103
|
+
}
|
|
6104
|
+
|
|
6105
|
+
/**
|
|
6106
|
+
* Checks if any of the provided nodes or their nested slot nodes contain non-empty text content.
|
|
6107
|
+
*
|
|
6108
|
+
* @param {NodeList|Array} nodes - The list of nodes to check for content.
|
|
6109
|
+
* @returns {boolean} - Returns true if any node or nested slot node contains non-empty text content, otherwise false.
|
|
6110
|
+
* @private
|
|
6111
|
+
*/
|
|
6112
|
+
checkSlotsForContent(nodes) {
|
|
6113
|
+
if (!nodes) {
|
|
6114
|
+
return false;
|
|
6115
|
+
}
|
|
6116
|
+
|
|
6117
|
+
return nodes.some((node) => {
|
|
6118
|
+
if (node.textContent.trim()) {
|
|
6119
|
+
return true;
|
|
6120
|
+
}
|
|
6121
|
+
|
|
6122
|
+
if (!node.querySelector) {
|
|
6123
|
+
return false;
|
|
6124
|
+
}
|
|
6125
|
+
|
|
6126
|
+
const nestedSlot = node.tagName === 'SLOT' ? node : node.querySelector('slot');
|
|
6127
|
+
if (!nestedSlot) {
|
|
6128
|
+
return false;
|
|
6129
|
+
}
|
|
6130
|
+
|
|
6131
|
+
const nestedSlotNodes = nestedSlot.assignedNodes();
|
|
6132
|
+
return this.checkSlotsForContent(nestedSlotNodes);
|
|
6133
|
+
});
|
|
6134
|
+
}
|
|
6135
|
+
|
|
6136
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
6137
|
+
render() {
|
|
6138
|
+
return html$1`
|
|
6139
|
+
<div class="helptext-wrapper" ?visible="${this.hasTextContent}">
|
|
6140
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
6141
|
+
</div>
|
|
6142
|
+
`;
|
|
6143
|
+
}
|
|
6144
|
+
}
|
|
6145
|
+
|
|
6146
|
+
var helpTextVersion = '1.0.0';
|
|
6147
|
+
|
|
5599
6148
|
css`: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)}`;
|
|
5600
6149
|
|
|
5601
6150
|
css`:host ::slotted(hr){border-top-color:var(--ds-auro-menu-divider-color)}[loadingplaceholder] slot[name=loadingIcon]{color:var(--ds-auro-menu-loader-color)}[loadingplaceholder] slot[name=loadingText]{color:var(--ds-auro-menu-loader-text-color)}`;
|
|
@@ -5647,61 +6196,6 @@ function arrayConverter(value) {
|
|
|
5647
6196
|
throw new Error('Invalid value: Input must be an array or undefined');
|
|
5648
6197
|
}
|
|
5649
6198
|
|
|
5650
|
-
/**
|
|
5651
|
-
* Compare two arrays for equality.
|
|
5652
|
-
* @private
|
|
5653
|
-
* @param {Array} arr1 - First array to compare.
|
|
5654
|
-
* @param {Array} arr2 - Second array to compare.
|
|
5655
|
-
* @returns {boolean} True if arrays are equal.
|
|
5656
|
-
*/
|
|
5657
|
-
function arraysAreEqual(arr1, arr2) {
|
|
5658
|
-
// If both arrays undefined, they are equal (true)
|
|
5659
|
-
if (arr1 === undefined || arr2 === undefined) {
|
|
5660
|
-
return arr1 === arr2;
|
|
5661
|
-
}
|
|
5662
|
-
|
|
5663
|
-
// If arrays have different lengths, they are not equal
|
|
5664
|
-
if (arr1.length !== arr2.length) {
|
|
5665
|
-
return false;
|
|
5666
|
-
}
|
|
5667
|
-
|
|
5668
|
-
// If every item at each index is the same, return true
|
|
5669
|
-
for (let index = 0; index < arr1.length; index += 1) {
|
|
5670
|
-
if (arr1[index] !== arr2[index]) {
|
|
5671
|
-
return false;
|
|
5672
|
-
}
|
|
5673
|
-
}
|
|
5674
|
-
return true;
|
|
5675
|
-
}
|
|
5676
|
-
|
|
5677
|
-
/**
|
|
5678
|
-
* Compares array for changes.
|
|
5679
|
-
* @private
|
|
5680
|
-
* @param {Array|any} newVal - New value to compare.
|
|
5681
|
-
* @param {Array|any} oldVal - Old value to compare.
|
|
5682
|
-
* @returns {boolean} True if arrays have changed.
|
|
5683
|
-
*/
|
|
5684
|
-
function arrayOrUndefinedHasChanged(newVal, oldVal) {
|
|
5685
|
-
try {
|
|
5686
|
-
// Check if values are undefined or arrays
|
|
5687
|
-
const isArrayOrUndefined = (val) => val === undefined || Array.isArray(val);
|
|
5688
|
-
|
|
5689
|
-
// If non-array or non-undefined, throw error
|
|
5690
|
-
if (!isArrayOrUndefined(newVal) || !isArrayOrUndefined(oldVal)) {
|
|
5691
|
-
const invalidValue = isArrayOrUndefined(newVal) ? oldVal : newVal;
|
|
5692
|
-
throw new Error(`Value must be an array or undefined, received ${typeof invalidValue}`);
|
|
5693
|
-
}
|
|
5694
|
-
|
|
5695
|
-
// Return true if arrays have changed, false if they are the same
|
|
5696
|
-
return !arraysAreEqual(newVal, oldVal);
|
|
5697
|
-
} catch (error) {
|
|
5698
|
-
/* eslint-disable no-console */
|
|
5699
|
-
console.error(error);
|
|
5700
|
-
// If validation fails, it has changed
|
|
5701
|
-
return true;
|
|
5702
|
-
}
|
|
5703
|
-
}
|
|
5704
|
-
|
|
5705
6199
|
css`: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}`;
|
|
5706
6200
|
|
|
5707
6201
|
css`: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)}`;
|
|
@@ -5712,7 +6206,7 @@ css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);-
|
|
|
5712
6206
|
|
|
5713
6207
|
css`: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)}`;
|
|
5714
6208
|
|
|
5715
|
-
var styleCss = css
|
|
6209
|
+
var styleCss = css`.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock{display:block}.util_displayFlex{display:flex}.util_displayHidden{display:none}.util_displayHiddenVisually{position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}[auro-dropdown]{--ds-auro-dropdown-trigger-border-color: var(--ds-auro-select-border-color);--ds-auro-dropdown-trigger-background-color: var(--ds-auro-select-background-color);--ds-auro-dropdown-trigger-container-color: var(--ds-auro-select-background-color)}.mainContent{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;flex:1}.valueContainer [slot=displayValue]{display:none}.accents{display:flex;flex-direction:row;justify-content:center;align-items:center}::slotted([slot=typeIcon]){margin-right:8px}.displayValue{display:block}.displayValue:not(.force){display:none}.displayValue:not(.force).hasContent:is(.withValue):not(.hasFocus){display:block}.triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}.layout-emphasized .triggerContent,.layout-snowflake .triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}.layout-classic .triggerContent{display:flex;align-items:center;justify-content:center;width:100%;padding:0 8px 0 24px}:host(:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-basic-color-status-error, #e31f26);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}:host([ondark]:is([validity]:not([validity=valid]))) [auro-dropdown]{--ds-auro-select-border-color: var(--ds-advanced-color-state-error-inverse, #f9a4a8);--ds-auro-dropdown-helptext-text-color: var(--ds-basic-color-texticon-inverse, #ffffff)}#slotHolder{display:none}:host([disabled]) *{user-select:none}`;
|
|
5716
6210
|
|
|
5717
6211
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5718
6212
|
// See LICENSE in the project root for license information.
|
|
@@ -5727,14 +6221,15 @@ var styleCss = css`:focus:not(:focus-visible){outline:3px solid transparent}.uti
|
|
|
5727
6221
|
* @slot label - Defines the content of the label.
|
|
5728
6222
|
* @slot helpText - Defines the content of the helpText.
|
|
5729
6223
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
6224
|
+
* @slot valueText - Dropdown value text display.
|
|
5730
6225
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
5731
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
6226
|
+
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
5732
6227
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
5733
6228
|
* @csspart helpText - Apply CSS to the help text.
|
|
5734
6229
|
*/
|
|
5735
6230
|
|
|
5736
6231
|
// build the component class
|
|
5737
|
-
class AuroSelect extends
|
|
6232
|
+
class AuroSelect extends AuroElement$3 {
|
|
5738
6233
|
constructor() {
|
|
5739
6234
|
super();
|
|
5740
6235
|
|
|
@@ -5744,12 +6239,21 @@ class AuroSelect extends LitElement {
|
|
|
5744
6239
|
const idSubstrEnd = 8;
|
|
5745
6240
|
const idSubstrStart = 2;
|
|
5746
6241
|
|
|
6242
|
+
this.matchWidth = true;
|
|
6243
|
+
|
|
6244
|
+
// Layout Config
|
|
6245
|
+
this.layout = 'classic';
|
|
6246
|
+
this.shape = 'classic';
|
|
6247
|
+
this.size = 'xl';
|
|
6248
|
+
|
|
5747
6249
|
// floaterConfig
|
|
5748
6250
|
this.placement = 'bottom-start';
|
|
5749
6251
|
this.offset = 0;
|
|
5750
6252
|
this.noFlip = false;
|
|
5751
6253
|
this.autoPlacement = false;
|
|
5752
6254
|
|
|
6255
|
+
this.forceDisplayValue = false;
|
|
6256
|
+
|
|
5753
6257
|
/**
|
|
5754
6258
|
* @private
|
|
5755
6259
|
*/
|
|
@@ -5765,7 +6269,7 @@ class AuroSelect extends LitElement {
|
|
|
5765
6269
|
/**
|
|
5766
6270
|
* @private
|
|
5767
6271
|
*/
|
|
5768
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6272
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
5769
6273
|
|
|
5770
6274
|
/**
|
|
5771
6275
|
* Generate unique names for dependency components.
|
|
@@ -5782,10 +6286,25 @@ class AuroSelect extends LitElement {
|
|
|
5782
6286
|
*/
|
|
5783
6287
|
this.bibtemplateTag = versioning.generateTag('auro-formkit-select-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
5784
6288
|
|
|
6289
|
+
/**
|
|
6290
|
+
* @private
|
|
6291
|
+
*/
|
|
6292
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-input-helptext', helpTextVersion, AuroHelpText);
|
|
6293
|
+
|
|
5785
6294
|
/**
|
|
5786
6295
|
* @private
|
|
5787
6296
|
*/
|
|
5788
6297
|
this.isHiddenWhileLoading = false;
|
|
6298
|
+
|
|
6299
|
+
/**
|
|
6300
|
+
* @private
|
|
6301
|
+
*/
|
|
6302
|
+
this.hasFocus = false;
|
|
6303
|
+
|
|
6304
|
+
/**
|
|
6305
|
+
* @private
|
|
6306
|
+
*/
|
|
6307
|
+
this.hasDisplayValueContent = false;
|
|
5789
6308
|
}
|
|
5790
6309
|
|
|
5791
6310
|
/**
|
|
@@ -5799,6 +6318,7 @@ class AuroSelect extends LitElement {
|
|
|
5799
6318
|
this.value = undefined;
|
|
5800
6319
|
this.fullscreenBreakpoint = 'sm';
|
|
5801
6320
|
this.onDark = false;
|
|
6321
|
+
this.isPopoverVisible = false;
|
|
5802
6322
|
}
|
|
5803
6323
|
|
|
5804
6324
|
// This function is to define props used within the scope of this component
|
|
@@ -5815,6 +6335,14 @@ class AuroSelect extends LitElement {
|
|
|
5815
6335
|
reflect: true
|
|
5816
6336
|
},
|
|
5817
6337
|
|
|
6338
|
+
/**
|
|
6339
|
+
* If declared, the label and value will be visually hidden and the displayValue will render 100% of the time.
|
|
6340
|
+
*/
|
|
6341
|
+
forceDisplayValue: {
|
|
6342
|
+
type: Boolean,
|
|
6343
|
+
reflect: true
|
|
6344
|
+
},
|
|
6345
|
+
|
|
5818
6346
|
/**
|
|
5819
6347
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
5820
6348
|
* @default false
|
|
@@ -5832,6 +6360,22 @@ class AuroSelect extends LitElement {
|
|
|
5832
6360
|
reflect: true
|
|
5833
6361
|
},
|
|
5834
6362
|
|
|
6363
|
+
/**
|
|
6364
|
+
* @private
|
|
6365
|
+
*/
|
|
6366
|
+
isPopoverVisible: {
|
|
6367
|
+
type: Boolean,
|
|
6368
|
+
reflect: false
|
|
6369
|
+
},
|
|
6370
|
+
|
|
6371
|
+
/**
|
|
6372
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
6373
|
+
*/
|
|
6374
|
+
matchWidth: {
|
|
6375
|
+
type: Boolean,
|
|
6376
|
+
reflect: true
|
|
6377
|
+
},
|
|
6378
|
+
|
|
5835
6379
|
/**
|
|
5836
6380
|
* The name for the select element.
|
|
5837
6381
|
*/
|
|
@@ -5863,7 +6407,7 @@ class AuroSelect extends LitElement {
|
|
|
5863
6407
|
|
|
5864
6408
|
/**
|
|
5865
6409
|
* If declared, make bib.fullscreen.headline in HeadingDisplay.
|
|
5866
|
-
* Otherwise, Heading 600
|
|
6410
|
+
* Otherwise, Heading 600.
|
|
5867
6411
|
*/
|
|
5868
6412
|
largeFullscreenHeadline: {
|
|
5869
6413
|
type: Boolean,
|
|
@@ -5921,12 +6465,11 @@ class AuroSelect extends LitElement {
|
|
|
5921
6465
|
},
|
|
5922
6466
|
|
|
5923
6467
|
/**
|
|
5924
|
-
* Specifies the current selected menuOption.
|
|
6468
|
+
* Specifies the current selected menuOption. Default type is `HTMLElement`, changing to `Array<HTMLElement>` when `multiSelect` is true.
|
|
6469
|
+
* @type {HTMLElement|Array<HTMLElement>}
|
|
5925
6470
|
*/
|
|
5926
6471
|
optionSelected: {
|
|
5927
|
-
|
|
5928
|
-
converter: arrayConverter,
|
|
5929
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
6472
|
+
type: Object
|
|
5930
6473
|
},
|
|
5931
6474
|
|
|
5932
6475
|
/**
|
|
@@ -5996,12 +6539,11 @@ class AuroSelect extends LitElement {
|
|
|
5996
6539
|
},
|
|
5997
6540
|
|
|
5998
6541
|
/**
|
|
5999
|
-
* Value selected for the component.
|
|
6542
|
+
* Value selected for the component. Default type is `String`, changing to `Array<String>` when `multiSelect` is true.
|
|
6543
|
+
* @type {String|Array<String>}
|
|
6000
6544
|
*/
|
|
6001
6545
|
value: {
|
|
6002
|
-
|
|
6003
|
-
converter: arrayConverter,
|
|
6004
|
-
hasChanged: arrayOrUndefinedHasChanged
|
|
6546
|
+
type: Object
|
|
6005
6547
|
},
|
|
6006
6548
|
|
|
6007
6549
|
/**
|
|
@@ -6023,12 +6565,45 @@ class AuroSelect extends LitElement {
|
|
|
6023
6565
|
type: Boolean,
|
|
6024
6566
|
reflect: true,
|
|
6025
6567
|
attribute: false
|
|
6026
|
-
}
|
|
6568
|
+
},
|
|
6569
|
+
|
|
6570
|
+
/**
|
|
6571
|
+
* @private
|
|
6572
|
+
*/
|
|
6573
|
+
hasFocus: {
|
|
6574
|
+
type: Boolean,
|
|
6575
|
+
reflect: false,
|
|
6576
|
+
attribute: false
|
|
6577
|
+
},
|
|
6578
|
+
|
|
6579
|
+
/**
|
|
6580
|
+
* @private
|
|
6581
|
+
*/
|
|
6582
|
+
hasDisplayValueContent: {
|
|
6583
|
+
type: Boolean,
|
|
6584
|
+
reflect: false,
|
|
6585
|
+
attribute: false
|
|
6586
|
+
},
|
|
6027
6587
|
};
|
|
6028
6588
|
}
|
|
6029
6589
|
|
|
6030
6590
|
static get styles() {
|
|
6031
|
-
return [
|
|
6591
|
+
return [
|
|
6592
|
+
css`${shapeSizeCss$1}`,
|
|
6593
|
+
css`${tokensCss$4}`,
|
|
6594
|
+
css`${styleCss}`,
|
|
6595
|
+
];
|
|
6596
|
+
}
|
|
6597
|
+
|
|
6598
|
+
/**
|
|
6599
|
+
* Returns classmap configuration for wrapper elements in each layout.
|
|
6600
|
+
* @private
|
|
6601
|
+
* @return {object} - Returns classmap.
|
|
6602
|
+
*/
|
|
6603
|
+
get commonWrapperClasses() {
|
|
6604
|
+
return {
|
|
6605
|
+
'wrapper': true
|
|
6606
|
+
};
|
|
6032
6607
|
}
|
|
6033
6608
|
|
|
6034
6609
|
/**
|
|
@@ -6038,11 +6613,13 @@ class AuroSelect extends LitElement {
|
|
|
6038
6613
|
*/
|
|
6039
6614
|
configureDropdown() {
|
|
6040
6615
|
this.dropdown = this.shadowRoot.querySelector(this.dropdownTag._$litStatic$);
|
|
6041
|
-
|
|
6616
|
+
|
|
6617
|
+
this.dropdown.addEventListener('auroDropdown-toggled', () => {
|
|
6618
|
+
this.isPopoverVisible = this.dropdown.isPopoverVisible;
|
|
6619
|
+
});
|
|
6042
6620
|
|
|
6043
6621
|
// setting up bibtemplate
|
|
6044
6622
|
this.bibtemplate = this.dropdown.querySelector(this.bibtemplateTag._$litStatic$); // eslint-disable-line no-underscore-dangle
|
|
6045
|
-
this.bibtemplate.append(this.menuWrapper);
|
|
6046
6623
|
|
|
6047
6624
|
if (this.customBibWidth) {
|
|
6048
6625
|
this.dropdown.dropdownWidth = this.customBibWidth;
|
|
@@ -6061,7 +6638,7 @@ class AuroSelect extends LitElement {
|
|
|
6061
6638
|
*
|
|
6062
6639
|
*/
|
|
6063
6640
|
static register(name = "auro-select") {
|
|
6064
|
-
AuroLibraryRuntimeUtils$
|
|
6641
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroSelect);
|
|
6065
6642
|
}
|
|
6066
6643
|
|
|
6067
6644
|
/**
|
|
@@ -6072,21 +6649,34 @@ class AuroSelect extends LitElement {
|
|
|
6072
6649
|
updateDisplayedValue() {
|
|
6073
6650
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
6074
6651
|
|
|
6075
|
-
// Clear
|
|
6076
|
-
const
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
triggerContentEl.appendChild(placeholder);
|
|
6652
|
+
// Clear out old value
|
|
6653
|
+
const valueElem = triggerContentEl.querySelector('#value');
|
|
6654
|
+
if (valueElem) {
|
|
6655
|
+
valueElem.innerHTML = '';
|
|
6080
6656
|
}
|
|
6081
6657
|
|
|
6658
|
+
const slot = this.shadowRoot.querySelector('slot[name="displayValue"]');
|
|
6659
|
+
const slottedElements = slot.assignedElements();
|
|
6660
|
+
|
|
6661
|
+
slottedElements.forEach((element) => {
|
|
6662
|
+
element.remove();
|
|
6663
|
+
});
|
|
6664
|
+
|
|
6082
6665
|
// Handle selected options
|
|
6083
|
-
if (this.optionSelected
|
|
6084
|
-
|
|
6085
|
-
|
|
6666
|
+
if (this.optionSelected) {
|
|
6667
|
+
if (this.multiSelect && this.optionSelected.length > 0) {
|
|
6668
|
+
const displayText = this.optionSelected.map((option) => option.textContent).join(', ');
|
|
6669
|
+
|
|
6670
|
+
valueElem.textContent = displayText;
|
|
6671
|
+
} else {
|
|
6672
|
+
valueElem.innerHTML = this.optionSelected.innerHTML;
|
|
6673
|
+
const displayValueEl = this.optionSelected.querySelector("[slot='displayValue']");
|
|
6086
6674
|
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6675
|
+
if (displayValueEl) {
|
|
6676
|
+
this.appendChild(displayValueEl.cloneNode(true));
|
|
6677
|
+
}
|
|
6678
|
+
this.hasDisplayValueContent = displayValueEl !== null;
|
|
6679
|
+
}
|
|
6090
6680
|
}
|
|
6091
6681
|
|
|
6092
6682
|
this.dropdown.requestUpdate();
|
|
@@ -6165,8 +6755,6 @@ class AuroSelect extends LitElement {
|
|
|
6165
6755
|
* @returns {void}
|
|
6166
6756
|
*/
|
|
6167
6757
|
configureSelect() {
|
|
6168
|
-
// inject menu into menuWrapper
|
|
6169
|
-
this.menuWrapper.append(this.menu);
|
|
6170
6758
|
|
|
6171
6759
|
this.addEventListener('keydown', (evt) => {
|
|
6172
6760
|
if (evt.key === 'ArrowUp') {
|
|
@@ -6220,6 +6808,7 @@ class AuroSelect extends LitElement {
|
|
|
6220
6808
|
|
|
6221
6809
|
this.addEventListener('blur', () => {
|
|
6222
6810
|
this.validation.validate(this);
|
|
6811
|
+
this.hasFocus = false;
|
|
6223
6812
|
});
|
|
6224
6813
|
}
|
|
6225
6814
|
|
|
@@ -6295,6 +6884,7 @@ class AuroSelect extends LitElement {
|
|
|
6295
6884
|
*/
|
|
6296
6885
|
handleFocusin() {
|
|
6297
6886
|
|
|
6887
|
+
this.hasFocus = true;
|
|
6298
6888
|
this.touched = true;
|
|
6299
6889
|
}
|
|
6300
6890
|
|
|
@@ -6330,6 +6920,17 @@ class AuroSelect extends LitElement {
|
|
|
6330
6920
|
}
|
|
6331
6921
|
}
|
|
6332
6922
|
|
|
6923
|
+
/**
|
|
6924
|
+
* Resets all options to their default state.
|
|
6925
|
+
* @private
|
|
6926
|
+
*/
|
|
6927
|
+
clearSelection() {
|
|
6928
|
+
this.value = undefined;
|
|
6929
|
+
this.optionSelected = undefined;
|
|
6930
|
+
|
|
6931
|
+
this.menu.multiSelect = this.multiSelect;
|
|
6932
|
+
}
|
|
6933
|
+
|
|
6333
6934
|
/**
|
|
6334
6935
|
* Handle element attributes on update.
|
|
6335
6936
|
* @private
|
|
@@ -6366,13 +6967,20 @@ class AuroSelect extends LitElement {
|
|
|
6366
6967
|
|
|
6367
6968
|
// Set the initial value in auro-menu if defined
|
|
6368
6969
|
if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
|
|
6970
|
+
this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
|
|
6369
6971
|
this.menu.value = this.value;
|
|
6370
6972
|
}
|
|
6371
6973
|
}
|
|
6372
6974
|
|
|
6373
6975
|
async updated(changedProperties) {
|
|
6976
|
+
if (changedProperties.has('multiSelect')) {
|
|
6977
|
+
this.clearSelection();
|
|
6978
|
+
}
|
|
6979
|
+
|
|
6374
6980
|
if (changedProperties.has('value')) {
|
|
6375
6981
|
if (this.value) {
|
|
6982
|
+
this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
|
|
6983
|
+
|
|
6376
6984
|
this.menu.value = this.value;
|
|
6377
6985
|
|
|
6378
6986
|
// Wait for menu to finish updating its value
|
|
@@ -6397,6 +7005,10 @@ class AuroSelect extends LitElement {
|
|
|
6397
7005
|
bubbles: true,
|
|
6398
7006
|
cancelable: true,
|
|
6399
7007
|
composed: true,
|
|
7008
|
+
detail: {
|
|
7009
|
+
optionSelected: this.optionSelected,
|
|
7010
|
+
value: this.value
|
|
7011
|
+
}
|
|
6400
7012
|
}));
|
|
6401
7013
|
}
|
|
6402
7014
|
|
|
@@ -6444,8 +7056,23 @@ class AuroSelect extends LitElement {
|
|
|
6444
7056
|
_handleNativeSelectChange(event) {
|
|
6445
7057
|
const selectedOption = event.target.options[event.target.selectedIndex];
|
|
6446
7058
|
const selectedValue = selectedOption.value;
|
|
6447
|
-
|
|
6448
|
-
this.
|
|
7059
|
+
|
|
7060
|
+
if (this.multiSelect) {
|
|
7061
|
+
const currentArray = Array.isArray(this.value) ? this.value : [];
|
|
7062
|
+
|
|
7063
|
+
if (!currentArray.includes(selectedValue)) {
|
|
7064
|
+
this.value = [
|
|
7065
|
+
...currentArray,
|
|
7066
|
+
selectedValue
|
|
7067
|
+
];
|
|
7068
|
+
}
|
|
7069
|
+
} else {
|
|
7070
|
+
const currentValue = this.value;
|
|
7071
|
+
|
|
7072
|
+
if (currentValue !== selectedValue) {
|
|
7073
|
+
this.value = selectedValue;
|
|
7074
|
+
}
|
|
7075
|
+
}
|
|
6449
7076
|
}
|
|
6450
7077
|
|
|
6451
7078
|
/**
|
|
@@ -6458,16 +7085,296 @@ class AuroSelect extends LitElement {
|
|
|
6458
7085
|
if (!nativeSelect) {
|
|
6459
7086
|
return;
|
|
6460
7087
|
}
|
|
6461
|
-
|
|
6462
|
-
|
|
7088
|
+
|
|
7089
|
+
if (this.multiSelect) {
|
|
7090
|
+
nativeSelect.value = this.value ? this.value[0] : '';
|
|
7091
|
+
} else {
|
|
7092
|
+
nativeSelect.value = this.value || '';
|
|
7093
|
+
}
|
|
7094
|
+
}
|
|
7095
|
+
|
|
7096
|
+
renderAriaHtml() {
|
|
7097
|
+
return html`
|
|
7098
|
+
<div aria-live="polite" class="util_displayHiddenVisually">
|
|
7099
|
+
${this.optionActive && this.options.length > 0
|
|
7100
|
+
? html`
|
|
7101
|
+
${`${this.optionActive.innerText}, option ${this.options.indexOf(this.optionActive) + 1} of ${this.options.length}`}
|
|
7102
|
+
`
|
|
7103
|
+
: undefined
|
|
7104
|
+
};
|
|
7105
|
+
|
|
7106
|
+
${this.optionSelected && this.options.length > 0
|
|
7107
|
+
? html`
|
|
7108
|
+
${`${this.optionSelected.innerText} selected`}
|
|
7109
|
+
`
|
|
7110
|
+
: undefined
|
|
7111
|
+
};
|
|
7112
|
+
</div>
|
|
7113
|
+
`;
|
|
7114
|
+
}
|
|
7115
|
+
|
|
7116
|
+
renderNativeSelect() {
|
|
7117
|
+
return html`
|
|
7118
|
+
<div class="nativeSelectWrapper">
|
|
7119
|
+
<select
|
|
7120
|
+
tabindex="-1"
|
|
7121
|
+
id="${`native-select-${this.id || this.uniqueId}`}"
|
|
7122
|
+
name="${this.name || ''}"
|
|
7123
|
+
?disabled="${this.disabled}"
|
|
7124
|
+
?required="${this.required}"
|
|
7125
|
+
aria-hidden="true"
|
|
7126
|
+
autocomplete="${ifDefined$1(this.autocomplete)}"
|
|
7127
|
+
@change="${this._handleNativeSelectChange}">
|
|
7128
|
+
<option value="" ?selected="${!this.value}"></option>
|
|
7129
|
+
${this.options.map((option) => {
|
|
7130
|
+
const optionValue = option.value || option.textContent;
|
|
7131
|
+
return html`
|
|
7132
|
+
<option
|
|
7133
|
+
value="${optionValue}"
|
|
7134
|
+
?selected="${this.value === optionValue}">
|
|
7135
|
+
${option.textContent}
|
|
7136
|
+
</option>
|
|
7137
|
+
`;
|
|
7138
|
+
})}
|
|
7139
|
+
</select>
|
|
7140
|
+
</div>
|
|
7141
|
+
`;
|
|
7142
|
+
}
|
|
7143
|
+
|
|
7144
|
+
/**
|
|
7145
|
+
* Returns HTML for the help text and error message.
|
|
7146
|
+
* @private
|
|
7147
|
+
* @returns {html} - Returns HTML for the help text and error message.
|
|
7148
|
+
*/
|
|
7149
|
+
renderHtmlHelpText() {
|
|
7150
|
+
return html`
|
|
7151
|
+
${!this.validity || this.validity === undefined || this.validity === 'valid'
|
|
7152
|
+
? html`
|
|
7153
|
+
<${this.helpTextTag} ?onDark="${this.onDark}">
|
|
7154
|
+
<p id="${this.uniqueId}" part="helpText">
|
|
7155
|
+
<slot name="helptext"></slot>
|
|
7156
|
+
</p>
|
|
7157
|
+
</${this.helpTextTag}>
|
|
7158
|
+
`
|
|
7159
|
+
: html`
|
|
7160
|
+
<${this.helpTextTag} error ?onDark="${this.onDark}">
|
|
7161
|
+
<p id="${this.uniqueId}" role="alert" aria-live="assertive" part="helpText">
|
|
7162
|
+
ERROR MESSAGE ${this.errorMessage}
|
|
7163
|
+
</p>
|
|
7164
|
+
</${this.helpTextTag}>
|
|
7165
|
+
`
|
|
7166
|
+
}
|
|
7167
|
+
`;
|
|
7168
|
+
}
|
|
7169
|
+
|
|
7170
|
+
/**
|
|
7171
|
+
* Returns HTML for the emphasized layout.
|
|
7172
|
+
* @private
|
|
7173
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the emphasized layout.
|
|
7174
|
+
*/
|
|
7175
|
+
// TODO update to use util class
|
|
7176
|
+
renderLayoutEmphasized() {
|
|
7177
|
+
const placeholderClass = {
|
|
7178
|
+
hidden: this.value,
|
|
7179
|
+
};
|
|
7180
|
+
|
|
7181
|
+
const displayValueClasses = {
|
|
7182
|
+
'displayValue': true,
|
|
7183
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7184
|
+
'hasFocus': this.isPopoverVisible,
|
|
7185
|
+
'withValue': this.value && this.value.length > 0,
|
|
7186
|
+
'force': this.forceDisplayValue,
|
|
7187
|
+
};
|
|
7188
|
+
|
|
7189
|
+
const valueContainerClasses = {
|
|
7190
|
+
'valueContainer': true,
|
|
7191
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7192
|
+
};
|
|
7193
|
+
|
|
7194
|
+
return html`
|
|
7195
|
+
<div
|
|
7196
|
+
class="${classMap(this.commonWrapperClasses)}"
|
|
7197
|
+
part="wrapper">
|
|
7198
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7199
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7200
|
+
</div>
|
|
7201
|
+
<${this.dropdownTag}
|
|
7202
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7203
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7204
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7205
|
+
?noFlip="${this.noFlip}"
|
|
7206
|
+
?onDark="${this.onDark}"
|
|
7207
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7208
|
+
.offset="${this.offset}"
|
|
7209
|
+
.placement="${this.placement}"
|
|
7210
|
+
chevron
|
|
7211
|
+
fluid
|
|
7212
|
+
for="selectMenu"
|
|
7213
|
+
layout="${this.layout}"
|
|
7214
|
+
part="dropdown"
|
|
7215
|
+
shape="${this.shape}"
|
|
7216
|
+
size="${this.size}">
|
|
7217
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7218
|
+
<div class="accents left">
|
|
7219
|
+
<slot name="typeIcon"></slot>
|
|
7220
|
+
</div>
|
|
7221
|
+
<div class="mainContent">
|
|
7222
|
+
<div class="${classMap(valueContainerClasses)}">
|
|
7223
|
+
<label>
|
|
7224
|
+
<slot name="label"></slot>
|
|
7225
|
+
</label>
|
|
7226
|
+
<div class="value" id="value"></div>
|
|
7227
|
+
${this.value ? undefined : html`
|
|
7228
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
7229
|
+
<slot name="placeholder"></slot>
|
|
7230
|
+
</div>
|
|
7231
|
+
`}
|
|
7232
|
+
</div>
|
|
7233
|
+
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7234
|
+
<slot name="displayValue"></slot>
|
|
7235
|
+
</div>
|
|
7236
|
+
</div>
|
|
7237
|
+
<div class="accents right"></div>
|
|
7238
|
+
</div>
|
|
7239
|
+
<div class="menuWrapper"></div>
|
|
7240
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7241
|
+
<slot></slot>
|
|
7242
|
+
</${this.bibtemplateTag}>
|
|
7243
|
+
<div slot="helpText">
|
|
7244
|
+
${this.renderHtmlHelpText()}
|
|
7245
|
+
</div>
|
|
7246
|
+
</${this.dropdownTag}>
|
|
7247
|
+
</div>
|
|
7248
|
+
`;
|
|
7249
|
+
}
|
|
7250
|
+
|
|
7251
|
+
/**
|
|
7252
|
+
* Returns HTML for the snowflake layout.
|
|
7253
|
+
* @private
|
|
7254
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the snowflake layout.
|
|
7255
|
+
*/
|
|
7256
|
+
renderLayoutSnowflake() {
|
|
7257
|
+
const placeholderClass = {
|
|
7258
|
+
hidden: this.value,
|
|
7259
|
+
};
|
|
7260
|
+
|
|
7261
|
+
const displayValueClasses = {
|
|
7262
|
+
'displayValue': true,
|
|
7263
|
+
'hasContent': this.hasDisplayValueContent,
|
|
7264
|
+
'hasFocus': this.isPopoverVisible,
|
|
7265
|
+
'withValue': this.value && this.value.length > 0,
|
|
7266
|
+
'force': this.forceDisplayValue,
|
|
7267
|
+
};
|
|
7268
|
+
|
|
7269
|
+
const valueContainerClasses = {
|
|
7270
|
+
'valueContainer': true,
|
|
7271
|
+
'util_displayHiddenVisually': (this.forceDisplayValue || !(this.dropdown && this.dropdown.isPopoverVisible)) && this.hasDisplayValueContent
|
|
7272
|
+
};
|
|
7273
|
+
|
|
7274
|
+
return html`
|
|
7275
|
+
<div
|
|
7276
|
+
class="${classMap(this.commonWrapperClasses)}"
|
|
7277
|
+
part="wrapper">
|
|
7278
|
+
<div id="slotHolder" aria-hidden="true">
|
|
7279
|
+
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
7280
|
+
</div>
|
|
7281
|
+
<${this.dropdownTag}
|
|
7282
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7283
|
+
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7284
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7285
|
+
?noFlip="${this.noFlip}"
|
|
7286
|
+
?onDark="${this.onDark}"
|
|
7287
|
+
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
7288
|
+
.offset="${this.offset}"
|
|
7289
|
+
.placement="${this.placement}"
|
|
7290
|
+
chevron
|
|
7291
|
+
fluid
|
|
7292
|
+
for="selectMenu"
|
|
7293
|
+
layout="${this.layout}"
|
|
7294
|
+
part="dropdown"
|
|
7295
|
+
shape="${this.shape}"
|
|
7296
|
+
size="${this.size}">
|
|
7297
|
+
<div slot="trigger" aria-haspopup="true" id="triggerFocus" class="triggerContent">
|
|
7298
|
+
<div class="accents left">
|
|
7299
|
+
<slot name="typeIcon"></slot>
|
|
7300
|
+
</div>
|
|
7301
|
+
<div class="mainContent">
|
|
7302
|
+
<div class="${classMap(valueContainerClasses)}">
|
|
7303
|
+
<label>
|
|
7304
|
+
<slot name="label"></slot>
|
|
7305
|
+
</label>
|
|
7306
|
+
<div class="value" id="value"></div>
|
|
7307
|
+
${this.value ? undefined : html`
|
|
7308
|
+
<div id="placeholder" class="${classMap(placeholderClass)}">
|
|
7309
|
+
<slot name="placeholder"></slot>
|
|
7310
|
+
</div>
|
|
7311
|
+
`}
|
|
7312
|
+
</div>
|
|
7313
|
+
<div class="${classMap(displayValueClasses)}" aria-hidden="true" part="displayValue">
|
|
7314
|
+
<slot name="displayValue"></slot>
|
|
7315
|
+
</div>
|
|
7316
|
+
</div>
|
|
7317
|
+
<div class="accents right"></div>
|
|
7318
|
+
</div>
|
|
7319
|
+
<div class="menuWrapper"></div>
|
|
7320
|
+
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7321
|
+
<slot></slot>
|
|
7322
|
+
</${this.bibtemplateTag}>
|
|
7323
|
+
<div slot="helpText">
|
|
7324
|
+
${this.renderHtmlHelpText()}
|
|
7325
|
+
</div>
|
|
7326
|
+
</${this.dropdownTag}>
|
|
7327
|
+
</div>
|
|
7328
|
+
`;
|
|
7329
|
+
}
|
|
7330
|
+
|
|
7331
|
+
/**
|
|
7332
|
+
* Returns HTML for the classic layout.
|
|
7333
|
+
* @private
|
|
7334
|
+
* @returns {import("lit").TemplateResult} - Returns HTML for the classic layout.
|
|
7335
|
+
*/
|
|
7336
|
+
renderLayoutClassic() {
|
|
7337
|
+
return html`
|
|
7338
|
+
<div
|
|
7339
|
+
class="${classMap(this.commonWrapperClasses)} thin"
|
|
7340
|
+
part="wrapper">
|
|
7341
|
+
classic
|
|
7342
|
+
</div>
|
|
7343
|
+
`;
|
|
6463
7344
|
}
|
|
6464
7345
|
|
|
7346
|
+
/**
|
|
7347
|
+
* Logic to determine the layout of the component.
|
|
7348
|
+
* @private
|
|
7349
|
+
* @param {string} [ForcedLayout] - Used to force a specific layout, pass in the layout name to use.
|
|
7350
|
+
* @returns {void}
|
|
7351
|
+
*/
|
|
7352
|
+
renderLayout(ForcedLayout) {
|
|
7353
|
+
const layout = ForcedLayout || this.layout;
|
|
7354
|
+
|
|
7355
|
+
switch (layout) {
|
|
7356
|
+
case 'emphasized':
|
|
7357
|
+
return this.renderLayoutEmphasized();
|
|
7358
|
+
case 'emphasized-left':
|
|
7359
|
+
return this.renderLayoutEmphasized();
|
|
7360
|
+
case 'emphasized-right':
|
|
7361
|
+
return this.renderLayoutEmphasized();
|
|
7362
|
+
case 'snowflake':
|
|
7363
|
+
return this.renderLayoutSnowflake();
|
|
7364
|
+
case 'snowflake-left':
|
|
7365
|
+
return this.renderLayoutSnowflake();
|
|
7366
|
+
case 'snowflake-right':
|
|
7367
|
+
return this.renderLayoutSnowflake();
|
|
7368
|
+
default:
|
|
7369
|
+
return this.renderLayoutClassic();
|
|
7370
|
+
}
|
|
7371
|
+
}
|
|
6465
7372
|
|
|
6466
7373
|
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
6467
7374
|
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
6468
7375
|
|
|
6469
7376
|
// function that renders the HTML and CSS into the scope of the component
|
|
6470
|
-
|
|
7377
|
+
renderBACKUP() {
|
|
6471
7378
|
const placeholderClass = {
|
|
6472
7379
|
hidden: this.value,
|
|
6473
7380
|
};
|
|
@@ -6493,27 +7400,34 @@ class AuroSelect extends LitElement {
|
|
|
6493
7400
|
<slot name="bib.fullscreen.headline" @slotchange="${this.handleSlotChange}"></slot>
|
|
6494
7401
|
</div>
|
|
6495
7402
|
<${this.dropdownTag}
|
|
6496
|
-
|
|
7403
|
+
?autoPlacement="${this.autoPlacement}"
|
|
7404
|
+
?disabled="${this.disabled}"
|
|
6497
7405
|
?error="${this.validity !== undefined && this.validity !== 'valid'}"
|
|
7406
|
+
?matchWidth="${!this.flexMenuWidth}"
|
|
7407
|
+
?noFlip="${this.noFlip}"
|
|
6498
7408
|
?onDark="${this.onDark}"
|
|
6499
|
-
common
|
|
6500
|
-
fluid
|
|
6501
7409
|
.fullscreenBreakpoint="${this.fullscreenBreakpoint}"
|
|
6502
|
-
?matchWidth="${!this.flexMenuWidth}"
|
|
6503
|
-
chevron
|
|
6504
|
-
.placement="${this.placement}"
|
|
6505
7410
|
.offset="${this.offset}"
|
|
6506
|
-
|
|
6507
|
-
|
|
6508
|
-
|
|
7411
|
+
.placement="${this.placement}"
|
|
7412
|
+
chevron
|
|
7413
|
+
fluid
|
|
7414
|
+
for="selectMenu"
|
|
7415
|
+
layout="${this.layout}"
|
|
7416
|
+
part="dropdown"
|
|
7417
|
+
shape="${this.shape}"
|
|
7418
|
+
size="${this.size}">
|
|
6509
7419
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6510
|
-
<span id="placeholder"
|
|
7420
|
+
<span id="placeholder"
|
|
7421
|
+
class="${classMap(placeholderClass)}"
|
|
7422
|
+
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
7423
|
+
>
|
|
7424
|
+
<slot name="placeholder"></slot>
|
|
7425
|
+
</span>
|
|
7426
|
+
<slot name="valueText" id="valueText"></slot>
|
|
6511
7427
|
</span>
|
|
6512
7428
|
|
|
6513
|
-
<div class="menuWrapper">
|
|
6514
|
-
</div>
|
|
6515
|
-
|
|
6516
7429
|
<${this.bibtemplateTag} ?large="${this.largeFullscreenHeadline}" @close-click="${this.hideBib}">
|
|
7430
|
+
<slot></slot>
|
|
6517
7431
|
</${this.bibtemplateTag}>
|
|
6518
7432
|
<slot name="label" slot="label"></slot>
|
|
6519
7433
|
<p slot="helpText">
|
|
@@ -6553,6 +7467,7 @@ class AuroSelect extends LitElement {
|
|
|
6553
7467
|
</select>
|
|
6554
7468
|
</div>
|
|
6555
7469
|
<!-- Help text and error message template -->
|
|
7470
|
+
${this.renderHtmlHelpText()}
|
|
6556
7471
|
</div>
|
|
6557
7472
|
`;
|
|
6558
7473
|
}
|