@aurodesignsystem-dev/auro-formkit 0.0.0-pr681.1 → 0.0.0-pr684.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +12 -2
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +1026 -12
- package/components/bibtemplate/dist/registered.js +1026 -12
- package/components/combobox/demo/api.min.js +1830 -478
- package/components/combobox/demo/index.min.js +1830 -478
- package/components/combobox/dist/index.js +1703 -355
- package/components/combobox/dist/registered.js +1703 -355
- package/components/counter/demo/api.min.js +1813 -466
- package/components/counter/demo/index.min.js +1813 -466
- package/components/counter/dist/auro-counter-button.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +1813 -466
- package/components/counter/dist/registered.js +1813 -466
- package/components/datepicker/demo/api.min.js +2319 -643
- package/components/datepicker/demo/index.min.js +2319 -643
- package/components/datepicker/dist/index.js +2319 -643
- package/components/datepicker/dist/registered.js +2319 -643
- package/components/dropdown/demo/api.min.js +6 -2
- package/components/dropdown/demo/index.min.js +6 -2
- package/components/dropdown/dist/index.js +6 -2
- package/components/dropdown/dist/registered.js +6 -2
- package/components/input/demo/api.min.js +565 -235
- package/components/input/demo/index.min.js +565 -235
- package/components/input/dist/index.js +565 -235
- package/components/input/dist/registered.js +565 -235
- package/components/menu/demo/api.min.js +7 -3
- package/components/menu/demo/index.min.js +7 -3
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +7 -3
- package/components/menu/dist/registered.js +7 -3
- package/components/select/demo/api.min.js +1166 -144
- package/components/select/demo/index.min.js +1166 -144
- package/components/select/dist/index.js +1159 -141
- package/components/select/dist/registered.js +1159 -141
- package/package.json +1 -1
|
@@ -428,7 +428,7 @@ const {
|
|
|
428
428
|
|
|
429
429
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
430
430
|
|
|
431
|
-
let AuroLibraryRuntimeUtils$
|
|
431
|
+
let AuroLibraryRuntimeUtils$9 = class AuroLibraryRuntimeUtils {
|
|
432
432
|
|
|
433
433
|
/* eslint-disable jsdoc/require-param */
|
|
434
434
|
|
|
@@ -498,7 +498,7 @@ let AuroLibraryRuntimeUtils$b = class AuroLibraryRuntimeUtils {
|
|
|
498
498
|
let AuroFormValidation$1 = class AuroFormValidation {
|
|
499
499
|
|
|
500
500
|
constructor() {
|
|
501
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
501
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$9();
|
|
502
502
|
}
|
|
503
503
|
|
|
504
504
|
/**
|
|
@@ -863,7 +863,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
863
863
|
// See LICENSE in the project root for license information.
|
|
864
864
|
|
|
865
865
|
|
|
866
|
-
let AuroDependencyVersioning$
|
|
866
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
867
867
|
|
|
868
868
|
/**
|
|
869
869
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -7283,7 +7283,7 @@ __decorate([n({ type: Array })], RangeDatepickerCell.prototype, "disabledDays",
|
|
|
7283
7283
|
__decorate([n({ type: String })], RangeDatepickerCell.prototype, "hoveredDate", void 0);
|
|
7284
7284
|
__decorate([n({ type: Boolean })], RangeDatepickerCell.prototype, "isCurrentDate", void 0);
|
|
7285
7285
|
__decorate([n({ type: Object })], RangeDatepickerCell.prototype, "locale", null);
|
|
7286
|
-
AuroLibraryRuntimeUtils$
|
|
7286
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent('wc-range-datepicker-cell', RangeDatepickerCell);
|
|
7287
7287
|
|
|
7288
7288
|
class Day {
|
|
7289
7289
|
constructor(date) {
|
|
@@ -7801,7 +7801,7 @@ __decorate([n({ type: Array })], RangeDatepickerCalendar.prototype, "yearsList",
|
|
|
7801
7801
|
__decorate([n({ type: Array })], RangeDatepickerCalendar.prototype, "monthsList", void 0);
|
|
7802
7802
|
__decorate([n({ type: Array })], RangeDatepickerCalendar.prototype, "dayNamesOfTheWeek", void 0);
|
|
7803
7803
|
__decorate([n({ type: Array })], RangeDatepickerCalendar.prototype, "daysOfMonth", void 0);
|
|
7804
|
-
AuroLibraryRuntimeUtils$
|
|
7804
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent('wc-range-datepicker-calendar', RangeDatepickerCalendar);
|
|
7805
7805
|
|
|
7806
7806
|
/**
|
|
7807
7807
|
* @license
|
|
@@ -7827,7 +7827,7 @@ var colorCss$a = i$3`:host ::slotted([slot^=date_]){color:var(--ds-auro-calendar
|
|
|
7827
7827
|
|
|
7828
7828
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7829
7829
|
|
|
7830
|
-
let AuroLibraryRuntimeUtils$
|
|
7830
|
+
let AuroLibraryRuntimeUtils$8 = class AuroLibraryRuntimeUtils {
|
|
7831
7831
|
|
|
7832
7832
|
/* eslint-disable jsdoc/require-param */
|
|
7833
7833
|
|
|
@@ -9785,7 +9785,7 @@ class AuroPopover extends i$1 {
|
|
|
9785
9785
|
privateDefaults() {
|
|
9786
9786
|
this.isPopoverVisible = false;
|
|
9787
9787
|
this.id = `popover-${(Math.random() + 1).toString(36).substring(7)}`;
|
|
9788
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9788
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$8();
|
|
9789
9789
|
}
|
|
9790
9790
|
|
|
9791
9791
|
// function to define props used within the scope of this component
|
|
@@ -9815,7 +9815,7 @@ class AuroPopover extends i$1 {
|
|
|
9815
9815
|
*
|
|
9816
9816
|
*/
|
|
9817
9817
|
static register(name = "auro-popover") {
|
|
9818
|
-
AuroLibraryRuntimeUtils$
|
|
9818
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroPopover);
|
|
9819
9819
|
}
|
|
9820
9820
|
|
|
9821
9821
|
connectedCallback() {
|
|
@@ -9983,12 +9983,12 @@ class AuroCalendarCell extends i$1 {
|
|
|
9983
9983
|
this.dateStr = null;
|
|
9984
9984
|
this.renderForDateSlot = false; // When false, the numerical date will render vertically centered. When true, the date will render off-center to the top and leave room below for the slot content.
|
|
9985
9985
|
|
|
9986
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9986
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$9();
|
|
9987
9987
|
|
|
9988
9988
|
/**
|
|
9989
9989
|
* Generate unique names for dependency components.
|
|
9990
9990
|
*/
|
|
9991
|
-
const versioning = new AuroDependencyVersioning$
|
|
9991
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
9992
9992
|
this.popoverTag = versioning.generateTag('auro-formkit-datepicker-popover', popoverVersion, AuroPopover);
|
|
9993
9993
|
}
|
|
9994
9994
|
|
|
@@ -10887,9 +10887,9 @@ class CalendarUtilities {
|
|
|
10887
10887
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
10888
10888
|
*/const o=o=>o??E;
|
|
10889
10889
|
|
|
10890
|
-
var colorCss$
|
|
10890
|
+
var colorCss$3$2 = i$3`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
10891
10891
|
|
|
10892
|
-
var styleCss$
|
|
10892
|
+
var styleCss$4$1 = i$3`#bibTemplate{display:flex;overflow:hidden;height:100%;max-height:100%;flex-direction:column}#headerContainer{display:flex;flex-direction:column}#header{display:flex;width:100%;min-height:var(--ds-size-1000, 5rem);box-sizing:border-box;align-items:end;padding-top:var(--ds-size-400, 2rem);padding-right:var(--ds-size-700, 3.5rem);padding-left:var(--ds-size-200, 1rem);pointer-events:none}#subheader{width:100%}#subheader ::slotted([auro-input]){box-sizing:border-box;padding:0 var(--ds-size-200, 1rem)}#closeButton{position:absolute;top:var(--ds-size-400, 2rem);right:var(--ds-size-200, 1rem);border:none;background-color:transparent;cursor:pointer}#bodyContainer{position:relative;overflow:auto;flex:1 1 100%}:host([isfullscreen]) #bibTemplate{max-height:100dvh}:host([isfullscreen]) #bodyContainer{margin-top:var(--ds-size-100, 0.5rem)}#footerContainer{position:absolute;right:0;bottom:0;left:0;padding:var(--ds-size-200, 1rem)}`;
|
|
10893
10893
|
|
|
10894
10894
|
var tokenCss = i$3`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-elevation-200, 0px 0px 10px rgba(0, 0, 0, 0.15));--ds-auro-dropdownbib-footer-container-color: var(--ds-basic-color-surface-default, #ffffff)}`;
|
|
10895
10895
|
|
|
@@ -10900,7 +10900,7 @@ var tokenCss = i$3`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
10900
10900
|
|
|
10901
10901
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
10902
10902
|
|
|
10903
|
-
let AuroLibraryRuntimeUtils$
|
|
10903
|
+
let AuroLibraryRuntimeUtils$3$1 = class AuroLibraryRuntimeUtils {
|
|
10904
10904
|
|
|
10905
10905
|
/* eslint-disable jsdoc/require-param */
|
|
10906
10906
|
|
|
@@ -10967,7 +10967,7 @@ let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
|
10967
10967
|
// See LICENSE in the project root for license information.
|
|
10968
10968
|
|
|
10969
10969
|
|
|
10970
|
-
let AuroDependencyVersioning$
|
|
10970
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
10971
10971
|
|
|
10972
10972
|
/**
|
|
10973
10973
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -11003,159 +11003,479 @@ let AuroDependencyVersioning$4 = class AuroDependencyVersioning {
|
|
|
11003
11003
|
}
|
|
11004
11004
|
};
|
|
11005
11005
|
|
|
11006
|
-
|
|
11007
|
-
|
|
11008
|
-
|
|
11006
|
+
/**
|
|
11007
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
11008
|
+
*/
|
|
11009
|
+
const _observers$2 = new WeakMap();
|
|
11009
11010
|
|
|
11010
11011
|
/**
|
|
11011
|
-
*
|
|
11012
|
-
*
|
|
11013
|
-
*
|
|
11012
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
11013
|
+
* Structure: {
|
|
11014
|
+
* host: {
|
|
11015
|
+
* matchers: Set<Function>,
|
|
11016
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
11017
|
+
* }
|
|
11018
|
+
* }
|
|
11014
11019
|
*/
|
|
11020
|
+
const _transportConfig$2 = new WeakMap();
|
|
11015
11021
|
|
|
11016
|
-
|
|
11022
|
+
/**
|
|
11023
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
11024
|
+
*
|
|
11025
|
+
* @param {Object} params - The parameters for the function.
|
|
11026
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
11027
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11028
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
11029
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
11030
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
11031
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
11032
|
+
*/
|
|
11033
|
+
const transportAttributes$2 = ({ host, target, match, removeOriginal = true }) => {
|
|
11034
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
11035
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
11036
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
11037
|
+
}
|
|
11017
11038
|
|
|
11018
|
-
//
|
|
11019
|
-
|
|
11020
|
-
|
|
11021
|
-
hidden: { type: Boolean,
|
|
11022
|
-
reflect: true },
|
|
11023
|
-
hiddenVisually: { type: Boolean,
|
|
11024
|
-
reflect: true },
|
|
11025
|
-
hiddenAudible: { type: Boolean,
|
|
11026
|
-
reflect: true },
|
|
11027
|
-
};
|
|
11039
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
11040
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
11041
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
11028
11042
|
}
|
|
11029
11043
|
|
|
11030
|
-
|
|
11031
|
-
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
if (value) {
|
|
11035
|
-
return 'true'
|
|
11036
|
-
}
|
|
11044
|
+
// Guard Clause: Ensure match is a function
|
|
11045
|
+
if (typeof match !== 'function') {
|
|
11046
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
11047
|
+
}
|
|
11037
11048
|
|
|
11038
|
-
|
|
11049
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
11050
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
11051
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
11039
11052
|
}
|
|
11053
|
+
|
|
11054
|
+
// Register this transport and get cleanup function
|
|
11055
|
+
return _registerTransport$2({
|
|
11056
|
+
host,
|
|
11057
|
+
target,
|
|
11058
|
+
matcher: match,
|
|
11059
|
+
removeOriginal
|
|
11060
|
+
});
|
|
11040
11061
|
};
|
|
11041
11062
|
|
|
11042
|
-
|
|
11063
|
+
/**
|
|
11064
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
11065
|
+
*
|
|
11066
|
+
* @param {Object} params - The parameters object.
|
|
11067
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
11068
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
11069
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
11070
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
11071
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
11072
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
11073
|
+
* @private
|
|
11074
|
+
*/
|
|
11075
|
+
const _registerTransport$2 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11076
|
+
// Initialize config for this host if it doesn't exist
|
|
11077
|
+
if (!_transportConfig$2.has(host)) {
|
|
11078
|
+
_transportConfig$2.set(host, {
|
|
11079
|
+
matchers: new Set(),
|
|
11080
|
+
targets: new Map()
|
|
11081
|
+
});
|
|
11082
|
+
}
|
|
11043
11083
|
|
|
11044
|
-
|
|
11084
|
+
const config = _transportConfig$2.get(host);
|
|
11085
|
+
|
|
11086
|
+
// Add the matcher to the set of matchers for this host
|
|
11087
|
+
config.matchers.add(matcher);
|
|
11088
|
+
|
|
11089
|
+
// Initialize target entry if it doesn't exist
|
|
11090
|
+
if (!config.targets.has(target)) {
|
|
11091
|
+
config.targets.set(target, new Map());
|
|
11092
|
+
}
|
|
11093
|
+
|
|
11094
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
11095
|
+
config.targets.get(target).set(matcher, {
|
|
11096
|
+
removeOriginal,
|
|
11097
|
+
currentAttributes: new Map()
|
|
11098
|
+
});
|
|
11099
|
+
|
|
11100
|
+
// Perform initial attribute transport
|
|
11101
|
+
_transportAttributes$2({ host, target, matcher, removeOriginal });
|
|
11102
|
+
|
|
11103
|
+
// Attach observer
|
|
11104
|
+
_attachObserver$2(host);
|
|
11105
|
+
|
|
11106
|
+
// Return cleanup function and utility functions
|
|
11107
|
+
return {
|
|
11108
|
+
cleanup: () => _cleanupTransport$2(host, target, matcher),
|
|
11109
|
+
getObservedAttributes: () => _getObservedAttributes$2(host, target, matcher),
|
|
11110
|
+
getObservedAttribute: (attr) => _getObservedAttribute$2(host, target, matcher, attr),
|
|
11111
|
+
}
|
|
11112
|
+
};
|
|
11045
11113
|
|
|
11046
|
-
|
|
11114
|
+
/**
|
|
11115
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
11116
|
+
*
|
|
11117
|
+
* @param {HTMLElement} host - The host element
|
|
11118
|
+
* @param {HTMLElement} target - The target element
|
|
11119
|
+
* @param {Function} matcher - The matcher function
|
|
11120
|
+
* @private
|
|
11121
|
+
*/
|
|
11122
|
+
const _cleanupTransport$2 = (host, target, matcher) => {
|
|
11123
|
+
const config = _transportConfig$2.get(host);
|
|
11124
|
+
if (!config) return;
|
|
11125
|
+
|
|
11126
|
+
// Remove this matcher from this target
|
|
11127
|
+
const targetMatchers = config.targets.get(target);
|
|
11128
|
+
if (targetMatchers) {
|
|
11129
|
+
targetMatchers.delete(matcher);
|
|
11130
|
+
|
|
11131
|
+
// If this target has no more matchers, remove it
|
|
11132
|
+
if (targetMatchers.size === 0) {
|
|
11133
|
+
config.targets.delete(target);
|
|
11134
|
+
}
|
|
11135
|
+
}
|
|
11136
|
+
|
|
11137
|
+
// Check if this matcher is still used by any target
|
|
11138
|
+
let matcherStillUsed = false;
|
|
11139
|
+
for (const matcherMap of config.targets.values()) {
|
|
11140
|
+
if (matcherMap.has(matcher)) {
|
|
11141
|
+
matcherStillUsed = true;
|
|
11142
|
+
break;
|
|
11143
|
+
}
|
|
11144
|
+
}
|
|
11145
|
+
|
|
11146
|
+
// If not used anymore, remove from matchers set
|
|
11147
|
+
if (!matcherStillUsed) {
|
|
11148
|
+
config.matchers.delete(matcher);
|
|
11149
|
+
}
|
|
11150
|
+
|
|
11151
|
+
// If no more targets or matchers, detach observer
|
|
11152
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
11153
|
+
_detachObserver$2(host);
|
|
11154
|
+
}
|
|
11155
|
+
};
|
|
11047
11156
|
|
|
11048
11157
|
/**
|
|
11049
|
-
*
|
|
11050
|
-
*
|
|
11051
|
-
* @
|
|
11052
|
-
* @param {
|
|
11053
|
-
* @
|
|
11158
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
11159
|
+
*
|
|
11160
|
+
* @param {Object} params - The parameters object.
|
|
11161
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
11162
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11163
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
11164
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
11165
|
+
* @returns {void}
|
|
11166
|
+
* @private
|
|
11054
11167
|
*/
|
|
11168
|
+
const _transportAttributes$2 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11169
|
+
// Get a list of all matching attributes on the host element and their values
|
|
11170
|
+
const matchingAttributes = host.getAttributeNames()
|
|
11171
|
+
.filter(attr => matcher(attr))
|
|
11172
|
+
.reduce((acc, attr) => {
|
|
11173
|
+
acc[attr] = host.getAttribute(attr);
|
|
11174
|
+
return acc;
|
|
11175
|
+
}, {});
|
|
11176
|
+
|
|
11177
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
11178
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
11179
|
+
_setObservedAttribute$2(host, target, matcher, key, value);
|
|
11180
|
+
target.setAttribute(key, value);
|
|
11181
|
+
if (removeOriginal) {
|
|
11182
|
+
host.removeAttribute(key);
|
|
11183
|
+
}
|
|
11184
|
+
});
|
|
11185
|
+
};
|
|
11055
11186
|
|
|
11056
11187
|
/**
|
|
11057
|
-
*
|
|
11058
|
-
*
|
|
11059
|
-
* @param {
|
|
11060
|
-
* @
|
|
11061
|
-
* @
|
|
11062
|
-
* @returns {Promise}
|
|
11188
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
11189
|
+
*
|
|
11190
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
11191
|
+
* @returns {MutationObserver} The observer instance.
|
|
11192
|
+
* @private
|
|
11063
11193
|
*/
|
|
11064
|
-
const
|
|
11065
|
-
|
|
11066
|
-
if (
|
|
11067
|
-
|
|
11194
|
+
const _attachObserver$2 = (host) => {
|
|
11195
|
+
// If an observer for this host already exists, return it
|
|
11196
|
+
if (_observers$2.has(host)) {
|
|
11197
|
+
return _observers$2.get(host);
|
|
11068
11198
|
}
|
|
11069
|
-
return _fetchMap$3.get(uri);
|
|
11070
|
-
};
|
|
11071
11199
|
|
|
11072
|
-
|
|
11200
|
+
// Create a new MutationObserver
|
|
11201
|
+
const observer = new MutationObserver((mutations) => {
|
|
11202
|
+
const config = _transportConfig$2.get(host);
|
|
11203
|
+
if (!config) return;
|
|
11204
|
+
|
|
11205
|
+
// For each mutation affecting attributes
|
|
11206
|
+
mutations
|
|
11207
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
11208
|
+
.forEach(mutation => {
|
|
11209
|
+
const attributeName = mutation.attributeName;
|
|
11210
|
+
|
|
11211
|
+
// Find matchers that care about this attribute
|
|
11212
|
+
for (const matcher of config.matchers) {
|
|
11213
|
+
if (matcher(attributeName)) {
|
|
11214
|
+
// For each target that uses this matcher
|
|
11215
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
11216
|
+
if (matcherConfigs.has(matcher)) {
|
|
11217
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
11218
|
+
_transportAttributes$2({
|
|
11219
|
+
host,
|
|
11220
|
+
target,
|
|
11221
|
+
matcher,
|
|
11222
|
+
removeOriginal
|
|
11223
|
+
});
|
|
11224
|
+
}
|
|
11225
|
+
}
|
|
11226
|
+
}
|
|
11227
|
+
}
|
|
11228
|
+
});
|
|
11229
|
+
});
|
|
11073
11230
|
|
|
11074
|
-
//
|
|
11075
|
-
|
|
11231
|
+
// Start observing attribute changes
|
|
11232
|
+
observer.observe(host, { attributes: true });
|
|
11233
|
+
|
|
11234
|
+
// Store the observer
|
|
11235
|
+
_observers$2.set(host, observer);
|
|
11236
|
+
|
|
11237
|
+
return observer;
|
|
11238
|
+
};
|
|
11076
11239
|
|
|
11240
|
+
/**
|
|
11241
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
11242
|
+
*
|
|
11243
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
11244
|
+
* @private
|
|
11245
|
+
*/
|
|
11246
|
+
const _detachObserver$2 = (host) => {
|
|
11247
|
+
if (_observers$2.has(host)) {
|
|
11248
|
+
const observer = _observers$2.get(host);
|
|
11249
|
+
observer.disconnect();
|
|
11250
|
+
_observers$2.delete(host);
|
|
11251
|
+
}
|
|
11252
|
+
|
|
11253
|
+
// Clean up the transport config as well
|
|
11254
|
+
if (_transportConfig$2.has(host)) {
|
|
11255
|
+
_transportConfig$2.delete(host);
|
|
11256
|
+
}
|
|
11257
|
+
};
|
|
11077
11258
|
|
|
11078
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
11079
11259
|
/**
|
|
11080
|
-
*
|
|
11260
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
11261
|
+
* @param {HTMLElement} host - The host element
|
|
11262
|
+
* @param {HTMLElement} target - The target element
|
|
11263
|
+
* @param {Function} matcher - The matcher function
|
|
11264
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
11265
|
+
* @private
|
|
11081
11266
|
*/
|
|
11267
|
+
const _getMatcherConfig$2 = (host, target, matcher) => {
|
|
11268
|
+
const config = _transportConfig$2.get(host);
|
|
11269
|
+
if (!config) return undefined;
|
|
11270
|
+
|
|
11271
|
+
const targetMatchers = config.targets.get(target);
|
|
11272
|
+
if (!targetMatchers) return undefined;
|
|
11273
|
+
|
|
11274
|
+
return targetMatchers.get(matcher);
|
|
11275
|
+
};
|
|
11082
11276
|
|
|
11083
|
-
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11277
|
+
/**
|
|
11278
|
+
* Sets an observed attribute value
|
|
11279
|
+
* @param {HTMLElement} host - The host element
|
|
11280
|
+
* @param {HTMLElement} target - The target element
|
|
11281
|
+
* @param {Function} matcher - The matcher function
|
|
11282
|
+
* @param {string} key - The attribute name
|
|
11283
|
+
* @param {string} value - The attribute value
|
|
11284
|
+
* @private
|
|
11285
|
+
*/
|
|
11286
|
+
const _setObservedAttribute$2 = (host, target, matcher, key, value) => {
|
|
11287
|
+
const matcherConfig = _getMatcherConfig$2(host, target, matcher);
|
|
11288
|
+
if (matcherConfig) {
|
|
11289
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11088
11290
|
}
|
|
11291
|
+
};
|
|
11292
|
+
|
|
11293
|
+
const _getObservedAttribute$2 = (host, target, matcher, attr) => {
|
|
11294
|
+
const matcherConfig = _getMatcherConfig$2(host, target, matcher);
|
|
11295
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
11296
|
+
return undefined;
|
|
11297
|
+
};
|
|
11298
|
+
|
|
11299
|
+
const _getObservedAttributes$2 = (host, target, matcher) => {
|
|
11300
|
+
const matcherConfig = _getMatcherConfig$2(host, target, matcher);
|
|
11301
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
11302
|
+
return [];
|
|
11303
|
+
};
|
|
11304
|
+
|
|
11305
|
+
const _matchers$2 = {
|
|
11306
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
11307
|
+
'role': attr => attr.match(/^role$/)
|
|
11308
|
+
};
|
|
11309
|
+
|
|
11310
|
+
const transportAllA11yAttributes$2 = ({ host, target, removeOriginal = true }) => {
|
|
11311
|
+
return transportAttributes$2({
|
|
11312
|
+
host,
|
|
11313
|
+
target,
|
|
11314
|
+
match: attr => {
|
|
11315
|
+
for (const key in _matchers$2) {
|
|
11316
|
+
if (_matchers$2[key](attr)) return true;
|
|
11317
|
+
}
|
|
11318
|
+
return false;
|
|
11319
|
+
},
|
|
11320
|
+
removeOriginal
|
|
11321
|
+
});
|
|
11322
|
+
};
|
|
11323
|
+
|
|
11324
|
+
let AuroElement$1$3 = class AuroElement extends i$1 {
|
|
11325
|
+
|
|
11326
|
+
/**
|
|
11327
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
11328
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
11329
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
11330
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11331
|
+
* @private
|
|
11332
|
+
*/
|
|
11333
|
+
attributeWatcher;
|
|
11089
11334
|
|
|
11090
|
-
// function to define props used within the scope of this component
|
|
11091
11335
|
static get properties() {
|
|
11092
11336
|
return {
|
|
11093
|
-
...super.properties,
|
|
11094
11337
|
|
|
11095
11338
|
/**
|
|
11096
|
-
*
|
|
11339
|
+
* Defines the layout of an element.
|
|
11340
|
+
* @default {'default'}
|
|
11341
|
+
*/
|
|
11342
|
+
layout: {
|
|
11343
|
+
type: String,
|
|
11344
|
+
attribute: "layout",
|
|
11345
|
+
reflect: true
|
|
11346
|
+
},
|
|
11347
|
+
|
|
11348
|
+
/**
|
|
11349
|
+
* Defines the shape of an element.
|
|
11350
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
11351
|
+
* @default {'default'}
|
|
11352
|
+
*/
|
|
11353
|
+
shape: {
|
|
11354
|
+
type: String,
|
|
11355
|
+
attribute: "shape",
|
|
11356
|
+
reflect: true
|
|
11357
|
+
},
|
|
11358
|
+
|
|
11359
|
+
/**
|
|
11360
|
+
* Defines the size of an element.
|
|
11361
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
11362
|
+
* @default {'md'}
|
|
11363
|
+
*/
|
|
11364
|
+
size: {
|
|
11365
|
+
type: String,
|
|
11366
|
+
attribute: "size",
|
|
11367
|
+
reflect: true
|
|
11368
|
+
},
|
|
11369
|
+
|
|
11370
|
+
/**
|
|
11371
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
11372
|
+
* @default {false}
|
|
11097
11373
|
*/
|
|
11098
11374
|
onDark: {
|
|
11099
11375
|
type: Boolean,
|
|
11376
|
+
attribute: "ondark",
|
|
11100
11377
|
reflect: true
|
|
11101
11378
|
},
|
|
11102
11379
|
|
|
11103
11380
|
/**
|
|
11381
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
11382
|
+
* This is used to apply layout and shape classes dynamically.
|
|
11383
|
+
* @type {HTMLElement|null}
|
|
11384
|
+
* @default {null}
|
|
11104
11385
|
* @private
|
|
11105
11386
|
*/
|
|
11106
|
-
|
|
11387
|
+
wrapper: {
|
|
11388
|
+
type: HTMLElement,
|
|
11107
11389
|
attribute: false,
|
|
11108
|
-
reflect:
|
|
11390
|
+
reflect: false
|
|
11109
11391
|
}
|
|
11110
11392
|
};
|
|
11111
11393
|
}
|
|
11112
11394
|
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11395
|
+
|
|
11396
|
+
|
|
11397
|
+
resetShapeClasses() {
|
|
11398
|
+
if (this.shape && this.size) {
|
|
11399
|
+
|
|
11400
|
+
if (this.wrapper) {
|
|
11401
|
+
this.wrapper.classList.forEach((className) => {
|
|
11402
|
+
if (className.startsWith('shape-')) {
|
|
11403
|
+
this.wrapper.classList.remove(className);
|
|
11404
|
+
}
|
|
11405
|
+
});
|
|
11406
|
+
|
|
11407
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
11408
|
+
}
|
|
11409
|
+
}
|
|
11117
11410
|
}
|
|
11118
11411
|
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
let iconHTML = '';
|
|
11412
|
+
resetLayoutClasses() {
|
|
11413
|
+
if (this.layout) {
|
|
11414
|
+
if (this.wrapper) {
|
|
11415
|
+
this.wrapper.classList.forEach((className) => {
|
|
11416
|
+
if (className.startsWith('layout-')) {
|
|
11417
|
+
this.wrapper.classList.remove(className);
|
|
11418
|
+
}
|
|
11419
|
+
});
|
|
11128
11420
|
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
} else {
|
|
11132
|
-
iconHTML = await cacheFetch$3(`${this.uri}/icons/${category}/${name}.svg`);
|
|
11421
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
11422
|
+
}
|
|
11133
11423
|
}
|
|
11424
|
+
}
|
|
11134
11425
|
|
|
11135
|
-
|
|
11426
|
+
updateComponentArchitecture() {
|
|
11427
|
+
this.resetLayoutClasses();
|
|
11428
|
+
this.resetShapeClasses();
|
|
11429
|
+
}
|
|
11136
11430
|
|
|
11137
|
-
|
|
11431
|
+
updated(changedProperties) {
|
|
11432
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
11433
|
+
this.updateComponentArchitecture();
|
|
11434
|
+
}
|
|
11138
11435
|
}
|
|
11139
11436
|
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
if (!this.customSvg) {
|
|
11143
|
-
const svg = await this.fetchIcon(this.category, this.name);
|
|
11437
|
+
firstUpdated() {
|
|
11438
|
+
super.firstUpdated();
|
|
11144
11439
|
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
} else if (!svg) {
|
|
11148
|
-
const penDOM = new DOMParser().parseFromString(error$3.svg, 'text/html');
|
|
11440
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
11441
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
11149
11442
|
|
|
11150
|
-
|
|
11151
|
-
|
|
11443
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
11444
|
+
this.attributeWatcher = transportAllA11yAttributes$2({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
11445
|
+
}
|
|
11446
|
+
|
|
11447
|
+
disconnectedCallback() {
|
|
11448
|
+
super.disconnectedCallback();
|
|
11449
|
+
|
|
11450
|
+
// Cleanup the ARIA observer if it exists
|
|
11451
|
+
if (this.attributeWatcher) {
|
|
11452
|
+
this.attributeWatcher.cleanup();
|
|
11453
|
+
this.attributeWatcher = null;
|
|
11454
|
+
}
|
|
11455
|
+
}
|
|
11456
|
+
|
|
11457
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
11458
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
11459
|
+
render() {
|
|
11460
|
+
try {
|
|
11461
|
+
return this.renderLayout();
|
|
11462
|
+
} catch (error) {
|
|
11463
|
+
// failed to get the defined layout
|
|
11464
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
11465
|
+
|
|
11466
|
+
// fallback to the default layout
|
|
11467
|
+
return this.getLayout('default');
|
|
11152
11468
|
}
|
|
11153
11469
|
}
|
|
11154
11470
|
};
|
|
11155
11471
|
|
|
11156
|
-
var
|
|
11472
|
+
var styleCss$3$1 = i$3`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
11157
11473
|
|
|
11158
|
-
var colorCss$8 = i$3`: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)}`;
|
|
11474
|
+
var colorCss$2$2 = i$3`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
11475
|
+
|
|
11476
|
+
var tokensCss$2$2 = i$3`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
11477
|
+
|
|
11478
|
+
var shapeSize$2 = i$3`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
11159
11479
|
|
|
11160
11480
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11161
11481
|
// See LICENSE in the project root for license information.
|
|
@@ -11164,7 +11484,7 @@ var colorCss$8 = i$3`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
11164
11484
|
|
|
11165
11485
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11166
11486
|
|
|
11167
|
-
let AuroLibraryRuntimeUtils$
|
|
11487
|
+
let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
11168
11488
|
|
|
11169
11489
|
/* eslint-disable jsdoc/require-param */
|
|
11170
11490
|
|
|
@@ -11227,19 +11547,696 @@ let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
|
11227
11547
|
}
|
|
11228
11548
|
};
|
|
11229
11549
|
|
|
11230
|
-
|
|
11550
|
+
var styleCss$2$2 = i$3`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
11551
|
+
|
|
11552
|
+
var colorCss$1$2 = i$3`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-basic-color-brand-primary, #01426a)}:host([ondark]){--ds-auro-loader-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([orbit])>span{--ds-auro-loader-background-color:transparent}:host([orbit])>span:nth-child(1){--ds-auro-loader-border-color:currentcolor;opacity:.25}:host([orbit])>span:nth-child(2){--ds-auro-loader-border-color:currentcolor;border-right-color:transparent;border-bottom-color:transparent;border-left-color:transparent}`;
|
|
11553
|
+
|
|
11554
|
+
var tokensCss$1$2 = i$3`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11555
|
+
|
|
11556
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11231
11557
|
// See LICENSE in the project root for license information.
|
|
11232
11558
|
|
|
11233
11559
|
|
|
11234
|
-
let
|
|
11560
|
+
let AuroLoader$2 = class AuroLoader extends i$1 {
|
|
11235
11561
|
constructor() {
|
|
11236
11562
|
super();
|
|
11237
11563
|
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11564
|
+
/**
|
|
11565
|
+
* @private
|
|
11566
|
+
*/
|
|
11567
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
11568
|
+
|
|
11569
|
+
/**
|
|
11570
|
+
* @private
|
|
11571
|
+
*/
|
|
11572
|
+
this.mdCount = 3;
|
|
11573
|
+
|
|
11574
|
+
/**
|
|
11575
|
+
* @private
|
|
11576
|
+
*/
|
|
11577
|
+
this.smCount = 2;
|
|
11578
|
+
|
|
11579
|
+
/**
|
|
11580
|
+
* @private
|
|
11581
|
+
*/
|
|
11582
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$2();
|
|
11583
|
+
|
|
11584
|
+
this.orbit = false;
|
|
11585
|
+
this.ringworm = false;
|
|
11586
|
+
this.laser = false;
|
|
11587
|
+
this.pulse = false;
|
|
11588
|
+
}
|
|
11589
|
+
|
|
11590
|
+
// function to define props used within the scope of this component
|
|
11591
|
+
static get properties() {
|
|
11592
|
+
return {
|
|
11593
|
+
|
|
11594
|
+
/**
|
|
11595
|
+
* Sets loader to laser type.
|
|
11596
|
+
*/
|
|
11597
|
+
laser: {
|
|
11598
|
+
type: Boolean,
|
|
11599
|
+
reflect: true
|
|
11600
|
+
},
|
|
11601
|
+
|
|
11602
|
+
/**
|
|
11603
|
+
* Sets loader to orbit type.
|
|
11604
|
+
*/
|
|
11605
|
+
orbit: {
|
|
11606
|
+
type: Boolean,
|
|
11607
|
+
reflect: true
|
|
11608
|
+
},
|
|
11609
|
+
|
|
11610
|
+
/**
|
|
11611
|
+
* Sets loader to pulse type.
|
|
11612
|
+
*/
|
|
11613
|
+
pulse: {
|
|
11614
|
+
type: Boolean,
|
|
11615
|
+
reflect: true
|
|
11616
|
+
},
|
|
11617
|
+
|
|
11618
|
+
/**
|
|
11619
|
+
* Sets loader to ringworm type.
|
|
11620
|
+
*/
|
|
11621
|
+
ringworm: {
|
|
11622
|
+
type: Boolean,
|
|
11623
|
+
reflect: true
|
|
11624
|
+
}
|
|
11625
|
+
};
|
|
11626
|
+
}
|
|
11627
|
+
|
|
11628
|
+
static get styles() {
|
|
11629
|
+
return [
|
|
11630
|
+
i$3`${styleCss$2$2}`,
|
|
11631
|
+
i$3`${colorCss$1$2}`,
|
|
11632
|
+
i$3`${tokensCss$1$2}`
|
|
11633
|
+
];
|
|
11634
|
+
}
|
|
11635
|
+
|
|
11636
|
+
/**
|
|
11637
|
+
* This will register this element with the browser.
|
|
11638
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
11639
|
+
*
|
|
11640
|
+
* @example
|
|
11641
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
11642
|
+
*
|
|
11643
|
+
*/
|
|
11644
|
+
static register(name = "auro-loader") {
|
|
11645
|
+
AuroLibraryRuntimeUtils$2$2.prototype.registerComponent(name, AuroLoader);
|
|
11646
|
+
}
|
|
11647
|
+
|
|
11648
|
+
firstUpdated() {
|
|
11649
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
11650
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
11651
|
+
}
|
|
11652
|
+
|
|
11653
|
+
connectedCallback() {
|
|
11654
|
+
super.connectedCallback();
|
|
11655
|
+
}
|
|
11656
|
+
|
|
11657
|
+
/**
|
|
11658
|
+
* @private
|
|
11659
|
+
* @returns {Array} Numbered array for template map.
|
|
11660
|
+
*/
|
|
11661
|
+
defineTemplate() {
|
|
11662
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
11663
|
+
|
|
11664
|
+
if (this.orbit || this.laser) {
|
|
11665
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
11666
|
+
} else if (this.ringworm) {
|
|
11667
|
+
nodes = Array.from(Array(0).keys());
|
|
11668
|
+
}
|
|
11669
|
+
|
|
11670
|
+
return nodes;
|
|
11671
|
+
}
|
|
11672
|
+
|
|
11673
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
11674
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
11675
|
+
|
|
11676
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
11677
|
+
render() {
|
|
11678
|
+
return x`
|
|
11679
|
+
${this.defineTemplate().map((idx) => x`
|
|
11680
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
11681
|
+
`)}
|
|
11682
|
+
|
|
11683
|
+
<div class="no-animation">Loading...</div>
|
|
11684
|
+
|
|
11685
|
+
${this.ringworm ? x`
|
|
11686
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
11687
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
11688
|
+
</svg>`
|
|
11689
|
+
: ``
|
|
11690
|
+
}
|
|
11691
|
+
`;
|
|
11692
|
+
}
|
|
11693
|
+
};
|
|
11694
|
+
|
|
11695
|
+
var loaderVersion$2 = '5.0.0';
|
|
11696
|
+
|
|
11697
|
+
/* eslint-disable max-lines, curly */
|
|
11698
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11699
|
+
// See LICENSE in the project root for license information.
|
|
11700
|
+
|
|
11701
|
+
|
|
11702
|
+
/**
|
|
11703
|
+
* @slot - Default slot for the text of the button.
|
|
11704
|
+
* @slot icon - Slot to provide auro-icon for the button.
|
|
11705
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
11706
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
11707
|
+
* @csspart text - Apply CSS to text slot.
|
|
11708
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
11709
|
+
*/
|
|
11710
|
+
|
|
11711
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
11712
|
+
|
|
11713
|
+
const ICON_ONLY_SHAPES$2 = ['circle'];
|
|
11714
|
+
|
|
11715
|
+
/**
|
|
11716
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
11717
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
11718
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
11719
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
11720
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
11721
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
11722
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
11723
|
+
*/
|
|
11724
|
+
let AuroButton$2 = class AuroButton extends AuroElement$1$3 {
|
|
11725
|
+
|
|
11726
|
+
/**
|
|
11727
|
+
* Enables form association for this element.
|
|
11728
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
11729
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
11730
|
+
*/
|
|
11731
|
+
static get formAssociated() {
|
|
11732
|
+
return true;
|
|
11733
|
+
}
|
|
11734
|
+
|
|
11735
|
+
constructor() {
|
|
11736
|
+
super();
|
|
11737
|
+
this.autofocus = false;
|
|
11738
|
+
this.disabled = false;
|
|
11739
|
+
this.loading = false;
|
|
11740
|
+
this.size = "md";
|
|
11741
|
+
this.shape = "rounded";
|
|
11742
|
+
this.onDark = false;
|
|
11743
|
+
this.fluid = false;
|
|
11744
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
11745
|
+
|
|
11746
|
+
// Support for HTML5 forms
|
|
11747
|
+
if (typeof this.attachInternals === 'function') {
|
|
11748
|
+
this.internals = this.attachInternals();
|
|
11749
|
+
} else {
|
|
11750
|
+
this.internals = null;
|
|
11751
|
+
|
|
11752
|
+
// eslint-disable-next-line no-console
|
|
11753
|
+
console.warn('This browser does not support form association features. Some form-related functionality may not work as expected. Consider using a polyfill or handling click events manually.');
|
|
11754
|
+
}
|
|
11755
|
+
|
|
11756
|
+
/**
|
|
11757
|
+
* Generate unique names for dependency components.
|
|
11758
|
+
*/
|
|
11759
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
11760
|
+
|
|
11761
|
+
/**
|
|
11762
|
+
* @private
|
|
11763
|
+
*/
|
|
11764
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$2, AuroLoader$2);
|
|
11765
|
+
}
|
|
11766
|
+
|
|
11767
|
+
static get styles() {
|
|
11768
|
+
return [
|
|
11769
|
+
tokensCss$2$2,
|
|
11770
|
+
styleCss$3$1,
|
|
11771
|
+
colorCss$2$2,
|
|
11772
|
+
shapeSize$2
|
|
11773
|
+
];
|
|
11774
|
+
}
|
|
11775
|
+
|
|
11776
|
+
static get properties() {
|
|
11777
|
+
return {
|
|
11778
|
+
|
|
11779
|
+
...super.properties,
|
|
11780
|
+
|
|
11781
|
+
/**
|
|
11782
|
+
* Override layout since it isn't used in this component.
|
|
11783
|
+
* @private
|
|
11784
|
+
*/
|
|
11785
|
+
layout: {
|
|
11786
|
+
type: Boolean,
|
|
11787
|
+
attribute: false,
|
|
11788
|
+
reflect: false
|
|
11789
|
+
},
|
|
11790
|
+
|
|
11791
|
+
/**
|
|
11792
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11793
|
+
*/
|
|
11794
|
+
autofocus: {
|
|
11795
|
+
type: Boolean,
|
|
11796
|
+
reflect: true
|
|
11797
|
+
},
|
|
11798
|
+
|
|
11799
|
+
/**
|
|
11800
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
11801
|
+
*/
|
|
11802
|
+
disabled: {
|
|
11803
|
+
type: Boolean,
|
|
11804
|
+
reflect: true
|
|
11805
|
+
},
|
|
11806
|
+
|
|
11807
|
+
/**
|
|
11808
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
11809
|
+
*/
|
|
11810
|
+
fluid: {
|
|
11811
|
+
type: Boolean,
|
|
11812
|
+
reflect: true
|
|
11813
|
+
},
|
|
11814
|
+
|
|
11815
|
+
/**
|
|
11816
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
11817
|
+
*/
|
|
11818
|
+
loading: {
|
|
11819
|
+
type: Boolean,
|
|
11820
|
+
reflect: true
|
|
11821
|
+
},
|
|
11822
|
+
|
|
11823
|
+
/**
|
|
11824
|
+
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
11825
|
+
*/
|
|
11826
|
+
loadingText: {
|
|
11827
|
+
type: String
|
|
11828
|
+
},
|
|
11829
|
+
|
|
11830
|
+
/**
|
|
11831
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
11832
|
+
*/
|
|
11833
|
+
tIndex: {
|
|
11834
|
+
type: String,
|
|
11835
|
+
reflect: true
|
|
11836
|
+
},
|
|
11837
|
+
|
|
11838
|
+
/**
|
|
11839
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
11840
|
+
*/
|
|
11841
|
+
title: {
|
|
11842
|
+
type: String,
|
|
11843
|
+
reflect: true
|
|
11844
|
+
},
|
|
11845
|
+
|
|
11846
|
+
/**
|
|
11847
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
11848
|
+
*/
|
|
11849
|
+
type: {
|
|
11850
|
+
type: String,
|
|
11851
|
+
reflect: true
|
|
11852
|
+
},
|
|
11853
|
+
|
|
11854
|
+
/**
|
|
11855
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
11856
|
+
*/
|
|
11857
|
+
value: {
|
|
11858
|
+
type: String,
|
|
11859
|
+
reflect: true
|
|
11860
|
+
},
|
|
11861
|
+
|
|
11862
|
+
/**
|
|
11863
|
+
* Sets button variant option.
|
|
11864
|
+
* @default primary
|
|
11865
|
+
*/
|
|
11866
|
+
variant: {
|
|
11867
|
+
type: String,
|
|
11868
|
+
reflect: true
|
|
11869
|
+
},
|
|
11870
|
+
};
|
|
11871
|
+
}
|
|
11872
|
+
|
|
11873
|
+
/**
|
|
11874
|
+
* This will register this element with the browser.
|
|
11875
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
11876
|
+
*
|
|
11877
|
+
* @example
|
|
11878
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
11879
|
+
*
|
|
11880
|
+
*/
|
|
11881
|
+
static register(name = "auro-button") {
|
|
11882
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroButton);
|
|
11883
|
+
}
|
|
11884
|
+
|
|
11885
|
+
/**
|
|
11886
|
+
* Internal method to apply focus to the HTML5 button.
|
|
11887
|
+
* @private
|
|
11888
|
+
* @returns {void}
|
|
11889
|
+
*/
|
|
11890
|
+
focus() {
|
|
11891
|
+
this.renderRoot.querySelector('button').focus();
|
|
11892
|
+
}
|
|
11893
|
+
|
|
11894
|
+
/**
|
|
11895
|
+
* Submits the form that this button is associated with.
|
|
11896
|
+
* @private
|
|
11897
|
+
* @returns {void}
|
|
11898
|
+
*/
|
|
11899
|
+
surfaceSubmitEvent() {
|
|
11900
|
+
if (this.form) {
|
|
11901
|
+
this.form.requestSubmit();
|
|
11902
|
+
}
|
|
11903
|
+
}
|
|
11904
|
+
|
|
11905
|
+
/**
|
|
11906
|
+
* Returns the form element that this button is associated with.
|
|
11907
|
+
* @private
|
|
11908
|
+
* @returns {HTMLFormElement | null}
|
|
11909
|
+
*/
|
|
11910
|
+
get form() {
|
|
11911
|
+
return this.internals ? this.internals.form : null;
|
|
11912
|
+
}
|
|
11913
|
+
|
|
11914
|
+
/**
|
|
11915
|
+
* @private
|
|
11916
|
+
* @returns {Boolean}
|
|
11917
|
+
*/
|
|
11918
|
+
get hideText() {
|
|
11919
|
+
return ICON_ONLY_SHAPES$2.includes(this.shape);
|
|
11920
|
+
}
|
|
11921
|
+
|
|
11922
|
+
/**
|
|
11923
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
11924
|
+
* @returns {string | undefined}
|
|
11925
|
+
* @private
|
|
11926
|
+
*/
|
|
11927
|
+
get currentAriaLabel() {
|
|
11928
|
+
if (!this.attributeWatcher) return undefined;
|
|
11929
|
+
|
|
11930
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
11931
|
+
return ariaLabel || undefined;
|
|
11932
|
+
}
|
|
11933
|
+
|
|
11934
|
+
/**
|
|
11935
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
11936
|
+
* @returns {string | undefined}
|
|
11937
|
+
* @private
|
|
11938
|
+
*/
|
|
11939
|
+
get currentAriaLabelledBy() {
|
|
11940
|
+
if (!this.attributeWatcher) return undefined;
|
|
11941
|
+
|
|
11942
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
11943
|
+
return ariaLabelledBy || undefined;
|
|
11944
|
+
}
|
|
11945
|
+
|
|
11946
|
+
/**
|
|
11947
|
+
* Renders the default layout for the button.
|
|
11948
|
+
* @returns {TemplateResult}
|
|
11949
|
+
* @private
|
|
11950
|
+
*/
|
|
11951
|
+
renderLayoutDefault() {
|
|
11952
|
+
const classes = {
|
|
11953
|
+
"util_insetLg--squish": true,
|
|
11954
|
+
"auro-button": true,
|
|
11955
|
+
wrapper: true,
|
|
11956
|
+
loading: this.loading,
|
|
11957
|
+
};
|
|
11958
|
+
|
|
11959
|
+
return u$3`
|
|
11960
|
+
<button
|
|
11961
|
+
part="button"
|
|
11962
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
11963
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
11964
|
+
tabIndex="${o(this.tIndex)}"
|
|
11965
|
+
?autofocus="${this.autofocus}"
|
|
11966
|
+
class="${e(classes)}"
|
|
11967
|
+
?disabled="${this.disabled || this.loading}"
|
|
11968
|
+
?onDark="${this.onDark}"
|
|
11969
|
+
title="${o(this.title ? this.title : undefined)}"
|
|
11970
|
+
name="${o(this.name ? this.name : undefined)}"
|
|
11971
|
+
type="${o(this.type ? this.type : undefined)}"
|
|
11972
|
+
variant="${o(this.variant ? this.variant : undefined)}"
|
|
11973
|
+
.value="${o(this.value ? this.value : undefined)}"
|
|
11974
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
11975
|
+
>
|
|
11976
|
+
${o(this.loading ? u$3`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
11977
|
+
|
|
11978
|
+
<span class="contentWrapper">
|
|
11979
|
+
<span class="textSlot" part="text">
|
|
11980
|
+
${this.hideText ? undefined : u$3`<slot></slot>`}
|
|
11981
|
+
</span>
|
|
11982
|
+
|
|
11983
|
+
<span part="icon">
|
|
11984
|
+
<slot name="icon"></slot>
|
|
11985
|
+
</span>
|
|
11986
|
+
</span>
|
|
11987
|
+
</button>
|
|
11988
|
+
`;
|
|
11989
|
+
}
|
|
11990
|
+
|
|
11991
|
+
/**
|
|
11992
|
+
* Renders the layout of the button
|
|
11993
|
+
* @returns {TemplateResult}
|
|
11994
|
+
* @private
|
|
11995
|
+
*/
|
|
11996
|
+
renderLayout() {
|
|
11997
|
+
return this.renderLayoutDefault();
|
|
11998
|
+
}
|
|
11999
|
+
};
|
|
12000
|
+
|
|
12001
|
+
var buttonVersion$2 = '10.0.0';
|
|
12002
|
+
|
|
12003
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12004
|
+
// See LICENSE in the project root for license information.
|
|
12005
|
+
|
|
12006
|
+
|
|
12007
|
+
/**
|
|
12008
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
12009
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
12010
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
12011
|
+
*/
|
|
12012
|
+
|
|
12013
|
+
let AuroElement$6 = class AuroElement extends i$1 {
|
|
12014
|
+
|
|
12015
|
+
// function to define props used within the scope of this component
|
|
12016
|
+
static get properties() {
|
|
12017
|
+
return {
|
|
12018
|
+
hidden: { type: Boolean,
|
|
12019
|
+
reflect: true },
|
|
12020
|
+
hiddenVisually: { type: Boolean,
|
|
12021
|
+
reflect: true },
|
|
12022
|
+
hiddenAudible: { type: Boolean,
|
|
12023
|
+
reflect: true },
|
|
12024
|
+
};
|
|
12025
|
+
}
|
|
12026
|
+
|
|
12027
|
+
/**
|
|
12028
|
+
* @private Function that determines state of aria-hidden
|
|
12029
|
+
*/
|
|
12030
|
+
hideAudible(value) {
|
|
12031
|
+
if (value) {
|
|
12032
|
+
return 'true'
|
|
12033
|
+
}
|
|
12034
|
+
|
|
12035
|
+
return 'false'
|
|
12036
|
+
}
|
|
12037
|
+
};
|
|
12038
|
+
|
|
12039
|
+
var error$3 = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"error__desc\" class=\"ico_squareLarge\" data-deprecated=\"true\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"error__desc\">Error alert indicator.</desc><path d=\"m13.047 5.599 6.786 11.586A1.207 1.207 0 0 1 18.786 19H5.214a1.207 1.207 0 0 1-1.047-1.815l6.786-11.586a1.214 1.214 0 0 1 2.094 0m-1.165.87a.23.23 0 0 0-.085.085L5.419 17.442a.232.232 0 0 0 .203.35h12.756a.234.234 0 0 0 .203-.35L12.203 6.554a.236.236 0 0 0-.321-.084M12 15.5a.75.75 0 1 1 0 1.5.75.75 0 0 1 0-1.5m-.024-6.22c.325 0 .589.261.589.583v4.434a.586.586 0 0 1-.589.583.586.586 0 0 1-.588-.583V9.863c0-.322.264-.583.588-.583\"/></svg>"};
|
|
12040
|
+
|
|
12041
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
12042
|
+
|
|
12043
|
+
const _fetchMap$3 = new Map();
|
|
12044
|
+
|
|
12045
|
+
/**
|
|
12046
|
+
* A callback to parse Response body.
|
|
12047
|
+
*
|
|
12048
|
+
* @callback ResponseParser
|
|
12049
|
+
* @param {Fetch.Response} response
|
|
12050
|
+
* @returns {Promise}
|
|
12051
|
+
*/
|
|
12052
|
+
|
|
12053
|
+
/**
|
|
12054
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
12055
|
+
*
|
|
12056
|
+
* @param {String} uri
|
|
12057
|
+
* @param {Object} [options={}]
|
|
12058
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
12059
|
+
* @returns {Promise}
|
|
12060
|
+
*/
|
|
12061
|
+
const cacheFetch$3 = (uri, options = {}) => {
|
|
12062
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
12063
|
+
if (!_fetchMap$3.has(uri)) {
|
|
12064
|
+
_fetchMap$3.set(uri, fetch(uri).then(responseParser));
|
|
12065
|
+
}
|
|
12066
|
+
return _fetchMap$3.get(uri);
|
|
12067
|
+
};
|
|
12068
|
+
|
|
12069
|
+
var styleCss$1$2 = i$3`: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}`;
|
|
12070
|
+
|
|
12071
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12072
|
+
// See LICENSE in the project root for license information.
|
|
12073
|
+
|
|
12074
|
+
|
|
12075
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
12076
|
+
/**
|
|
12077
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
12078
|
+
*/
|
|
12079
|
+
|
|
12080
|
+
// build the component class
|
|
12081
|
+
let BaseIcon$3 = class BaseIcon extends AuroElement$6 {
|
|
12082
|
+
constructor() {
|
|
12083
|
+
super();
|
|
12084
|
+
this.onDark = false;
|
|
12085
|
+
}
|
|
12086
|
+
|
|
12087
|
+
// function to define props used within the scope of this component
|
|
12088
|
+
static get properties() {
|
|
12089
|
+
return {
|
|
12090
|
+
...super.properties,
|
|
12091
|
+
|
|
12092
|
+
/**
|
|
12093
|
+
* Set value for on-dark version of auro-icon.
|
|
12094
|
+
*/
|
|
12095
|
+
onDark: {
|
|
12096
|
+
type: Boolean,
|
|
12097
|
+
reflect: true
|
|
12098
|
+
},
|
|
12099
|
+
|
|
12100
|
+
/**
|
|
12101
|
+
* @private
|
|
12102
|
+
*/
|
|
12103
|
+
svg: {
|
|
12104
|
+
attribute: false,
|
|
12105
|
+
reflect: true
|
|
12106
|
+
}
|
|
12107
|
+
};
|
|
12108
|
+
}
|
|
12109
|
+
|
|
12110
|
+
static get styles() {
|
|
12111
|
+
return i$3`
|
|
12112
|
+
${styleCss$1$2}
|
|
12113
|
+
`;
|
|
12114
|
+
}
|
|
12115
|
+
|
|
12116
|
+
/**
|
|
12117
|
+
* Async function to fetch requested icon from npm CDN.
|
|
12118
|
+
* @private
|
|
12119
|
+
* @param {string} category - Icon category.
|
|
12120
|
+
* @param {string} name - Icon name.
|
|
12121
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
12122
|
+
*/
|
|
12123
|
+
async fetchIcon(category, name) {
|
|
12124
|
+
let iconHTML = '';
|
|
12125
|
+
|
|
12126
|
+
if (category === 'logos') {
|
|
12127
|
+
iconHTML = await cacheFetch$3(`${this.uri}/${category}/${name}.svg`);
|
|
12128
|
+
} else {
|
|
12129
|
+
iconHTML = await cacheFetch$3(`${this.uri}/icons/${category}/${name}.svg`);
|
|
12130
|
+
}
|
|
12131
|
+
|
|
12132
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
12133
|
+
|
|
12134
|
+
return dom.body.querySelector('svg');
|
|
12135
|
+
}
|
|
12136
|
+
|
|
12137
|
+
// lifecycle function
|
|
12138
|
+
async firstUpdated() {
|
|
12139
|
+
if (!this.customSvg) {
|
|
12140
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
12141
|
+
|
|
12142
|
+
if (svg) {
|
|
12143
|
+
this.svg = svg;
|
|
12144
|
+
} else if (!svg) {
|
|
12145
|
+
const penDOM = new DOMParser().parseFromString(error$3.svg, 'text/html');
|
|
12146
|
+
|
|
12147
|
+
this.svg = penDOM.body.firstChild;
|
|
12148
|
+
}
|
|
12149
|
+
}
|
|
12150
|
+
}
|
|
12151
|
+
};
|
|
12152
|
+
|
|
12153
|
+
var tokensCss$9 = i$3`: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)}`;
|
|
12154
|
+
|
|
12155
|
+
var colorCss$8 = i$3`: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)}`;
|
|
12156
|
+
|
|
12157
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12158
|
+
// See LICENSE in the project root for license information.
|
|
12159
|
+
|
|
12160
|
+
// ---------------------------------------------------------------------
|
|
12161
|
+
|
|
12162
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12163
|
+
|
|
12164
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
12165
|
+
|
|
12166
|
+
/* eslint-disable jsdoc/require-param */
|
|
12167
|
+
|
|
12168
|
+
/**
|
|
12169
|
+
* This will register a new custom element with the browser.
|
|
12170
|
+
* @param {String} name - The name of the custom element.
|
|
12171
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
12172
|
+
* @returns {void}
|
|
12173
|
+
*/
|
|
12174
|
+
registerComponent(name, componentClass) {
|
|
12175
|
+
if (!customElements.get(name)) {
|
|
12176
|
+
customElements.define(name, class extends componentClass {});
|
|
12177
|
+
}
|
|
12178
|
+
}
|
|
12179
|
+
|
|
12180
|
+
/**
|
|
12181
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
12182
|
+
* @returns {void}
|
|
12183
|
+
*/
|
|
12184
|
+
closestElement(
|
|
12185
|
+
selector, // selector like in .closest()
|
|
12186
|
+
base = this, // extra functionality to skip a parent
|
|
12187
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
12188
|
+
!el || el === document || el === window
|
|
12189
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
12190
|
+
: found
|
|
12191
|
+
? found // found a selector INside this element
|
|
12192
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
12193
|
+
) {
|
|
12194
|
+
return __Closest(base);
|
|
12195
|
+
}
|
|
12196
|
+
/* eslint-enable jsdoc/require-param */
|
|
12197
|
+
|
|
12198
|
+
/**
|
|
12199
|
+
* 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.
|
|
12200
|
+
* @param {Object} elem - The element to check.
|
|
12201
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
12202
|
+
* @returns {void}
|
|
12203
|
+
*/
|
|
12204
|
+
handleComponentTagRename(elem, tagName) {
|
|
12205
|
+
const tag = tagName.toLowerCase();
|
|
12206
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12207
|
+
|
|
12208
|
+
if (elemTag !== tag) {
|
|
12209
|
+
elem.setAttribute(tag, true);
|
|
12210
|
+
}
|
|
12211
|
+
}
|
|
12212
|
+
|
|
12213
|
+
/**
|
|
12214
|
+
* Validates if an element is a specific Auro component.
|
|
12215
|
+
* @param {Object} elem - The element to validate.
|
|
12216
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
12217
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
12218
|
+
*/
|
|
12219
|
+
elementMatch(elem, tagName) {
|
|
12220
|
+
const tag = tagName.toLowerCase();
|
|
12221
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12222
|
+
|
|
12223
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
12224
|
+
}
|
|
12225
|
+
};
|
|
12226
|
+
|
|
12227
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12228
|
+
// See LICENSE in the project root for license information.
|
|
12229
|
+
|
|
12230
|
+
|
|
12231
|
+
let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
12232
|
+
constructor() {
|
|
12233
|
+
super();
|
|
12234
|
+
|
|
12235
|
+
this.variant = undefined;
|
|
12236
|
+
this.privateDefaults();
|
|
12237
|
+
}
|
|
12238
|
+
|
|
12239
|
+
/**
|
|
11243
12240
|
* Internal Defaults.
|
|
11244
12241
|
* @private
|
|
11245
12242
|
* @returns {void}
|
|
@@ -11349,8 +12346,12 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
11349
12346
|
async firstUpdated() {
|
|
11350
12347
|
await super.firstUpdated();
|
|
11351
12348
|
|
|
11352
|
-
|
|
11353
|
-
|
|
12349
|
+
/**
|
|
12350
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
12351
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
12352
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
12353
|
+
*/
|
|
12354
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
11354
12355
|
const svgDesc = this.svg.querySelector('desc');
|
|
11355
12356
|
|
|
11356
12357
|
if (svgDesc) {
|
|
@@ -11394,7 +12395,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
11394
12395
|
}
|
|
11395
12396
|
};
|
|
11396
12397
|
|
|
11397
|
-
var iconVersion$3 = '8.0.
|
|
12398
|
+
var iconVersion$3 = '8.0.4';
|
|
11398
12399
|
|
|
11399
12400
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11400
12401
|
// See LICENSE in the project root for license information.
|
|
@@ -11403,7 +12404,7 @@ var iconVersion$3 = '8.0.3';
|
|
|
11403
12404
|
|
|
11404
12405
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11405
12406
|
|
|
11406
|
-
let AuroLibraryRuntimeUtils$
|
|
12407
|
+
let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
11407
12408
|
|
|
11408
12409
|
/* eslint-disable jsdoc/require-param */
|
|
11409
12410
|
|
|
@@ -11495,7 +12496,7 @@ class AuroHeader extends i$1 {
|
|
|
11495
12496
|
/**
|
|
11496
12497
|
* @private
|
|
11497
12498
|
*/
|
|
11498
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
12499
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
11499
12500
|
}
|
|
11500
12501
|
|
|
11501
12502
|
// function to define props used within the scope of this component
|
|
@@ -11525,7 +12526,7 @@ class AuroHeader extends i$1 {
|
|
|
11525
12526
|
*
|
|
11526
12527
|
*/
|
|
11527
12528
|
static register(name = "auro-header") {
|
|
11528
|
-
AuroLibraryRuntimeUtils$
|
|
12529
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroHeader);
|
|
11529
12530
|
}
|
|
11530
12531
|
|
|
11531
12532
|
firstUpdated() {
|
|
@@ -11621,17 +12622,30 @@ class AuroBibtemplate extends i$1 {
|
|
|
11621
12622
|
|
|
11622
12623
|
this.large = false;
|
|
11623
12624
|
|
|
11624
|
-
AuroLibraryRuntimeUtils$
|
|
12625
|
+
AuroLibraryRuntimeUtils$3$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
12626
|
+
|
|
12627
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
11625
12628
|
|
|
11626
|
-
|
|
12629
|
+
/**
|
|
12630
|
+
* @private
|
|
12631
|
+
*/
|
|
11627
12632
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$3, AuroIcon$3);
|
|
12633
|
+
|
|
12634
|
+
/**
|
|
12635
|
+
* @private
|
|
12636
|
+
*/
|
|
11628
12637
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
12638
|
+
|
|
12639
|
+
/**
|
|
12640
|
+
* @private
|
|
12641
|
+
*/
|
|
12642
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion$2, AuroButton$2);
|
|
11629
12643
|
}
|
|
11630
12644
|
|
|
11631
12645
|
static get styles() {
|
|
11632
12646
|
return [
|
|
11633
|
-
colorCss$
|
|
11634
|
-
styleCss$
|
|
12647
|
+
colorCss$3$2,
|
|
12648
|
+
styleCss$4$1,
|
|
11635
12649
|
tokenCss
|
|
11636
12650
|
];
|
|
11637
12651
|
}
|
|
@@ -11660,7 +12674,7 @@ class AuroBibtemplate extends i$1 {
|
|
|
11660
12674
|
*
|
|
11661
12675
|
*/
|
|
11662
12676
|
static register(name = "auro-bibtemplate") {
|
|
11663
|
-
AuroLibraryRuntimeUtils$
|
|
12677
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
11664
12678
|
}
|
|
11665
12679
|
|
|
11666
12680
|
/**
|
|
@@ -11692,173 +12706,531 @@ class AuroBibtemplate extends i$1 {
|
|
|
11692
12706
|
composed: true }));
|
|
11693
12707
|
}
|
|
11694
12708
|
|
|
11695
|
-
/**
|
|
11696
|
-
* Exposes CSS parts for styling from parent components.
|
|
11697
|
-
* @returns {void}
|
|
11698
|
-
*/
|
|
11699
|
-
exposeCssParts() {
|
|
11700
|
-
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
11701
|
-
}
|
|
12709
|
+
/**
|
|
12710
|
+
* Exposes CSS parts for styling from parent components.
|
|
12711
|
+
* @returns {void}
|
|
12712
|
+
*/
|
|
12713
|
+
exposeCssParts() {
|
|
12714
|
+
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
12715
|
+
}
|
|
12716
|
+
|
|
12717
|
+
firstUpdated(changedProperties) {
|
|
12718
|
+
super.firstUpdated(changedProperties);
|
|
12719
|
+
|
|
12720
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
12721
|
+
bubbles: true,
|
|
12722
|
+
composed: true,
|
|
12723
|
+
detail: {
|
|
12724
|
+
element: this
|
|
12725
|
+
}
|
|
12726
|
+
}));
|
|
12727
|
+
}
|
|
12728
|
+
|
|
12729
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
12730
|
+
render() {
|
|
12731
|
+
return u$3`
|
|
12732
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
12733
|
+
${this.isFullscreen ? u$3`
|
|
12734
|
+
<div id="headerContainer">
|
|
12735
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
12736
|
+
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
12737
|
+
</${this.buttonTag}>
|
|
12738
|
+
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
12739
|
+
<slot name="header"></slot>
|
|
12740
|
+
</${this.headerTag}>
|
|
12741
|
+
<span id="subheader">
|
|
12742
|
+
<slot name="subheader"></slot>
|
|
12743
|
+
</span>
|
|
12744
|
+
</div>` : null}
|
|
12745
|
+
|
|
12746
|
+
<div id="bodyContainer">
|
|
12747
|
+
<slot></slot>
|
|
12748
|
+
</div>
|
|
12749
|
+
|
|
12750
|
+
${this.isFullscreen ? u$3`
|
|
12751
|
+
<div id="footerContainer">
|
|
12752
|
+
<slot name="footer"></slot>
|
|
12753
|
+
</div>` : null}
|
|
12754
|
+
</div>
|
|
12755
|
+
`;
|
|
12756
|
+
}
|
|
12757
|
+
}
|
|
12758
|
+
|
|
12759
|
+
var bibTemplateVersion = '1.0.0';
|
|
12760
|
+
|
|
12761
|
+
/**
|
|
12762
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
12763
|
+
*/
|
|
12764
|
+
const _observers$1 = new WeakMap();
|
|
12765
|
+
|
|
12766
|
+
/**
|
|
12767
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
12768
|
+
* Structure: {
|
|
12769
|
+
* host: {
|
|
12770
|
+
* matchers: Set<Function>,
|
|
12771
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
12772
|
+
* }
|
|
12773
|
+
* }
|
|
12774
|
+
*/
|
|
12775
|
+
const _transportConfig$1 = new WeakMap();
|
|
12776
|
+
|
|
12777
|
+
/**
|
|
12778
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
12779
|
+
*
|
|
12780
|
+
* @param {Object} params - The parameters for the function.
|
|
12781
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
12782
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
12783
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
12784
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
12785
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
12786
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
12787
|
+
*/
|
|
12788
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
12789
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
12790
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
12791
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
12792
|
+
}
|
|
12793
|
+
|
|
12794
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
12795
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
12796
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
12797
|
+
}
|
|
12798
|
+
|
|
12799
|
+
// Guard Clause: Ensure match is a function
|
|
12800
|
+
if (typeof match !== 'function') {
|
|
12801
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
12802
|
+
}
|
|
12803
|
+
|
|
12804
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
12805
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
12806
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
12807
|
+
}
|
|
12808
|
+
|
|
12809
|
+
// Register this transport and get cleanup function
|
|
12810
|
+
return _registerTransport$1({
|
|
12811
|
+
host,
|
|
12812
|
+
target,
|
|
12813
|
+
matcher: match,
|
|
12814
|
+
removeOriginal
|
|
12815
|
+
});
|
|
12816
|
+
};
|
|
12817
|
+
|
|
12818
|
+
/**
|
|
12819
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
12820
|
+
*
|
|
12821
|
+
* @param {Object} params - The parameters object.
|
|
12822
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
12823
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
12824
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
12825
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
12826
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
12827
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
12828
|
+
* @private
|
|
12829
|
+
*/
|
|
12830
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
12831
|
+
// Initialize config for this host if it doesn't exist
|
|
12832
|
+
if (!_transportConfig$1.has(host)) {
|
|
12833
|
+
_transportConfig$1.set(host, {
|
|
12834
|
+
matchers: new Set(),
|
|
12835
|
+
targets: new Map()
|
|
12836
|
+
});
|
|
12837
|
+
}
|
|
12838
|
+
|
|
12839
|
+
const config = _transportConfig$1.get(host);
|
|
12840
|
+
|
|
12841
|
+
// Add the matcher to the set of matchers for this host
|
|
12842
|
+
config.matchers.add(matcher);
|
|
12843
|
+
|
|
12844
|
+
// Initialize target entry if it doesn't exist
|
|
12845
|
+
if (!config.targets.has(target)) {
|
|
12846
|
+
config.targets.set(target, new Map());
|
|
12847
|
+
}
|
|
12848
|
+
|
|
12849
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
12850
|
+
config.targets.get(target).set(matcher, {
|
|
12851
|
+
removeOriginal,
|
|
12852
|
+
currentAttributes: new Map()
|
|
12853
|
+
});
|
|
12854
|
+
|
|
12855
|
+
// Perform initial attribute transport
|
|
12856
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
12857
|
+
|
|
12858
|
+
// Attach observer
|
|
12859
|
+
_attachObserver$1(host);
|
|
12860
|
+
|
|
12861
|
+
// Return cleanup function and utility functions
|
|
12862
|
+
return {
|
|
12863
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
12864
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
12865
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
12866
|
+
}
|
|
12867
|
+
};
|
|
12868
|
+
|
|
12869
|
+
/**
|
|
12870
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
12871
|
+
*
|
|
12872
|
+
* @param {HTMLElement} host - The host element
|
|
12873
|
+
* @param {HTMLElement} target - The target element
|
|
12874
|
+
* @param {Function} matcher - The matcher function
|
|
12875
|
+
* @private
|
|
12876
|
+
*/
|
|
12877
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
12878
|
+
const config = _transportConfig$1.get(host);
|
|
12879
|
+
if (!config) return;
|
|
12880
|
+
|
|
12881
|
+
// Remove this matcher from this target
|
|
12882
|
+
const targetMatchers = config.targets.get(target);
|
|
12883
|
+
if (targetMatchers) {
|
|
12884
|
+
targetMatchers.delete(matcher);
|
|
12885
|
+
|
|
12886
|
+
// If this target has no more matchers, remove it
|
|
12887
|
+
if (targetMatchers.size === 0) {
|
|
12888
|
+
config.targets.delete(target);
|
|
12889
|
+
}
|
|
12890
|
+
}
|
|
12891
|
+
|
|
12892
|
+
// Check if this matcher is still used by any target
|
|
12893
|
+
let matcherStillUsed = false;
|
|
12894
|
+
for (const matcherMap of config.targets.values()) {
|
|
12895
|
+
if (matcherMap.has(matcher)) {
|
|
12896
|
+
matcherStillUsed = true;
|
|
12897
|
+
break;
|
|
12898
|
+
}
|
|
12899
|
+
}
|
|
12900
|
+
|
|
12901
|
+
// If not used anymore, remove from matchers set
|
|
12902
|
+
if (!matcherStillUsed) {
|
|
12903
|
+
config.matchers.delete(matcher);
|
|
12904
|
+
}
|
|
12905
|
+
|
|
12906
|
+
// If no more targets or matchers, detach observer
|
|
12907
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
12908
|
+
_detachObserver$1(host);
|
|
12909
|
+
}
|
|
12910
|
+
};
|
|
12911
|
+
|
|
12912
|
+
/**
|
|
12913
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
12914
|
+
*
|
|
12915
|
+
* @param {Object} params - The parameters object.
|
|
12916
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
12917
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
12918
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
12919
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
12920
|
+
* @returns {void}
|
|
12921
|
+
* @private
|
|
12922
|
+
*/
|
|
12923
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
12924
|
+
// Get a list of all matching attributes on the host element and their values
|
|
12925
|
+
const matchingAttributes = host.getAttributeNames()
|
|
12926
|
+
.filter(attr => matcher(attr))
|
|
12927
|
+
.reduce((acc, attr) => {
|
|
12928
|
+
acc[attr] = host.getAttribute(attr);
|
|
12929
|
+
return acc;
|
|
12930
|
+
}, {});
|
|
12931
|
+
|
|
12932
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
12933
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
12934
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
12935
|
+
target.setAttribute(key, value);
|
|
12936
|
+
if (removeOriginal) {
|
|
12937
|
+
host.removeAttribute(key);
|
|
12938
|
+
}
|
|
12939
|
+
});
|
|
12940
|
+
};
|
|
12941
|
+
|
|
12942
|
+
/**
|
|
12943
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
12944
|
+
*
|
|
12945
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
12946
|
+
* @returns {MutationObserver} The observer instance.
|
|
12947
|
+
* @private
|
|
12948
|
+
*/
|
|
12949
|
+
const _attachObserver$1 = (host) => {
|
|
12950
|
+
// If an observer for this host already exists, return it
|
|
12951
|
+
if (_observers$1.has(host)) {
|
|
12952
|
+
return _observers$1.get(host);
|
|
12953
|
+
}
|
|
12954
|
+
|
|
12955
|
+
// Create a new MutationObserver
|
|
12956
|
+
const observer = new MutationObserver((mutations) => {
|
|
12957
|
+
const config = _transportConfig$1.get(host);
|
|
12958
|
+
if (!config) return;
|
|
12959
|
+
|
|
12960
|
+
// For each mutation affecting attributes
|
|
12961
|
+
mutations
|
|
12962
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
12963
|
+
.forEach(mutation => {
|
|
12964
|
+
const attributeName = mutation.attributeName;
|
|
12965
|
+
|
|
12966
|
+
// Find matchers that care about this attribute
|
|
12967
|
+
for (const matcher of config.matchers) {
|
|
12968
|
+
if (matcher(attributeName)) {
|
|
12969
|
+
// For each target that uses this matcher
|
|
12970
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
12971
|
+
if (matcherConfigs.has(matcher)) {
|
|
12972
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
12973
|
+
_transportAttributes$1({
|
|
12974
|
+
host,
|
|
12975
|
+
target,
|
|
12976
|
+
matcher,
|
|
12977
|
+
removeOriginal
|
|
12978
|
+
});
|
|
12979
|
+
}
|
|
12980
|
+
}
|
|
12981
|
+
}
|
|
12982
|
+
}
|
|
12983
|
+
});
|
|
12984
|
+
});
|
|
11702
12985
|
|
|
11703
|
-
|
|
11704
|
-
|
|
12986
|
+
// Start observing attribute changes
|
|
12987
|
+
observer.observe(host, { attributes: true });
|
|
12988
|
+
|
|
12989
|
+
// Store the observer
|
|
12990
|
+
_observers$1.set(host, observer);
|
|
12991
|
+
|
|
12992
|
+
return observer;
|
|
12993
|
+
};
|
|
11705
12994
|
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
12995
|
+
/**
|
|
12996
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
12997
|
+
*
|
|
12998
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
12999
|
+
* @private
|
|
13000
|
+
*/
|
|
13001
|
+
const _detachObserver$1 = (host) => {
|
|
13002
|
+
if (_observers$1.has(host)) {
|
|
13003
|
+
const observer = _observers$1.get(host);
|
|
13004
|
+
observer.disconnect();
|
|
13005
|
+
_observers$1.delete(host);
|
|
11713
13006
|
}
|
|
13007
|
+
|
|
13008
|
+
// Clean up the transport config as well
|
|
13009
|
+
if (_transportConfig$1.has(host)) {
|
|
13010
|
+
_transportConfig$1.delete(host);
|
|
13011
|
+
}
|
|
13012
|
+
};
|
|
11714
13013
|
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
<div id="bodyContainer">
|
|
11733
|
-
<slot></slot>
|
|
11734
|
-
</div>
|
|
13014
|
+
/**
|
|
13015
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
13016
|
+
* @param {HTMLElement} host - The host element
|
|
13017
|
+
* @param {HTMLElement} target - The target element
|
|
13018
|
+
* @param {Function} matcher - The matcher function
|
|
13019
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
13020
|
+
* @private
|
|
13021
|
+
*/
|
|
13022
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
13023
|
+
const config = _transportConfig$1.get(host);
|
|
13024
|
+
if (!config) return undefined;
|
|
13025
|
+
|
|
13026
|
+
const targetMatchers = config.targets.get(target);
|
|
13027
|
+
if (!targetMatchers) return undefined;
|
|
13028
|
+
|
|
13029
|
+
return targetMatchers.get(matcher);
|
|
13030
|
+
};
|
|
11735
13031
|
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
13032
|
+
/**
|
|
13033
|
+
* Sets an observed attribute value
|
|
13034
|
+
* @param {HTMLElement} host - The host element
|
|
13035
|
+
* @param {HTMLElement} target - The target element
|
|
13036
|
+
* @param {Function} matcher - The matcher function
|
|
13037
|
+
* @param {string} key - The attribute name
|
|
13038
|
+
* @param {string} value - The attribute value
|
|
13039
|
+
* @private
|
|
13040
|
+
*/
|
|
13041
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
13042
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
13043
|
+
if (matcherConfig) {
|
|
13044
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11742
13045
|
}
|
|
11743
|
-
}
|
|
13046
|
+
};
|
|
11744
13047
|
|
|
11745
|
-
|
|
13048
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
13049
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
13050
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
13051
|
+
return undefined;
|
|
13052
|
+
};
|
|
11746
13053
|
|
|
11747
|
-
|
|
11748
|
-
|
|
13054
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
13055
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
13056
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
13057
|
+
return [];
|
|
13058
|
+
};
|
|
11749
13059
|
|
|
13060
|
+
const _matchers$1 = {
|
|
13061
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
13062
|
+
'role': attr => attr.match(/^role$/)
|
|
13063
|
+
};
|
|
11750
13064
|
|
|
11751
|
-
|
|
13065
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
13066
|
+
return transportAttributes$1({
|
|
13067
|
+
host,
|
|
13068
|
+
target,
|
|
13069
|
+
match: attr => {
|
|
13070
|
+
for (const key in _matchers$1) {
|
|
13071
|
+
if (_matchers$1[key](attr)) return true;
|
|
13072
|
+
}
|
|
13073
|
+
return false;
|
|
13074
|
+
},
|
|
13075
|
+
removeOriginal
|
|
13076
|
+
});
|
|
13077
|
+
};
|
|
13078
|
+
|
|
13079
|
+
let AuroElement$5 = class AuroElement extends i$1 {
|
|
11752
13080
|
|
|
11753
13081
|
/**
|
|
11754
|
-
*
|
|
13082
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
13083
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
13084
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
13085
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11755
13086
|
* @private
|
|
11756
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11757
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11758
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11759
13087
|
*/
|
|
11760
|
-
|
|
11761
|
-
let result = baseName;
|
|
13088
|
+
attributeWatcher;
|
|
11762
13089
|
|
|
11763
|
-
|
|
11764
|
-
|
|
13090
|
+
static get properties() {
|
|
13091
|
+
return {
|
|
11765
13092
|
|
|
11766
|
-
|
|
11767
|
-
|
|
13093
|
+
/**
|
|
13094
|
+
* Defines the layout of an element.
|
|
13095
|
+
* @default {'default'}
|
|
13096
|
+
*/
|
|
13097
|
+
layout: {
|
|
13098
|
+
type: String,
|
|
13099
|
+
attribute: "layout",
|
|
13100
|
+
reflect: true
|
|
13101
|
+
},
|
|
13102
|
+
|
|
13103
|
+
/**
|
|
13104
|
+
* Defines the shape of an element.
|
|
13105
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
13106
|
+
* @default {'default'}
|
|
13107
|
+
*/
|
|
13108
|
+
shape: {
|
|
13109
|
+
type: String,
|
|
13110
|
+
attribute: "shape",
|
|
13111
|
+
reflect: true
|
|
13112
|
+
},
|
|
11768
13113
|
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
13114
|
+
/**
|
|
13115
|
+
* Defines the size of an element.
|
|
13116
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
13117
|
+
* @default {'md'}
|
|
13118
|
+
*/
|
|
13119
|
+
size: {
|
|
13120
|
+
type: String,
|
|
13121
|
+
attribute: "size",
|
|
13122
|
+
reflect: true
|
|
13123
|
+
},
|
|
11778
13124
|
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
13125
|
+
/**
|
|
13126
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
13127
|
+
* @default {false}
|
|
13128
|
+
*/
|
|
13129
|
+
onDark: {
|
|
13130
|
+
type: Boolean,
|
|
13131
|
+
attribute: "ondark",
|
|
13132
|
+
reflect: true
|
|
13133
|
+
},
|
|
11782
13134
|
|
|
11783
|
-
|
|
13135
|
+
/**
|
|
13136
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
13137
|
+
* This is used to apply layout and shape classes dynamically.
|
|
13138
|
+
* @type {HTMLElement|null}
|
|
13139
|
+
* @default {null}
|
|
13140
|
+
* @private
|
|
13141
|
+
*/
|
|
13142
|
+
wrapper: {
|
|
13143
|
+
type: HTMLElement,
|
|
13144
|
+
attribute: false,
|
|
13145
|
+
reflect: false
|
|
13146
|
+
}
|
|
13147
|
+
};
|
|
11784
13148
|
}
|
|
11785
|
-
};
|
|
11786
13149
|
|
|
11787
|
-
|
|
11788
|
-
// See LICENSE in the project root for license information.
|
|
13150
|
+
|
|
11789
13151
|
|
|
11790
|
-
|
|
13152
|
+
resetShapeClasses() {
|
|
13153
|
+
if (this.shape && this.size) {
|
|
11791
13154
|
|
|
11792
|
-
|
|
13155
|
+
if (this.wrapper) {
|
|
13156
|
+
this.wrapper.classList.forEach((className) => {
|
|
13157
|
+
if (className.startsWith('shape-')) {
|
|
13158
|
+
this.wrapper.classList.remove(className);
|
|
13159
|
+
}
|
|
13160
|
+
});
|
|
11793
13161
|
|
|
11794
|
-
|
|
13162
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
13163
|
+
}
|
|
13164
|
+
}
|
|
13165
|
+
}
|
|
11795
13166
|
|
|
11796
|
-
|
|
13167
|
+
resetLayoutClasses() {
|
|
13168
|
+
if (this.layout) {
|
|
13169
|
+
if (this.wrapper) {
|
|
13170
|
+
this.wrapper.classList.forEach((className) => {
|
|
13171
|
+
if (className.startsWith('layout-')) {
|
|
13172
|
+
this.wrapper.classList.remove(className);
|
|
13173
|
+
}
|
|
13174
|
+
});
|
|
11797
13175
|
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
* @param {String} name - The name of the custom element.
|
|
11801
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
11802
|
-
* @returns {void}
|
|
11803
|
-
*/
|
|
11804
|
-
registerComponent(name, componentClass) {
|
|
11805
|
-
if (!customElements.get(name)) {
|
|
11806
|
-
customElements.define(name, class extends componentClass {});
|
|
13176
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
13177
|
+
}
|
|
11807
13178
|
}
|
|
11808
13179
|
}
|
|
11809
13180
|
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
*/
|
|
11814
|
-
closestElement(
|
|
11815
|
-
selector, // selector like in .closest()
|
|
11816
|
-
base = this, // extra functionality to skip a parent
|
|
11817
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11818
|
-
!el || el === document || el === window
|
|
11819
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
11820
|
-
: found
|
|
11821
|
-
? found // found a selector INside this element
|
|
11822
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11823
|
-
) {
|
|
11824
|
-
return __Closest(base);
|
|
13181
|
+
updateComponentArchitecture() {
|
|
13182
|
+
this.resetLayoutClasses();
|
|
13183
|
+
this.resetShapeClasses();
|
|
11825
13184
|
}
|
|
11826
|
-
/* eslint-enable jsdoc/require-param */
|
|
11827
13185
|
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
*/
|
|
11834
|
-
handleComponentTagRename(elem, tagName) {
|
|
11835
|
-
const tag = tagName.toLowerCase();
|
|
11836
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
13186
|
+
updated(changedProperties) {
|
|
13187
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
13188
|
+
this.updateComponentArchitecture();
|
|
13189
|
+
}
|
|
13190
|
+
}
|
|
11837
13191
|
|
|
11838
|
-
|
|
11839
|
-
|
|
13192
|
+
firstUpdated() {
|
|
13193
|
+
super.firstUpdated();
|
|
13194
|
+
|
|
13195
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
13196
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
13197
|
+
|
|
13198
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
13199
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
13200
|
+
}
|
|
13201
|
+
|
|
13202
|
+
disconnectedCallback() {
|
|
13203
|
+
super.disconnectedCallback();
|
|
13204
|
+
|
|
13205
|
+
// Cleanup the ARIA observer if it exists
|
|
13206
|
+
if (this.attributeWatcher) {
|
|
13207
|
+
this.attributeWatcher.cleanup();
|
|
13208
|
+
this.attributeWatcher = null;
|
|
11840
13209
|
}
|
|
11841
13210
|
}
|
|
11842
13211
|
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
13212
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
13213
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
13214
|
+
render() {
|
|
13215
|
+
try {
|
|
13216
|
+
return this.renderLayout();
|
|
13217
|
+
} catch (error) {
|
|
13218
|
+
// failed to get the defined layout
|
|
13219
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
11852
13220
|
|
|
11853
|
-
|
|
13221
|
+
// fallback to the default layout
|
|
13222
|
+
return this.getLayout('default');
|
|
13223
|
+
}
|
|
11854
13224
|
}
|
|
11855
13225
|
};
|
|
11856
13226
|
|
|
11857
|
-
var styleCss$8 = i$3`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block
|
|
13227
|
+
var styleCss$8 = i$3`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
11858
13228
|
|
|
11859
|
-
var colorCss$7 = i$3`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}`;
|
|
13229
|
+
var colorCss$7 = i$3`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
11860
13230
|
|
|
11861
|
-
var tokensCss$8 = i$3`:host{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}`;
|
|
13231
|
+
var tokensCss$8 = i$3`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
13232
|
+
|
|
13233
|
+
var shapeSize$1 = i$3`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
11862
13234
|
|
|
11863
13235
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11864
13236
|
// See LICENSE in the project root for license information.
|
|
@@ -11867,7 +13239,7 @@ var tokensCss$8 = i$3`:host{--ds-auro-button-border-color:var(--ds-advanced-colo
|
|
|
11867
13239
|
|
|
11868
13240
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11869
13241
|
|
|
11870
|
-
let AuroLibraryRuntimeUtils$
|
|
13242
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
11871
13243
|
|
|
11872
13244
|
/* eslint-disable jsdoc/require-param */
|
|
11873
13245
|
|
|
@@ -11962,7 +13334,7 @@ let AuroLoader$1 = class AuroLoader extends i$1 {
|
|
|
11962
13334
|
/**
|
|
11963
13335
|
* @private
|
|
11964
13336
|
*/
|
|
11965
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
13337
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
11966
13338
|
|
|
11967
13339
|
this.orbit = false;
|
|
11968
13340
|
this.ringworm = false;
|
|
@@ -12025,7 +13397,7 @@ let AuroLoader$1 = class AuroLoader extends i$1 {
|
|
|
12025
13397
|
*
|
|
12026
13398
|
*/
|
|
12027
13399
|
static register(name = "auro-loader") {
|
|
12028
|
-
AuroLibraryRuntimeUtils$
|
|
13400
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroLoader);
|
|
12029
13401
|
}
|
|
12030
13402
|
|
|
12031
13403
|
firstUpdated() {
|
|
@@ -12077,7 +13449,7 @@ let AuroLoader$1 = class AuroLoader extends i$1 {
|
|
|
12077
13449
|
|
|
12078
13450
|
var loaderVersion$1 = '5.0.0';
|
|
12079
13451
|
|
|
12080
|
-
/* eslint-disable max-lines */
|
|
13452
|
+
/* eslint-disable max-lines, curly */
|
|
12081
13453
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12082
13454
|
// See LICENSE in the project root for license information.
|
|
12083
13455
|
|
|
@@ -12093,7 +13465,18 @@ var loaderVersion$1 = '5.0.0';
|
|
|
12093
13465
|
|
|
12094
13466
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
12095
13467
|
|
|
12096
|
-
|
|
13468
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
13469
|
+
|
|
13470
|
+
/**
|
|
13471
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
13472
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
13473
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
13474
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
13475
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
13476
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
13477
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
13478
|
+
*/
|
|
13479
|
+
let AuroButton$1 = class AuroButton extends AuroElement$5 {
|
|
12097
13480
|
|
|
12098
13481
|
/**
|
|
12099
13482
|
* Enables form association for this element.
|
|
@@ -12108,13 +13491,10 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12108
13491
|
super();
|
|
12109
13492
|
this.autofocus = false;
|
|
12110
13493
|
this.disabled = false;
|
|
12111
|
-
this.iconOnly = false;
|
|
12112
13494
|
this.loading = false;
|
|
13495
|
+
this.size = "md";
|
|
13496
|
+
this.shape = "rounded";
|
|
12113
13497
|
this.onDark = false;
|
|
12114
|
-
this.secondary = false;
|
|
12115
|
-
this.tertiary = false;
|
|
12116
|
-
this.rounded = false;
|
|
12117
|
-
this.slim = false;
|
|
12118
13498
|
this.fluid = false;
|
|
12119
13499
|
this.loadingText = this.loadingText || 'Loading...';
|
|
12120
13500
|
|
|
@@ -12143,59 +13523,46 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12143
13523
|
return [
|
|
12144
13524
|
tokensCss$8,
|
|
12145
13525
|
styleCss$8,
|
|
12146
|
-
colorCss$7
|
|
13526
|
+
colorCss$7,
|
|
13527
|
+
shapeSize$1
|
|
12147
13528
|
];
|
|
12148
13529
|
}
|
|
12149
13530
|
|
|
12150
13531
|
static get properties() {
|
|
12151
|
-
return {
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
12155
|
-
*/
|
|
12156
|
-
autofocus: {
|
|
12157
|
-
type: Boolean,
|
|
12158
|
-
reflect: true
|
|
12159
|
-
},
|
|
12160
|
-
|
|
12161
|
-
/**
|
|
12162
|
-
* If set to true, button will become disabled and not allow for interactions.
|
|
12163
|
-
*/
|
|
12164
|
-
disabled: {
|
|
12165
|
-
type: Boolean,
|
|
12166
|
-
reflect: true
|
|
12167
|
-
},
|
|
13532
|
+
return {
|
|
13533
|
+
|
|
13534
|
+
...super.properties,
|
|
12168
13535
|
|
|
12169
13536
|
/**
|
|
12170
|
-
*
|
|
12171
|
-
* @
|
|
13537
|
+
* Override layout since it isn't used in this component.
|
|
13538
|
+
* @private
|
|
12172
13539
|
*/
|
|
12173
|
-
|
|
13540
|
+
layout: {
|
|
12174
13541
|
type: Boolean,
|
|
12175
|
-
|
|
13542
|
+
attribute: false,
|
|
13543
|
+
reflect: false
|
|
12176
13544
|
},
|
|
12177
13545
|
|
|
12178
13546
|
/**
|
|
12179
|
-
*
|
|
12180
|
-
* @deprecated
|
|
13547
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
12181
13548
|
*/
|
|
12182
|
-
|
|
13549
|
+
autofocus: {
|
|
12183
13550
|
type: Boolean,
|
|
12184
13551
|
reflect: true
|
|
12185
13552
|
},
|
|
12186
13553
|
|
|
12187
13554
|
/**
|
|
12188
|
-
*
|
|
13555
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
12189
13556
|
*/
|
|
12190
|
-
|
|
13557
|
+
disabled: {
|
|
12191
13558
|
type: Boolean,
|
|
12192
13559
|
reflect: true
|
|
12193
13560
|
},
|
|
12194
13561
|
|
|
12195
13562
|
/**
|
|
12196
|
-
*
|
|
13563
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
12197
13564
|
*/
|
|
12198
|
-
|
|
13565
|
+
fluid: {
|
|
12199
13566
|
type: Boolean,
|
|
12200
13567
|
reflect: true
|
|
12201
13568
|
},
|
|
@@ -12203,7 +13570,7 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12203
13570
|
/**
|
|
12204
13571
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
12205
13572
|
*/
|
|
12206
|
-
loading:
|
|
13573
|
+
loading: {
|
|
12207
13574
|
type: Boolean,
|
|
12208
13575
|
reflect: true
|
|
12209
13576
|
},
|
|
@@ -12211,34 +13578,10 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12211
13578
|
/**
|
|
12212
13579
|
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
12213
13580
|
*/
|
|
12214
|
-
loadingText:
|
|
13581
|
+
loadingText: {
|
|
12215
13582
|
type: String
|
|
12216
13583
|
},
|
|
12217
13584
|
|
|
12218
|
-
/**
|
|
12219
|
-
* Set value for on-dark version of auro-button.
|
|
12220
|
-
*/
|
|
12221
|
-
onDark: {
|
|
12222
|
-
type: Boolean,
|
|
12223
|
-
reflect: true
|
|
12224
|
-
},
|
|
12225
|
-
|
|
12226
|
-
/**
|
|
12227
|
-
* If set to true, the button will have a rounded shape.
|
|
12228
|
-
*/
|
|
12229
|
-
rounded: {
|
|
12230
|
-
type: Boolean,
|
|
12231
|
-
reflect: true
|
|
12232
|
-
},
|
|
12233
|
-
|
|
12234
|
-
/**
|
|
12235
|
-
* Set value for slim version of auro-button.
|
|
12236
|
-
*/
|
|
12237
|
-
slim: {
|
|
12238
|
-
type: Boolean,
|
|
12239
|
-
reflect: true
|
|
12240
|
-
},
|
|
12241
|
-
|
|
12242
13585
|
/**
|
|
12243
13586
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
12244
13587
|
*/
|
|
@@ -12247,48 +13590,10 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12247
13590
|
reflect: true
|
|
12248
13591
|
},
|
|
12249
13592
|
|
|
12250
|
-
/**
|
|
12251
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
12252
|
-
*/
|
|
12253
|
-
ariahidden: {
|
|
12254
|
-
type: String,
|
|
12255
|
-
reflect: true,
|
|
12256
|
-
},
|
|
12257
|
-
|
|
12258
|
-
/**
|
|
12259
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
12260
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
12261
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
12262
|
-
*/
|
|
12263
|
-
arialabel: {
|
|
12264
|
-
type: String,
|
|
12265
|
-
reflect: true
|
|
12266
|
-
},
|
|
12267
|
-
|
|
12268
|
-
/**
|
|
12269
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
12270
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
12271
|
-
* List multiple element IDs in a space delimited fashion.
|
|
12272
|
-
*/
|
|
12273
|
-
arialabelledby: {
|
|
12274
|
-
type: String,
|
|
12275
|
-
reflect: true
|
|
12276
|
-
},
|
|
12277
|
-
|
|
12278
|
-
/**
|
|
12279
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
12280
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
12281
|
-
* This is an optional attribute for buttons.
|
|
12282
|
-
*/
|
|
12283
|
-
ariaexpanded: {
|
|
12284
|
-
type: Boolean,
|
|
12285
|
-
reflect: true
|
|
12286
|
-
},
|
|
12287
|
-
|
|
12288
13593
|
/**
|
|
12289
13594
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
12290
13595
|
*/
|
|
12291
|
-
title:
|
|
13596
|
+
title: {
|
|
12292
13597
|
type: String,
|
|
12293
13598
|
reflect: true
|
|
12294
13599
|
},
|
|
@@ -12296,7 +13601,7 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12296
13601
|
/**
|
|
12297
13602
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
12298
13603
|
*/
|
|
12299
|
-
type:
|
|
13604
|
+
type: {
|
|
12300
13605
|
type: String,
|
|
12301
13606
|
reflect: true
|
|
12302
13607
|
},
|
|
@@ -12304,19 +13609,19 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12304
13609
|
/**
|
|
12305
13610
|
* Defines the value associated with the button which is submitted with the form data.
|
|
12306
13611
|
*/
|
|
12307
|
-
value:
|
|
13612
|
+
value: {
|
|
12308
13613
|
type: String,
|
|
12309
13614
|
reflect: true
|
|
12310
13615
|
},
|
|
12311
13616
|
|
|
12312
13617
|
/**
|
|
12313
|
-
* Sets button variant option.
|
|
13618
|
+
* Sets button variant option.
|
|
13619
|
+
* @default primary
|
|
12314
13620
|
*/
|
|
12315
|
-
variant:
|
|
13621
|
+
variant: {
|
|
12316
13622
|
type: String,
|
|
12317
13623
|
reflect: true
|
|
12318
13624
|
},
|
|
12319
|
-
ready: { type: Boolean },
|
|
12320
13625
|
};
|
|
12321
13626
|
}
|
|
12322
13627
|
|
|
@@ -12329,7 +13634,7 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12329
13634
|
*
|
|
12330
13635
|
*/
|
|
12331
13636
|
static register(name = "auro-button") {
|
|
12332
|
-
AuroLibraryRuntimeUtils$
|
|
13637
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent(name, AuroButton);
|
|
12333
13638
|
}
|
|
12334
13639
|
|
|
12335
13640
|
/**
|
|
@@ -12341,17 +13646,6 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12341
13646
|
this.renderRoot.querySelector('button').focus();
|
|
12342
13647
|
}
|
|
12343
13648
|
|
|
12344
|
-
updated() {
|
|
12345
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
12346
|
-
if (this.secondary) {
|
|
12347
|
-
this.setAttribute('variant', 'secondary');
|
|
12348
|
-
}
|
|
12349
|
-
|
|
12350
|
-
if (this.tertiary) {
|
|
12351
|
-
this.setAttribute('variant', 'tertiary');
|
|
12352
|
-
}
|
|
12353
|
-
}
|
|
12354
|
-
|
|
12355
13649
|
/**
|
|
12356
13650
|
* Submits the form that this button is associated with.
|
|
12357
13651
|
* @private
|
|
@@ -12372,25 +13666,56 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12372
13666
|
return this.internals ? this.internals.form : null;
|
|
12373
13667
|
}
|
|
12374
13668
|
|
|
12375
|
-
|
|
13669
|
+
/**
|
|
13670
|
+
* @private
|
|
13671
|
+
* @returns {Boolean}
|
|
13672
|
+
*/
|
|
13673
|
+
get hideText() {
|
|
13674
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
13675
|
+
}
|
|
13676
|
+
|
|
13677
|
+
/**
|
|
13678
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
13679
|
+
* @returns {string | undefined}
|
|
13680
|
+
* @private
|
|
13681
|
+
*/
|
|
13682
|
+
get currentAriaLabel() {
|
|
13683
|
+
if (!this.attributeWatcher) return undefined;
|
|
13684
|
+
|
|
13685
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
13686
|
+
return ariaLabel || undefined;
|
|
13687
|
+
}
|
|
13688
|
+
|
|
13689
|
+
/**
|
|
13690
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
13691
|
+
* @returns {string | undefined}
|
|
13692
|
+
* @private
|
|
13693
|
+
*/
|
|
13694
|
+
get currentAriaLabelledBy() {
|
|
13695
|
+
if (!this.attributeWatcher) return undefined;
|
|
13696
|
+
|
|
13697
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
13698
|
+
return ariaLabelledBy || undefined;
|
|
13699
|
+
}
|
|
13700
|
+
|
|
13701
|
+
/**
|
|
13702
|
+
* Renders the default layout for the button.
|
|
13703
|
+
* @returns {TemplateResult}
|
|
13704
|
+
* @private
|
|
13705
|
+
*/
|
|
13706
|
+
renderLayoutDefault() {
|
|
12376
13707
|
const classes = {
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
'auro-button--slim': this.slim,
|
|
12382
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
12383
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
12384
|
-
'loading': this.loading
|
|
13708
|
+
"util_insetLg--squish": true,
|
|
13709
|
+
"auro-button": true,
|
|
13710
|
+
wrapper: true,
|
|
13711
|
+
loading: this.loading,
|
|
12385
13712
|
};
|
|
12386
13713
|
|
|
12387
13714
|
return u$3`
|
|
12388
13715
|
<button
|
|
12389
13716
|
part="button"
|
|
12390
|
-
aria-
|
|
12391
|
-
aria-
|
|
12392
|
-
aria-labelledby="${o(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
12393
|
-
aria-expanded="${o(this.ariaexpanded)}"
|
|
13717
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
13718
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
12394
13719
|
tabIndex="${o(this.tIndex)}"
|
|
12395
13720
|
?autofocus="${this.autofocus}"
|
|
12396
13721
|
class="${e(classes)}"
|
|
@@ -12407,7 +13732,7 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12407
13732
|
|
|
12408
13733
|
<span class="contentWrapper">
|
|
12409
13734
|
<span class="textSlot" part="text">
|
|
12410
|
-
${this.
|
|
13735
|
+
${this.hideText ? undefined : u$3`<slot></slot>`}
|
|
12411
13736
|
</span>
|
|
12412
13737
|
|
|
12413
13738
|
<span part="icon">
|
|
@@ -12417,6 +13742,15 @@ let AuroButton$1 = class AuroButton extends i$1 {
|
|
|
12417
13742
|
</button>
|
|
12418
13743
|
`;
|
|
12419
13744
|
}
|
|
13745
|
+
|
|
13746
|
+
/**
|
|
13747
|
+
* Renders the layout of the button
|
|
13748
|
+
* @returns {TemplateResult}
|
|
13749
|
+
* @private
|
|
13750
|
+
*/
|
|
13751
|
+
renderLayout() {
|
|
13752
|
+
return this.renderLayoutDefault();
|
|
13753
|
+
}
|
|
12420
13754
|
};
|
|
12421
13755
|
|
|
12422
13756
|
var buttonVersion$1 = '9.0.0';
|
|
@@ -12492,7 +13826,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
12492
13826
|
*/
|
|
12493
13827
|
this.slots = {};
|
|
12494
13828
|
|
|
12495
|
-
const versioning = new AuroDependencyVersioning$
|
|
13829
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
12496
13830
|
|
|
12497
13831
|
/**
|
|
12498
13832
|
* @private
|
|
@@ -15018,7 +16352,7 @@ class AuroFloatingUI {
|
|
|
15018
16352
|
// See LICENSE in the project root for license information.
|
|
15019
16353
|
|
|
15020
16354
|
|
|
15021
|
-
let AuroDependencyVersioning$
|
|
16355
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
15022
16356
|
|
|
15023
16357
|
/**
|
|
15024
16358
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -15400,8 +16734,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
15400
16734
|
async firstUpdated() {
|
|
15401
16735
|
await super.firstUpdated();
|
|
15402
16736
|
|
|
15403
|
-
|
|
15404
|
-
|
|
16737
|
+
/**
|
|
16738
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
16739
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
16740
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
16741
|
+
*/
|
|
16742
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
15405
16743
|
const svgDesc = this.svg.querySelector('desc');
|
|
15406
16744
|
|
|
15407
16745
|
if (svgDesc) {
|
|
@@ -15671,7 +17009,7 @@ var tokensCss$6 = i$3`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
15671
17009
|
|
|
15672
17010
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
15673
17011
|
|
|
15674
|
-
let AuroLibraryRuntimeUtils$
|
|
17012
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
15675
17013
|
|
|
15676
17014
|
/* eslint-disable jsdoc/require-param */
|
|
15677
17015
|
|
|
@@ -15752,7 +17090,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$1 {
|
|
|
15752
17090
|
this.onDark = false;
|
|
15753
17091
|
this.hasTextContent = false;
|
|
15754
17092
|
|
|
15755
|
-
AuroLibraryRuntimeUtils$
|
|
17093
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
15756
17094
|
}
|
|
15757
17095
|
|
|
15758
17096
|
static get styles() {
|
|
@@ -15808,7 +17146,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$1 {
|
|
|
15808
17146
|
*
|
|
15809
17147
|
*/
|
|
15810
17148
|
static register(name = "auro-helptext") {
|
|
15811
|
-
AuroLibraryRuntimeUtils$
|
|
17149
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
15812
17150
|
}
|
|
15813
17151
|
|
|
15814
17152
|
updated() {
|
|
@@ -15866,7 +17204,7 @@ let AuroHelpText$1 = class AuroHelpText extends i$1 {
|
|
|
15866
17204
|
|
|
15867
17205
|
var helpTextVersion$1 = '1.0.0';
|
|
15868
17206
|
|
|
15869
|
-
let AuroElement$
|
|
17207
|
+
let AuroElement$4 = class AuroElement extends i$1 {
|
|
15870
17208
|
static get properties() {
|
|
15871
17209
|
return {
|
|
15872
17210
|
|
|
@@ -15978,7 +17316,7 @@ let AuroElement$3 = class AuroElement extends i$1 {
|
|
|
15978
17316
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
15979
17317
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
15980
17318
|
*/
|
|
15981
|
-
class AuroDropdown extends AuroElement$
|
|
17319
|
+
class AuroDropdown extends AuroElement$4 {
|
|
15982
17320
|
constructor() {
|
|
15983
17321
|
super();
|
|
15984
17322
|
|
|
@@ -16067,7 +17405,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
16067
17405
|
/**
|
|
16068
17406
|
* Generate unique names for dependency components.
|
|
16069
17407
|
*/
|
|
16070
|
-
const versioning = new AuroDependencyVersioning$
|
|
17408
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
16071
17409
|
|
|
16072
17410
|
/**
|
|
16073
17411
|
* @private
|
|
@@ -16982,6 +18320,8 @@ const stringsES$1 = {
|
|
|
16982
18320
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
16983
18321
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
16984
18322
|
'clearInput': 'Borrar campo de entrada',
|
|
18323
|
+
'showPassword': 'Mostrar contraseña',
|
|
18324
|
+
'hidePassword': 'Ocultar contraseña'
|
|
16985
18325
|
};
|
|
16986
18326
|
|
|
16987
18327
|
const stringsEN$1 = {
|
|
@@ -17006,6 +18346,8 @@ const stringsEN$1 = {
|
|
|
17006
18346
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
17007
18347
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
17008
18348
|
'clearInput': 'Clear input field',
|
|
18349
|
+
'showPassword': 'Show password',
|
|
18350
|
+
'hidePassword': 'Hide password'
|
|
17009
18351
|
};
|
|
17010
18352
|
|
|
17011
18353
|
/**
|
|
@@ -21300,7 +22642,7 @@ const {
|
|
|
21300
22642
|
|
|
21301
22643
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
21302
22644
|
|
|
21303
|
-
let AuroLibraryRuntimeUtils$
|
|
22645
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
21304
22646
|
|
|
21305
22647
|
/* eslint-disable jsdoc/require-param */
|
|
21306
22648
|
|
|
@@ -21370,7 +22712,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
21370
22712
|
class AuroFormValidation {
|
|
21371
22713
|
|
|
21372
22714
|
constructor() {
|
|
21373
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
22715
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
21374
22716
|
}
|
|
21375
22717
|
|
|
21376
22718
|
/**
|
|
@@ -21731,7 +23073,7 @@ class AuroFormValidation {
|
|
|
21731
23073
|
}
|
|
21732
23074
|
}
|
|
21733
23075
|
|
|
21734
|
-
let AuroElement$
|
|
23076
|
+
let AuroElement$2 = class AuroElement extends i$1 {
|
|
21735
23077
|
static get properties() {
|
|
21736
23078
|
return {
|
|
21737
23079
|
|
|
@@ -21851,7 +23193,7 @@ let AuroElement$1$1 = class AuroElement extends i$1 {
|
|
|
21851
23193
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
21852
23194
|
*/
|
|
21853
23195
|
|
|
21854
|
-
class BaseInput extends AuroElement$
|
|
23196
|
+
class BaseInput extends AuroElement$2 {
|
|
21855
23197
|
|
|
21856
23198
|
constructor() {
|
|
21857
23199
|
super();
|
|
@@ -22914,7 +24256,7 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
22914
24256
|
// See LICENSE in the project root for license information.
|
|
22915
24257
|
|
|
22916
24258
|
|
|
22917
|
-
|
|
24259
|
+
class AuroDependencyVersioning {
|
|
22918
24260
|
|
|
22919
24261
|
/**
|
|
22920
24262
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -22948,7 +24290,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
22948
24290
|
|
|
22949
24291
|
return tag;
|
|
22950
24292
|
}
|
|
22951
|
-
}
|
|
24293
|
+
}
|
|
22952
24294
|
|
|
22953
24295
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
22954
24296
|
// See LICENSE in the project root for license information.
|
|
@@ -22960,7 +24302,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
22960
24302
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
22961
24303
|
*/
|
|
22962
24304
|
|
|
22963
|
-
let AuroElement$
|
|
24305
|
+
let AuroElement$1$1 = class AuroElement extends i$1 {
|
|
22964
24306
|
|
|
22965
24307
|
// function to define props used within the scope of this component
|
|
22966
24308
|
static get properties() {
|
|
@@ -23028,7 +24370,7 @@ var styleCss$3 = i$3`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
23028
24370
|
*/
|
|
23029
24371
|
|
|
23030
24372
|
// build the component class
|
|
23031
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
24373
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
23032
24374
|
constructor() {
|
|
23033
24375
|
super();
|
|
23034
24376
|
this.onDark = false;
|
|
@@ -23111,7 +24453,7 @@ var colorCss$3 = i$3`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
23111
24453
|
|
|
23112
24454
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
23113
24455
|
|
|
23114
|
-
let AuroLibraryRuntimeUtils$
|
|
24456
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
23115
24457
|
|
|
23116
24458
|
/* eslint-disable jsdoc/require-param */
|
|
23117
24459
|
|
|
@@ -23193,7 +24535,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23193
24535
|
*/
|
|
23194
24536
|
privateDefaults() {
|
|
23195
24537
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
23196
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
24538
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
23197
24539
|
}
|
|
23198
24540
|
|
|
23199
24541
|
// function to define props used within the scope of this component
|
|
@@ -23275,7 +24617,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23275
24617
|
*
|
|
23276
24618
|
*/
|
|
23277
24619
|
static register(name = "auro-icon") {
|
|
23278
|
-
AuroLibraryRuntimeUtils$
|
|
24620
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
23279
24621
|
}
|
|
23280
24622
|
|
|
23281
24623
|
connectedCallback() {
|
|
@@ -23296,8 +24638,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23296
24638
|
async firstUpdated() {
|
|
23297
24639
|
await super.firstUpdated();
|
|
23298
24640
|
|
|
23299
|
-
|
|
23300
|
-
|
|
24641
|
+
/**
|
|
24642
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
24643
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
24644
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
24645
|
+
*/
|
|
24646
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
23301
24647
|
const svgDesc = this.svg.querySelector('desc');
|
|
23302
24648
|
|
|
23303
24649
|
if (svgDesc) {
|
|
@@ -23343,121 +24689,479 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23343
24689
|
|
|
23344
24690
|
var iconVersion$1 = '8.0.1';
|
|
23345
24691
|
|
|
23346
|
-
|
|
23347
|
-
|
|
24692
|
+
/**
|
|
24693
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
24694
|
+
*/
|
|
24695
|
+
const _observers = new WeakMap();
|
|
24696
|
+
|
|
24697
|
+
/**
|
|
24698
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
24699
|
+
* Structure: {
|
|
24700
|
+
* host: {
|
|
24701
|
+
* matchers: Set<Function>,
|
|
24702
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
24703
|
+
* }
|
|
24704
|
+
* }
|
|
24705
|
+
*/
|
|
24706
|
+
const _transportConfig = new WeakMap();
|
|
24707
|
+
|
|
24708
|
+
/**
|
|
24709
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
24710
|
+
*
|
|
24711
|
+
* @param {Object} params - The parameters for the function.
|
|
24712
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
24713
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
24714
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
24715
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
24716
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
24717
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
24718
|
+
*/
|
|
24719
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
24720
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
24721
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
24722
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
24723
|
+
}
|
|
24724
|
+
|
|
24725
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
24726
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
24727
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
24728
|
+
}
|
|
24729
|
+
|
|
24730
|
+
// Guard Clause: Ensure match is a function
|
|
24731
|
+
if (typeof match !== 'function') {
|
|
24732
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
24733
|
+
}
|
|
24734
|
+
|
|
24735
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
24736
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
24737
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
24738
|
+
}
|
|
24739
|
+
|
|
24740
|
+
// Register this transport and get cleanup function
|
|
24741
|
+
return _registerTransport({
|
|
24742
|
+
host,
|
|
24743
|
+
target,
|
|
24744
|
+
matcher: match,
|
|
24745
|
+
removeOriginal
|
|
24746
|
+
});
|
|
24747
|
+
};
|
|
24748
|
+
|
|
24749
|
+
/**
|
|
24750
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
24751
|
+
*
|
|
24752
|
+
* @param {Object} params - The parameters object.
|
|
24753
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
24754
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
24755
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
24756
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
24757
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
24758
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
24759
|
+
* @private
|
|
24760
|
+
*/
|
|
24761
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
24762
|
+
// Initialize config for this host if it doesn't exist
|
|
24763
|
+
if (!_transportConfig.has(host)) {
|
|
24764
|
+
_transportConfig.set(host, {
|
|
24765
|
+
matchers: new Set(),
|
|
24766
|
+
targets: new Map()
|
|
24767
|
+
});
|
|
24768
|
+
}
|
|
24769
|
+
|
|
24770
|
+
const config = _transportConfig.get(host);
|
|
24771
|
+
|
|
24772
|
+
// Add the matcher to the set of matchers for this host
|
|
24773
|
+
config.matchers.add(matcher);
|
|
24774
|
+
|
|
24775
|
+
// Initialize target entry if it doesn't exist
|
|
24776
|
+
if (!config.targets.has(target)) {
|
|
24777
|
+
config.targets.set(target, new Map());
|
|
24778
|
+
}
|
|
24779
|
+
|
|
24780
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
24781
|
+
config.targets.get(target).set(matcher, {
|
|
24782
|
+
removeOriginal,
|
|
24783
|
+
currentAttributes: new Map()
|
|
24784
|
+
});
|
|
24785
|
+
|
|
24786
|
+
// Perform initial attribute transport
|
|
24787
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
24788
|
+
|
|
24789
|
+
// Attach observer
|
|
24790
|
+
_attachObserver(host);
|
|
24791
|
+
|
|
24792
|
+
// Return cleanup function and utility functions
|
|
24793
|
+
return {
|
|
24794
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
24795
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
24796
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
24797
|
+
}
|
|
24798
|
+
};
|
|
24799
|
+
|
|
24800
|
+
/**
|
|
24801
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
24802
|
+
*
|
|
24803
|
+
* @param {HTMLElement} host - The host element
|
|
24804
|
+
* @param {HTMLElement} target - The target element
|
|
24805
|
+
* @param {Function} matcher - The matcher function
|
|
24806
|
+
* @private
|
|
24807
|
+
*/
|
|
24808
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
24809
|
+
const config = _transportConfig.get(host);
|
|
24810
|
+
if (!config) return;
|
|
24811
|
+
|
|
24812
|
+
// Remove this matcher from this target
|
|
24813
|
+
const targetMatchers = config.targets.get(target);
|
|
24814
|
+
if (targetMatchers) {
|
|
24815
|
+
targetMatchers.delete(matcher);
|
|
24816
|
+
|
|
24817
|
+
// If this target has no more matchers, remove it
|
|
24818
|
+
if (targetMatchers.size === 0) {
|
|
24819
|
+
config.targets.delete(target);
|
|
24820
|
+
}
|
|
24821
|
+
}
|
|
24822
|
+
|
|
24823
|
+
// Check if this matcher is still used by any target
|
|
24824
|
+
let matcherStillUsed = false;
|
|
24825
|
+
for (const matcherMap of config.targets.values()) {
|
|
24826
|
+
if (matcherMap.has(matcher)) {
|
|
24827
|
+
matcherStillUsed = true;
|
|
24828
|
+
break;
|
|
24829
|
+
}
|
|
24830
|
+
}
|
|
24831
|
+
|
|
24832
|
+
// If not used anymore, remove from matchers set
|
|
24833
|
+
if (!matcherStillUsed) {
|
|
24834
|
+
config.matchers.delete(matcher);
|
|
24835
|
+
}
|
|
24836
|
+
|
|
24837
|
+
// If no more targets or matchers, detach observer
|
|
24838
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
24839
|
+
_detachObserver(host);
|
|
24840
|
+
}
|
|
24841
|
+
};
|
|
24842
|
+
|
|
24843
|
+
/**
|
|
24844
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
24845
|
+
*
|
|
24846
|
+
* @param {Object} params - The parameters object.
|
|
24847
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
24848
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
24849
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
24850
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
24851
|
+
* @returns {void}
|
|
24852
|
+
* @private
|
|
24853
|
+
*/
|
|
24854
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
24855
|
+
// Get a list of all matching attributes on the host element and their values
|
|
24856
|
+
const matchingAttributes = host.getAttributeNames()
|
|
24857
|
+
.filter(attr => matcher(attr))
|
|
24858
|
+
.reduce((acc, attr) => {
|
|
24859
|
+
acc[attr] = host.getAttribute(attr);
|
|
24860
|
+
return acc;
|
|
24861
|
+
}, {});
|
|
24862
|
+
|
|
24863
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
24864
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
24865
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
24866
|
+
target.setAttribute(key, value);
|
|
24867
|
+
if (removeOriginal) {
|
|
24868
|
+
host.removeAttribute(key);
|
|
24869
|
+
}
|
|
24870
|
+
});
|
|
24871
|
+
};
|
|
24872
|
+
|
|
24873
|
+
/**
|
|
24874
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
24875
|
+
*
|
|
24876
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
24877
|
+
* @returns {MutationObserver} The observer instance.
|
|
24878
|
+
* @private
|
|
24879
|
+
*/
|
|
24880
|
+
const _attachObserver = (host) => {
|
|
24881
|
+
// If an observer for this host already exists, return it
|
|
24882
|
+
if (_observers.has(host)) {
|
|
24883
|
+
return _observers.get(host);
|
|
24884
|
+
}
|
|
24885
|
+
|
|
24886
|
+
// Create a new MutationObserver
|
|
24887
|
+
const observer = new MutationObserver((mutations) => {
|
|
24888
|
+
const config = _transportConfig.get(host);
|
|
24889
|
+
if (!config) return;
|
|
24890
|
+
|
|
24891
|
+
// For each mutation affecting attributes
|
|
24892
|
+
mutations
|
|
24893
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
24894
|
+
.forEach(mutation => {
|
|
24895
|
+
const attributeName = mutation.attributeName;
|
|
24896
|
+
|
|
24897
|
+
// Find matchers that care about this attribute
|
|
24898
|
+
for (const matcher of config.matchers) {
|
|
24899
|
+
if (matcher(attributeName)) {
|
|
24900
|
+
// For each target that uses this matcher
|
|
24901
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
24902
|
+
if (matcherConfigs.has(matcher)) {
|
|
24903
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
24904
|
+
_transportAttributes({
|
|
24905
|
+
host,
|
|
24906
|
+
target,
|
|
24907
|
+
matcher,
|
|
24908
|
+
removeOriginal
|
|
24909
|
+
});
|
|
24910
|
+
}
|
|
24911
|
+
}
|
|
24912
|
+
}
|
|
24913
|
+
}
|
|
24914
|
+
});
|
|
24915
|
+
});
|
|
24916
|
+
|
|
24917
|
+
// Start observing attribute changes
|
|
24918
|
+
observer.observe(host, { attributes: true });
|
|
24919
|
+
|
|
24920
|
+
// Store the observer
|
|
24921
|
+
_observers.set(host, observer);
|
|
24922
|
+
|
|
24923
|
+
return observer;
|
|
24924
|
+
};
|
|
24925
|
+
|
|
24926
|
+
/**
|
|
24927
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
24928
|
+
*
|
|
24929
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
24930
|
+
* @private
|
|
24931
|
+
*/
|
|
24932
|
+
const _detachObserver = (host) => {
|
|
24933
|
+
if (_observers.has(host)) {
|
|
24934
|
+
const observer = _observers.get(host);
|
|
24935
|
+
observer.disconnect();
|
|
24936
|
+
_observers.delete(host);
|
|
24937
|
+
}
|
|
24938
|
+
|
|
24939
|
+
// Clean up the transport config as well
|
|
24940
|
+
if (_transportConfig.has(host)) {
|
|
24941
|
+
_transportConfig.delete(host);
|
|
24942
|
+
}
|
|
24943
|
+
};
|
|
24944
|
+
|
|
24945
|
+
/**
|
|
24946
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
24947
|
+
* @param {HTMLElement} host - The host element
|
|
24948
|
+
* @param {HTMLElement} target - The target element
|
|
24949
|
+
* @param {Function} matcher - The matcher function
|
|
24950
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
24951
|
+
* @private
|
|
24952
|
+
*/
|
|
24953
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
24954
|
+
const config = _transportConfig.get(host);
|
|
24955
|
+
if (!config) return undefined;
|
|
24956
|
+
|
|
24957
|
+
const targetMatchers = config.targets.get(target);
|
|
24958
|
+
if (!targetMatchers) return undefined;
|
|
24959
|
+
|
|
24960
|
+
return targetMatchers.get(matcher);
|
|
24961
|
+
};
|
|
24962
|
+
|
|
24963
|
+
/**
|
|
24964
|
+
* Sets an observed attribute value
|
|
24965
|
+
* @param {HTMLElement} host - The host element
|
|
24966
|
+
* @param {HTMLElement} target - The target element
|
|
24967
|
+
* @param {Function} matcher - The matcher function
|
|
24968
|
+
* @param {string} key - The attribute name
|
|
24969
|
+
* @param {string} value - The attribute value
|
|
24970
|
+
* @private
|
|
24971
|
+
*/
|
|
24972
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
24973
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
24974
|
+
if (matcherConfig) {
|
|
24975
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
24976
|
+
}
|
|
24977
|
+
};
|
|
24978
|
+
|
|
24979
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
24980
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
24981
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
24982
|
+
return undefined;
|
|
24983
|
+
};
|
|
24984
|
+
|
|
24985
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
24986
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
24987
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
24988
|
+
return [];
|
|
24989
|
+
};
|
|
24990
|
+
|
|
24991
|
+
const _matchers = {
|
|
24992
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
24993
|
+
'role': attr => attr.match(/^role$/)
|
|
24994
|
+
};
|
|
24995
|
+
|
|
24996
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
24997
|
+
return transportAttributes({
|
|
24998
|
+
host,
|
|
24999
|
+
target,
|
|
25000
|
+
match: attr => {
|
|
25001
|
+
for (const key in _matchers) {
|
|
25002
|
+
if (_matchers[key](attr)) return true;
|
|
25003
|
+
}
|
|
25004
|
+
return false;
|
|
25005
|
+
},
|
|
25006
|
+
removeOriginal
|
|
25007
|
+
});
|
|
25008
|
+
};
|
|
25009
|
+
|
|
25010
|
+
let AuroElement$3 = class AuroElement extends i$1 {
|
|
25011
|
+
|
|
25012
|
+
/**
|
|
25013
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
25014
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
25015
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
25016
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
25017
|
+
* @private
|
|
25018
|
+
*/
|
|
25019
|
+
attributeWatcher;
|
|
25020
|
+
|
|
25021
|
+
static get properties() {
|
|
25022
|
+
return {
|
|
25023
|
+
|
|
25024
|
+
/**
|
|
25025
|
+
* Defines the layout of an element.
|
|
25026
|
+
* @default {'default'}
|
|
25027
|
+
*/
|
|
25028
|
+
layout: {
|
|
25029
|
+
type: String,
|
|
25030
|
+
attribute: "layout",
|
|
25031
|
+
reflect: true
|
|
25032
|
+
},
|
|
25033
|
+
|
|
25034
|
+
/**
|
|
25035
|
+
* Defines the shape of an element.
|
|
25036
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
25037
|
+
* @default {'default'}
|
|
25038
|
+
*/
|
|
25039
|
+
shape: {
|
|
25040
|
+
type: String,
|
|
25041
|
+
attribute: "shape",
|
|
25042
|
+
reflect: true
|
|
25043
|
+
},
|
|
25044
|
+
|
|
25045
|
+
/**
|
|
25046
|
+
* Defines the size of an element.
|
|
25047
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
25048
|
+
* @default {'md'}
|
|
25049
|
+
*/
|
|
25050
|
+
size: {
|
|
25051
|
+
type: String,
|
|
25052
|
+
attribute: "size",
|
|
25053
|
+
reflect: true
|
|
25054
|
+
},
|
|
25055
|
+
|
|
25056
|
+
/**
|
|
25057
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
25058
|
+
* @default {false}
|
|
25059
|
+
*/
|
|
25060
|
+
onDark: {
|
|
25061
|
+
type: Boolean,
|
|
25062
|
+
attribute: "ondark",
|
|
25063
|
+
reflect: true
|
|
25064
|
+
},
|
|
23348
25065
|
|
|
25066
|
+
/**
|
|
25067
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
25068
|
+
* This is used to apply layout and shape classes dynamically.
|
|
25069
|
+
* @type {HTMLElement|null}
|
|
25070
|
+
* @default {null}
|
|
25071
|
+
* @private
|
|
25072
|
+
*/
|
|
25073
|
+
wrapper: {
|
|
25074
|
+
type: HTMLElement,
|
|
25075
|
+
attribute: false,
|
|
25076
|
+
reflect: false
|
|
25077
|
+
}
|
|
25078
|
+
};
|
|
25079
|
+
}
|
|
23349
25080
|
|
|
23350
|
-
|
|
25081
|
+
|
|
23351
25082
|
|
|
23352
|
-
|
|
23353
|
-
|
|
23354
|
-
* @private
|
|
23355
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
23356
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
23357
|
-
* @returns {string} - Unique string to be used for naming.
|
|
23358
|
-
*/
|
|
23359
|
-
generateElementName(baseName, version) {
|
|
23360
|
-
let result = baseName;
|
|
25083
|
+
resetShapeClasses() {
|
|
25084
|
+
if (this.shape && this.size) {
|
|
23361
25085
|
|
|
23362
|
-
|
|
23363
|
-
|
|
25086
|
+
if (this.wrapper) {
|
|
25087
|
+
this.wrapper.classList.forEach((className) => {
|
|
25088
|
+
if (className.startsWith('shape-')) {
|
|
25089
|
+
this.wrapper.classList.remove(className);
|
|
25090
|
+
}
|
|
25091
|
+
});
|
|
23364
25092
|
|
|
23365
|
-
|
|
25093
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
25094
|
+
}
|
|
25095
|
+
}
|
|
23366
25096
|
}
|
|
23367
25097
|
|
|
23368
|
-
|
|
23369
|
-
|
|
23370
|
-
|
|
23371
|
-
|
|
23372
|
-
|
|
23373
|
-
|
|
23374
|
-
|
|
23375
|
-
|
|
23376
|
-
const tag = i$4`${s$3(elementName)}`;
|
|
25098
|
+
resetLayoutClasses() {
|
|
25099
|
+
if (this.layout) {
|
|
25100
|
+
if (this.wrapper) {
|
|
25101
|
+
this.wrapper.classList.forEach((className) => {
|
|
25102
|
+
if (className.startsWith('layout-')) {
|
|
25103
|
+
this.wrapper.classList.remove(className);
|
|
25104
|
+
}
|
|
25105
|
+
});
|
|
23377
25106
|
|
|
23378
|
-
|
|
23379
|
-
|
|
25107
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
25108
|
+
}
|
|
23380
25109
|
}
|
|
23381
|
-
|
|
23382
|
-
return tag;
|
|
23383
25110
|
}
|
|
23384
|
-
}
|
|
23385
|
-
|
|
23386
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
23387
|
-
// See LICENSE in the project root for license information.
|
|
23388
|
-
|
|
23389
|
-
// ---------------------------------------------------------------------
|
|
23390
|
-
|
|
23391
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
23392
|
-
|
|
23393
|
-
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
23394
25111
|
|
|
23395
|
-
|
|
25112
|
+
updateComponentArchitecture() {
|
|
25113
|
+
this.resetLayoutClasses();
|
|
25114
|
+
this.resetShapeClasses();
|
|
25115
|
+
}
|
|
23396
25116
|
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
23401
|
-
* @returns {void}
|
|
23402
|
-
*/
|
|
23403
|
-
registerComponent(name, componentClass) {
|
|
23404
|
-
if (!customElements.get(name)) {
|
|
23405
|
-
customElements.define(name, class extends componentClass {});
|
|
25117
|
+
updated(changedProperties) {
|
|
25118
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
25119
|
+
this.updateComponentArchitecture();
|
|
23406
25120
|
}
|
|
23407
25121
|
}
|
|
23408
25122
|
|
|
23409
|
-
|
|
23410
|
-
|
|
23411
|
-
|
|
23412
|
-
|
|
23413
|
-
|
|
23414
|
-
|
|
23415
|
-
|
|
23416
|
-
|
|
23417
|
-
!el || el === document || el === window
|
|
23418
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
23419
|
-
: found
|
|
23420
|
-
? found // found a selector INside this element
|
|
23421
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
23422
|
-
) {
|
|
23423
|
-
return __Closest(base);
|
|
25123
|
+
firstUpdated() {
|
|
25124
|
+
super.firstUpdated();
|
|
25125
|
+
|
|
25126
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
25127
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
25128
|
+
|
|
25129
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
25130
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
23424
25131
|
}
|
|
23425
|
-
/* eslint-enable jsdoc/require-param */
|
|
23426
25132
|
|
|
23427
|
-
|
|
23428
|
-
|
|
23429
|
-
* @param {Object} elem - The element to check.
|
|
23430
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
23431
|
-
* @returns {void}
|
|
23432
|
-
*/
|
|
23433
|
-
handleComponentTagRename(elem, tagName) {
|
|
23434
|
-
const tag = tagName.toLowerCase();
|
|
23435
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
25133
|
+
disconnectedCallback() {
|
|
25134
|
+
super.disconnectedCallback();
|
|
23436
25135
|
|
|
23437
|
-
|
|
23438
|
-
|
|
25136
|
+
// Cleanup the ARIA observer if it exists
|
|
25137
|
+
if (this.attributeWatcher) {
|
|
25138
|
+
this.attributeWatcher.cleanup();
|
|
25139
|
+
this.attributeWatcher = null;
|
|
23439
25140
|
}
|
|
23440
25141
|
}
|
|
23441
25142
|
|
|
23442
|
-
|
|
23443
|
-
|
|
23444
|
-
|
|
23445
|
-
|
|
23446
|
-
|
|
23447
|
-
|
|
23448
|
-
|
|
23449
|
-
|
|
23450
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
25143
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
25144
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
25145
|
+
render() {
|
|
25146
|
+
try {
|
|
25147
|
+
return this.renderLayout();
|
|
25148
|
+
} catch (error) {
|
|
25149
|
+
// failed to get the defined layout
|
|
25150
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
23451
25151
|
|
|
23452
|
-
|
|
25152
|
+
// fallback to the default layout
|
|
25153
|
+
return this.getLayout('default');
|
|
25154
|
+
}
|
|
23453
25155
|
}
|
|
23454
25156
|
};
|
|
23455
25157
|
|
|
23456
|
-
var styleCss$2 = i$3`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block
|
|
25158
|
+
var styleCss$2 = i$3`:focus:not(:focus-visible){outline:3px solid transparent}.util_insetNone{padding:0}.util_insetXxxs{padding:.125rem}.util_insetXxxs--stretch{padding:.25rem .125rem}.util_insetXxxs--squish{padding:0 .125rem}.util_insetXxs{padding:.25rem}.util_insetXxs--stretch{padding:.375rem .25rem}.util_insetXxs--squish{padding:.125rem .25rem}.util_insetXs{padding:.5rem}.util_insetXs--stretch{padding:.75rem .5rem}.util_insetXs--squish{padding:.25rem .5rem}.util_insetSm{padding:.75rem}.util_insetSm--stretch{padding:1.125rem .75rem}.util_insetSm--squish{padding:.375rem .75rem}.util_insetMd{padding:1rem}.util_insetMd--stretch{padding:1.5rem 1rem}.util_insetMd--squish{padding:.5rem 1rem}.util_insetLg{padding:1.5rem}.util_insetLg--stretch{padding:2.25rem 1.5rem}.util_insetLg--squish{padding:.75rem 1.5rem}.util_insetXl{padding:2rem}.util_insetXl--stretch{padding:3rem 2rem}.util_insetXl--squish{padding:1rem 2rem}.util_insetXxl{padding:3rem}.util_insetXxl--stretch{padding:4.5rem 3rem}.util_insetXxl--squish{padding:1.5rem 3rem}.util_insetXxxl{padding:4rem}.util_insetXxxl--stretch{padding:6rem 4rem}.util_insetXxxl--squish{padding:2rem 4rem}:host([fluid]) .auro-button,:host([fluid=true]) .auro-button{min-width:auto;width:100%}:host([variant=flat]){display:inline-block}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{position:relative;padding:0 var(--ds-size-300, 1.5rem);cursor:pointer;border-width:1px;border-style:solid;border-radius:var(--ds-border-radius, 0.375rem);overflow:hidden;text-overflow:ellipsis;user-select:none;white-space:nowrap;min-height:var(--ds-size-600, 3rem);max-height:var(--ds-size-600, 3rem);display:inline-flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--ds-size-100, 0.5rem);margin:0;-webkit-touch-callout:none;-webkit-user-select:none;transition:padding 300ms ease-out}.auro-button:active{transform:scale(0.95)}.auro-button:focus-visible,.auro-button:focus{outline:none;outline-style:solid;outline-width:var(--ds-size-50, 0.25rem);outline-offset:calc(var(--ds-size-50, 0.25rem)*-1)}.auro-button:focus-visible:not([variant=secondary]):not([variant=tertiary]),.auro-button:focus:not([variant=secondary]):not([variant=tertiary]){outline-width:calc(var(--ds-size-50, 0.25rem) - 1px)}.auro-button.loading{cursor:not-allowed}.auro-button.loading *:not([auro-loader]){visibility:hidden}@media screen and (min-width: 576px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=secondary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button[variant=ghost]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark]:disabled{cursor:not-allowed;transform:unset}.auro-button[onDark][variant=secondary]:disabled{cursor:not-allowed;transform:unset}@media(hover: hover){.auro-button[onDark][variant=tertiary]:active,.auro-button[onDark][variant=tertiary]:hover{box-shadow:none}}.auro-button[onDark][variant=tertiary]:active{box-shadow:none}.auro-button[onDark][variant=tertiary]:disabled{cursor:not-allowed;transform:unset}.auro-button--slim{min-width:unset;min-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem));max-height:calc(var(--ds-size-500, 2.5rem) - var(--ds-size-50, 0.25rem))}.auro-button--iconOnly{padding:0 var(--ds-size-100, 0.5rem);border-radius:100px;min-width:unset;height:var(--ds-size-600, 3rem);width:var(--ds-size-500, 2.5rem)}.auro-button--iconOnly ::slotted(auro-icon),.auro-button--iconOnly ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--iconOnly:not(.auro-button--rounded):focus-visible:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]),.auro-button--iconOnly:not(.auro-button--rounded):focus:not([variant=secondary]):not([variant=tertiary]):not([variant=flat]){outline-width:1px;outline-offset:-2px}.auro-button--iconOnlySlim{padding:0 var(--ds-size-50, 0.25rem);height:calc(var(--ds-size-400, 2rem) + var(--ds-size-50, 0.25rem));width:calc(var(--ds-size-300, 1.5rem) + var(--ds-size-50, 0.25rem))}.auro-button--iconOnlySlim ::slotted(auro-icon),.auro-button--iconOnlySlim ::slotted([auro-icon]){--ds-auro-icon-size:calc(var(--ds-size-200, 1rem) + var(--ds-size-50, 0.25rem))}.auro-button--rounded{border-radius:100px;box-shadow:var(--ds-elevation-300, 0px 0px 15px rgba(0, 0, 0, 0.2));height:var(--ds-size-500, 2.5rem);min-width:unset;transition:padding 300ms ease-out,outline 0ms,outline-offset 0ms}.auro-button--rounded ::slotted(auro-icon),.auro-button--rounded ::slotted([auro-icon]){--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}.auro-button--rounded:focus-visible:not([variant=flat]):after,.auro-button--rounded:focus:not([variant=flat]):after{border-radius:100px}:host([size=xs]) .wrapper:focus-visible,:host([size=xs]) .wrapper:focus{outline-width:1px;outline-offset:-2px}:host([rounded]) .textSlot{transition:opacity 300ms ease-in;opacity:1}:host([rounded][iconOnly]) .textSlot{opacity:0}:host([rounded][iconOnly]) .textWrapper{display:none}:host([rounded][iconOnly]) .auro-button{min-width:unset;padding:unset;width:var(--ds-size-600, 3rem)}[auro-loader]{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);pointer-events:none}`;
|
|
25159
|
+
|
|
25160
|
+
var colorCss$2 = i$3`[auro-loader]{color:var(--ds-auro-button-loader-color)}.auro-button{-webkit-tap-highlight-color:var(--ds-auro-button-tap-color);color:var(--ds-auro-button-text-color);background-color:var(--ds-auro-button-container-color);background-image:linear-gradient(var(--ds-auro-button-container-image), var(--ds-auro-button-container-image));border-color:var(--ds-auro-button-border-color)}.auro-button:not([variant=secondary]):not([variant=tertiary]):focus-visible{outline-color:var(--ds-auro-button-border-inset-color)}.auro-button:not([ondark]):active:not(:disabled),.auro-button:not([ondark]):hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-hover, #00274a);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-hover, #00274a)}.auro-button:not([ondark]):disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-disabled, #acc9e2);--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-disabled, #acc9e2)}.auro-button:not([ondark])[variant=secondary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background, #ffffff);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text, #01426a)}.auro-button:not([ondark])[variant=secondary]:active:not(:disabled),.auro-button:not([ondark])[variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-hover, #f2f2f2);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-hover, #00274a);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-hover, #00274a)}.auro-button:not([ondark])[variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=secondary]:disabled{--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-disabled, #f7f7f7);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-disabled, #cfe0ef);--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text, #01426a)}.auro-button:not([ondark])[variant=tertiary]:active:not(:disabled),.auro-button:not([ondark])[variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-hover, rgba(0, 0, 0, 0.1));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=tertiary]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text, #01426a)}.auro-button:not([ondark])[variant=ghost]:active:not(:disabled),.auro-button:not([ondark])[variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-hover, rgba(0, 0, 0, 0.05));--ds-auro-button-border-color:transparent}.auro-button:not([ondark])[variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button:not([ondark])[variant=ghost]:disabled{--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}.auro-button:not([ondark])[variant=flat]{color:var(--ds-advanced-color-button-flat-text, #676767);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:active:not(:disabled),.auro-button:not([ondark])[variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-hover, #525252);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-disabled, #d0d0d0);background-color:transparent;background-image:none;border-color:transparent}.auro-button:not([ondark])[variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a)}.auro-button[ondark]:active:not(:disabled),.auro-button[ondark]:hover:not(:disabled){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-hover, #ebf3f9);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-hover, #ebf3f9)}.auro-button[ondark]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused, #01426a)}.auro-button[ondark]:disabled{--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse-disabled, rgba(255, 255, 255, 0.75));--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=secondary]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-secondary-text-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:active:not(:disabled),.auro-button[ondark][variant=secondary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-secondary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=secondary]:focus-visible{--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=secondary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894);--ds-auro-button-border-color:var(--ds-advanced-color-button-secondary-border-inverse-disabled, #dddddd)}.auro-button[ondark][variant=tertiary]{--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse, rgba(255, 255, 255, 0.05));--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-tertiary-text-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:active:not(:disabled),.auro-button[ondark][variant=tertiary]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1));--ds-auro-button-container-image:var(--ds-advanced-color-button-tertiary-background-inverse-hover, rgba(255, 255, 255, 0.1))}.auro-button[ondark][variant=tertiary]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=tertiary]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=ghost]{--ds-auro-button-container-color:transparent;--ds-auro-button-container-image:transparent;--ds-auro-button-border-color:transparent;--ds-auro-button-text-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-ghost-text-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:active:not(:disabled),.auro-button[ondark][variant=ghost]:hover:not(:disabled){--ds-auro-button-container-color:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05));--ds-auro-button-container-image:var(--ds-advanced-color-button-ghost-background-inverse-hover, rgba(255, 255, 255, 0.05))}.auro-button[ondark][variant=ghost]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}.auro-button[ondark][variant=ghost]:disabled{--ds-auro-button-text-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}.auro-button[ondark][variant=flat]{color:var(--ds-advanced-color-button-flat-text-inverse, #ffffff);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:active:not(:disabled),.auro-button[ondark][variant=flat]:hover:not(:disabled){color:var(--ds-advanced-color-button-flat-text-inverse-hover, #adadad);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:disabled{color:var(--ds-advanced-color-button-flat-text-inverse-disabled, #7e8894);background-color:transparent;background-image:none;border-color:transparent}.auro-button[ondark][variant=flat]:focus-visible{--ds-auro-button-border-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff)}`;
|
|
23457
25161
|
|
|
23458
|
-
var
|
|
25162
|
+
var tokensCss$2 = i$3`:host(:not([onDark])){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border, #01426a);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background, #01426a);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text, #ffffff);--ds-auro-button-tap-color:transparent}:host([onDark]){--ds-auro-button-border-color:var(--ds-advanced-color-button-primary-border-inverse, #ffffff);--ds-auro-button-border-inset-color:var(--ds-advanced-color-state-focused-inverse, #ffffff);--ds-auro-button-container-color:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-container-image:var(--ds-advanced-color-button-primary-background-inverse, #ffffff);--ds-auro-button-loader-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-text-color:var(--ds-advanced-color-button-primary-text-inverse, #01426a);--ds-auro-button-tap-color:transparent}`;
|
|
23459
25163
|
|
|
23460
|
-
var
|
|
25164
|
+
var shapeSize = i$3`.shape-rounded-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:6px;overflow:hidden;font-size:18px}.shape-rounded-md{min-height:44px;max-height:44px;border-style:solid;border-radius:6px;overflow:hidden;font-size:16px}.shape-rounded-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:6px;overflow:hidden;font-size:14px}.shape-rounded-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:4px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px;overflow:hidden;font-size:18px}.shape-pill-left-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:34px 0 0 34px;overflow:hidden}.shape-pill-right-xl{min-height:68px;max-height:68px;border-style:solid;border-radius:0 34px 34px 0;overflow:hidden}.shape-pill-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px;overflow:hidden;font-size:18px}.shape-pill-left-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:26px 0 0 26px;overflow:hidden}.shape-pill-right-lg{min-height:52px;max-height:52px;border-style:solid;border-radius:0 26px 26px 0;overflow:hidden}.shape-pill-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px;overflow:hidden}.shape-pill-left-md{min-height:44px;max-height:44px;border-style:solid;border-radius:22px 0 0 22px;overflow:hidden}.shape-pill-right-md{min-height:44px;max-height:44px;border-style:solid;border-radius:0 22px 22px 0;overflow:hidden;font-size:16px}.shape-pill-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px;overflow:hidden;font-size:14px}.shape-pill-left-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:16px 0 0 16px;overflow:hidden}.shape-pill-right-sm{min-height:32px;max-height:32px;border-style:solid;border-radius:0 16px 16px 0;overflow:hidden}.shape-pill-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px;overflow:hidden;font-size:12px;outline-offset:-2px;outline-width:1px}.shape-pill-left-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:10px 0 0 10px;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-pill-right-xs{min-height:20px;max-height:20px;border-style:solid;border-radius:0 10px 10px 0;overflow:hidden;outline-offset:-2px;outline-width:1px}.shape-circle-xl{min-height:68px;max-height:68px;min-width:68px;max-width:68px;border-style:solid;border-radius:34px;overflow:hidden;padding:0}.shape-circle-lg{min-height:52px;max-height:52px;min-width:52px;max-width:52px;border-style:solid;border-radius:26px;overflow:hidden;padding:0}.shape-circle-md{min-height:44px;max-height:44px;min-width:44px;max-width:44px;border-style:solid;border-radius:22px;overflow:hidden;padding:0}.shape-circle-sm{min-height:32px;max-height:32px;min-width:32px;max-width:32px;border-style:solid;border-radius:16px;overflow:hidden;padding:0}.shape-circle-xs{min-height:20px;max-height:20px;min-width:20px;max-width:20px;border-style:solid;border-radius:10px;overflow:hidden;padding:0;outline-offset:-2px;outline-width:1px}`;
|
|
23461
25165
|
|
|
23462
25166
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
23463
25167
|
// See LICENSE in the project root for license information.
|
|
@@ -23676,7 +25380,7 @@ class AuroLoader extends i$1 {
|
|
|
23676
25380
|
|
|
23677
25381
|
var loaderVersion = '5.0.0';
|
|
23678
25382
|
|
|
23679
|
-
/* eslint-disable max-lines */
|
|
25383
|
+
/* eslint-disable max-lines, curly */
|
|
23680
25384
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
23681
25385
|
// See LICENSE in the project root for license information.
|
|
23682
25386
|
|
|
@@ -23692,7 +25396,18 @@ var loaderVersion = '5.0.0';
|
|
|
23692
25396
|
|
|
23693
25397
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
23694
25398
|
|
|
23695
|
-
|
|
25399
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
25400
|
+
|
|
25401
|
+
/**
|
|
25402
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
25403
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
25404
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
25405
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
25406
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
25407
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
25408
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
25409
|
+
*/
|
|
25410
|
+
class AuroButton extends AuroElement$3 {
|
|
23696
25411
|
|
|
23697
25412
|
/**
|
|
23698
25413
|
* Enables form association for this element.
|
|
@@ -23707,13 +25422,10 @@ class AuroButton extends i$1 {
|
|
|
23707
25422
|
super();
|
|
23708
25423
|
this.autofocus = false;
|
|
23709
25424
|
this.disabled = false;
|
|
23710
|
-
this.iconOnly = false;
|
|
23711
25425
|
this.loading = false;
|
|
25426
|
+
this.size = "md";
|
|
25427
|
+
this.shape = "rounded";
|
|
23712
25428
|
this.onDark = false;
|
|
23713
|
-
this.secondary = false;
|
|
23714
|
-
this.tertiary = false;
|
|
23715
|
-
this.rounded = false;
|
|
23716
|
-
this.slim = false;
|
|
23717
25429
|
this.fluid = false;
|
|
23718
25430
|
this.loadingText = this.loadingText || 'Loading...';
|
|
23719
25431
|
|
|
@@ -23742,43 +25454,38 @@ class AuroButton extends i$1 {
|
|
|
23742
25454
|
return [
|
|
23743
25455
|
tokensCss$2,
|
|
23744
25456
|
styleCss$2,
|
|
23745
|
-
colorCss$2
|
|
25457
|
+
colorCss$2,
|
|
25458
|
+
shapeSize
|
|
23746
25459
|
];
|
|
23747
25460
|
}
|
|
23748
25461
|
|
|
23749
25462
|
static get properties() {
|
|
23750
25463
|
return {
|
|
23751
25464
|
|
|
23752
|
-
|
|
23753
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
23754
|
-
*/
|
|
23755
|
-
autofocus: {
|
|
23756
|
-
type: Boolean,
|
|
23757
|
-
reflect: true
|
|
23758
|
-
},
|
|
25465
|
+
...super.properties,
|
|
23759
25466
|
|
|
23760
25467
|
/**
|
|
23761
|
-
*
|
|
25468
|
+
* Override layout since it isn't used in this component.
|
|
25469
|
+
* @private
|
|
23762
25470
|
*/
|
|
23763
|
-
|
|
25471
|
+
layout: {
|
|
23764
25472
|
type: Boolean,
|
|
23765
|
-
|
|
25473
|
+
attribute: false,
|
|
25474
|
+
reflect: false
|
|
23766
25475
|
},
|
|
23767
25476
|
|
|
23768
25477
|
/**
|
|
23769
|
-
*
|
|
23770
|
-
* @deprecated
|
|
25478
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
23771
25479
|
*/
|
|
23772
|
-
|
|
25480
|
+
autofocus: {
|
|
23773
25481
|
type: Boolean,
|
|
23774
25482
|
reflect: true
|
|
23775
25483
|
},
|
|
23776
25484
|
|
|
23777
25485
|
/**
|
|
23778
|
-
*
|
|
23779
|
-
* @deprecated
|
|
25486
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
23780
25487
|
*/
|
|
23781
|
-
|
|
25488
|
+
disabled: {
|
|
23782
25489
|
type: Boolean,
|
|
23783
25490
|
reflect: true
|
|
23784
25491
|
},
|
|
@@ -23786,15 +25493,7 @@ class AuroButton extends i$1 {
|
|
|
23786
25493
|
/**
|
|
23787
25494
|
* Alters the shape of the button to be full width of its parent container.
|
|
23788
25495
|
*/
|
|
23789
|
-
fluid:
|
|
23790
|
-
type: Boolean,
|
|
23791
|
-
reflect: true
|
|
23792
|
-
},
|
|
23793
|
-
|
|
23794
|
-
/**
|
|
23795
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
23796
|
-
*/
|
|
23797
|
-
iconOnly: {
|
|
25496
|
+
fluid: {
|
|
23798
25497
|
type: Boolean,
|
|
23799
25498
|
reflect: true
|
|
23800
25499
|
},
|
|
@@ -23802,7 +25501,7 @@ class AuroButton extends i$1 {
|
|
|
23802
25501
|
/**
|
|
23803
25502
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
23804
25503
|
*/
|
|
23805
|
-
loading:
|
|
25504
|
+
loading: {
|
|
23806
25505
|
type: Boolean,
|
|
23807
25506
|
reflect: true
|
|
23808
25507
|
},
|
|
@@ -23810,34 +25509,10 @@ class AuroButton extends i$1 {
|
|
|
23810
25509
|
/**
|
|
23811
25510
|
* Sets custom loading text for the `aria-label` on a button in loading state. If not set, the default value of "Loading..." will be used.
|
|
23812
25511
|
*/
|
|
23813
|
-
loadingText:
|
|
25512
|
+
loadingText: {
|
|
23814
25513
|
type: String
|
|
23815
25514
|
},
|
|
23816
25515
|
|
|
23817
|
-
/**
|
|
23818
|
-
* Set value for on-dark version of auro-button.
|
|
23819
|
-
*/
|
|
23820
|
-
onDark: {
|
|
23821
|
-
type: Boolean,
|
|
23822
|
-
reflect: true
|
|
23823
|
-
},
|
|
23824
|
-
|
|
23825
|
-
/**
|
|
23826
|
-
* If set to true, the button will have a rounded shape.
|
|
23827
|
-
*/
|
|
23828
|
-
rounded: {
|
|
23829
|
-
type: Boolean,
|
|
23830
|
-
reflect: true
|
|
23831
|
-
},
|
|
23832
|
-
|
|
23833
|
-
/**
|
|
23834
|
-
* Set value for slim version of auro-button.
|
|
23835
|
-
*/
|
|
23836
|
-
slim: {
|
|
23837
|
-
type: Boolean,
|
|
23838
|
-
reflect: true
|
|
23839
|
-
},
|
|
23840
|
-
|
|
23841
25516
|
/**
|
|
23842
25517
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
23843
25518
|
*/
|
|
@@ -23846,48 +25521,10 @@ class AuroButton extends i$1 {
|
|
|
23846
25521
|
reflect: true
|
|
23847
25522
|
},
|
|
23848
25523
|
|
|
23849
|
-
/**
|
|
23850
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
23851
|
-
*/
|
|
23852
|
-
ariahidden: {
|
|
23853
|
-
type: String,
|
|
23854
|
-
reflect: true,
|
|
23855
|
-
},
|
|
23856
|
-
|
|
23857
|
-
/**
|
|
23858
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
23859
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
23860
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
23861
|
-
*/
|
|
23862
|
-
arialabel: {
|
|
23863
|
-
type: String,
|
|
23864
|
-
reflect: true
|
|
23865
|
-
},
|
|
23866
|
-
|
|
23867
|
-
/**
|
|
23868
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
23869
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
23870
|
-
* List multiple element IDs in a space delimited fashion.
|
|
23871
|
-
*/
|
|
23872
|
-
arialabelledby: {
|
|
23873
|
-
type: String,
|
|
23874
|
-
reflect: true
|
|
23875
|
-
},
|
|
23876
|
-
|
|
23877
|
-
/**
|
|
23878
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
23879
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
23880
|
-
* This is an optional attribute for buttons.
|
|
23881
|
-
*/
|
|
23882
|
-
ariaexpanded: {
|
|
23883
|
-
type: Boolean,
|
|
23884
|
-
reflect: true
|
|
23885
|
-
},
|
|
23886
|
-
|
|
23887
25524
|
/**
|
|
23888
25525
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
23889
25526
|
*/
|
|
23890
|
-
title:
|
|
25527
|
+
title: {
|
|
23891
25528
|
type: String,
|
|
23892
25529
|
reflect: true
|
|
23893
25530
|
},
|
|
@@ -23895,7 +25532,7 @@ class AuroButton extends i$1 {
|
|
|
23895
25532
|
/**
|
|
23896
25533
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
23897
25534
|
*/
|
|
23898
|
-
type:
|
|
25535
|
+
type: {
|
|
23899
25536
|
type: String,
|
|
23900
25537
|
reflect: true
|
|
23901
25538
|
},
|
|
@@ -23903,19 +25540,19 @@ class AuroButton extends i$1 {
|
|
|
23903
25540
|
/**
|
|
23904
25541
|
* Defines the value associated with the button which is submitted with the form data.
|
|
23905
25542
|
*/
|
|
23906
|
-
value:
|
|
25543
|
+
value: {
|
|
23907
25544
|
type: String,
|
|
23908
25545
|
reflect: true
|
|
23909
25546
|
},
|
|
23910
25547
|
|
|
23911
25548
|
/**
|
|
23912
|
-
* Sets button variant option.
|
|
25549
|
+
* Sets button variant option.
|
|
25550
|
+
* @default primary
|
|
23913
25551
|
*/
|
|
23914
|
-
variant:
|
|
25552
|
+
variant: {
|
|
23915
25553
|
type: String,
|
|
23916
25554
|
reflect: true
|
|
23917
25555
|
},
|
|
23918
|
-
ready: { type: Boolean },
|
|
23919
25556
|
};
|
|
23920
25557
|
}
|
|
23921
25558
|
|
|
@@ -23928,7 +25565,7 @@ class AuroButton extends i$1 {
|
|
|
23928
25565
|
*
|
|
23929
25566
|
*/
|
|
23930
25567
|
static register(name = "auro-button") {
|
|
23931
|
-
AuroLibraryRuntimeUtils$
|
|
25568
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
23932
25569
|
}
|
|
23933
25570
|
|
|
23934
25571
|
/**
|
|
@@ -23940,17 +25577,6 @@ class AuroButton extends i$1 {
|
|
|
23940
25577
|
this.renderRoot.querySelector('button').focus();
|
|
23941
25578
|
}
|
|
23942
25579
|
|
|
23943
|
-
updated() {
|
|
23944
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
23945
|
-
if (this.secondary) {
|
|
23946
|
-
this.setAttribute('variant', 'secondary');
|
|
23947
|
-
}
|
|
23948
|
-
|
|
23949
|
-
if (this.tertiary) {
|
|
23950
|
-
this.setAttribute('variant', 'tertiary');
|
|
23951
|
-
}
|
|
23952
|
-
}
|
|
23953
|
-
|
|
23954
25580
|
/**
|
|
23955
25581
|
* Submits the form that this button is associated with.
|
|
23956
25582
|
* @private
|
|
@@ -23971,25 +25597,56 @@ class AuroButton extends i$1 {
|
|
|
23971
25597
|
return this.internals ? this.internals.form : null;
|
|
23972
25598
|
}
|
|
23973
25599
|
|
|
23974
|
-
|
|
25600
|
+
/**
|
|
25601
|
+
* @private
|
|
25602
|
+
* @returns {Boolean}
|
|
25603
|
+
*/
|
|
25604
|
+
get hideText() {
|
|
25605
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
25606
|
+
}
|
|
25607
|
+
|
|
25608
|
+
/**
|
|
25609
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
25610
|
+
* @returns {string | undefined}
|
|
25611
|
+
* @private
|
|
25612
|
+
*/
|
|
25613
|
+
get currentAriaLabel() {
|
|
25614
|
+
if (!this.attributeWatcher) return undefined;
|
|
25615
|
+
|
|
25616
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
25617
|
+
return ariaLabel || undefined;
|
|
25618
|
+
}
|
|
25619
|
+
|
|
25620
|
+
/**
|
|
25621
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
25622
|
+
* @returns {string | undefined}
|
|
25623
|
+
* @private
|
|
25624
|
+
*/
|
|
25625
|
+
get currentAriaLabelledBy() {
|
|
25626
|
+
if (!this.attributeWatcher) return undefined;
|
|
25627
|
+
|
|
25628
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
25629
|
+
return ariaLabelledBy || undefined;
|
|
25630
|
+
}
|
|
25631
|
+
|
|
25632
|
+
/**
|
|
25633
|
+
* Renders the default layout for the button.
|
|
25634
|
+
* @returns {TemplateResult}
|
|
25635
|
+
* @private
|
|
25636
|
+
*/
|
|
25637
|
+
renderLayoutDefault() {
|
|
23975
25638
|
const classes = {
|
|
23976
|
-
|
|
23977
|
-
|
|
23978
|
-
|
|
23979
|
-
|
|
23980
|
-
'auro-button--slim': this.slim,
|
|
23981
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
23982
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
23983
|
-
'loading': this.loading
|
|
25639
|
+
"util_insetLg--squish": true,
|
|
25640
|
+
"auro-button": true,
|
|
25641
|
+
wrapper: true,
|
|
25642
|
+
loading: this.loading,
|
|
23984
25643
|
};
|
|
23985
25644
|
|
|
23986
25645
|
return u$3`
|
|
23987
25646
|
<button
|
|
23988
25647
|
part="button"
|
|
23989
|
-
aria-
|
|
23990
|
-
aria-
|
|
23991
|
-
aria-labelledby="${o(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
23992
|
-
aria-expanded="${o(this.ariaexpanded)}"
|
|
25648
|
+
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
25649
|
+
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
23993
25650
|
tabIndex="${o(this.tIndex)}"
|
|
23994
25651
|
?autofocus="${this.autofocus}"
|
|
23995
25652
|
class="${e(classes)}"
|
|
@@ -24006,7 +25663,7 @@ class AuroButton extends i$1 {
|
|
|
24006
25663
|
|
|
24007
25664
|
<span class="contentWrapper">
|
|
24008
25665
|
<span class="textSlot" part="text">
|
|
24009
|
-
${this.
|
|
25666
|
+
${this.hideText ? undefined : u$3`<slot></slot>`}
|
|
24010
25667
|
</span>
|
|
24011
25668
|
|
|
24012
25669
|
<span part="icon">
|
|
@@ -24016,6 +25673,15 @@ class AuroButton extends i$1 {
|
|
|
24016
25673
|
</button>
|
|
24017
25674
|
`;
|
|
24018
25675
|
}
|
|
25676
|
+
|
|
25677
|
+
/**
|
|
25678
|
+
* Renders the layout of the button
|
|
25679
|
+
* @returns {TemplateResult}
|
|
25680
|
+
* @private
|
|
25681
|
+
*/
|
|
25682
|
+
renderLayout() {
|
|
25683
|
+
return this.renderLayoutDefault();
|
|
25684
|
+
}
|
|
24019
25685
|
}
|
|
24020
25686
|
|
|
24021
25687
|
var buttonVersion = '9.3.0';
|
|
@@ -24033,7 +25699,7 @@ var tokensCss$5 = i$3`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
24033
25699
|
|
|
24034
25700
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
24035
25701
|
|
|
24036
|
-
let AuroLibraryRuntimeUtils$
|
|
25702
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
24037
25703
|
|
|
24038
25704
|
/* eslint-disable jsdoc/require-param */
|
|
24039
25705
|
|
|
@@ -24114,7 +25780,7 @@ class AuroHelpText extends i$1 {
|
|
|
24114
25780
|
this.onDark = false;
|
|
24115
25781
|
this.hasTextContent = false;
|
|
24116
25782
|
|
|
24117
|
-
AuroLibraryRuntimeUtils$
|
|
25783
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
24118
25784
|
}
|
|
24119
25785
|
|
|
24120
25786
|
static get styles() {
|
|
@@ -24170,7 +25836,7 @@ class AuroHelpText extends i$1 {
|
|
|
24170
25836
|
*
|
|
24171
25837
|
*/
|
|
24172
25838
|
static register(name = "auro-helptext") {
|
|
24173
|
-
AuroLibraryRuntimeUtils$
|
|
25839
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
24174
25840
|
}
|
|
24175
25841
|
|
|
24176
25842
|
updated() {
|
|
@@ -24241,7 +25907,7 @@ class AuroInput extends BaseInput {
|
|
|
24241
25907
|
/**
|
|
24242
25908
|
* Generate unique names for dependency components.
|
|
24243
25909
|
*/
|
|
24244
|
-
const versioning = new AuroDependencyVersioning
|
|
25910
|
+
const versioning = new AuroDependencyVersioning();
|
|
24245
25911
|
|
|
24246
25912
|
/**
|
|
24247
25913
|
* @private
|
|
@@ -24362,7 +26028,7 @@ class AuroInput extends BaseInput {
|
|
|
24362
26028
|
*
|
|
24363
26029
|
*/
|
|
24364
26030
|
static register(name = "auro-input") {
|
|
24365
|
-
AuroLibraryRuntimeUtils$
|
|
26031
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroInput);
|
|
24366
26032
|
}
|
|
24367
26033
|
|
|
24368
26034
|
/**
|
|
@@ -24492,11 +26158,12 @@ class AuroInput extends BaseInput {
|
|
|
24492
26158
|
?onDark="${this.onDark}"
|
|
24493
26159
|
aria-label="${i18n$1(this.lang, 'clearInput')}"
|
|
24494
26160
|
class="notificationBtn clearBtn"
|
|
24495
|
-
|
|
24496
|
-
|
|
26161
|
+
shape="circle"
|
|
26162
|
+
size="sm"
|
|
26163
|
+
variant="ghost">
|
|
24497
26164
|
<${this.iconTag}
|
|
26165
|
+
customColor="${this.onDark}"
|
|
24498
26166
|
category="interface"
|
|
24499
|
-
customColor
|
|
24500
26167
|
name="x-lg"
|
|
24501
26168
|
>
|
|
24502
26169
|
</${this.iconTag}>
|
|
@@ -24516,20 +26183,21 @@ class AuroInput extends BaseInput {
|
|
|
24516
26183
|
<${this.buttonTag}
|
|
24517
26184
|
@click="${this.handleClickShowPassword}"
|
|
24518
26185
|
?onDark="${this.onDark}"
|
|
24519
|
-
aria-hidden="true"
|
|
24520
26186
|
class="notificationBtn passwordBtn"
|
|
24521
|
-
|
|
24522
|
-
|
|
26187
|
+
aria-label="${this.showPassword ? i18n$1(this.lang, "hidePassword") : i18n$1(this.lang, "showPassword")}"
|
|
26188
|
+
shape="circle"
|
|
26189
|
+
size="sm"
|
|
26190
|
+
variant="ghost">
|
|
24523
26191
|
<${this.iconTag}
|
|
26192
|
+
customColor="${this.onDark}"
|
|
24524
26193
|
?hidden=${!this.showPassword}
|
|
24525
26194
|
category="interface"
|
|
24526
|
-
customColor
|
|
24527
26195
|
name="hide-password-stroke">
|
|
24528
26196
|
</${this.iconTag}>
|
|
24529
26197
|
<${this.iconTag}
|
|
26198
|
+
customColor="${this.onDark}"
|
|
24530
26199
|
?hidden=${this.showPassword}
|
|
24531
26200
|
category="interface"
|
|
24532
|
-
customColor
|
|
24533
26201
|
name="view-password-stroke">
|
|
24534
26202
|
</${this.iconTag}>
|
|
24535
26203
|
</${this.buttonTag}>
|
|
@@ -24895,6 +26563,8 @@ const stringsES = {
|
|
|
24895
26563
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
24896
26564
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
24897
26565
|
'clearInput': 'Borrar campo de entrada',
|
|
26566
|
+
'showPassword': 'Mostrar contraseña',
|
|
26567
|
+
'hidePassword': 'Ocultar contraseña'
|
|
24898
26568
|
};
|
|
24899
26569
|
|
|
24900
26570
|
const stringsEN = {
|
|
@@ -24919,6 +26589,8 @@ const stringsEN = {
|
|
|
24919
26589
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
24920
26590
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
24921
26591
|
'clearInput': 'Clear input field',
|
|
26592
|
+
'showPassword': 'Show password',
|
|
26593
|
+
'hidePassword': 'Hide password'
|
|
24922
26594
|
};
|
|
24923
26595
|
|
|
24924
26596
|
/**
|
|
@@ -25282,8 +26954,12 @@ class AuroIcon extends BaseIcon {
|
|
|
25282
26954
|
async firstUpdated() {
|
|
25283
26955
|
await super.firstUpdated();
|
|
25284
26956
|
|
|
25285
|
-
|
|
25286
|
-
|
|
26957
|
+
/**
|
|
26958
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
26959
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
26960
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
26961
|
+
*/
|
|
26962
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
25287
26963
|
const svgDesc = this.svg.querySelector('desc');
|
|
25288
26964
|
|
|
25289
26965
|
if (svgDesc) {
|
|
@@ -25432,7 +27108,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
25432
27108
|
/**
|
|
25433
27109
|
* @private
|
|
25434
27110
|
*/
|
|
25435
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
27111
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$9();
|
|
25436
27112
|
|
|
25437
27113
|
/**
|
|
25438
27114
|
* @private
|
|
@@ -25442,7 +27118,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
25442
27118
|
/**
|
|
25443
27119
|
* Generate unique names for dependency components.
|
|
25444
27120
|
*/
|
|
25445
|
-
const versioning = new AuroDependencyVersioning$
|
|
27121
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
25446
27122
|
|
|
25447
27123
|
/**
|
|
25448
27124
|
* @private
|
|
@@ -25773,7 +27449,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
25773
27449
|
*
|
|
25774
27450
|
*/
|
|
25775
27451
|
static register(name = "auro-datepicker") {
|
|
25776
|
-
AuroLibraryRuntimeUtils$
|
|
27452
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent(name, AuroDatePicker);
|
|
25777
27453
|
}
|
|
25778
27454
|
|
|
25779
27455
|
/**
|