@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
|
@@ -18,6 +18,7 @@ The following sections are editable by making changes to the following files:
|
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Dropdown
|
|
21
|
+
|
|
21
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
22
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
23
24
|
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.
|
|
@@ -29,7 +30,19 @@ _Note: if the dropdown content in your implementation is not interactive (e.g. a
|
|
|
29
30
|
<!-- AURO-GENERATED-CONTENT This file is to be used for any additional content that should be included in the README.md which is specific to this component. -->
|
|
30
31
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
31
32
|
|
|
33
|
+
## Dropdown Use Cases
|
|
34
|
+
|
|
35
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
36
|
+
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
37
|
+
The `auro-dropdown` element should be used in situations where users may:
|
|
38
|
+
|
|
39
|
+
* interact with an element to get clarification on content offering
|
|
40
|
+
* provide definition to iconic imagery
|
|
41
|
+
* when interactive help is required
|
|
42
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
43
|
+
|
|
32
44
|
## Getting Started
|
|
45
|
+
|
|
33
46
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
34
47
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
35
48
|
|
|
@@ -42,30 +55,7 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
42
55
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
43
56
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
44
57
|
|
|
45
|
-
###
|
|
46
|
-
|
|
47
|
-
#### Automatic Registration
|
|
48
|
-
|
|
49
|
-
For automatic registration, simply import the component:
|
|
50
|
-
|
|
51
|
-
```javascript
|
|
52
|
-
// Registers <auro-dropdown> automatically
|
|
53
|
-
import '@aurodesignsystem/auro-formkit/auro-dropdown';
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
#### Custom Registration
|
|
57
|
-
|
|
58
|
-
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroDropdown.register('custom-dropdown')` method on the component class and pass in a unique name.
|
|
59
|
-
|
|
60
|
-
```javascript
|
|
61
|
-
// Import the class only
|
|
62
|
-
import { AuroDropdown } from '@aurodesignsystem/auro-formkit/auro-dropdown/class';
|
|
63
|
-
|
|
64
|
-
// Register with a custom name if desired
|
|
65
|
-
AuroDropdown.register('custom-dropdown');
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
#### TypeScript Module Resolution
|
|
58
|
+
### TypeScript Module Resolution
|
|
69
59
|
|
|
70
60
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
71
61
|
|
|
@@ -78,30 +68,10 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
|
|
|
78
68
|
```
|
|
79
69
|
|
|
80
70
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
81
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
82
|
-
**Reference component in HTML**
|
|
83
|
-
|
|
84
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
85
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
86
|
-
|
|
87
|
-
```html
|
|
88
|
-
<auro-dropdown aria-label="custom label">
|
|
89
|
-
Lorem ipsum solar
|
|
90
|
-
<div slot="trigger">
|
|
91
|
-
Trigger
|
|
92
|
-
</div>
|
|
93
|
-
</auro-dropdown>
|
|
94
|
-
```
|
|
95
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
|
-
|
|
97
|
-
### Design Token CSS Custom Property dependency
|
|
98
|
-
|
|
99
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
100
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
101
|
-
|
|
102
71
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
103
72
|
|
|
104
73
|
## Install from CDN
|
|
74
|
+
|
|
105
75
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
106
76
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
107
77
|
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,23 +81,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
111
81
|
```
|
|
112
82
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
83
|
|
|
114
|
-
##
|
|
115
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
116
|
-
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
117
|
-
|
|
118
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
119
|
-
|
|
120
|
-
## auro-dropdown use cases
|
|
121
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
122
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
123
|
-
The `auro-dropdown` element should be used in situations where users may:
|
|
124
|
-
|
|
125
|
-
* interact with an element to get clarification on content offering
|
|
126
|
-
* provide definition to iconic imagery
|
|
127
|
-
* when interactive help is required
|
|
128
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
|
-
|
|
130
|
-
## Formkit development
|
|
84
|
+
## Formkit Development
|
|
131
85
|
|
|
132
86
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
133
87
|
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
@@ -141,4 +95,66 @@ To only develop a single component, use the `--filter` flag:
|
|
|
141
95
|
```shell
|
|
142
96
|
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
143
97
|
```
|
|
98
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
99
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
100
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
101
|
+
|
|
102
|
+
## Custom Component Registration for Version Management
|
|
103
|
+
|
|
104
|
+
There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
105
|
+
|
|
106
|
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
107
|
+
|
|
108
|
+
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
|
|
109
|
+
|
|
110
|
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
// Import the class only
|
|
114
|
+
import { AuroDropdown } from '@aurodesignsystem/auro-formkit/auro-dropdown/class';
|
|
115
|
+
|
|
116
|
+
// Register with a custom name if desired
|
|
117
|
+
AuroDropdown.register('custom-dropdown');
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This will create a new custom element `<custom-dropdown>` that behaves exactly like `<auro-dropdown>`, allowing both to coexist on the same page without interfering with each other.
|
|
121
|
+
|
|
122
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
123
|
+
<custom-dropdown id="customCommon" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader">
|
|
124
|
+
<div style="padding: var(--ds-size-150);">
|
|
125
|
+
Lorem ipsum solar
|
|
126
|
+
<br />
|
|
127
|
+
<auro-button onclick="document.querySelector('#customCommon').hide()">
|
|
128
|
+
Dismiss Dropdown
|
|
129
|
+
</auro-button>
|
|
130
|
+
</div>
|
|
131
|
+
<span slot="helpText">
|
|
132
|
+
Help text
|
|
133
|
+
</span>
|
|
134
|
+
<div slot="trigger">
|
|
135
|
+
Trigger
|
|
136
|
+
</div>
|
|
137
|
+
</custom-dropdown>
|
|
138
|
+
</div>
|
|
139
|
+
<auro-accordion alignRight>
|
|
140
|
+
<span slot="trigger">See code</span>
|
|
141
|
+
|
|
142
|
+
```html
|
|
143
|
+
<custom-dropdown id="customCommon" layout="classic" shape="classic" size="lg" aria-label="Label content for screen reader">
|
|
144
|
+
<div style="padding: var(--ds-size-150);">
|
|
145
|
+
Lorem ipsum solar
|
|
146
|
+
<br />
|
|
147
|
+
<auro-button onclick="document.querySelector('#customCommon').hide()">
|
|
148
|
+
Dismiss Dropdown
|
|
149
|
+
</auro-button>
|
|
150
|
+
</div>
|
|
151
|
+
<span slot="helpText">
|
|
152
|
+
Help text
|
|
153
|
+
</span>
|
|
154
|
+
<div slot="trigger">
|
|
155
|
+
Trigger
|
|
156
|
+
</div>
|
|
157
|
+
</custom-dropdown>
|
|
158
|
+
```
|
|
159
|
+
</auro-accordion>
|
|
144
160
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -1,17 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
|
|
3
|
+
* @customElement auro-dropdown
|
|
4
|
+
*
|
|
5
|
+
* @slot - Default slot for the popover content.
|
|
6
|
+
* @slot helpText - Defines the content of the helpText.
|
|
7
|
+
* @slot trigger - Defines the content of the trigger.
|
|
8
|
+
* @csspart trigger - The trigger content container.
|
|
9
|
+
* @csspart chevron - The collapsed/expanded state icon container.
|
|
10
|
+
* @csspart size - The size of the dropdown bib. (height, width, maxHeight, maxWidth only)
|
|
11
|
+
* @csspart helpText - The helpText content container.
|
|
12
|
+
* @event auroDropdown-triggerClick - Notifies that the trigger has been clicked.
|
|
13
|
+
* @event auroDropdown-toggled - Notifies that the visibility of the dropdown bib has changed.
|
|
14
|
+
* @event auroDropdown-idAdded - Notifies consumers that the unique ID for the dropdown bib has been generated.
|
|
15
|
+
*/
|
|
1
16
|
export class AuroDropdown extends AuroElement {
|
|
2
17
|
static get properties(): {
|
|
3
18
|
/**
|
|
4
|
-
*
|
|
5
|
-
* @property {'default', 'inverse'}
|
|
6
|
-
* @default 'default'
|
|
19
|
+
* The value for the role attribute of the trigger element.
|
|
7
20
|
*/
|
|
8
|
-
|
|
21
|
+
a11yRole: {
|
|
9
22
|
type: StringConstructor;
|
|
23
|
+
attribute: boolean;
|
|
10
24
|
reflect: boolean;
|
|
11
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* Defines whether the component will be on lighter or darker backgrounds.
|
|
28
|
+
* @type {'default' | 'inverse'}
|
|
29
|
+
* @default 'default'
|
|
30
|
+
*/
|
|
31
|
+
appearance: "default" | "inverse";
|
|
12
32
|
/**
|
|
13
33
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
14
|
-
* @default false
|
|
15
34
|
*/
|
|
16
35
|
autoPlacement: {
|
|
17
36
|
type: BooleanConstructor;
|
|
@@ -19,7 +38,6 @@ export class AuroDropdown extends AuroElement {
|
|
|
19
38
|
};
|
|
20
39
|
/**
|
|
21
40
|
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
22
|
-
* @default false
|
|
23
41
|
*/
|
|
24
42
|
disableEventShow: {
|
|
25
43
|
type: BooleanConstructor;
|
|
@@ -34,11 +52,11 @@ export class AuroDropdown extends AuroElement {
|
|
|
34
52
|
};
|
|
35
53
|
/**
|
|
36
54
|
* If declared, the dropdown displays a chevron on the right.
|
|
37
|
-
* @attr {Boolean} chevron
|
|
38
55
|
*/
|
|
39
56
|
chevron: {
|
|
40
57
|
type: BooleanConstructor;
|
|
41
58
|
reflect: boolean;
|
|
59
|
+
attribute: string;
|
|
42
60
|
};
|
|
43
61
|
/**
|
|
44
62
|
* If declared, the dropdown is not interactive.
|
|
@@ -70,7 +88,7 @@ export class AuroDropdown extends AuroElement {
|
|
|
70
88
|
attribute: boolean;
|
|
71
89
|
};
|
|
72
90
|
/**
|
|
73
|
-
* If declared
|
|
91
|
+
* If declared, will apply error UI to the dropdown.
|
|
74
92
|
*/
|
|
75
93
|
error: {
|
|
76
94
|
type: BooleanConstructor;
|
|
@@ -118,17 +136,20 @@ export class AuroDropdown extends AuroElement {
|
|
|
118
136
|
type: BooleanConstructor;
|
|
119
137
|
};
|
|
120
138
|
/**
|
|
121
|
-
* Defines the screen size breakpoint
|
|
122
|
-
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
139
|
+
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
123
140
|
*
|
|
124
141
|
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
125
142
|
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
126
|
-
* @
|
|
143
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
144
|
+
* @default 'sm'
|
|
127
145
|
*/
|
|
128
|
-
fullscreenBreakpoint:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
146
|
+
fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
|
|
147
|
+
/**
|
|
148
|
+
* Sets the layout of the dropdown.
|
|
149
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
150
|
+
* @default 'classic'
|
|
151
|
+
*/
|
|
152
|
+
layout: "classic" | "emphasized" | "snowflake";
|
|
132
153
|
/**
|
|
133
154
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
134
155
|
* @private
|
|
@@ -147,7 +168,6 @@ export class AuroDropdown extends AuroElement {
|
|
|
147
168
|
/**
|
|
148
169
|
* If declared, the bib will NOT flip to an alternate position
|
|
149
170
|
* when there isn't enough space in the specified `placement`.
|
|
150
|
-
* @default false
|
|
151
171
|
*/
|
|
152
172
|
noFlip: {
|
|
153
173
|
type: BooleanConstructor;
|
|
@@ -155,7 +175,6 @@ export class AuroDropdown extends AuroElement {
|
|
|
155
175
|
};
|
|
156
176
|
/**
|
|
157
177
|
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
158
|
-
* @default false
|
|
159
178
|
*/
|
|
160
179
|
shift: {
|
|
161
180
|
type: BooleanConstructor;
|
|
@@ -184,7 +203,7 @@ export class AuroDropdown extends AuroElement {
|
|
|
184
203
|
reflect: boolean;
|
|
185
204
|
};
|
|
186
205
|
/**
|
|
187
|
-
* DEPRECATED - use `appearance` instead.
|
|
206
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
188
207
|
*/
|
|
189
208
|
onDark: {
|
|
190
209
|
type: BooleanConstructor;
|
|
@@ -199,31 +218,21 @@ export class AuroDropdown extends AuroElement {
|
|
|
199
218
|
};
|
|
200
219
|
/**
|
|
201
220
|
* Position where the bib should appear relative to the trigger.
|
|
202
|
-
* @
|
|
221
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
222
|
+
* @default 'bottom-start'
|
|
203
223
|
*/
|
|
204
|
-
placement:
|
|
205
|
-
type: StringConstructor;
|
|
206
|
-
reflect: boolean;
|
|
207
|
-
};
|
|
224
|
+
placement: "top" | "right" | "bottom" | "left" | "bottom-start" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "left-start" | "left-end";
|
|
208
225
|
/**
|
|
209
226
|
* @private
|
|
210
227
|
*/
|
|
211
228
|
tabIndex: {
|
|
212
229
|
type: NumberConstructor;
|
|
213
230
|
};
|
|
214
|
-
/**
|
|
215
|
-
* The value for the role attribute of the trigger element.
|
|
216
|
-
*/
|
|
217
|
-
a11yRole: {
|
|
218
|
-
type: StringConstructor;
|
|
219
|
-
attribute: boolean;
|
|
220
|
-
reflect: boolean;
|
|
221
|
-
};
|
|
222
231
|
};
|
|
223
232
|
static get styles(): import("lit").CSSResult[];
|
|
224
233
|
/**
|
|
225
234
|
* This will register this element with the browser.
|
|
226
|
-
* @param {string} [name="auro-dropdown"] - The name of element that you want to register
|
|
235
|
+
* @param {string} [name="auro-dropdown"] - The name of the element that you want to register.
|
|
227
236
|
*
|
|
228
237
|
* @example
|
|
229
238
|
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|
|
@@ -256,7 +265,7 @@ export class AuroDropdown extends AuroElement {
|
|
|
256
265
|
* @private
|
|
257
266
|
* @returns {void} Internal defaults.
|
|
258
267
|
*/
|
|
259
|
-
private
|
|
268
|
+
private _intializeDefaults;
|
|
260
269
|
appearance: string;
|
|
261
270
|
chevron: boolean;
|
|
262
271
|
disabled: boolean;
|
|
@@ -3094,7 +3094,7 @@ class AuroHelpText extends LitElement {
|
|
|
3094
3094
|
}
|
|
3095
3095
|
}
|
|
3096
3096
|
|
|
3097
|
-
var formkitVersion = '
|
|
3097
|
+
var formkitVersion = '202601271813';
|
|
3098
3098
|
|
|
3099
3099
|
class AuroElement extends LitElement {
|
|
3100
3100
|
static get properties() {
|
|
@@ -3200,12 +3200,14 @@ class AuroElement extends LitElement {
|
|
|
3200
3200
|
}
|
|
3201
3201
|
}
|
|
3202
3202
|
|
|
3203
|
-
// Copyright (c)
|
|
3203
|
+
// Copyright (c) 2026 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license
|
|
3204
3204
|
// See LICENSE in the project root for license information.
|
|
3205
3205
|
|
|
3206
3206
|
|
|
3207
|
-
|
|
3208
|
-
|
|
3207
|
+
/**
|
|
3208
|
+
* The `auro-dropdown` element provides a way to place content in a bib that can be toggled.
|
|
3209
|
+
* @customElement auro-dropdown
|
|
3210
|
+
*
|
|
3209
3211
|
* @slot - Default slot for the popover content.
|
|
3210
3212
|
* @slot helpText - Defines the content of the helpText.
|
|
3211
3213
|
* @slot trigger - Defines the content of the trigger.
|
|
@@ -3241,7 +3243,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3241
3243
|
/** @private */
|
|
3242
3244
|
this.bibElement = createRef();
|
|
3243
3245
|
|
|
3244
|
-
this.
|
|
3246
|
+
this._intializeDefaults();
|
|
3245
3247
|
}
|
|
3246
3248
|
|
|
3247
3249
|
/**
|
|
@@ -3262,7 +3264,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3262
3264
|
* @private
|
|
3263
3265
|
* @returns {void} Internal defaults.
|
|
3264
3266
|
*/
|
|
3265
|
-
|
|
3267
|
+
_intializeDefaults() {
|
|
3266
3268
|
this.appearance = 'default';
|
|
3267
3269
|
this.chevron = false;
|
|
3268
3270
|
this.disabled = false;
|
|
@@ -3383,9 +3385,18 @@ class AuroDropdown extends AuroElement {
|
|
|
3383
3385
|
static get properties() {
|
|
3384
3386
|
return {
|
|
3385
3387
|
|
|
3388
|
+
/**
|
|
3389
|
+
* The value for the role attribute of the trigger element.
|
|
3390
|
+
*/
|
|
3391
|
+
a11yRole: {
|
|
3392
|
+
type: String || undefined,
|
|
3393
|
+
attribute: false,
|
|
3394
|
+
reflect: false
|
|
3395
|
+
},
|
|
3396
|
+
|
|
3386
3397
|
/**
|
|
3387
3398
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
3388
|
-
* @
|
|
3399
|
+
* @type {'default' | 'inverse'}
|
|
3389
3400
|
* @default 'default'
|
|
3390
3401
|
*/
|
|
3391
3402
|
appearance: {
|
|
@@ -3395,7 +3406,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3395
3406
|
|
|
3396
3407
|
/**
|
|
3397
3408
|
* If declared, bib's position will be automatically calculated where to appear.
|
|
3398
|
-
* @default false
|
|
3399
3409
|
*/
|
|
3400
3410
|
autoPlacement: {
|
|
3401
3411
|
type: Boolean,
|
|
@@ -3404,7 +3414,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3404
3414
|
|
|
3405
3415
|
/**
|
|
3406
3416
|
* If declared, the dropdown will only show by calling the API .show() public method.
|
|
3407
|
-
* @default false
|
|
3408
3417
|
*/
|
|
3409
3418
|
disableEventShow: {
|
|
3410
3419
|
type: Boolean,
|
|
@@ -3421,11 +3430,11 @@ class AuroDropdown extends AuroElement {
|
|
|
3421
3430
|
|
|
3422
3431
|
/**
|
|
3423
3432
|
* If declared, the dropdown displays a chevron on the right.
|
|
3424
|
-
* @attr {Boolean} chevron
|
|
3425
3433
|
*/
|
|
3426
3434
|
chevron: {
|
|
3427
3435
|
type: Boolean,
|
|
3428
|
-
reflect: true
|
|
3436
|
+
reflect: true,
|
|
3437
|
+
attribute: 'chevron'
|
|
3429
3438
|
},
|
|
3430
3439
|
|
|
3431
3440
|
/**
|
|
@@ -3462,7 +3471,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3462
3471
|
},
|
|
3463
3472
|
|
|
3464
3473
|
/**
|
|
3465
|
-
* If declared
|
|
3474
|
+
* If declared, will apply error UI to the dropdown.
|
|
3466
3475
|
*/
|
|
3467
3476
|
error: {
|
|
3468
3477
|
type: Boolean,
|
|
@@ -3517,18 +3526,28 @@ class AuroDropdown extends AuroElement {
|
|
|
3517
3526
|
},
|
|
3518
3527
|
|
|
3519
3528
|
/**
|
|
3520
|
-
* Defines the screen size breakpoint
|
|
3521
|
-
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3529
|
+
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
3522
3530
|
*
|
|
3523
3531
|
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
3524
3532
|
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
3525
|
-
* @
|
|
3533
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
3534
|
+
* @default 'sm'
|
|
3526
3535
|
*/
|
|
3527
3536
|
fullscreenBreakpoint: {
|
|
3528
3537
|
type: String,
|
|
3529
3538
|
reflect: true
|
|
3530
3539
|
},
|
|
3531
3540
|
|
|
3541
|
+
/**
|
|
3542
|
+
* Sets the layout of the dropdown.
|
|
3543
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
3544
|
+
* @default 'classic'
|
|
3545
|
+
*/
|
|
3546
|
+
layout: {
|
|
3547
|
+
type: String,
|
|
3548
|
+
reflect: true
|
|
3549
|
+
},
|
|
3550
|
+
|
|
3532
3551
|
/**
|
|
3533
3552
|
* Defines if the trigger should size based on the parent element providing the border UI.
|
|
3534
3553
|
* @private
|
|
@@ -3549,7 +3568,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3549
3568
|
/**
|
|
3550
3569
|
* If declared, the bib will NOT flip to an alternate position
|
|
3551
3570
|
* when there isn't enough space in the specified `placement`.
|
|
3552
|
-
* @default false
|
|
3553
3571
|
*/
|
|
3554
3572
|
noFlip: {
|
|
3555
3573
|
type: Boolean,
|
|
@@ -3558,7 +3576,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3558
3576
|
|
|
3559
3577
|
/**
|
|
3560
3578
|
* If declared, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
3561
|
-
* @default false
|
|
3562
3579
|
*/
|
|
3563
3580
|
shift: {
|
|
3564
3581
|
type: Boolean,
|
|
@@ -3591,7 +3608,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3591
3608
|
},
|
|
3592
3609
|
|
|
3593
3610
|
/**
|
|
3594
|
-
* DEPRECATED - use `appearance` instead.
|
|
3611
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
3595
3612
|
*/
|
|
3596
3613
|
onDark: {
|
|
3597
3614
|
type: Boolean,
|
|
@@ -3608,7 +3625,8 @@ class AuroDropdown extends AuroElement {
|
|
|
3608
3625
|
|
|
3609
3626
|
/**
|
|
3610
3627
|
* Position where the bib should appear relative to the trigger.
|
|
3611
|
-
* @
|
|
3628
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
3629
|
+
* @default 'bottom-start'
|
|
3612
3630
|
*/
|
|
3613
3631
|
placement: {
|
|
3614
3632
|
type: String,
|
|
@@ -3620,15 +3638,6 @@ class AuroDropdown extends AuroElement {
|
|
|
3620
3638
|
*/
|
|
3621
3639
|
tabIndex: {
|
|
3622
3640
|
type: Number
|
|
3623
|
-
},
|
|
3624
|
-
|
|
3625
|
-
/**
|
|
3626
|
-
* The value for the role attribute of the trigger element.
|
|
3627
|
-
*/
|
|
3628
|
-
a11yRole: {
|
|
3629
|
-
type: String || undefined,
|
|
3630
|
-
attribute: false,
|
|
3631
|
-
reflect: false
|
|
3632
3641
|
}
|
|
3633
3642
|
};
|
|
3634
3643
|
}
|
|
@@ -3655,7 +3664,7 @@ class AuroDropdown extends AuroElement {
|
|
|
3655
3664
|
|
|
3656
3665
|
/**
|
|
3657
3666
|
* This will register this element with the browser.
|
|
3658
|
-
* @param {string} [name="auro-dropdown"] - The name of element that you want to register
|
|
3667
|
+
* @param {string} [name="auro-dropdown"] - The name of the element that you want to register.
|
|
3659
3668
|
*
|
|
3660
3669
|
* @example
|
|
3661
3670
|
* AuroDropdown.register("custom-dropdown") // this will register this element to <custom-dropdown/>
|