@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.17 → 0.0.0-pr624.18
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/components/bibtemplate/dist/buttonVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +61 -10
- package/components/bibtemplate/dist/registered.js +61 -10
- package/components/combobox/demo/api.min.js +134 -20
- package/components/combobox/demo/index.min.js +134 -20
- package/components/combobox/dist/index.js +122 -20
- package/components/combobox/dist/registered.js +122 -20
- package/components/counter/demo/api.min.js +159 -33
- package/components/counter/demo/index.min.js +159 -33
- package/components/counter/dist/auro-counter.d.ts +6 -0
- package/components/counter/dist/index.js +159 -33
- package/components/counter/dist/registered.js +159 -33
- package/components/datepicker/demo/api.min.js +181 -28
- package/components/datepicker/demo/index.min.js +181 -28
- package/components/datepicker/dist/index.js +181 -28
- package/components/datepicker/dist/registered.js +181 -28
- package/components/input/demo/api.min.js +60 -9
- package/components/input/demo/index.min.js +60 -9
- package/components/input/dist/index.js +60 -9
- package/components/input/dist/registered.js +60 -9
- package/components/menu/demo/api.min.js +12 -0
- package/components/menu/demo/index.min.js +12 -0
- package/components/menu/dist/auro-menu.d.ts +6 -0
- package/components/menu/dist/index.js +12 -0
- package/components/menu/dist/registered.js +12 -0
- package/components/select/demo/api.min.js +94 -17
- package/components/select/demo/index.min.js +94 -17
- package/components/select/dist/auro-select.d.ts +7 -0
- package/components/select/dist/index.js +82 -17
- package/components/select/dist/registered.js +82 -17
- package/package.json +3 -3
|
@@ -6836,7 +6836,6 @@ class AuroElement extends LitElement {
|
|
|
6836
6836
|
* @private
|
|
6837
6837
|
*/
|
|
6838
6838
|
wrapper: {
|
|
6839
|
-
type: HTMLElement,
|
|
6840
6839
|
attribute: false,
|
|
6841
6840
|
reflect: false
|
|
6842
6841
|
}
|
|
@@ -7145,7 +7144,7 @@ class AuroLoader extends LitElement {
|
|
|
7145
7144
|
|
|
7146
7145
|
var loaderVersion = '5.0.0';
|
|
7147
7146
|
|
|
7148
|
-
/* eslint-disable max-lines, curly */
|
|
7147
|
+
/* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
|
|
7149
7148
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7150
7149
|
// See LICENSE in the project root for license information.
|
|
7151
7150
|
|
|
@@ -7212,6 +7211,21 @@ class AuroButton extends AuroElement {
|
|
|
7212
7211
|
* @private
|
|
7213
7212
|
*/
|
|
7214
7213
|
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7214
|
+
|
|
7215
|
+
/**
|
|
7216
|
+
* @private
|
|
7217
|
+
*/
|
|
7218
|
+
this.buttonHref = undefined;
|
|
7219
|
+
|
|
7220
|
+
/**
|
|
7221
|
+
* @private
|
|
7222
|
+
*/
|
|
7223
|
+
this.buttonTarget = undefined;
|
|
7224
|
+
|
|
7225
|
+
/**
|
|
7226
|
+
* @private
|
|
7227
|
+
*/
|
|
7228
|
+
this.buttonRel = undefined;
|
|
7215
7229
|
}
|
|
7216
7230
|
|
|
7217
7231
|
static get styles() {
|
|
@@ -7278,13 +7292,23 @@ class AuroButton extends AuroElement {
|
|
|
7278
7292
|
},
|
|
7279
7293
|
|
|
7280
7294
|
/**
|
|
7281
|
-
* Populates `
|
|
7295
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
7282
7296
|
*/
|
|
7283
7297
|
tIndex: {
|
|
7284
7298
|
type: String,
|
|
7285
7299
|
reflect: true
|
|
7286
7300
|
},
|
|
7287
7301
|
|
|
7302
|
+
/**
|
|
7303
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
7304
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
7305
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
|
|
7306
|
+
*/
|
|
7307
|
+
tabindex: {
|
|
7308
|
+
type: String,
|
|
7309
|
+
reflect: false
|
|
7310
|
+
},
|
|
7311
|
+
|
|
7288
7312
|
/**
|
|
7289
7313
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
7290
7314
|
*/
|
|
@@ -7317,6 +7341,27 @@ class AuroButton extends AuroElement {
|
|
|
7317
7341
|
type: String,
|
|
7318
7342
|
reflect: true
|
|
7319
7343
|
},
|
|
7344
|
+
|
|
7345
|
+
/**
|
|
7346
|
+
* @private
|
|
7347
|
+
*/
|
|
7348
|
+
buttonHref: {
|
|
7349
|
+
type: String,
|
|
7350
|
+
},
|
|
7351
|
+
|
|
7352
|
+
/**
|
|
7353
|
+
* @private
|
|
7354
|
+
*/
|
|
7355
|
+
buttonTarget: {
|
|
7356
|
+
type: String,
|
|
7357
|
+
},
|
|
7358
|
+
|
|
7359
|
+
/**
|
|
7360
|
+
* @private
|
|
7361
|
+
*/
|
|
7362
|
+
buttonRel: {
|
|
7363
|
+
type: String,
|
|
7364
|
+
},
|
|
7320
7365
|
};
|
|
7321
7366
|
}
|
|
7322
7367
|
|
|
@@ -7407,14 +7452,17 @@ class AuroButton extends AuroElement {
|
|
|
7407
7452
|
loading: this.loading,
|
|
7408
7453
|
};
|
|
7409
7454
|
|
|
7455
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
7456
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
7457
|
+
|
|
7410
7458
|
return html$1`
|
|
7411
|
-
|
|
7412
|
-
part="
|
|
7459
|
+
<${tag}
|
|
7460
|
+
part="${part}"
|
|
7413
7461
|
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7414
7462
|
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7415
|
-
|
|
7463
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
7416
7464
|
?autofocus="${this.autofocus}"
|
|
7417
|
-
class
|
|
7465
|
+
class=${classMap(classes)}
|
|
7418
7466
|
?disabled="${this.disabled || this.loading}"
|
|
7419
7467
|
?onDark="${this.onDark}"
|
|
7420
7468
|
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
@@ -7423,6 +7471,9 @@ class AuroButton extends AuroElement {
|
|
|
7423
7471
|
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
7424
7472
|
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
7425
7473
|
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7474
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
7475
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
7476
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
7426
7477
|
>
|
|
7427
7478
|
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
7428
7479
|
|
|
@@ -7431,12 +7482,12 @@ class AuroButton extends AuroElement {
|
|
|
7431
7482
|
<slot></slot>
|
|
7432
7483
|
</span>
|
|
7433
7484
|
</span>
|
|
7434
|
-
|
|
7485
|
+
</${tag}>
|
|
7435
7486
|
`;
|
|
7436
7487
|
}
|
|
7437
7488
|
|
|
7438
7489
|
/**
|
|
7439
|
-
* Renders the layout of the button
|
|
7490
|
+
* Renders the layout of the button.
|
|
7440
7491
|
* @returns {TemplateResult}
|
|
7441
7492
|
* @private
|
|
7442
7493
|
*/
|
|
@@ -6836,7 +6836,6 @@ class AuroElement extends LitElement {
|
|
|
6836
6836
|
* @private
|
|
6837
6837
|
*/
|
|
6838
6838
|
wrapper: {
|
|
6839
|
-
type: HTMLElement,
|
|
6840
6839
|
attribute: false,
|
|
6841
6840
|
reflect: false
|
|
6842
6841
|
}
|
|
@@ -7145,7 +7144,7 @@ class AuroLoader extends LitElement {
|
|
|
7145
7144
|
|
|
7146
7145
|
var loaderVersion = '5.0.0';
|
|
7147
7146
|
|
|
7148
|
-
/* eslint-disable max-lines, curly */
|
|
7147
|
+
/* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
|
|
7149
7148
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
7150
7149
|
// See LICENSE in the project root for license information.
|
|
7151
7150
|
|
|
@@ -7212,6 +7211,21 @@ class AuroButton extends AuroElement {
|
|
|
7212
7211
|
* @private
|
|
7213
7212
|
*/
|
|
7214
7213
|
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
7214
|
+
|
|
7215
|
+
/**
|
|
7216
|
+
* @private
|
|
7217
|
+
*/
|
|
7218
|
+
this.buttonHref = undefined;
|
|
7219
|
+
|
|
7220
|
+
/**
|
|
7221
|
+
* @private
|
|
7222
|
+
*/
|
|
7223
|
+
this.buttonTarget = undefined;
|
|
7224
|
+
|
|
7225
|
+
/**
|
|
7226
|
+
* @private
|
|
7227
|
+
*/
|
|
7228
|
+
this.buttonRel = undefined;
|
|
7215
7229
|
}
|
|
7216
7230
|
|
|
7217
7231
|
static get styles() {
|
|
@@ -7278,13 +7292,23 @@ class AuroButton extends AuroElement {
|
|
|
7278
7292
|
},
|
|
7279
7293
|
|
|
7280
7294
|
/**
|
|
7281
|
-
* Populates `
|
|
7295
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
7282
7296
|
*/
|
|
7283
7297
|
tIndex: {
|
|
7284
7298
|
type: String,
|
|
7285
7299
|
reflect: true
|
|
7286
7300
|
},
|
|
7287
7301
|
|
|
7302
|
+
/**
|
|
7303
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
7304
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
7305
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
|
|
7306
|
+
*/
|
|
7307
|
+
tabindex: {
|
|
7308
|
+
type: String,
|
|
7309
|
+
reflect: false
|
|
7310
|
+
},
|
|
7311
|
+
|
|
7288
7312
|
/**
|
|
7289
7313
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
7290
7314
|
*/
|
|
@@ -7317,6 +7341,27 @@ class AuroButton extends AuroElement {
|
|
|
7317
7341
|
type: String,
|
|
7318
7342
|
reflect: true
|
|
7319
7343
|
},
|
|
7344
|
+
|
|
7345
|
+
/**
|
|
7346
|
+
* @private
|
|
7347
|
+
*/
|
|
7348
|
+
buttonHref: {
|
|
7349
|
+
type: String,
|
|
7350
|
+
},
|
|
7351
|
+
|
|
7352
|
+
/**
|
|
7353
|
+
* @private
|
|
7354
|
+
*/
|
|
7355
|
+
buttonTarget: {
|
|
7356
|
+
type: String,
|
|
7357
|
+
},
|
|
7358
|
+
|
|
7359
|
+
/**
|
|
7360
|
+
* @private
|
|
7361
|
+
*/
|
|
7362
|
+
buttonRel: {
|
|
7363
|
+
type: String,
|
|
7364
|
+
},
|
|
7320
7365
|
};
|
|
7321
7366
|
}
|
|
7322
7367
|
|
|
@@ -7407,14 +7452,17 @@ class AuroButton extends AuroElement {
|
|
|
7407
7452
|
loading: this.loading,
|
|
7408
7453
|
};
|
|
7409
7454
|
|
|
7455
|
+
const tag = this.buttonHref ? literal`a` : literal`button`;
|
|
7456
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
7457
|
+
|
|
7410
7458
|
return html$1`
|
|
7411
|
-
|
|
7412
|
-
part="
|
|
7459
|
+
<${tag}
|
|
7460
|
+
part="${part}"
|
|
7413
7461
|
aria-label="${ifDefined(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
7414
7462
|
aria-labelledby="${ifDefined(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
7415
|
-
|
|
7463
|
+
tabindex="${ifDefined(this.tIndex || this.tabindex)}"
|
|
7416
7464
|
?autofocus="${this.autofocus}"
|
|
7417
|
-
class
|
|
7465
|
+
class=${classMap(classes)}
|
|
7418
7466
|
?disabled="${this.disabled || this.loading}"
|
|
7419
7467
|
?onDark="${this.onDark}"
|
|
7420
7468
|
title="${ifDefined(this.title ? this.title : undefined)}"
|
|
@@ -7423,6 +7471,9 @@ class AuroButton extends AuroElement {
|
|
|
7423
7471
|
variant="${ifDefined(this.variant ? this.variant : undefined)}"
|
|
7424
7472
|
.value="${ifDefined(this.value ? this.value : undefined)}"
|
|
7425
7473
|
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
7474
|
+
href="${ifDefined(this.buttonHref || undefined)}"
|
|
7475
|
+
target="${ifDefined(this.buttonTarget || undefined)}"
|
|
7476
|
+
rel="${ifDefined(this.buttonRel || undefined)}"
|
|
7426
7477
|
>
|
|
7427
7478
|
${ifDefined(this.loading ? html$1`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
7428
7479
|
|
|
@@ -7431,12 +7482,12 @@ class AuroButton extends AuroElement {
|
|
|
7431
7482
|
<slot></slot>
|
|
7432
7483
|
</span>
|
|
7433
7484
|
</span>
|
|
7434
|
-
|
|
7485
|
+
</${tag}>
|
|
7435
7486
|
`;
|
|
7436
7487
|
}
|
|
7437
7488
|
|
|
7438
7489
|
/**
|
|
7439
|
-
* Renders the layout of the button
|
|
7490
|
+
* Renders the layout of the button.
|
|
7440
7491
|
* @returns {TemplateResult}
|
|
7441
7492
|
* @private
|
|
7442
7493
|
*/
|
|
@@ -445,6 +445,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
445
445
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
446
446
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
447
447
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
448
|
+
this.setTagAttribute("auro-menu");
|
|
448
449
|
}
|
|
449
450
|
|
|
450
451
|
disconnectedCallback() {
|
|
@@ -463,6 +464,17 @@ class AuroMenu extends AuroElement$1 {
|
|
|
463
464
|
this.initializeMenu();
|
|
464
465
|
}
|
|
465
466
|
|
|
467
|
+
/**
|
|
468
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
469
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
470
|
+
* @private
|
|
471
|
+
*/
|
|
472
|
+
setTagAttribute(tagName) {
|
|
473
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
474
|
+
this.setAttribute(tagName, true);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
466
478
|
updated(changedProperties) {
|
|
467
479
|
super.updated(changedProperties);
|
|
468
480
|
|
|
@@ -405,6 +405,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
405
405
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
406
406
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
407
407
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
408
|
+
this.setTagAttribute("auro-menu");
|
|
408
409
|
}
|
|
409
410
|
|
|
410
411
|
disconnectedCallback() {
|
|
@@ -423,6 +424,17 @@ class AuroMenu extends AuroElement$1 {
|
|
|
423
424
|
this.initializeMenu();
|
|
424
425
|
}
|
|
425
426
|
|
|
427
|
+
/**
|
|
428
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
429
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
430
|
+
* @private
|
|
431
|
+
*/
|
|
432
|
+
setTagAttribute(tagName) {
|
|
433
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
434
|
+
this.setAttribute(tagName, true);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
426
438
|
updated(changedProperties) {
|
|
427
439
|
super.updated(changedProperties);
|
|
428
440
|
|
|
@@ -112,6 +112,12 @@ export class AuroMenu extends AuroElement {
|
|
|
112
112
|
private handleSlotChange;
|
|
113
113
|
firstUpdated(): void;
|
|
114
114
|
loadingSlots: NodeListOf<Element>;
|
|
115
|
+
/**
|
|
116
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
117
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
private setTagAttribute;
|
|
115
121
|
updated(changedProperties: any): void;
|
|
116
122
|
index: any;
|
|
117
123
|
/**
|
|
@@ -425,6 +425,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
425
425
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
426
426
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
427
427
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
428
|
+
this.setTagAttribute("auro-menu");
|
|
428
429
|
}
|
|
429
430
|
|
|
430
431
|
disconnectedCallback() {
|
|
@@ -443,6 +444,17 @@ class AuroMenu extends AuroElement$1 {
|
|
|
443
444
|
this.initializeMenu();
|
|
444
445
|
}
|
|
445
446
|
|
|
447
|
+
/**
|
|
448
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
449
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
450
|
+
* @private
|
|
451
|
+
*/
|
|
452
|
+
setTagAttribute(tagName) {
|
|
453
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
454
|
+
this.setAttribute(tagName, true);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
446
458
|
updated(changedProperties) {
|
|
447
459
|
super.updated(changedProperties);
|
|
448
460
|
|
|
@@ -384,6 +384,7 @@ class AuroMenu extends AuroElement$1 {
|
|
|
384
384
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
385
385
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
386
386
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
387
|
+
this.setTagAttribute("auro-menu");
|
|
387
388
|
}
|
|
388
389
|
|
|
389
390
|
disconnectedCallback() {
|
|
@@ -402,6 +403,17 @@ class AuroMenu extends AuroElement$1 {
|
|
|
402
403
|
this.initializeMenu();
|
|
403
404
|
}
|
|
404
405
|
|
|
406
|
+
/**
|
|
407
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
408
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
setTagAttribute(tagName) {
|
|
412
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
413
|
+
this.setAttribute(tagName, true);
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
405
417
|
updated(changedProperties) {
|
|
406
418
|
super.updated(changedProperties);
|
|
407
419
|
|
|
@@ -5752,7 +5752,6 @@ let AuroElement$1 = class AuroElement extends i$2 {
|
|
|
5752
5752
|
* @private
|
|
5753
5753
|
*/
|
|
5754
5754
|
wrapper: {
|
|
5755
|
-
type: HTMLElement,
|
|
5756
5755
|
attribute: false,
|
|
5757
5756
|
reflect: false
|
|
5758
5757
|
}
|
|
@@ -6061,7 +6060,7 @@ class AuroLoader extends i$2 {
|
|
|
6061
6060
|
|
|
6062
6061
|
var loaderVersion = '5.0.0';
|
|
6063
6062
|
|
|
6064
|
-
/* eslint-disable max-lines, curly */
|
|
6063
|
+
/* eslint-disable max-lines, curly, jsdoc/no-undefined-types */
|
|
6065
6064
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
6066
6065
|
// See LICENSE in the project root for license information.
|
|
6067
6066
|
|
|
@@ -6128,6 +6127,21 @@ class AuroButton extends AuroElement$1 {
|
|
|
6128
6127
|
* @private
|
|
6129
6128
|
*/
|
|
6130
6129
|
this.loaderTag = versioning.generateTag('auro-loader', loaderVersion, AuroLoader);
|
|
6130
|
+
|
|
6131
|
+
/**
|
|
6132
|
+
* @private
|
|
6133
|
+
*/
|
|
6134
|
+
this.buttonHref = undefined;
|
|
6135
|
+
|
|
6136
|
+
/**
|
|
6137
|
+
* @private
|
|
6138
|
+
*/
|
|
6139
|
+
this.buttonTarget = undefined;
|
|
6140
|
+
|
|
6141
|
+
/**
|
|
6142
|
+
* @private
|
|
6143
|
+
*/
|
|
6144
|
+
this.buttonRel = undefined;
|
|
6131
6145
|
}
|
|
6132
6146
|
|
|
6133
6147
|
static get styles() {
|
|
@@ -6194,13 +6208,23 @@ class AuroButton extends AuroElement$1 {
|
|
|
6194
6208
|
},
|
|
6195
6209
|
|
|
6196
6210
|
/**
|
|
6197
|
-
* Populates `
|
|
6211
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6198
6212
|
*/
|
|
6199
6213
|
tIndex: {
|
|
6200
6214
|
type: String,
|
|
6201
6215
|
reflect: true
|
|
6202
6216
|
},
|
|
6203
6217
|
|
|
6218
|
+
/**
|
|
6219
|
+
* Populates `tabindex` to define the focusable sequence in keyboard navigation.
|
|
6220
|
+
* Must be used with "." to ensure the host element does not retain a reference to the `tabindex` attribute.
|
|
6221
|
+
* Example: `<auro-button .tabindex="${this.disabled ? '-1' : '0'}"></auro-button>`
|
|
6222
|
+
*/
|
|
6223
|
+
tabindex: {
|
|
6224
|
+
type: String,
|
|
6225
|
+
reflect: false
|
|
6226
|
+
},
|
|
6227
|
+
|
|
6204
6228
|
/**
|
|
6205
6229
|
* Sets title attribute. The information is most often shown as a tooltip text when the mouse moves over the element.
|
|
6206
6230
|
*/
|
|
@@ -6233,6 +6257,27 @@ class AuroButton extends AuroElement$1 {
|
|
|
6233
6257
|
type: String,
|
|
6234
6258
|
reflect: true
|
|
6235
6259
|
},
|
|
6260
|
+
|
|
6261
|
+
/**
|
|
6262
|
+
* @private
|
|
6263
|
+
*/
|
|
6264
|
+
buttonHref: {
|
|
6265
|
+
type: String,
|
|
6266
|
+
},
|
|
6267
|
+
|
|
6268
|
+
/**
|
|
6269
|
+
* @private
|
|
6270
|
+
*/
|
|
6271
|
+
buttonTarget: {
|
|
6272
|
+
type: String,
|
|
6273
|
+
},
|
|
6274
|
+
|
|
6275
|
+
/**
|
|
6276
|
+
* @private
|
|
6277
|
+
*/
|
|
6278
|
+
buttonRel: {
|
|
6279
|
+
type: String,
|
|
6280
|
+
},
|
|
6236
6281
|
};
|
|
6237
6282
|
}
|
|
6238
6283
|
|
|
@@ -6323,14 +6368,17 @@ class AuroButton extends AuroElement$1 {
|
|
|
6323
6368
|
loading: this.loading,
|
|
6324
6369
|
};
|
|
6325
6370
|
|
|
6371
|
+
const tag = this.buttonHref ? i`a` : i`button`;
|
|
6372
|
+
const part = this.buttonHref ? 'link' : 'button';
|
|
6373
|
+
|
|
6326
6374
|
return u`
|
|
6327
|
-
|
|
6328
|
-
part="
|
|
6375
|
+
<${tag}
|
|
6376
|
+
part="${part}"
|
|
6329
6377
|
aria-label="${o(this.loading ? this.loadingText : this.currentAriaLabel || undefined)}"
|
|
6330
6378
|
aria-labelledby="${o(this.loading ? undefined : this.currentAriaLabelledBy || undefined)}"
|
|
6331
|
-
|
|
6379
|
+
tabindex="${o(this.tIndex || this.tabindex)}"
|
|
6332
6380
|
?autofocus="${this.autofocus}"
|
|
6333
|
-
class
|
|
6381
|
+
class=${e(classes)}
|
|
6334
6382
|
?disabled="${this.disabled || this.loading}"
|
|
6335
6383
|
?onDark="${this.onDark}"
|
|
6336
6384
|
title="${o(this.title ? this.title : undefined)}"
|
|
@@ -6339,6 +6387,9 @@ class AuroButton extends AuroElement$1 {
|
|
|
6339
6387
|
variant="${o(this.variant ? this.variant : undefined)}"
|
|
6340
6388
|
.value="${o(this.value ? this.value : undefined)}"
|
|
6341
6389
|
@click="${this.type === 'submit' ? this.surfaceSubmitEvent : undefined}"
|
|
6390
|
+
href="${o(this.buttonHref || undefined)}"
|
|
6391
|
+
target="${o(this.buttonTarget || undefined)}"
|
|
6392
|
+
rel="${o(this.buttonRel || undefined)}"
|
|
6342
6393
|
>
|
|
6343
6394
|
${o(this.loading ? u`<${this.loaderTag} pulse part="loader"></${this.loaderTag}>` : undefined)}
|
|
6344
6395
|
|
|
@@ -6347,12 +6398,12 @@ class AuroButton extends AuroElement$1 {
|
|
|
6347
6398
|
<slot></slot>
|
|
6348
6399
|
</span>
|
|
6349
6400
|
</span>
|
|
6350
|
-
|
|
6401
|
+
</${tag}>
|
|
6351
6402
|
`;
|
|
6352
6403
|
}
|
|
6353
6404
|
|
|
6354
6405
|
/**
|
|
6355
|
-
* Renders the layout of the button
|
|
6406
|
+
* Renders the layout of the button.
|
|
6356
6407
|
* @returns {TemplateResult}
|
|
6357
6408
|
* @private
|
|
6358
6409
|
*/
|
|
@@ -6361,7 +6412,7 @@ class AuroButton extends AuroElement$1 {
|
|
|
6361
6412
|
}
|
|
6362
6413
|
}
|
|
6363
6414
|
|
|
6364
|
-
var buttonVersion = '11.
|
|
6415
|
+
var buttonVersion = '11.2.1';
|
|
6365
6416
|
|
|
6366
6417
|
// Copyright (c) 2020 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
6367
6418
|
// See LICENSE in the project root for license information.
|
|
@@ -8171,10 +8222,25 @@ class AuroSelect extends AuroElement$4 {
|
|
|
8171
8222
|
// Set the initial value in auro-menu if defined
|
|
8172
8223
|
if (this.hasAttribute('value') && this.getAttribute('value').length > 0) {
|
|
8173
8224
|
this.value = this.multiSelect ? arrayConverter(this.getAttribute('value')) : this.getAttribute('value');
|
|
8174
|
-
this.menu
|
|
8225
|
+
if (this.menu) {
|
|
8226
|
+
this.menu.value = this.value;
|
|
8227
|
+
}
|
|
8175
8228
|
}
|
|
8176
8229
|
}
|
|
8177
8230
|
|
|
8231
|
+
/**
|
|
8232
|
+
* Update the menu value. With checks for menu existence. Awaits value update.
|
|
8233
|
+
* @param {string} value - The value to set in the menu.
|
|
8234
|
+
* @returns void
|
|
8235
|
+
* @private
|
|
8236
|
+
*/
|
|
8237
|
+
async updateMenuValue(value) {
|
|
8238
|
+
if (!this.menu) return;
|
|
8239
|
+
|
|
8240
|
+
this.menu.value = value;
|
|
8241
|
+
await this.menu.updateComplete;
|
|
8242
|
+
}
|
|
8243
|
+
|
|
8178
8244
|
async updated(changedProperties) {
|
|
8179
8245
|
if (changedProperties.has('multiSelect')) {
|
|
8180
8246
|
this.clearSelection();
|
|
@@ -8184,14 +8250,13 @@ class AuroSelect extends AuroElement$4 {
|
|
|
8184
8250
|
if (this.value) {
|
|
8185
8251
|
this.value = this.multiSelect ? arrayConverter(this.value) : this.value;
|
|
8186
8252
|
|
|
8187
|
-
this.
|
|
8188
|
-
|
|
8189
|
-
// Wait for menu to finish updating its value
|
|
8190
|
-
await this.menu.updateComplete;
|
|
8253
|
+
await this.updateMenuValue(this.value);
|
|
8191
8254
|
|
|
8192
|
-
|
|
8255
|
+
if (this.menu) {
|
|
8256
|
+
this.optionSelected = this.menu.optionSelected;
|
|
8257
|
+
}
|
|
8193
8258
|
} else {
|
|
8194
|
-
this.
|
|
8259
|
+
await this.updateMenuValue(undefined);
|
|
8195
8260
|
}
|
|
8196
8261
|
|
|
8197
8262
|
this._updateNativeSelect();
|
|
@@ -8967,6 +9032,7 @@ class AuroMenu extends AuroElement$4 {
|
|
|
8967
9032
|
this.addEventListener('mousedown', this.handleMouseSelect);
|
|
8968
9033
|
this.addEventListener('auroMenuOption-mouseover', this.handleOptionHover);
|
|
8969
9034
|
this.addEventListener('slotchange', this.handleSlotChange);
|
|
9035
|
+
this.setTagAttribute("auro-menu");
|
|
8970
9036
|
}
|
|
8971
9037
|
|
|
8972
9038
|
disconnectedCallback() {
|
|
@@ -8985,6 +9051,17 @@ class AuroMenu extends AuroElement$4 {
|
|
|
8985
9051
|
this.initializeMenu();
|
|
8986
9052
|
}
|
|
8987
9053
|
|
|
9054
|
+
/**
|
|
9055
|
+
* Sets an attribute that matches the default tag name if the tag name is not the default.
|
|
9056
|
+
* @param {string} tagName - The tag name to set as an attribute.
|
|
9057
|
+
* @private
|
|
9058
|
+
*/
|
|
9059
|
+
setTagAttribute(tagName) {
|
|
9060
|
+
if (this.tagName.toLowerCase() !== tagName) {
|
|
9061
|
+
this.setAttribute(tagName, true);
|
|
9062
|
+
}
|
|
9063
|
+
}
|
|
9064
|
+
|
|
8988
9065
|
updated(changedProperties) {
|
|
8989
9066
|
super.updated(changedProperties);
|
|
8990
9067
|
|