@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
|
@@ -421,7 +421,7 @@ const {
|
|
|
421
421
|
|
|
422
422
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
423
423
|
|
|
424
|
-
let AuroLibraryRuntimeUtils$
|
|
424
|
+
let AuroLibraryRuntimeUtils$9 = class AuroLibraryRuntimeUtils {
|
|
425
425
|
|
|
426
426
|
/* eslint-disable jsdoc/require-param */
|
|
427
427
|
|
|
@@ -491,7 +491,7 @@ let AuroLibraryRuntimeUtils$b = class AuroLibraryRuntimeUtils {
|
|
|
491
491
|
let AuroFormValidation$1 = class AuroFormValidation {
|
|
492
492
|
|
|
493
493
|
constructor() {
|
|
494
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
494
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$9();
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
/**
|
|
@@ -856,7 +856,7 @@ let AuroFormValidation$1 = class AuroFormValidation {
|
|
|
856
856
|
// See LICENSE in the project root for license information.
|
|
857
857
|
|
|
858
858
|
|
|
859
|
-
let AuroDependencyVersioning$
|
|
859
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
860
860
|
|
|
861
861
|
/**
|
|
862
862
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -7251,7 +7251,7 @@ __decorate([property({ type: Array })], RangeDatepickerCell.prototype, "disabled
|
|
|
7251
7251
|
__decorate([property({ type: String })], RangeDatepickerCell.prototype, "hoveredDate", void 0);
|
|
7252
7252
|
__decorate([property({ type: Boolean })], RangeDatepickerCell.prototype, "isCurrentDate", void 0);
|
|
7253
7253
|
__decorate([property({ type: Object })], RangeDatepickerCell.prototype, "locale", null);
|
|
7254
|
-
AuroLibraryRuntimeUtils$
|
|
7254
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent('wc-range-datepicker-cell', RangeDatepickerCell);
|
|
7255
7255
|
|
|
7256
7256
|
class Day {
|
|
7257
7257
|
constructor(date) {
|
|
@@ -7769,7 +7769,7 @@ __decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "year
|
|
|
7769
7769
|
__decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "monthsList", void 0);
|
|
7770
7770
|
__decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "dayNamesOfTheWeek", void 0);
|
|
7771
7771
|
__decorate([property({ type: Array })], RangeDatepickerCalendar.prototype, "daysOfMonth", void 0);
|
|
7772
|
-
AuroLibraryRuntimeUtils$
|
|
7772
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent('wc-range-datepicker-calendar', RangeDatepickerCalendar);
|
|
7773
7773
|
|
|
7774
7774
|
var styleCss$b = css`@media screen and (max-width: 576px){:host{display:flex;justify-content:center}}.day{position:relative;width:var(--ds-size-500, 2.5rem);height:calc(var(--ds-size-700, 3.5rem) - 2px);padding:0;border-width:1px;border-style:solid;border-radius:var(--ds-size-300, 1.5rem);cursor:pointer;font-size:16px;font-weight:450;letter-spacing:0;line-height:24px;user-select:none}.day.disabled{cursor:default !important}.day.inRange::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%)}@media screen and (min-width: 576px){.day.inRange::before{width:var(--ds-size-600, 3rem)}}.day.rangeDepartDate::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%);width:7.1428571429vw;transform:translate(0%, -50%)}@media screen and (min-width: 576px){.day.rangeDepartDate::before{width:calc(var(--ds-size-600, 3rem)/2)}}.day.rangeReturnDate::before,.day.lastHoveredDate::before{position:absolute;z-index:-1;top:50%;left:50%;display:block;width:14.2857142857vw;height:var(--ds-size-600, 3rem);content:"";transform:translate(-50%, -50%);width:7.1428571429vw;transform:translate(-100%, -50%)}@media screen and (min-width: 576px){.day.rangeReturnDate::before,.day.lastHoveredDate::before{width:calc(var(--ds-size-600, 3rem)/2)}}.dateSlot{display:flex;flex-direction:column;font-size:10px;font-weight:450;letter-spacing:0;line-height:14px}::slotted([slot^=date_]){position:absolute;top:80%;left:50%;width:80%;overflow:hidden;white-space:nowrap;transform:translate(-50%, -50%)}::slotted(auro-icon){max-height:24px;max-width:24px}:host([renderForDateSlot]) .buttonWrapper{position:relative;width:100%;top:5px}:host([renderForDateSlot]) .currentDayMarker{position:relative;padding-bottom:5px;top:-8px}@media screen and (min-width: 576px){.day{width:var(--ds-size-600, 3rem);height:var(--ds-size-800, 4rem);font-size:18px;font-weight:450;letter-spacing:0;line-height:26px}.day:hover{cursor:pointer}.dateSlot{font-size:12px;font-weight:450;letter-spacing:0;line-height:16px}}`;
|
|
7775
7775
|
|
|
@@ -7782,7 +7782,7 @@ var colorCss$a = css`:host ::slotted([slot^=date_]){color:var(--ds-auro-calendar
|
|
|
7782
7782
|
|
|
7783
7783
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
7784
7784
|
|
|
7785
|
-
let AuroLibraryRuntimeUtils$
|
|
7785
|
+
let AuroLibraryRuntimeUtils$8 = class AuroLibraryRuntimeUtils {
|
|
7786
7786
|
|
|
7787
7787
|
/* eslint-disable jsdoc/require-param */
|
|
7788
7788
|
|
|
@@ -9740,7 +9740,7 @@ class AuroPopover extends LitElement {
|
|
|
9740
9740
|
privateDefaults() {
|
|
9741
9741
|
this.isPopoverVisible = false;
|
|
9742
9742
|
this.id = `popover-${(Math.random() + 1).toString(36).substring(7)}`;
|
|
9743
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9743
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$8();
|
|
9744
9744
|
}
|
|
9745
9745
|
|
|
9746
9746
|
// function to define props used within the scope of this component
|
|
@@ -9770,7 +9770,7 @@ class AuroPopover extends LitElement {
|
|
|
9770
9770
|
*
|
|
9771
9771
|
*/
|
|
9772
9772
|
static register(name = "auro-popover") {
|
|
9773
|
-
AuroLibraryRuntimeUtils$
|
|
9773
|
+
AuroLibraryRuntimeUtils$8.prototype.registerComponent(name, AuroPopover);
|
|
9774
9774
|
}
|
|
9775
9775
|
|
|
9776
9776
|
connectedCallback() {
|
|
@@ -9938,12 +9938,12 @@ class AuroCalendarCell extends LitElement {
|
|
|
9938
9938
|
this.dateStr = null;
|
|
9939
9939
|
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.
|
|
9940
9940
|
|
|
9941
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
9941
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$9();
|
|
9942
9942
|
|
|
9943
9943
|
/**
|
|
9944
9944
|
* Generate unique names for dependency components.
|
|
9945
9945
|
*/
|
|
9946
|
-
const versioning = new AuroDependencyVersioning$
|
|
9946
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
9947
9947
|
this.popoverTag = versioning.generateTag('auro-formkit-datepicker-popover', popoverVersion, AuroPopover);
|
|
9948
9948
|
}
|
|
9949
9949
|
|
|
@@ -10836,9 +10836,9 @@ class CalendarUtilities {
|
|
|
10836
10836
|
}
|
|
10837
10837
|
}
|
|
10838
10838
|
|
|
10839
|
-
var colorCss$
|
|
10839
|
+
var colorCss$3$2 = css`#headerContainer{box-shadow:var(--ds-auro-dropdownbib-header-boxshadow-color)}#footerContainer{background-color:var(--ds-auro-dropdownbib-footer-container-color)}`;
|
|
10840
10840
|
|
|
10841
|
-
var styleCss$
|
|
10841
|
+
var styleCss$4$1 = css`#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)}`;
|
|
10842
10842
|
|
|
10843
10843
|
var tokenCss = css`: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)}`;
|
|
10844
10844
|
|
|
@@ -10849,7 +10849,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
10849
10849
|
|
|
10850
10850
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
10851
10851
|
|
|
10852
|
-
let AuroLibraryRuntimeUtils$
|
|
10852
|
+
let AuroLibraryRuntimeUtils$3$1 = class AuroLibraryRuntimeUtils {
|
|
10853
10853
|
|
|
10854
10854
|
/* eslint-disable jsdoc/require-param */
|
|
10855
10855
|
|
|
@@ -10916,7 +10916,7 @@ let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
|
10916
10916
|
// See LICENSE in the project root for license information.
|
|
10917
10917
|
|
|
10918
10918
|
|
|
10919
|
-
let AuroDependencyVersioning$
|
|
10919
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
10920
10920
|
|
|
10921
10921
|
/**
|
|
10922
10922
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -10952,159 +10952,479 @@ let AuroDependencyVersioning$4 = class AuroDependencyVersioning {
|
|
|
10952
10952
|
}
|
|
10953
10953
|
};
|
|
10954
10954
|
|
|
10955
|
-
|
|
10956
|
-
|
|
10957
|
-
|
|
10955
|
+
/**
|
|
10956
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
10957
|
+
*/
|
|
10958
|
+
const _observers$2 = new WeakMap();
|
|
10958
10959
|
|
|
10959
10960
|
/**
|
|
10960
|
-
*
|
|
10961
|
-
*
|
|
10962
|
-
*
|
|
10961
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
10962
|
+
* Structure: {
|
|
10963
|
+
* host: {
|
|
10964
|
+
* matchers: Set<Function>,
|
|
10965
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
10966
|
+
* }
|
|
10967
|
+
* }
|
|
10963
10968
|
*/
|
|
10969
|
+
const _transportConfig$2 = new WeakMap();
|
|
10964
10970
|
|
|
10965
|
-
|
|
10971
|
+
/**
|
|
10972
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
10973
|
+
*
|
|
10974
|
+
* @param {Object} params - The parameters for the function.
|
|
10975
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
10976
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
10977
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
10978
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
10979
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
10980
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
10981
|
+
*/
|
|
10982
|
+
const transportAttributes$2 = ({ host, target, match, removeOriginal = true }) => {
|
|
10983
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
10984
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
10985
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
10986
|
+
}
|
|
10966
10987
|
|
|
10967
|
-
//
|
|
10968
|
-
|
|
10969
|
-
|
|
10970
|
-
hidden: { type: Boolean,
|
|
10971
|
-
reflect: true },
|
|
10972
|
-
hiddenVisually: { type: Boolean,
|
|
10973
|
-
reflect: true },
|
|
10974
|
-
hiddenAudible: { type: Boolean,
|
|
10975
|
-
reflect: true },
|
|
10976
|
-
};
|
|
10988
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
10989
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
10990
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
10977
10991
|
}
|
|
10978
10992
|
|
|
10979
|
-
|
|
10980
|
-
|
|
10981
|
-
|
|
10982
|
-
|
|
10983
|
-
if (value) {
|
|
10984
|
-
return 'true'
|
|
10985
|
-
}
|
|
10993
|
+
// Guard Clause: Ensure match is a function
|
|
10994
|
+
if (typeof match !== 'function') {
|
|
10995
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
10996
|
+
}
|
|
10986
10997
|
|
|
10987
|
-
|
|
10998
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
10999
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
11000
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
10988
11001
|
}
|
|
11002
|
+
|
|
11003
|
+
// Register this transport and get cleanup function
|
|
11004
|
+
return _registerTransport$2({
|
|
11005
|
+
host,
|
|
11006
|
+
target,
|
|
11007
|
+
matcher: match,
|
|
11008
|
+
removeOriginal
|
|
11009
|
+
});
|
|
10989
11010
|
};
|
|
10990
11011
|
|
|
10991
|
-
|
|
11012
|
+
/**
|
|
11013
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
11014
|
+
*
|
|
11015
|
+
* @param {Object} params - The parameters object.
|
|
11016
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
11017
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
11018
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
11019
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
11020
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
11021
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
11022
|
+
* @private
|
|
11023
|
+
*/
|
|
11024
|
+
const _registerTransport$2 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11025
|
+
// Initialize config for this host if it doesn't exist
|
|
11026
|
+
if (!_transportConfig$2.has(host)) {
|
|
11027
|
+
_transportConfig$2.set(host, {
|
|
11028
|
+
matchers: new Set(),
|
|
11029
|
+
targets: new Map()
|
|
11030
|
+
});
|
|
11031
|
+
}
|
|
10992
11032
|
|
|
10993
|
-
|
|
11033
|
+
const config = _transportConfig$2.get(host);
|
|
11034
|
+
|
|
11035
|
+
// Add the matcher to the set of matchers for this host
|
|
11036
|
+
config.matchers.add(matcher);
|
|
11037
|
+
|
|
11038
|
+
// Initialize target entry if it doesn't exist
|
|
11039
|
+
if (!config.targets.has(target)) {
|
|
11040
|
+
config.targets.set(target, new Map());
|
|
11041
|
+
}
|
|
11042
|
+
|
|
11043
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
11044
|
+
config.targets.get(target).set(matcher, {
|
|
11045
|
+
removeOriginal,
|
|
11046
|
+
currentAttributes: new Map()
|
|
11047
|
+
});
|
|
11048
|
+
|
|
11049
|
+
// Perform initial attribute transport
|
|
11050
|
+
_transportAttributes$2({ host, target, matcher, removeOriginal });
|
|
11051
|
+
|
|
11052
|
+
// Attach observer
|
|
11053
|
+
_attachObserver$2(host);
|
|
11054
|
+
|
|
11055
|
+
// Return cleanup function and utility functions
|
|
11056
|
+
return {
|
|
11057
|
+
cleanup: () => _cleanupTransport$2(host, target, matcher),
|
|
11058
|
+
getObservedAttributes: () => _getObservedAttributes$2(host, target, matcher),
|
|
11059
|
+
getObservedAttribute: (attr) => _getObservedAttribute$2(host, target, matcher, attr),
|
|
11060
|
+
}
|
|
11061
|
+
};
|
|
10994
11062
|
|
|
10995
|
-
|
|
11063
|
+
/**
|
|
11064
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
11065
|
+
*
|
|
11066
|
+
* @param {HTMLElement} host - The host element
|
|
11067
|
+
* @param {HTMLElement} target - The target element
|
|
11068
|
+
* @param {Function} matcher - The matcher function
|
|
11069
|
+
* @private
|
|
11070
|
+
*/
|
|
11071
|
+
const _cleanupTransport$2 = (host, target, matcher) => {
|
|
11072
|
+
const config = _transportConfig$2.get(host);
|
|
11073
|
+
if (!config) return;
|
|
11074
|
+
|
|
11075
|
+
// Remove this matcher from this target
|
|
11076
|
+
const targetMatchers = config.targets.get(target);
|
|
11077
|
+
if (targetMatchers) {
|
|
11078
|
+
targetMatchers.delete(matcher);
|
|
11079
|
+
|
|
11080
|
+
// If this target has no more matchers, remove it
|
|
11081
|
+
if (targetMatchers.size === 0) {
|
|
11082
|
+
config.targets.delete(target);
|
|
11083
|
+
}
|
|
11084
|
+
}
|
|
11085
|
+
|
|
11086
|
+
// Check if this matcher is still used by any target
|
|
11087
|
+
let matcherStillUsed = false;
|
|
11088
|
+
for (const matcherMap of config.targets.values()) {
|
|
11089
|
+
if (matcherMap.has(matcher)) {
|
|
11090
|
+
matcherStillUsed = true;
|
|
11091
|
+
break;
|
|
11092
|
+
}
|
|
11093
|
+
}
|
|
11094
|
+
|
|
11095
|
+
// If not used anymore, remove from matchers set
|
|
11096
|
+
if (!matcherStillUsed) {
|
|
11097
|
+
config.matchers.delete(matcher);
|
|
11098
|
+
}
|
|
11099
|
+
|
|
11100
|
+
// If no more targets or matchers, detach observer
|
|
11101
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
11102
|
+
_detachObserver$2(host);
|
|
11103
|
+
}
|
|
11104
|
+
};
|
|
10996
11105
|
|
|
10997
11106
|
/**
|
|
10998
|
-
*
|
|
10999
|
-
*
|
|
11000
|
-
* @
|
|
11001
|
-
* @param {
|
|
11002
|
-
* @
|
|
11107
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
11108
|
+
*
|
|
11109
|
+
* @param {Object} params - The parameters object.
|
|
11110
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
11111
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
11112
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
11113
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
11114
|
+
* @returns {void}
|
|
11115
|
+
* @private
|
|
11003
11116
|
*/
|
|
11117
|
+
const _transportAttributes$2 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
11118
|
+
// Get a list of all matching attributes on the host element and their values
|
|
11119
|
+
const matchingAttributes = host.getAttributeNames()
|
|
11120
|
+
.filter(attr => matcher(attr))
|
|
11121
|
+
.reduce((acc, attr) => {
|
|
11122
|
+
acc[attr] = host.getAttribute(attr);
|
|
11123
|
+
return acc;
|
|
11124
|
+
}, {});
|
|
11125
|
+
|
|
11126
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
11127
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
11128
|
+
_setObservedAttribute$2(host, target, matcher, key, value);
|
|
11129
|
+
target.setAttribute(key, value);
|
|
11130
|
+
if (removeOriginal) {
|
|
11131
|
+
host.removeAttribute(key);
|
|
11132
|
+
}
|
|
11133
|
+
});
|
|
11134
|
+
};
|
|
11004
11135
|
|
|
11005
11136
|
/**
|
|
11006
|
-
*
|
|
11007
|
-
*
|
|
11008
|
-
* @param {
|
|
11009
|
-
* @
|
|
11010
|
-
* @
|
|
11011
|
-
* @returns {Promise}
|
|
11137
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
11138
|
+
*
|
|
11139
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
11140
|
+
* @returns {MutationObserver} The observer instance.
|
|
11141
|
+
* @private
|
|
11012
11142
|
*/
|
|
11013
|
-
const
|
|
11014
|
-
|
|
11015
|
-
if (
|
|
11016
|
-
|
|
11143
|
+
const _attachObserver$2 = (host) => {
|
|
11144
|
+
// If an observer for this host already exists, return it
|
|
11145
|
+
if (_observers$2.has(host)) {
|
|
11146
|
+
return _observers$2.get(host);
|
|
11017
11147
|
}
|
|
11018
|
-
return _fetchMap$3.get(uri);
|
|
11019
|
-
};
|
|
11020
11148
|
|
|
11021
|
-
|
|
11149
|
+
// Create a new MutationObserver
|
|
11150
|
+
const observer = new MutationObserver((mutations) => {
|
|
11151
|
+
const config = _transportConfig$2.get(host);
|
|
11152
|
+
if (!config) return;
|
|
11153
|
+
|
|
11154
|
+
// For each mutation affecting attributes
|
|
11155
|
+
mutations
|
|
11156
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
11157
|
+
.forEach(mutation => {
|
|
11158
|
+
const attributeName = mutation.attributeName;
|
|
11159
|
+
|
|
11160
|
+
// Find matchers that care about this attribute
|
|
11161
|
+
for (const matcher of config.matchers) {
|
|
11162
|
+
if (matcher(attributeName)) {
|
|
11163
|
+
// For each target that uses this matcher
|
|
11164
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
11165
|
+
if (matcherConfigs.has(matcher)) {
|
|
11166
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
11167
|
+
_transportAttributes$2({
|
|
11168
|
+
host,
|
|
11169
|
+
target,
|
|
11170
|
+
matcher,
|
|
11171
|
+
removeOriginal
|
|
11172
|
+
});
|
|
11173
|
+
}
|
|
11174
|
+
}
|
|
11175
|
+
}
|
|
11176
|
+
}
|
|
11177
|
+
});
|
|
11178
|
+
});
|
|
11022
11179
|
|
|
11023
|
-
//
|
|
11024
|
-
|
|
11180
|
+
// Start observing attribute changes
|
|
11181
|
+
observer.observe(host, { attributes: true });
|
|
11182
|
+
|
|
11183
|
+
// Store the observer
|
|
11184
|
+
_observers$2.set(host, observer);
|
|
11185
|
+
|
|
11186
|
+
return observer;
|
|
11187
|
+
};
|
|
11025
11188
|
|
|
11189
|
+
/**
|
|
11190
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
11191
|
+
*
|
|
11192
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
11193
|
+
* @private
|
|
11194
|
+
*/
|
|
11195
|
+
const _detachObserver$2 = (host) => {
|
|
11196
|
+
if (_observers$2.has(host)) {
|
|
11197
|
+
const observer = _observers$2.get(host);
|
|
11198
|
+
observer.disconnect();
|
|
11199
|
+
_observers$2.delete(host);
|
|
11200
|
+
}
|
|
11201
|
+
|
|
11202
|
+
// Clean up the transport config as well
|
|
11203
|
+
if (_transportConfig$2.has(host)) {
|
|
11204
|
+
_transportConfig$2.delete(host);
|
|
11205
|
+
}
|
|
11206
|
+
};
|
|
11026
11207
|
|
|
11027
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
11028
11208
|
/**
|
|
11029
|
-
*
|
|
11209
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
11210
|
+
* @param {HTMLElement} host - The host element
|
|
11211
|
+
* @param {HTMLElement} target - The target element
|
|
11212
|
+
* @param {Function} matcher - The matcher function
|
|
11213
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
11214
|
+
* @private
|
|
11030
11215
|
*/
|
|
11216
|
+
const _getMatcherConfig$2 = (host, target, matcher) => {
|
|
11217
|
+
const config = _transportConfig$2.get(host);
|
|
11218
|
+
if (!config) return undefined;
|
|
11219
|
+
|
|
11220
|
+
const targetMatchers = config.targets.get(target);
|
|
11221
|
+
if (!targetMatchers) return undefined;
|
|
11222
|
+
|
|
11223
|
+
return targetMatchers.get(matcher);
|
|
11224
|
+
};
|
|
11031
11225
|
|
|
11032
|
-
|
|
11033
|
-
|
|
11034
|
-
|
|
11035
|
-
|
|
11036
|
-
|
|
11226
|
+
/**
|
|
11227
|
+
* Sets an observed attribute value
|
|
11228
|
+
* @param {HTMLElement} host - The host element
|
|
11229
|
+
* @param {HTMLElement} target - The target element
|
|
11230
|
+
* @param {Function} matcher - The matcher function
|
|
11231
|
+
* @param {string} key - The attribute name
|
|
11232
|
+
* @param {string} value - The attribute value
|
|
11233
|
+
* @private
|
|
11234
|
+
*/
|
|
11235
|
+
const _setObservedAttribute$2 = (host, target, matcher, key, value) => {
|
|
11236
|
+
const matcherConfig = _getMatcherConfig$2(host, target, matcher);
|
|
11237
|
+
if (matcherConfig) {
|
|
11238
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11037
11239
|
}
|
|
11240
|
+
};
|
|
11241
|
+
|
|
11242
|
+
const _getObservedAttribute$2 = (host, target, matcher, attr) => {
|
|
11243
|
+
const matcherConfig = _getMatcherConfig$2(host, target, matcher);
|
|
11244
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
11245
|
+
return undefined;
|
|
11246
|
+
};
|
|
11247
|
+
|
|
11248
|
+
const _getObservedAttributes$2 = (host, target, matcher) => {
|
|
11249
|
+
const matcherConfig = _getMatcherConfig$2(host, target, matcher);
|
|
11250
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
11251
|
+
return [];
|
|
11252
|
+
};
|
|
11253
|
+
|
|
11254
|
+
const _matchers$2 = {
|
|
11255
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
11256
|
+
'role': attr => attr.match(/^role$/)
|
|
11257
|
+
};
|
|
11258
|
+
|
|
11259
|
+
const transportAllA11yAttributes$2 = ({ host, target, removeOriginal = true }) => {
|
|
11260
|
+
return transportAttributes$2({
|
|
11261
|
+
host,
|
|
11262
|
+
target,
|
|
11263
|
+
match: attr => {
|
|
11264
|
+
for (const key in _matchers$2) {
|
|
11265
|
+
if (_matchers$2[key](attr)) return true;
|
|
11266
|
+
}
|
|
11267
|
+
return false;
|
|
11268
|
+
},
|
|
11269
|
+
removeOriginal
|
|
11270
|
+
});
|
|
11271
|
+
};
|
|
11272
|
+
|
|
11273
|
+
let AuroElement$1$3 = class AuroElement extends LitElement {
|
|
11274
|
+
|
|
11275
|
+
/**
|
|
11276
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
11277
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
11278
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
11279
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11280
|
+
* @private
|
|
11281
|
+
*/
|
|
11282
|
+
attributeWatcher;
|
|
11038
11283
|
|
|
11039
|
-
// function to define props used within the scope of this component
|
|
11040
11284
|
static get properties() {
|
|
11041
11285
|
return {
|
|
11042
|
-
...super.properties,
|
|
11043
11286
|
|
|
11044
11287
|
/**
|
|
11045
|
-
*
|
|
11288
|
+
* Defines the layout of an element.
|
|
11289
|
+
* @default {'default'}
|
|
11290
|
+
*/
|
|
11291
|
+
layout: {
|
|
11292
|
+
type: String,
|
|
11293
|
+
attribute: "layout",
|
|
11294
|
+
reflect: true
|
|
11295
|
+
},
|
|
11296
|
+
|
|
11297
|
+
/**
|
|
11298
|
+
* Defines the shape of an element.
|
|
11299
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
11300
|
+
* @default {'default'}
|
|
11301
|
+
*/
|
|
11302
|
+
shape: {
|
|
11303
|
+
type: String,
|
|
11304
|
+
attribute: "shape",
|
|
11305
|
+
reflect: true
|
|
11306
|
+
},
|
|
11307
|
+
|
|
11308
|
+
/**
|
|
11309
|
+
* Defines the size of an element.
|
|
11310
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
11311
|
+
* @default {'md'}
|
|
11312
|
+
*/
|
|
11313
|
+
size: {
|
|
11314
|
+
type: String,
|
|
11315
|
+
attribute: "size",
|
|
11316
|
+
reflect: true
|
|
11317
|
+
},
|
|
11318
|
+
|
|
11319
|
+
/**
|
|
11320
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
11321
|
+
* @default {false}
|
|
11046
11322
|
*/
|
|
11047
11323
|
onDark: {
|
|
11048
11324
|
type: Boolean,
|
|
11325
|
+
attribute: "ondark",
|
|
11049
11326
|
reflect: true
|
|
11050
11327
|
},
|
|
11051
11328
|
|
|
11052
11329
|
/**
|
|
11330
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
11331
|
+
* This is used to apply layout and shape classes dynamically.
|
|
11332
|
+
* @type {HTMLElement|null}
|
|
11333
|
+
* @default {null}
|
|
11053
11334
|
* @private
|
|
11054
11335
|
*/
|
|
11055
|
-
|
|
11336
|
+
wrapper: {
|
|
11337
|
+
type: HTMLElement,
|
|
11056
11338
|
attribute: false,
|
|
11057
|
-
reflect:
|
|
11339
|
+
reflect: false
|
|
11058
11340
|
}
|
|
11059
11341
|
};
|
|
11060
11342
|
}
|
|
11061
11343
|
|
|
11062
|
-
|
|
11063
|
-
|
|
11064
|
-
|
|
11065
|
-
|
|
11344
|
+
|
|
11345
|
+
|
|
11346
|
+
resetShapeClasses() {
|
|
11347
|
+
if (this.shape && this.size) {
|
|
11348
|
+
|
|
11349
|
+
if (this.wrapper) {
|
|
11350
|
+
this.wrapper.classList.forEach((className) => {
|
|
11351
|
+
if (className.startsWith('shape-')) {
|
|
11352
|
+
this.wrapper.classList.remove(className);
|
|
11353
|
+
}
|
|
11354
|
+
});
|
|
11355
|
+
|
|
11356
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
11357
|
+
}
|
|
11358
|
+
}
|
|
11066
11359
|
}
|
|
11067
11360
|
|
|
11068
|
-
|
|
11069
|
-
|
|
11070
|
-
|
|
11071
|
-
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
|
|
11075
|
-
|
|
11076
|
-
let iconHTML = '';
|
|
11361
|
+
resetLayoutClasses() {
|
|
11362
|
+
if (this.layout) {
|
|
11363
|
+
if (this.wrapper) {
|
|
11364
|
+
this.wrapper.classList.forEach((className) => {
|
|
11365
|
+
if (className.startsWith('layout-')) {
|
|
11366
|
+
this.wrapper.classList.remove(className);
|
|
11367
|
+
}
|
|
11368
|
+
});
|
|
11077
11369
|
|
|
11078
|
-
|
|
11079
|
-
|
|
11080
|
-
} else {
|
|
11081
|
-
iconHTML = await cacheFetch$3(`${this.uri}/icons/${category}/${name}.svg`);
|
|
11370
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
11371
|
+
}
|
|
11082
11372
|
}
|
|
11373
|
+
}
|
|
11083
11374
|
|
|
11084
|
-
|
|
11375
|
+
updateComponentArchitecture() {
|
|
11376
|
+
this.resetLayoutClasses();
|
|
11377
|
+
this.resetShapeClasses();
|
|
11378
|
+
}
|
|
11085
11379
|
|
|
11086
|
-
|
|
11380
|
+
updated(changedProperties) {
|
|
11381
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
11382
|
+
this.updateComponentArchitecture();
|
|
11383
|
+
}
|
|
11087
11384
|
}
|
|
11088
11385
|
|
|
11089
|
-
|
|
11090
|
-
|
|
11091
|
-
if (!this.customSvg) {
|
|
11092
|
-
const svg = await this.fetchIcon(this.category, this.name);
|
|
11386
|
+
firstUpdated() {
|
|
11387
|
+
super.firstUpdated();
|
|
11093
11388
|
|
|
11094
|
-
|
|
11095
|
-
|
|
11096
|
-
} else if (!svg) {
|
|
11097
|
-
const penDOM = new DOMParser().parseFromString(error$3.svg, 'text/html');
|
|
11389
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
11390
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
11098
11391
|
|
|
11099
|
-
|
|
11100
|
-
|
|
11392
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
11393
|
+
this.attributeWatcher = transportAllA11yAttributes$2({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
11394
|
+
}
|
|
11395
|
+
|
|
11396
|
+
disconnectedCallback() {
|
|
11397
|
+
super.disconnectedCallback();
|
|
11398
|
+
|
|
11399
|
+
// Cleanup the ARIA observer if it exists
|
|
11400
|
+
if (this.attributeWatcher) {
|
|
11401
|
+
this.attributeWatcher.cleanup();
|
|
11402
|
+
this.attributeWatcher = null;
|
|
11403
|
+
}
|
|
11404
|
+
}
|
|
11405
|
+
|
|
11406
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
11407
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
11408
|
+
render() {
|
|
11409
|
+
try {
|
|
11410
|
+
return this.renderLayout();
|
|
11411
|
+
} catch (error) {
|
|
11412
|
+
// failed to get the defined layout
|
|
11413
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
11414
|
+
|
|
11415
|
+
// fallback to the default layout
|
|
11416
|
+
return this.getLayout('default');
|
|
11101
11417
|
}
|
|
11102
11418
|
}
|
|
11103
11419
|
};
|
|
11104
11420
|
|
|
11105
|
-
var
|
|
11421
|
+
var styleCss$3$1 = css`: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}`;
|
|
11106
11422
|
|
|
11107
|
-
var colorCss$8 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
11423
|
+
var colorCss$2$2 = css`[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)}`;
|
|
11424
|
+
|
|
11425
|
+
var tokensCss$2$2 = css`: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}`;
|
|
11426
|
+
|
|
11427
|
+
var shapeSize$2 = css`.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}`;
|
|
11108
11428
|
|
|
11109
11429
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11110
11430
|
// See LICENSE in the project root for license information.
|
|
@@ -11113,7 +11433,7 @@ var colorCss$8 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
11113
11433
|
|
|
11114
11434
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11115
11435
|
|
|
11116
|
-
let AuroLibraryRuntimeUtils$
|
|
11436
|
+
let AuroLibraryRuntimeUtils$2$2 = class AuroLibraryRuntimeUtils {
|
|
11117
11437
|
|
|
11118
11438
|
/* eslint-disable jsdoc/require-param */
|
|
11119
11439
|
|
|
@@ -11176,19 +11496,696 @@ let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
|
11176
11496
|
}
|
|
11177
11497
|
};
|
|
11178
11498
|
|
|
11179
|
-
|
|
11499
|
+
var styleCss$2$2 = css`: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}}`;
|
|
11500
|
+
|
|
11501
|
+
var colorCss$1$2 = css`: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}`;
|
|
11502
|
+
|
|
11503
|
+
var tokensCss$1$2 = css`:host{--ds-auro-loader-background-color:currentcolor;--ds-auro-loader-border-color:currentcolor;--ds-auro-loader-color:currentcolor}`;
|
|
11504
|
+
|
|
11505
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11180
11506
|
// See LICENSE in the project root for license information.
|
|
11181
11507
|
|
|
11182
11508
|
|
|
11183
|
-
let
|
|
11509
|
+
let AuroLoader$2 = class AuroLoader extends LitElement {
|
|
11184
11510
|
constructor() {
|
|
11185
11511
|
super();
|
|
11186
11512
|
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11513
|
+
/**
|
|
11514
|
+
* @private
|
|
11515
|
+
*/
|
|
11516
|
+
this.keys = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
11517
|
+
|
|
11518
|
+
/**
|
|
11519
|
+
* @private
|
|
11520
|
+
*/
|
|
11521
|
+
this.mdCount = 3;
|
|
11522
|
+
|
|
11523
|
+
/**
|
|
11524
|
+
* @private
|
|
11525
|
+
*/
|
|
11526
|
+
this.smCount = 2;
|
|
11527
|
+
|
|
11528
|
+
/**
|
|
11529
|
+
* @private
|
|
11530
|
+
*/
|
|
11531
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$2();
|
|
11532
|
+
|
|
11533
|
+
this.orbit = false;
|
|
11534
|
+
this.ringworm = false;
|
|
11535
|
+
this.laser = false;
|
|
11536
|
+
this.pulse = false;
|
|
11537
|
+
}
|
|
11538
|
+
|
|
11539
|
+
// function to define props used within the scope of this component
|
|
11540
|
+
static get properties() {
|
|
11541
|
+
return {
|
|
11542
|
+
|
|
11543
|
+
/**
|
|
11544
|
+
* Sets loader to laser type.
|
|
11545
|
+
*/
|
|
11546
|
+
laser: {
|
|
11547
|
+
type: Boolean,
|
|
11548
|
+
reflect: true
|
|
11549
|
+
},
|
|
11550
|
+
|
|
11551
|
+
/**
|
|
11552
|
+
* Sets loader to orbit type.
|
|
11553
|
+
*/
|
|
11554
|
+
orbit: {
|
|
11555
|
+
type: Boolean,
|
|
11556
|
+
reflect: true
|
|
11557
|
+
},
|
|
11558
|
+
|
|
11559
|
+
/**
|
|
11560
|
+
* Sets loader to pulse type.
|
|
11561
|
+
*/
|
|
11562
|
+
pulse: {
|
|
11563
|
+
type: Boolean,
|
|
11564
|
+
reflect: true
|
|
11565
|
+
},
|
|
11566
|
+
|
|
11567
|
+
/**
|
|
11568
|
+
* Sets loader to ringworm type.
|
|
11569
|
+
*/
|
|
11570
|
+
ringworm: {
|
|
11571
|
+
type: Boolean,
|
|
11572
|
+
reflect: true
|
|
11573
|
+
}
|
|
11574
|
+
};
|
|
11575
|
+
}
|
|
11576
|
+
|
|
11577
|
+
static get styles() {
|
|
11578
|
+
return [
|
|
11579
|
+
css`${styleCss$2$2}`,
|
|
11580
|
+
css`${colorCss$1$2}`,
|
|
11581
|
+
css`${tokensCss$1$2}`
|
|
11582
|
+
];
|
|
11583
|
+
}
|
|
11584
|
+
|
|
11585
|
+
/**
|
|
11586
|
+
* This will register this element with the browser.
|
|
11587
|
+
* @param {string} [name="auro-loader"] - The name of element that you want to register to.
|
|
11588
|
+
*
|
|
11589
|
+
* @example
|
|
11590
|
+
* AuroLoader.register("custom-loader") // this will register this element to <custom-loader/>
|
|
11591
|
+
*
|
|
11592
|
+
*/
|
|
11593
|
+
static register(name = "auro-loader") {
|
|
11594
|
+
AuroLibraryRuntimeUtils$2$2.prototype.registerComponent(name, AuroLoader);
|
|
11595
|
+
}
|
|
11596
|
+
|
|
11597
|
+
firstUpdated() {
|
|
11598
|
+
// Add the tag name as an attribute if it is different than the component name
|
|
11599
|
+
this.runtimeUtils.handleComponentTagRename(this, 'auro-loader');
|
|
11600
|
+
}
|
|
11601
|
+
|
|
11602
|
+
connectedCallback() {
|
|
11603
|
+
super.connectedCallback();
|
|
11604
|
+
}
|
|
11605
|
+
|
|
11606
|
+
/**
|
|
11607
|
+
* @private
|
|
11608
|
+
* @returns {Array} Numbered array for template map.
|
|
11609
|
+
*/
|
|
11610
|
+
defineTemplate() {
|
|
11611
|
+
let nodes = Array.from(Array(this.mdCount).keys());
|
|
11612
|
+
|
|
11613
|
+
if (this.orbit || this.laser) {
|
|
11614
|
+
nodes = Array.from(Array(this.smCount).keys());
|
|
11615
|
+
} else if (this.ringworm) {
|
|
11616
|
+
nodes = Array.from(Array(0).keys());
|
|
11617
|
+
}
|
|
11618
|
+
|
|
11619
|
+
return nodes;
|
|
11620
|
+
}
|
|
11621
|
+
|
|
11622
|
+
// When using auroElement, use the following attribute and function when hiding content from screen readers.
|
|
11623
|
+
// aria-hidden="${this.hideAudible(this.hiddenAudible)}"
|
|
11624
|
+
|
|
11625
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
11626
|
+
render() {
|
|
11627
|
+
return html`
|
|
11628
|
+
${this.defineTemplate().map((idx) => html`
|
|
11629
|
+
<span part="element" class="loader node-${idx}"></span>
|
|
11630
|
+
`)}
|
|
11631
|
+
|
|
11632
|
+
<div class="no-animation">Loading...</div>
|
|
11633
|
+
|
|
11634
|
+
${this.ringworm ? html`
|
|
11635
|
+
<svg part="element" class="circular" viewBox="25 25 50 50">
|
|
11636
|
+
<circle class="path" cx="50" cy="50" r="20" fill="none"/>
|
|
11637
|
+
</svg>`
|
|
11638
|
+
: ``
|
|
11639
|
+
}
|
|
11640
|
+
`;
|
|
11641
|
+
}
|
|
11642
|
+
};
|
|
11643
|
+
|
|
11644
|
+
var loaderVersion$2 = '5.0.0';
|
|
11645
|
+
|
|
11646
|
+
/* eslint-disable max-lines, curly */
|
|
11647
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11648
|
+
// See LICENSE in the project root for license information.
|
|
11649
|
+
|
|
11650
|
+
|
|
11651
|
+
/**
|
|
11652
|
+
* @slot - Default slot for the text of the button.
|
|
11653
|
+
* @slot icon - Slot to provide auro-icon for the button.
|
|
11654
|
+
* @csspart button - Apply CSS to HTML5 button.
|
|
11655
|
+
* @csspart loader - Apply CSS to auro-loader.
|
|
11656
|
+
* @csspart text - Apply CSS to text slot.
|
|
11657
|
+
* @csspart icon - Apply CSS to icon slot.
|
|
11658
|
+
*/
|
|
11659
|
+
|
|
11660
|
+
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
11661
|
+
|
|
11662
|
+
const ICON_ONLY_SHAPES$2 = ['circle'];
|
|
11663
|
+
|
|
11664
|
+
/**
|
|
11665
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
11666
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
11667
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
11668
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
11669
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
11670
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
11671
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
11672
|
+
*/
|
|
11673
|
+
let AuroButton$2 = class AuroButton extends AuroElement$1$3 {
|
|
11674
|
+
|
|
11675
|
+
/**
|
|
11676
|
+
* Enables form association for this element.
|
|
11677
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals
|
|
11678
|
+
* @returns {boolean} - Returns true to enable form association.
|
|
11679
|
+
*/
|
|
11680
|
+
static get formAssociated() {
|
|
11681
|
+
return true;
|
|
11682
|
+
}
|
|
11683
|
+
|
|
11684
|
+
constructor() {
|
|
11685
|
+
super();
|
|
11686
|
+
this.autofocus = false;
|
|
11687
|
+
this.disabled = false;
|
|
11688
|
+
this.loading = false;
|
|
11689
|
+
this.size = "md";
|
|
11690
|
+
this.shape = "rounded";
|
|
11691
|
+
this.onDark = false;
|
|
11692
|
+
this.fluid = false;
|
|
11693
|
+
this.loadingText = this.loadingText || 'Loading...';
|
|
11694
|
+
|
|
11695
|
+
// Support for HTML5 forms
|
|
11696
|
+
if (typeof this.attachInternals === 'function') {
|
|
11697
|
+
this.internals = this.attachInternals();
|
|
11698
|
+
} else {
|
|
11699
|
+
this.internals = null;
|
|
11700
|
+
|
|
11701
|
+
// eslint-disable-next-line no-console
|
|
11702
|
+
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.');
|
|
11703
|
+
}
|
|
11704
|
+
|
|
11705
|
+
/**
|
|
11706
|
+
* Generate unique names for dependency components.
|
|
11707
|
+
*/
|
|
11708
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
11709
|
+
|
|
11710
|
+
/**
|
|
11711
|
+
* @private
|
|
11712
|
+
*/
|
|
11713
|
+
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion$2, AuroLoader$2);
|
|
11714
|
+
}
|
|
11715
|
+
|
|
11716
|
+
static get styles() {
|
|
11717
|
+
return [
|
|
11718
|
+
tokensCss$2$2,
|
|
11719
|
+
styleCss$3$1,
|
|
11720
|
+
colorCss$2$2,
|
|
11721
|
+
shapeSize$2
|
|
11722
|
+
];
|
|
11723
|
+
}
|
|
11724
|
+
|
|
11725
|
+
static get properties() {
|
|
11726
|
+
return {
|
|
11727
|
+
|
|
11728
|
+
...super.properties,
|
|
11729
|
+
|
|
11730
|
+
/**
|
|
11731
|
+
* Override layout since it isn't used in this component.
|
|
11732
|
+
* @private
|
|
11733
|
+
*/
|
|
11734
|
+
layout: {
|
|
11735
|
+
type: Boolean,
|
|
11736
|
+
attribute: false,
|
|
11737
|
+
reflect: false
|
|
11738
|
+
},
|
|
11739
|
+
|
|
11740
|
+
/**
|
|
11741
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
11742
|
+
*/
|
|
11743
|
+
autofocus: {
|
|
11744
|
+
type: Boolean,
|
|
11745
|
+
reflect: true
|
|
11746
|
+
},
|
|
11747
|
+
|
|
11748
|
+
/**
|
|
11749
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
11750
|
+
*/
|
|
11751
|
+
disabled: {
|
|
11752
|
+
type: Boolean,
|
|
11753
|
+
reflect: true
|
|
11754
|
+
},
|
|
11755
|
+
|
|
11756
|
+
/**
|
|
11757
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
11758
|
+
*/
|
|
11759
|
+
fluid: {
|
|
11760
|
+
type: Boolean,
|
|
11761
|
+
reflect: true
|
|
11762
|
+
},
|
|
11763
|
+
|
|
11764
|
+
/**
|
|
11765
|
+
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
11766
|
+
*/
|
|
11767
|
+
loading: {
|
|
11768
|
+
type: Boolean,
|
|
11769
|
+
reflect: true
|
|
11770
|
+
},
|
|
11771
|
+
|
|
11772
|
+
/**
|
|
11773
|
+
* 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.
|
|
11774
|
+
*/
|
|
11775
|
+
loadingText: {
|
|
11776
|
+
type: String
|
|
11777
|
+
},
|
|
11778
|
+
|
|
11779
|
+
/**
|
|
11780
|
+
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
11781
|
+
*/
|
|
11782
|
+
tIndex: {
|
|
11783
|
+
type: String,
|
|
11784
|
+
reflect: true
|
|
11785
|
+
},
|
|
11786
|
+
|
|
11787
|
+
/**
|
|
11788
|
+
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
11789
|
+
*/
|
|
11790
|
+
title: {
|
|
11791
|
+
type: String,
|
|
11792
|
+
reflect: true
|
|
11793
|
+
},
|
|
11794
|
+
|
|
11795
|
+
/**
|
|
11796
|
+
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
11797
|
+
*/
|
|
11798
|
+
type: {
|
|
11799
|
+
type: String,
|
|
11800
|
+
reflect: true
|
|
11801
|
+
},
|
|
11802
|
+
|
|
11803
|
+
/**
|
|
11804
|
+
* Defines the value associated with the button which is submitted with the form data.
|
|
11805
|
+
*/
|
|
11806
|
+
value: {
|
|
11807
|
+
type: String,
|
|
11808
|
+
reflect: true
|
|
11809
|
+
},
|
|
11810
|
+
|
|
11811
|
+
/**
|
|
11812
|
+
* Sets button variant option.
|
|
11813
|
+
* @default primary
|
|
11814
|
+
*/
|
|
11815
|
+
variant: {
|
|
11816
|
+
type: String,
|
|
11817
|
+
reflect: true
|
|
11818
|
+
},
|
|
11819
|
+
};
|
|
11820
|
+
}
|
|
11821
|
+
|
|
11822
|
+
/**
|
|
11823
|
+
* This will register this element with the browser.
|
|
11824
|
+
* @param {string} [name="auro-button"] - The name of element that you want to register to.
|
|
11825
|
+
*
|
|
11826
|
+
* @example
|
|
11827
|
+
* AuroButton.register("custom-button") // this will register this element to <custom-button/>
|
|
11828
|
+
*
|
|
11829
|
+
*/
|
|
11830
|
+
static register(name = "auro-button") {
|
|
11831
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroButton);
|
|
11832
|
+
}
|
|
11833
|
+
|
|
11834
|
+
/**
|
|
11835
|
+
* Internal method to apply focus to the HTML5 button.
|
|
11836
|
+
* @private
|
|
11837
|
+
* @returns {void}
|
|
11838
|
+
*/
|
|
11839
|
+
focus() {
|
|
11840
|
+
this.renderRoot.querySelector('button').focus();
|
|
11841
|
+
}
|
|
11842
|
+
|
|
11843
|
+
/**
|
|
11844
|
+
* Submits the form that this button is associated with.
|
|
11845
|
+
* @private
|
|
11846
|
+
* @returns {void}
|
|
11847
|
+
*/
|
|
11848
|
+
surfaceSubmitEvent() {
|
|
11849
|
+
if (this.form) {
|
|
11850
|
+
this.form.requestSubmit();
|
|
11851
|
+
}
|
|
11852
|
+
}
|
|
11853
|
+
|
|
11854
|
+
/**
|
|
11855
|
+
* Returns the form element that this button is associated with.
|
|
11856
|
+
* @private
|
|
11857
|
+
* @returns {HTMLFormElement | null}
|
|
11858
|
+
*/
|
|
11859
|
+
get form() {
|
|
11860
|
+
return this.internals ? this.internals.form : null;
|
|
11861
|
+
}
|
|
11862
|
+
|
|
11863
|
+
/**
|
|
11864
|
+
* @private
|
|
11865
|
+
* @returns {Boolean}
|
|
11866
|
+
*/
|
|
11867
|
+
get hideText() {
|
|
11868
|
+
return ICON_ONLY_SHAPES$2.includes(this.shape);
|
|
11869
|
+
}
|
|
11870
|
+
|
|
11871
|
+
/**
|
|
11872
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
11873
|
+
* @returns {string | undefined}
|
|
11874
|
+
* @private
|
|
11875
|
+
*/
|
|
11876
|
+
get currentAriaLabel() {
|
|
11877
|
+
if (!this.attributeWatcher) return undefined;
|
|
11878
|
+
|
|
11879
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
11880
|
+
return ariaLabel || undefined;
|
|
11881
|
+
}
|
|
11882
|
+
|
|
11883
|
+
/**
|
|
11884
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
11885
|
+
* @returns {string | undefined}
|
|
11886
|
+
* @private
|
|
11887
|
+
*/
|
|
11888
|
+
get currentAriaLabelledBy() {
|
|
11889
|
+
if (!this.attributeWatcher) return undefined;
|
|
11890
|
+
|
|
11891
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
11892
|
+
return ariaLabelledBy || undefined;
|
|
11893
|
+
}
|
|
11894
|
+
|
|
11895
|
+
/**
|
|
11896
|
+
* Renders the default layout for the button.
|
|
11897
|
+
* @returns {TemplateResult}
|
|
11898
|
+
* @private
|
|
11899
|
+
*/
|
|
11900
|
+
renderLayoutDefault() {
|
|
11901
|
+
const classes = {
|
|
11902
|
+
"util_insetLg--squish": true,
|
|
11903
|
+
"auro-button": true,
|
|
11904
|
+
wrapper: true,
|
|
11905
|
+
loading: this.loading,
|
|
11906
|
+
};
|
|
11907
|
+
|
|
11908
|
+
return html$1`
|
|
11909
|
+
<button
|
|
11910
|
+
part="button"
|
|
11911
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
11912
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
11913
|
+
tabIndex="${ifDefined(this.tIndex)}"
|
|
11914
|
+
?autofocus="${this.autofocus}"
|
|
11915
|
+
class="${classMap(classes)}"
|
|
11916
|
+
?disabled="${this.disabled || this.loading}"
|
|
11917
|
+
?onDark="${this.onDark}"
|
|
11918
|
+
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
11919
|
+
name="${ifDefined(this.name ? this.name : undefined)}"
|
|
11920
|
+
type="${ifDefined(this.type ? this.type : undefined)}"
|
|
11921
|
+
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
11922
|
+
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
11923
|
+
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
11924
|
+
>
|
|
11925
|
+
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
11926
|
+
|
|
11927
|
+
<span class="contentWrapper">
|
|
11928
|
+
<span class="textSlot" part="text">
|
|
11929
|
+
${this.hideText ? undefined : html$1`<slot></slot>`}
|
|
11930
|
+
</span>
|
|
11931
|
+
|
|
11932
|
+
<span part="icon">
|
|
11933
|
+
<slot name="icon"></slot>
|
|
11934
|
+
</span>
|
|
11935
|
+
</span>
|
|
11936
|
+
</button>
|
|
11937
|
+
`;
|
|
11938
|
+
}
|
|
11939
|
+
|
|
11940
|
+
/**
|
|
11941
|
+
* Renders the layout of the button
|
|
11942
|
+
* @returns {TemplateResult}
|
|
11943
|
+
* @private
|
|
11944
|
+
*/
|
|
11945
|
+
renderLayout() {
|
|
11946
|
+
return this.renderLayoutDefault();
|
|
11947
|
+
}
|
|
11948
|
+
};
|
|
11949
|
+
|
|
11950
|
+
var buttonVersion$2 = '10.0.0';
|
|
11951
|
+
|
|
11952
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
11953
|
+
// See LICENSE in the project root for license information.
|
|
11954
|
+
|
|
11955
|
+
|
|
11956
|
+
/**
|
|
11957
|
+
* @attr {Boolean} hidden - If present, the component will be hidden both visually and from screen readers
|
|
11958
|
+
* @attr {Boolean} hiddenVisually - If present, the component will be hidden visually, but still read by screen readers
|
|
11959
|
+
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
11960
|
+
*/
|
|
11961
|
+
|
|
11962
|
+
let AuroElement$6 = class AuroElement extends LitElement {
|
|
11963
|
+
|
|
11964
|
+
// function to define props used within the scope of this component
|
|
11965
|
+
static get properties() {
|
|
11966
|
+
return {
|
|
11967
|
+
hidden: { type: Boolean,
|
|
11968
|
+
reflect: true },
|
|
11969
|
+
hiddenVisually: { type: Boolean,
|
|
11970
|
+
reflect: true },
|
|
11971
|
+
hiddenAudible: { type: Boolean,
|
|
11972
|
+
reflect: true },
|
|
11973
|
+
};
|
|
11974
|
+
}
|
|
11975
|
+
|
|
11976
|
+
/**
|
|
11977
|
+
* @private Function that determines state of aria-hidden
|
|
11978
|
+
*/
|
|
11979
|
+
hideAudible(value) {
|
|
11980
|
+
if (value) {
|
|
11981
|
+
return 'true'
|
|
11982
|
+
}
|
|
11983
|
+
|
|
11984
|
+
return 'false'
|
|
11985
|
+
}
|
|
11986
|
+
};
|
|
11987
|
+
|
|
11988
|
+
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>"};
|
|
11989
|
+
|
|
11990
|
+
/* eslint-disable no-underscore-dangle, jsdoc/no-undefined-types, jsdoc/require-param-description */
|
|
11991
|
+
|
|
11992
|
+
const _fetchMap$3 = new Map();
|
|
11993
|
+
|
|
11994
|
+
/**
|
|
11995
|
+
* A callback to parse Response body.
|
|
11996
|
+
*
|
|
11997
|
+
* @callback ResponseParser
|
|
11998
|
+
* @param {Fetch.Response} response
|
|
11999
|
+
* @returns {Promise}
|
|
12000
|
+
*/
|
|
12001
|
+
|
|
12002
|
+
/**
|
|
12003
|
+
* A minimal in-memory map to de-duplicate Fetch API media requests.
|
|
12004
|
+
*
|
|
12005
|
+
* @param {String} uri
|
|
12006
|
+
* @param {Object} [options={}]
|
|
12007
|
+
* @param {ResponseParser} [options.responseParser=(response) => response.text()]
|
|
12008
|
+
* @returns {Promise}
|
|
12009
|
+
*/
|
|
12010
|
+
const cacheFetch$3 = (uri, options = {}) => {
|
|
12011
|
+
const responseParser = options.responseParser || ((response) => response.text());
|
|
12012
|
+
if (!_fetchMap$3.has(uri)) {
|
|
12013
|
+
_fetchMap$3.set(uri, fetch(uri).then(responseParser));
|
|
12014
|
+
}
|
|
12015
|
+
return _fetchMap$3.get(uri);
|
|
12016
|
+
};
|
|
12017
|
+
|
|
12018
|
+
var styleCss$1$2 = css`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
12019
|
+
|
|
12020
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12021
|
+
// See LICENSE in the project root for license information.
|
|
12022
|
+
|
|
12023
|
+
|
|
12024
|
+
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
12025
|
+
/**
|
|
12026
|
+
* @slot - Hidden from visibility, used for a11y if icon description is needed
|
|
12027
|
+
*/
|
|
12028
|
+
|
|
12029
|
+
// build the component class
|
|
12030
|
+
let BaseIcon$3 = class BaseIcon extends AuroElement$6 {
|
|
12031
|
+
constructor() {
|
|
12032
|
+
super();
|
|
12033
|
+
this.onDark = false;
|
|
12034
|
+
}
|
|
12035
|
+
|
|
12036
|
+
// function to define props used within the scope of this component
|
|
12037
|
+
static get properties() {
|
|
12038
|
+
return {
|
|
12039
|
+
...super.properties,
|
|
12040
|
+
|
|
12041
|
+
/**
|
|
12042
|
+
* Set value for on-dark version of auro-icon.
|
|
12043
|
+
*/
|
|
12044
|
+
onDark: {
|
|
12045
|
+
type: Boolean,
|
|
12046
|
+
reflect: true
|
|
12047
|
+
},
|
|
12048
|
+
|
|
12049
|
+
/**
|
|
12050
|
+
* @private
|
|
12051
|
+
*/
|
|
12052
|
+
svg: {
|
|
12053
|
+
attribute: false,
|
|
12054
|
+
reflect: true
|
|
12055
|
+
}
|
|
12056
|
+
};
|
|
12057
|
+
}
|
|
12058
|
+
|
|
12059
|
+
static get styles() {
|
|
12060
|
+
return css`
|
|
12061
|
+
${styleCss$1$2}
|
|
12062
|
+
`;
|
|
12063
|
+
}
|
|
12064
|
+
|
|
12065
|
+
/**
|
|
12066
|
+
* Async function to fetch requested icon from npm CDN.
|
|
12067
|
+
* @private
|
|
12068
|
+
* @param {string} category - Icon category.
|
|
12069
|
+
* @param {string} name - Icon name.
|
|
12070
|
+
* @returns {SVGElement} DOM - Ready HTML to be appended.
|
|
12071
|
+
*/
|
|
12072
|
+
async fetchIcon(category, name) {
|
|
12073
|
+
let iconHTML = '';
|
|
12074
|
+
|
|
12075
|
+
if (category === 'logos') {
|
|
12076
|
+
iconHTML = await cacheFetch$3(`${this.uri}/${category}/${name}.svg`);
|
|
12077
|
+
} else {
|
|
12078
|
+
iconHTML = await cacheFetch$3(`${this.uri}/icons/${category}/${name}.svg`);
|
|
12079
|
+
}
|
|
12080
|
+
|
|
12081
|
+
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');
|
|
12082
|
+
|
|
12083
|
+
return dom.body.querySelector('svg');
|
|
12084
|
+
}
|
|
12085
|
+
|
|
12086
|
+
// lifecycle function
|
|
12087
|
+
async firstUpdated() {
|
|
12088
|
+
if (!this.customSvg) {
|
|
12089
|
+
const svg = await this.fetchIcon(this.category, this.name);
|
|
12090
|
+
|
|
12091
|
+
if (svg) {
|
|
12092
|
+
this.svg = svg;
|
|
12093
|
+
} else if (!svg) {
|
|
12094
|
+
const penDOM = new DOMParser().parseFromString(error$3.svg, 'text/html');
|
|
12095
|
+
|
|
12096
|
+
this.svg = penDOM.body.firstChild;
|
|
12097
|
+
}
|
|
12098
|
+
}
|
|
12099
|
+
}
|
|
12100
|
+
};
|
|
12101
|
+
|
|
12102
|
+
var tokensCss$9 = css`:host{--ds-auro-icon-color:var(--ds-basic-color-texticon-default, #2a2a2a);--ds-auro-alaska-color:#02426D;--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
12103
|
+
|
|
12104
|
+
var colorCss$8 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[variant=accent1]){--ds-auro-icon-color:var(--ds-basic-color-texticon-accent1, #265688)}:host(:not([onDark])[variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-disabled, #d0d0d0)}:host(:not([onDark])[variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-muted, #676767)}:host(:not([onDark])[variant=statusDefault]){--ds-auro-icon-color:var(--ds-basic-color-status-default, #afb9c6)}:host(:not([onDark])[variant=statusInfo]){--ds-auro-icon-color:var(--ds-basic-color-status-info, #01426a)}:host(:not([onDark])[variant=statusSuccess]){--ds-auro-icon-color:var(--ds-basic-color-status-success, #447a1f)}:host(:not([onDark])[variant=statusWarning]){--ds-auro-icon-color:var(--ds-basic-color-status-warning, #fac200)}:host(:not([onDark])[variant=statusError]){--ds-auro-icon-color:var(--ds-basic-color-status-error, #e31f26)}:host(:not([onDark])[variant=statusInfoSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-info-subtle, #ebf3f9)}:host(:not([onDark])[variant=statusSuccessSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-success-subtle, #d6eac7)}:host(:not([onDark])[variant=statusWarningSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-warning-subtle, #fff0b2)}:host(:not([onDark])[variant=statusErrorSubtle]){--ds-auro-icon-color:var(--ds-basic-color-status-error-subtle, #fbc6c6)}:host(:not([onDark])[variant=fareBasicEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-basiceconomy, #97eaf8)}:host(:not([onDark])[variant=fareBusiness]){--ds-auro-icon-color:var(--ds-basic-color-fare-business, #01426a)}:host(:not([onDark])[variant=fareEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-economy, #0074ca)}:host(:not([onDark])[variant=fareFirst]){--ds-auro-icon-color:var(--ds-basic-color-fare-first, #00274a)}:host(:not([onDark])[variant=farePremiumEconomy]){--ds-auro-icon-color:var(--ds-basic-color-fare-premiumeconomy, #005154)}:host(:not([onDark])[variant=tierOneWorldEmerald]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-emerald, #139142)}:host(:not([onDark])[variant=tierOneWorldSapphire]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-sapphire, #015daa)}:host(:not([onDark])[variant=tierOneWorldRuby]){--ds-auro-icon-color:var(--ds-basic-color-tier-program-oneworld-ruby, #a41d4a)}:host([onDark]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse, #ffffff)}:host([onDark][variant=disabled]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-disabled, #7e8894)}:host([onDark][variant=muted]){--ds-auro-icon-color:var(--ds-basic-color-texticon-inverse-muted, #ccd2db)}:host([onDark][variant=statusError]){--ds-auro-icon-color:var(--ds-advanced-color-state-error-inverse, #f9a4a8)}`;
|
|
12105
|
+
|
|
12106
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12107
|
+
// See LICENSE in the project root for license information.
|
|
12108
|
+
|
|
12109
|
+
// ---------------------------------------------------------------------
|
|
12110
|
+
|
|
12111
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
12112
|
+
|
|
12113
|
+
let AuroLibraryRuntimeUtils$1$2 = class AuroLibraryRuntimeUtils {
|
|
12114
|
+
|
|
12115
|
+
/* eslint-disable jsdoc/require-param */
|
|
12116
|
+
|
|
12117
|
+
/**
|
|
12118
|
+
* This will register a new custom element with the browser.
|
|
12119
|
+
* @param {String} name - The name of the custom element.
|
|
12120
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
12121
|
+
* @returns {void}
|
|
12122
|
+
*/
|
|
12123
|
+
registerComponent(name, componentClass) {
|
|
12124
|
+
if (!customElements.get(name)) {
|
|
12125
|
+
customElements.define(name, class extends componentClass {});
|
|
12126
|
+
}
|
|
12127
|
+
}
|
|
12128
|
+
|
|
12129
|
+
/**
|
|
12130
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
12131
|
+
* @returns {void}
|
|
12132
|
+
*/
|
|
12133
|
+
closestElement(
|
|
12134
|
+
selector, // selector like in .closest()
|
|
12135
|
+
base = this, // extra functionality to skip a parent
|
|
12136
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
12137
|
+
!el || el === document || el === window
|
|
12138
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
12139
|
+
: found
|
|
12140
|
+
? found // found a selector INside this element
|
|
12141
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
12142
|
+
) {
|
|
12143
|
+
return __Closest(base);
|
|
12144
|
+
}
|
|
12145
|
+
/* eslint-enable jsdoc/require-param */
|
|
12146
|
+
|
|
12147
|
+
/**
|
|
12148
|
+
* 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.
|
|
12149
|
+
* @param {Object} elem - The element to check.
|
|
12150
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
12151
|
+
* @returns {void}
|
|
12152
|
+
*/
|
|
12153
|
+
handleComponentTagRename(elem, tagName) {
|
|
12154
|
+
const tag = tagName.toLowerCase();
|
|
12155
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12156
|
+
|
|
12157
|
+
if (elemTag !== tag) {
|
|
12158
|
+
elem.setAttribute(tag, true);
|
|
12159
|
+
}
|
|
12160
|
+
}
|
|
12161
|
+
|
|
12162
|
+
/**
|
|
12163
|
+
* Validates if an element is a specific Auro component.
|
|
12164
|
+
* @param {Object} elem - The element to validate.
|
|
12165
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
12166
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
12167
|
+
*/
|
|
12168
|
+
elementMatch(elem, tagName) {
|
|
12169
|
+
const tag = tagName.toLowerCase();
|
|
12170
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
12171
|
+
|
|
12172
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
12173
|
+
}
|
|
12174
|
+
};
|
|
12175
|
+
|
|
12176
|
+
// Copyright (c) 2025 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
12177
|
+
// See LICENSE in the project root for license information.
|
|
12178
|
+
|
|
12179
|
+
|
|
12180
|
+
let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
12181
|
+
constructor() {
|
|
12182
|
+
super();
|
|
12183
|
+
|
|
12184
|
+
this.variant = undefined;
|
|
12185
|
+
this.privateDefaults();
|
|
12186
|
+
}
|
|
12187
|
+
|
|
12188
|
+
/**
|
|
11192
12189
|
* Internal Defaults.
|
|
11193
12190
|
* @private
|
|
11194
12191
|
* @returns {void}
|
|
@@ -11298,8 +12295,12 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
11298
12295
|
async firstUpdated() {
|
|
11299
12296
|
await super.firstUpdated();
|
|
11300
12297
|
|
|
11301
|
-
|
|
11302
|
-
|
|
12298
|
+
/**
|
|
12299
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
12300
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
12301
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
12302
|
+
*/
|
|
12303
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
11303
12304
|
const svgDesc = this.svg.querySelector('desc');
|
|
11304
12305
|
|
|
11305
12306
|
if (svgDesc) {
|
|
@@ -11343,7 +12344,7 @@ let AuroIcon$3 = class AuroIcon extends BaseIcon$3 {
|
|
|
11343
12344
|
}
|
|
11344
12345
|
};
|
|
11345
12346
|
|
|
11346
|
-
var iconVersion$3 = '8.0.
|
|
12347
|
+
var iconVersion$3 = '8.0.4';
|
|
11347
12348
|
|
|
11348
12349
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11349
12350
|
// See LICENSE in the project root for license information.
|
|
@@ -11352,7 +12353,7 @@ var iconVersion$3 = '8.0.3';
|
|
|
11352
12353
|
|
|
11353
12354
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11354
12355
|
|
|
11355
|
-
let AuroLibraryRuntimeUtils$
|
|
12356
|
+
let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
11356
12357
|
|
|
11357
12358
|
/* eslint-disable jsdoc/require-param */
|
|
11358
12359
|
|
|
@@ -11444,7 +12445,7 @@ class AuroHeader extends LitElement {
|
|
|
11444
12445
|
/**
|
|
11445
12446
|
* @private
|
|
11446
12447
|
*/
|
|
11447
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
12448
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$7();
|
|
11448
12449
|
}
|
|
11449
12450
|
|
|
11450
12451
|
// function to define props used within the scope of this component
|
|
@@ -11474,7 +12475,7 @@ class AuroHeader extends LitElement {
|
|
|
11474
12475
|
*
|
|
11475
12476
|
*/
|
|
11476
12477
|
static register(name = "auro-header") {
|
|
11477
|
-
AuroLibraryRuntimeUtils$
|
|
12478
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroHeader);
|
|
11478
12479
|
}
|
|
11479
12480
|
|
|
11480
12481
|
firstUpdated() {
|
|
@@ -11570,17 +12571,30 @@ class AuroBibtemplate extends LitElement {
|
|
|
11570
12571
|
|
|
11571
12572
|
this.large = false;
|
|
11572
12573
|
|
|
11573
|
-
AuroLibraryRuntimeUtils$
|
|
12574
|
+
AuroLibraryRuntimeUtils$3$1.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
12575
|
+
|
|
12576
|
+
const versioning = new AuroDependencyVersioning$2();
|
|
11574
12577
|
|
|
11575
|
-
|
|
12578
|
+
/**
|
|
12579
|
+
* @private
|
|
12580
|
+
*/
|
|
11576
12581
|
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$3, AuroIcon$3);
|
|
12582
|
+
|
|
12583
|
+
/**
|
|
12584
|
+
* @private
|
|
12585
|
+
*/
|
|
11577
12586
|
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
12587
|
+
|
|
12588
|
+
/**
|
|
12589
|
+
* @private
|
|
12590
|
+
*/
|
|
12591
|
+
this.buttonTag = versioning.generateTag('auro-formkit-input-button', buttonVersion$2, AuroButton$2);
|
|
11578
12592
|
}
|
|
11579
12593
|
|
|
11580
12594
|
static get styles() {
|
|
11581
12595
|
return [
|
|
11582
|
-
colorCss$
|
|
11583
|
-
styleCss$
|
|
12596
|
+
colorCss$3$2,
|
|
12597
|
+
styleCss$4$1,
|
|
11584
12598
|
tokenCss
|
|
11585
12599
|
];
|
|
11586
12600
|
}
|
|
@@ -11609,7 +12623,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
11609
12623
|
*
|
|
11610
12624
|
*/
|
|
11611
12625
|
static register(name = "auro-bibtemplate") {
|
|
11612
|
-
AuroLibraryRuntimeUtils$
|
|
12626
|
+
AuroLibraryRuntimeUtils$3$1.prototype.registerComponent(name, AuroBibtemplate);
|
|
11613
12627
|
}
|
|
11614
12628
|
|
|
11615
12629
|
/**
|
|
@@ -11641,173 +12655,531 @@ class AuroBibtemplate extends LitElement {
|
|
|
11641
12655
|
composed: true }));
|
|
11642
12656
|
}
|
|
11643
12657
|
|
|
11644
|
-
/**
|
|
11645
|
-
* Exposes CSS parts for styling from parent components.
|
|
11646
|
-
* @returns {void}
|
|
11647
|
-
*/
|
|
11648
|
-
exposeCssParts() {
|
|
11649
|
-
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
11650
|
-
}
|
|
12658
|
+
/**
|
|
12659
|
+
* Exposes CSS parts for styling from parent components.
|
|
12660
|
+
* @returns {void}
|
|
12661
|
+
*/
|
|
12662
|
+
exposeCssParts() {
|
|
12663
|
+
this.setAttribute('exportparts', 'bibtemplate:dropdownBibTemplate');
|
|
12664
|
+
}
|
|
12665
|
+
|
|
12666
|
+
firstUpdated(changedProperties) {
|
|
12667
|
+
super.firstUpdated(changedProperties);
|
|
12668
|
+
|
|
12669
|
+
this.dispatchEvent(new CustomEvent("auro-bibtemplate-connected", {
|
|
12670
|
+
bubbles: true,
|
|
12671
|
+
composed: true,
|
|
12672
|
+
detail: {
|
|
12673
|
+
element: this
|
|
12674
|
+
}
|
|
12675
|
+
}));
|
|
12676
|
+
}
|
|
12677
|
+
|
|
12678
|
+
// function that renders the HTML and CSS into the scope of the component
|
|
12679
|
+
render() {
|
|
12680
|
+
return html$1`
|
|
12681
|
+
<div id="bibTemplate" part="bibtemplate">
|
|
12682
|
+
${this.isFullscreen ? html$1`
|
|
12683
|
+
<div id="headerContainer">
|
|
12684
|
+
<${this.buttonTag} id="closeButton" variant="ghost" shape="circle" size="sm" @click="${this.onCloseButtonClick}">
|
|
12685
|
+
<${this.iconTag} category="interface" name="x-lg"></${this.iconTag}>
|
|
12686
|
+
</${this.buttonTag}>
|
|
12687
|
+
<${this.headerTag} display="${this.large ? 'display' : '600'}" level="3" size="none" id="header" no-margin-block>
|
|
12688
|
+
<slot name="header"></slot>
|
|
12689
|
+
</${this.headerTag}>
|
|
12690
|
+
<span id="subheader">
|
|
12691
|
+
<slot name="subheader"></slot>
|
|
12692
|
+
</span>
|
|
12693
|
+
</div>` : null}
|
|
12694
|
+
|
|
12695
|
+
<div id="bodyContainer">
|
|
12696
|
+
<slot></slot>
|
|
12697
|
+
</div>
|
|
12698
|
+
|
|
12699
|
+
${this.isFullscreen ? html$1`
|
|
12700
|
+
<div id="footerContainer">
|
|
12701
|
+
<slot name="footer"></slot>
|
|
12702
|
+
</div>` : null}
|
|
12703
|
+
</div>
|
|
12704
|
+
`;
|
|
12705
|
+
}
|
|
12706
|
+
}
|
|
12707
|
+
|
|
12708
|
+
var bibTemplateVersion = '1.0.0';
|
|
12709
|
+
|
|
12710
|
+
/**
|
|
12711
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
12712
|
+
*/
|
|
12713
|
+
const _observers$1 = new WeakMap();
|
|
12714
|
+
|
|
12715
|
+
/**
|
|
12716
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
12717
|
+
* Structure: {
|
|
12718
|
+
* host: {
|
|
12719
|
+
* matchers: Set<Function>,
|
|
12720
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
12721
|
+
* }
|
|
12722
|
+
* }
|
|
12723
|
+
*/
|
|
12724
|
+
const _transportConfig$1 = new WeakMap();
|
|
12725
|
+
|
|
12726
|
+
/**
|
|
12727
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
12728
|
+
*
|
|
12729
|
+
* @param {Object} params - The parameters for the function.
|
|
12730
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
12731
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
12732
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
12733
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
12734
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
12735
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
12736
|
+
*/
|
|
12737
|
+
const transportAttributes$1 = ({ host, target, match, removeOriginal = true }) => {
|
|
12738
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
12739
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
12740
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
12741
|
+
}
|
|
12742
|
+
|
|
12743
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
12744
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
12745
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
12746
|
+
}
|
|
12747
|
+
|
|
12748
|
+
// Guard Clause: Ensure match is a function
|
|
12749
|
+
if (typeof match !== 'function') {
|
|
12750
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
12751
|
+
}
|
|
12752
|
+
|
|
12753
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
12754
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
12755
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
12756
|
+
}
|
|
12757
|
+
|
|
12758
|
+
// Register this transport and get cleanup function
|
|
12759
|
+
return _registerTransport$1({
|
|
12760
|
+
host,
|
|
12761
|
+
target,
|
|
12762
|
+
matcher: match,
|
|
12763
|
+
removeOriginal
|
|
12764
|
+
});
|
|
12765
|
+
};
|
|
12766
|
+
|
|
12767
|
+
/**
|
|
12768
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
12769
|
+
*
|
|
12770
|
+
* @param {Object} params - The parameters object.
|
|
12771
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
12772
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
12773
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
12774
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
12775
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
12776
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
12777
|
+
* @private
|
|
12778
|
+
*/
|
|
12779
|
+
const _registerTransport$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
12780
|
+
// Initialize config for this host if it doesn't exist
|
|
12781
|
+
if (!_transportConfig$1.has(host)) {
|
|
12782
|
+
_transportConfig$1.set(host, {
|
|
12783
|
+
matchers: new Set(),
|
|
12784
|
+
targets: new Map()
|
|
12785
|
+
});
|
|
12786
|
+
}
|
|
12787
|
+
|
|
12788
|
+
const config = _transportConfig$1.get(host);
|
|
12789
|
+
|
|
12790
|
+
// Add the matcher to the set of matchers for this host
|
|
12791
|
+
config.matchers.add(matcher);
|
|
12792
|
+
|
|
12793
|
+
// Initialize target entry if it doesn't exist
|
|
12794
|
+
if (!config.targets.has(target)) {
|
|
12795
|
+
config.targets.set(target, new Map());
|
|
12796
|
+
}
|
|
12797
|
+
|
|
12798
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
12799
|
+
config.targets.get(target).set(matcher, {
|
|
12800
|
+
removeOriginal,
|
|
12801
|
+
currentAttributes: new Map()
|
|
12802
|
+
});
|
|
12803
|
+
|
|
12804
|
+
// Perform initial attribute transport
|
|
12805
|
+
_transportAttributes$1({ host, target, matcher, removeOriginal });
|
|
12806
|
+
|
|
12807
|
+
// Attach observer
|
|
12808
|
+
_attachObserver$1(host);
|
|
12809
|
+
|
|
12810
|
+
// Return cleanup function and utility functions
|
|
12811
|
+
return {
|
|
12812
|
+
cleanup: () => _cleanupTransport$1(host, target, matcher),
|
|
12813
|
+
getObservedAttributes: () => _getObservedAttributes$1(host, target, matcher),
|
|
12814
|
+
getObservedAttribute: (attr) => _getObservedAttribute$1(host, target, matcher, attr),
|
|
12815
|
+
}
|
|
12816
|
+
};
|
|
12817
|
+
|
|
12818
|
+
/**
|
|
12819
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
12820
|
+
*
|
|
12821
|
+
* @param {HTMLElement} host - The host element
|
|
12822
|
+
* @param {HTMLElement} target - The target element
|
|
12823
|
+
* @param {Function} matcher - The matcher function
|
|
12824
|
+
* @private
|
|
12825
|
+
*/
|
|
12826
|
+
const _cleanupTransport$1 = (host, target, matcher) => {
|
|
12827
|
+
const config = _transportConfig$1.get(host);
|
|
12828
|
+
if (!config) return;
|
|
12829
|
+
|
|
12830
|
+
// Remove this matcher from this target
|
|
12831
|
+
const targetMatchers = config.targets.get(target);
|
|
12832
|
+
if (targetMatchers) {
|
|
12833
|
+
targetMatchers.delete(matcher);
|
|
12834
|
+
|
|
12835
|
+
// If this target has no more matchers, remove it
|
|
12836
|
+
if (targetMatchers.size === 0) {
|
|
12837
|
+
config.targets.delete(target);
|
|
12838
|
+
}
|
|
12839
|
+
}
|
|
12840
|
+
|
|
12841
|
+
// Check if this matcher is still used by any target
|
|
12842
|
+
let matcherStillUsed = false;
|
|
12843
|
+
for (const matcherMap of config.targets.values()) {
|
|
12844
|
+
if (matcherMap.has(matcher)) {
|
|
12845
|
+
matcherStillUsed = true;
|
|
12846
|
+
break;
|
|
12847
|
+
}
|
|
12848
|
+
}
|
|
12849
|
+
|
|
12850
|
+
// If not used anymore, remove from matchers set
|
|
12851
|
+
if (!matcherStillUsed) {
|
|
12852
|
+
config.matchers.delete(matcher);
|
|
12853
|
+
}
|
|
12854
|
+
|
|
12855
|
+
// If no more targets or matchers, detach observer
|
|
12856
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
12857
|
+
_detachObserver$1(host);
|
|
12858
|
+
}
|
|
12859
|
+
};
|
|
12860
|
+
|
|
12861
|
+
/**
|
|
12862
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
12863
|
+
*
|
|
12864
|
+
* @param {Object} params - The parameters object.
|
|
12865
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
12866
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
12867
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
12868
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
12869
|
+
* @returns {void}
|
|
12870
|
+
* @private
|
|
12871
|
+
*/
|
|
12872
|
+
const _transportAttributes$1 = ({ host, target, matcher, removeOriginal = true }) => {
|
|
12873
|
+
// Get a list of all matching attributes on the host element and their values
|
|
12874
|
+
const matchingAttributes = host.getAttributeNames()
|
|
12875
|
+
.filter(attr => matcher(attr))
|
|
12876
|
+
.reduce((acc, attr) => {
|
|
12877
|
+
acc[attr] = host.getAttribute(attr);
|
|
12878
|
+
return acc;
|
|
12879
|
+
}, {});
|
|
12880
|
+
|
|
12881
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
12882
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
12883
|
+
_setObservedAttribute$1(host, target, matcher, key, value);
|
|
12884
|
+
target.setAttribute(key, value);
|
|
12885
|
+
if (removeOriginal) {
|
|
12886
|
+
host.removeAttribute(key);
|
|
12887
|
+
}
|
|
12888
|
+
});
|
|
12889
|
+
};
|
|
12890
|
+
|
|
12891
|
+
/**
|
|
12892
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
12893
|
+
*
|
|
12894
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
12895
|
+
* @returns {MutationObserver} The observer instance.
|
|
12896
|
+
* @private
|
|
12897
|
+
*/
|
|
12898
|
+
const _attachObserver$1 = (host) => {
|
|
12899
|
+
// If an observer for this host already exists, return it
|
|
12900
|
+
if (_observers$1.has(host)) {
|
|
12901
|
+
return _observers$1.get(host);
|
|
12902
|
+
}
|
|
12903
|
+
|
|
12904
|
+
// Create a new MutationObserver
|
|
12905
|
+
const observer = new MutationObserver((mutations) => {
|
|
12906
|
+
const config = _transportConfig$1.get(host);
|
|
12907
|
+
if (!config) return;
|
|
12908
|
+
|
|
12909
|
+
// For each mutation affecting attributes
|
|
12910
|
+
mutations
|
|
12911
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
12912
|
+
.forEach(mutation => {
|
|
12913
|
+
const attributeName = mutation.attributeName;
|
|
12914
|
+
|
|
12915
|
+
// Find matchers that care about this attribute
|
|
12916
|
+
for (const matcher of config.matchers) {
|
|
12917
|
+
if (matcher(attributeName)) {
|
|
12918
|
+
// For each target that uses this matcher
|
|
12919
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
12920
|
+
if (matcherConfigs.has(matcher)) {
|
|
12921
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
12922
|
+
_transportAttributes$1({
|
|
12923
|
+
host,
|
|
12924
|
+
target,
|
|
12925
|
+
matcher,
|
|
12926
|
+
removeOriginal
|
|
12927
|
+
});
|
|
12928
|
+
}
|
|
12929
|
+
}
|
|
12930
|
+
}
|
|
12931
|
+
}
|
|
12932
|
+
});
|
|
12933
|
+
});
|
|
11651
12934
|
|
|
11652
|
-
|
|
11653
|
-
|
|
12935
|
+
// Start observing attribute changes
|
|
12936
|
+
observer.observe(host, { attributes: true });
|
|
12937
|
+
|
|
12938
|
+
// Store the observer
|
|
12939
|
+
_observers$1.set(host, observer);
|
|
12940
|
+
|
|
12941
|
+
return observer;
|
|
12942
|
+
};
|
|
11654
12943
|
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
|
|
12944
|
+
/**
|
|
12945
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
12946
|
+
*
|
|
12947
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
12948
|
+
* @private
|
|
12949
|
+
*/
|
|
12950
|
+
const _detachObserver$1 = (host) => {
|
|
12951
|
+
if (_observers$1.has(host)) {
|
|
12952
|
+
const observer = _observers$1.get(host);
|
|
12953
|
+
observer.disconnect();
|
|
12954
|
+
_observers$1.delete(host);
|
|
11662
12955
|
}
|
|
12956
|
+
|
|
12957
|
+
// Clean up the transport config as well
|
|
12958
|
+
if (_transportConfig$1.has(host)) {
|
|
12959
|
+
_transportConfig$1.delete(host);
|
|
12960
|
+
}
|
|
12961
|
+
};
|
|
11663
12962
|
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
11667
|
-
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
<div id="bodyContainer">
|
|
11682
|
-
<slot></slot>
|
|
11683
|
-
</div>
|
|
12963
|
+
/**
|
|
12964
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
12965
|
+
* @param {HTMLElement} host - The host element
|
|
12966
|
+
* @param {HTMLElement} target - The target element
|
|
12967
|
+
* @param {Function} matcher - The matcher function
|
|
12968
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
12969
|
+
* @private
|
|
12970
|
+
*/
|
|
12971
|
+
const _getMatcherConfig$1 = (host, target, matcher) => {
|
|
12972
|
+
const config = _transportConfig$1.get(host);
|
|
12973
|
+
if (!config) return undefined;
|
|
12974
|
+
|
|
12975
|
+
const targetMatchers = config.targets.get(target);
|
|
12976
|
+
if (!targetMatchers) return undefined;
|
|
12977
|
+
|
|
12978
|
+
return targetMatchers.get(matcher);
|
|
12979
|
+
};
|
|
11684
12980
|
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
12981
|
+
/**
|
|
12982
|
+
* Sets an observed attribute value
|
|
12983
|
+
* @param {HTMLElement} host - The host element
|
|
12984
|
+
* @param {HTMLElement} target - The target element
|
|
12985
|
+
* @param {Function} matcher - The matcher function
|
|
12986
|
+
* @param {string} key - The attribute name
|
|
12987
|
+
* @param {string} value - The attribute value
|
|
12988
|
+
* @private
|
|
12989
|
+
*/
|
|
12990
|
+
const _setObservedAttribute$1 = (host, target, matcher, key, value) => {
|
|
12991
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
12992
|
+
if (matcherConfig) {
|
|
12993
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
11691
12994
|
}
|
|
11692
|
-
}
|
|
12995
|
+
};
|
|
11693
12996
|
|
|
11694
|
-
|
|
12997
|
+
const _getObservedAttribute$1 = (host, target, matcher, attr) => {
|
|
12998
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
12999
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
13000
|
+
return undefined;
|
|
13001
|
+
};
|
|
11695
13002
|
|
|
11696
|
-
|
|
11697
|
-
|
|
13003
|
+
const _getObservedAttributes$1 = (host, target, matcher) => {
|
|
13004
|
+
const matcherConfig = _getMatcherConfig$1(host, target, matcher);
|
|
13005
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
13006
|
+
return [];
|
|
13007
|
+
};
|
|
11698
13008
|
|
|
13009
|
+
const _matchers$1 = {
|
|
13010
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
13011
|
+
'role': attr => attr.match(/^role$/)
|
|
13012
|
+
};
|
|
11699
13013
|
|
|
11700
|
-
|
|
13014
|
+
const transportAllA11yAttributes$1 = ({ host, target, removeOriginal = true }) => {
|
|
13015
|
+
return transportAttributes$1({
|
|
13016
|
+
host,
|
|
13017
|
+
target,
|
|
13018
|
+
match: attr => {
|
|
13019
|
+
for (const key in _matchers$1) {
|
|
13020
|
+
if (_matchers$1[key](attr)) return true;
|
|
13021
|
+
}
|
|
13022
|
+
return false;
|
|
13023
|
+
},
|
|
13024
|
+
removeOriginal
|
|
13025
|
+
});
|
|
13026
|
+
};
|
|
13027
|
+
|
|
13028
|
+
let AuroElement$5 = class AuroElement extends LitElement {
|
|
11701
13029
|
|
|
11702
13030
|
/**
|
|
11703
|
-
*
|
|
13031
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
13032
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
13033
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
13034
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
11704
13035
|
* @private
|
|
11705
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
11706
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
11707
|
-
* @returns {string} - Unique string to be used for naming.
|
|
11708
13036
|
*/
|
|
11709
|
-
|
|
11710
|
-
let result = baseName;
|
|
13037
|
+
attributeWatcher;
|
|
11711
13038
|
|
|
11712
|
-
|
|
11713
|
-
|
|
13039
|
+
static get properties() {
|
|
13040
|
+
return {
|
|
11714
13041
|
|
|
11715
|
-
|
|
11716
|
-
|
|
13042
|
+
/**
|
|
13043
|
+
* Defines the layout of an element.
|
|
13044
|
+
* @default {'default'}
|
|
13045
|
+
*/
|
|
13046
|
+
layout: {
|
|
13047
|
+
type: String,
|
|
13048
|
+
attribute: "layout",
|
|
13049
|
+
reflect: true
|
|
13050
|
+
},
|
|
13051
|
+
|
|
13052
|
+
/**
|
|
13053
|
+
* Defines the shape of an element.
|
|
13054
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
13055
|
+
* @default {'default'}
|
|
13056
|
+
*/
|
|
13057
|
+
shape: {
|
|
13058
|
+
type: String,
|
|
13059
|
+
attribute: "shape",
|
|
13060
|
+
reflect: true
|
|
13061
|
+
},
|
|
11717
13062
|
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
13063
|
+
/**
|
|
13064
|
+
* Defines the size of an element.
|
|
13065
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
13066
|
+
* @default {'md'}
|
|
13067
|
+
*/
|
|
13068
|
+
size: {
|
|
13069
|
+
type: String,
|
|
13070
|
+
attribute: "size",
|
|
13071
|
+
reflect: true
|
|
13072
|
+
},
|
|
11727
13073
|
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
13074
|
+
/**
|
|
13075
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
13076
|
+
* @default {false}
|
|
13077
|
+
*/
|
|
13078
|
+
onDark: {
|
|
13079
|
+
type: Boolean,
|
|
13080
|
+
attribute: "ondark",
|
|
13081
|
+
reflect: true
|
|
13082
|
+
},
|
|
11731
13083
|
|
|
11732
|
-
|
|
13084
|
+
/**
|
|
13085
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
13086
|
+
* This is used to apply layout and shape classes dynamically.
|
|
13087
|
+
* @type {HTMLElement|null}
|
|
13088
|
+
* @default {null}
|
|
13089
|
+
* @private
|
|
13090
|
+
*/
|
|
13091
|
+
wrapper: {
|
|
13092
|
+
type: HTMLElement,
|
|
13093
|
+
attribute: false,
|
|
13094
|
+
reflect: false
|
|
13095
|
+
}
|
|
13096
|
+
};
|
|
11733
13097
|
}
|
|
11734
|
-
};
|
|
11735
13098
|
|
|
11736
|
-
|
|
11737
|
-
// See LICENSE in the project root for license information.
|
|
13099
|
+
|
|
11738
13100
|
|
|
11739
|
-
|
|
13101
|
+
resetShapeClasses() {
|
|
13102
|
+
if (this.shape && this.size) {
|
|
11740
13103
|
|
|
11741
|
-
|
|
13104
|
+
if (this.wrapper) {
|
|
13105
|
+
this.wrapper.classList.forEach((className) => {
|
|
13106
|
+
if (className.startsWith('shape-')) {
|
|
13107
|
+
this.wrapper.classList.remove(className);
|
|
13108
|
+
}
|
|
13109
|
+
});
|
|
11742
13110
|
|
|
11743
|
-
|
|
13111
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
13112
|
+
}
|
|
13113
|
+
}
|
|
13114
|
+
}
|
|
11744
13115
|
|
|
11745
|
-
|
|
13116
|
+
resetLayoutClasses() {
|
|
13117
|
+
if (this.layout) {
|
|
13118
|
+
if (this.wrapper) {
|
|
13119
|
+
this.wrapper.classList.forEach((className) => {
|
|
13120
|
+
if (className.startsWith('layout-')) {
|
|
13121
|
+
this.wrapper.classList.remove(className);
|
|
13122
|
+
}
|
|
13123
|
+
});
|
|
11746
13124
|
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
* @param {String} name - The name of the custom element.
|
|
11750
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
11751
|
-
* @returns {void}
|
|
11752
|
-
*/
|
|
11753
|
-
registerComponent(name, componentClass) {
|
|
11754
|
-
if (!customElements.get(name)) {
|
|
11755
|
-
customElements.define(name, class extends componentClass {});
|
|
13125
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
13126
|
+
}
|
|
11756
13127
|
}
|
|
11757
13128
|
}
|
|
11758
13129
|
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
*/
|
|
11763
|
-
closestElement(
|
|
11764
|
-
selector, // selector like in .closest()
|
|
11765
|
-
base = this, // extra functionality to skip a parent
|
|
11766
|
-
__Closest = (el, found = el && el.closest(selector)) =>
|
|
11767
|
-
!el || el === document || el === window
|
|
11768
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
11769
|
-
: found
|
|
11770
|
-
? found // found a selector INside this element
|
|
11771
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
11772
|
-
) {
|
|
11773
|
-
return __Closest(base);
|
|
13130
|
+
updateComponentArchitecture() {
|
|
13131
|
+
this.resetLayoutClasses();
|
|
13132
|
+
this.resetShapeClasses();
|
|
11774
13133
|
}
|
|
11775
|
-
/* eslint-enable jsdoc/require-param */
|
|
11776
13134
|
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
*/
|
|
11783
|
-
handleComponentTagRename(elem, tagName) {
|
|
11784
|
-
const tag = tagName.toLowerCase();
|
|
11785
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
13135
|
+
updated(changedProperties) {
|
|
13136
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
13137
|
+
this.updateComponentArchitecture();
|
|
13138
|
+
}
|
|
13139
|
+
}
|
|
11786
13140
|
|
|
11787
|
-
|
|
11788
|
-
|
|
13141
|
+
firstUpdated() {
|
|
13142
|
+
super.firstUpdated();
|
|
13143
|
+
|
|
13144
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
13145
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
13146
|
+
|
|
13147
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
13148
|
+
this.attributeWatcher = transportAllA11yAttributes$1({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
13149
|
+
}
|
|
13150
|
+
|
|
13151
|
+
disconnectedCallback() {
|
|
13152
|
+
super.disconnectedCallback();
|
|
13153
|
+
|
|
13154
|
+
// Cleanup the ARIA observer if it exists
|
|
13155
|
+
if (this.attributeWatcher) {
|
|
13156
|
+
this.attributeWatcher.cleanup();
|
|
13157
|
+
this.attributeWatcher = null;
|
|
11789
13158
|
}
|
|
11790
13159
|
}
|
|
11791
13160
|
|
|
11792
|
-
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
13161
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
13162
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
13163
|
+
render() {
|
|
13164
|
+
try {
|
|
13165
|
+
return this.renderLayout();
|
|
13166
|
+
} catch (error) {
|
|
13167
|
+
// failed to get the defined layout
|
|
13168
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
11801
13169
|
|
|
11802
|
-
|
|
13170
|
+
// fallback to the default layout
|
|
13171
|
+
return this.getLayout('default');
|
|
13172
|
+
}
|
|
11803
13173
|
}
|
|
11804
13174
|
};
|
|
11805
13175
|
|
|
11806
|
-
var styleCss$8 = css`: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
|
|
13176
|
+
var styleCss$8 = css`: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}`;
|
|
11807
13177
|
|
|
11808
|
-
var colorCss$7 = css`[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}`;
|
|
13178
|
+
var colorCss$7 = css`[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)}`;
|
|
11809
13179
|
|
|
11810
|
-
var tokensCss$8 = css`: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}`;
|
|
13180
|
+
var tokensCss$8 = css`: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}`;
|
|
13181
|
+
|
|
13182
|
+
var shapeSize$1 = css`.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}`;
|
|
11811
13183
|
|
|
11812
13184
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
11813
13185
|
// See LICENSE in the project root for license information.
|
|
@@ -11816,7 +13188,7 @@ var tokensCss$8 = css`:host{--ds-auro-button-border-color:var(--ds-advanced-colo
|
|
|
11816
13188
|
|
|
11817
13189
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
11818
13190
|
|
|
11819
|
-
let AuroLibraryRuntimeUtils$
|
|
13191
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
11820
13192
|
|
|
11821
13193
|
/* eslint-disable jsdoc/require-param */
|
|
11822
13194
|
|
|
@@ -11911,7 +13283,7 @@ let AuroLoader$1 = class AuroLoader extends LitElement {
|
|
|
11911
13283
|
/**
|
|
11912
13284
|
* @private
|
|
11913
13285
|
*/
|
|
11914
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
13286
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
11915
13287
|
|
|
11916
13288
|
this.orbit = false;
|
|
11917
13289
|
this.ringworm = false;
|
|
@@ -11974,7 +13346,7 @@ let AuroLoader$1 = class AuroLoader extends LitElement {
|
|
|
11974
13346
|
*
|
|
11975
13347
|
*/
|
|
11976
13348
|
static register(name = "auro-loader") {
|
|
11977
|
-
AuroLibraryRuntimeUtils$
|
|
13349
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroLoader);
|
|
11978
13350
|
}
|
|
11979
13351
|
|
|
11980
13352
|
firstUpdated() {
|
|
@@ -12026,7 +13398,7 @@ let AuroLoader$1 = class AuroLoader extends LitElement {
|
|
|
12026
13398
|
|
|
12027
13399
|
var loaderVersion$1 = '5.0.0';
|
|
12028
13400
|
|
|
12029
|
-
/* eslint-disable max-lines */
|
|
13401
|
+
/* eslint-disable max-lines, curly */
|
|
12030
13402
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
12031
13403
|
// See LICENSE in the project root for license information.
|
|
12032
13404
|
|
|
@@ -12042,7 +13414,18 @@ var loaderVersion$1 = '5.0.0';
|
|
|
12042
13414
|
|
|
12043
13415
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
12044
13416
|
|
|
12045
|
-
|
|
13417
|
+
const ICON_ONLY_SHAPES$1 = ['circle'];
|
|
13418
|
+
|
|
13419
|
+
/**
|
|
13420
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
13421
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
13422
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
13423
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
13424
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
13425
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
13426
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
13427
|
+
*/
|
|
13428
|
+
let AuroButton$1 = class AuroButton extends AuroElement$5 {
|
|
12046
13429
|
|
|
12047
13430
|
/**
|
|
12048
13431
|
* Enables form association for this element.
|
|
@@ -12057,13 +13440,10 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12057
13440
|
super();
|
|
12058
13441
|
this.autofocus = false;
|
|
12059
13442
|
this.disabled = false;
|
|
12060
|
-
this.iconOnly = false;
|
|
12061
13443
|
this.loading = false;
|
|
13444
|
+
this.size = "md";
|
|
13445
|
+
this.shape = "rounded";
|
|
12062
13446
|
this.onDark = false;
|
|
12063
|
-
this.secondary = false;
|
|
12064
|
-
this.tertiary = false;
|
|
12065
|
-
this.rounded = false;
|
|
12066
|
-
this.slim = false;
|
|
12067
13447
|
this.fluid = false;
|
|
12068
13448
|
this.loadingText = this.loadingText || 'Loading...';
|
|
12069
13449
|
|
|
@@ -12092,59 +13472,46 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12092
13472
|
return [
|
|
12093
13473
|
tokensCss$8,
|
|
12094
13474
|
styleCss$8,
|
|
12095
|
-
colorCss$7
|
|
13475
|
+
colorCss$7,
|
|
13476
|
+
shapeSize$1
|
|
12096
13477
|
];
|
|
12097
13478
|
}
|
|
12098
13479
|
|
|
12099
13480
|
static get properties() {
|
|
12100
|
-
return {
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
12104
|
-
*/
|
|
12105
|
-
autofocus: {
|
|
12106
|
-
type: Boolean,
|
|
12107
|
-
reflect: true
|
|
12108
|
-
},
|
|
12109
|
-
|
|
12110
|
-
/**
|
|
12111
|
-
* If set to true, button will become disabled and not allow for interactions.
|
|
12112
|
-
*/
|
|
12113
|
-
disabled: {
|
|
12114
|
-
type: Boolean,
|
|
12115
|
-
reflect: true
|
|
12116
|
-
},
|
|
13481
|
+
return {
|
|
13482
|
+
|
|
13483
|
+
...super.properties,
|
|
12117
13484
|
|
|
12118
13485
|
/**
|
|
12119
|
-
*
|
|
12120
|
-
* @
|
|
13486
|
+
* Override layout since it isn't used in this component.
|
|
13487
|
+
* @private
|
|
12121
13488
|
*/
|
|
12122
|
-
|
|
13489
|
+
layout: {
|
|
12123
13490
|
type: Boolean,
|
|
12124
|
-
|
|
13491
|
+
attribute: false,
|
|
13492
|
+
reflect: false
|
|
12125
13493
|
},
|
|
12126
13494
|
|
|
12127
13495
|
/**
|
|
12128
|
-
*
|
|
12129
|
-
* @deprecated
|
|
13496
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
12130
13497
|
*/
|
|
12131
|
-
|
|
13498
|
+
autofocus: {
|
|
12132
13499
|
type: Boolean,
|
|
12133
13500
|
reflect: true
|
|
12134
13501
|
},
|
|
12135
13502
|
|
|
12136
13503
|
/**
|
|
12137
|
-
*
|
|
13504
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
12138
13505
|
*/
|
|
12139
|
-
|
|
13506
|
+
disabled: {
|
|
12140
13507
|
type: Boolean,
|
|
12141
13508
|
reflect: true
|
|
12142
13509
|
},
|
|
12143
13510
|
|
|
12144
13511
|
/**
|
|
12145
|
-
*
|
|
13512
|
+
* Alters the shape of the button to be full width of its parent container.
|
|
12146
13513
|
*/
|
|
12147
|
-
|
|
13514
|
+
fluid: {
|
|
12148
13515
|
type: Boolean,
|
|
12149
13516
|
reflect: true
|
|
12150
13517
|
},
|
|
@@ -12152,7 +13519,7 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12152
13519
|
/**
|
|
12153
13520
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
12154
13521
|
*/
|
|
12155
|
-
loading:
|
|
13522
|
+
loading: {
|
|
12156
13523
|
type: Boolean,
|
|
12157
13524
|
reflect: true
|
|
12158
13525
|
},
|
|
@@ -12160,34 +13527,10 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12160
13527
|
/**
|
|
12161
13528
|
* 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.
|
|
12162
13529
|
*/
|
|
12163
|
-
loadingText:
|
|
13530
|
+
loadingText: {
|
|
12164
13531
|
type: String
|
|
12165
13532
|
},
|
|
12166
13533
|
|
|
12167
|
-
/**
|
|
12168
|
-
* Set value for on-dark version of auro-button.
|
|
12169
|
-
*/
|
|
12170
|
-
onDark: {
|
|
12171
|
-
type: Boolean,
|
|
12172
|
-
reflect: true
|
|
12173
|
-
},
|
|
12174
|
-
|
|
12175
|
-
/**
|
|
12176
|
-
* If set to true, the button will have a rounded shape.
|
|
12177
|
-
*/
|
|
12178
|
-
rounded: {
|
|
12179
|
-
type: Boolean,
|
|
12180
|
-
reflect: true
|
|
12181
|
-
},
|
|
12182
|
-
|
|
12183
|
-
/**
|
|
12184
|
-
* Set value for slim version of auro-button.
|
|
12185
|
-
*/
|
|
12186
|
-
slim: {
|
|
12187
|
-
type: Boolean,
|
|
12188
|
-
reflect: true
|
|
12189
|
-
},
|
|
12190
|
-
|
|
12191
13534
|
/**
|
|
12192
13535
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
12193
13536
|
*/
|
|
@@ -12196,48 +13539,10 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12196
13539
|
reflect: true
|
|
12197
13540
|
},
|
|
12198
13541
|
|
|
12199
|
-
/**
|
|
12200
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
12201
|
-
*/
|
|
12202
|
-
ariahidden: {
|
|
12203
|
-
type: String,
|
|
12204
|
-
reflect: true,
|
|
12205
|
-
},
|
|
12206
|
-
|
|
12207
|
-
/**
|
|
12208
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
12209
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
12210
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
12211
|
-
*/
|
|
12212
|
-
arialabel: {
|
|
12213
|
-
type: String,
|
|
12214
|
-
reflect: true
|
|
12215
|
-
},
|
|
12216
|
-
|
|
12217
|
-
/**
|
|
12218
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
12219
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
12220
|
-
* List multiple element IDs in a space delimited fashion.
|
|
12221
|
-
*/
|
|
12222
|
-
arialabelledby: {
|
|
12223
|
-
type: String,
|
|
12224
|
-
reflect: true
|
|
12225
|
-
},
|
|
12226
|
-
|
|
12227
|
-
/**
|
|
12228
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
12229
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
12230
|
-
* This is an optional attribute for buttons.
|
|
12231
|
-
*/
|
|
12232
|
-
ariaexpanded: {
|
|
12233
|
-
type: Boolean,
|
|
12234
|
-
reflect: true
|
|
12235
|
-
},
|
|
12236
|
-
|
|
12237
13542
|
/**
|
|
12238
13543
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
12239
13544
|
*/
|
|
12240
|
-
title:
|
|
13545
|
+
title: {
|
|
12241
13546
|
type: String,
|
|
12242
13547
|
reflect: true
|
|
12243
13548
|
},
|
|
@@ -12245,7 +13550,7 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12245
13550
|
/**
|
|
12246
13551
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
12247
13552
|
*/
|
|
12248
|
-
type:
|
|
13553
|
+
type: {
|
|
12249
13554
|
type: String,
|
|
12250
13555
|
reflect: true
|
|
12251
13556
|
},
|
|
@@ -12253,19 +13558,19 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12253
13558
|
/**
|
|
12254
13559
|
* Defines the value associated with the button which is submitted with the form data.
|
|
12255
13560
|
*/
|
|
12256
|
-
value:
|
|
13561
|
+
value: {
|
|
12257
13562
|
type: String,
|
|
12258
13563
|
reflect: true
|
|
12259
13564
|
},
|
|
12260
13565
|
|
|
12261
13566
|
/**
|
|
12262
|
-
* Sets button variant option.
|
|
13567
|
+
* Sets button variant option.
|
|
13568
|
+
* @default primary
|
|
12263
13569
|
*/
|
|
12264
|
-
variant:
|
|
13570
|
+
variant: {
|
|
12265
13571
|
type: String,
|
|
12266
13572
|
reflect: true
|
|
12267
13573
|
},
|
|
12268
|
-
ready: { type: Boolean },
|
|
12269
13574
|
};
|
|
12270
13575
|
}
|
|
12271
13576
|
|
|
@@ -12278,7 +13583,7 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12278
13583
|
*
|
|
12279
13584
|
*/
|
|
12280
13585
|
static register(name = "auro-button") {
|
|
12281
|
-
AuroLibraryRuntimeUtils$
|
|
13586
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent(name, AuroButton);
|
|
12282
13587
|
}
|
|
12283
13588
|
|
|
12284
13589
|
/**
|
|
@@ -12290,17 +13595,6 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12290
13595
|
this.renderRoot.querySelector('button').focus();
|
|
12291
13596
|
}
|
|
12292
13597
|
|
|
12293
|
-
updated() {
|
|
12294
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
12295
|
-
if (this.secondary) {
|
|
12296
|
-
this.setAttribute('variant', 'secondary');
|
|
12297
|
-
}
|
|
12298
|
-
|
|
12299
|
-
if (this.tertiary) {
|
|
12300
|
-
this.setAttribute('variant', 'tertiary');
|
|
12301
|
-
}
|
|
12302
|
-
}
|
|
12303
|
-
|
|
12304
13598
|
/**
|
|
12305
13599
|
* Submits the form that this button is associated with.
|
|
12306
13600
|
* @private
|
|
@@ -12321,25 +13615,56 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12321
13615
|
return this.internals ? this.internals.form : null;
|
|
12322
13616
|
}
|
|
12323
13617
|
|
|
12324
|
-
|
|
13618
|
+
/**
|
|
13619
|
+
* @private
|
|
13620
|
+
* @returns {Boolean}
|
|
13621
|
+
*/
|
|
13622
|
+
get hideText() {
|
|
13623
|
+
return ICON_ONLY_SHAPES$1.includes(this.shape);
|
|
13624
|
+
}
|
|
13625
|
+
|
|
13626
|
+
/**
|
|
13627
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
13628
|
+
* @returns {string | undefined}
|
|
13629
|
+
* @private
|
|
13630
|
+
*/
|
|
13631
|
+
get currentAriaLabel() {
|
|
13632
|
+
if (!this.attributeWatcher) return undefined;
|
|
13633
|
+
|
|
13634
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
13635
|
+
return ariaLabel || undefined;
|
|
13636
|
+
}
|
|
13637
|
+
|
|
13638
|
+
/**
|
|
13639
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
13640
|
+
* @returns {string | undefined}
|
|
13641
|
+
* @private
|
|
13642
|
+
*/
|
|
13643
|
+
get currentAriaLabelledBy() {
|
|
13644
|
+
if (!this.attributeWatcher) return undefined;
|
|
13645
|
+
|
|
13646
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
13647
|
+
return ariaLabelledBy || undefined;
|
|
13648
|
+
}
|
|
13649
|
+
|
|
13650
|
+
/**
|
|
13651
|
+
* Renders the default layout for the button.
|
|
13652
|
+
* @returns {TemplateResult}
|
|
13653
|
+
* @private
|
|
13654
|
+
*/
|
|
13655
|
+
renderLayoutDefault() {
|
|
12325
13656
|
const classes = {
|
|
12326
|
-
|
|
12327
|
-
|
|
12328
|
-
|
|
12329
|
-
|
|
12330
|
-
'auro-button--slim': this.slim,
|
|
12331
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
12332
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
12333
|
-
'loading': this.loading
|
|
13657
|
+
"util_insetLg--squish": true,
|
|
13658
|
+
"auro-button": true,
|
|
13659
|
+
wrapper: true,
|
|
13660
|
+
loading: this.loading,
|
|
12334
13661
|
};
|
|
12335
13662
|
|
|
12336
13663
|
return html$1`
|
|
12337
13664
|
<button
|
|
12338
13665
|
part="button"
|
|
12339
|
-
aria-
|
|
12340
|
-
aria-
|
|
12341
|
-
aria-labelledby="${ifDefined(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
12342
|
-
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
13666
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
13667
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
12343
13668
|
tabIndex="${ifDefined(this.tIndex)}"
|
|
12344
13669
|
?autofocus="${this.autofocus}"
|
|
12345
13670
|
class="${classMap(classes)}"
|
|
@@ -12356,7 +13681,7 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12356
13681
|
|
|
12357
13682
|
<span class="contentWrapper">
|
|
12358
13683
|
<span class="textSlot" part="text">
|
|
12359
|
-
${this.
|
|
13684
|
+
${this.hideText ? undefined : html$1`<slot></slot>`}
|
|
12360
13685
|
</span>
|
|
12361
13686
|
|
|
12362
13687
|
<span part="icon">
|
|
@@ -12366,6 +13691,15 @@ let AuroButton$1 = class AuroButton extends LitElement {
|
|
|
12366
13691
|
</button>
|
|
12367
13692
|
`;
|
|
12368
13693
|
}
|
|
13694
|
+
|
|
13695
|
+
/**
|
|
13696
|
+
* Renders the layout of the button
|
|
13697
|
+
* @returns {TemplateResult}
|
|
13698
|
+
* @private
|
|
13699
|
+
*/
|
|
13700
|
+
renderLayout() {
|
|
13701
|
+
return this.renderLayoutDefault();
|
|
13702
|
+
}
|
|
12369
13703
|
};
|
|
12370
13704
|
|
|
12371
13705
|
var buttonVersion$1 = '9.0.0';
|
|
@@ -12441,7 +13775,7 @@ class AuroCalendar extends RangeDatepicker {
|
|
|
12441
13775
|
*/
|
|
12442
13776
|
this.slots = {};
|
|
12443
13777
|
|
|
12444
|
-
const versioning = new AuroDependencyVersioning$
|
|
13778
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
12445
13779
|
|
|
12446
13780
|
/**
|
|
12447
13781
|
* @private
|
|
@@ -14967,7 +16301,7 @@ class AuroFloatingUI {
|
|
|
14967
16301
|
// See LICENSE in the project root for license information.
|
|
14968
16302
|
|
|
14969
16303
|
|
|
14970
|
-
let AuroDependencyVersioning$
|
|
16304
|
+
let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
14971
16305
|
|
|
14972
16306
|
/**
|
|
14973
16307
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -15349,8 +16683,12 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
15349
16683
|
async firstUpdated() {
|
|
15350
16684
|
await super.firstUpdated();
|
|
15351
16685
|
|
|
15352
|
-
|
|
15353
|
-
|
|
16686
|
+
/**
|
|
16687
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
16688
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
16689
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
16690
|
+
*/
|
|
16691
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
15354
16692
|
const svgDesc = this.svg.querySelector('desc');
|
|
15355
16693
|
|
|
15356
16694
|
if (svgDesc) {
|
|
@@ -15620,7 +16958,7 @@ var tokensCss$6 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
15620
16958
|
|
|
15621
16959
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
15622
16960
|
|
|
15623
|
-
let AuroLibraryRuntimeUtils$
|
|
16961
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
15624
16962
|
|
|
15625
16963
|
/* eslint-disable jsdoc/require-param */
|
|
15626
16964
|
|
|
@@ -15701,7 +17039,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
15701
17039
|
this.onDark = false;
|
|
15702
17040
|
this.hasTextContent = false;
|
|
15703
17041
|
|
|
15704
|
-
AuroLibraryRuntimeUtils$
|
|
17042
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
15705
17043
|
}
|
|
15706
17044
|
|
|
15707
17045
|
static get styles() {
|
|
@@ -15757,7 +17095,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
15757
17095
|
*
|
|
15758
17096
|
*/
|
|
15759
17097
|
static register(name = "auro-helptext") {
|
|
15760
|
-
AuroLibraryRuntimeUtils$
|
|
17098
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroHelpText);
|
|
15761
17099
|
}
|
|
15762
17100
|
|
|
15763
17101
|
updated() {
|
|
@@ -15815,7 +17153,7 @@ let AuroHelpText$1 = class AuroHelpText extends LitElement {
|
|
|
15815
17153
|
|
|
15816
17154
|
var helpTextVersion$1 = '1.0.0';
|
|
15817
17155
|
|
|
15818
|
-
let AuroElement$
|
|
17156
|
+
let AuroElement$4 = class AuroElement extends LitElement {
|
|
15819
17157
|
static get properties() {
|
|
15820
17158
|
return {
|
|
15821
17159
|
|
|
@@ -15927,7 +17265,7 @@ let AuroElement$3 = class AuroElement extends LitElement {
|
|
|
15927
17265
|
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
15928
17266
|
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
15929
17267
|
*/
|
|
15930
|
-
class AuroDropdown extends AuroElement$
|
|
17268
|
+
class AuroDropdown extends AuroElement$4 {
|
|
15931
17269
|
constructor() {
|
|
15932
17270
|
super();
|
|
15933
17271
|
|
|
@@ -16016,7 +17354,7 @@ class AuroDropdown extends AuroElement$3 {
|
|
|
16016
17354
|
/**
|
|
16017
17355
|
* Generate unique names for dependency components.
|
|
16018
17356
|
*/
|
|
16019
|
-
const versioning = new AuroDependencyVersioning$
|
|
17357
|
+
const versioning = new AuroDependencyVersioning$1();
|
|
16020
17358
|
|
|
16021
17359
|
/**
|
|
16022
17360
|
* @private
|
|
@@ -16918,6 +18256,8 @@ const stringsES$1 = {
|
|
|
16918
18256
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
16919
18257
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
16920
18258
|
'clearInput': 'Borrar campo de entrada',
|
|
18259
|
+
'showPassword': 'Mostrar contraseña',
|
|
18260
|
+
'hidePassword': 'Ocultar contraseña'
|
|
16921
18261
|
};
|
|
16922
18262
|
|
|
16923
18263
|
const stringsEN$1 = {
|
|
@@ -16942,6 +18282,8 @@ const stringsEN$1 = {
|
|
|
16942
18282
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
16943
18283
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
16944
18284
|
'clearInput': 'Clear input field',
|
|
18285
|
+
'showPassword': 'Show password',
|
|
18286
|
+
'hidePassword': 'Hide password'
|
|
16945
18287
|
};
|
|
16946
18288
|
|
|
16947
18289
|
/**
|
|
@@ -21236,7 +22578,7 @@ const {
|
|
|
21236
22578
|
|
|
21237
22579
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
21238
22580
|
|
|
21239
|
-
let AuroLibraryRuntimeUtils$
|
|
22581
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
21240
22582
|
|
|
21241
22583
|
/* eslint-disable jsdoc/require-param */
|
|
21242
22584
|
|
|
@@ -21306,7 +22648,7 @@ let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
|
21306
22648
|
class AuroFormValidation {
|
|
21307
22649
|
|
|
21308
22650
|
constructor() {
|
|
21309
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
22651
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
21310
22652
|
}
|
|
21311
22653
|
|
|
21312
22654
|
/**
|
|
@@ -21667,7 +23009,7 @@ class AuroFormValidation {
|
|
|
21667
23009
|
}
|
|
21668
23010
|
}
|
|
21669
23011
|
|
|
21670
|
-
let AuroElement$
|
|
23012
|
+
let AuroElement$2 = class AuroElement extends LitElement {
|
|
21671
23013
|
static get properties() {
|
|
21672
23014
|
return {
|
|
21673
23015
|
|
|
@@ -21787,7 +23129,7 @@ let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
|
21787
23129
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` value has changed.
|
|
21788
23130
|
*/
|
|
21789
23131
|
|
|
21790
|
-
class BaseInput extends AuroElement$
|
|
23132
|
+
class BaseInput extends AuroElement$2 {
|
|
21791
23133
|
|
|
21792
23134
|
constructor() {
|
|
21793
23135
|
super();
|
|
@@ -22850,7 +24192,7 @@ class BaseInput extends AuroElement$1$1 {
|
|
|
22850
24192
|
// See LICENSE in the project root for license information.
|
|
22851
24193
|
|
|
22852
24194
|
|
|
22853
|
-
|
|
24195
|
+
class AuroDependencyVersioning {
|
|
22854
24196
|
|
|
22855
24197
|
/**
|
|
22856
24198
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -22884,7 +24226,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
22884
24226
|
|
|
22885
24227
|
return tag;
|
|
22886
24228
|
}
|
|
22887
|
-
}
|
|
24229
|
+
}
|
|
22888
24230
|
|
|
22889
24231
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
22890
24232
|
// See LICENSE in the project root for license information.
|
|
@@ -22896,7 +24238,7 @@ let AuroDependencyVersioning$1 = class AuroDependencyVersioning {
|
|
|
22896
24238
|
* @attr {Boolean} hiddenAudible - If present, the component will be hidden from screen readers, but seen visually
|
|
22897
24239
|
*/
|
|
22898
24240
|
|
|
22899
|
-
let AuroElement$
|
|
24241
|
+
let AuroElement$1$1 = class AuroElement extends LitElement {
|
|
22900
24242
|
|
|
22901
24243
|
// function to define props used within the scope of this component
|
|
22902
24244
|
static get properties() {
|
|
@@ -22964,7 +24306,7 @@ var styleCss$3 = css`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
22964
24306
|
*/
|
|
22965
24307
|
|
|
22966
24308
|
// build the component class
|
|
22967
|
-
let BaseIcon$1 = class BaseIcon extends AuroElement$
|
|
24309
|
+
let BaseIcon$1 = class BaseIcon extends AuroElement$1$1 {
|
|
22968
24310
|
constructor() {
|
|
22969
24311
|
super();
|
|
22970
24312
|
this.onDark = false;
|
|
@@ -23047,7 +24389,7 @@ var colorCss$3 = css`:host{color:var(--ds-auro-icon-color)}:host([customColor]){
|
|
|
23047
24389
|
|
|
23048
24390
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
23049
24391
|
|
|
23050
|
-
let AuroLibraryRuntimeUtils$
|
|
24392
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
23051
24393
|
|
|
23052
24394
|
/* eslint-disable jsdoc/require-param */
|
|
23053
24395
|
|
|
@@ -23129,7 +24471,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23129
24471
|
*/
|
|
23130
24472
|
privateDefaults() {
|
|
23131
24473
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
23132
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
24474
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2();
|
|
23133
24475
|
}
|
|
23134
24476
|
|
|
23135
24477
|
// function to define props used within the scope of this component
|
|
@@ -23211,7 +24553,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23211
24553
|
*
|
|
23212
24554
|
*/
|
|
23213
24555
|
static register(name = "auro-icon") {
|
|
23214
|
-
AuroLibraryRuntimeUtils$
|
|
24556
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroIcon);
|
|
23215
24557
|
}
|
|
23216
24558
|
|
|
23217
24559
|
connectedCallback() {
|
|
@@ -23232,8 +24574,12 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23232
24574
|
async firstUpdated() {
|
|
23233
24575
|
await super.firstUpdated();
|
|
23234
24576
|
|
|
23235
|
-
|
|
23236
|
-
|
|
24577
|
+
/**
|
|
24578
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
24579
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
24580
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
24581
|
+
*/
|
|
24582
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
23237
24583
|
const svgDesc = this.svg.querySelector('desc');
|
|
23238
24584
|
|
|
23239
24585
|
if (svgDesc) {
|
|
@@ -23279,121 +24625,479 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
23279
24625
|
|
|
23280
24626
|
var iconVersion$1 = '8.0.1';
|
|
23281
24627
|
|
|
23282
|
-
|
|
23283
|
-
|
|
24628
|
+
/**
|
|
24629
|
+
* Private module-level WeakMap to hold MutationObservers for each host element.
|
|
24630
|
+
*/
|
|
24631
|
+
const _observers = new WeakMap();
|
|
24632
|
+
|
|
24633
|
+
/**
|
|
24634
|
+
* Private module-level WeakMap to hold attribute matchers and targets for each host element.
|
|
24635
|
+
* Structure: {
|
|
24636
|
+
* host: {
|
|
24637
|
+
* matchers: Set<Function>,
|
|
24638
|
+
* targets: Map<HTMLElement, Map<Function, {removeOriginal: boolean, currentAttributes: Map<string, string>}>>
|
|
24639
|
+
* }
|
|
24640
|
+
* }
|
|
24641
|
+
*/
|
|
24642
|
+
const _transportConfig = new WeakMap();
|
|
24643
|
+
|
|
24644
|
+
/**
|
|
24645
|
+
* Transfers all matching attributes from a host element to a target element and observes for future changes.
|
|
24646
|
+
*
|
|
24647
|
+
* @param {Object} params - The parameters for the function.
|
|
24648
|
+
* @param {HTMLElement} params.host - The host element from which attributes will be transported.
|
|
24649
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
24650
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove the attributes from the host element.
|
|
24651
|
+
* @param {boolean} [params.observe=true] - Whether to attach a MutationObserver to the host element.
|
|
24652
|
+
* @returns {Function} A function to detach the observer when no longer needed.
|
|
24653
|
+
* @throws {TypeError} If the host or target parameters are not instances of HTMLElement.
|
|
24654
|
+
*/
|
|
24655
|
+
const transportAttributes = ({ host, target, match, removeOriginal = true }) => {
|
|
24656
|
+
// Guard Clause: Ensure host is valid HTMLElement instance
|
|
24657
|
+
if (typeof host !== 'object' || !(host instanceof HTMLElement)) {
|
|
24658
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "host" parameter must be an instance of HTMLElement.');
|
|
24659
|
+
}
|
|
24660
|
+
|
|
24661
|
+
// Guard Clause: Ensure target is valid HTMLElement instance
|
|
24662
|
+
if (typeof target !== 'object' || !(target instanceof HTMLElement)) {
|
|
24663
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "target" parameter must be an instance of HTMLElement.');
|
|
24664
|
+
}
|
|
24665
|
+
|
|
24666
|
+
// Guard Clause: Ensure match is a function
|
|
24667
|
+
if (typeof match !== 'function') {
|
|
24668
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "match" parameter must be a function.');
|
|
24669
|
+
}
|
|
24670
|
+
|
|
24671
|
+
// Guard Clause: Ensure removeOriginal is a boolean
|
|
24672
|
+
if (typeof removeOriginal !== 'boolean') {
|
|
24673
|
+
throw new TypeError('a11yUtilities.js | transportAttributes | The "removeOriginal" parameter must be a boolean.');
|
|
24674
|
+
}
|
|
24675
|
+
|
|
24676
|
+
// Register this transport and get cleanup function
|
|
24677
|
+
return _registerTransport({
|
|
24678
|
+
host,
|
|
24679
|
+
target,
|
|
24680
|
+
matcher: match,
|
|
24681
|
+
removeOriginal
|
|
24682
|
+
});
|
|
24683
|
+
};
|
|
24684
|
+
|
|
24685
|
+
/**
|
|
24686
|
+
* Registers a matcher and target for a host element and attaches an observer if needed.
|
|
24687
|
+
*
|
|
24688
|
+
* @param {Object} params - The parameters object.
|
|
24689
|
+
* @param {HTMLElement} params.host - The host element to observe.
|
|
24690
|
+
* @param {HTMLElement} params.target - The target element to receive attributes.
|
|
24691
|
+
* @param {Function} params.matcher - Function that determines which attributes to transport.
|
|
24692
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes.
|
|
24693
|
+
* @param {boolean} [params.observe=true] - Whether to observe for attribute changes.
|
|
24694
|
+
* @returns {Function} Function to detach the specific matcher and target pairing.
|
|
24695
|
+
* @private
|
|
24696
|
+
*/
|
|
24697
|
+
const _registerTransport = ({ host, target, matcher, removeOriginal = true }) => {
|
|
24698
|
+
// Initialize config for this host if it doesn't exist
|
|
24699
|
+
if (!_transportConfig.has(host)) {
|
|
24700
|
+
_transportConfig.set(host, {
|
|
24701
|
+
matchers: new Set(),
|
|
24702
|
+
targets: new Map()
|
|
24703
|
+
});
|
|
24704
|
+
}
|
|
24705
|
+
|
|
24706
|
+
const config = _transportConfig.get(host);
|
|
24707
|
+
|
|
24708
|
+
// Add the matcher to the set of matchers for this host
|
|
24709
|
+
config.matchers.add(matcher);
|
|
24710
|
+
|
|
24711
|
+
// Initialize target entry if it doesn't exist
|
|
24712
|
+
if (!config.targets.has(target)) {
|
|
24713
|
+
config.targets.set(target, new Map());
|
|
24714
|
+
}
|
|
24715
|
+
|
|
24716
|
+
// Store the matcher with its removeOriginal setting for this target
|
|
24717
|
+
config.targets.get(target).set(matcher, {
|
|
24718
|
+
removeOriginal,
|
|
24719
|
+
currentAttributes: new Map()
|
|
24720
|
+
});
|
|
24721
|
+
|
|
24722
|
+
// Perform initial attribute transport
|
|
24723
|
+
_transportAttributes({ host, target, matcher, removeOriginal });
|
|
24724
|
+
|
|
24725
|
+
// Attach observer
|
|
24726
|
+
_attachObserver(host);
|
|
24727
|
+
|
|
24728
|
+
// Return cleanup function and utility functions
|
|
24729
|
+
return {
|
|
24730
|
+
cleanup: () => _cleanupTransport(host, target, matcher),
|
|
24731
|
+
getObservedAttributes: () => _getObservedAttributes(host, target, matcher),
|
|
24732
|
+
getObservedAttribute: (attr) => _getObservedAttribute(host, target, matcher, attr),
|
|
24733
|
+
}
|
|
24734
|
+
};
|
|
24735
|
+
|
|
24736
|
+
/**
|
|
24737
|
+
* Cleans up resources associated with a specific matcher and target for a host element.
|
|
24738
|
+
*
|
|
24739
|
+
* @param {HTMLElement} host - The host element
|
|
24740
|
+
* @param {HTMLElement} target - The target element
|
|
24741
|
+
* @param {Function} matcher - The matcher function
|
|
24742
|
+
* @private
|
|
24743
|
+
*/
|
|
24744
|
+
const _cleanupTransport = (host, target, matcher) => {
|
|
24745
|
+
const config = _transportConfig.get(host);
|
|
24746
|
+
if (!config) return;
|
|
24747
|
+
|
|
24748
|
+
// Remove this matcher from this target
|
|
24749
|
+
const targetMatchers = config.targets.get(target);
|
|
24750
|
+
if (targetMatchers) {
|
|
24751
|
+
targetMatchers.delete(matcher);
|
|
24752
|
+
|
|
24753
|
+
// If this target has no more matchers, remove it
|
|
24754
|
+
if (targetMatchers.size === 0) {
|
|
24755
|
+
config.targets.delete(target);
|
|
24756
|
+
}
|
|
24757
|
+
}
|
|
24758
|
+
|
|
24759
|
+
// Check if this matcher is still used by any target
|
|
24760
|
+
let matcherStillUsed = false;
|
|
24761
|
+
for (const matcherMap of config.targets.values()) {
|
|
24762
|
+
if (matcherMap.has(matcher)) {
|
|
24763
|
+
matcherStillUsed = true;
|
|
24764
|
+
break;
|
|
24765
|
+
}
|
|
24766
|
+
}
|
|
24767
|
+
|
|
24768
|
+
// If not used anymore, remove from matchers set
|
|
24769
|
+
if (!matcherStillUsed) {
|
|
24770
|
+
config.matchers.delete(matcher);
|
|
24771
|
+
}
|
|
24772
|
+
|
|
24773
|
+
// If no more targets or matchers, detach observer
|
|
24774
|
+
if (config.targets.size === 0 || config.matchers.size === 0) {
|
|
24775
|
+
_detachObserver(host);
|
|
24776
|
+
}
|
|
24777
|
+
};
|
|
24778
|
+
|
|
24779
|
+
/**
|
|
24780
|
+
* Generic function to transport attributes from a host element to a target element.
|
|
24781
|
+
*
|
|
24782
|
+
* @param {Object} params - The parameters object.
|
|
24783
|
+
* @param {HTMLElement} params.host - The host element from which to transport attributes.
|
|
24784
|
+
* @param {HTMLElement} params.target - The target element to which attributes will be transported.
|
|
24785
|
+
* @param {Function} params.matcher - Function that takes an attribute name and returns true if it should be transported.
|
|
24786
|
+
* @param {boolean} [params.removeOriginal=true] - Whether to remove original attributes from host.
|
|
24787
|
+
* @returns {void}
|
|
24788
|
+
* @private
|
|
24789
|
+
*/
|
|
24790
|
+
const _transportAttributes = ({ host, target, matcher, removeOriginal = true }) => {
|
|
24791
|
+
// Get a list of all matching attributes on the host element and their values
|
|
24792
|
+
const matchingAttributes = host.getAttributeNames()
|
|
24793
|
+
.filter(attr => matcher(attr))
|
|
24794
|
+
.reduce((acc, attr) => {
|
|
24795
|
+
acc[attr] = host.getAttribute(attr);
|
|
24796
|
+
return acc;
|
|
24797
|
+
}, {});
|
|
24798
|
+
|
|
24799
|
+
// Move matching attributes to the target element, removing them from the host if removeOriginal is true
|
|
24800
|
+
Object.entries(matchingAttributes).forEach(([key, value]) => {
|
|
24801
|
+
_setObservedAttribute(host, target, matcher, key, value);
|
|
24802
|
+
target.setAttribute(key, value);
|
|
24803
|
+
if (removeOriginal) {
|
|
24804
|
+
host.removeAttribute(key);
|
|
24805
|
+
}
|
|
24806
|
+
});
|
|
24807
|
+
};
|
|
24808
|
+
|
|
24809
|
+
/**
|
|
24810
|
+
* Attaches a MutationObserver to the host element to monitor attribute changes.
|
|
24811
|
+
*
|
|
24812
|
+
* @param {HTMLElement} host - The element to observe for attribute changes.
|
|
24813
|
+
* @returns {MutationObserver} The observer instance.
|
|
24814
|
+
* @private
|
|
24815
|
+
*/
|
|
24816
|
+
const _attachObserver = (host) => {
|
|
24817
|
+
// If an observer for this host already exists, return it
|
|
24818
|
+
if (_observers.has(host)) {
|
|
24819
|
+
return _observers.get(host);
|
|
24820
|
+
}
|
|
24821
|
+
|
|
24822
|
+
// Create a new MutationObserver
|
|
24823
|
+
const observer = new MutationObserver((mutations) => {
|
|
24824
|
+
const config = _transportConfig.get(host);
|
|
24825
|
+
if (!config) return;
|
|
24826
|
+
|
|
24827
|
+
// For each mutation affecting attributes
|
|
24828
|
+
mutations
|
|
24829
|
+
.filter(mutation => mutation.type === 'attributes')
|
|
24830
|
+
.forEach(mutation => {
|
|
24831
|
+
const attributeName = mutation.attributeName;
|
|
24832
|
+
|
|
24833
|
+
// Find matchers that care about this attribute
|
|
24834
|
+
for (const matcher of config.matchers) {
|
|
24835
|
+
if (matcher(attributeName)) {
|
|
24836
|
+
// For each target that uses this matcher
|
|
24837
|
+
for (const [target, matcherConfigs] of config.targets.entries()) {
|
|
24838
|
+
if (matcherConfigs.has(matcher)) {
|
|
24839
|
+
const { removeOriginal } = matcherConfigs.get(matcher);
|
|
24840
|
+
_transportAttributes({
|
|
24841
|
+
host,
|
|
24842
|
+
target,
|
|
24843
|
+
matcher,
|
|
24844
|
+
removeOriginal
|
|
24845
|
+
});
|
|
24846
|
+
}
|
|
24847
|
+
}
|
|
24848
|
+
}
|
|
24849
|
+
}
|
|
24850
|
+
});
|
|
24851
|
+
});
|
|
24852
|
+
|
|
24853
|
+
// Start observing attribute changes
|
|
24854
|
+
observer.observe(host, { attributes: true });
|
|
24855
|
+
|
|
24856
|
+
// Store the observer
|
|
24857
|
+
_observers.set(host, observer);
|
|
24858
|
+
|
|
24859
|
+
return observer;
|
|
24860
|
+
};
|
|
24861
|
+
|
|
24862
|
+
/**
|
|
24863
|
+
* Detaches and cleans up the MutationObserver for a given host element.
|
|
24864
|
+
*
|
|
24865
|
+
* @param {HTMLElement} host - The element whose observer should be detached.
|
|
24866
|
+
* @private
|
|
24867
|
+
*/
|
|
24868
|
+
const _detachObserver = (host) => {
|
|
24869
|
+
if (_observers.has(host)) {
|
|
24870
|
+
const observer = _observers.get(host);
|
|
24871
|
+
observer.disconnect();
|
|
24872
|
+
_observers.delete(host);
|
|
24873
|
+
}
|
|
24874
|
+
|
|
24875
|
+
// Clean up the transport config as well
|
|
24876
|
+
if (_transportConfig.has(host)) {
|
|
24877
|
+
_transportConfig.delete(host);
|
|
24878
|
+
}
|
|
24879
|
+
};
|
|
24880
|
+
|
|
24881
|
+
/**
|
|
24882
|
+
* Gets the matcher configuration for a specific host, target, and matcher
|
|
24883
|
+
* @param {HTMLElement} host - The host element
|
|
24884
|
+
* @param {HTMLElement} target - The target element
|
|
24885
|
+
* @param {Function} matcher - The matcher function
|
|
24886
|
+
* @returns {Object|undefined} The matcher configuration if found
|
|
24887
|
+
* @private
|
|
24888
|
+
*/
|
|
24889
|
+
const _getMatcherConfig = (host, target, matcher) => {
|
|
24890
|
+
const config = _transportConfig.get(host);
|
|
24891
|
+
if (!config) return undefined;
|
|
24892
|
+
|
|
24893
|
+
const targetMatchers = config.targets.get(target);
|
|
24894
|
+
if (!targetMatchers) return undefined;
|
|
24895
|
+
|
|
24896
|
+
return targetMatchers.get(matcher);
|
|
24897
|
+
};
|
|
24898
|
+
|
|
24899
|
+
/**
|
|
24900
|
+
* Sets an observed attribute value
|
|
24901
|
+
* @param {HTMLElement} host - The host element
|
|
24902
|
+
* @param {HTMLElement} target - The target element
|
|
24903
|
+
* @param {Function} matcher - The matcher function
|
|
24904
|
+
* @param {string} key - The attribute name
|
|
24905
|
+
* @param {string} value - The attribute value
|
|
24906
|
+
* @private
|
|
24907
|
+
*/
|
|
24908
|
+
const _setObservedAttribute = (host, target, matcher, key, value) => {
|
|
24909
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
24910
|
+
if (matcherConfig) {
|
|
24911
|
+
matcherConfig.currentAttributes.set(key, value);
|
|
24912
|
+
}
|
|
24913
|
+
};
|
|
24914
|
+
|
|
24915
|
+
const _getObservedAttribute = (host, target, matcher, attr) => {
|
|
24916
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
24917
|
+
if (matcherConfig) return matcherConfig.currentAttributes.get(attr);
|
|
24918
|
+
return undefined;
|
|
24919
|
+
};
|
|
24920
|
+
|
|
24921
|
+
const _getObservedAttributes = (host, target, matcher) => {
|
|
24922
|
+
const matcherConfig = _getMatcherConfig(host, target, matcher);
|
|
24923
|
+
if (matcherConfig) return Array.from(matcherConfig.currentAttributes.entries());
|
|
24924
|
+
return [];
|
|
24925
|
+
};
|
|
24926
|
+
|
|
24927
|
+
const _matchers = {
|
|
24928
|
+
'aria-': attr => attr.startsWith('aria-'),
|
|
24929
|
+
'role': attr => attr.match(/^role$/)
|
|
24930
|
+
};
|
|
24931
|
+
|
|
24932
|
+
const transportAllA11yAttributes = ({ host, target, removeOriginal = true }) => {
|
|
24933
|
+
return transportAttributes({
|
|
24934
|
+
host,
|
|
24935
|
+
target,
|
|
24936
|
+
match: attr => {
|
|
24937
|
+
for (const key in _matchers) {
|
|
24938
|
+
if (_matchers[key](attr)) return true;
|
|
24939
|
+
}
|
|
24940
|
+
return false;
|
|
24941
|
+
},
|
|
24942
|
+
removeOriginal
|
|
24943
|
+
});
|
|
24944
|
+
};
|
|
24945
|
+
|
|
24946
|
+
let AuroElement$3 = class AuroElement extends LitElement {
|
|
24947
|
+
|
|
24948
|
+
/**
|
|
24949
|
+
* @type {Object} return object from transportAttributes via a11yUtilities
|
|
24950
|
+
* @property {Function} cleanup - Function to clean up the attribute watcher.
|
|
24951
|
+
* @property {Function} getCurrentAttributes - Function to get the current attributes being watched and their values.
|
|
24952
|
+
* @property {Function} getObservedAttribute - Function to get the value of a specific observed attribute by name.
|
|
24953
|
+
* @private
|
|
24954
|
+
*/
|
|
24955
|
+
attributeWatcher;
|
|
24956
|
+
|
|
24957
|
+
static get properties() {
|
|
24958
|
+
return {
|
|
24959
|
+
|
|
24960
|
+
/**
|
|
24961
|
+
* Defines the layout of an element.
|
|
24962
|
+
* @default {'default'}
|
|
24963
|
+
*/
|
|
24964
|
+
layout: {
|
|
24965
|
+
type: String,
|
|
24966
|
+
attribute: "layout",
|
|
24967
|
+
reflect: true
|
|
24968
|
+
},
|
|
24969
|
+
|
|
24970
|
+
/**
|
|
24971
|
+
* Defines the shape of an element.
|
|
24972
|
+
* @property {'default', 'rounded', 'pill', 'circle'}
|
|
24973
|
+
* @default {'default'}
|
|
24974
|
+
*/
|
|
24975
|
+
shape: {
|
|
24976
|
+
type: String,
|
|
24977
|
+
attribute: "shape",
|
|
24978
|
+
reflect: true
|
|
24979
|
+
},
|
|
24980
|
+
|
|
24981
|
+
/**
|
|
24982
|
+
* Defines the size of an element.
|
|
24983
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'}
|
|
24984
|
+
* @default {'md'}
|
|
24985
|
+
*/
|
|
24986
|
+
size: {
|
|
24987
|
+
type: String,
|
|
24988
|
+
attribute: "size",
|
|
24989
|
+
reflect: true
|
|
24990
|
+
},
|
|
24991
|
+
|
|
24992
|
+
/**
|
|
24993
|
+
* This Boolean attribute lets you specify that the element should be rendered in dark mode.
|
|
24994
|
+
* @default {false}
|
|
24995
|
+
*/
|
|
24996
|
+
onDark: {
|
|
24997
|
+
type: Boolean,
|
|
24998
|
+
attribute: "ondark",
|
|
24999
|
+
reflect: true
|
|
25000
|
+
},
|
|
23284
25001
|
|
|
25002
|
+
/**
|
|
25003
|
+
* A reference to the wrapper element in the shadow DOM.
|
|
25004
|
+
* This is used to apply layout and shape classes dynamically.
|
|
25005
|
+
* @type {HTMLElement|null}
|
|
25006
|
+
* @default {null}
|
|
25007
|
+
* @private
|
|
25008
|
+
*/
|
|
25009
|
+
wrapper: {
|
|
25010
|
+
type: HTMLElement,
|
|
25011
|
+
attribute: false,
|
|
25012
|
+
reflect: false
|
|
25013
|
+
}
|
|
25014
|
+
};
|
|
25015
|
+
}
|
|
23285
25016
|
|
|
23286
|
-
|
|
25017
|
+
|
|
23287
25018
|
|
|
23288
|
-
|
|
23289
|
-
|
|
23290
|
-
* @private
|
|
23291
|
-
* @param {string} baseName - Defines the first part of the unique element name.
|
|
23292
|
-
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
23293
|
-
* @returns {string} - Unique string to be used for naming.
|
|
23294
|
-
*/
|
|
23295
|
-
generateElementName(baseName, version) {
|
|
23296
|
-
let result = baseName;
|
|
25019
|
+
resetShapeClasses() {
|
|
25020
|
+
if (this.shape && this.size) {
|
|
23297
25021
|
|
|
23298
|
-
|
|
23299
|
-
|
|
25022
|
+
if (this.wrapper) {
|
|
25023
|
+
this.wrapper.classList.forEach((className) => {
|
|
25024
|
+
if (className.startsWith('shape-')) {
|
|
25025
|
+
this.wrapper.classList.remove(className);
|
|
25026
|
+
}
|
|
25027
|
+
});
|
|
23300
25028
|
|
|
23301
|
-
|
|
25029
|
+
this.wrapper.classList.add(`shape-${this.shape.toLowerCase()}-${this.size.toLowerCase()}`);
|
|
25030
|
+
}
|
|
25031
|
+
}
|
|
23302
25032
|
}
|
|
23303
25033
|
|
|
23304
|
-
|
|
23305
|
-
|
|
23306
|
-
|
|
23307
|
-
|
|
23308
|
-
|
|
23309
|
-
|
|
23310
|
-
|
|
23311
|
-
|
|
23312
|
-
const tag = literal`${unsafeStatic(elementName)}`;
|
|
25034
|
+
resetLayoutClasses() {
|
|
25035
|
+
if (this.layout) {
|
|
25036
|
+
if (this.wrapper) {
|
|
25037
|
+
this.wrapper.classList.forEach((className) => {
|
|
25038
|
+
if (className.startsWith('layout-')) {
|
|
25039
|
+
this.wrapper.classList.remove(className);
|
|
25040
|
+
}
|
|
25041
|
+
});
|
|
23313
25042
|
|
|
23314
|
-
|
|
23315
|
-
|
|
25043
|
+
this.wrapper.classList.add(`layout-${this.layout.toLowerCase()}`);
|
|
25044
|
+
}
|
|
23316
25045
|
}
|
|
23317
|
-
|
|
23318
|
-
return tag;
|
|
23319
25046
|
}
|
|
23320
|
-
}
|
|
23321
|
-
|
|
23322
|
-
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
23323
|
-
// See LICENSE in the project root for license information.
|
|
23324
|
-
|
|
23325
|
-
// ---------------------------------------------------------------------
|
|
23326
|
-
|
|
23327
|
-
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
23328
|
-
|
|
23329
|
-
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
23330
25047
|
|
|
23331
|
-
|
|
25048
|
+
updateComponentArchitecture() {
|
|
25049
|
+
this.resetLayoutClasses();
|
|
25050
|
+
this.resetShapeClasses();
|
|
25051
|
+
}
|
|
23332
25052
|
|
|
23333
|
-
|
|
23334
|
-
|
|
23335
|
-
|
|
23336
|
-
* @param {Object} componentClass - The class to register as a custom element.
|
|
23337
|
-
* @returns {void}
|
|
23338
|
-
*/
|
|
23339
|
-
registerComponent(name, componentClass) {
|
|
23340
|
-
if (!customElements.get(name)) {
|
|
23341
|
-
customElements.define(name, class extends componentClass {});
|
|
25053
|
+
updated(changedProperties) {
|
|
25054
|
+
if (changedProperties.has('layout') || changedProperties.has('shape') || changedProperties.has('size')) {
|
|
25055
|
+
this.updateComponentArchitecture();
|
|
23342
25056
|
}
|
|
23343
25057
|
}
|
|
23344
25058
|
|
|
23345
|
-
|
|
23346
|
-
|
|
23347
|
-
|
|
23348
|
-
|
|
23349
|
-
|
|
23350
|
-
|
|
23351
|
-
|
|
23352
|
-
|
|
23353
|
-
!el || el === document || el === window
|
|
23354
|
-
? null // standard .closest() returns null for non-found selectors also
|
|
23355
|
-
: found
|
|
23356
|
-
? found // found a selector INside this element
|
|
23357
|
-
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
23358
|
-
) {
|
|
23359
|
-
return __Closest(base);
|
|
25059
|
+
firstUpdated() {
|
|
25060
|
+
super.firstUpdated();
|
|
25061
|
+
|
|
25062
|
+
// Set a reference to the wrapper element in the shadow DOM
|
|
25063
|
+
this.wrapper = this.shadowRoot.querySelector('.wrapper');
|
|
25064
|
+
|
|
25065
|
+
// Initialize the transportation of ARIA attributes to the target element and get the disconnect function for cleanup
|
|
25066
|
+
this.attributeWatcher = transportAllA11yAttributes({ host: this, target: this.shadowRoot.querySelector('.wrapper') });
|
|
23360
25067
|
}
|
|
23361
|
-
/* eslint-enable jsdoc/require-param */
|
|
23362
25068
|
|
|
23363
|
-
|
|
23364
|
-
|
|
23365
|
-
* @param {Object} elem - The element to check.
|
|
23366
|
-
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
23367
|
-
* @returns {void}
|
|
23368
|
-
*/
|
|
23369
|
-
handleComponentTagRename(elem, tagName) {
|
|
23370
|
-
const tag = tagName.toLowerCase();
|
|
23371
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
25069
|
+
disconnectedCallback() {
|
|
25070
|
+
super.disconnectedCallback();
|
|
23372
25071
|
|
|
23373
|
-
|
|
23374
|
-
|
|
25072
|
+
// Cleanup the ARIA observer if it exists
|
|
25073
|
+
if (this.attributeWatcher) {
|
|
25074
|
+
this.attributeWatcher.cleanup();
|
|
25075
|
+
this.attributeWatcher = null;
|
|
23375
25076
|
}
|
|
23376
25077
|
}
|
|
23377
25078
|
|
|
23378
|
-
|
|
23379
|
-
|
|
23380
|
-
|
|
23381
|
-
|
|
23382
|
-
|
|
23383
|
-
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
const elemTag = elem.tagName.toLowerCase();
|
|
25079
|
+
// Try to render the defined `this.layout` layout. If that fails, fall back to the default layout.
|
|
25080
|
+
// This will catch if an invalid layout value is passed in and render the default layout if so.
|
|
25081
|
+
render() {
|
|
25082
|
+
try {
|
|
25083
|
+
return this.renderLayout();
|
|
25084
|
+
} catch (error) {
|
|
25085
|
+
// failed to get the defined layout
|
|
25086
|
+
console.error('Failed to get the defined layout - using the default layout', error); // eslint-disable-line no-console
|
|
23387
25087
|
|
|
23388
|
-
|
|
25088
|
+
// fallback to the default layout
|
|
25089
|
+
return this.getLayout('default');
|
|
25090
|
+
}
|
|
23389
25091
|
}
|
|
23390
25092
|
};
|
|
23391
25093
|
|
|
23392
|
-
var styleCss$2 = css`: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
|
|
25094
|
+
var styleCss$2 = css`: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}`;
|
|
25095
|
+
|
|
25096
|
+
var colorCss$2 = css`[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)}`;
|
|
23393
25097
|
|
|
23394
|
-
var
|
|
25098
|
+
var tokensCss$2 = css`: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}`;
|
|
23395
25099
|
|
|
23396
|
-
var
|
|
25100
|
+
var shapeSize = css`.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}`;
|
|
23397
25101
|
|
|
23398
25102
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
23399
25103
|
// See LICENSE in the project root for license information.
|
|
@@ -23612,7 +25316,7 @@ class AuroLoader extends LitElement {
|
|
|
23612
25316
|
|
|
23613
25317
|
var loaderVersion = '5.0.0';
|
|
23614
25318
|
|
|
23615
|
-
/* eslint-disable max-lines */
|
|
25319
|
+
/* eslint-disable max-lines, curly */
|
|
23616
25320
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
23617
25321
|
// See LICENSE in the project root for license information.
|
|
23618
25322
|
|
|
@@ -23628,7 +25332,18 @@ var loaderVersion = '5.0.0';
|
|
|
23628
25332
|
|
|
23629
25333
|
/* eslint-disable lit/no-invalid-html, lit/binding-positions */
|
|
23630
25334
|
|
|
23631
|
-
|
|
25335
|
+
const ICON_ONLY_SHAPES = ['circle'];
|
|
25336
|
+
|
|
25337
|
+
/**
|
|
25338
|
+
* AuroButton is a custom element that provides a styled, accessible button with support for various states and form association.
|
|
25339
|
+
* It is designed to be flexible, supporting loading states, icon slots, and integration with HTML5 forms.
|
|
25340
|
+
* @property {'default', 'rounded', 'pill', 'circle'} shape - Defines the shape of the button.
|
|
25341
|
+
* @property {'xs', 'sm', 'md', 'lg', 'xl'} size - Defines the size of the button.
|
|
25342
|
+
* @property {'primary', 'secondary', 'tertiary', 'ghost', 'flat'} variant - Sets the button variant.
|
|
25343
|
+
* @property {'submit', 'reset', 'button'} type - The type of button. Matches HTML5 Button Spec.
|
|
25344
|
+
* @property {boolean} onDark - Indicates if the button is rendered in dark mode.
|
|
25345
|
+
*/
|
|
25346
|
+
class AuroButton extends AuroElement$3 {
|
|
23632
25347
|
|
|
23633
25348
|
/**
|
|
23634
25349
|
* Enables form association for this element.
|
|
@@ -23643,13 +25358,10 @@ class AuroButton extends LitElement {
|
|
|
23643
25358
|
super();
|
|
23644
25359
|
this.autofocus = false;
|
|
23645
25360
|
this.disabled = false;
|
|
23646
|
-
this.iconOnly = false;
|
|
23647
25361
|
this.loading = false;
|
|
25362
|
+
this.size = "md";
|
|
25363
|
+
this.shape = "rounded";
|
|
23648
25364
|
this.onDark = false;
|
|
23649
|
-
this.secondary = false;
|
|
23650
|
-
this.tertiary = false;
|
|
23651
|
-
this.rounded = false;
|
|
23652
|
-
this.slim = false;
|
|
23653
25365
|
this.fluid = false;
|
|
23654
25366
|
this.loadingText = this.loadingText || 'Loading...';
|
|
23655
25367
|
|
|
@@ -23678,43 +25390,38 @@ class AuroButton extends LitElement {
|
|
|
23678
25390
|
return [
|
|
23679
25391
|
tokensCss$2,
|
|
23680
25392
|
styleCss$2,
|
|
23681
|
-
colorCss$2
|
|
25393
|
+
colorCss$2,
|
|
25394
|
+
shapeSize
|
|
23682
25395
|
];
|
|
23683
25396
|
}
|
|
23684
25397
|
|
|
23685
25398
|
static get properties() {
|
|
23686
25399
|
return {
|
|
23687
25400
|
|
|
23688
|
-
|
|
23689
|
-
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
23690
|
-
*/
|
|
23691
|
-
autofocus: {
|
|
23692
|
-
type: Boolean,
|
|
23693
|
-
reflect: true
|
|
23694
|
-
},
|
|
25401
|
+
...super.properties,
|
|
23695
25402
|
|
|
23696
25403
|
/**
|
|
23697
|
-
*
|
|
25404
|
+
* Override layout since it isn't used in this component.
|
|
25405
|
+
* @private
|
|
23698
25406
|
*/
|
|
23699
|
-
|
|
25407
|
+
layout: {
|
|
23700
25408
|
type: Boolean,
|
|
23701
|
-
|
|
25409
|
+
attribute: false,
|
|
25410
|
+
reflect: false
|
|
23702
25411
|
},
|
|
23703
25412
|
|
|
23704
25413
|
/**
|
|
23705
|
-
*
|
|
23706
|
-
* @deprecated
|
|
25414
|
+
* This Boolean attribute lets you specify that the button should have input focus when the page loads, unless overridden by the user.
|
|
23707
25415
|
*/
|
|
23708
|
-
|
|
25416
|
+
autofocus: {
|
|
23709
25417
|
type: Boolean,
|
|
23710
25418
|
reflect: true
|
|
23711
25419
|
},
|
|
23712
25420
|
|
|
23713
25421
|
/**
|
|
23714
|
-
*
|
|
23715
|
-
* @deprecated
|
|
25422
|
+
* If set to true, button will become disabled and not allow for interactions.
|
|
23716
25423
|
*/
|
|
23717
|
-
|
|
25424
|
+
disabled: {
|
|
23718
25425
|
type: Boolean,
|
|
23719
25426
|
reflect: true
|
|
23720
25427
|
},
|
|
@@ -23722,15 +25429,7 @@ class AuroButton extends LitElement {
|
|
|
23722
25429
|
/**
|
|
23723
25430
|
* Alters the shape of the button to be full width of its parent container.
|
|
23724
25431
|
*/
|
|
23725
|
-
fluid:
|
|
23726
|
-
type: Boolean,
|
|
23727
|
-
reflect: true
|
|
23728
|
-
},
|
|
23729
|
-
|
|
23730
|
-
/**
|
|
23731
|
-
* If set to true, the button will contain an icon with no additional content.
|
|
23732
|
-
*/
|
|
23733
|
-
iconOnly: {
|
|
25432
|
+
fluid: {
|
|
23734
25433
|
type: Boolean,
|
|
23735
25434
|
reflect: true
|
|
23736
25435
|
},
|
|
@@ -23738,7 +25437,7 @@ class AuroButton extends LitElement {
|
|
|
23738
25437
|
/**
|
|
23739
25438
|
* If set to true button text will be replaced with `auro-loader` and become disabled.
|
|
23740
25439
|
*/
|
|
23741
|
-
loading:
|
|
25440
|
+
loading: {
|
|
23742
25441
|
type: Boolean,
|
|
23743
25442
|
reflect: true
|
|
23744
25443
|
},
|
|
@@ -23746,34 +25445,10 @@ class AuroButton extends LitElement {
|
|
|
23746
25445
|
/**
|
|
23747
25446
|
* 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.
|
|
23748
25447
|
*/
|
|
23749
|
-
loadingText:
|
|
25448
|
+
loadingText: {
|
|
23750
25449
|
type: String
|
|
23751
25450
|
},
|
|
23752
25451
|
|
|
23753
|
-
/**
|
|
23754
|
-
* Set value for on-dark version of auro-button.
|
|
23755
|
-
*/
|
|
23756
|
-
onDark: {
|
|
23757
|
-
type: Boolean,
|
|
23758
|
-
reflect: true
|
|
23759
|
-
},
|
|
23760
|
-
|
|
23761
|
-
/**
|
|
23762
|
-
* If set to true, the button will have a rounded shape.
|
|
23763
|
-
*/
|
|
23764
|
-
rounded: {
|
|
23765
|
-
type: Boolean,
|
|
23766
|
-
reflect: true
|
|
23767
|
-
},
|
|
23768
|
-
|
|
23769
|
-
/**
|
|
23770
|
-
* Set value for slim version of auro-button.
|
|
23771
|
-
*/
|
|
23772
|
-
slim: {
|
|
23773
|
-
type: Boolean,
|
|
23774
|
-
reflect: true
|
|
23775
|
-
},
|
|
23776
|
-
|
|
23777
25452
|
/**
|
|
23778
25453
|
* Populates `tabIndex` to define the focusable sequence in keyboard navigation.
|
|
23779
25454
|
*/
|
|
@@ -23782,48 +25457,10 @@ class AuroButton extends LitElement {
|
|
|
23782
25457
|
reflect: true
|
|
23783
25458
|
},
|
|
23784
25459
|
|
|
23785
|
-
/**
|
|
23786
|
-
* Populates the `aria-hidden` attribute to hide the button from a11y API.
|
|
23787
|
-
*/
|
|
23788
|
-
ariahidden: {
|
|
23789
|
-
type: String,
|
|
23790
|
-
reflect: true,
|
|
23791
|
-
},
|
|
23792
|
-
|
|
23793
|
-
/**
|
|
23794
|
-
* Populates the `aria-label` attribute that is used to define a string that labels the current element.
|
|
23795
|
-
* Use it in cases where a text label is not visible on the screen.
|
|
23796
|
-
* If there is visible text labeling the element, use `aria-labelledby` instead.
|
|
23797
|
-
*/
|
|
23798
|
-
arialabel: {
|
|
23799
|
-
type: String,
|
|
23800
|
-
reflect: true
|
|
23801
|
-
},
|
|
23802
|
-
|
|
23803
|
-
/**
|
|
23804
|
-
* Populates the `aria-labelledby` attribute that establishes relationships between objects and their label(s),
|
|
23805
|
-
* and its value should be one or more element IDs, which refer to elements that have the text needed for labeling.
|
|
23806
|
-
* List multiple element IDs in a space delimited fashion.
|
|
23807
|
-
*/
|
|
23808
|
-
arialabelledby: {
|
|
23809
|
-
type: String,
|
|
23810
|
-
reflect: true
|
|
23811
|
-
},
|
|
23812
|
-
|
|
23813
|
-
/**
|
|
23814
|
-
* Populates the `aria-expanded` attribute that indicates whether the element,
|
|
23815
|
-
* or another grouping element it controls, is currently expanded or collapsed.
|
|
23816
|
-
* This is an optional attribute for buttons.
|
|
23817
|
-
*/
|
|
23818
|
-
ariaexpanded: {
|
|
23819
|
-
type: Boolean,
|
|
23820
|
-
reflect: true
|
|
23821
|
-
},
|
|
23822
|
-
|
|
23823
25460
|
/**
|
|
23824
25461
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
23825
25462
|
*/
|
|
23826
|
-
title:
|
|
25463
|
+
title: {
|
|
23827
25464
|
type: String,
|
|
23828
25465
|
reflect: true
|
|
23829
25466
|
},
|
|
@@ -23831,7 +25468,7 @@ class AuroButton extends LitElement {
|
|
|
23831
25468
|
/**
|
|
23832
25469
|
* The type of the button. Possible values are: `submit`, `reset`, `button`.
|
|
23833
25470
|
*/
|
|
23834
|
-
type:
|
|
25471
|
+
type: {
|
|
23835
25472
|
type: String,
|
|
23836
25473
|
reflect: true
|
|
23837
25474
|
},
|
|
@@ -23839,19 +25476,19 @@ class AuroButton extends LitElement {
|
|
|
23839
25476
|
/**
|
|
23840
25477
|
* Defines the value associated with the button which is submitted with the form data.
|
|
23841
25478
|
*/
|
|
23842
|
-
value:
|
|
25479
|
+
value: {
|
|
23843
25480
|
type: String,
|
|
23844
25481
|
reflect: true
|
|
23845
25482
|
},
|
|
23846
25483
|
|
|
23847
25484
|
/**
|
|
23848
|
-
* Sets button variant option.
|
|
25485
|
+
* Sets button variant option.
|
|
25486
|
+
* @default primary
|
|
23849
25487
|
*/
|
|
23850
|
-
variant:
|
|
25488
|
+
variant: {
|
|
23851
25489
|
type: String,
|
|
23852
25490
|
reflect: true
|
|
23853
25491
|
},
|
|
23854
|
-
ready: { type: Boolean },
|
|
23855
25492
|
};
|
|
23856
25493
|
}
|
|
23857
25494
|
|
|
@@ -23864,7 +25501,7 @@ class AuroButton extends LitElement {
|
|
|
23864
25501
|
*
|
|
23865
25502
|
*/
|
|
23866
25503
|
static register(name = "auro-button") {
|
|
23867
|
-
AuroLibraryRuntimeUtils$
|
|
25504
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroButton);
|
|
23868
25505
|
}
|
|
23869
25506
|
|
|
23870
25507
|
/**
|
|
@@ -23876,17 +25513,6 @@ class AuroButton extends LitElement {
|
|
|
23876
25513
|
this.renderRoot.querySelector('button').focus();
|
|
23877
25514
|
}
|
|
23878
25515
|
|
|
23879
|
-
updated() {
|
|
23880
|
-
// support the old `secondary` and `tertiary` attributes` that are deprecated
|
|
23881
|
-
if (this.secondary) {
|
|
23882
|
-
this.setAttribute('variant', 'secondary');
|
|
23883
|
-
}
|
|
23884
|
-
|
|
23885
|
-
if (this.tertiary) {
|
|
23886
|
-
this.setAttribute('variant', 'tertiary');
|
|
23887
|
-
}
|
|
23888
|
-
}
|
|
23889
|
-
|
|
23890
25516
|
/**
|
|
23891
25517
|
* Submits the form that this button is associated with.
|
|
23892
25518
|
* @private
|
|
@@ -23907,25 +25533,56 @@ class AuroButton extends LitElement {
|
|
|
23907
25533
|
return this.internals ? this.internals.form : null;
|
|
23908
25534
|
}
|
|
23909
25535
|
|
|
23910
|
-
|
|
25536
|
+
/**
|
|
25537
|
+
* @private
|
|
25538
|
+
* @returns {Boolean}
|
|
25539
|
+
*/
|
|
25540
|
+
get hideText() {
|
|
25541
|
+
return ICON_ONLY_SHAPES.includes(this.shape);
|
|
25542
|
+
}
|
|
25543
|
+
|
|
25544
|
+
/**
|
|
25545
|
+
* Returns the current value of the projected `aria-label` attribute or undefined if not set.
|
|
25546
|
+
* @returns {string | undefined}
|
|
25547
|
+
* @private
|
|
25548
|
+
*/
|
|
25549
|
+
get currentAriaLabel() {
|
|
25550
|
+
if (!this.attributeWatcher) return undefined;
|
|
25551
|
+
|
|
25552
|
+
const ariaLabel = this.attributeWatcher.getObservedAttribute("aria-label");
|
|
25553
|
+
return ariaLabel || undefined;
|
|
25554
|
+
}
|
|
25555
|
+
|
|
25556
|
+
/**
|
|
25557
|
+
* Returns the current value of the projected `aria-labelledby` attribute or undefined if not set.
|
|
25558
|
+
* @returns {string | undefined}
|
|
25559
|
+
* @private
|
|
25560
|
+
*/
|
|
25561
|
+
get currentAriaLabelledBy() {
|
|
25562
|
+
if (!this.attributeWatcher) return undefined;
|
|
25563
|
+
|
|
25564
|
+
const ariaLabelledBy = this.attributeWatcher.getObservedAttribute("aria-labelledby");
|
|
25565
|
+
return ariaLabelledBy || undefined;
|
|
25566
|
+
}
|
|
25567
|
+
|
|
25568
|
+
/**
|
|
25569
|
+
* Renders the default layout for the button.
|
|
25570
|
+
* @returns {TemplateResult}
|
|
25571
|
+
* @private
|
|
25572
|
+
*/
|
|
25573
|
+
renderLayoutDefault() {
|
|
23911
25574
|
const classes = {
|
|
23912
|
-
|
|
23913
|
-
|
|
23914
|
-
|
|
23915
|
-
|
|
23916
|
-
'auro-button--slim': this.slim,
|
|
23917
|
-
'auro-button--iconOnly': this.iconOnly,
|
|
23918
|
-
'auro-button--iconOnlySlim': this.iconOnly && this.slim,
|
|
23919
|
-
'loading': this.loading
|
|
25575
|
+
"util_insetLg--squish": true,
|
|
25576
|
+
"auro-button": true,
|
|
25577
|
+
wrapper: true,
|
|
25578
|
+
loading: this.loading,
|
|
23920
25579
|
};
|
|
23921
25580
|
|
|
23922
25581
|
return html$1`
|
|
23923
25582
|
<button
|
|
23924
25583
|
part="button"
|
|
23925
|
-
aria-
|
|
23926
|
-
aria-
|
|
23927
|
-
aria-labelledby="${ifDefined(this.arialabelledby ? this.arialabelledby : undefined)}"
|
|
23928
|
-
aria-expanded="${ifDefined(this.ariaexpanded)}"
|
|
25584
|
+
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
25585
|
+
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
23929
25586
|
tabIndex="${ifDefined(this.tIndex)}"
|
|
23930
25587
|
?autofocus="${this.autofocus}"
|
|
23931
25588
|
class="${classMap(classes)}"
|
|
@@ -23942,7 +25599,7 @@ class AuroButton extends LitElement {
|
|
|
23942
25599
|
|
|
23943
25600
|
<span class="contentWrapper">
|
|
23944
25601
|
<span class="textSlot" part="text">
|
|
23945
|
-
${this.
|
|
25602
|
+
${this.hideText ? undefined : html$1`<slot></slot>`}
|
|
23946
25603
|
</span>
|
|
23947
25604
|
|
|
23948
25605
|
<span part="icon">
|
|
@@ -23952,6 +25609,15 @@ class AuroButton extends LitElement {
|
|
|
23952
25609
|
</button>
|
|
23953
25610
|
`;
|
|
23954
25611
|
}
|
|
25612
|
+
|
|
25613
|
+
/**
|
|
25614
|
+
* Renders the layout of the button
|
|
25615
|
+
* @returns {TemplateResult}
|
|
25616
|
+
* @private
|
|
25617
|
+
*/
|
|
25618
|
+
renderLayout() {
|
|
25619
|
+
return this.renderLayoutDefault();
|
|
25620
|
+
}
|
|
23955
25621
|
}
|
|
23956
25622
|
|
|
23957
25623
|
var buttonVersion = '9.3.0';
|
|
@@ -23969,7 +25635,7 @@ var tokensCss$5 = css`:host{--ds-auro-helptext-color: var(--ds-basic-color-texti
|
|
|
23969
25635
|
|
|
23970
25636
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
23971
25637
|
|
|
23972
|
-
let AuroLibraryRuntimeUtils$
|
|
25638
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
23973
25639
|
|
|
23974
25640
|
/* eslint-disable jsdoc/require-param */
|
|
23975
25641
|
|
|
@@ -24050,7 +25716,7 @@ class AuroHelpText extends LitElement {
|
|
|
24050
25716
|
this.onDark = false;
|
|
24051
25717
|
this.hasTextContent = false;
|
|
24052
25718
|
|
|
24053
|
-
AuroLibraryRuntimeUtils$
|
|
25719
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
24054
25720
|
}
|
|
24055
25721
|
|
|
24056
25722
|
static get styles() {
|
|
@@ -24106,7 +25772,7 @@ class AuroHelpText extends LitElement {
|
|
|
24106
25772
|
*
|
|
24107
25773
|
*/
|
|
24108
25774
|
static register(name = "auro-helptext") {
|
|
24109
|
-
AuroLibraryRuntimeUtils$
|
|
25775
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
24110
25776
|
}
|
|
24111
25777
|
|
|
24112
25778
|
updated() {
|
|
@@ -24177,7 +25843,7 @@ class AuroInput extends BaseInput {
|
|
|
24177
25843
|
/**
|
|
24178
25844
|
* Generate unique names for dependency components.
|
|
24179
25845
|
*/
|
|
24180
|
-
const versioning = new AuroDependencyVersioning
|
|
25846
|
+
const versioning = new AuroDependencyVersioning();
|
|
24181
25847
|
|
|
24182
25848
|
/**
|
|
24183
25849
|
* @private
|
|
@@ -24298,7 +25964,7 @@ class AuroInput extends BaseInput {
|
|
|
24298
25964
|
*
|
|
24299
25965
|
*/
|
|
24300
25966
|
static register(name = "auro-input") {
|
|
24301
|
-
AuroLibraryRuntimeUtils$
|
|
25967
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroInput);
|
|
24302
25968
|
}
|
|
24303
25969
|
|
|
24304
25970
|
/**
|
|
@@ -24428,11 +26094,12 @@ class AuroInput extends BaseInput {
|
|
|
24428
26094
|
?onDark="${this.onDark}"
|
|
24429
26095
|
aria-label="${i18n$1(this.lang, 'clearInput')}"
|
|
24430
26096
|
class="notificationBtn clearBtn"
|
|
24431
|
-
|
|
24432
|
-
|
|
26097
|
+
shape="circle"
|
|
26098
|
+
size="sm"
|
|
26099
|
+
variant="ghost">
|
|
24433
26100
|
<${this.iconTag}
|
|
26101
|
+
customColor="${this.onDark}"
|
|
24434
26102
|
category="interface"
|
|
24435
|
-
customColor
|
|
24436
26103
|
name="x-lg"
|
|
24437
26104
|
>
|
|
24438
26105
|
</${this.iconTag}>
|
|
@@ -24452,20 +26119,21 @@ class AuroInput extends BaseInput {
|
|
|
24452
26119
|
<${this.buttonTag}
|
|
24453
26120
|
@click="${this.handleClickShowPassword}"
|
|
24454
26121
|
?onDark="${this.onDark}"
|
|
24455
|
-
aria-hidden="true"
|
|
24456
26122
|
class="notificationBtn passwordBtn"
|
|
24457
|
-
|
|
24458
|
-
|
|
26123
|
+
aria-label="${this.showPassword ? i18n$1(this.lang, "hidePassword") : i18n$1(this.lang, "showPassword")}"
|
|
26124
|
+
shape="circle"
|
|
26125
|
+
size="sm"
|
|
26126
|
+
variant="ghost">
|
|
24459
26127
|
<${this.iconTag}
|
|
26128
|
+
customColor="${this.onDark}"
|
|
24460
26129
|
?hidden=${!this.showPassword}
|
|
24461
26130
|
category="interface"
|
|
24462
|
-
customColor
|
|
24463
26131
|
name="hide-password-stroke">
|
|
24464
26132
|
</${this.iconTag}>
|
|
24465
26133
|
<${this.iconTag}
|
|
26134
|
+
customColor="${this.onDark}"
|
|
24466
26135
|
?hidden=${this.showPassword}
|
|
24467
26136
|
category="interface"
|
|
24468
|
-
customColor
|
|
24469
26137
|
name="view-password-stroke">
|
|
24470
26138
|
</${this.iconTag}>
|
|
24471
26139
|
</${this.buttonTag}>
|
|
@@ -24831,6 +26499,8 @@ const stringsES = {
|
|
|
24831
26499
|
'dateMM': 'Ingrese una fecha completa en el formato MM',
|
|
24832
26500
|
'dateDD': 'Ingrese una fecha completa en el formato DD',
|
|
24833
26501
|
'clearInput': 'Borrar campo de entrada',
|
|
26502
|
+
'showPassword': 'Mostrar contraseña',
|
|
26503
|
+
'hidePassword': 'Ocultar contraseña'
|
|
24834
26504
|
};
|
|
24835
26505
|
|
|
24836
26506
|
const stringsEN = {
|
|
@@ -24855,6 +26525,8 @@ const stringsEN = {
|
|
|
24855
26525
|
'dateMM': 'Please enter a complete date in the format MM',
|
|
24856
26526
|
'dateDD': 'Please enter a complete date in the format DD',
|
|
24857
26527
|
'clearInput': 'Clear input field',
|
|
26528
|
+
'showPassword': 'Show password',
|
|
26529
|
+
'hidePassword': 'Hide password'
|
|
24858
26530
|
};
|
|
24859
26531
|
|
|
24860
26532
|
/**
|
|
@@ -25218,8 +26890,12 @@ class AuroIcon extends BaseIcon {
|
|
|
25218
26890
|
async firstUpdated() {
|
|
25219
26891
|
await super.firstUpdated();
|
|
25220
26892
|
|
|
25221
|
-
|
|
25222
|
-
|
|
26893
|
+
/**
|
|
26894
|
+
* icons provide a description for screen readers. Icon only instances Auro-button
|
|
26895
|
+
* depend on this description to provide context for the user using a screen reader.
|
|
26896
|
+
* Removes the SVG description for screen reader if ariaHidden is set to true.
|
|
26897
|
+
*/
|
|
26898
|
+
if (this.hasAttribute('ariaHidden') && this.svg) {
|
|
25223
26899
|
const svgDesc = this.svg.querySelector('desc');
|
|
25224
26900
|
|
|
25225
26901
|
if (svgDesc) {
|
|
@@ -25368,7 +27044,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
25368
27044
|
/**
|
|
25369
27045
|
* @private
|
|
25370
27046
|
*/
|
|
25371
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
27047
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$9();
|
|
25372
27048
|
|
|
25373
27049
|
/**
|
|
25374
27050
|
* @private
|
|
@@ -25378,7 +27054,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
25378
27054
|
/**
|
|
25379
27055
|
* Generate unique names for dependency components.
|
|
25380
27056
|
*/
|
|
25381
|
-
const versioning = new AuroDependencyVersioning$
|
|
27057
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
25382
27058
|
|
|
25383
27059
|
/**
|
|
25384
27060
|
* @private
|
|
@@ -25709,7 +27385,7 @@ class AuroDatePicker extends AuroElement$1 {
|
|
|
25709
27385
|
*
|
|
25710
27386
|
*/
|
|
25711
27387
|
static register(name = "auro-datepicker") {
|
|
25712
|
-
AuroLibraryRuntimeUtils$
|
|
27388
|
+
AuroLibraryRuntimeUtils$9.prototype.registerComponent(name, AuroDatePicker);
|
|
25713
27389
|
}
|
|
25714
27390
|
|
|
25715
27391
|
/**
|