@aurodesignsystem/auro-formkit 2.0.2 → 2.0.3-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 +7 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +133 -127
- package/components/bibtemplate/dist/registered.js +133 -127
- package/components/checkbox/README.md +1 -1
- package/components/checkbox/demo/api.min.js +29 -55
- package/components/checkbox/demo/index.min.js +29 -55
- package/components/checkbox/demo/readme.md +1 -1
- package/components/checkbox/dist/index.js +27 -100
- package/components/checkbox/dist/registered.js +27 -100
- package/components/combobox/README.md +1 -1
- package/components/combobox/demo/api.min.js +620 -596
- package/components/combobox/demo/index.min.js +620 -596
- package/components/combobox/demo/readme.md +1 -1
- package/components/combobox/dist/index.js +496 -565
- package/components/combobox/dist/registered.js +496 -565
- package/components/counter/README.md +1 -1
- package/components/counter/demo/api.min.js +450 -375
- package/components/counter/demo/index.min.js +450 -375
- package/components/counter/demo/readme.md +1 -1
- package/components/counter/dist/iconVersion.d.ts +1 -1
- package/components/counter/dist/index.js +468 -440
- package/components/counter/dist/registered.js +468 -440
- package/components/datepicker/README.md +1 -1
- package/components/datepicker/demo/api.min.js +582 -573
- package/components/datepicker/demo/index.min.js +582 -573
- package/components/datepicker/demo/readme.md +1 -1
- package/components/datepicker/dist/index.js +584 -645
- package/components/datepicker/dist/registered.js +584 -645
- package/components/dropdown/README.md +1 -1
- package/components/dropdown/demo/api.min.js +150 -107
- package/components/dropdown/demo/index.min.js +150 -107
- package/components/dropdown/demo/readme.md +1 -1
- package/components/dropdown/dist/index.js +151 -155
- package/components/dropdown/dist/registered.js +151 -155
- 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 +209 -152
- package/components/input/demo/index.min.js +209 -152
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/index.js +206 -208
- package/components/input/dist/registered.js +206 -208
- package/components/menu/README.md +1 -1
- package/components/menu/demo/api.min.js +106 -53
- package/components/menu/demo/index.min.js +106 -53
- package/components/menu/demo/readme.md +1 -1
- package/components/menu/dist/iconVersion.d.ts +1 -1
- package/components/menu/dist/index.js +128 -122
- package/components/menu/dist/registered.js +128 -122
- package/components/radio/README.md +1 -1
- package/components/radio/demo/api.min.js +29 -55
- package/components/radio/demo/index.min.js +29 -55
- package/components/radio/demo/readme.md +1 -1
- package/components/radio/dist/index.js +27 -100
- package/components/radio/dist/registered.js +27 -100
- package/components/select/README.md +1 -1
- package/components/select/demo/api.min.js +417 -398
- package/components/select/demo/index.min.js +417 -398
- package/components/select/demo/readme.md +1 -1
- package/components/select/dist/index.js +298 -373
- package/components/select/dist/registered.js +298 -373
- 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.
|
|
113
|
+
<script type="module "src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@2.0.2/auro-menu/+esm"></script>
|
|
114
114
|
```
|
|
115
115
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
116
|
|
|
@@ -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,18 @@ 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
1207
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1208
1208
|
// See LICENSE in the project root for license information.
|
|
1209
1209
|
|
|
1210
1210
|
|
|
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
|
-
|
|
1237
|
-
// build the component class
|
|
1238
1211
|
class AuroIcon extends BaseIcon {
|
|
1239
1212
|
constructor() {
|
|
1240
1213
|
super();
|
|
1241
1214
|
|
|
1242
|
-
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1243
|
-
|
|
1244
1215
|
this.privateDefaults();
|
|
1245
1216
|
}
|
|
1246
1217
|
|
|
@@ -1264,6 +1235,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1264
1235
|
this.success = false;
|
|
1265
1236
|
this.tertiary = false;
|
|
1266
1237
|
this.warning = false;
|
|
1238
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1267
1239
|
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1268
1240
|
}
|
|
1269
1241
|
|
|
@@ -1271,71 +1243,136 @@ class AuroIcon extends BaseIcon {
|
|
|
1271
1243
|
static get properties() {
|
|
1272
1244
|
return {
|
|
1273
1245
|
...super.properties,
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* Sets the icon to use the accent style.
|
|
1249
|
+
*/
|
|
1274
1250
|
accent: {
|
|
1275
1251
|
type: Boolean,
|
|
1276
1252
|
reflect: true
|
|
1277
1253
|
},
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1257
|
+
*/
|
|
1278
1258
|
ariaHidden: {
|
|
1279
1259
|
type: String,
|
|
1280
1260
|
reflect: true
|
|
1281
1261
|
},
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1265
|
+
*/
|
|
1282
1266
|
category: {
|
|
1283
1267
|
type: String,
|
|
1284
1268
|
reflect: true
|
|
1285
1269
|
},
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* Allows custom color to be set.
|
|
1273
|
+
*/
|
|
1286
1274
|
customColor: {
|
|
1287
1275
|
type: Boolean
|
|
1288
1276
|
},
|
|
1277
|
+
|
|
1278
|
+
/**
|
|
1279
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
1280
|
+
*/
|
|
1289
1281
|
customSvg: {
|
|
1290
1282
|
type: Boolean
|
|
1291
1283
|
},
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Sets the icon to use the disabled style.
|
|
1287
|
+
*/
|
|
1292
1288
|
disabled: {
|
|
1293
1289
|
type: Boolean,
|
|
1294
1290
|
reflect: true
|
|
1295
1291
|
},
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* Sets the icon to use the emphasis style.
|
|
1295
|
+
*/
|
|
1296
1296
|
emphasis: {
|
|
1297
1297
|
type: Boolean,
|
|
1298
1298
|
reflect: true
|
|
1299
1299
|
},
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* Sets the icon to use the error style.
|
|
1303
|
+
*/
|
|
1300
1304
|
error: {
|
|
1301
1305
|
type: Boolean,
|
|
1302
1306
|
reflect: true
|
|
1303
1307
|
},
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Sets the icon to use the info style.
|
|
1311
|
+
*/
|
|
1304
1312
|
info: {
|
|
1305
1313
|
type: Boolean,
|
|
1306
1314
|
reflect: true
|
|
1307
1315
|
},
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* Exposes content in slot as icon label.
|
|
1319
|
+
*/
|
|
1308
1320
|
label: {
|
|
1309
1321
|
type: Boolean,
|
|
1310
1322
|
reflect: true
|
|
1311
1323
|
},
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
1327
|
+
*/
|
|
1312
1328
|
name: {
|
|
1313
1329
|
type: String,
|
|
1314
1330
|
reflect: true
|
|
1315
1331
|
},
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
1335
|
+
*/
|
|
1316
1336
|
primary: {
|
|
1317
1337
|
type: Boolean,
|
|
1318
1338
|
reflect: true
|
|
1319
1339
|
},
|
|
1340
|
+
|
|
1341
|
+
/**
|
|
1342
|
+
* Sets the icon to use the secondary style.
|
|
1343
|
+
*/
|
|
1320
1344
|
secondary: {
|
|
1321
1345
|
type: Boolean,
|
|
1322
1346
|
reflect: true
|
|
1323
1347
|
},
|
|
1348
|
+
|
|
1349
|
+
/**
|
|
1350
|
+
* Sets the icon to use the subtle style.
|
|
1351
|
+
*/
|
|
1324
1352
|
subtle: {
|
|
1325
1353
|
type: Boolean,
|
|
1326
1354
|
reflect: true
|
|
1327
1355
|
},
|
|
1356
|
+
|
|
1357
|
+
/**
|
|
1358
|
+
* Sets the icon to use the success style.
|
|
1359
|
+
*/
|
|
1328
1360
|
success: {
|
|
1329
1361
|
type: Boolean,
|
|
1330
1362
|
reflect: true
|
|
1331
1363
|
},
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Sets the icon to use the tertiary style.
|
|
1367
|
+
*/
|
|
1332
1368
|
tertiary: {
|
|
1333
1369
|
type: Boolean,
|
|
1334
1370
|
reflect: true
|
|
1335
1371
|
},
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1372
|
+
|
|
1373
|
+
/**
|
|
1374
|
+
* Sets the icon to use the warning style.
|
|
1375
|
+
*/
|
|
1339
1376
|
warning: {
|
|
1340
1377
|
type: Boolean,
|
|
1341
1378
|
reflect: true
|
|
@@ -1372,38 +1409,54 @@ class AuroIcon extends BaseIcon {
|
|
|
1372
1409
|
}
|
|
1373
1410
|
|
|
1374
1411
|
/**
|
|
1412
|
+
* @private
|
|
1375
1413
|
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
1376
1414
|
*/
|
|
1377
1415
|
exposeCssParts() {
|
|
1378
1416
|
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
1379
1417
|
}
|
|
1380
1418
|
|
|
1419
|
+
async firstUpdated() {
|
|
1420
|
+
await super.firstUpdated();
|
|
1421
|
+
|
|
1422
|
+
// Removes the SVG description for screenreader if ariaHidden is set to true
|
|
1423
|
+
if (!this.hasAttribute('ariaHidden') && this.svg) {
|
|
1424
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
1425
|
+
|
|
1426
|
+
if (svgDesc) {
|
|
1427
|
+
svgDesc.remove();
|
|
1428
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1381
1433
|
// function that renders the HTML and CSS into the scope of the component
|
|
1382
1434
|
render() {
|
|
1383
|
-
const
|
|
1384
|
-
'
|
|
1435
|
+
const labelClasses = {
|
|
1436
|
+
'labelWrapper': true,
|
|
1385
1437
|
'util_displayHiddenVisually': !this.label
|
|
1386
1438
|
};
|
|
1387
1439
|
|
|
1388
|
-
const
|
|
1389
|
-
'
|
|
1390
|
-
'wrapper': true,
|
|
1440
|
+
const svgClasses = {
|
|
1441
|
+
'svgWrapper': true,
|
|
1391
1442
|
};
|
|
1392
1443
|
|
|
1393
1444
|
return x`
|
|
1394
|
-
<div
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
${this.
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1445
|
+
<div class="componentWrapper">
|
|
1446
|
+
<div
|
|
1447
|
+
class="${e(svgClasses)}"
|
|
1448
|
+
title="${o(this.title || undefined)}">
|
|
1449
|
+
<span aria-hidden="${o(this.ariaHidden || true)}" part="svg">
|
|
1450
|
+
${this.customSvg ? x`
|
|
1451
|
+
<slot name="svg"></slot>
|
|
1452
|
+
` : x`
|
|
1453
|
+
${this.svg}
|
|
1454
|
+
`
|
|
1455
|
+
}
|
|
1456
|
+
</span>
|
|
1457
|
+
</div>
|
|
1405
1458
|
|
|
1406
|
-
<div class="${e(
|
|
1459
|
+
<div class="${e(labelClasses)}">
|
|
1407
1460
|
<slot></slot>
|
|
1408
1461
|
</div>
|
|
1409
1462
|
</div>
|
|
@@ -1411,7 +1464,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1411
1464
|
}
|
|
1412
1465
|
}
|
|
1413
1466
|
|
|
1414
|
-
var iconVersion = '
|
|
1467
|
+
var iconVersion = '7.0.1';
|
|
1415
1468
|
|
|
1416
1469
|
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
1470
|
|
|
@@ -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,18 @@ 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
1167
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
1168
1168
|
// See LICENSE in the project root for license information.
|
|
1169
1169
|
|
|
1170
1170
|
|
|
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
|
-
|
|
1197
|
-
// build the component class
|
|
1198
1171
|
class AuroIcon extends BaseIcon {
|
|
1199
1172
|
constructor() {
|
|
1200
1173
|
super();
|
|
1201
1174
|
|
|
1202
|
-
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1203
|
-
|
|
1204
1175
|
this.privateDefaults();
|
|
1205
1176
|
}
|
|
1206
1177
|
|
|
@@ -1224,6 +1195,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1224
1195
|
this.success = false;
|
|
1225
1196
|
this.tertiary = false;
|
|
1226
1197
|
this.warning = false;
|
|
1198
|
+
this.uri = 'https://cdn.jsdelivr.net/npm/@alaskaairux/icons@latest/dist';
|
|
1227
1199
|
this.runtimeUtils = new AuroLibraryRuntimeUtils();
|
|
1228
1200
|
}
|
|
1229
1201
|
|
|
@@ -1231,71 +1203,136 @@ class AuroIcon extends BaseIcon {
|
|
|
1231
1203
|
static get properties() {
|
|
1232
1204
|
return {
|
|
1233
1205
|
...super.properties,
|
|
1206
|
+
|
|
1207
|
+
/**
|
|
1208
|
+
* Sets the icon to use the accent style.
|
|
1209
|
+
*/
|
|
1234
1210
|
accent: {
|
|
1235
1211
|
type: Boolean,
|
|
1236
1212
|
reflect: true
|
|
1237
1213
|
},
|
|
1214
|
+
|
|
1215
|
+
/**
|
|
1216
|
+
* Set aria-hidden value. Default is `true`. Option is `false`.
|
|
1217
|
+
*/
|
|
1238
1218
|
ariaHidden: {
|
|
1239
1219
|
type: String,
|
|
1240
1220
|
reflect: true
|
|
1241
1221
|
},
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* The category of the icon you are looking for. See https://auro.alaskaair.com/icons/usage.
|
|
1225
|
+
*/
|
|
1242
1226
|
category: {
|
|
1243
1227
|
type: String,
|
|
1244
1228
|
reflect: true
|
|
1245
1229
|
},
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* Allows custom color to be set.
|
|
1233
|
+
*/
|
|
1246
1234
|
customColor: {
|
|
1247
1235
|
type: Boolean
|
|
1248
1236
|
},
|
|
1237
|
+
|
|
1238
|
+
/**
|
|
1239
|
+
* When true, auro-icon will render a custom SVG inside the default slot.
|
|
1240
|
+
*/
|
|
1249
1241
|
customSvg: {
|
|
1250
1242
|
type: Boolean
|
|
1251
1243
|
},
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Sets the icon to use the disabled style.
|
|
1247
|
+
*/
|
|
1252
1248
|
disabled: {
|
|
1253
1249
|
type: Boolean,
|
|
1254
1250
|
reflect: true
|
|
1255
1251
|
},
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* Sets the icon to use the emphasis style.
|
|
1255
|
+
*/
|
|
1256
1256
|
emphasis: {
|
|
1257
1257
|
type: Boolean,
|
|
1258
1258
|
reflect: true
|
|
1259
1259
|
},
|
|
1260
|
+
|
|
1261
|
+
/**
|
|
1262
|
+
* Sets the icon to use the error style.
|
|
1263
|
+
*/
|
|
1260
1264
|
error: {
|
|
1261
1265
|
type: Boolean,
|
|
1262
1266
|
reflect: true
|
|
1263
1267
|
},
|
|
1268
|
+
|
|
1269
|
+
/**
|
|
1270
|
+
* Sets the icon to use the info style.
|
|
1271
|
+
*/
|
|
1264
1272
|
info: {
|
|
1265
1273
|
type: Boolean,
|
|
1266
1274
|
reflect: true
|
|
1267
1275
|
},
|
|
1276
|
+
|
|
1277
|
+
/**
|
|
1278
|
+
* Exposes content in slot as icon label.
|
|
1279
|
+
*/
|
|
1268
1280
|
label: {
|
|
1269
1281
|
type: Boolean,
|
|
1270
1282
|
reflect: true
|
|
1271
1283
|
},
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* The name of the icon you are looking for without the file extension. See https://auro.alaskaair.com/icons/usage.
|
|
1287
|
+
*/
|
|
1272
1288
|
name: {
|
|
1273
1289
|
type: String,
|
|
1274
1290
|
reflect: true
|
|
1275
1291
|
},
|
|
1292
|
+
|
|
1293
|
+
/**
|
|
1294
|
+
* DEPRECATED: Sets the icon to use the baseline primary icon style.
|
|
1295
|
+
*/
|
|
1276
1296
|
primary: {
|
|
1277
1297
|
type: Boolean,
|
|
1278
1298
|
reflect: true
|
|
1279
1299
|
},
|
|
1300
|
+
|
|
1301
|
+
/**
|
|
1302
|
+
* Sets the icon to use the secondary style.
|
|
1303
|
+
*/
|
|
1280
1304
|
secondary: {
|
|
1281
1305
|
type: Boolean,
|
|
1282
1306
|
reflect: true
|
|
1283
1307
|
},
|
|
1308
|
+
|
|
1309
|
+
/**
|
|
1310
|
+
* Sets the icon to use the subtle style.
|
|
1311
|
+
*/
|
|
1284
1312
|
subtle: {
|
|
1285
1313
|
type: Boolean,
|
|
1286
1314
|
reflect: true
|
|
1287
1315
|
},
|
|
1316
|
+
|
|
1317
|
+
/**
|
|
1318
|
+
* Sets the icon to use the success style.
|
|
1319
|
+
*/
|
|
1288
1320
|
success: {
|
|
1289
1321
|
type: Boolean,
|
|
1290
1322
|
reflect: true
|
|
1291
1323
|
},
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* Sets the icon to use the tertiary style.
|
|
1327
|
+
*/
|
|
1292
1328
|
tertiary: {
|
|
1293
1329
|
type: Boolean,
|
|
1294
1330
|
reflect: true
|
|
1295
1331
|
},
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1332
|
+
|
|
1333
|
+
/**
|
|
1334
|
+
* Sets the icon to use the warning style.
|
|
1335
|
+
*/
|
|
1299
1336
|
warning: {
|
|
1300
1337
|
type: Boolean,
|
|
1301
1338
|
reflect: true
|
|
@@ -1332,38 +1369,54 @@ class AuroIcon extends BaseIcon {
|
|
|
1332
1369
|
}
|
|
1333
1370
|
|
|
1334
1371
|
/**
|
|
1372
|
+
* @private
|
|
1335
1373
|
* @returns {void} Exposes CSS parts for styling from parent components.
|
|
1336
1374
|
*/
|
|
1337
1375
|
exposeCssParts() {
|
|
1338
1376
|
this.setAttribute('exportparts', 'svg:iconSvg');
|
|
1339
1377
|
}
|
|
1340
1378
|
|
|
1379
|
+
async firstUpdated() {
|
|
1380
|
+
await super.firstUpdated();
|
|
1381
|
+
|
|
1382
|
+
// Removes the SVG description for screenreader if ariaHidden is set to true
|
|
1383
|
+
if (!this.hasAttribute('ariaHidden') && this.svg) {
|
|
1384
|
+
const svgDesc = this.svg.querySelector('desc');
|
|
1385
|
+
|
|
1386
|
+
if (svgDesc) {
|
|
1387
|
+
svgDesc.remove();
|
|
1388
|
+
this.svg.removeAttribute('aria-labelledby');
|
|
1389
|
+
}
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1341
1393
|
// function that renders the HTML and CSS into the scope of the component
|
|
1342
1394
|
render() {
|
|
1343
|
-
const
|
|
1344
|
-
'
|
|
1395
|
+
const labelClasses = {
|
|
1396
|
+
'labelWrapper': true,
|
|
1345
1397
|
'util_displayHiddenVisually': !this.label
|
|
1346
1398
|
};
|
|
1347
1399
|
|
|
1348
|
-
const
|
|
1349
|
-
'
|
|
1350
|
-
'wrapper': true,
|
|
1400
|
+
const svgClasses = {
|
|
1401
|
+
'svgWrapper': true,
|
|
1351
1402
|
};
|
|
1352
1403
|
|
|
1353
1404
|
return x`
|
|
1354
|
-
<div
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
${this.
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1405
|
+
<div class="componentWrapper">
|
|
1406
|
+
<div
|
|
1407
|
+
class="${e(svgClasses)}"
|
|
1408
|
+
title="${o(this.title || undefined)}">
|
|
1409
|
+
<span aria-hidden="${o(this.ariaHidden || true)}" part="svg">
|
|
1410
|
+
${this.customSvg ? x`
|
|
1411
|
+
<slot name="svg"></slot>
|
|
1412
|
+
` : x`
|
|
1413
|
+
${this.svg}
|
|
1414
|
+
`
|
|
1415
|
+
}
|
|
1416
|
+
</span>
|
|
1417
|
+
</div>
|
|
1365
1418
|
|
|
1366
|
-
<div class="${e(
|
|
1419
|
+
<div class="${e(labelClasses)}">
|
|
1367
1420
|
<slot></slot>
|
|
1368
1421
|
</div>
|
|
1369
1422
|
</div>
|
|
@@ -1371,7 +1424,7 @@ class AuroIcon extends BaseIcon {
|
|
|
1371
1424
|
}
|
|
1372
1425
|
}
|
|
1373
1426
|
|
|
1374
|
-
var iconVersion = '
|
|
1427
|
+
var iconVersion = '7.0.1';
|
|
1375
1428
|
|
|
1376
1429
|
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
1430
|
|
|
@@ -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.0.2/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;
|