@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
|
@@ -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>
|
|
@@ -18,6 +18,7 @@ The following sections are editable by making changes to the following files:
|
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Select
|
|
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
|
`<auro-select>` is a combination <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements">HTML custom element</auro-hyperlink> that consists of a pre-defined trigger element, `<auro-menu>` for the panel content. The `<auro-select>` element presents a menu of options. The options within the menu are represented by `<auro-menu>` and `<auro-menuoption>` elements. You can pre-select options for the user with the `selected` attribute as part of the `<auro-menuoption>` API.
|
|
@@ -27,7 +28,15 @@ The following sections are editable by making changes to the following files:
|
|
|
27
28
|
<!-- 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. -->
|
|
28
29
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
30
|
|
|
31
|
+
## Select Use Cases
|
|
32
|
+
|
|
33
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
34
|
+
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
|
+
See description.
|
|
36
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
37
|
+
|
|
30
38
|
## Getting Started
|
|
39
|
+
|
|
31
40
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
32
41
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
33
42
|
|
|
@@ -40,30 +49,7 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
40
49
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
41
50
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
42
51
|
|
|
43
|
-
###
|
|
44
|
-
|
|
45
|
-
#### Automatic Registration
|
|
46
|
-
|
|
47
|
-
For automatic registration, simply import the component:
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
// Registers <auro-select> automatically
|
|
51
|
-
import '@aurodesignsystem/auro-formkit/auro-select';
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
#### Custom Registration
|
|
55
|
-
|
|
56
|
-
To protect from versioning conflicts with other instances of the component being loaded, it is recommended to use our static `AuroSelect.register('custom-select')` method on the component class and pass in a unique name.
|
|
57
|
-
|
|
58
|
-
```javascript
|
|
59
|
-
// Import the class only
|
|
60
|
-
import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
|
|
61
|
-
|
|
62
|
-
// Register with a custom name if desired
|
|
63
|
-
AuroSelect.register('custom-select');
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### TypeScript Module Resolution
|
|
52
|
+
### TypeScript Module Resolution
|
|
67
53
|
|
|
68
54
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
69
55
|
|
|
@@ -76,37 +62,10 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
|
|
|
76
62
|
```
|
|
77
63
|
|
|
78
64
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
79
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
|
-
**Reference component in HTML**
|
|
81
|
-
|
|
82
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
83
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
84
|
-
|
|
85
|
-
```html
|
|
86
|
-
<auro-select>
|
|
87
|
-
<span slot="ariaLabel.bib.close">Close Popup</span>
|
|
88
|
-
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
89
|
-
<span slot="label">Select Example</span>
|
|
90
|
-
<auro-menu>
|
|
91
|
-
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
92
|
-
<auro-menuoption value="price">Price</auro-menuoption>
|
|
93
|
-
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
94
|
-
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
95
|
-
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
96
|
-
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
97
|
-
</auro-menu>
|
|
98
|
-
</auro-select>
|
|
99
|
-
```
|
|
100
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
101
|
-
|
|
102
|
-
### Design Token CSS Custom Property dependency
|
|
103
|
-
|
|
104
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
105
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
106
|
-
|
|
107
65
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
108
66
|
|
|
109
67
|
## Install from CDN
|
|
68
|
+
|
|
110
69
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
111
70
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
112
71
|
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.
|
|
@@ -116,19 +75,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
116
75
|
```
|
|
117
76
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
118
77
|
|
|
119
|
-
##
|
|
120
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
121
|
-
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
122
|
-
|
|
123
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
124
|
-
|
|
125
|
-
## auro-select use cases
|
|
126
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
127
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
128
|
-
See description.
|
|
129
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
130
|
-
|
|
131
|
-
## Formkit development
|
|
78
|
+
## Formkit Development
|
|
132
79
|
|
|
133
80
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
134
81
|
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
@@ -142,4 +89,60 @@ To only develop a single component, use the `--filter` flag:
|
|
|
142
89
|
```shell
|
|
143
90
|
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
144
91
|
```
|
|
92
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
93
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
94
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
95
|
+
|
|
96
|
+
## Custom Component Registration for Version Management
|
|
97
|
+
|
|
98
|
+
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.
|
|
99
|
+
|
|
100
|
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
101
|
+
|
|
102
|
+
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.
|
|
103
|
+
|
|
104
|
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
// Import the class only
|
|
108
|
+
import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
|
|
109
|
+
|
|
110
|
+
// Register with a custom name if desired
|
|
111
|
+
AuroSelect.register('custom-select');
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This will create a new custom element `<custom-select>` that behaves exactly like `<auro-select>`, allowing both to coexist on the same page without interfering with each other.
|
|
115
|
+
|
|
116
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
117
|
+
<custom-select placeholder="Placeholder Text">
|
|
118
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
119
|
+
<span slot="label">Label</span>
|
|
120
|
+
<auro-menu>
|
|
121
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
122
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
123
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
124
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
125
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
126
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
127
|
+
</auro-menu>
|
|
128
|
+
</custom-select>
|
|
129
|
+
</div>
|
|
130
|
+
<auro-accordion alignRight>
|
|
131
|
+
<span slot="trigger">See code</span>
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<custom-select placeholder="Placeholder Text">
|
|
135
|
+
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
136
|
+
<span slot="label">Label</span>
|
|
137
|
+
<auro-menu>
|
|
138
|
+
<auro-menuoption value="stops">Stops</auro-menuoption>
|
|
139
|
+
<auro-menuoption value="price">Price</auro-menuoption>
|
|
140
|
+
<auro-menuoption value="duration">Duration</auro-menuoption>
|
|
141
|
+
<auro-menuoption value="departure">Departure</auro-menuoption>
|
|
142
|
+
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
143
|
+
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
144
|
+
</auro-menu>
|
|
145
|
+
</custom-select>
|
|
146
|
+
```
|
|
147
|
+
</auro-accordion>
|
|
145
148
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The auro-select element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
2
|
+
* The `auro-select` element is a wrapper for auro-dropdown and auro-menu to create a dropdown menu control.
|
|
3
|
+
* @customElement auro-select
|
|
3
4
|
*
|
|
4
5
|
* @slot - Default slot for the menu content.
|
|
5
6
|
* @slot ariaLabel.bib.close - Sets aria-label on close button in fullscreen bib
|
|
@@ -12,21 +13,24 @@
|
|
|
12
13
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
13
14
|
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
14
15
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
15
|
-
*
|
|
16
16
|
* @csspart dropdownTrigger - Apply CSS to the trigger content container.
|
|
17
17
|
* @csspart dropdownChevron - Apply CSS to the collapsed/expanded state icon container.
|
|
18
|
-
* @csspart dropdownSize - Apply size styles to the dropdown bib
|
|
18
|
+
* @csspart dropdownSize - Apply size styles to the dropdown bib (height, width, maxHeight, maxWidth only).
|
|
19
19
|
* @csspart helpText - Apply CSS to the help text.
|
|
20
20
|
*/
|
|
21
21
|
export class AuroSelect extends AuroElement {
|
|
22
22
|
static get properties(): {
|
|
23
23
|
/**
|
|
24
24
|
* Defines whether the component will be on lighter or darker backgrounds.
|
|
25
|
-
* @
|
|
25
|
+
* @type {'default' | 'inverse'}
|
|
26
26
|
* @default 'default'
|
|
27
27
|
*/
|
|
28
|
-
appearance:
|
|
29
|
-
|
|
28
|
+
appearance: "default" | "inverse";
|
|
29
|
+
/**
|
|
30
|
+
* If declared, bib's position will be automatically calculated where to appear.
|
|
31
|
+
*/
|
|
32
|
+
autoPlacement: {
|
|
33
|
+
type: BooleanConstructor;
|
|
30
34
|
reflect: boolean;
|
|
31
35
|
};
|
|
32
36
|
/**
|
|
@@ -37,24 +41,23 @@ export class AuroSelect extends AuroElement {
|
|
|
37
41
|
reflect: boolean;
|
|
38
42
|
};
|
|
39
43
|
/**
|
|
40
|
-
*
|
|
44
|
+
* When attribute is present, element shows disabled state.
|
|
41
45
|
*/
|
|
42
|
-
|
|
46
|
+
disabled: {
|
|
43
47
|
type: BooleanConstructor;
|
|
44
48
|
reflect: boolean;
|
|
45
49
|
};
|
|
46
50
|
/**
|
|
47
|
-
*
|
|
48
|
-
* @default false
|
|
51
|
+
* When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
49
52
|
*/
|
|
50
|
-
|
|
51
|
-
type:
|
|
53
|
+
error: {
|
|
54
|
+
type: StringConstructor;
|
|
52
55
|
reflect: boolean;
|
|
53
56
|
};
|
|
54
57
|
/**
|
|
55
|
-
*
|
|
58
|
+
* If declared, make the width of the bib match the width of the content, rather than the trigger.
|
|
56
59
|
*/
|
|
57
|
-
|
|
60
|
+
flexMenuWidth: {
|
|
58
61
|
type: BooleanConstructor;
|
|
59
62
|
reflect: boolean;
|
|
60
63
|
};
|
|
@@ -66,36 +69,42 @@ export class AuroSelect extends AuroElement {
|
|
|
66
69
|
reflect: boolean;
|
|
67
70
|
};
|
|
68
71
|
/**
|
|
69
|
-
*
|
|
72
|
+
* If declared, the label and value will be visually hidden and the displayValue will render 100% of the time.
|
|
70
73
|
*/
|
|
71
|
-
|
|
74
|
+
forceDisplayValue: {
|
|
72
75
|
type: BooleanConstructor;
|
|
73
76
|
reflect: boolean;
|
|
74
77
|
};
|
|
75
78
|
/**
|
|
76
|
-
*
|
|
79
|
+
* Defines the screen size breakpoint at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
80
|
+
*
|
|
81
|
+
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
82
|
+
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
83
|
+
* @type {'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'disabled'}
|
|
84
|
+
* @default 'sm'
|
|
77
85
|
*/
|
|
78
|
-
|
|
86
|
+
fullscreenBreakpoint: "xs" | "sm" | "md" | "lg" | "xl" | "disabled";
|
|
87
|
+
/**
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
hasDisplayValueContent: {
|
|
79
91
|
type: BooleanConstructor;
|
|
80
92
|
reflect: boolean;
|
|
93
|
+
attribute: boolean;
|
|
81
94
|
};
|
|
82
95
|
/**
|
|
83
|
-
*
|
|
96
|
+
* @private
|
|
84
97
|
*/
|
|
85
|
-
|
|
86
|
-
type:
|
|
98
|
+
hasFocus: {
|
|
99
|
+
type: BooleanConstructor;
|
|
87
100
|
reflect: boolean;
|
|
101
|
+
attribute: boolean;
|
|
88
102
|
};
|
|
89
103
|
/**
|
|
90
|
-
*
|
|
91
|
-
* at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.
|
|
92
|
-
*
|
|
93
|
-
* When expanded, the dropdown will automatically display in fullscreen mode
|
|
94
|
-
* if the screen size is equal to or smaller than the selected breakpoint.
|
|
95
|
-
* @default sm
|
|
104
|
+
* @private
|
|
96
105
|
*/
|
|
97
|
-
|
|
98
|
-
type:
|
|
106
|
+
isPopoverVisible: {
|
|
107
|
+
type: BooleanConstructor;
|
|
99
108
|
reflect: boolean;
|
|
100
109
|
};
|
|
101
110
|
/**
|
|
@@ -107,26 +116,45 @@ export class AuroSelect extends AuroElement {
|
|
|
107
116
|
reflect: boolean;
|
|
108
117
|
};
|
|
109
118
|
/**
|
|
110
|
-
*
|
|
119
|
+
* Determines the overall layout of the select component.
|
|
120
|
+
* @type {'classic' | 'emphasized' | 'snowflake'}
|
|
121
|
+
* @default 'classic'
|
|
111
122
|
*/
|
|
112
|
-
|
|
123
|
+
layout: "classic" | "emphasized" | "snowflake";
|
|
124
|
+
/**
|
|
125
|
+
* If declared, the popover and trigger will be set to the same width.
|
|
126
|
+
*/
|
|
127
|
+
matchWidth: {
|
|
113
128
|
type: BooleanConstructor;
|
|
114
129
|
reflect: boolean;
|
|
115
130
|
};
|
|
116
131
|
/**
|
|
117
|
-
*
|
|
118
|
-
* when there isn't enough space in the specified `placement`.
|
|
119
|
-
* @default false
|
|
132
|
+
* Sets multi-select mode, allowing multiple options to be selected at once.
|
|
120
133
|
*/
|
|
121
|
-
|
|
134
|
+
multiSelect: {
|
|
122
135
|
type: BooleanConstructor;
|
|
123
136
|
reflect: boolean;
|
|
137
|
+
attribute: string;
|
|
124
138
|
};
|
|
125
139
|
/**
|
|
126
|
-
*
|
|
127
|
-
* @default false
|
|
140
|
+
* The name for the select element.
|
|
128
141
|
*/
|
|
129
|
-
|
|
142
|
+
name: {
|
|
143
|
+
type: StringConstructor;
|
|
144
|
+
reflect: boolean;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* When true, checkmark on selected option will no longer be present.
|
|
148
|
+
*/
|
|
149
|
+
noCheckmark: {
|
|
150
|
+
type: BooleanConstructor;
|
|
151
|
+
reflect: boolean;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* If declared, the bib will NOT flip to an alternate position
|
|
155
|
+
* when there isn't enough space in the specified `placement`.
|
|
156
|
+
*/
|
|
157
|
+
noFlip: {
|
|
130
158
|
type: BooleanConstructor;
|
|
131
159
|
reflect: boolean;
|
|
132
160
|
};
|
|
@@ -146,30 +174,24 @@ export class AuroSelect extends AuroElement {
|
|
|
146
174
|
reflect: boolean;
|
|
147
175
|
};
|
|
148
176
|
/**
|
|
149
|
-
* DEPRECATED - use `appearance` instead.
|
|
177
|
+
* DEPRECATED - use `appearance="inverse"` instead.
|
|
150
178
|
*/
|
|
151
179
|
onDark: {
|
|
152
180
|
type: BooleanConstructor;
|
|
153
181
|
reflect: boolean;
|
|
154
182
|
};
|
|
183
|
+
/**
|
|
184
|
+
* @private
|
|
185
|
+
*/
|
|
186
|
+
options: {
|
|
187
|
+
type: ArrayConstructor;
|
|
188
|
+
state: boolean;
|
|
189
|
+
};
|
|
155
190
|
/**
|
|
156
191
|
* Specifies the current selected menuOption. Default type is `HTMLElement`, changing to `Array<HTMLElement>` when `multiSelect` is true.
|
|
157
192
|
* @type {HTMLElement|Array<HTMLElement>}
|
|
158
193
|
*/
|
|
159
194
|
optionSelected: HTMLElement | Array<HTMLElement>;
|
|
160
|
-
/**
|
|
161
|
-
* Position where the bib should appear relative to the trigger.
|
|
162
|
-
* Accepted values:
|
|
163
|
-
* "top" | "right" | "bottom" | "left" |
|
|
164
|
-
* "bottom-start" | "top-start" | "top-end" |
|
|
165
|
-
* "right-start" | "right-end" | "bottom-end" |
|
|
166
|
-
* "left-start" | "left-end".
|
|
167
|
-
* @default bottom-start
|
|
168
|
-
*/
|
|
169
|
-
placement: {
|
|
170
|
-
type: StringConstructor;
|
|
171
|
-
reflect: boolean;
|
|
172
|
-
};
|
|
173
195
|
/**
|
|
174
196
|
* Define custom placeholder text.
|
|
175
197
|
*/
|
|
@@ -177,6 +199,12 @@ export class AuroSelect extends AuroElement {
|
|
|
177
199
|
type: StringConstructor;
|
|
178
200
|
reflect: boolean;
|
|
179
201
|
};
|
|
202
|
+
/**
|
|
203
|
+
* Position where the bib should appear relative to the trigger.
|
|
204
|
+
* @type {'top' | 'right' | 'bottom' | 'left' | 'bottom-start' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-end' | 'left-start' | 'left-end'}
|
|
205
|
+
* @default 'bottom-start'
|
|
206
|
+
*/
|
|
207
|
+
placement: "top" | "right" | "bottom" | "left" | "bottom-start" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-end" | "left-start" | "left-end";
|
|
180
208
|
/**
|
|
181
209
|
* Populates the `required` attribute on the element. Used for client-side validation.
|
|
182
210
|
*/
|
|
@@ -184,13 +212,6 @@ export class AuroSelect extends AuroElement {
|
|
|
184
212
|
type: BooleanConstructor;
|
|
185
213
|
reflect: boolean;
|
|
186
214
|
};
|
|
187
|
-
/**
|
|
188
|
-
* When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value.
|
|
189
|
-
*/
|
|
190
|
-
error: {
|
|
191
|
-
type: StringConstructor;
|
|
192
|
-
reflect: boolean;
|
|
193
|
-
};
|
|
194
215
|
/**
|
|
195
216
|
* Sets a custom help text message to display for all validityStates.
|
|
196
217
|
*/
|
|
@@ -210,57 +231,45 @@ export class AuroSelect extends AuroElement {
|
|
|
210
231
|
type: StringConstructor;
|
|
211
232
|
};
|
|
212
233
|
/**
|
|
213
|
-
*
|
|
234
|
+
* Determines the shape of the dropdown bib.
|
|
235
|
+
* @type {'classic' | 'pill' | 'pill-left' | 'pill-right' | 'snowflake'}
|
|
214
236
|
*/
|
|
215
|
-
|
|
216
|
-
type: StringConstructor;
|
|
217
|
-
reflect: boolean;
|
|
218
|
-
};
|
|
219
|
-
/**
|
|
220
|
-
* Value selected for the component.
|
|
221
|
-
*/
|
|
222
|
-
value: {
|
|
223
|
-
type: StringConstructor;
|
|
224
|
-
reflect: boolean;
|
|
225
|
-
attribute: string;
|
|
226
|
-
};
|
|
237
|
+
shape: "classic" | "pill" | "pill-left" | "pill-right" | "snowflake";
|
|
227
238
|
/**
|
|
228
|
-
*
|
|
239
|
+
* If set, the dropdown will shift its position to avoid being cut off by the viewport.
|
|
229
240
|
*/
|
|
230
|
-
|
|
241
|
+
shift: {
|
|
231
242
|
type: BooleanConstructor;
|
|
232
243
|
reflect: boolean;
|
|
233
|
-
attribute: string;
|
|
234
244
|
};
|
|
235
245
|
/**
|
|
236
|
-
*
|
|
237
|
-
* @type {
|
|
238
|
-
* @default false
|
|
239
|
-
* @private
|
|
246
|
+
* Determines the size of the dropdown bib. Only the `emphasized` layout supports size=`xl`, while all other layouts support size=`lg`.
|
|
247
|
+
* @type {'lg' | 'xl'}
|
|
240
248
|
*/
|
|
241
|
-
|
|
249
|
+
size: "lg" | "xl";
|
|
242
250
|
/**
|
|
251
|
+
* Indicates whether the input is in a dirty state (has been interacted with).
|
|
243
252
|
* @private
|
|
244
253
|
*/
|
|
245
|
-
|
|
254
|
+
touched: {
|
|
246
255
|
type: BooleanConstructor;
|
|
247
256
|
reflect: boolean;
|
|
248
257
|
attribute: boolean;
|
|
249
258
|
};
|
|
250
259
|
/**
|
|
251
|
-
*
|
|
260
|
+
* Specifies the `validityState` this element is in.
|
|
252
261
|
*/
|
|
253
|
-
|
|
254
|
-
type:
|
|
262
|
+
validity: {
|
|
263
|
+
type: StringConstructor;
|
|
255
264
|
reflect: boolean;
|
|
256
|
-
attribute: boolean;
|
|
257
265
|
};
|
|
258
266
|
/**
|
|
259
|
-
*
|
|
267
|
+
* Value selected for the component.
|
|
260
268
|
*/
|
|
261
|
-
|
|
262
|
-
type:
|
|
263
|
-
|
|
269
|
+
value: {
|
|
270
|
+
type: StringConstructor;
|
|
271
|
+
reflect: boolean;
|
|
272
|
+
attribute: string;
|
|
264
273
|
};
|
|
265
274
|
};
|
|
266
275
|
static get styles(): import("lit").CSSResult[];
|
|
@@ -320,7 +329,7 @@ export class AuroSelect extends AuroElement {
|
|
|
320
329
|
* @private
|
|
321
330
|
* @returns {void} Internal defaults.
|
|
322
331
|
*/
|
|
323
|
-
private
|
|
332
|
+
private _initializeDefaults;
|
|
324
333
|
appearance: string;
|
|
325
334
|
value: any;
|
|
326
335
|
fullscreenBreakpoint: string;
|