@aurodesignsystem/auro-formkit 2.0.2 → 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 +19 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +281 -135
- package/components/bibtemplate/dist/registered.js +281 -135
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +30 -56
- package/components/checkbox/demo/index.min.js +30 -56
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/index.js +28 -101
- package/components/checkbox/dist/registered.js +28 -101
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.min.js +1289 -734
- package/components/combobox/demo/index.min.js +1289 -734
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/index.js +1024 -632
- package/components/combobox/dist/registered.js +1024 -632
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +971 -435
- package/components/counter/demo/index.js +1 -0
- package/components/counter/demo/index.min.js +972 -435
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +972 -483
- package/components/counter/dist/registered.js +972 -483
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.md +30 -0
- package/components/datepicker/demo/api.min.js +1818 -735
- package/components/datepicker/demo/index.min.js +1818 -735
- 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 +1830 -817
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +1830 -817
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.min.js +231 -117
- package/components/dropdown/demo/index.min.js +231 -117
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/index.js +232 -165
- package/components/dropdown/dist/registered.js +232 -165
- package/components/form/README.md +1 -1
- package/components/form/demo/readme.md +1 -1
- package/components/form/dist/index.js +4 -28
- package/components/form/dist/registered.js +4 -28
- package/components/helptext/dist/index.js +6 -30
- package/components/helptext/dist/registered.js +6 -30
- package/components/input/README.md +1 -1
- package/components/input/demo/api.min.js +471 -164
- package/components/input/demo/index.min.js +471 -164
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/index.js +468 -220
- package/components/input/dist/registered.js +468 -220
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.min.js +183 -60
- package/components/menu/demo/index.min.js +183 -60
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +205 -129
- package/components/menu/dist/registered.js +205 -129
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +30 -56
- package/components/radio/demo/index.min.js +30 -56
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/index.js +28 -101
- package/components/radio/dist/registered.js +28 -101
- package/components/select/README.md +1 -1
- package/components/select/demo/api.min.js +736 -436
- package/components/select/demo/index.min.js +736 -436
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/index.js +538 -402
- package/components/select/dist/registered.js +538 -402
- package/package.json +4 -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();
|
|
@@ -1079,7 +1079,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
1079
1079
|
return _fetchMap.get(uri);
|
|
1080
1080
|
};
|
|
1081
1081
|
|
|
1082
|
-
var styleCss = i$5
|
|
1082
|
+
var styleCss = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){position:absolute;overflow:hidden;clip:rect(1px, 1px, 1px, 1px);width:1px;height:1px;padding:0;border:0}.ico_squareLarge{fill:currentColor;height:var(--auro-size-lg, var(--ds-size-300, 1.5rem))}.ico_squareSmall{fill:currentColor;height:.6rem}.ico_squareMed{fill:currentColor;height:var(--auro-size-md, var(--ds-size-200, 1rem))}.ico_squareSml{fill:currentColor;height:var(--auro-size-sm, var(--ds-size-150, 0.75rem))}:host{color:currentColor;vertical-align:middle;line-height:1;display:inline-block}:host .logo{color:var(--ds-color-brand-midnight-400, #01426a)}svg{min-width:var(--ds-auro-icon-size, 1.5rem) !important;width:var(--ds-auro-icon-size, 1.5rem) !important;height:var(--ds-auro-icon-size, 1.5rem) !important}.componentWrapper{display:flex}.svgWrapper{height:var(--ds-auro-icon-size);width:var(--ds-auro-icon-size)}.labelWrapper{margin-left:var(--ds-size-50, 0.25rem);line-height:1.8}`;
|
|
1083
1083
|
|
|
1084
1084
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1085
1085
|
// See LICENSE in the project root for license information.
|
|
@@ -1160,47 +1160,88 @@ class BaseIcon extends AuroElement {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
|
|
1163
|
-
var tokensCss = i$5`:host{--ds-auro-icon-color:
|
|
1163
|
+
var tokensCss = i$5`:host{--ds-auro-icon-color:var(--ds-color-icon-primary-default, #676767);--ds-auro-icon-size:var(--ds-size-300, 1.5rem)}`;
|
|
1164
1164
|
|
|
1165
|
-
var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:
|
|
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)
|
|
1167
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1168
1168
|
// See LICENSE in the project root for license information.
|
|
1169
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
|
+
|
|
1237
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1238
|
+
// See LICENSE in the project root for license information.
|
|
1170
1239
|
|
|
1171
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
1172
|
-
/**
|
|
1173
|
-
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
1174
|
-
*
|
|
1175
|
-
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1176
|
-
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
1177
|
-
* @attr {Boolean} customColor - Removes primary selector.
|
|
1178
|
-
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
1179
|
-
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
1180
|
-
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
1181
|
-
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
1182
|
-
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
1183
|
-
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
1184
|
-
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
1185
|
-
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
1186
|
-
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
1187
|
-
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
1188
|
-
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
1189
|
-
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
1190
|
-
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
1191
|
-
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1192
|
-
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
1193
|
-
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
1194
|
-
* @slot svg - Used for custom SVG content.
|
|
1195
|
-
*/
|
|
1196
1240
|
|
|
1197
|
-
// build the component class
|
|
1198
1241
|
class AuroIcon extends BaseIcon {
|
|
1199
1242
|
constructor() {
|
|
1200
1243
|
super();
|
|
1201
1244
|
|
|
1202
|
-
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1203
|
-
|
|
1204
1245
|
this.privateDefaults();
|
|
1205
1246
|
}
|
|
1206
1247
|
|
|
@@ -1224,6 +1265,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1224
1265
|
this.success = false;
|
|
1225
1266
|
this.tertiary = false;
|
|
1226
1267
|
this.warning = false;
|
|
1268
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1227
1269
|
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1228
1270
|
}
|
|
1229
1271
|
|
|
@@ -1231,71 +1273,136 @@ class AuroIcon extends BaseIcon {
|
|
|
1231
1273
|
static get properties() {
|
|
1232
1274
|
return {
|
|
1233
1275
|
...super.properties,
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Sets the icon to use the accent style.
|
|
1279
|
+
*/
|
|
1234
1280
|
accent: {
|
|
1235
1281
|
type: Boolean,
|
|
1236
1282
|
reflect: true
|
|
1237
1283
|
},
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1287
|
+
*/
|
|
1238
1288
|
ariaHidden: {
|
|
1239
1289
|
type: String,
|
|
1240
1290
|
reflect: true
|
|
1241
1291
|
},
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1295
|
+
*/
|
|
1242
1296
|
category: {
|
|
1243
1297
|
type: String,
|
|
1244
1298
|
reflect: true
|
|
1245
1299
|
},
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* Allows custom color to be set.
|
|
1303
|
+
*/
|
|
1246
1304
|
customColor: {
|
|
1247
1305
|
type: Boolean
|
|
1248
1306
|
},
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
1310
|
+
*/
|
|
1249
1311
|
customSvg: {
|
|
1250
1312
|
type: Boolean
|
|
1251
1313
|
},
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Sets the icon to use the disabled style.
|
|
1317
|
+
*/
|
|
1252
1318
|
disabled: {
|
|
1253
1319
|
type: Boolean,
|
|
1254
1320
|
reflect: true
|
|
1255
1321
|
},
|
|
1322
|
+
|
|
1323
|
+
/**
|
|
1324
|
+
* Sets the icon to use the emphasis style.
|
|
1325
|
+
*/
|
|
1256
1326
|
emphasis: {
|
|
1257
1327
|
type: Boolean,
|
|
1258
1328
|
reflect: true
|
|
1259
1329
|
},
|
|
1330
|
+
|
|
1331
|
+
/**
|
|
1332
|
+
* Sets the icon to use the error style.
|
|
1333
|
+
*/
|
|
1260
1334
|
error: {
|
|
1261
1335
|
type: Boolean,
|
|
1262
1336
|
reflect: true
|
|
1263
1337
|
},
|
|
1338
|
+
|
|
1339
|
+
/**
|
|
1340
|
+
* Sets the icon to use the info style.
|
|
1341
|
+
*/
|
|
1264
1342
|
info: {
|
|
1265
1343
|
type: Boolean,
|
|
1266
1344
|
reflect: true
|
|
1267
1345
|
},
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* Exposes content in slot as icon label.
|
|
1349
|
+
*/
|
|
1268
1350
|
label: {
|
|
1269
1351
|
type: Boolean,
|
|
1270
1352
|
reflect: true
|
|
1271
1353
|
},
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
1357
|
+
*/
|
|
1272
1358
|
name: {
|
|
1273
1359
|
type: String,
|
|
1274
1360
|
reflect: true
|
|
1275
1361
|
},
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
1365
|
+
*/
|
|
1276
1366
|
primary: {
|
|
1277
1367
|
type: Boolean,
|
|
1278
1368
|
reflect: true
|
|
1279
1369
|
},
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Sets the icon to use the secondary style.
|
|
1373
|
+
*/
|
|
1280
1374
|
secondary: {
|
|
1281
1375
|
type: Boolean,
|
|
1282
1376
|
reflect: true
|
|
1283
1377
|
},
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Sets the icon to use the subtle style.
|
|
1381
|
+
*/
|
|
1284
1382
|
subtle: {
|
|
1285
1383
|
type: Boolean,
|
|
1286
1384
|
reflect: true
|
|
1287
1385
|
},
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Sets the icon to use the success style.
|
|
1389
|
+
*/
|
|
1288
1390
|
success: {
|
|
1289
1391
|
type: Boolean,
|
|
1290
1392
|
reflect: true
|
|
1291
1393
|
},
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Sets the icon to use the tertiary style.
|
|
1397
|
+
*/
|
|
1292
1398
|
tertiary: {
|
|
1293
1399
|
type: Boolean,
|
|
1294
1400
|
reflect: true
|
|
1295
1401
|
},
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* Sets the icon to use the warning style.
|
|
1405
|
+
*/
|
|
1299
1406
|
warning: {
|
|
1300
1407
|
type: Boolean,
|
|
1301
1408
|
reflect: true
|
|
@@ -1332,38 +1439,54 @@ class AuroIcon extends BaseIcon {
|
|
|
1332
1439
|
}
|
|
1333
1440
|
|
|
1334
1441
|
/**
|
|
1442
|
+
* @private
|
|
1335
1443
|
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
1336
1444
|
*/
|
|
1337
1445
|
exposeCssParts() {
|
|
1338
1446
|
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
1339
1447
|
}
|
|
1340
1448
|
|
|
1449
|
+
async firstUpdated() {
|
|
1450
|
+
await super.firstUpdated();
|
|
1451
|
+
|
|
1452
|
+
// Removes the SVG description for screenreader if ariaHidden is set to true
|
|
1453
|
+
if (!this.hasAttribute('ariaHidden') && this.svg) {
|
|
1454
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
1455
|
+
|
|
1456
|
+
if (svgDesc) {
|
|
1457
|
+
svgDesc.remove();
|
|
1458
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1341
1463
|
// function that renders the HTML and CSS into the scope of the component
|
|
1342
1464
|
render() {
|
|
1343
|
-
const
|
|
1344
|
-
'
|
|
1465
|
+
const labelClasses = {
|
|
1466
|
+
'labelWrapper': true,
|
|
1345
1467
|
'util_displayHiddenVisually': !this.label
|
|
1346
1468
|
};
|
|
1347
1469
|
|
|
1348
|
-
const
|
|
1349
|
-
'
|
|
1350
|
-
'wrapper': true,
|
|
1470
|
+
const svgClasses = {
|
|
1471
|
+
'svgWrapper': true,
|
|
1351
1472
|
};
|
|
1352
1473
|
|
|
1353
1474
|
return x`
|
|
1354
|
-
<div
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
${this.
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1475
|
+
<div class="componentWrapper">
|
|
1476
|
+
<div
|
|
1477
|
+
class="${e(svgClasses)}"
|
|
1478
|
+
title="${o(this.title || undefined)}">
|
|
1479
|
+
<span aria-hidden="${o(this.ariaHidden || true)}" part="svg">
|
|
1480
|
+
${this.customSvg ? x`
|
|
1481
|
+
<slot name="svg"></slot>
|
|
1482
|
+
` : x`
|
|
1483
|
+
${this.svg}
|
|
1484
|
+
`
|
|
1485
|
+
}
|
|
1486
|
+
</span>
|
|
1487
|
+
</div>
|
|
1365
1488
|
|
|
1366
|
-
<div class="${e(
|
|
1489
|
+
<div class="${e(labelClasses)}">
|
|
1367
1490
|
<slot></slot>
|
|
1368
1491
|
</div>
|
|
1369
1492
|
</div>
|
|
@@ -1371,7 +1494,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1371
1494
|
}
|
|
1372
1495
|
}
|
|
1373
1496
|
|
|
1374
|
-
var iconVersion = '
|
|
1497
|
+
var iconVersion = '7.0.1';
|
|
1375
1498
|
|
|
1376
1499
|
var checkmarkIcon = {"svg":"<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" aria-labelledby=\"checkmark-sm__desc\" class=\"ico_squareLarge\" role=\"img\" style=\"min-width:var(--auro-size-lg, var(--ds-size-300, 1.5rem));height:var(--auro-size-lg, var(--ds-size-300, 1.5rem));fill:currentColor\" viewBox=\"0 0 24 24\" part=\"svg\"><title/><desc id=\"checkmark-sm__desc\">a small check mark.</desc><path d=\"M8.461 11.84a.625.625 0 1 0-.922.844l2.504 2.738c.247.27.674.27.922 0l5.496-6a.625.625 0 1 0-.922-.844l-5.035 5.496z\"/></svg>"};
|
|
1377
1500
|
|
|
@@ -1397,7 +1520,7 @@ class AuroMenuOption extends r {
|
|
|
1397
1520
|
* Generate unique names for dependency components.
|
|
1398
1521
|
*/
|
|
1399
1522
|
const versioning = new AuroDependencyVersioning();
|
|
1400
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
1523
|
+
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
1401
1524
|
|
|
1402
1525
|
this.selected = false;
|
|
1403
1526
|
this.nocheckmark = false;
|
|
@@ -1411,7 +1534,7 @@ class AuroMenuOption extends r {
|
|
|
1411
1534
|
/**
|
|
1412
1535
|
* @private
|
|
1413
1536
|
*/
|
|
1414
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1537
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
1415
1538
|
}
|
|
1416
1539
|
|
|
1417
1540
|
static get properties() {
|
|
@@ -1455,7 +1578,7 @@ class AuroMenuOption extends r {
|
|
|
1455
1578
|
*
|
|
1456
1579
|
*/
|
|
1457
1580
|
static register(name = "auro-menuoption") {
|
|
1458
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
|
|
1581
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
|
|
1459
1582
|
}
|
|
1460
1583
|
|
|
1461
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.1/auro-menu/+esm"></script>
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.3-beta.1/auro-menu/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "
|
|
1
|
+
declare const _default: "7.0.1";
|
|
2
2
|
export default _default;
|