@aurodesignsystem/auro-formkit 2.0.3-beta.1 → 2.1.0-beta.2
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/CHANGELOG.md +19 -0
- package/components/bibtemplate/dist/index.js +148 -8
- package/components/bibtemplate/dist/registered.js +148 -8
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.min.js +644 -113
- package/components/combobox/demo/index.min.js +644 -113
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/index.js +511 -50
- package/components/combobox/dist/registered.js +511 -50
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +500 -39
- package/components/counter/demo/index.js +1 -0
- package/components/counter/demo/index.min.js +501 -39
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/index.js +500 -39
- package/components/counter/dist/registered.js +500 -39
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.md +30 -0
- package/components/datepicker/demo/api.min.js +1281 -207
- package/components/datepicker/demo/index.min.js +1281 -207
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-calendar.d.ts +5 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +7 -0
- package/components/datepicker/dist/buttonVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +1281 -207
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +1281 -207
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.min.js +81 -10
- package/components/dropdown/demo/index.min.js +81 -10
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/index.js +81 -10
- package/components/dropdown/dist/registered.js +81 -10
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/api.min.js +263 -13
- package/components/input/demo/index.min.js +263 -13
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/index.js +263 -13
- package/components/input/dist/registered.js +263 -13
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.min.js +77 -7
- package/components/menu/demo/index.min.js +77 -7
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/index.js +77 -7
- package/components/menu/dist/registered.js +77 -7
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +1 -1
- package/components/select/demo/api.min.js +319 -38
- package/components/select/demo/index.min.js +319 -38
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/index.js +240 -29
- package/components/select/dist/registered.js +240 -29
- package/package.json +2 -2
|
@@ -51,7 +51,7 @@ const a=Symbol.for(""),o$1=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litS
|
|
|
51
51
|
|
|
52
52
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
53
53
|
|
|
54
|
-
let AuroLibraryRuntimeUtils$
|
|
54
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
55
55
|
|
|
56
56
|
/* eslint-disable jsdoc/require-param */
|
|
57
57
|
|
|
@@ -120,7 +120,7 @@ let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
|
120
120
|
|
|
121
121
|
class AuroFormValidation {
|
|
122
122
|
constructor() {
|
|
123
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
123
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
/**
|
|
@@ -478,7 +478,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
478
478
|
|
|
479
479
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
480
480
|
|
|
481
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
481
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
482
482
|
|
|
483
483
|
/* eslint-disable jsdoc/require-param */
|
|
484
484
|
|
|
@@ -2291,11 +2291,11 @@ class AuroFloatingUI {
|
|
|
2291
2291
|
|
|
2292
2292
|
updateCurrentExpandedDropdown() {
|
|
2293
2293
|
// Close any other dropdown that is already open
|
|
2294
|
-
if (document.
|
|
2295
|
-
|
|
2294
|
+
if (document.expandedAuroFormkitDropdown) {
|
|
2295
|
+
document.expandedAuroFormkitDropdown.hide;
|
|
2296
2296
|
}
|
|
2297
2297
|
|
|
2298
|
-
document.
|
|
2298
|
+
document.expandedAuroFormkitDropdown = this;
|
|
2299
2299
|
}
|
|
2300
2300
|
|
|
2301
2301
|
showBib() {
|
|
@@ -2670,6 +2670,76 @@ var tokensCss$2$1 = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-d
|
|
|
2670
2670
|
|
|
2671
2671
|
var colorCss$3$1 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color:var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color:var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color:var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color:var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color:var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color:var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color:var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
2672
2672
|
|
|
2673
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
2674
|
+
// See LICENSE in the project root for license information.
|
|
2675
|
+
|
|
2676
|
+
// ---------------------------------------------------------------------
|
|
2677
|
+
|
|
2678
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
2679
|
+
|
|
2680
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
2681
|
+
|
|
2682
|
+
/* eslint-disable jsdoc/require-param */
|
|
2683
|
+
|
|
2684
|
+
/**
|
|
2685
|
+
* This will register a new custom element with the browser.
|
|
2686
|
+
* @param {String} name - The name of the custom element.
|
|
2687
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
2688
|
+
* @returns {void}
|
|
2689
|
+
*/
|
|
2690
|
+
registerComponent(name, componentClass) {
|
|
2691
|
+
if (!customElements.get(name)) {
|
|
2692
|
+
customElements.define(name, class extends componentClass {});
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
/**
|
|
2697
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
2698
|
+
* @returns {void}
|
|
2699
|
+
*/
|
|
2700
|
+
closestElement(
|
|
2701
|
+
selector, // selector like in .closest()
|
|
2702
|
+
base = this, // extra functionality to skip a parent
|
|
2703
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
2704
|
+
!el || el === document || el === window
|
|
2705
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
2706
|
+
: found
|
|
2707
|
+
? found // found a selector INside this element
|
|
2708
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
2709
|
+
) {
|
|
2710
|
+
return __Closest(base);
|
|
2711
|
+
}
|
|
2712
|
+
/* eslint-enable jsdoc/require-param */
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* 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.
|
|
2716
|
+
* @param {Object} elem - The element to check.
|
|
2717
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
2718
|
+
* @returns {void}
|
|
2719
|
+
*/
|
|
2720
|
+
handleComponentTagRename(elem, tagName) {
|
|
2721
|
+
const tag = tagName.toLowerCase();
|
|
2722
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2723
|
+
|
|
2724
|
+
if (elemTag !== tag) {
|
|
2725
|
+
elem.setAttribute(tag, true);
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
|
|
2729
|
+
/**
|
|
2730
|
+
* Validates if an element is a specific Auro component.
|
|
2731
|
+
* @param {Object} elem - The element to validate.
|
|
2732
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
2733
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
2734
|
+
*/
|
|
2735
|
+
elementMatch(elem, tagName) {
|
|
2736
|
+
const tag = tagName.toLowerCase();
|
|
2737
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
2738
|
+
|
|
2739
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
2740
|
+
}
|
|
2741
|
+
};
|
|
2742
|
+
|
|
2673
2743
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
2674
2744
|
// See LICENSE in the project root for license information.
|
|
2675
2745
|
|
|
@@ -2702,7 +2772,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
2702
2772
|
this.tertiary = false;
|
|
2703
2773
|
this.warning = false;
|
|
2704
2774
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
2705
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
2775
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
2706
2776
|
}
|
|
2707
2777
|
|
|
2708
2778
|
// function to define props used within the scope of this component
|
|
@@ -2864,7 +2934,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
2864
2934
|
*
|
|
2865
2935
|
*/
|
|
2866
2936
|
static register(name = "auro-icon") {
|
|
2867
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
2937
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
|
|
2868
2938
|
}
|
|
2869
2939
|
|
|
2870
2940
|
connectedCallback() {
|
|
@@ -2966,7 +3036,7 @@ class AuroDropdownBib extends r {
|
|
|
2966
3036
|
*/
|
|
2967
3037
|
this._mobileBreakpointValue = undefined;
|
|
2968
3038
|
|
|
2969
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
3039
|
+
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
2970
3040
|
}
|
|
2971
3041
|
|
|
2972
3042
|
static get styles() {
|
|
@@ -3074,7 +3144,7 @@ var tokensCss$4 = i$5`:host{--ds-auro-helptext-color: var(--ds-color-text-tertia
|
|
|
3074
3144
|
|
|
3075
3145
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3076
3146
|
|
|
3077
|
-
let AuroLibraryRuntimeUtils$
|
|
3147
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
3078
3148
|
|
|
3079
3149
|
/* eslint-disable jsdoc/require-param */
|
|
3080
3150
|
|
|
@@ -3154,7 +3224,7 @@ class AuroHelpText extends r {
|
|
|
3154
3224
|
this.error = false;
|
|
3155
3225
|
this.hasTextContent = false;
|
|
3156
3226
|
|
|
3157
|
-
AuroLibraryRuntimeUtils$
|
|
3227
|
+
AuroLibraryRuntimeUtils$4.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
3158
3228
|
}
|
|
3159
3229
|
|
|
3160
3230
|
static get styles() {
|
|
@@ -3202,7 +3272,7 @@ class AuroHelpText extends r {
|
|
|
3202
3272
|
*
|
|
3203
3273
|
*/
|
|
3204
3274
|
static register(name = "auro-helptext") {
|
|
3205
|
-
AuroLibraryRuntimeUtils$
|
|
3275
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroHelpText);
|
|
3206
3276
|
}
|
|
3207
3277
|
|
|
3208
3278
|
updated() {
|
|
@@ -3335,7 +3405,7 @@ class AuroDropdown extends r {
|
|
|
3335
3405
|
/**
|
|
3336
3406
|
* @private
|
|
3337
3407
|
*/
|
|
3338
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
3408
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
3339
3409
|
|
|
3340
3410
|
/**
|
|
3341
3411
|
* @private
|
|
@@ -3360,17 +3430,17 @@ class AuroDropdown extends r {
|
|
|
3360
3430
|
/**
|
|
3361
3431
|
* @private
|
|
3362
3432
|
*/
|
|
3363
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion$2, AuroIcon$2);
|
|
3433
|
+
this.iconTag = versioning.generateTag('auro-formkit-dropdown-icon', iconVersion$2, AuroIcon$2);
|
|
3364
3434
|
|
|
3365
3435
|
/**
|
|
3366
3436
|
* @private
|
|
3367
3437
|
*/
|
|
3368
|
-
this.dropdownBibTag = versioning.generateTag('auro-dropdownbib', dropdownVersion$1, AuroDropdownBib);
|
|
3438
|
+
this.dropdownBibTag = versioning.generateTag('auro-formkit-dropdown-dropdownbib', dropdownVersion$1, AuroDropdownBib);
|
|
3369
3439
|
|
|
3370
3440
|
/**
|
|
3371
3441
|
* @private
|
|
3372
3442
|
*/
|
|
3373
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
3443
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
3374
3444
|
}
|
|
3375
3445
|
|
|
3376
3446
|
/**
|
|
@@ -3573,7 +3643,7 @@ class AuroDropdown extends r {
|
|
|
3573
3643
|
*
|
|
3574
3644
|
*/
|
|
3575
3645
|
static register(name = "auro-dropdown") {
|
|
3576
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
3646
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
|
|
3577
3647
|
}
|
|
3578
3648
|
|
|
3579
3649
|
connectedCallback() {
|
|
@@ -3596,6 +3666,7 @@ class AuroDropdown extends r {
|
|
|
3596
3666
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
3597
3667
|
this.handleTriggerContentSlotChange();
|
|
3598
3668
|
}
|
|
3669
|
+
|
|
3599
3670
|
}
|
|
3600
3671
|
|
|
3601
3672
|
firstUpdated() {
|
|
@@ -3841,7 +3912,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
3841
3912
|
|
|
3842
3913
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
3843
3914
|
|
|
3844
|
-
class AuroLibraryRuntimeUtils {
|
|
3915
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
3845
3916
|
|
|
3846
3917
|
/* eslint-disable jsdoc/require-param */
|
|
3847
3918
|
|
|
@@ -3902,7 +3973,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
3902
3973
|
|
|
3903
3974
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
3904
3975
|
}
|
|
3905
|
-
}
|
|
3976
|
+
};
|
|
3906
3977
|
|
|
3907
3978
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3908
3979
|
// See LICENSE in the project root for license information.
|
|
@@ -4095,6 +4166,76 @@ var tokensCss$3 = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-def
|
|
|
4095
4166
|
|
|
4096
4167
|
var colorCss$4 = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color:var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color:var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color:var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color:var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color:var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color:var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color:var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
4097
4168
|
|
|
4169
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4170
|
+
// See LICENSE in the project root for license information.
|
|
4171
|
+
|
|
4172
|
+
// ---------------------------------------------------------------------
|
|
4173
|
+
|
|
4174
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4175
|
+
|
|
4176
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
4177
|
+
|
|
4178
|
+
/* eslint-disable jsdoc/require-param */
|
|
4179
|
+
|
|
4180
|
+
/**
|
|
4181
|
+
* This will register a new custom element with the browser.
|
|
4182
|
+
* @param {String} name - The name of the custom element.
|
|
4183
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
4184
|
+
* @returns {void}
|
|
4185
|
+
*/
|
|
4186
|
+
registerComponent(name, componentClass) {
|
|
4187
|
+
if (!customElements.get(name)) {
|
|
4188
|
+
customElements.define(name, class extends componentClass {});
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
|
|
4192
|
+
/**
|
|
4193
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
4194
|
+
* @returns {void}
|
|
4195
|
+
*/
|
|
4196
|
+
closestElement(
|
|
4197
|
+
selector, // selector like in .closest()
|
|
4198
|
+
base = this, // extra functionality to skip a parent
|
|
4199
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
4200
|
+
!el || el === document || el === window
|
|
4201
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
4202
|
+
: found
|
|
4203
|
+
? found // found a selector INside this element
|
|
4204
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
4205
|
+
) {
|
|
4206
|
+
return __Closest(base);
|
|
4207
|
+
}
|
|
4208
|
+
/* eslint-enable jsdoc/require-param */
|
|
4209
|
+
|
|
4210
|
+
/**
|
|
4211
|
+
* 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.
|
|
4212
|
+
* @param {Object} elem - The element to check.
|
|
4213
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
4214
|
+
* @returns {void}
|
|
4215
|
+
*/
|
|
4216
|
+
handleComponentTagRename(elem, tagName) {
|
|
4217
|
+
const tag = tagName.toLowerCase();
|
|
4218
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4219
|
+
|
|
4220
|
+
if (elemTag !== tag) {
|
|
4221
|
+
elem.setAttribute(tag, true);
|
|
4222
|
+
}
|
|
4223
|
+
}
|
|
4224
|
+
|
|
4225
|
+
/**
|
|
4226
|
+
* Validates if an element is a specific Auro component.
|
|
4227
|
+
* @param {Object} elem - The element to validate.
|
|
4228
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
4229
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
4230
|
+
*/
|
|
4231
|
+
elementMatch(elem, tagName) {
|
|
4232
|
+
const tag = tagName.toLowerCase();
|
|
4233
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4234
|
+
|
|
4235
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
4236
|
+
}
|
|
4237
|
+
};
|
|
4238
|
+
|
|
4098
4239
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
4099
4240
|
// See LICENSE in the project root for license information.
|
|
4100
4241
|
|
|
@@ -4127,7 +4268,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4127
4268
|
this.tertiary = false;
|
|
4128
4269
|
this.warning = false;
|
|
4129
4270
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
4130
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
4271
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4131
4272
|
}
|
|
4132
4273
|
|
|
4133
4274
|
// function to define props used within the scope of this component
|
|
@@ -4289,7 +4430,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4289
4430
|
*
|
|
4290
4431
|
*/
|
|
4291
4432
|
static register(name = "auro-icon") {
|
|
4292
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
4433
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
4293
4434
|
}
|
|
4294
4435
|
|
|
4295
4436
|
connectedCallback() {
|
|
@@ -4357,6 +4498,76 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4357
4498
|
|
|
4358
4499
|
var iconVersion$1 = '7.0.1';
|
|
4359
4500
|
|
|
4501
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4502
|
+
// See LICENSE in the project root for license information.
|
|
4503
|
+
|
|
4504
|
+
// ---------------------------------------------------------------------
|
|
4505
|
+
|
|
4506
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4507
|
+
|
|
4508
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
4509
|
+
|
|
4510
|
+
/* eslint-disable jsdoc/require-param */
|
|
4511
|
+
|
|
4512
|
+
/**
|
|
4513
|
+
* This will register a new custom element with the browser.
|
|
4514
|
+
* @param {String} name - The name of the custom element.
|
|
4515
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
4516
|
+
* @returns {void}
|
|
4517
|
+
*/
|
|
4518
|
+
registerComponent(name, componentClass) {
|
|
4519
|
+
if (!customElements.get(name)) {
|
|
4520
|
+
customElements.define(name, class extends componentClass {});
|
|
4521
|
+
}
|
|
4522
|
+
}
|
|
4523
|
+
|
|
4524
|
+
/**
|
|
4525
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
4526
|
+
* @returns {void}
|
|
4527
|
+
*/
|
|
4528
|
+
closestElement(
|
|
4529
|
+
selector, // selector like in .closest()
|
|
4530
|
+
base = this, // extra functionality to skip a parent
|
|
4531
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
4532
|
+
!el || el === document || el === window
|
|
4533
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
4534
|
+
: found
|
|
4535
|
+
? found // found a selector INside this element
|
|
4536
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
4537
|
+
) {
|
|
4538
|
+
return __Closest(base);
|
|
4539
|
+
}
|
|
4540
|
+
/* eslint-enable jsdoc/require-param */
|
|
4541
|
+
|
|
4542
|
+
/**
|
|
4543
|
+
* 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.
|
|
4544
|
+
* @param {Object} elem - The element to check.
|
|
4545
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
4546
|
+
* @returns {void}
|
|
4547
|
+
*/
|
|
4548
|
+
handleComponentTagRename(elem, tagName) {
|
|
4549
|
+
const tag = tagName.toLowerCase();
|
|
4550
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4551
|
+
|
|
4552
|
+
if (elemTag !== tag) {
|
|
4553
|
+
elem.setAttribute(tag, true);
|
|
4554
|
+
}
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
/**
|
|
4558
|
+
* Validates if an element is a specific Auro component.
|
|
4559
|
+
* @param {Object} elem - The element to validate.
|
|
4560
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
4561
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
4562
|
+
*/
|
|
4563
|
+
elementMatch(elem, tagName) {
|
|
4564
|
+
const tag = tagName.toLowerCase();
|
|
4565
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4566
|
+
|
|
4567
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
4568
|
+
}
|
|
4569
|
+
};
|
|
4570
|
+
|
|
4360
4571
|
var styleCss$4 = i$5`.heading{margin:1.75rem 0;letter-spacing:var(--ds-text-heading-default-spacing, -0.2px);font-weight:var(--ds-text-heading-default-weight, 500)}.heading--display{margin-top:0;font-size:var(--ds-text-heading-display-size-breakpoint-sm, 2.75rem);font-weight:var(--ds-text-heading-display-weight, 100);line-height:var(--ds-text-heading-display-height-breakpoint-sm, 3.375rem)}@media screen and (min-width: 768px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-md, 3rem);line-height:var(--ds-text-heading-display-height-breakpoint-md, 3.75rem)}}@media screen and (min-width: 1024px){.heading--display{font-size:var(--ds-text-heading-display-size-breakpoint-lg, 3.5rem);line-height:var(--ds-text-heading-display-height-breakpoint-lg, 4.25rem)}}.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-sm, 2rem);font-weight:var(--ds-text-heading-800-weight, 500);line-height:var(--ds-text-heading-800-height-breakpoint-sm, 2.375rem)}@media screen and (min-width: 768px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-md, 2.25rem);line-height:var(--ds-text-heading-800-height-breakpoint-md, 2.625rem)}}@media screen and (min-width: 1024px){.heading--800{font-size:var(--ds-text-heading-800-size-breakpoint-lg, 2.5rem);line-height:var(--ds-text-heading-800-height-breakpoint-lg, 3rem)}}.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-sm, 1.75rem);font-weight:var(--ds-text-heading-700-weight, 500);line-height:var(--ds-text-heading-700-height-breakpoint-sm, 2.125rem)}@media screen and (min-width: 768px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-md, 2rem);line-height:var(--ds-text-heading-700-height-breakpoint-md, 2.375rem)}}@media screen and (min-width: 1024px){.heading--700{font-size:var(--ds-text-heading-700-size-breakpoint-lg, 2.25rem);line-height:var(--ds-text-heading-700-height-breakpoint-lg, 2.75rem)}}.heading--600{margin:1rem 0;font-size:var(--ds-text-heading-600-size-breakpoint-sm, 1.625rem);font-weight:var(--ds-text-heading-600-weight, 300);line-height:var(--ds-text-heading-600-height-breakpoint-sm, 1.875rem)}@media screen and (min-width: 768px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-md, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-md, 2.125rem)}}@media screen and (min-width: 1024px){.heading--600{font-size:var(--ds-text-heading-600-size-breakpoint-lg, 1.75rem);line-height:var(--ds-text-heading-600-height-breakpoint-lg, 2.25rem)}}.heading--500{margin:1rem 0;font-size:var(--ds-text-heading-500-size-breakpoint-sm, 1.375rem);font-weight:var(--ds-text-heading-500-weight, 300);line-height:var(--ds-text-heading-500-height-breakpoint-sm, 1.625rem)}@media screen and (min-width: 768px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-md, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-md, 1.875rem)}}@media screen and (min-width: 1024px){.heading--500{font-size:var(--ds-text-heading-500-size-breakpoint-lg, 1.5rem);line-height:var(--ds-text-heading-500-height-breakpoint-lg, 2rem)}}.heading--400{margin:.75rem 0;font-size:var(--ds-text-heading-400-size, 1.25rem);font-weight:var(--ds-text-heading-400-weight, 300);line-height:var(--ds-text-heading-400-height, 1.625rem)}.heading--300{margin:.75rem 0;font-size:var(--ds-text-heading-300-size, 1.125rem);font-weight:var(--ds-text-heading-300-weight, 300);line-height:var(--ds-text-heading-300-height, 1.625rem)}:host([no-margin-block]) .heading{margin-block:0}.util_stackMarginnone--bottom{margin-bottom:0}.util_stackMargin25--bottom{margin-bottom:var(--ds-size-25, 0.125rem)}.util_stackMargin50--bottom{margin-bottom:var(--ds-size-50, 0.25rem)}.util_stackMargin100--bottom{margin-bottom:var(--ds-size-100, 0.5rem)}.util_stackMargin150--bottom{margin-bottom:var(--ds-size-150, 0.75rem)}.util_stackMargin200--bottom{margin-bottom:var(--ds-size-200, 1rem)}.util_stackMargin300--bottom{margin-bottom:var(--ds-size-300, 1.5rem)}.util_stackMargin400--bottom{margin-bottom:var(--ds-size-400, 2rem)}.util_stackMargin600--bottom{margin-bottom:var(--ds-size-600, 3rem)}.util_stackMargin800--bottom{margin-bottom:var(--ds-size-800, 4rem)}.util_stackMarginnone--top{margin-top:0}.util_stackMargin25--top{margin-top:var(--ds-size-25, 0.125rem)}.util_stackMargin50--top{margin-top:var(--ds-size-50, 0.25rem)}.util_stackMargin100--top{margin-top:var(--ds-size-100, 0.5rem)}.util_stackMargin150--top{margin-top:var(--ds-size-150, 0.75rem)}.util_stackMargin200--top{margin-top:var(--ds-size-200, 1rem)}.util_stackMargin300--top{margin-top:var(--ds-size-300, 1.5rem)}.util_stackMargin400--top{margin-top:var(--ds-size-400, 2rem)}.util_stackMargin600--top{margin-top:var(--ds-size-600, 3rem)}.util_stackMargin800--top{margin-top:var(--ds-size-800, 4rem)}`;
|
|
4361
4572
|
|
|
4362
4573
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -4386,7 +4597,7 @@ class AuroHeader extends r {
|
|
|
4386
4597
|
/**
|
|
4387
4598
|
* @private
|
|
4388
4599
|
*/
|
|
4389
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
4600
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$3();
|
|
4390
4601
|
}
|
|
4391
4602
|
|
|
4392
4603
|
// function to define props used within the scope of this component
|
|
@@ -4416,7 +4627,7 @@ class AuroHeader extends r {
|
|
|
4416
4627
|
*
|
|
4417
4628
|
*/
|
|
4418
4629
|
static register(name = "auro-header") {
|
|
4419
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroHeader);
|
|
4630
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHeader);
|
|
4420
4631
|
}
|
|
4421
4632
|
|
|
4422
4633
|
firstUpdated() {
|
|
@@ -4510,11 +4721,11 @@ class AuroBibtemplate extends r {
|
|
|
4510
4721
|
constructor() {
|
|
4511
4722
|
super();
|
|
4512
4723
|
|
|
4513
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
4724
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
4514
4725
|
|
|
4515
4726
|
const versioning = new AuroDependencyVersioning();
|
|
4516
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion$1, AuroIcon$1);
|
|
4517
|
-
this.headerTag = versioning.generateTag('auro-header', headerVersion, AuroHeader);
|
|
4727
|
+
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion$1, AuroIcon$1);
|
|
4728
|
+
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
4518
4729
|
}
|
|
4519
4730
|
|
|
4520
4731
|
static get styles() {
|
|
@@ -4549,7 +4760,7 @@ class AuroBibtemplate extends r {
|
|
|
4549
4760
|
*
|
|
4550
4761
|
*/
|
|
4551
4762
|
static register(name = "auro-bibtemplate") {
|
|
4552
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
4763
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
4553
4764
|
}
|
|
4554
4765
|
|
|
4555
4766
|
/**
|
|
@@ -4788,7 +4999,7 @@ class AuroSelect extends r {
|
|
|
4788
4999
|
/**
|
|
4789
5000
|
* @private
|
|
4790
5001
|
*/
|
|
4791
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
5002
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
4792
5003
|
|
|
4793
5004
|
/**
|
|
4794
5005
|
* Generate unique names for dependency components.
|
|
@@ -4798,12 +5009,12 @@ class AuroSelect extends r {
|
|
|
4798
5009
|
/**
|
|
4799
5010
|
* @private
|
|
4800
5011
|
*/
|
|
4801
|
-
this.dropdownTag = versioning.generateTag('auro-dropdown', dropdownVersion, AuroDropdown);
|
|
5012
|
+
this.dropdownTag = versioning.generateTag('auro-formkit-select-dropdown', dropdownVersion, AuroDropdown);
|
|
4802
5013
|
|
|
4803
5014
|
/**
|
|
4804
5015
|
* @private
|
|
4805
5016
|
*/
|
|
4806
|
-
this.bibtemplateTag = versioning.generateTag('auro-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
5017
|
+
this.bibtemplateTag = versioning.generateTag('auro-formkit-select-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
4807
5018
|
|
|
4808
5019
|
/**
|
|
4809
5020
|
* @private
|
|
@@ -5006,7 +5217,7 @@ class AuroSelect extends r {
|
|
|
5006
5217
|
*
|
|
5007
5218
|
*/
|
|
5008
5219
|
static register(name = "auro-select") {
|
|
5009
|
-
AuroLibraryRuntimeUtils$
|
|
5220
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroSelect);
|
|
5010
5221
|
}
|
|
5011
5222
|
|
|
5012
5223
|
/**
|
|
@@ -5684,7 +5895,7 @@ class AuroMenu extends r {
|
|
|
5684
5895
|
*
|
|
5685
5896
|
*/
|
|
5686
5897
|
static register(name = "auro-menu") {
|
|
5687
|
-
AuroLibraryRuntimeUtils$
|
|
5898
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenu);
|
|
5688
5899
|
}
|
|
5689
5900
|
|
|
5690
5901
|
// Lifecycle Methods
|
|
@@ -5708,7 +5919,7 @@ class AuroMenu extends r {
|
|
|
5708
5919
|
}
|
|
5709
5920
|
|
|
5710
5921
|
firstUpdated() {
|
|
5711
|
-
AuroLibraryRuntimeUtils$
|
|
5922
|
+
AuroLibraryRuntimeUtils$5.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
5712
5923
|
|
|
5713
5924
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
5714
5925
|
this.initializeMenu();
|
|
@@ -6399,6 +6610,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-defau
|
|
|
6399
6610
|
|
|
6400
6611
|
var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color:var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color:var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color:var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color:var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color:var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color:var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color:var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
6401
6612
|
|
|
6613
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6614
|
+
// See LICENSE in the project root for license information.
|
|
6615
|
+
|
|
6616
|
+
// ---------------------------------------------------------------------
|
|
6617
|
+
|
|
6618
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
6619
|
+
|
|
6620
|
+
class AuroLibraryRuntimeUtils {
|
|
6621
|
+
|
|
6622
|
+
/* eslint-disable jsdoc/require-param */
|
|
6623
|
+
|
|
6624
|
+
/**
|
|
6625
|
+
* This will register a new custom element with the browser.
|
|
6626
|
+
* @param {String} name - The name of the custom element.
|
|
6627
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
6628
|
+
* @returns {void}
|
|
6629
|
+
*/
|
|
6630
|
+
registerComponent(name, componentClass) {
|
|
6631
|
+
if (!customElements.get(name)) {
|
|
6632
|
+
customElements.define(name, class extends componentClass {});
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
|
|
6636
|
+
/**
|
|
6637
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6638
|
+
* @returns {void}
|
|
6639
|
+
*/
|
|
6640
|
+
closestElement(
|
|
6641
|
+
selector, // selector like in .closest()
|
|
6642
|
+
base = this, // extra functionality to skip a parent
|
|
6643
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6644
|
+
!el || el === document || el === window
|
|
6645
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6646
|
+
: found
|
|
6647
|
+
? found // found a selector INside this element
|
|
6648
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6649
|
+
) {
|
|
6650
|
+
return __Closest(base);
|
|
6651
|
+
}
|
|
6652
|
+
/* eslint-enable jsdoc/require-param */
|
|
6653
|
+
|
|
6654
|
+
/**
|
|
6655
|
+
* 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.
|
|
6656
|
+
* @param {Object} elem - The element to check.
|
|
6657
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6658
|
+
* @returns {void}
|
|
6659
|
+
*/
|
|
6660
|
+
handleComponentTagRename(elem, tagName) {
|
|
6661
|
+
const tag = tagName.toLowerCase();
|
|
6662
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6663
|
+
|
|
6664
|
+
if (elemTag !== tag) {
|
|
6665
|
+
elem.setAttribute(tag, true);
|
|
6666
|
+
}
|
|
6667
|
+
}
|
|
6668
|
+
|
|
6669
|
+
/**
|
|
6670
|
+
* Validates if an element is a specific Auro component.
|
|
6671
|
+
* @param {Object} elem - The element to validate.
|
|
6672
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6673
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6674
|
+
*/
|
|
6675
|
+
elementMatch(elem, tagName) {
|
|
6676
|
+
const tag = tagName.toLowerCase();
|
|
6677
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6678
|
+
|
|
6679
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6680
|
+
}
|
|
6681
|
+
}
|
|
6682
|
+
|
|
6402
6683
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6403
6684
|
// See LICENSE in the project root for license information.
|
|
6404
6685
|
|
|
@@ -6431,7 +6712,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6431
6712
|
this.tertiary = false;
|
|
6432
6713
|
this.warning = false;
|
|
6433
6714
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
6434
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils
|
|
6715
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
6435
6716
|
}
|
|
6436
6717
|
|
|
6437
6718
|
// function to define props used within the scope of this component
|
|
@@ -6593,7 +6874,7 @@ class AuroIcon extends BaseIcon {
|
|
|
6593
6874
|
*
|
|
6594
6875
|
*/
|
|
6595
6876
|
static register(name = "auro-icon") {
|
|
6596
|
-
AuroLibraryRuntimeUtils
|
|
6877
|
+
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
6597
6878
|
}
|
|
6598
6879
|
|
|
6599
6880
|
connectedCallback() {
|
|
@@ -6685,7 +6966,7 @@ class AuroMenuOption extends r {
|
|
|
6685
6966
|
* Generate unique names for dependency components.
|
|
6686
6967
|
*/
|
|
6687
6968
|
const versioning = new AuroDependencyVersioning$2();
|
|
6688
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
6969
|
+
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
6689
6970
|
|
|
6690
6971
|
this.selected = false;
|
|
6691
6972
|
this.nocheckmark = false;
|
|
@@ -6699,7 +6980,7 @@ class AuroMenuOption extends r {
|
|
|
6699
6980
|
/**
|
|
6700
6981
|
* @private
|
|
6701
6982
|
*/
|
|
6702
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
6983
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
6703
6984
|
}
|
|
6704
6985
|
|
|
6705
6986
|
static get properties() {
|
|
@@ -6743,7 +7024,7 @@ class AuroMenuOption extends r {
|
|
|
6743
7024
|
*
|
|
6744
7025
|
*/
|
|
6745
7026
|
static register(name = "auro-menuoption") {
|
|
6746
|
-
AuroLibraryRuntimeUtils$
|
|
7027
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroMenuOption);
|
|
6747
7028
|
}
|
|
6748
7029
|
|
|
6749
7030
|
firstUpdated() {
|
|
@@ -110,7 +110,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
110
110
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
111
111
|
|
|
112
112
|
```html
|
|
113
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.1/auro-select/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|