@aurodesignsystem/auro-formkit 2.0.3-beta.1 → 2.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/components/bibtemplate/dist/index.js +148 -8
- package/components/bibtemplate/dist/registered.js +148 -8
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.min.js +644 -113
- package/components/combobox/demo/index.min.js +644 -113
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/index.js +511 -50
- package/components/combobox/dist/registered.js +511 -50
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +500 -39
- package/components/counter/demo/index.js +1 -0
- package/components/counter/demo/index.min.js +501 -39
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/index.js +500 -39
- package/components/counter/dist/registered.js +500 -39
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.md +30 -0
- package/components/datepicker/demo/api.min.js +1281 -207
- package/components/datepicker/demo/index.min.js +1281 -207
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/auro-calendar.d.ts +5 -1
- package/components/datepicker/dist/auro-datepicker.d.ts +7 -0
- package/components/datepicker/dist/buttonVersion.d.ts +2 -0
- package/components/datepicker/dist/index.js +1281 -207
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +1281 -207
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.min.js +81 -10
- package/components/dropdown/demo/index.min.js +81 -10
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/index.js +81 -10
- package/components/dropdown/dist/registered.js +81 -10
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/input/README.md +1 -1
- package/components/input/demo/api.min.js +263 -13
- package/components/input/demo/index.min.js +263 -13
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/index.js +263 -13
- package/components/input/dist/registered.js +263 -13
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.min.js +77 -7
- package/components/menu/demo/index.min.js +77 -7
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/index.js +77 -7
- package/components/menu/dist/registered.js +77 -7
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +1 -1
- package/components/select/demo/api.min.js +319 -38
- package/components/select/demo/index.min.js +319 -38
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/index.js +240 -29
- package/components/select/dist/registered.js +240 -29
- package/package.json +2 -2
|
@@ -37,7 +37,7 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-color-border-
|
|
|
37
37
|
|
|
38
38
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
39
39
|
|
|
40
|
-
class AuroLibraryRuntimeUtils {
|
|
40
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
41
41
|
|
|
42
42
|
/* eslint-disable jsdoc/require-param */
|
|
43
43
|
|
|
@@ -98,7 +98,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
98
98
|
|
|
99
99
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
100
100
|
}
|
|
101
|
-
}
|
|
101
|
+
};
|
|
102
102
|
|
|
103
103
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
104
104
|
// See LICENSE in the project root for license information.
|
|
@@ -383,7 +383,7 @@ class AuroMenu extends r {
|
|
|
383
383
|
*
|
|
384
384
|
*/
|
|
385
385
|
static register(name = "auro-menu") {
|
|
386
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
|
|
386
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
// Lifecycle Methods
|
|
@@ -407,7 +407,7 @@ class AuroMenu extends r {
|
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
firstUpdated() {
|
|
410
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
410
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
411
411
|
|
|
412
412
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
413
413
|
this.initializeMenu();
|
|
@@ -1164,6 +1164,76 @@ var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-defau
|
|
|
1164
1164
|
|
|
1165
1165
|
var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-default, #a2c270)}:host(:not([onDark])[disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-default, #adadad)}:host(:not([onDark])[emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-default, #2a2a2a)}:host(:not([onDark])[error]){--ds-auro-icon-color:var(--ds-color-icon-error-default, #cc1816)}:host(:not([onDark])[info]){--ds-auro-icon-color:var(--ds-color-icon-info-default, #326aa5)}:host(:not([onDark])[secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-default, #7e8894)}:host(:not([onDark])[subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-default, #a0c9f1)}:host(:not([onDark])[success]){--ds-auro-icon-color:var(--ds-color-icon-success-default, #40a080)}:host(:not([onDark])[tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-default, #afb9c6)}:host(:not([onDark])[warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-default, #c49432)}:host([onDark]){--ds-auro-icon-color:var(--ds-color-icon-primary-inverse, #f7f7f7)}:host([onDark][accent]){--ds-auro-icon-color:var(--ds-color-icon-accent-inverse, #badd81)}:host([onDark][disabled]){--ds-auro-icon-color:var(--ds-color-icon-ui-primary-disabled-inverse, #7e7e7e)}:host([onDark][emphasis]){--ds-auro-icon-color:var(--ds-color-icon-emphasis-inverse, #ffffff)}:host([onDark][error]){--ds-auro-icon-color:var(--ds-color-icon-error-inverse, #f9aca6)}:host([onDark][info]){--ds-auro-icon-color:var(--ds-color-icon-info-inverse, #89b2d4)}:host([onDark][secondary]){--ds-auro-icon-color:var(--ds-color-icon-secondary-inverse, #ccd2db)}:host([onDark][subtle]){--ds-auro-icon-color:var(--ds-color-icon-subtle-inverse, #326aa5)}:host([onDark][success]){--ds-auro-icon-color:var(--ds-color-icon-success-inverse, #8eceb9)}:host([onDark][tertiary]){--ds-auro-icon-color:var(--ds-color-icon-tertiary-inverse, #939fad)}:host([onDark][warning]){--ds-auro-icon-color:var(--ds-color-icon-warning-inverse, #f2c153)}`;
|
|
1166
1166
|
|
|
1167
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1168
|
+
// See LICENSE in the project root for license information.
|
|
1169
|
+
|
|
1170
|
+
// ---------------------------------------------------------------------
|
|
1171
|
+
|
|
1172
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1173
|
+
|
|
1174
|
+
class AuroLibraryRuntimeUtils {
|
|
1175
|
+
|
|
1176
|
+
/* eslint-disable jsdoc/require-param */
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* This will register a new custom element with the browser.
|
|
1180
|
+
* @param {String} name - The name of the custom element.
|
|
1181
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
1182
|
+
* @returns {void}
|
|
1183
|
+
*/
|
|
1184
|
+
registerComponent(name, componentClass) {
|
|
1185
|
+
if (!customElements.get(name)) {
|
|
1186
|
+
customElements.define(name, class extends componentClass {});
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
1192
|
+
* @returns {void}
|
|
1193
|
+
*/
|
|
1194
|
+
closestElement(
|
|
1195
|
+
selector, // selector like in .closest()
|
|
1196
|
+
base = this, // extra functionality to skip a parent
|
|
1197
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
1198
|
+
!el || el === document || el === window
|
|
1199
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
1200
|
+
: found
|
|
1201
|
+
? found // found a selector INside this element
|
|
1202
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
1203
|
+
) {
|
|
1204
|
+
return __Closest(base);
|
|
1205
|
+
}
|
|
1206
|
+
/* eslint-enable jsdoc/require-param */
|
|
1207
|
+
|
|
1208
|
+
/**
|
|
1209
|
+
* 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.
|
|
1210
|
+
* @param {Object} elem - The element to check.
|
|
1211
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
1212
|
+
* @returns {void}
|
|
1213
|
+
*/
|
|
1214
|
+
handleComponentTagRename(elem, tagName) {
|
|
1215
|
+
const tag = tagName.toLowerCase();
|
|
1216
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1217
|
+
|
|
1218
|
+
if (elemTag !== tag) {
|
|
1219
|
+
elem.setAttribute(tag, true);
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Validates if an element is a specific Auro component.
|
|
1225
|
+
* @param {Object} elem - The element to validate.
|
|
1226
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1227
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1228
|
+
*/
|
|
1229
|
+
elementMatch(elem, tagName) {
|
|
1230
|
+
const tag = tagName.toLowerCase();
|
|
1231
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1232
|
+
|
|
1233
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1167
1237
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1168
1238
|
// See LICENSE in the project root for license information.
|
|
1169
1239
|
|
|
@@ -1450,7 +1520,7 @@ class AuroMenuOption extends r {
|
|
|
1450
1520
|
* Generate unique names for dependency components.
|
|
1451
1521
|
*/
|
|
1452
1522
|
const versioning = new AuroDependencyVersioning();
|
|
1453
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
1523
|
+
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
1454
1524
|
|
|
1455
1525
|
this.selected = false;
|
|
1456
1526
|
this.nocheckmark = false;
|
|
@@ -1464,7 +1534,7 @@ class AuroMenuOption extends r {
|
|
|
1464
1534
|
/**
|
|
1465
1535
|
* @private
|
|
1466
1536
|
*/
|
|
1467
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1537
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
1468
1538
|
}
|
|
1469
1539
|
|
|
1470
1540
|
static get properties() {
|
|
@@ -1508,7 +1578,7 @@ class AuroMenuOption extends r {
|
|
|
1508
1578
|
*
|
|
1509
1579
|
*/
|
|
1510
1580
|
static register(name = "auro-menuoption") {
|
|
1511
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
|
|
1581
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
|
|
1512
1582
|
}
|
|
1513
1583
|
|
|
1514
1584
|
firstUpdated() {
|
|
@@ -110,7 +110,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
110
110
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
111
111
|
|
|
112
112
|
```html
|
|
113
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.1/auro-menu/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|
|
@@ -16,7 +16,7 @@ var tokensCss$1 = css`:host{--ds-auro-menu-divider-color: var(--ds-color-border-
|
|
|
16
16
|
|
|
17
17
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
18
18
|
|
|
19
|
-
class AuroLibraryRuntimeUtils {
|
|
19
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
20
20
|
|
|
21
21
|
/* eslint-disable jsdoc/require-param */
|
|
22
22
|
|
|
@@ -77,7 +77,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
77
77
|
|
|
78
78
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
};
|
|
81
81
|
|
|
82
82
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
83
83
|
// See LICENSE in the project root for license information.
|
|
@@ -362,7 +362,7 @@ class AuroMenu extends LitElement {
|
|
|
362
362
|
*
|
|
363
363
|
*/
|
|
364
364
|
static register(name = "auro-menu") {
|
|
365
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
|
|
365
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// Lifecycle Methods
|
|
@@ -386,7 +386,7 @@ class AuroMenu extends LitElement {
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
firstUpdated() {
|
|
389
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
389
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
390
390
|
|
|
391
391
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
392
392
|
this.initializeMenu();
|
|
@@ -1117,6 +1117,76 @@ var tokensCss = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-defau
|
|
|
1117
1117
|
|
|
1118
1118
|
var colorCss = 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)}`;
|
|
1119
1119
|
|
|
1120
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1121
|
+
// See LICENSE in the project root for license information.
|
|
1122
|
+
|
|
1123
|
+
// ---------------------------------------------------------------------
|
|
1124
|
+
|
|
1125
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1126
|
+
|
|
1127
|
+
class AuroLibraryRuntimeUtils {
|
|
1128
|
+
|
|
1129
|
+
/* eslint-disable jsdoc/require-param */
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* This will register a new custom element with the browser.
|
|
1133
|
+
* @param {String} name - The name of the custom element.
|
|
1134
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
1135
|
+
* @returns {void}
|
|
1136
|
+
*/
|
|
1137
|
+
registerComponent(name, componentClass) {
|
|
1138
|
+
if (!customElements.get(name)) {
|
|
1139
|
+
customElements.define(name, class extends componentClass {});
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
1145
|
+
* @returns {void}
|
|
1146
|
+
*/
|
|
1147
|
+
closestElement(
|
|
1148
|
+
selector, // selector like in .closest()
|
|
1149
|
+
base = this, // extra functionality to skip a parent
|
|
1150
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
1151
|
+
!el || el === document || el === window
|
|
1152
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
1153
|
+
: found
|
|
1154
|
+
? found // found a selector INside this element
|
|
1155
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
1156
|
+
) {
|
|
1157
|
+
return __Closest(base);
|
|
1158
|
+
}
|
|
1159
|
+
/* eslint-enable jsdoc/require-param */
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* 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.
|
|
1163
|
+
* @param {Object} elem - The element to check.
|
|
1164
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
1165
|
+
* @returns {void}
|
|
1166
|
+
*/
|
|
1167
|
+
handleComponentTagRename(elem, tagName) {
|
|
1168
|
+
const tag = tagName.toLowerCase();
|
|
1169
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1170
|
+
|
|
1171
|
+
if (elemTag !== tag) {
|
|
1172
|
+
elem.setAttribute(tag, true);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Validates if an element is a specific Auro component.
|
|
1178
|
+
* @param {Object} elem - The element to validate.
|
|
1179
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1180
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1181
|
+
*/
|
|
1182
|
+
elementMatch(elem, tagName) {
|
|
1183
|
+
const tag = tagName.toLowerCase();
|
|
1184
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1185
|
+
|
|
1186
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1120
1190
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1121
1191
|
// See LICENSE in the project root for license information.
|
|
1122
1192
|
|
|
@@ -1403,7 +1473,7 @@ class AuroMenuOption extends LitElement {
|
|
|
1403
1473
|
* Generate unique names for dependency components.
|
|
1404
1474
|
*/
|
|
1405
1475
|
const versioning = new AuroDependencyVersioning();
|
|
1406
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
1476
|
+
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
1407
1477
|
|
|
1408
1478
|
this.selected = false;
|
|
1409
1479
|
this.nocheckmark = false;
|
|
@@ -1417,7 +1487,7 @@ class AuroMenuOption extends LitElement {
|
|
|
1417
1487
|
/**
|
|
1418
1488
|
* @private
|
|
1419
1489
|
*/
|
|
1420
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1490
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
1421
1491
|
}
|
|
1422
1492
|
|
|
1423
1493
|
static get properties() {
|
|
@@ -1461,7 +1531,7 @@ class AuroMenuOption extends LitElement {
|
|
|
1461
1531
|
*
|
|
1462
1532
|
*/
|
|
1463
1533
|
static register(name = "auro-menuoption") {
|
|
1464
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
|
|
1534
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
|
|
1465
1535
|
}
|
|
1466
1536
|
|
|
1467
1537
|
firstUpdated() {
|
|
@@ -16,7 +16,7 @@ var tokensCss$1 = css`:host{--ds-auro-menu-divider-color: var(--ds-color-border-
|
|
|
16
16
|
|
|
17
17
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
18
18
|
|
|
19
|
-
class AuroLibraryRuntimeUtils {
|
|
19
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
20
20
|
|
|
21
21
|
/* eslint-disable jsdoc/require-param */
|
|
22
22
|
|
|
@@ -77,7 +77,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
77
77
|
|
|
78
78
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
};
|
|
81
81
|
|
|
82
82
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
83
83
|
// See LICENSE in the project root for license information.
|
|
@@ -362,7 +362,7 @@ class AuroMenu extends LitElement {
|
|
|
362
362
|
*
|
|
363
363
|
*/
|
|
364
364
|
static register(name = "auro-menu") {
|
|
365
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
|
|
365
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// Lifecycle Methods
|
|
@@ -386,7 +386,7 @@ class AuroMenu extends LitElement {
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
firstUpdated() {
|
|
389
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
389
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
390
390
|
|
|
391
391
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
392
392
|
this.initializeMenu();
|
|
@@ -1117,6 +1117,76 @@ var tokensCss = css`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-defau
|
|
|
1117
1117
|
|
|
1118
1118
|
var colorCss = 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)}`;
|
|
1119
1119
|
|
|
1120
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1121
|
+
// See LICENSE in the project root for license information.
|
|
1122
|
+
|
|
1123
|
+
// ---------------------------------------------------------------------
|
|
1124
|
+
|
|
1125
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1126
|
+
|
|
1127
|
+
class AuroLibraryRuntimeUtils {
|
|
1128
|
+
|
|
1129
|
+
/* eslint-disable jsdoc/require-param */
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* This will register a new custom element with the browser.
|
|
1133
|
+
* @param {String} name - The name of the custom element.
|
|
1134
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
1135
|
+
* @returns {void}
|
|
1136
|
+
*/
|
|
1137
|
+
registerComponent(name, componentClass) {
|
|
1138
|
+
if (!customElements.get(name)) {
|
|
1139
|
+
customElements.define(name, class extends componentClass {});
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
1145
|
+
* @returns {void}
|
|
1146
|
+
*/
|
|
1147
|
+
closestElement(
|
|
1148
|
+
selector, // selector like in .closest()
|
|
1149
|
+
base = this, // extra functionality to skip a parent
|
|
1150
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
1151
|
+
!el || el === document || el === window
|
|
1152
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
1153
|
+
: found
|
|
1154
|
+
? found // found a selector INside this element
|
|
1155
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
1156
|
+
) {
|
|
1157
|
+
return __Closest(base);
|
|
1158
|
+
}
|
|
1159
|
+
/* eslint-enable jsdoc/require-param */
|
|
1160
|
+
|
|
1161
|
+
/**
|
|
1162
|
+
* 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.
|
|
1163
|
+
* @param {Object} elem - The element to check.
|
|
1164
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
1165
|
+
* @returns {void}
|
|
1166
|
+
*/
|
|
1167
|
+
handleComponentTagRename(elem, tagName) {
|
|
1168
|
+
const tag = tagName.toLowerCase();
|
|
1169
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1170
|
+
|
|
1171
|
+
if (elemTag !== tag) {
|
|
1172
|
+
elem.setAttribute(tag, true);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/**
|
|
1177
|
+
* Validates if an element is a specific Auro component.
|
|
1178
|
+
* @param {Object} elem - The element to validate.
|
|
1179
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1180
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1181
|
+
*/
|
|
1182
|
+
elementMatch(elem, tagName) {
|
|
1183
|
+
const tag = tagName.toLowerCase();
|
|
1184
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1185
|
+
|
|
1186
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1120
1190
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1121
1191
|
// See LICENSE in the project root for license information.
|
|
1122
1192
|
|
|
@@ -1403,7 +1473,7 @@ class AuroMenuOption extends LitElement {
|
|
|
1403
1473
|
* Generate unique names for dependency components.
|
|
1404
1474
|
*/
|
|
1405
1475
|
const versioning = new AuroDependencyVersioning();
|
|
1406
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
1476
|
+
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
1407
1477
|
|
|
1408
1478
|
this.selected = false;
|
|
1409
1479
|
this.nocheckmark = false;
|
|
@@ -1417,7 +1487,7 @@ class AuroMenuOption extends LitElement {
|
|
|
1417
1487
|
/**
|
|
1418
1488
|
* @private
|
|
1419
1489
|
*/
|
|
1420
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1490
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
1421
1491
|
}
|
|
1422
1492
|
|
|
1423
1493
|
static get properties() {
|
|
@@ -1461,7 +1531,7 @@ class AuroMenuOption extends LitElement {
|
|
|
1461
1531
|
*
|
|
1462
1532
|
*/
|
|
1463
1533
|
static register(name = "auro-menuoption") {
|
|
1464
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
|
|
1534
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
|
|
1465
1535
|
}
|
|
1466
1536
|
|
|
1467
1537
|
firstUpdated() {
|
|
@@ -100,7 +100,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
100
100
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
101
101
|
|
|
102
102
|
```html
|
|
103
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.
|
|
103
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.1/auro-radio/+esm"></script>
|
|
104
104
|
```
|
|
105
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
106
|
|
|
@@ -1012,7 +1012,7 @@ class AuroRadioGroup extends r {
|
|
|
1012
1012
|
/**
|
|
1013
1013
|
* @private
|
|
1014
1014
|
*/
|
|
1015
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
1015
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-radio-helptext', helpTextVersion, AuroHelpText);
|
|
1016
1016
|
}
|
|
1017
1017
|
|
|
1018
1018
|
static get styles() {
|
|
@@ -987,7 +987,7 @@ class AuroRadioGroup extends r {
|
|
|
987
987
|
/**
|
|
988
988
|
* @private
|
|
989
989
|
*/
|
|
990
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
990
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-radio-helptext', helpTextVersion, AuroHelpText);
|
|
991
991
|
}
|
|
992
992
|
|
|
993
993
|
static get styles() {
|
|
@@ -100,7 +100,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
100
100
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
101
101
|
|
|
102
102
|
```html
|
|
103
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.
|
|
103
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.1/auro-radio/+esm"></script>
|
|
104
104
|
```
|
|
105
105
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
106
106
|
|
|
@@ -940,7 +940,7 @@ class AuroRadioGroup extends LitElement {
|
|
|
940
940
|
/**
|
|
941
941
|
* @private
|
|
942
942
|
*/
|
|
943
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
943
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-radio-helptext', helpTextVersion, AuroHelpText);
|
|
944
944
|
}
|
|
945
945
|
|
|
946
946
|
static get styles() {
|
|
@@ -940,7 +940,7 @@ class AuroRadioGroup extends LitElement {
|
|
|
940
940
|
/**
|
|
941
941
|
* @private
|
|
942
942
|
*/
|
|
943
|
-
this.helpTextTag = versioning.generateTag('auro-helptext', helpTextVersion, AuroHelpText);
|
|
943
|
+
this.helpTextTag = versioning.generateTag('auro-formkit-radio-helptext', helpTextVersion, AuroHelpText);
|
|
944
944
|
}
|
|
945
945
|
|
|
946
946
|
static get styles() {
|
|
@@ -110,7 +110,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
110
110
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
111
111
|
|
|
112
112
|
```html
|
|
113
|
-
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.1.0-beta.1/auro-select/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|