@aurodesignsystem/auro-formkit 5.9.1 → 5.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -4
- package/components/checkbox/README.md +62 -62
- package/components/checkbox/demo/api.js +1 -1
- package/components/checkbox/demo/api.md +127 -84
- package/components/checkbox/demo/api.min.js +125 -42
- package/components/checkbox/demo/index.md +9 -281
- package/components/checkbox/demo/index.min.js +125 -42
- package/components/checkbox/demo/readme.html +3 -4
- package/components/checkbox/demo/readme.md +62 -62
- package/components/checkbox/dist/auro-checkbox-group.d.ts +7 -8
- package/components/checkbox/dist/auro-checkbox.d.ts +74 -20
- package/components/checkbox/dist/index.js +125 -42
- package/components/checkbox/dist/registered.js +125 -42
- package/components/combobox/README.md +76 -74
- package/components/combobox/demo/api.html +1 -0
- package/components/combobox/demo/api.js +11 -12
- package/components/combobox/demo/api.md +1302 -875
- package/components/combobox/demo/api.min.js +348 -420
- package/components/combobox/demo/index.html +1 -7
- package/components/combobox/demo/index.js +0 -19
- package/components/combobox/demo/index.md +43 -723
- package/components/combobox/demo/index.min.js +301 -230
- package/components/combobox/demo/readme.html +3 -4
- package/components/combobox/demo/readme.md +76 -74
- package/components/combobox/dist/auro-combobox.d.ts +39 -40
- package/components/combobox/dist/index.js +159 -143
- package/components/combobox/dist/registered.js +159 -143
- package/components/counter/README.md +81 -66
- package/components/counter/demo/api.html +1 -2
- package/components/counter/demo/api.js +2 -2
- package/components/counter/demo/api.md +777 -259
- package/components/counter/demo/api.min.js +84 -112
- package/components/counter/demo/index.html +0 -2
- package/components/counter/demo/index.md +20 -329
- package/components/counter/demo/index.min.js +82 -93
- package/components/counter/demo/readme.html +3 -4
- package/components/counter/demo/readme.md +81 -66
- package/components/counter/dist/auro-counter-group.d.ts +21 -36
- package/components/counter/dist/auro-counter-wrapper.d.ts +1 -6
- package/components/counter/dist/auro-counter.d.ts +5 -8
- package/components/counter/dist/index.js +82 -93
- package/components/counter/dist/registered.js +82 -93
- package/components/datepicker/README.md +57 -61
- package/components/datepicker/demo/api.js +8 -8
- package/components/datepicker/demo/api.md +720 -561
- package/components/datepicker/demo/api.min.js +427 -2424
- package/components/datepicker/demo/index.md +65 -117
- package/components/datepicker/demo/index.min.js +427 -2424
- package/components/datepicker/demo/readme.html +3 -4
- package/components/datepicker/demo/readme.md +57 -61
- package/components/datepicker/dist/auro-calendar.d.ts +60 -34
- package/components/datepicker/dist/auro-datepicker.d.ts +31 -31
- package/components/datepicker/dist/index.js +256 -2253
- package/components/datepicker/dist/popoverVersion.d.ts +1 -1
- package/components/datepicker/dist/registered.js +256 -2253
- package/components/dropdown/README.md +78 -62
- package/components/dropdown/demo/api.js +4 -4
- package/components/dropdown/demo/api.md +520 -478
- package/components/dropdown/demo/api.min.js +48 -39
- package/components/dropdown/demo/index.md +65 -119
- package/components/dropdown/demo/index.min.js +38 -29
- package/components/dropdown/demo/readme.html +3 -4
- package/components/dropdown/demo/readme.md +78 -62
- package/components/dropdown/dist/auro-dropdown.d.ts +42 -33
- package/components/dropdown/dist/index.js +38 -29
- package/components/dropdown/dist/registered.js +38 -29
- package/components/form/README.md +16 -58
- package/components/form/demo/api.md +16 -21
- package/components/form/demo/api.min.js +13 -8
- package/components/form/demo/index.md +38 -39
- package/components/form/demo/index.min.js +13 -8
- package/components/form/demo/readme.md +16 -58
- package/components/form/dist/auro-form.d.ts +15 -3
- package/components/form/dist/index.js +13 -8
- package/components/form/dist/registered.js +13 -8
- package/components/input/README.md +55 -60
- package/components/input/demo/api.js +3 -5
- package/components/input/demo/api.md +558 -537
- package/components/input/demo/api.min.js +100 -113
- package/components/input/demo/index.js +0 -1
- package/components/input/demo/index.md +90 -203
- package/components/input/demo/index.min.js +85 -97
- package/components/input/demo/readme.html +3 -4
- package/components/input/demo/readme.md +55 -60
- package/components/input/dist/auro-input.d.ts +6 -5
- package/components/input/dist/base-input.d.ts +67 -68
- package/components/input/dist/index.js +85 -80
- package/components/input/dist/registered.js +85 -80
- package/components/menu/README.md +61 -61
- package/components/menu/demo/api.js +6 -8
- package/components/menu/demo/api.md +520 -572
- package/components/menu/demo/api.min.js +176 -92
- package/components/menu/demo/index.js +0 -5
- package/components/menu/demo/index.md +36 -119
- package/components/menu/demo/index.min.js +141 -96
- package/components/menu/demo/readme.html +3 -4
- package/components/menu/demo/readme.md +61 -61
- package/components/menu/dist/auro-menu.d.ts +70 -37
- package/components/menu/dist/auro-menuoption.d.ts +36 -11
- package/components/menu/dist/index.js +141 -45
- package/components/menu/dist/registered.js +141 -45
- package/components/radio/README.md +61 -57
- package/components/radio/demo/api.js +2 -2
- package/components/radio/demo/api.md +241 -170
- package/components/radio/demo/api.min.js +154 -77
- package/components/radio/demo/index.md +22 -99
- package/components/radio/demo/index.min.js +145 -68
- package/components/radio/demo/readme.html +3 -4
- package/components/radio/demo/readme.md +61 -57
- package/components/radio/dist/auro-radio-group.d.ts +67 -35
- package/components/radio/dist/auro-radio.d.ts +56 -33
- package/components/radio/dist/index.js +145 -68
- package/components/radio/dist/registered.js +145 -68
- package/components/select/README.md +68 -65
- package/components/select/demo/api.html +1 -0
- package/components/select/demo/api.js +7 -7
- package/components/select/demo/api.md +1305 -625
- package/components/select/demo/api.min.js +300 -199
- package/components/select/demo/index.html +0 -2
- package/components/select/demo/index.md +25 -833
- package/components/select/demo/index.min.js +299 -167
- package/components/select/demo/readme.html +3 -4
- package/components/select/demo/readme.md +68 -65
- package/components/select/dist/auro-select.d.ts +99 -90
- package/components/select/dist/index.js +158 -122
- package/components/select/dist/registered.js +158 -122
- package/package.json +3 -3
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
function showExample() {
|
|
2
|
-
const triggerInput = document.querySelector('#showExampleTriggerInput');
|
|
3
|
-
const dropdownElem = document.querySelector('#showMethodExample');
|
|
4
|
-
|
|
5
|
-
triggerInput.addEventListener('keydown', () => {
|
|
6
|
-
dropdownElem.show();
|
|
7
|
-
});
|
|
8
|
-
}
|
|
9
|
-
|
|
10
1
|
function hideExample() {
|
|
11
2
|
const btn = document.querySelector('#hideExampleBtn');
|
|
12
3
|
const dropdown = document.querySelector('#hideExample');
|
|
@@ -16,6 +7,15 @@ function hideExample() {
|
|
|
16
7
|
});
|
|
17
8
|
}
|
|
18
9
|
|
|
10
|
+
function showExample() {
|
|
11
|
+
const triggerInput = document.querySelector('#showExampleTriggerInput');
|
|
12
|
+
const dropdownElem = document.querySelector('#showMethodExample');
|
|
13
|
+
|
|
14
|
+
triggerInput.addEventListener('keydown', () => {
|
|
15
|
+
dropdownElem.show();
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
19
|
function inDialogExample() {
|
|
20
20
|
document.querySelector("#dropdown-dialog-opener").addEventListener("click", () => {
|
|
21
21
|
const dialog = document.querySelector("#dropdown-dialog");
|
|
@@ -3183,7 +3183,7 @@ class AuroHelpText extends i {
|
|
|
3183
3183
|
}
|
|
3184
3184
|
}
|
|
3185
3185
|
|
|
3186
|
-
var formkitVersion = '
|
|
3186
|
+
var formkitVersion = '202601271813';
|
|
3187
3187
|
|
|
3188
3188
|
class AuroElement extends i {
|
|
3189
3189
|
static get properties() {
|
|
@@ -3289,12 +3289,14 @@ class AuroElement extends i {
|
|
|
3289
3289
|
}
|
|
3290
3290
|
}
|
|
3291
3291
|
|
|
3292
|
-
// Copyright (c)
|
|
3292
|
+
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3293
3293
|
// See LICENSE in the project root for license information.
|
|
3294
3294
|
|
|
3295
3295
|
|
|
3296
|
-
|
|
3297
|
-
|
|
3296
|
+
/**
|
|
3297
|
+
* The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
|
|
3298
|
+
* @customElement auro-dropdown
|
|
3299
|
+
*
|
|
3298
3300
|
* @slot - Default slot for the popover content.
|
|
3299
3301
|
* @slot helpText - Defines the content of the helpText.
|
|
3300
3302
|
* @slot trigger - Defines the content of the trigger.
|
|
@@ -3330,7 +3332,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3330
3332
|
/** @private */
|
|
3331
3333
|
this.bibElement = e();
|
|
3332
3334
|
|
|
3333
|
-
this.
|
|
3335
|
+
this._intializeDefaults();
|
|
3334
3336
|
}
|
|
3335
3337
|
|
|
3336
3338
|
/**
|
|
@@ -3351,7 +3353,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3351
3353
|
* @private
|
|
3352
3354
|
* @returns {void} Internal defaults.
|
|
3353
3355
|
*/
|
|
3354
|
-
|
|
3356
|
+
_intializeDefaults() {
|
|
3355
3357
|
this.appearance = 'default';
|
|
3356
3358
|
this.chevron = false;
|
|
3357
3359
|
this.disabled = false;
|
|
@@ -3472,9 +3474,18 @@ class AuroDropdown extends AuroElement {
|
|
|
3472
3474
|
static get properties() {
|
|
3473
3475
|
return {
|
|
3474
3476
|
|
|
3477
|
+
/**
|
|
3478
|
+
* The value for the role attribute of the trigger element.
|
|
3479
|
+
*/
|
|
3480
|
+
a11yRole: {
|
|
3481
|
+
type: String || undefined,
|
|
3482
|
+
attribute: false,
|
|
3483
|
+
reflect: false
|
|
3484
|
+
},
|
|
3485
|
+
|
|
3475
3486
|
/**
|
|
3476
3487
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
3477
|
-
* @
|
|
3488
|
+
* @type {'default' | 'inverse'}
|
|
3478
3489
|
* @default 'default'
|
|
3479
3490
|
*/
|
|
3480
3491
|
appearance: {
|
|
@@ -3484,7 +3495,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3484
3495
|
|
|
3485
3496
|
/**
|
|
3486
3497
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
3487
|
-
* @default false
|
|
3488
3498
|
*/
|
|
3489
3499
|
autoPlacement: {
|
|
3490
3500
|
type: Boolean,
|
|
@@ -3493,7 +3503,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3493
3503
|
|
|
3494
3504
|
/**
|
|
3495
3505
|
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
3496
|
-
* @default false
|
|
3497
3506
|
*/
|
|
3498
3507
|
disableEventShow: {
|
|
3499
3508
|
type: Boolean,
|
|
@@ -3510,11 +3519,11 @@ class AuroDropdown extends AuroElement {
|
|
|
3510
3519
|
|
|
3511
3520
|
/**
|
|
3512
3521
|
* If declared, the dropdown displays a chevron on the right.
|
|
3513
|
-
* @attr {Boolean} chevron
|
|
3514
3522
|
*/
|
|
3515
3523
|
chevron: {
|
|
3516
3524
|
type: Boolean,
|
|
3517
|
-
reflect: true
|
|
3525
|
+
reflect: true,
|
|
3526
|
+
attribute: 'chevron'
|
|
3518
3527
|
},
|
|
3519
3528
|
|
|
3520
3529
|
/**
|
|
@@ -3551,7 +3560,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3551
3560
|
},
|
|
3552
3561
|
|
|
3553
3562
|
/**
|
|
3554
|
-
* If declared
|
|
3563
|
+
* If declared, will apply error UI to the dropdown.
|
|
3555
3564
|
*/
|
|
3556
3565
|
error: {
|
|
3557
3566
|
type: Boolean,
|
|
@@ -3606,18 +3615,28 @@ class AuroDropdown extends AuroElement {
|
|
|
3606
3615
|
},
|
|
3607
3616
|
|
|
3608
3617
|
/**
|
|
3609
|
-
* Defines the screen size breakpoint
|
|
3610
|
-
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3618
|
+
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3611
3619
|
*
|
|
3612
3620
|
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3613
3621
|
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3614
|
-
* @
|
|
3622
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
3623
|
+
* @default 'sm'
|
|
3615
3624
|
*/
|
|
3616
3625
|
fullscreenBreakpoint: {
|
|
3617
3626
|
type: String,
|
|
3618
3627
|
reflect: true
|
|
3619
3628
|
},
|
|
3620
3629
|
|
|
3630
|
+
/**
|
|
3631
|
+
* Sets the layout of the dropdown.
|
|
3632
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
3633
|
+
* @default 'classic'
|
|
3634
|
+
*/
|
|
3635
|
+
layout: {
|
|
3636
|
+
type: String,
|
|
3637
|
+
reflect: true
|
|
3638
|
+
},
|
|
3639
|
+
|
|
3621
3640
|
/**
|
|
3622
3641
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
3623
3642
|
* @private
|
|
@@ -3638,7 +3657,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3638
3657
|
/**
|
|
3639
3658
|
* If declared, the bib will NOT flip to an alternate position
|
|
3640
3659
|
* when there isn't enough space in the specified `placement`.
|
|
3641
|
-
* @default false
|
|
3642
3660
|
*/
|
|
3643
3661
|
noFlip: {
|
|
3644
3662
|
type: Boolean,
|
|
@@ -3647,7 +3665,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3647
3665
|
|
|
3648
3666
|
/**
|
|
3649
3667
|
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
3650
|
-
* @default false
|
|
3651
3668
|
*/
|
|
3652
3669
|
shift: {
|
|
3653
3670
|
type: Boolean,
|
|
@@ -3680,7 +3697,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3680
3697
|
},
|
|
3681
3698
|
|
|
3682
3699
|
/**
|
|
3683
|
-
* DEPRECATED - use `appearance` instead.
|
|
3700
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
3684
3701
|
*/
|
|
3685
3702
|
onDark: {
|
|
3686
3703
|
type: Boolean,
|
|
@@ -3697,7 +3714,8 @@ class AuroDropdown extends AuroElement {
|
|
|
3697
3714
|
|
|
3698
3715
|
/**
|
|
3699
3716
|
* Position where the bib should appear relative to the trigger.
|
|
3700
|
-
* @
|
|
3717
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
3718
|
+
* @default 'bottom-start'
|
|
3701
3719
|
*/
|
|
3702
3720
|
placement: {
|
|
3703
3721
|
type: String,
|
|
@@ -3709,15 +3727,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3709
3727
|
*/
|
|
3710
3728
|
tabIndex: {
|
|
3711
3729
|
type: Number
|
|
3712
|
-
},
|
|
3713
|
-
|
|
3714
|
-
/**
|
|
3715
|
-
* The value for the role attribute of the trigger element.
|
|
3716
|
-
*/
|
|
3717
|
-
a11yRole: {
|
|
3718
|
-
type: String || undefined,
|
|
3719
|
-
attribute: false,
|
|
3720
|
-
reflect: false
|
|
3721
3730
|
}
|
|
3722
3731
|
};
|
|
3723
3732
|
}
|
|
@@ -3744,7 +3753,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3744
3753
|
|
|
3745
3754
|
/**
|
|
3746
3755
|
* This will register this element with the browser.
|
|
3747
|
-
* @param {string} [name="auro-dropdown"] - The name of element that you want to register
|
|
3756
|
+
* @param {string} [name="auro-dropdown"] - The name of the element that you want to register.
|
|
3748
3757
|
*
|
|
3749
3758
|
* @example
|
|
3750
3759
|
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|
|
@@ -4233,8 +4242,8 @@ AuroDropdown.register();
|
|
|
4233
4242
|
function initExamples(initialCount = 0) {
|
|
4234
4243
|
try {
|
|
4235
4244
|
// javascript example function calls to be added here upon creation to test examples
|
|
4236
|
-
showExample();
|
|
4237
4245
|
hideExample();
|
|
4246
|
+
showExample();
|
|
4238
4247
|
inDialogExample();
|
|
4239
4248
|
} catch (err) {
|
|
4240
4249
|
if (initialCount <= 20) {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
This file is generated based on a template fetched from `./docs/partials/index.md`
|
|
2
|
+
THIS PAGE'S CONTENT SHOULD BE KEPT MINIMAL.
|
|
3
|
+
ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE — THE BASIC EXAMPLE IS USUALLY ENOUGH.
|
|
4
|
+
ALL OTHER EXAMPLES SHOULD GO IN THE API DOCUMENTATION.
|
|
7
5
|
-->
|
|
8
6
|
|
|
9
|
-
# Dropdown
|
|
10
|
-
|
|
7
|
+
# Dropdown
|
|
8
|
+
|
|
11
9
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/description.md) -->
|
|
12
10
|
<!-- The below content is automatically added from ./../docs/partials/description.md -->
|
|
13
11
|
The `auro-dropdown` component is a trigger and dropdown element combination intended to be used with dropdown content that is interactive. `auro-dropdown` is content agnostic and any valid HTML can be placed in either the trigger or the dropdown.
|
|
@@ -15,8 +13,8 @@ The `auro-dropdown` component is a trigger and dropdown element combination inte
|
|
|
15
13
|
_Note: if the dropdown content in your implementation is not interactive (e.g. a tooltip) [auro-popover](http://auro.alaskaair.com/components/auro/popover) may better serve your needs._
|
|
16
14
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
17
15
|
|
|
18
|
-
##
|
|
19
|
-
|
|
16
|
+
## Use Cases
|
|
17
|
+
|
|
20
18
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/useCases.md) -->
|
|
21
19
|
<!-- The below content is automatically added from ./../docs/partials/useCases.md -->
|
|
22
20
|
The `auro-dropdown` element should be used in situations where users may:
|
|
@@ -36,9 +34,58 @@ To meet our accessibility requirement, all uses of `auro-dropdown` should have a
|
|
|
36
34
|
|
|
37
35
|
Not including one of the above options will result in your UI being non-compliant with Alaska's accessibility policies.
|
|
38
36
|
|
|
39
|
-
##
|
|
37
|
+
## Supported Standard and Accessible Interactions
|
|
38
|
+
|
|
39
|
+
The dropdown can be opened with the following actions:
|
|
40
|
+
|
|
41
|
+
1. Clicking/tapping on the trigger.
|
|
42
|
+
1. Tabbing to the trigger and using the `enter` or `spacebar` keys.
|
|
43
|
+
1. Programmatically via another control in the UI calling the `show()` method (see api).
|
|
44
|
+
|
|
45
|
+
The dropdown can be closed with the following actions:
|
|
46
|
+
|
|
47
|
+
1. Clicking anywhere in the view outside of the dropdown.
|
|
48
|
+
1. Using the `esc` key.
|
|
49
|
+
1. Programmatically via another control in the UI calling the `hide()` method (see api).
|
|
40
50
|
|
|
41
|
-
|
|
51
|
+
## Example(s)
|
|
52
|
+
|
|
53
|
+
### Basic
|
|
54
|
+
|
|
55
|
+
<div class="exampleWrapper">
|
|
56
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
57
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
58
|
+
<auro-dropdown aria-label="custom label">
|
|
59
|
+
Lorem ipsum solar
|
|
60
|
+
<div slot="trigger">
|
|
61
|
+
Trigger
|
|
62
|
+
</div>
|
|
63
|
+
</auro-dropdown>
|
|
64
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
65
|
+
</div>
|
|
66
|
+
<auro-accordion alignRight>
|
|
67
|
+
<span slot="trigger">See code</span>
|
|
68
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
69
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<auro-dropdown aria-label="custom label">
|
|
73
|
+
Lorem ipsum solar
|
|
74
|
+
<div slot="trigger">
|
|
75
|
+
Trigger
|
|
76
|
+
</div>
|
|
77
|
+
</auro-dropdown>
|
|
78
|
+
```
|
|
79
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
|
+
</auro-accordion>
|
|
81
|
+
|
|
82
|
+
### Layouts
|
|
83
|
+
|
|
84
|
+
The `auro-dropdown` element supports multiple layouts to fit different design needs. The available layouts are: `classic`, `emphasized`, and `snowflake`. Each layout offers a unique visual style while maintaining the same core functionality.
|
|
85
|
+
|
|
86
|
+
**Important**: The `emphasized` and `snowflake` layouts are designed specifically for dark backgrounds and should be used with the `appearance="inverse"` attribute.
|
|
87
|
+
|
|
88
|
+
#### Classic
|
|
42
89
|
|
|
43
90
|
<div class="exampleWrapper">
|
|
44
91
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/classic/basic.html) -->
|
|
@@ -85,8 +132,8 @@ Not including one of the above options will result in your UI being non-complian
|
|
|
85
132
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
86
133
|
</auro-accordion>
|
|
87
134
|
<div class="exampleWrapper--ondark">
|
|
88
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/classic/
|
|
89
|
-
<!-- The below content is automatically added from ./../apiExamples/classic/
|
|
135
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/classic/appearance-inverse.html) -->
|
|
136
|
+
<!-- The below content is automatically added from ./../apiExamples/classic/appearance-inverse.html -->
|
|
90
137
|
<auro-dropdown appearance="inverse" layout="classic" shape="classic" size="lg" id="classicOnDark" chevron aria-label="Label content for screen reader">
|
|
91
138
|
<div style="padding: var(--ds-size-150);">
|
|
92
139
|
Lorem ipsum solar
|
|
@@ -106,8 +153,8 @@ Not including one of the above options will result in your UI being non-complian
|
|
|
106
153
|
</div>
|
|
107
154
|
<auro-accordion alignRight>
|
|
108
155
|
<span slot="trigger">See code</span>
|
|
109
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/classic/
|
|
110
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/classic/
|
|
156
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/classic/appearance-inverse.html) -->
|
|
157
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/classic/appearance-inverse.html -->
|
|
111
158
|
|
|
112
159
|
```html
|
|
113
160
|
<auro-dropdown appearance="inverse" layout="classic" shape="classic" size="lg" id="classicOnDark" chevron aria-label="Label content for screen reader">
|
|
@@ -129,9 +176,7 @@ Not including one of the above options will result in your UI being non-complian
|
|
|
129
176
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
130
177
|
</auro-accordion>
|
|
131
178
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
Only supports `appearance="inverse"`.
|
|
179
|
+
#### Emphasized
|
|
135
180
|
|
|
136
181
|
<div class="exampleWrapper--ondark">
|
|
137
182
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/emphasized/basic.html) -->
|
|
@@ -202,9 +247,7 @@ Only supports `appearance="inverse"`.
|
|
|
202
247
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
203
248
|
</auro-accordion>
|
|
204
249
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
Only supports `appearance="inverse"`.
|
|
250
|
+
#### Snowflake
|
|
208
251
|
|
|
209
252
|
<div class="exampleWrapper--ondark">
|
|
210
253
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/snowflake/basic.html) -->
|
|
@@ -237,101 +280,4 @@ Only supports `appearance="inverse"`.
|
|
|
237
280
|
</auro-dropdown>
|
|
238
281
|
```
|
|
239
282
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
240
|
-
</auro-accordion>
|
|
241
|
-
|
|
242
|
-
## Triggering a fullscreen dropdown
|
|
243
|
-
This example shows how to set a dropdown fullscreen breakpoint attribute. Most consuming components use `sm` by default, but
|
|
244
|
-
dropdown supports `xs`, `sm`, `md`, `lg`, `xl` and `disabled`, with `disabled` ensuring that the dropdown will never be fullscreen.
|
|
245
|
-
|
|
246
|
-
<div class="exampleWrapper">
|
|
247
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/fullscreen.html) -->
|
|
248
|
-
<!-- The below content is automatically added from ./../apiExamples/fullscreen.html -->
|
|
249
|
-
<h3>Never fullscreen</h3>
|
|
250
|
-
<auro-dropdown id="common-never-fullscreen" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader" fullscreenBreakpoint="disabled">
|
|
251
|
-
<div style="padding: var(--ds-size-150);">
|
|
252
|
-
Lorem ipsum solar
|
|
253
|
-
<br />
|
|
254
|
-
<auro-button onclick="document.querySelector('#common-never-fullscreen').hide()">
|
|
255
|
-
Dismiss Dropdown
|
|
256
|
-
</auro-button>
|
|
257
|
-
</div>
|
|
258
|
-
<span slot="helpText">
|
|
259
|
-
Help text
|
|
260
|
-
</span>
|
|
261
|
-
<div slot="trigger">
|
|
262
|
-
Trigger
|
|
263
|
-
</div>
|
|
264
|
-
</auro-dropdown>
|
|
265
|
-
<h3>Always fullscreen</h3>
|
|
266
|
-
<auro-dropdown id="common-always-fullscreen" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader" fullscreenBreakpoint="xl">
|
|
267
|
-
<div style="padding: var(--ds-size-150);">
|
|
268
|
-
Lorem ipsum solar
|
|
269
|
-
<br />
|
|
270
|
-
<auro-button onclick="document.querySelector('#common-always-fullscreen').hide()">
|
|
271
|
-
Dismiss Dropdown
|
|
272
|
-
</auro-button>
|
|
273
|
-
</div>
|
|
274
|
-
<span slot="helpText">
|
|
275
|
-
Help text
|
|
276
|
-
</span>
|
|
277
|
-
<div slot="trigger">
|
|
278
|
-
Trigger
|
|
279
|
-
</div>
|
|
280
|
-
</auro-dropdown>
|
|
281
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
282
|
-
</div>
|
|
283
|
-
<auro-accordion alignRight>
|
|
284
|
-
<span slot="trigger">See code</span>
|
|
285
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/fullscreen.html) -->
|
|
286
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/fullscreen.html -->
|
|
287
|
-
|
|
288
|
-
```html
|
|
289
|
-
<h3>Never fullscreen</h3>
|
|
290
|
-
<auro-dropdown id="common-never-fullscreen" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader" fullscreenBreakpoint="disabled">
|
|
291
|
-
<div style="padding: var(--ds-size-150);">
|
|
292
|
-
Lorem ipsum solar
|
|
293
|
-
<br />
|
|
294
|
-
<auro-button onclick="document.querySelector('#common-never-fullscreen').hide()">
|
|
295
|
-
Dismiss Dropdown
|
|
296
|
-
</auro-button>
|
|
297
|
-
</div>
|
|
298
|
-
<span slot="helpText">
|
|
299
|
-
Help text
|
|
300
|
-
</span>
|
|
301
|
-
<div slot="trigger">
|
|
302
|
-
Trigger
|
|
303
|
-
</div>
|
|
304
|
-
</auro-dropdown>
|
|
305
|
-
<h3>Always fullscreen</h3>
|
|
306
|
-
<auro-dropdown id="common-always-fullscreen" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader" fullscreenBreakpoint="xl">
|
|
307
|
-
<div style="padding: var(--ds-size-150);">
|
|
308
|
-
Lorem ipsum solar
|
|
309
|
-
<br />
|
|
310
|
-
<auro-button onclick="document.querySelector('#common-always-fullscreen').hide()">
|
|
311
|
-
Dismiss Dropdown
|
|
312
|
-
</auro-button>
|
|
313
|
-
</div>
|
|
314
|
-
<span slot="helpText">
|
|
315
|
-
Help text
|
|
316
|
-
</span>
|
|
317
|
-
<div slot="trigger">
|
|
318
|
-
Trigger
|
|
319
|
-
</div>
|
|
320
|
-
</auro-dropdown>
|
|
321
|
-
```
|
|
322
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
323
|
-
</auro-accordion>
|
|
324
|
-
|
|
325
|
-
## Supported standard and accessible interactions
|
|
326
|
-
|
|
327
|
-
The dropdown can be opened with the following actions:
|
|
328
|
-
|
|
329
|
-
1. Clicking/tapping on the trigger.
|
|
330
|
-
1. Tabbing to the trigger and using the `enter` or `spacebar` keys.
|
|
331
|
-
1. Programmatically via another control in the UI calling the `show()` method (see api).
|
|
332
|
-
|
|
333
|
-
The dropdown can be closed with the following actions:
|
|
334
|
-
|
|
335
|
-
1. Clicking anywhere in the view outside of the dropdown.
|
|
336
|
-
1. Using the `esc` key.
|
|
337
|
-
1. Programmatically via another control in the UI calling the `hide()` method (see api).
|
|
283
|
+
</auro-accordion>
|
|
@@ -3158,7 +3158,7 @@ class AuroHelpText extends i {
|
|
|
3158
3158
|
}
|
|
3159
3159
|
}
|
|
3160
3160
|
|
|
3161
|
-
var formkitVersion = '
|
|
3161
|
+
var formkitVersion = '202601271813';
|
|
3162
3162
|
|
|
3163
3163
|
class AuroElement extends i {
|
|
3164
3164
|
static get properties() {
|
|
@@ -3264,12 +3264,14 @@ class AuroElement extends i {
|
|
|
3264
3264
|
}
|
|
3265
3265
|
}
|
|
3266
3266
|
|
|
3267
|
-
// Copyright (c)
|
|
3267
|
+
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3268
3268
|
// See LICENSE in the project root for license information.
|
|
3269
3269
|
|
|
3270
3270
|
|
|
3271
|
-
|
|
3272
|
-
|
|
3271
|
+
/**
|
|
3272
|
+
* The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
|
|
3273
|
+
* @customElement auro-dropdown
|
|
3274
|
+
*
|
|
3273
3275
|
* @slot - Default slot for the popover content.
|
|
3274
3276
|
* @slot helpText - Defines the content of the helpText.
|
|
3275
3277
|
* @slot trigger - Defines the content of the trigger.
|
|
@@ -3305,7 +3307,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3305
3307
|
/** @private */
|
|
3306
3308
|
this.bibElement = e();
|
|
3307
3309
|
|
|
3308
|
-
this.
|
|
3310
|
+
this._intializeDefaults();
|
|
3309
3311
|
}
|
|
3310
3312
|
|
|
3311
3313
|
/**
|
|
@@ -3326,7 +3328,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3326
3328
|
* @private
|
|
3327
3329
|
* @returns {void} Internal defaults.
|
|
3328
3330
|
*/
|
|
3329
|
-
|
|
3331
|
+
_intializeDefaults() {
|
|
3330
3332
|
this.appearance = 'default';
|
|
3331
3333
|
this.chevron = false;
|
|
3332
3334
|
this.disabled = false;
|
|
@@ -3447,9 +3449,18 @@ class AuroDropdown extends AuroElement {
|
|
|
3447
3449
|
static get properties() {
|
|
3448
3450
|
return {
|
|
3449
3451
|
|
|
3452
|
+
/**
|
|
3453
|
+
* The value for the role attribute of the trigger element.
|
|
3454
|
+
*/
|
|
3455
|
+
a11yRole: {
|
|
3456
|
+
type: String || undefined,
|
|
3457
|
+
attribute: false,
|
|
3458
|
+
reflect: false
|
|
3459
|
+
},
|
|
3460
|
+
|
|
3450
3461
|
/**
|
|
3451
3462
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
3452
|
-
* @
|
|
3463
|
+
* @type {'default' | 'inverse'}
|
|
3453
3464
|
* @default 'default'
|
|
3454
3465
|
*/
|
|
3455
3466
|
appearance: {
|
|
@@ -3459,7 +3470,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3459
3470
|
|
|
3460
3471
|
/**
|
|
3461
3472
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
3462
|
-
* @default false
|
|
3463
3473
|
*/
|
|
3464
3474
|
autoPlacement: {
|
|
3465
3475
|
type: Boolean,
|
|
@@ -3468,7 +3478,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3468
3478
|
|
|
3469
3479
|
/**
|
|
3470
3480
|
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
3471
|
-
* @default false
|
|
3472
3481
|
*/
|
|
3473
3482
|
disableEventShow: {
|
|
3474
3483
|
type: Boolean,
|
|
@@ -3485,11 +3494,11 @@ class AuroDropdown extends AuroElement {
|
|
|
3485
3494
|
|
|
3486
3495
|
/**
|
|
3487
3496
|
* If declared, the dropdown displays a chevron on the right.
|
|
3488
|
-
* @attr {Boolean} chevron
|
|
3489
3497
|
*/
|
|
3490
3498
|
chevron: {
|
|
3491
3499
|
type: Boolean,
|
|
3492
|
-
reflect: true
|
|
3500
|
+
reflect: true,
|
|
3501
|
+
attribute: 'chevron'
|
|
3493
3502
|
},
|
|
3494
3503
|
|
|
3495
3504
|
/**
|
|
@@ -3526,7 +3535,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3526
3535
|
},
|
|
3527
3536
|
|
|
3528
3537
|
/**
|
|
3529
|
-
* If declared
|
|
3538
|
+
* If declared, will apply error UI to the dropdown.
|
|
3530
3539
|
*/
|
|
3531
3540
|
error: {
|
|
3532
3541
|
type: Boolean,
|
|
@@ -3581,18 +3590,28 @@ class AuroDropdown extends AuroElement {
|
|
|
3581
3590
|
},
|
|
3582
3591
|
|
|
3583
3592
|
/**
|
|
3584
|
-
* Defines the screen size breakpoint
|
|
3585
|
-
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3593
|
+
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3586
3594
|
*
|
|
3587
3595
|
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3588
3596
|
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3589
|
-
* @
|
|
3597
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
3598
|
+
* @default 'sm'
|
|
3590
3599
|
*/
|
|
3591
3600
|
fullscreenBreakpoint: {
|
|
3592
3601
|
type: String,
|
|
3593
3602
|
reflect: true
|
|
3594
3603
|
},
|
|
3595
3604
|
|
|
3605
|
+
/**
|
|
3606
|
+
* Sets the layout of the dropdown.
|
|
3607
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
3608
|
+
* @default 'classic'
|
|
3609
|
+
*/
|
|
3610
|
+
layout: {
|
|
3611
|
+
type: String,
|
|
3612
|
+
reflect: true
|
|
3613
|
+
},
|
|
3614
|
+
|
|
3596
3615
|
/**
|
|
3597
3616
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
3598
3617
|
* @private
|
|
@@ -3613,7 +3632,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3613
3632
|
/**
|
|
3614
3633
|
* If declared, the bib will NOT flip to an alternate position
|
|
3615
3634
|
* when there isn't enough space in the specified `placement`.
|
|
3616
|
-
* @default false
|
|
3617
3635
|
*/
|
|
3618
3636
|
noFlip: {
|
|
3619
3637
|
type: Boolean,
|
|
@@ -3622,7 +3640,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3622
3640
|
|
|
3623
3641
|
/**
|
|
3624
3642
|
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
3625
|
-
* @default false
|
|
3626
3643
|
*/
|
|
3627
3644
|
shift: {
|
|
3628
3645
|
type: Boolean,
|
|
@@ -3655,7 +3672,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3655
3672
|
},
|
|
3656
3673
|
|
|
3657
3674
|
/**
|
|
3658
|
-
* DEPRECATED - use `appearance` instead.
|
|
3675
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
3659
3676
|
*/
|
|
3660
3677
|
onDark: {
|
|
3661
3678
|
type: Boolean,
|
|
@@ -3672,7 +3689,8 @@ class AuroDropdown extends AuroElement {
|
|
|
3672
3689
|
|
|
3673
3690
|
/**
|
|
3674
3691
|
* Position where the bib should appear relative to the trigger.
|
|
3675
|
-
* @
|
|
3692
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
3693
|
+
* @default 'bottom-start'
|
|
3676
3694
|
*/
|
|
3677
3695
|
placement: {
|
|
3678
3696
|
type: String,
|
|
@@ -3684,15 +3702,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3684
3702
|
*/
|
|
3685
3703
|
tabIndex: {
|
|
3686
3704
|
type: Number
|
|
3687
|
-
},
|
|
3688
|
-
|
|
3689
|
-
/**
|
|
3690
|
-
* The value for the role attribute of the trigger element.
|
|
3691
|
-
*/
|
|
3692
|
-
a11yRole: {
|
|
3693
|
-
type: String || undefined,
|
|
3694
|
-
attribute: false,
|
|
3695
|
-
reflect: false
|
|
3696
3705
|
}
|
|
3697
3706
|
};
|
|
3698
3707
|
}
|
|
@@ -3719,7 +3728,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3719
3728
|
|
|
3720
3729
|
/**
|
|
3721
3730
|
* This will register this element with the browser.
|
|
3722
|
-
* @param {string} [name="auro-dropdown"] - The name of element that you want to register
|
|
3731
|
+
* @param {string} [name="auro-dropdown"] - The name of the element that you want to register.
|
|
3723
3732
|
*
|
|
3724
3733
|
* @example
|
|
3725
3734
|
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|
|
@@ -48,10 +48,9 @@
|
|
|
48
48
|
Prism.highlightAll();
|
|
49
49
|
})
|
|
50
50
|
</script>
|
|
51
|
-
<script type="module">
|
|
52
|
-
import { initExamples } from "./index.min.js";
|
|
51
|
+
<script src="./index.min.js" data-demo-script="true" type="module"></script>
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-accordion@latest/+esm" type="module"></script>
|
|
56
55
|
</body>
|
|
57
56
|
</html>
|