@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
|
@@ -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
|
|
|
@@ -77,7 +77,7 @@ var tokensCss$1 = i$5`:host{--ds-auro-menu-divider-color: var(--ds-color-border-
|
|
|
77
77
|
|
|
78
78
|
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
79
79
|
|
|
80
|
-
class AuroLibraryRuntimeUtils {
|
|
80
|
+
let AuroLibraryRuntimeUtils$1 = class AuroLibraryRuntimeUtils {
|
|
81
81
|
|
|
82
82
|
/* eslint-disable jsdoc/require-param */
|
|
83
83
|
|
|
@@ -138,7 +138,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
138
138
|
|
|
139
139
|
return elemTag === tag || elem.hasAttribute(tag);
|
|
140
140
|
}
|
|
141
|
-
}
|
|
141
|
+
};
|
|
142
142
|
|
|
143
143
|
// Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
144
144
|
// See LICENSE in the project root for license information.
|
|
@@ -423,7 +423,7 @@ class AuroMenu extends r {
|
|
|
423
423
|
*
|
|
424
424
|
*/
|
|
425
425
|
static register(name = "auro-menu") {
|
|
426
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenu);
|
|
426
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenu);
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
// Lifecycle Methods
|
|
@@ -447,7 +447,7 @@ class AuroMenu extends r {
|
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
firstUpdated() {
|
|
450
|
-
AuroLibraryRuntimeUtils.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
450
|
+
AuroLibraryRuntimeUtils$1.prototype.handleComponentTagRename(this, 'auro-menu');
|
|
451
451
|
|
|
452
452
|
this.loadingSlots = this.querySelectorAll("[slot='loadingText'], [slot='loadingIcon']");
|
|
453
453
|
this.initializeMenu();
|
|
@@ -1119,7 +1119,7 @@ const cacheFetch = (uri, options = {}) => {
|
|
|
1119
1119
|
return _fetchMap.get(uri);
|
|
1120
1120
|
};
|
|
1121
1121
|
|
|
1122
|
-
var styleCss = i$5
|
|
1122
|
+
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}`;
|
|
1123
1123
|
|
|
1124
1124
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1125
1125
|
// See LICENSE in the project root for license information.
|
|
@@ -1200,47 +1200,88 @@ class BaseIcon extends AuroElement {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
}
|
|
1202
1202
|
|
|
1203
|
-
var tokensCss = i$5`:host{--ds-auro-icon-color:
|
|
1203
|
+
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)}`;
|
|
1204
1204
|
|
|
1205
|
-
var colorCss = i$5`:host{color:var(--ds-auro-icon-color)}:host([customColor]){color:inherit}:host(:not([onDark])[accent]){--ds-auro-icon-color:
|
|
1205
|
+
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)}`;
|
|
1206
1206
|
|
|
1207
|
-
// Copyright (c)
|
|
1207
|
+
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1208
1208
|
// See LICENSE in the project root for license information.
|
|
1209
1209
|
|
|
1210
|
+
// ---------------------------------------------------------------------
|
|
1211
|
+
|
|
1212
|
+
/* eslint-disable line-comment-position, no-inline-comments, no-confusing-arrow, no-nested-ternary, implicit-arrow-linebreak */
|
|
1213
|
+
|
|
1214
|
+
class AuroLibraryRuntimeUtils {
|
|
1215
|
+
|
|
1216
|
+
/* eslint-disable jsdoc/require-param */
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* This will register a new custom element with the browser.
|
|
1220
|
+
* @param {String} name - The name of the custom element.
|
|
1221
|
+
* @param {Object} componentClass - The class to register as a custom element.
|
|
1222
|
+
* @returns {void}
|
|
1223
|
+
*/
|
|
1224
|
+
registerComponent(name, componentClass) {
|
|
1225
|
+
if (!customElements.get(name)) {
|
|
1226
|
+
customElements.define(name, class extends componentClass {});
|
|
1227
|
+
}
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Finds and returns the closest HTML Element based on a selector.
|
|
1232
|
+
* @returns {void}
|
|
1233
|
+
*/
|
|
1234
|
+
closestElement(
|
|
1235
|
+
selector, // selector like in .closest()
|
|
1236
|
+
base = this, // extra functionality to skip a parent
|
|
1237
|
+
__Closest = (el, found = el && el.closest(selector)) =>
|
|
1238
|
+
!el || el === document || el === window
|
|
1239
|
+
? null // standard .closest() returns null for non-found selectors also
|
|
1240
|
+
: found
|
|
1241
|
+
? found // found a selector INside this element
|
|
1242
|
+
: __Closest(el.getRootNode().host) // recursion!! break out to parent DOM
|
|
1243
|
+
) {
|
|
1244
|
+
return __Closest(base);
|
|
1245
|
+
}
|
|
1246
|
+
/* eslint-enable jsdoc/require-param */
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* 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.
|
|
1250
|
+
* @param {Object} elem - The element to check.
|
|
1251
|
+
* @param {String} tagName - The name of the Auro component to check for or add as an attribute.
|
|
1252
|
+
* @returns {void}
|
|
1253
|
+
*/
|
|
1254
|
+
handleComponentTagRename(elem, tagName) {
|
|
1255
|
+
const tag = tagName.toLowerCase();
|
|
1256
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1257
|
+
|
|
1258
|
+
if (elemTag !== tag) {
|
|
1259
|
+
elem.setAttribute(tag, true);
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* Validates if an element is a specific Auro component.
|
|
1265
|
+
* @param {Object} elem - The element to validate.
|
|
1266
|
+
* @param {String} tagName - The name of the Auro component to check against.
|
|
1267
|
+
* @returns {Boolean} - Returns true if the element is the specified Auro component.
|
|
1268
|
+
*/
|
|
1269
|
+
elementMatch(elem, tagName) {
|
|
1270
|
+
const tag = tagName.toLowerCase();
|
|
1271
|
+
const elemTag = elem.tagName.toLowerCase();
|
|
1272
|
+
|
|
1273
|
+
return elemTag === tag || elem.hasAttribute(tag);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1278
|
+
// See LICENSE in the project root for license information.
|
|
1210
1279
|
|
|
1211
|
-
// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
|
|
1212
|
-
/**
|
|
1213
|
-
* auro-icon provides users a way to use the Auro Icons by simply passing in the category and name.
|
|
1214
|
-
*
|
|
1215
|
-
* @attr {String} category - The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1216
|
-
* @attr {String} name - The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage
|
|
1217
|
-
* @attr {Boolean} customColor - Removes primary selector.
|
|
1218
|
-
* @attr {Boolean} customSvg - When true, auro-icon will render a custom SVG inside the default slot.
|
|
1219
|
-
* @attr {Boolean} label - Exposes content in slot as icon label.
|
|
1220
|
-
* @attr {Boolean} primary - DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
1221
|
-
* @attr {Boolean} accent - Sets the icon to use the accent style.
|
|
1222
|
-
* @attr {Boolean} emphasis - Sets the icon to use the emphasis style.
|
|
1223
|
-
* @attr {Boolean} disabled - Sets the icon to use the disabled style.
|
|
1224
|
-
* @attr {Boolean} error - Sets the icon to use the error style.
|
|
1225
|
-
* @attr {Boolean} info - Sets the icon to use the info style.
|
|
1226
|
-
* @attr {Boolean} secondary - Sets the icon to use the secondary style.
|
|
1227
|
-
* @attr {Boolean} tertiary - Sets the icon to use the tertiary style.
|
|
1228
|
-
* @attr {Boolean} subtle - Sets the icon to use the subtle style.
|
|
1229
|
-
* @attr {Boolean} success - Sets the icon to use the success style.
|
|
1230
|
-
* @attr {Boolean} warning - Sets the icon to use the warning style.
|
|
1231
|
-
* @attr {String} ariaHidden - Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1232
|
-
* @attr {String} uri - Set the uri for CDN used when fetching icons
|
|
1233
|
-
* @slot - Hidden from visibility, used for a11y if icon description is needed.
|
|
1234
|
-
* @slot svg - Used for custom SVG content.
|
|
1235
|
-
*/
|
|
1236
1280
|
|
|
1237
|
-
// build the component class
|
|
1238
1281
|
class AuroIcon extends BaseIcon {
|
|
1239
1282
|
constructor() {
|
|
1240
1283
|
super();
|
|
1241
1284
|
|
|
1242
|
-
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1243
|
-
|
|
1244
1285
|
this.privateDefaults();
|
|
1245
1286
|
}
|
|
1246
1287
|
|
|
@@ -1264,6 +1305,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1264
1305
|
this.success = false;
|
|
1265
1306
|
this.tertiary = false;
|
|
1266
1307
|
this.warning = false;
|
|
1308
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1267
1309
|
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1268
1310
|
}
|
|
1269
1311
|
|
|
@@ -1271,71 +1313,136 @@ class AuroIcon extends BaseIcon {
|
|
|
1271
1313
|
static get properties() {
|
|
1272
1314
|
return {
|
|
1273
1315
|
...super.properties,
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* Sets the icon to use the accent style.
|
|
1319
|
+
*/
|
|
1274
1320
|
accent: {
|
|
1275
1321
|
type: Boolean,
|
|
1276
1322
|
reflect: true
|
|
1277
1323
|
},
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1327
|
+
*/
|
|
1278
1328
|
ariaHidden: {
|
|
1279
1329
|
type: String,
|
|
1280
1330
|
reflect: true
|
|
1281
1331
|
},
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1335
|
+
*/
|
|
1282
1336
|
category: {
|
|
1283
1337
|
type: String,
|
|
1284
1338
|
reflect: true
|
|
1285
1339
|
},
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Allows custom color to be set.
|
|
1343
|
+
*/
|
|
1286
1344
|
customColor: {
|
|
1287
1345
|
type: Boolean
|
|
1288
1346
|
},
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
1350
|
+
*/
|
|
1289
1351
|
customSvg: {
|
|
1290
1352
|
type: Boolean
|
|
1291
1353
|
},
|
|
1354
|
+
|
|
1355
|
+
/**
|
|
1356
|
+
* Sets the icon to use the disabled style.
|
|
1357
|
+
*/
|
|
1292
1358
|
disabled: {
|
|
1293
1359
|
type: Boolean,
|
|
1294
1360
|
reflect: true
|
|
1295
1361
|
},
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* Sets the icon to use the emphasis style.
|
|
1365
|
+
*/
|
|
1296
1366
|
emphasis: {
|
|
1297
1367
|
type: Boolean,
|
|
1298
1368
|
reflect: true
|
|
1299
1369
|
},
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Sets the icon to use the error style.
|
|
1373
|
+
*/
|
|
1300
1374
|
error: {
|
|
1301
1375
|
type: Boolean,
|
|
1302
1376
|
reflect: true
|
|
1303
1377
|
},
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Sets the icon to use the info style.
|
|
1381
|
+
*/
|
|
1304
1382
|
info: {
|
|
1305
1383
|
type: Boolean,
|
|
1306
1384
|
reflect: true
|
|
1307
1385
|
},
|
|
1386
|
+
|
|
1387
|
+
/**
|
|
1388
|
+
* Exposes content in slot as icon label.
|
|
1389
|
+
*/
|
|
1308
1390
|
label: {
|
|
1309
1391
|
type: Boolean,
|
|
1310
1392
|
reflect: true
|
|
1311
1393
|
},
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
1397
|
+
*/
|
|
1312
1398
|
name: {
|
|
1313
1399
|
type: String,
|
|
1314
1400
|
reflect: true
|
|
1315
1401
|
},
|
|
1402
|
+
|
|
1403
|
+
/**
|
|
1404
|
+
* DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
1405
|
+
*/
|
|
1316
1406
|
primary: {
|
|
1317
1407
|
type: Boolean,
|
|
1318
1408
|
reflect: true
|
|
1319
1409
|
},
|
|
1410
|
+
|
|
1411
|
+
/**
|
|
1412
|
+
* Sets the icon to use the secondary style.
|
|
1413
|
+
*/
|
|
1320
1414
|
secondary: {
|
|
1321
1415
|
type: Boolean,
|
|
1322
1416
|
reflect: true
|
|
1323
1417
|
},
|
|
1418
|
+
|
|
1419
|
+
/**
|
|
1420
|
+
* Sets the icon to use the subtle style.
|
|
1421
|
+
*/
|
|
1324
1422
|
subtle: {
|
|
1325
1423
|
type: Boolean,
|
|
1326
1424
|
reflect: true
|
|
1327
1425
|
},
|
|
1426
|
+
|
|
1427
|
+
/**
|
|
1428
|
+
* Sets the icon to use the success style.
|
|
1429
|
+
*/
|
|
1328
1430
|
success: {
|
|
1329
1431
|
type: Boolean,
|
|
1330
1432
|
reflect: true
|
|
1331
1433
|
},
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Sets the icon to use the tertiary style.
|
|
1437
|
+
*/
|
|
1332
1438
|
tertiary: {
|
|
1333
1439
|
type: Boolean,
|
|
1334
1440
|
reflect: true
|
|
1335
1441
|
},
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Sets the icon to use the warning style.
|
|
1445
|
+
*/
|
|
1339
1446
|
warning: {
|
|
1340
1447
|
type: Boolean,
|
|
1341
1448
|
reflect: true
|
|
@@ -1372,38 +1479,54 @@ class AuroIcon extends BaseIcon {
|
|
|
1372
1479
|
}
|
|
1373
1480
|
|
|
1374
1481
|
/**
|
|
1482
|
+
* @private
|
|
1375
1483
|
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
1376
1484
|
*/
|
|
1377
1485
|
exposeCssParts() {
|
|
1378
1486
|
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
1379
1487
|
}
|
|
1380
1488
|
|
|
1489
|
+
async firstUpdated() {
|
|
1490
|
+
await super.firstUpdated();
|
|
1491
|
+
|
|
1492
|
+
// Removes the SVG description for screenreader if ariaHidden is set to true
|
|
1493
|
+
if (!this.hasAttribute('ariaHidden') && this.svg) {
|
|
1494
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
1495
|
+
|
|
1496
|
+
if (svgDesc) {
|
|
1497
|
+
svgDesc.remove();
|
|
1498
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1381
1503
|
// function that renders the HTML and CSS into the scope of the component
|
|
1382
1504
|
render() {
|
|
1383
|
-
const
|
|
1384
|
-
'
|
|
1505
|
+
const labelClasses = {
|
|
1506
|
+
'labelWrapper': true,
|
|
1385
1507
|
'util_displayHiddenVisually': !this.label
|
|
1386
1508
|
};
|
|
1387
1509
|
|
|
1388
|
-
const
|
|
1389
|
-
'
|
|
1390
|
-
'wrapper': true,
|
|
1510
|
+
const svgClasses = {
|
|
1511
|
+
'svgWrapper': true,
|
|
1391
1512
|
};
|
|
1392
1513
|
|
|
1393
1514
|
return x`
|
|
1394
|
-
<div
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
${this.
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1515
|
+
<div class="componentWrapper">
|
|
1516
|
+
<div
|
|
1517
|
+
class="${e(svgClasses)}"
|
|
1518
|
+
title="${o(this.title || undefined)}">
|
|
1519
|
+
<span aria-hidden="${o(this.ariaHidden || true)}" part="svg">
|
|
1520
|
+
${this.customSvg ? x`
|
|
1521
|
+
<slot name="svg"></slot>
|
|
1522
|
+
` : x`
|
|
1523
|
+
${this.svg}
|
|
1524
|
+
`
|
|
1525
|
+
}
|
|
1526
|
+
</span>
|
|
1527
|
+
</div>
|
|
1405
1528
|
|
|
1406
|
-
<div class="${e(
|
|
1529
|
+
<div class="${e(labelClasses)}">
|
|
1407
1530
|
<slot></slot>
|
|
1408
1531
|
</div>
|
|
1409
1532
|
</div>
|
|
@@ -1411,7 +1534,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1411
1534
|
}
|
|
1412
1535
|
}
|
|
1413
1536
|
|
|
1414
|
-
var iconVersion = '
|
|
1537
|
+
var iconVersion = '7.0.1';
|
|
1415
1538
|
|
|
1416
1539
|
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>"};
|
|
1417
1540
|
|
|
@@ -1437,7 +1560,7 @@ class AuroMenuOption extends r {
|
|
|
1437
1560
|
* Generate unique names for dependency components.
|
|
1438
1561
|
*/
|
|
1439
1562
|
const versioning = new AuroDependencyVersioning();
|
|
1440
|
-
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);
|
|
1563
|
+
this.iconTag = versioning.generateTag('auro-formkit-menuoption-icon', iconVersion, AuroIcon);
|
|
1441
1564
|
|
|
1442
1565
|
this.selected = false;
|
|
1443
1566
|
this.nocheckmark = false;
|
|
@@ -1451,7 +1574,7 @@ class AuroMenuOption extends r {
|
|
|
1451
1574
|
/**
|
|
1452
1575
|
* @private
|
|
1453
1576
|
*/
|
|
1454
|
-
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1577
|
+
this.runtimeUtils = new AuroLibraryRuntimeUtils$1();
|
|
1455
1578
|
}
|
|
1456
1579
|
|
|
1457
1580
|
static get properties() {
|
|
@@ -1495,7 +1618,7 @@ class AuroMenuOption extends r {
|
|
|
1495
1618
|
*
|
|
1496
1619
|
*/
|
|
1497
1620
|
static register(name = "auro-menuoption") {
|
|
1498
|
-
AuroLibraryRuntimeUtils.prototype.registerComponent(name, AuroMenuOption);
|
|
1621
|
+
AuroLibraryRuntimeUtils$1.prototype.registerComponent(name, AuroMenuOption);
|
|
1499
1622
|
}
|
|
1500
1623
|
|
|
1501
1624
|
firstUpdated() {
|