@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
|
@@ -13,7 +13,7 @@ var styleButtonCss = css`*,*:before,*:after{box-sizing:border-box}@media(prefers
|
|
|
13
13
|
// See LICENSE in the project root for license information.
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
let AuroDependencyVersioning$
|
|
16
|
+
let AuroDependencyVersioning$3 = class AuroDependencyVersioning {
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Generates a unique string to be used for child auro element naming.
|
|
@@ -56,7 +56,7 @@ let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
|
56
56
|
|
|
57
57
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
58
58
|
|
|
59
|
-
let AuroLibraryRuntimeUtils$
|
|
59
|
+
let AuroLibraryRuntimeUtils$7 = class AuroLibraryRuntimeUtils {
|
|
60
60
|
|
|
61
61
|
/* eslint-disable jsdoc/require-param */
|
|
62
62
|
|
|
@@ -125,6 +125,76 @@ var colorCss$8 = css`[auro-loader]{color:var(--ds-auro-button-loader-color)}.aur
|
|
|
125
125
|
|
|
126
126
|
var tokensCss$7 = css`: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}`;
|
|
127
127
|
|
|
128
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
129
|
+
// See LICENSE in the project root for license information.
|
|
130
|
+
|
|
131
|
+
// ---------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
134
|
+
|
|
135
|
+
let AuroLibraryRuntimeUtils$6 = class AuroLibraryRuntimeUtils {
|
|
136
|
+
|
|
137
|
+
/* eslint-disable jsdoc/require-param */
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* This will register a new custom element with the browser.
|
|
141
|
+
* @param {String} name - The name of the custom element.
|
|
142
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
143
|
+
* @returns {void}
|
|
144
|
+
*/
|
|
145
|
+
registerComponent(name, componentClass) {
|
|
146
|
+
if (!customElements.get(name)) {
|
|
147
|
+
customElements.define(name, class extends componentClass {});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
153
|
+
* @returns {void}
|
|
154
|
+
*/
|
|
155
|
+
closestElement(
|
|
156
|
+
selector, // selector like in .closest()
|
|
157
|
+
base = this, // extra functionality to skip a parent
|
|
158
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
159
|
+
!el || el === document || el === window
|
|
160
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
161
|
+
: found
|
|
162
|
+
? found // found a selector INside this element
|
|
163
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
164
|
+
) {
|
|
165
|
+
return __Closest(base);
|
|
166
|
+
}
|
|
167
|
+
/* eslint-enable jsdoc/require-param */
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* 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.
|
|
171
|
+
* @param {Object} elem - The element to check.
|
|
172
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
173
|
+
* @returns {void}
|
|
174
|
+
*/
|
|
175
|
+
handleComponentTagRename(elem, tagName) {
|
|
176
|
+
const tag = tagName.toLowerCase();
|
|
177
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
178
|
+
|
|
179
|
+
if (elemTag !== tag) {
|
|
180
|
+
elem.setAttribute(tag, true);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Validates if an element is a specific Auro component.
|
|
186
|
+
* @param {Object} elem - The element to validate.
|
|
187
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
188
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
189
|
+
*/
|
|
190
|
+
elementMatch(elem, tagName) {
|
|
191
|
+
const tag = tagName.toLowerCase();
|
|
192
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
193
|
+
|
|
194
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
195
|
+
}
|
|
196
|
+
};
|
|
197
|
+
|
|
128
198
|
var styleCss$8 = css`:focus:not(:focus-visible){outline:3px solid transparent}:host,:host>span{position:relative}:host{width:2rem;height:2rem;display:inline-block;font-size:0}:host>span{position:absolute;display:inline-block;float:none;top:0;left:0;width:2rem;height:2rem;border-radius:100%;border-style:solid;border-width:0}:host([xs]),:host([xs])>span{width:1.2rem;height:1.2rem}:host([sm]),:host([sm])>span{width:3rem;height:3rem}:host([md]),:host([md])>span{width:5rem;height:5rem}:host([lg]),:host([lg])>span{width:8rem;height:8rem}:host{--margin:0.375rem;--margin-xs:0.2rem;--margin-sm:0.5rem;--margin-md:0.75rem;--margin-lg:1rem}:host([pulse]),:host([pulse])>span{position:relative}:host([pulse]){width:calc(3rem + var(--margin)*6);height:1.5rem}:host([pulse])>span{width:1rem;height:1rem;margin:var(--margin);animation:pulse 1.5s ease infinite}:host([pulse][xs]){width:calc(2.55rem + var(--margin-xs)*6);height:1.55rem}:host([pulse][xs])>span{margin:var(--margin-xs);width:.65rem;height:.65rem}:host([pulse][sm]){width:calc(6rem + var(--margin-sm)*6);height:2.5rem}:host([pulse][sm])>span{margin:var(--margin-sm);width:2rem;height:2rem}:host([pulse][md]){width:calc(9rem + var(--margin-md)*6);height:3.5rem}:host([pulse][md])>span{margin:var(--margin-md);width:3rem;height:3rem}:host([pulse][lg]){width:calc(15rem + var(--margin-lg)*6);height:5.5rem}:host([pulse][lg])>span{margin:var(--margin-lg);width:5rem;height:5rem}:host([pulse])>span:nth-child(1){animation-delay:-400ms}:host([pulse])>span:nth-child(2){animation-delay:-200ms}:host([pulse])>span:nth-child(3){animation-delay:0ms}@keyframes pulse{0%,100%{opacity:.1;transform:scale(0.9)}50%{opacity:1;transform:scale(1.1)}}:host([orbit]),:host([orbit])>span{opacity:1}:host([orbit])>span{border-width:5px}:host([orbit])>span:nth-child(2){animation:orbit 2s linear infinite}:host([orbit][sm])>span{border-width:8px}:host([orbit][md])>span{border-width:13px}:host([orbit][lg])>span{border-width:21px}@keyframes orbit{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:host([ringworm])>svg{animation:rotate 2s linear infinite;height:100%;width:100%;stroke:currentcolor;stroke-width:8}:host([ringworm]) .path{stroke-dashoffset:0;animation:ringworm 1.5s ease-in-out infinite;stroke-linecap:round}@keyframes rotate{100%{transform:rotate(360deg)}}@keyframes ringworm{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}100%{stroke-dasharray:89,200;stroke-dashoffset:-124px}}:host([laser]){position:static;width:100%;display:block;height:0;overflow:hidden;font-size:unset}:host([laser])>span{position:fixed;width:100%;height:.25rem;border-radius:0;z-index:100}:host([laser])>span:nth-child(1){border-color:currentcolor;opacity:.25}:host([laser])>span:nth-child(2){border-color:currentcolor;animation:laser 2s linear infinite;opacity:1;width:50%}:host([laser][sm])>span:nth-child(2){width:20%}:host([laser][md])>span:nth-child(2){width:30%}:host([laser][lg])>span:nth-child(2){width:50%;animation-duration:1.5s}:host([laser][xl])>span:nth-child(2){width:80%;animation-duration:1.5s}@keyframes laser{0%{left:-100%}100%{left:110%}}:host>.no-animation{display:none}@media(prefers-reduced-motion: reduce){:host{display:flex;align-items:center;justify-content:center;font-size:1rem}:host>span{opacity:1}:host>.loader{display:none}:host>.no-animation{display:block}}`;
|
|
129
199
|
|
|
130
200
|
var colorCss$7 = css`:host{color:var(--ds-auro-loader-color)}:host>span{background-color:var(--ds-auro-loader-background-color);border-color:var(--ds-auro-loader-border-color)}:host([onlight]){--ds-auro-loader-color:var(--ds-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}`;
|
|
@@ -176,7 +246,7 @@ class AuroLoader extends LitElement {
|
|
|
176
246
|
/**
|
|
177
247
|
* @private
|
|
178
248
|
*/
|
|
179
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
249
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$6();
|
|
180
250
|
|
|
181
251
|
this.orbit = false;
|
|
182
252
|
this.ringworm = false;
|
|
@@ -223,7 +293,7 @@ class AuroLoader extends LitElement {
|
|
|
223
293
|
*
|
|
224
294
|
*/
|
|
225
295
|
static register(name = "auro-loader") {
|
|
226
|
-
AuroLibraryRuntimeUtils$
|
|
296
|
+
AuroLibraryRuntimeUtils$6.prototype.registerComponent(name, AuroLoader);
|
|
227
297
|
}
|
|
228
298
|
|
|
229
299
|
firstUpdated() {
|
|
@@ -348,7 +418,7 @@ class AuroButton extends LitElement {
|
|
|
348
418
|
/**
|
|
349
419
|
* Generate unique names for dependency components.
|
|
350
420
|
*/
|
|
351
|
-
const versioning = new AuroDependencyVersioning$
|
|
421
|
+
const versioning = new AuroDependencyVersioning$3();
|
|
352
422
|
|
|
353
423
|
/**
|
|
354
424
|
* @private
|
|
@@ -443,7 +513,7 @@ class AuroButton extends LitElement {
|
|
|
443
513
|
*
|
|
444
514
|
*/
|
|
445
515
|
static register(name = "auro-button") {
|
|
446
|
-
AuroLibraryRuntimeUtils$
|
|
516
|
+
AuroLibraryRuntimeUtils$7.prototype.registerComponent(name, AuroButton);
|
|
447
517
|
}
|
|
448
518
|
|
|
449
519
|
/**
|
|
@@ -539,6 +609,76 @@ class AuroButton extends LitElement {
|
|
|
539
609
|
}
|
|
540
610
|
}
|
|
541
611
|
|
|
612
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
613
|
+
// See LICENSE in the project root for license information.
|
|
614
|
+
|
|
615
|
+
// ---------------------------------------------------------------------
|
|
616
|
+
|
|
617
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
618
|
+
|
|
619
|
+
let AuroLibraryRuntimeUtils$5 = class AuroLibraryRuntimeUtils {
|
|
620
|
+
|
|
621
|
+
/* eslint-disable jsdoc/require-param */
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* This will register a new custom element with the browser.
|
|
625
|
+
* @param {String} name - The name of the custom element.
|
|
626
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
627
|
+
* @returns {void}
|
|
628
|
+
*/
|
|
629
|
+
registerComponent(name, componentClass) {
|
|
630
|
+
if (!customElements.get(name)) {
|
|
631
|
+
customElements.define(name, class extends componentClass {});
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
/**
|
|
636
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
637
|
+
* @returns {void}
|
|
638
|
+
*/
|
|
639
|
+
closestElement(
|
|
640
|
+
selector, // selector like in .closest()
|
|
641
|
+
base = this, // extra functionality to skip a parent
|
|
642
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
643
|
+
!el || el === document || el === window
|
|
644
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
645
|
+
: found
|
|
646
|
+
? found // found a selector INside this element
|
|
647
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
648
|
+
) {
|
|
649
|
+
return __Closest(base);
|
|
650
|
+
}
|
|
651
|
+
/* eslint-enable jsdoc/require-param */
|
|
652
|
+
|
|
653
|
+
/**
|
|
654
|
+
* 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.
|
|
655
|
+
* @param {Object} elem - The element to check.
|
|
656
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
657
|
+
* @returns {void}
|
|
658
|
+
*/
|
|
659
|
+
handleComponentTagRename(elem, tagName) {
|
|
660
|
+
const tag = tagName.toLowerCase();
|
|
661
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
662
|
+
|
|
663
|
+
if (elemTag !== tag) {
|
|
664
|
+
elem.setAttribute(tag, true);
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
/**
|
|
669
|
+
* Validates if an element is a specific Auro component.
|
|
670
|
+
* @param {Object} elem - The element to validate.
|
|
671
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
672
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
673
|
+
*/
|
|
674
|
+
elementMatch(elem, tagName) {
|
|
675
|
+
const tag = tagName.toLowerCase();
|
|
676
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
677
|
+
|
|
678
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
679
|
+
}
|
|
680
|
+
};
|
|
681
|
+
|
|
542
682
|
// Copyright (c) 2022 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
543
683
|
// See LICENSE in the project root for license information.
|
|
544
684
|
|
|
@@ -563,7 +703,7 @@ class AuroCounterButton extends AuroButton {
|
|
|
563
703
|
*
|
|
564
704
|
*/
|
|
565
705
|
static register(name = "auro-counter-button") {
|
|
566
|
-
AuroLibraryRuntimeUtils$
|
|
706
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterButton);
|
|
567
707
|
}
|
|
568
708
|
}
|
|
569
709
|
|
|
@@ -573,6 +713,46 @@ if (!customElements.get("auro-counter-button")) {
|
|
|
573
713
|
customElements.define("auro-counter-button", AuroCounterButton);
|
|
574
714
|
}
|
|
575
715
|
|
|
716
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
717
|
+
// See LICENSE in the project root for license information.
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
let AuroDependencyVersioning$2 = class AuroDependencyVersioning {
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Generates a unique string to be used for child auro element naming.
|
|
724
|
+
* @private
|
|
725
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
726
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
727
|
+
* @returns {string} - Unique string to be used for naming.
|
|
728
|
+
*/
|
|
729
|
+
generateElementName(baseName, version) {
|
|
730
|
+
let result = baseName;
|
|
731
|
+
|
|
732
|
+
result += '-';
|
|
733
|
+
result += version.replace(/[.]/g, '_');
|
|
734
|
+
|
|
735
|
+
return result;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* Generates a unique string to be used for child auro element naming.
|
|
740
|
+
* @param {string} baseName - Defines the first part of the unique element name.
|
|
741
|
+
* @param {string} version - Version of the component that will be appended to the baseName.
|
|
742
|
+
* @returns {string} - Unique string to be used for naming.
|
|
743
|
+
*/
|
|
744
|
+
generateTag(baseName, version, tagClass) {
|
|
745
|
+
const elementName = this.generateElementName(baseName, version);
|
|
746
|
+
const tag = literal`${unsafeStatic(elementName)}`;
|
|
747
|
+
|
|
748
|
+
if (!customElements.get(elementName)) {
|
|
749
|
+
customElements.define(elementName, class extends tagClass {});
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
return tag;
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
|
|
576
756
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
577
757
|
// See LICENSE in the project root for license information.
|
|
578
758
|
|
|
@@ -724,6 +904,76 @@ var tokensCss$5 = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-def
|
|
|
724
904
|
|
|
725
905
|
var colorCss$6 = css`: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)}`;
|
|
726
906
|
|
|
907
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
908
|
+
// See LICENSE in the project root for license information.
|
|
909
|
+
|
|
910
|
+
// ---------------------------------------------------------------------
|
|
911
|
+
|
|
912
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
913
|
+
|
|
914
|
+
let AuroLibraryRuntimeUtils$4 = class AuroLibraryRuntimeUtils {
|
|
915
|
+
|
|
916
|
+
/* eslint-disable jsdoc/require-param */
|
|
917
|
+
|
|
918
|
+
/**
|
|
919
|
+
* This will register a new custom element with the browser.
|
|
920
|
+
* @param {String} name - The name of the custom element.
|
|
921
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
922
|
+
* @returns {void}
|
|
923
|
+
*/
|
|
924
|
+
registerComponent(name, componentClass) {
|
|
925
|
+
if (!customElements.get(name)) {
|
|
926
|
+
customElements.define(name, class extends componentClass {});
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
932
|
+
* @returns {void}
|
|
933
|
+
*/
|
|
934
|
+
closestElement(
|
|
935
|
+
selector, // selector like in .closest()
|
|
936
|
+
base = this, // extra functionality to skip a parent
|
|
937
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
938
|
+
!el || el === document || el === window
|
|
939
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
940
|
+
: found
|
|
941
|
+
? found // found a selector INside this element
|
|
942
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
943
|
+
) {
|
|
944
|
+
return __Closest(base);
|
|
945
|
+
}
|
|
946
|
+
/* eslint-enable jsdoc/require-param */
|
|
947
|
+
|
|
948
|
+
/**
|
|
949
|
+
* 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.
|
|
950
|
+
* @param {Object} elem - The element to check.
|
|
951
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
952
|
+
* @returns {void}
|
|
953
|
+
*/
|
|
954
|
+
handleComponentTagRename(elem, tagName) {
|
|
955
|
+
const tag = tagName.toLowerCase();
|
|
956
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
957
|
+
|
|
958
|
+
if (elemTag !== tag) {
|
|
959
|
+
elem.setAttribute(tag, true);
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
/**
|
|
964
|
+
* Validates if an element is a specific Auro component.
|
|
965
|
+
* @param {Object} elem - The element to validate.
|
|
966
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
967
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
968
|
+
*/
|
|
969
|
+
elementMatch(elem, tagName) {
|
|
970
|
+
const tag = tagName.toLowerCase();
|
|
971
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
972
|
+
|
|
973
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
974
|
+
}
|
|
975
|
+
};
|
|
976
|
+
|
|
727
977
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
728
978
|
// See LICENSE in the project root for license information.
|
|
729
979
|
|
|
@@ -756,7 +1006,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
756
1006
|
this.tertiary = false;
|
|
757
1007
|
this.warning = false;
|
|
758
1008
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
759
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1009
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$4();
|
|
760
1010
|
}
|
|
761
1011
|
|
|
762
1012
|
// function to define props used within the scope of this component
|
|
@@ -918,7 +1168,7 @@ let AuroIcon$2 = class AuroIcon extends BaseIcon$2 {
|
|
|
918
1168
|
*
|
|
919
1169
|
*/
|
|
920
1170
|
static register(name = "auro-icon") {
|
|
921
|
-
AuroLibraryRuntimeUtils$
|
|
1171
|
+
AuroLibraryRuntimeUtils$4.prototype.registerComponent(name, AuroIcon);
|
|
922
1172
|
}
|
|
923
1173
|
|
|
924
1174
|
connectedCallback() {
|
|
@@ -992,7 +1242,7 @@ var iconVersion$2 = '7.0.1';
|
|
|
992
1242
|
|
|
993
1243
|
class AuroFormValidation {
|
|
994
1244
|
constructor() {
|
|
995
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$
|
|
1245
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$5();
|
|
996
1246
|
}
|
|
997
1247
|
|
|
998
1248
|
/**
|
|
@@ -1375,7 +1625,7 @@ class AuroCounter extends LitElement {
|
|
|
1375
1625
|
* @private
|
|
1376
1626
|
* @type {string}
|
|
1377
1627
|
*/
|
|
1378
|
-
this.iconTag = versioning.generateTag("auro-icon", iconVersion$2, AuroIcon$2);
|
|
1628
|
+
this.iconTag = versioning.generateTag("auro-formkit-counter-icon", iconVersion$2, AuroIcon$2);
|
|
1379
1629
|
|
|
1380
1630
|
/**
|
|
1381
1631
|
* @private
|
|
@@ -1477,7 +1727,7 @@ class AuroCounter extends LitElement {
|
|
|
1477
1727
|
* AuroCounter.register("custom-counter") // registers <custom-counter/>
|
|
1478
1728
|
*/
|
|
1479
1729
|
static register(name = "auro-counter") {
|
|
1480
|
-
AuroLibraryRuntimeUtils$
|
|
1730
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounter);
|
|
1481
1731
|
}
|
|
1482
1732
|
|
|
1483
1733
|
static get styles() {
|
|
@@ -1661,7 +1911,7 @@ var styleCss$5 = css`:host{position:relative;display:block}[slot=trigger],::slot
|
|
|
1661
1911
|
|
|
1662
1912
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1663
1913
|
|
|
1664
|
-
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
1914
|
+
let AuroLibraryRuntimeUtils$2$1 = class AuroLibraryRuntimeUtils {
|
|
1665
1915
|
|
|
1666
1916
|
/* eslint-disable jsdoc/require-param */
|
|
1667
1917
|
|
|
@@ -3474,11 +3724,11 @@ class AuroFloatingUI {
|
|
|
3474
3724
|
|
|
3475
3725
|
updateCurrentExpandedDropdown() {
|
|
3476
3726
|
// Close any other dropdown that is already open
|
|
3477
|
-
if (document.
|
|
3478
|
-
|
|
3727
|
+
if (document.expandedAuroFormkitDropdown) {
|
|
3728
|
+
document.expandedAuroFormkitDropdown.hide;
|
|
3479
3729
|
}
|
|
3480
3730
|
|
|
3481
|
-
document.
|
|
3731
|
+
document.expandedAuroFormkitDropdown = this;
|
|
3482
3732
|
}
|
|
3483
3733
|
|
|
3484
3734
|
showBib() {
|
|
@@ -3853,6 +4103,76 @@ var tokensCss$2 = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-def
|
|
|
3853
4103
|
|
|
3854
4104
|
var colorCss$3 = css`: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)}`;
|
|
3855
4105
|
|
|
4106
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
4107
|
+
// See LICENSE in the project root for license information.
|
|
4108
|
+
|
|
4109
|
+
// ---------------------------------------------------------------------
|
|
4110
|
+
|
|
4111
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4112
|
+
|
|
4113
|
+
let AuroLibraryRuntimeUtils$1$1 = class AuroLibraryRuntimeUtils {
|
|
4114
|
+
|
|
4115
|
+
/* eslint-disable jsdoc/require-param */
|
|
4116
|
+
|
|
4117
|
+
/**
|
|
4118
|
+
* This will register a new custom element with the browser.
|
|
4119
|
+
* @param {String} name - The name of the custom element.
|
|
4120
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
4121
|
+
* @returns {void}
|
|
4122
|
+
*/
|
|
4123
|
+
registerComponent(name, componentClass) {
|
|
4124
|
+
if (!customElements.get(name)) {
|
|
4125
|
+
customElements.define(name, class extends componentClass {});
|
|
4126
|
+
}
|
|
4127
|
+
}
|
|
4128
|
+
|
|
4129
|
+
/**
|
|
4130
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
4131
|
+
* @returns {void}
|
|
4132
|
+
*/
|
|
4133
|
+
closestElement(
|
|
4134
|
+
selector, // selector like in .closest()
|
|
4135
|
+
base = this, // extra functionality to skip a parent
|
|
4136
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
4137
|
+
!el || el === document || el === window
|
|
4138
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
4139
|
+
: found
|
|
4140
|
+
? found // found a selector INside this element
|
|
4141
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
4142
|
+
) {
|
|
4143
|
+
return __Closest(base);
|
|
4144
|
+
}
|
|
4145
|
+
/* eslint-enable jsdoc/require-param */
|
|
4146
|
+
|
|
4147
|
+
/**
|
|
4148
|
+
* 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.
|
|
4149
|
+
* @param {Object} elem - The element to check.
|
|
4150
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
4151
|
+
* @returns {void}
|
|
4152
|
+
*/
|
|
4153
|
+
handleComponentTagRename(elem, tagName) {
|
|
4154
|
+
const tag = tagName.toLowerCase();
|
|
4155
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4156
|
+
|
|
4157
|
+
if (elemTag !== tag) {
|
|
4158
|
+
elem.setAttribute(tag, true);
|
|
4159
|
+
}
|
|
4160
|
+
}
|
|
4161
|
+
|
|
4162
|
+
/**
|
|
4163
|
+
* Validates if an element is a specific Auro component.
|
|
4164
|
+
* @param {Object} elem - The element to validate.
|
|
4165
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
4166
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
4167
|
+
*/
|
|
4168
|
+
elementMatch(elem, tagName) {
|
|
4169
|
+
const tag = tagName.toLowerCase();
|
|
4170
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
4171
|
+
|
|
4172
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
4173
|
+
}
|
|
4174
|
+
};
|
|
4175
|
+
|
|
3856
4176
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3857
4177
|
// See LICENSE in the project root for license information.
|
|
3858
4178
|
|
|
@@ -3885,7 +4205,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
3885
4205
|
this.tertiary = false;
|
|
3886
4206
|
this.warning = false;
|
|
3887
4207
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
3888
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4208
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1$1();
|
|
3889
4209
|
}
|
|
3890
4210
|
|
|
3891
4211
|
// function to define props used within the scope of this component
|
|
@@ -4047,7 +4367,7 @@ let AuroIcon$1 = class AuroIcon extends BaseIcon$1 {
|
|
|
4047
4367
|
*
|
|
4048
4368
|
*/
|
|
4049
4369
|
static register(name = "auro-icon") {
|
|
4050
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
4370
|
+
AuroLibraryRuntimeUtils$1$1.prototype.registerComponent(name, AuroIcon);
|
|
4051
4371
|
}
|
|
4052
4372
|
|
|
4053
4373
|
connectedCallback() {
|
|
@@ -4149,7 +4469,7 @@ class AuroDropdownBib extends LitElement {
|
|
|
4149
4469
|
*/
|
|
4150
4470
|
this._mobileBreakpointValue = undefined;
|
|
4151
4471
|
|
|
4152
|
-
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4472
|
+
AuroLibraryRuntimeUtils$2$1.prototype.handleComponentTagRename(this, 'auro-dropdownbib');
|
|
4153
4473
|
}
|
|
4154
4474
|
|
|
4155
4475
|
static get styles() {
|
|
@@ -4257,7 +4577,7 @@ var tokensCss$3 = css`:host{--ds-auro-helptext-color: var(--ds-color-text-tertia
|
|
|
4257
4577
|
|
|
4258
4578
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
4259
4579
|
|
|
4260
|
-
let AuroLibraryRuntimeUtils$
|
|
4580
|
+
let AuroLibraryRuntimeUtils$3 = class AuroLibraryRuntimeUtils {
|
|
4261
4581
|
|
|
4262
4582
|
/* eslint-disable jsdoc/require-param */
|
|
4263
4583
|
|
|
@@ -4337,7 +4657,7 @@ class AuroHelpText extends LitElement {
|
|
|
4337
4657
|
this.error = false;
|
|
4338
4658
|
this.hasTextContent = false;
|
|
4339
4659
|
|
|
4340
|
-
AuroLibraryRuntimeUtils$
|
|
4660
|
+
AuroLibraryRuntimeUtils$3.prototype.handleComponentTagRename(this, 'auro-helptext');
|
|
4341
4661
|
}
|
|
4342
4662
|
|
|
4343
4663
|
static get styles() {
|
|
@@ -4385,7 +4705,7 @@ class AuroHelpText extends LitElement {
|
|
|
4385
4705
|
*
|
|
4386
4706
|
*/
|
|
4387
4707
|
static register(name = "auro-helptext") {
|
|
4388
|
-
AuroLibraryRuntimeUtils$
|
|
4708
|
+
AuroLibraryRuntimeUtils$3.prototype.registerComponent(name, AuroHelpText);
|
|
4389
4709
|
}
|
|
4390
4710
|
|
|
4391
4711
|
updated() {
|
|
@@ -4518,7 +4838,7 @@ class AuroDropdown extends LitElement {
|
|
|
4518
4838
|
/**
|
|
4519
4839
|
* @private
|
|
4520
4840
|
*/
|
|
4521
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
4841
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$2$1();
|
|
4522
4842
|
|
|
4523
4843
|
/**
|
|
4524
4844
|
* @private
|
|
@@ -4543,17 +4863,17 @@ class AuroDropdown extends LitElement {
|
|
|
4543
4863
|
/**
|
|
4544
4864
|
* @private
|
|
4545
4865
|
*/
|
|
4546
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion$1, AuroIcon$1);
|
|
4866
|
+
this.iconTag = versioning.generateTag('auro-formkit-dropdown-icon', iconVersion$1, AuroIcon$1);
|
|
4547
4867
|
|
|
4548
4868
|
/**
|
|
4549
4869
|
* @private
|
|
4550
4870
|
*/
|
|
4551
|
-
this.dropdownBibTag = versioning.generateTag('auro-dropdownbib', dropdownVersion$1, AuroDropdownBib);
|
|
4871
|
+
this.dropdownBibTag = versioning.generateTag('auro-formkit-dropdown-dropdownbib', dropdownVersion$1, AuroDropdownBib);
|
|
4552
4872
|
|
|
4553
4873
|
/**
|
|
4554
4874
|
* @private
|
|
4555
4875
|
*/
|
|
4556
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
4876
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-dropdown-helptext', helpTextVersion, AuroHelpText);
|
|
4557
4877
|
}
|
|
4558
4878
|
|
|
4559
4879
|
/**
|
|
@@ -4756,7 +5076,7 @@ class AuroDropdown extends LitElement {
|
|
|
4756
5076
|
*
|
|
4757
5077
|
*/
|
|
4758
5078
|
static register(name = "auro-dropdown") {
|
|
4759
|
-
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroDropdown);
|
|
5079
|
+
AuroLibraryRuntimeUtils$2$1.prototype.registerComponent(name, AuroDropdown);
|
|
4760
5080
|
}
|
|
4761
5081
|
|
|
4762
5082
|
connectedCallback() {
|
|
@@ -4779,6 +5099,7 @@ class AuroDropdown extends LitElement {
|
|
|
4779
5099
|
if (changedProperties.size === 0 || changedProperties.has('isPopoverVisible')) {
|
|
4780
5100
|
this.handleTriggerContentSlotChange();
|
|
4781
5101
|
}
|
|
5102
|
+
|
|
4782
5103
|
}
|
|
4783
5104
|
|
|
4784
5105
|
firstUpdated() {
|
|
@@ -5024,7 +5345,7 @@ var tokenCss = css`:host{--ds-auro-dropdownbib-header-boxshadow-color: var(--ds-
|
|
|
5024
5345
|
|
|
5025
5346
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5026
5347
|
|
|
5027
|
-
class AuroLibraryRuntimeUtils {
|
|
5348
|
+
let AuroLibraryRuntimeUtils$2 = class AuroLibraryRuntimeUtils {
|
|
5028
5349
|
|
|
5029
5350
|
/* eslint-disable jsdoc/require-param */
|
|
5030
5351
|
|
|
@@ -5085,7 +5406,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
5085
5406
|
|
|
5086
5407
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
5087
5408
|
}
|
|
5088
|
-
}
|
|
5409
|
+
};
|
|
5089
5410
|
|
|
5090
5411
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5091
5412
|
// See LICENSE in the project root for license information.
|
|
@@ -5278,6 +5599,76 @@ var tokensCss = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-defau
|
|
|
5278
5599
|
|
|
5279
5600
|
var colorCss$2 = css`: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)}`;
|
|
5280
5601
|
|
|
5602
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5603
|
+
// See LICENSE in the project root for license information.
|
|
5604
|
+
|
|
5605
|
+
// ---------------------------------------------------------------------
|
|
5606
|
+
|
|
5607
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5608
|
+
|
|
5609
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
5610
|
+
|
|
5611
|
+
/* eslint-disable jsdoc/require-param */
|
|
5612
|
+
|
|
5613
|
+
/**
|
|
5614
|
+
* This will register a new custom element with the browser.
|
|
5615
|
+
* @param {String} name - The name of the custom element.
|
|
5616
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5617
|
+
* @returns {void}
|
|
5618
|
+
*/
|
|
5619
|
+
registerComponent(name, componentClass) {
|
|
5620
|
+
if (!customElements.get(name)) {
|
|
5621
|
+
customElements.define(name, class extends componentClass {});
|
|
5622
|
+
}
|
|
5623
|
+
}
|
|
5624
|
+
|
|
5625
|
+
/**
|
|
5626
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5627
|
+
* @returns {void}
|
|
5628
|
+
*/
|
|
5629
|
+
closestElement(
|
|
5630
|
+
selector, // selector like in .closest()
|
|
5631
|
+
base = this, // extra functionality to skip a parent
|
|
5632
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5633
|
+
!el || el === document || el === window
|
|
5634
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5635
|
+
: found
|
|
5636
|
+
? found // found a selector INside this element
|
|
5637
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5638
|
+
) {
|
|
5639
|
+
return __Closest(base);
|
|
5640
|
+
}
|
|
5641
|
+
/* eslint-enable jsdoc/require-param */
|
|
5642
|
+
|
|
5643
|
+
/**
|
|
5644
|
+
* 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.
|
|
5645
|
+
* @param {Object} elem - The element to check.
|
|
5646
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5647
|
+
* @returns {void}
|
|
5648
|
+
*/
|
|
5649
|
+
handleComponentTagRename(elem, tagName) {
|
|
5650
|
+
const tag = tagName.toLowerCase();
|
|
5651
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5652
|
+
|
|
5653
|
+
if (elemTag !== tag) {
|
|
5654
|
+
elem.setAttribute(tag, true);
|
|
5655
|
+
}
|
|
5656
|
+
}
|
|
5657
|
+
|
|
5658
|
+
/**
|
|
5659
|
+
* Validates if an element is a specific Auro component.
|
|
5660
|
+
* @param {Object} elem - The element to validate.
|
|
5661
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5662
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5663
|
+
*/
|
|
5664
|
+
elementMatch(elem, tagName) {
|
|
5665
|
+
const tag = tagName.toLowerCase();
|
|
5666
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5667
|
+
|
|
5668
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
5669
|
+
}
|
|
5670
|
+
};
|
|
5671
|
+
|
|
5281
5672
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
5282
5673
|
// See LICENSE in the project root for license information.
|
|
5283
5674
|
|
|
@@ -5310,7 +5701,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5310
5701
|
this.tertiary = false;
|
|
5311
5702
|
this.warning = false;
|
|
5312
5703
|
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
5313
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
5704
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
5314
5705
|
}
|
|
5315
5706
|
|
|
5316
5707
|
// function to define props used within the scope of this component
|
|
@@ -5472,7 +5863,7 @@ class AuroIcon extends BaseIcon {
|
|
|
5472
5863
|
*
|
|
5473
5864
|
*/
|
|
5474
5865
|
static register(name = "auro-icon") {
|
|
5475
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroIcon);
|
|
5866
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroIcon);
|
|
5476
5867
|
}
|
|
5477
5868
|
|
|
5478
5869
|
connectedCallback() {
|
|
@@ -5540,6 +5931,76 @@ class AuroIcon extends BaseIcon {
|
|
|
5540
5931
|
|
|
5541
5932
|
var iconVersion = '7.0.1';
|
|
5542
5933
|
|
|
5934
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
5935
|
+
// See LICENSE in the project root for license information.
|
|
5936
|
+
|
|
5937
|
+
// ---------------------------------------------------------------------
|
|
5938
|
+
|
|
5939
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
5940
|
+
|
|
5941
|
+
class AuroLibraryRuntimeUtils {
|
|
5942
|
+
|
|
5943
|
+
/* eslint-disable jsdoc/require-param */
|
|
5944
|
+
|
|
5945
|
+
/**
|
|
5946
|
+
* This will register a new custom element with the browser.
|
|
5947
|
+
* @param {String} name - The name of the custom element.
|
|
5948
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
5949
|
+
* @returns {void}
|
|
5950
|
+
*/
|
|
5951
|
+
registerComponent(name, componentClass) {
|
|
5952
|
+
if (!customElements.get(name)) {
|
|
5953
|
+
customElements.define(name, class extends componentClass {});
|
|
5954
|
+
}
|
|
5955
|
+
}
|
|
5956
|
+
|
|
5957
|
+
/**
|
|
5958
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
5959
|
+
* @returns {void}
|
|
5960
|
+
*/
|
|
5961
|
+
closestElement(
|
|
5962
|
+
selector, // selector like in .closest()
|
|
5963
|
+
base = this, // extra functionality to skip a parent
|
|
5964
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
5965
|
+
!el || el === document || el === window
|
|
5966
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
5967
|
+
: found
|
|
5968
|
+
? found // found a selector INside this element
|
|
5969
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
5970
|
+
) {
|
|
5971
|
+
return __Closest(base);
|
|
5972
|
+
}
|
|
5973
|
+
/* eslint-enable jsdoc/require-param */
|
|
5974
|
+
|
|
5975
|
+
/**
|
|
5976
|
+
* 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.
|
|
5977
|
+
* @param {Object} elem - The element to check.
|
|
5978
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
5979
|
+
* @returns {void}
|
|
5980
|
+
*/
|
|
5981
|
+
handleComponentTagRename(elem, tagName) {
|
|
5982
|
+
const tag = tagName.toLowerCase();
|
|
5983
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5984
|
+
|
|
5985
|
+
if (elemTag !== tag) {
|
|
5986
|
+
elem.setAttribute(tag, true);
|
|
5987
|
+
}
|
|
5988
|
+
}
|
|
5989
|
+
|
|
5990
|
+
/**
|
|
5991
|
+
* Validates if an element is a specific Auro component.
|
|
5992
|
+
* @param {Object} elem - The element to validate.
|
|
5993
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
5994
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
5995
|
+
*/
|
|
5996
|
+
elementMatch(elem, tagName) {
|
|
5997
|
+
const tag = tagName.toLowerCase();
|
|
5998
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
5999
|
+
|
|
6000
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
6001
|
+
}
|
|
6002
|
+
}
|
|
6003
|
+
|
|
5543
6004
|
var styleCss$3 = css`.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)}`;
|
|
5544
6005
|
|
|
5545
6006
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
@@ -5693,11 +6154,11 @@ class AuroBibtemplate extends LitElement {
|
|
|
5693
6154
|
constructor() {
|
|
5694
6155
|
super();
|
|
5695
6156
|
|
|
5696
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
6157
|
+
AuroLibraryRuntimeUtils$2.prototype.handleComponentTagRename(this, 'auro-bibtemplate');
|
|
5697
6158
|
|
|
5698
6159
|
const versioning = new AuroDependencyVersioning();
|
|
5699
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
5700
|
-
this.headerTag = versioning.generateTag('auro-header', headerVersion, AuroHeader);
|
|
6160
|
+
this.iconTag = versioning.generateTag('auro-formkit-bibtemplate-icon', iconVersion, AuroIcon);
|
|
6161
|
+
this.headerTag = versioning.generateTag('auro-formkit-bibtemplate-header', headerVersion, AuroHeader);
|
|
5701
6162
|
}
|
|
5702
6163
|
|
|
5703
6164
|
static get styles() {
|
|
@@ -5732,7 +6193,7 @@ class AuroBibtemplate extends LitElement {
|
|
|
5732
6193
|
*
|
|
5733
6194
|
*/
|
|
5734
6195
|
static register(name = "auro-bibtemplate") {
|
|
5735
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroBibtemplate);
|
|
6196
|
+
AuroLibraryRuntimeUtils$2.prototype.registerComponent(name, AuroBibtemplate);
|
|
5736
6197
|
}
|
|
5737
6198
|
|
|
5738
6199
|
/**
|
|
@@ -5838,7 +6299,7 @@ class AuroCounterWrapper extends LitElement {
|
|
|
5838
6299
|
* AuroCounterWrapper.register("custom-counter-wrapper") // registers <custom-counter-wrapper/>
|
|
5839
6300
|
*/
|
|
5840
6301
|
static register(name = "auro-counter-wrapper") {
|
|
5841
|
-
AuroLibraryRuntimeUtils$
|
|
6302
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterWrapper);
|
|
5842
6303
|
}
|
|
5843
6304
|
|
|
5844
6305
|
// function that renders the HTML and CSS into the scope of the component
|
|
@@ -5914,14 +6375,14 @@ class AuroCounterGroup extends LitElement {
|
|
|
5914
6375
|
* @private
|
|
5915
6376
|
* @type {string}
|
|
5916
6377
|
*/
|
|
5917
|
-
this.dropdownTag = versioning.generateTag("auro-dropdown", dropdownVersion, AuroDropdown);
|
|
6378
|
+
this.dropdownTag = versioning.generateTag("auro-formkit-counter-dropdown", dropdownVersion, AuroDropdown);
|
|
5918
6379
|
|
|
5919
6380
|
/**
|
|
5920
6381
|
* Dynamically generated bibtempalate tag.
|
|
5921
6382
|
* @private
|
|
5922
6383
|
* @type {string}
|
|
5923
6384
|
*/
|
|
5924
|
-
this.bibtemplateTag = versioning.generateTag('auro-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
6385
|
+
this.bibtemplateTag = versioning.generateTag('auro-formkit-counter-bibtemplate', bibTemplateVersion, AuroBibtemplate);
|
|
5925
6386
|
}
|
|
5926
6387
|
|
|
5927
6388
|
static get styles() {
|
|
@@ -6229,7 +6690,7 @@ class AuroCounterGroup extends LitElement {
|
|
|
6229
6690
|
* AuroCounterGroup.register("custom-counter-group") // registers <custom-counter-group/>
|
|
6230
6691
|
*/
|
|
6231
6692
|
static register(name = "auro-counter-group") {
|
|
6232
|
-
AuroLibraryRuntimeUtils$
|
|
6693
|
+
AuroLibraryRuntimeUtils$5.prototype.registerComponent(name, AuroCounterGroup);
|
|
6233
6694
|
}
|
|
6234
6695
|
|
|
6235
6696
|
// function that renders the HTML and CSS into the scope of the component
|