@aurodesignsystem/auro-formkit 2.0.3-beta.1 → 2.1.0-beta.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/CHANGELOG.md +12 -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 +643 -112
- package/components/combobox/demo/index.min.js +643 -112
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/index.js +510 -49
- package/components/combobox/dist/registered.js +510 -49
- 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 +1280 -206
- package/components/datepicker/demo/index.min.js +1280 -206
- 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 +1280 -206
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +1280 -206
- 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 +262 -12
- package/components/input/demo/index.min.js +262 -12
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/index.js +262 -12
- package/components/input/dist/registered.js +262 -12
- 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
|
@@ -60,7 +60,7 @@ const t={ATTRIBUTE:1},e$1=t=>(...e)=>({_$litDirective$:t,values:e});class i{cons
|
|
|
60
60
|
// See LICENSE in the project root for license information.
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
let AuroDependencyVersioning$
|
|
63
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -103,7 +103,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
103
103
|
|
|
104
104
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
105
105
|
|
|
106
|
-
let AuroLibraryRuntimeUtils$
|
|
106
|
+
let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
107
107
|
|
|
108
108
|
/* eslint-disable jsdoc/require-param */
|
|
109
109
|
|
|
@@ -172,6 +172,76 @@ var colorCss$8 = i$5`[auro-loader]{color:var(--ds-auro-button-loader-color)}.aur
|
|
|
172
172
|
|
|
173
173
|
var tokensCss$7 = i$5`:host{--ds-auro-button-border-color:var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-border-inset-color:var(--ds-color-border-emphasis-inverse, #f2f7fb);--ds-auro-button-container-color:var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-container-image:var(--ds-color-container-ui-primary-default-default, #2c67b5);--ds-auro-button-loader-color:var(--ds-color-utility-navy-default, #265688);--ds-auro-button-text-color:var(--ds-color-text-primary-inverse, #ffffff);--ds-auro-button-tap-color:transparent}`;
|
|
174
174
|
|
|
175
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
176
|
+
// See LICENSE in the project root for license information.
|
|
177
|
+
|
|
178
|
+
// ---------------------------------------------------------------------
|
|
179
|
+
|
|
180
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
181
|
+
|
|
182
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
183
|
+
|
|
184
|
+
/* eslint-disable jsdoc/require-param */
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* This will register a new custom element with the browser.
|
|
188
|
+
* @param {String} name - The name of the custom element.
|
|
189
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
190
|
+
* @returns {void}
|
|
191
|
+
*/
|
|
192
|
+
registerComponent(name, componentClass) {
|
|
193
|
+
if (!customElements.get(name)) {
|
|
194
|
+
customElements.define(name, class extends componentClass {});
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
200
|
+
* @returns {void}
|
|
201
|
+
*/
|
|
202
|
+
closestElement(
|
|
203
|
+
selector, // selector like in .closest()
|
|
204
|
+
base = this, // extra functionality to skip a parent
|
|
205
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
206
|
+
!el || el === document || el === window
|
|
207
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
208
|
+
: found
|
|
209
|
+
? found // found a selector INside this element
|
|
210
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
211
|
+
) {
|
|
212
|
+
return __Closest(base);
|
|
213
|
+
}
|
|
214
|
+
/* eslint-enable jsdoc/require-param */
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* 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.
|
|
218
|
+
* @param {Object} elem - The element to check.
|
|
219
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
220
|
+
* @returns {void}
|
|
221
|
+
*/
|
|
222
|
+
handleComponentTagRename(elem, tagName) {
|
|
223
|
+
const tag = tagName.toLowerCase();
|
|
224
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
225
|
+
|
|
226
|
+
if (elemTag !== tag) {
|
|
227
|
+
elem.setAttribute(tag, true);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Validates if an element is a specific Auro component.
|
|
233
|
+
* @param {Object} elem - The element to validate.
|
|
234
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
235
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
236
|
+
*/
|
|
237
|
+
elementMatch(elem, tagName) {
|
|
238
|
+
const tag = tagName.toLowerCase();
|
|
239
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
240
|
+
|
|
241
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
|
|
175
245
|
var styleCss$8 = i$5`: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}}`;
|
|
176
246
|
|
|
177
247
|
var colorCss$7 = i$5`: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-color-utility-navy-default, #265688)}:host([ondark]){--ds-auro-loader-color:var(--ds-color-utility-cyan-inverse, #a8e9f7)}:host([white]){--ds-auro-loader-color:var(--ds-color-utility-neutral-inverse, #ccd2db)}: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}`;
|
|
@@ -223,7 +293,7 @@ class AuroLoader extends r {
|
|
|
223
293
|
/**
|
|
224
294
|
* @private
|
|
225
295
|
*/
|
|
226
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
296
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
227
297
|
|
|
228
298
|
this.orbit = false;
|
|
229
299
|
this.ringworm = false;
|
|
@@ -270,7 +340,7 @@ class AuroLoader extends r {
|
|
|
270
340
|
*
|
|
271
341
|
*/
|
|
272
342
|
static register(name = "auro-loader") {
|
|
273
|
-
AuroLibraryRuntimeUtils$
|
|
343
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroLoader);
|
|
274
344
|
}
|
|
275
345
|
|
|
276
346
|
firstUpdated() {
|
|
@@ -395,7 +465,7 @@ class AuroButton extends r {
|
|
|
395
465
|
/**
|
|
396
466
|
* Generate unique names for dependency components.
|
|
397
467
|
*/
|
|
398
|
-
const versioning = new AuroDependencyVersioning$
|
|
468
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
399
469
|
|
|
400
470
|
/**
|
|
401
471
|
* @private
|
|
@@ -490,7 +560,7 @@ class AuroButton extends r {
|
|
|
490
560
|
*
|
|
491
561
|
*/
|
|
492
562
|
static register(name = "auro-button") {
|
|
493
|
-
AuroLibraryRuntimeUtils$
|
|
563
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroButton);
|
|
494
564
|
}
|
|
495
565
|
|
|
496
566
|
/**
|
|
@@ -586,6 +656,76 @@ class AuroButton extends r {
|
|
|
586
656
|
}
|
|
587
657
|
}
|
|
588
658
|
|
|
659
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
660
|
+
// See LICENSE in the project root for license information.
|
|
661
|
+
|
|
662
|
+
// ---------------------------------------------------------------------
|
|
663
|
+
|
|
664
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
665
|
+
|
|
666
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
667
|
+
|
|
668
|
+
/* eslint-disable jsdoc/require-param */
|
|
669
|
+
|
|
670
|
+
/**
|
|
671
|
+
* This will register a new custom element with the browser.
|
|
672
|
+
* @param {String} name - The name of the custom element.
|
|
673
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
674
|
+
* @returns {void}
|
|
675
|
+
*/
|
|
676
|
+
registerComponent(name, componentClass) {
|
|
677
|
+
if (!customElements.get(name)) {
|
|
678
|
+
customElements.define(name, class extends componentClass {});
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/**
|
|
683
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
684
|
+
* @returns {void}
|
|
685
|
+
*/
|
|
686
|
+
closestElement(
|
|
687
|
+
selector, // selector like in .closest()
|
|
688
|
+
base = this, // extra functionality to skip a parent
|
|
689
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
690
|
+
!el || el === document || el === window
|
|
691
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
692
|
+
: found
|
|
693
|
+
? found // found a selector INside this element
|
|
694
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
695
|
+
) {
|
|
696
|
+
return __Closest(base);
|
|
697
|
+
}
|
|
698
|
+
/* eslint-enable jsdoc/require-param */
|
|
699
|
+
|
|
700
|
+
/**
|
|
701
|
+
* 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.
|
|
702
|
+
* @param {Object} elem - The element to check.
|
|
703
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
704
|
+
* @returns {void}
|
|
705
|
+
*/
|
|
706
|
+
handleComponentTagRename(elem, tagName) {
|
|
707
|
+
const tag = tagName.toLowerCase();
|
|
708
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
709
|
+
|
|
710
|
+
if (elemTag !== tag) {
|
|
711
|
+
elem.setAttribute(tag, true);
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
/**
|
|
716
|
+
* Validates if an element is a specific Auro component.
|
|
717
|
+
* @param {Object} elem - The element to validate.
|
|
718
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
719
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
720
|
+
*/
|
|
721
|
+
elementMatch(elem, tagName) {
|
|
722
|
+
const tag = tagName.toLowerCase();
|
|
723
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
724
|
+
|
|
725
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
726
|
+
}
|
|
727
|
+
};
|
|
728
|
+
|
|
589
729
|
// Copyright (c) 2022 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
590
730
|
// See LICENSE in the project root for license information.
|
|
591
731
|
|
|
@@ -610,7 +750,7 @@ class AuroCounterButton extends AuroButton {
|
|
|
610
750
|
*
|
|
611
751
|
*/
|
|
612
752
|
static register(name = "auro-counter-button") {
|
|
613
|
-
AuroLibraryRuntimeUtils$
|
|
753
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterButton);
|
|
614
754
|
}
|
|
615
755
|
}
|
|
616
756
|
|
|
@@ -620,6 +760,46 @@ if (!customElements.get("auro-counter-button")) {
|
|
|
620
760
|
customElements.define("auro-counter-button", AuroCounterButton);
|
|
621
761
|
}
|
|
622
762
|
|
|
763
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
764
|
+
// See LICENSE in the project root for license information.
|
|
765
|
+
|
|
766
|
+
|
|
767
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Generates a unique string to be used for child auro element naming.
|
|
771
|
+
* @private
|
|
772
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
773
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
774
|
+
* @returns {string} - Unique string to be used for naming.
|
|
775
|
+
*/
|
|
776
|
+
generateElementName(baseName, version) {
|
|
777
|
+
let result = baseName;
|
|
778
|
+
|
|
779
|
+
result += '-';
|
|
780
|
+
result += version.replace(/[.]/g, '_');
|
|
781
|
+
|
|
782
|
+
return result;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Generates a unique string to be used for child auro element naming.
|
|
787
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
788
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
789
|
+
* @returns {string} - Unique string to be used for naming.
|
|
790
|
+
*/
|
|
791
|
+
generateTag(baseName, version, tagClass) {
|
|
792
|
+
const elementName = this.generateElementName(baseName, version);
|
|
793
|
+
const tag = i$1`${s(elementName)}`;
|
|
794
|
+
|
|
795
|
+
if (!customElements.get(elementName)) {
|
|
796
|
+
customElements.define(elementName, class extends tagClass {});
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
return tag;
|
|
800
|
+
}
|
|
801
|
+
};
|
|
802
|
+
|
|
623
803
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
624
804
|
// See LICENSE in the project root for license information.
|
|
625
805
|
|
|
@@ -771,6 +951,76 @@ var tokensCss$5 = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-def
|
|
|
771
951
|
|
|
772
952
|
var colorCss$6 = 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)}`;
|
|
773
953
|
|
|
954
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
955
|
+
// See LICENSE in the project root for license information.
|
|
956
|
+
|
|
957
|
+
// ---------------------------------------------------------------------
|
|
958
|
+
|
|
959
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
960
|
+
|
|
961
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
962
|
+
|
|
963
|
+
/* eslint-disable jsdoc/require-param */
|
|
964
|
+
|
|
965
|
+
/**
|
|
966
|
+
* This will register a new custom element with the browser.
|
|
967
|
+
* @param {String} name - The name of the custom element.
|
|
968
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
969
|
+
* @returns {void}
|
|
970
|
+
*/
|
|
971
|
+
registerComponent(name, componentClass) {
|
|
972
|
+
if (!customElements.get(name)) {
|
|
973
|
+
customElements.define(name, class extends componentClass {});
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
979
|
+
* @returns {void}
|
|
980
|
+
*/
|
|
981
|
+
closestElement(
|
|
982
|
+
selector, // selector like in .closest()
|
|
983
|
+
base = this, // extra functionality to skip a parent
|
|
984
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
985
|
+
!el || el === document || el === window
|
|
986
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
987
|
+
: found
|
|
988
|
+
? found // found a selector INside this element
|
|
989
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
990
|
+
) {
|
|
991
|
+
return __Closest(base);
|
|
992
|
+
}
|
|
993
|
+
/* eslint-enable jsdoc/require-param */
|
|
994
|
+
|
|
995
|
+
/**
|
|
996
|
+
* 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.
|
|
997
|
+
* @param {Object} elem - The element to check.
|
|
998
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
999
|
+
* @returns {void}
|
|
1000
|
+
*/
|
|
1001
|
+
handleComponentTagRename(elem, tagName) {
|
|
1002
|
+
const tag = tagName.toLowerCase();
|
|
1003
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1004
|
+
|
|
1005
|
+
if (elemTag !== tag) {
|
|
1006
|
+
elem.setAttribute(tag, true);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Validates if an element is a specific Auro component.
|
|
1012
|
+
* @param {Object} elem - The element to validate.
|
|
1013
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1014
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1015
|
+
*/
|
|
1016
|
+
elementMatch(elem, tagName) {
|
|
1017
|
+
const tag = tagName.toLowerCase();
|
|
1018
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1019
|
+
|
|
1020
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1021
|
+
}
|
|
1022
|
+
};
|
|
1023
|
+
|
|
774
1024
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
775
1025
|
// See LICENSE in the project root for license information.
|
|
776
1026
|
|
|
@@ -803,7 +1053,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
803
1053
|
this.tertiary = false;
|
|
804
1054
|
this.warning = false;
|
|
805
1055
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
806
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1056
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
807
1057
|
}
|
|
808
1058
|
|
|
809
1059
|
// function to define props used within the scope of this component
|
|
@@ -965,7 +1215,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
965
1215
|
*
|
|
966
1216
|
*/
|
|
967
1217
|
static register(name = "auro-icon") {
|
|
968
|
-
AuroLibraryRuntimeUtils$
|
|
1218
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroIcon);
|
|
969
1219
|
}
|
|
970
1220
|
|
|
971
1221
|
connectedCallback() {
|
|
@@ -1039,7 +1289,7 @@ var iconVersion$2 = '7.0.1';
|
|
|
1039
1289
|
|
|
1040
1290
|
class AuroFormValidation {
|
|
1041
1291
|
constructor() {
|
|
1042
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1292
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
1043
1293
|
}
|
|
1044
1294
|
|
|
1045
1295
|
/**
|
|
@@ -1422,7 +1672,7 @@ class AuroCounter extends r {
|
|
|
1422
1672
|
* @private
|
|
1423
1673
|
* @type {string}
|
|
1424
1674
|
*/
|
|
1425
|
-
this.iconTag = versioning.generateTag("auro-icon", iconVersion$2, AuroIcon$2);
|
|
1675
|
+
this.iconTag = versioning.generateTag("auro-formkit-counter-icon", iconVersion$2, AuroIcon$2);
|
|
1426
1676
|
|
|
1427
1677
|
/**
|
|
1428
1678
|
* @private
|
|
@@ -1524,7 +1774,7 @@ class AuroCounter extends r {
|
|
|
1524
1774
|
* AuroCounter.register("custom-counter") // registers <custom-counter/>
|
|
1525
1775
|
*/
|
|
1526
1776
|
static register(name = "auro-counter") {
|
|
1527
|
-
AuroLibraryRuntimeUtils$
|
|
1777
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounter);
|
|
1528
1778
|
}
|
|
1529
1779
|
|
|
1530
1780
|
static get styles() {
|
|
@@ -1708,7 +1958,7 @@ var styleCss$5 = i$5`:host{position:relative;display:block}[slot=trigger],::slot
|
|
|
1708
1958
|
|
|
1709
1959
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1710
1960
|
|
|
1711
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
1961
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
1712
1962
|
|
|
1713
1963
|
/* eslint-disable jsdoc/require-param */
|
|
1714
1964
|
|
|
@@ -3521,11 +3771,11 @@ class AuroFloatingUI {
|
|
|
3521
3771
|
|
|
3522
3772
|
updateCurrentExpandedDropdown() {
|
|
3523
3773
|
// Close any other dropdown that is already open
|
|
3524
|
-
if (document.
|
|
3525
|
-
|
|
3774
|
+
if (document.expandedAuroFormkitDropdown) {
|
|
3775
|
+
document.expandedAuroFormkitDropdown.hide;
|
|
3526
3776
|
}
|
|
3527
3777
|
|
|
3528
|
-
document.
|
|
3778
|
+
document.expandedAuroFormkitDropdown = this;
|
|
3529
3779
|
}
|
|
3530
3780
|
|
|
3531
3781
|
showBib() {
|
|
@@ -3900,6 +4150,76 @@ var tokensCss$2 = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-def
|
|
|
3900
4150
|
|
|
3901
4151
|
var colorCss$3 = 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)}`;
|
|
3902
4152
|
|
|
4153
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4154
|
+
// See LICENSE in the project root for license information.
|
|
4155
|
+
|
|
4156
|
+
// ---------------------------------------------------------------------
|
|
4157
|
+
|
|
4158
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4159
|
+
|
|
4160
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
4161
|
+
|
|
4162
|
+
/* eslint-disable jsdoc/require-param */
|
|
4163
|
+
|
|
4164
|
+
/**
|
|
4165
|
+
* This will register a new custom element with the browser.
|
|
4166
|
+
* @param {String} name - The name of the custom element.
|
|
4167
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
4168
|
+
* @returns {void}
|
|
4169
|
+
*/
|
|
4170
|
+
registerComponent(name, componentClass) {
|
|
4171
|
+
if (!customElements.get(name)) {
|
|
4172
|
+
customElements.define(name, class extends componentClass {});
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
4175
|
+
|
|
4176
|
+
/**
|
|
4177
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
4178
|
+
* @returns {void}
|
|
4179
|
+
*/
|
|
4180
|
+
closestElement(
|
|
4181
|
+
selector, // selector like in .closest()
|
|
4182
|
+
base = this, // extra functionality to skip a parent
|
|
4183
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
4184
|
+
!el || el === document || el === window
|
|
4185
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
4186
|
+
: found
|
|
4187
|
+
? found // found a selector INside this element
|
|
4188
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
4189
|
+
) {
|
|
4190
|
+
return __Closest(base);
|
|
4191
|
+
}
|
|
4192
|
+
/* eslint-enable jsdoc/require-param */
|
|
4193
|
+
|
|
4194
|
+
/**
|
|
4195
|
+
* 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.
|
|
4196
|
+
* @param {Object} elem - The element to check.
|
|
4197
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
4198
|
+
* @returns {void}
|
|
4199
|
+
*/
|
|
4200
|
+
handleComponentTagRename(elem, tagName) {
|
|
4201
|
+
const tag = tagName.toLowerCase();
|
|
4202
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4203
|
+
|
|
4204
|
+
if (elemTag !== tag) {
|
|
4205
|
+
elem.setAttribute(tag, true);
|
|
4206
|
+
}
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
/**
|
|
4210
|
+
* Validates if an element is a specific Auro component.
|
|
4211
|
+
* @param {Object} elem - The element to validate.
|
|
4212
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
4213
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
4214
|
+
*/
|
|
4215
|
+
elementMatch(elem, tagName) {
|
|
4216
|
+
const tag = tagName.toLowerCase();
|
|
4217
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4218
|
+
|
|
4219
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
4220
|
+
}
|
|
4221
|
+
};
|
|
4222
|
+
|
|
3903
4223
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3904
4224
|
// See LICENSE in the project root for license information.
|
|
3905
4225
|
|
|
@@ -3932,7 +4252,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3932
4252
|
this.tertiary = false;
|
|
3933
4253
|
this.warning = false;
|
|
3934
4254
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3935
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4255
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
3936
4256
|
}
|
|
3937
4257
|
|
|
3938
4258
|
// function to define props used within the scope of this component
|
|
@@ -4094,7 +4414,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4094
4414
|
*
|
|
4095
4415
|
*/
|
|
4096
4416
|
static register(name = "auro-icon") {
|
|
4097
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
4417
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
|
|
4098
4418
|
}
|
|
4099
4419
|
|
|
4100
4420
|
connectedCallback() {
|
|
@@ -4196,7 +4516,7 @@ class AuroDropdownBib extends r {
|
|
|
4196
4516
|
*/
|
|
4197
4517
|
this._mobileBreakpointValue = undefined;
|
|
4198
4518
|
|
|
4199
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4519
|
+
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4200
4520
|
}
|
|
4201
4521
|
|
|
4202
4522
|
static get styles() {
|
|
@@ -4304,7 +4624,7 @@ var tokensCss$3 = i$5`:host{--ds-auro-helptext-color: var(--ds-color-text-tertia
|
|
|
4304
4624
|
|
|
4305
4625
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4306
4626
|
|
|
4307
|
-
let AuroLibraryRuntimeUtils$
|
|
4627
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
4308
4628
|
|
|
4309
4629
|
/* eslint-disable jsdoc/require-param */
|
|
4310
4630
|
|
|
@@ -4384,7 +4704,7 @@ class AuroHelpText extends r {
|
|
|
4384
4704
|
this.error = false;
|
|
4385
4705
|
this.hasTextContent = false;
|
|
4386
4706
|
|
|
4387
|
-
AuroLibraryRuntimeUtils$
|
|
4707
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
4388
4708
|
}
|
|
4389
4709
|
|
|
4390
4710
|
static get styles() {
|
|
@@ -4432,7 +4752,7 @@ class AuroHelpText extends r {
|
|
|
4432
4752
|
*
|
|
4433
4753
|
*/
|
|
4434
4754
|
static register(name = "auro-helptext") {
|
|
4435
|
-
AuroLibraryRuntimeUtils$
|
|
4755
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
4436
4756
|
}
|
|
4437
4757
|
|
|
4438
4758
|
updated() {
|
|
@@ -4565,7 +4885,7 @@ class AuroDropdown extends r {
|
|
|
4565
4885
|
/**
|
|
4566
4886
|
* @private
|
|
4567
4887
|
*/
|
|
4568
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4888
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
4569
4889
|
|
|
4570
4890
|
/**
|
|
4571
4891
|
* @private
|
|
@@ -4590,17 +4910,17 @@ class AuroDropdown extends r {
|
|
|
4590
4910
|
/**
|
|
4591
4911
|
* @private
|
|
4592
4912
|
*/
|
|
4593
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion$1, AuroIcon$1);
|
|
4913
|
+
this.iconTag = versioning.generateTag('auro-formkit-dropdown-icon', iconVersion$1, AuroIcon$1);
|
|
4594
4914
|
|
|
4595
4915
|
/**
|
|
4596
4916
|
* @private
|
|
4597
4917
|
*/
|
|
4598
|
-
this.dropdownBibTag = versioning.generateTag('auro-dropdownbib', dropdownVersion$1, AuroDropdownBib);
|
|
4918
|
+
this.dropdownBibTag = versioning.generateTag('auro-formkit-dropdown-dropdownbib', dropdownVersion$1, AuroDropdownBib);
|
|
4599
4919
|
|
|
4600
4920
|
/**
|
|
4601
4921
|
* @private
|
|
4602
4922
|
*/
|
|
4603
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
4923
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4604
4924
|
}
|
|
4605
4925
|
|
|
4606
4926
|
/**
|
|
@@ -4803,7 +5123,7 @@ class AuroDropdown extends r {
|
|
|
4803
5123
|
*
|
|
4804
5124
|
*/
|
|
4805
5125
|
static register(name = "auro-dropdown") {
|
|
4806
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
5126
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
|
|
4807
5127
|
}
|
|
4808
5128
|
|
|
4809
5129
|
connectedCallback() {
|
|
@@ -4826,6 +5146,7 @@ class AuroDropdown extends r {
|
|
|
4826
5146
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4827
5147
|
this.handleTriggerContentSlotChange();
|
|
4828
5148
|
}
|
|
5149
|
+
|
|
4829
5150
|
}
|
|
4830
5151
|
|
|
4831
5152
|
firstUpdated() {
|
|
@@ -5071,7 +5392,7 @@ var tokenCss = i$5`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5071
5392
|
|
|
5072
5393
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5073
5394
|
|
|
5074
|
-
class AuroLibraryRuntimeUtils {
|
|
5395
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5075
5396
|
|
|
5076
5397
|
/* eslint-disable jsdoc/require-param */
|
|
5077
5398
|
|
|
@@ -5132,7 +5453,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
5132
5453
|
|
|
5133
5454
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
5134
5455
|
}
|
|
5135
|
-
}
|
|
5456
|
+
};
|
|
5136
5457
|
|
|
5137
5458
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5138
5459
|
// See LICENSE in the project root for license information.
|
|
@@ -5325,6 +5646,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-defau
|
|
|
5325
5646
|
|
|
5326
5647
|
var colorCss$2 = 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)}`;
|
|
5327
5648
|
|
|
5649
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5650
|
+
// See LICENSE in the project root for license information.
|
|
5651
|
+
|
|
5652
|
+
// ---------------------------------------------------------------------
|
|
5653
|
+
|
|
5654
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5655
|
+
|
|
5656
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5657
|
+
|
|
5658
|
+
/* eslint-disable jsdoc/require-param */
|
|
5659
|
+
|
|
5660
|
+
/**
|
|
5661
|
+
* This will register a new custom element with the browser.
|
|
5662
|
+
* @param {String} name - The name of the custom element.
|
|
5663
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5664
|
+
* @returns {void}
|
|
5665
|
+
*/
|
|
5666
|
+
registerComponent(name, componentClass) {
|
|
5667
|
+
if (!customElements.get(name)) {
|
|
5668
|
+
customElements.define(name, class extends componentClass {});
|
|
5669
|
+
}
|
|
5670
|
+
}
|
|
5671
|
+
|
|
5672
|
+
/**
|
|
5673
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5674
|
+
* @returns {void}
|
|
5675
|
+
*/
|
|
5676
|
+
closestElement(
|
|
5677
|
+
selector, // selector like in .closest()
|
|
5678
|
+
base = this, // extra functionality to skip a parent
|
|
5679
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5680
|
+
!el || el === document || el === window
|
|
5681
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5682
|
+
: found
|
|
5683
|
+
? found // found a selector INside this element
|
|
5684
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5685
|
+
) {
|
|
5686
|
+
return __Closest(base);
|
|
5687
|
+
}
|
|
5688
|
+
/* eslint-enable jsdoc/require-param */
|
|
5689
|
+
|
|
5690
|
+
/**
|
|
5691
|
+
* 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.
|
|
5692
|
+
* @param {Object} elem - The element to check.
|
|
5693
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5694
|
+
* @returns {void}
|
|
5695
|
+
*/
|
|
5696
|
+
handleComponentTagRename(elem, tagName) {
|
|
5697
|
+
const tag = tagName.toLowerCase();
|
|
5698
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5699
|
+
|
|
5700
|
+
if (elemTag !== tag) {
|
|
5701
|
+
elem.setAttribute(tag, true);
|
|
5702
|
+
}
|
|
5703
|
+
}
|
|
5704
|
+
|
|
5705
|
+
/**
|
|
5706
|
+
* Validates if an element is a specific Auro component.
|
|
5707
|
+
* @param {Object} elem - The element to validate.
|
|
5708
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5709
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5710
|
+
*/
|
|
5711
|
+
elementMatch(elem, tagName) {
|
|
5712
|
+
const tag = tagName.toLowerCase();
|
|
5713
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5714
|
+
|
|
5715
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5716
|
+
}
|
|
5717
|
+
};
|
|
5718
|
+
|
|
5328
5719
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5329
5720
|
// See LICENSE in the project root for license information.
|
|
5330
5721
|
|
|
@@ -5357,7 +5748,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5357
5748
|
this.tertiary = false;
|
|
5358
5749
|
this.warning = false;
|
|
5359
5750
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5360
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5751
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
5361
5752
|
}
|
|
5362
5753
|
|
|
5363
5754
|
// function to define props used within the scope of this component
|
|
@@ -5519,7 +5910,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5519
5910
|
*
|
|
5520
5911
|
*/
|
|
5521
5912
|
static register(name = "auro-icon") {
|
|
5522
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
5913
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
5523
5914
|
}
|
|
5524
5915
|
|
|
5525
5916
|
connectedCallback() {
|
|
@@ -5587,6 +5978,76 @@ class AuroIcon extends BaseIcon {
|
|
|
5587
5978
|
|
|
5588
5979
|
var iconVersion = '7.0.1';
|
|
5589
5980
|
|
|
5981
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5982
|
+
// See LICENSE in the project root for license information.
|
|
5983
|
+
|
|
5984
|
+
// ---------------------------------------------------------------------
|
|
5985
|
+
|
|
5986
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5987
|
+
|
|
5988
|
+
class AuroLibraryRuntimeUtils {
|
|
5989
|
+
|
|
5990
|
+
/* eslint-disable jsdoc/require-param */
|
|
5991
|
+
|
|
5992
|
+
/**
|
|
5993
|
+
* This will register a new custom element with the browser.
|
|
5994
|
+
* @param {String} name - The name of the custom element.
|
|
5995
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5996
|
+
* @returns {void}
|
|
5997
|
+
*/
|
|
5998
|
+
registerComponent(name, componentClass) {
|
|
5999
|
+
if (!customElements.get(name)) {
|
|
6000
|
+
customElements.define(name, class extends componentClass {});
|
|
6001
|
+
}
|
|
6002
|
+
}
|
|
6003
|
+
|
|
6004
|
+
/**
|
|
6005
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
6006
|
+
* @returns {void}
|
|
6007
|
+
*/
|
|
6008
|
+
closestElement(
|
|
6009
|
+
selector, // selector like in .closest()
|
|
6010
|
+
base = this, // extra functionality to skip a parent
|
|
6011
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
6012
|
+
!el || el === document || el === window
|
|
6013
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
6014
|
+
: found
|
|
6015
|
+
? found // found a selector INside this element
|
|
6016
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
6017
|
+
) {
|
|
6018
|
+
return __Closest(base);
|
|
6019
|
+
}
|
|
6020
|
+
/* eslint-enable jsdoc/require-param */
|
|
6021
|
+
|
|
6022
|
+
/**
|
|
6023
|
+
* 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.
|
|
6024
|
+
* @param {Object} elem - The element to check.
|
|
6025
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
6026
|
+
* @returns {void}
|
|
6027
|
+
*/
|
|
6028
|
+
handleComponentTagRename(elem, tagName) {
|
|
6029
|
+
const tag = tagName.toLowerCase();
|
|
6030
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6031
|
+
|
|
6032
|
+
if (elemTag !== tag) {
|
|
6033
|
+
elem.setAttribute(tag, true);
|
|
6034
|
+
}
|
|
6035
|
+
}
|
|
6036
|
+
|
|
6037
|
+
/**
|
|
6038
|
+
* Validates if an element is a specific Auro component.
|
|
6039
|
+
* @param {Object} elem - The element to validate.
|
|
6040
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
6041
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
6042
|
+
*/
|
|
6043
|
+
elementMatch(elem, tagName) {
|
|
6044
|
+
const tag = tagName.toLowerCase();
|
|
6045
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
6046
|
+
|
|
6047
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6048
|
+
}
|
|
6049
|
+
}
|
|
6050
|
+
|
|
5590
6051
|
var styleCss$3 = 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)}`;
|
|
5591
6052
|
|
|
5592
6053
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -5740,11 +6201,11 @@ class AuroBibtemplate extends r {
|
|
|
5740
6201
|
constructor() {
|
|
5741
6202
|
super();
|
|
5742
6203
|
|
|
5743
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
6204
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5744
6205
|
|
|
5745
6206
|
const versioning = new AuroDependencyVersioning();
|
|
5746
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
5747
|
-
this.headerTag = versioning.generateTag('auro-header', headerVersion, AuroHeader);
|
|
6207
|
+
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
6208
|
+
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
5748
6209
|
}
|
|
5749
6210
|
|
|
5750
6211
|
static get styles() {
|
|
@@ -5779,7 +6240,7 @@ class AuroBibtemplate extends r {
|
|
|
5779
6240
|
*
|
|
5780
6241
|
*/
|
|
5781
6242
|
static register(name = "auro-bibtemplate") {
|
|
5782
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
6243
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
5783
6244
|
}
|
|
5784
6245
|
|
|
5785
6246
|
/**
|
|
@@ -5885,7 +6346,7 @@ class AuroCounterWrapper extends r {
|
|
|
5885
6346
|
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
5886
6347
|
*/
|
|
5887
6348
|
static register(name = "auro-counter-wrapper") {
|
|
5888
|
-
AuroLibraryRuntimeUtils$
|
|
6349
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterWrapper);
|
|
5889
6350
|
}
|
|
5890
6351
|
|
|
5891
6352
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -5961,14 +6422,14 @@ class AuroCounterGroup extends r {
|
|
|
5961
6422
|
* @private
|
|
5962
6423
|
* @type {string}
|
|
5963
6424
|
*/
|
|
5964
|
-
this.dropdownTag = versioning.generateTag("auro-dropdown", dropdownVersion, AuroDropdown);
|
|
6425
|
+
this.dropdownTag = versioning.generateTag("auro-formkit-counter-dropdown", dropdownVersion, AuroDropdown);
|
|
5965
6426
|
|
|
5966
6427
|
/**
|
|
5967
6428
|
* Dynamically generated bibtempalate tag.
|
|
5968
6429
|
* @private
|
|
5969
6430
|
* @type {string}
|
|
5970
6431
|
*/
|
|
5971
|
-
this.bibtemplateTag = versioning.generateTag('auro-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
6432
|
+
this.bibtemplateTag = versioning.generateTag('auro-formkit-counter-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
5972
6433
|
}
|
|
5973
6434
|
|
|
5974
6435
|
static get styles() {
|
|
@@ -6276,7 +6737,7 @@ class AuroCounterGroup extends r {
|
|
|
6276
6737
|
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
6277
6738
|
*/
|
|
6278
6739
|
static register(name = "auro-counter-group") {
|
|
6279
|
-
AuroLibraryRuntimeUtils$
|
|
6740
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterGroup);
|
|
6280
6741
|
}
|
|
6281
6742
|
|
|
6282
6743
|
// function that renders the HTML and CSS into the scope of the component
|