@aurodesignsystem/auro-formkit 4.0.0-rc-658.1 → 4.0.0
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 +2 -13
- package/components/input/README.md +1 -1
- package/components/select/README.md +35 -35
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +64 -6
- package/components/select/demo/api.min.js +28 -11
- package/components/select/demo/index.min.js +16 -11
- package/components/select/dist/auro-select.d.ts +2 -1
- package/components/select/dist/index.js +16 -11
- package/components/select/dist/registered.js +16 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
# [4.0.0
|
|
1
|
+
# [4.0.0](https://github.com/AlaskaAirlines/auro-formkit/compare/v3.5.0...v4.0.0) (2025-06-04)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
* add type for value property on combobox ([ccbdbeb](https://github.com/AlaskaAirlines/auro-formkit/commit/ccbdbeb57f4c012c366165826b4c32cd47867854))
|
|
7
|
-
* clean up API docs for form ([409001d](https://github.com/AlaskaAirlines/auro-formkit/commit/409001d5ff7e9ba21e03fa5ac864353a209e19e3))
|
|
8
|
-
* correct command for generating PR release version in workflow ([ef32a6c](https://github.com/AlaskaAirlines/auro-formkit/commit/ef32a6c1f1288981b42ede9bcec079d282ae25cd))
|
|
9
6
|
* make the bullet of radio/checkbox to be top aligned ([ae3f0bd](https://github.com/AlaskaAirlines/auro-formkit/commit/ae3f0bd9e1d0bee2cb8264b759634af348f9157d))
|
|
10
|
-
* resolve missing type and description for optionSelected in menu ([48f12da](https://github.com/AlaskaAirlines/auro-formkit/commit/48f12da8f8dc4c5875db56b06fa20d3f928310d5))
|
|
11
|
-
* set unique id and arialabel correctly in input/checkbox/radio [#589](https://github.com/AlaskaAirlines/auro-formkit/issues/589) ([c7aa1a4](https://github.com/AlaskaAirlines/auro-formkit/commit/c7aa1a4b4f2a4ab7ff66dc494122b1c10bfff6de))
|
|
12
|
-
* zero out version number since we are no longer tracking it with the new release strategy ([ef67887](https://github.com/AlaskaAirlines/auro-formkit/commit/ef6788775bb011444ded7c359437cbf51ef4f874))
|
|
13
7
|
|
|
14
8
|
|
|
15
9
|
### Features
|
|
16
10
|
|
|
17
|
-
* add
|
|
11
|
+
* add `valueText` slot for customized label in `auro-select` [#653](https://github.com/AlaskaAirlines/auro-formkit/issues/653) ([12e1ce4](https://github.com/AlaskaAirlines/auro-formkit/commit/12e1ce443c90e6a8d5f5a85f22141633bdc9bfe5))
|
|
18
12
|
* adding cssparts on radio [#610](https://github.com/AlaskaAirlines/auro-formkit/issues/610) ([3756066](https://github.com/AlaskaAirlines/auro-formkit/commit/3756066f3ac9e53c366c447e909d37c7791e6568))
|
|
19
13
|
|
|
20
14
|
|
|
@@ -26,11 +20,6 @@
|
|
|
26
20
|
* revert changes to `value` and `optionSelected` in select [#621](https://github.com/AlaskaAirlines/auro-formkit/issues/621) ([7d9bcbc](https://github.com/AlaskaAirlines/auro-formkit/commit/7d9bcbc40acd1f670a1a8b1e8e44aa6d7c962c64))
|
|
27
21
|
|
|
28
22
|
|
|
29
|
-
### Reverts
|
|
30
|
-
|
|
31
|
-
* Revert "chore: remove unused [@event](https://github.com/event) tag for auroFormElement-validated" ([624cfa0](https://github.com/AlaskaAirlines/auro-formkit/commit/624cfa03a32f13fb41787f2538452911648cd033))
|
|
32
|
-
|
|
33
|
-
|
|
34
23
|
### BREAKING CHANGES
|
|
35
24
|
|
|
36
25
|
* `value` and `optionSelected` attributes default to type `string` and `HTMLElement` respectively.
|
|
@@ -99,7 +99,7 @@ The use of any Auro custom element has a dependency on the [Auro Design Tokens](
|
|
|
99
99
|
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.
|
|
100
100
|
|
|
101
101
|
```html
|
|
102
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@
|
|
102
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-input/+esm"></script>
|
|
103
103
|
```
|
|
104
104
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
105
105
|
|
|
@@ -15,33 +15,33 @@ The following sections are editable by making changes to the following files:
|
|
|
15
15
|
| Use Cases | Examples for when to use this component | `./docs/partials/useCases.md` |
|
|
16
16
|
| Additional Information | For use to add any component specific information | `./docs/partials/readmeAddlInfo.md` |
|
|
17
17
|
| Component Example Code | HTML sample code of the components use | `./apiExamples/basic.html` |
|
|
18
|
-
-->
|
|
19
|
-
|
|
18
|
+
-->
|
|
19
|
+
|
|
20
20
|
# Select
|
|
21
21
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
22
22
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
23
23
|
`<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.
|
|
24
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
24
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
25
25
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
26
26
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
27
27
|
<!-- 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
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
|
-
|
|
28
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
29
|
+
|
|
30
30
|
## Getting Started
|
|
31
31
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
32
|
-
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
33
|
-
|
|
32
|
+
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
33
|
+
|
|
34
34
|
#### NPM Installation
|
|
35
35
|
|
|
36
36
|
```shell
|
|
37
37
|
$ npm i @aurodesignsystem/auro-formkit
|
|
38
38
|
```
|
|
39
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
39
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
40
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
41
|
-
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
42
|
-
|
|
43
|
-
### Import Options
|
|
44
|
-
|
|
41
|
+
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
42
|
+
|
|
43
|
+
### Import Options
|
|
44
|
+
|
|
45
45
|
#### Automatic Registration
|
|
46
46
|
|
|
47
47
|
For automatic registration, simply import the component:
|
|
@@ -49,8 +49,8 @@ For automatic registration, simply import the component:
|
|
|
49
49
|
```javascript
|
|
50
50
|
// Registers <auro-select> automatically
|
|
51
51
|
import '@aurodesignsystem/auro-formkit/auro-select';
|
|
52
|
-
```
|
|
53
|
-
|
|
52
|
+
```
|
|
53
|
+
|
|
54
54
|
#### Custom Registration
|
|
55
55
|
|
|
56
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.
|
|
@@ -61,8 +61,8 @@ import { AuroSelect } from '@aurodesignsystem/auro-formkit/auro-select/class';
|
|
|
61
61
|
|
|
62
62
|
// Register with a custom name if desired
|
|
63
63
|
AuroSelect.register('custom-select');
|
|
64
|
-
```
|
|
65
|
-
|
|
64
|
+
```
|
|
65
|
+
|
|
66
66
|
#### TypeScript Module Resolution
|
|
67
67
|
|
|
68
68
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
@@ -76,12 +76,12 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
|
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
79
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
79
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
80
|
**Reference component in HTML**
|
|
81
81
|
|
|
82
82
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./apiExamples/basic.html) -->
|
|
83
|
-
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
84
|
-
|
|
83
|
+
<!-- The below code snippet is automatically added from ./apiExamples/basic.html -->
|
|
84
|
+
|
|
85
85
|
```html
|
|
86
86
|
<auro-select>
|
|
87
87
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
@@ -94,44 +94,44 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
94
94
|
<auro-menuoption value="arrival">Arrival</auro-menuoption>
|
|
95
95
|
<auro-menuoption value="prefer alaska">Prefer Alaska</auro-menuoption>
|
|
96
96
|
</auro-menu>
|
|
97
|
-
</auro-select>
|
|
98
|
-
```
|
|
99
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
100
|
-
|
|
97
|
+
</auro-select>
|
|
98
|
+
```
|
|
99
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
100
|
+
|
|
101
101
|
### Design Token CSS Custom Property dependency
|
|
102
102
|
|
|
103
103
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
104
104
|
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
105
105
|
|
|
106
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
107
|
-
|
|
106
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
107
|
+
|
|
108
108
|
## Install from CDN
|
|
109
109
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
110
110
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
111
111
|
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.
|
|
112
112
|
|
|
113
113
|
```html
|
|
114
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-select/+esm"></script>
|
|
115
|
-
```
|
|
116
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
117
|
-
|
|
114
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-select/+esm"></script>
|
|
115
|
+
```
|
|
116
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
117
|
+
|
|
118
118
|
## UI development browser support
|
|
119
119
|
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
120
120
|
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
121
121
|
|
|
122
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
123
|
-
|
|
122
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
123
|
+
|
|
124
124
|
## auro-select use cases
|
|
125
125
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
126
126
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
127
127
|
See description.
|
|
128
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
|
-
|
|
128
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
|
+
|
|
130
130
|
## Formkit development
|
|
131
131
|
|
|
132
132
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
133
|
-
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
134
|
-
|
|
133
|
+
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
134
|
+
|
|
135
135
|
### Filtering
|
|
136
136
|
|
|
137
137
|
Running the `dev` command will open a `localhost` development server for all components in the monorepo at once.
|
|
@@ -5,6 +5,7 @@ import { valueAlertExample } from "../apiExamples/valueAlert.js";
|
|
|
5
5
|
import { inDialogExample } from '../apiExamples/inDialog';
|
|
6
6
|
import { resetStateExample } from "../apiExamples/resetState";
|
|
7
7
|
import { auroMenuLoadingExample } from "../apiExamples/loading";
|
|
8
|
+
import { valueTextExample } from '../apiExamples/valueText.js';
|
|
8
9
|
|
|
9
10
|
/* eslint-disable jsdoc/require-jsdoc, no-magic-numbers, no-param-reassign */
|
|
10
11
|
import { AuroSelect } from '../src/auro-select.js';
|
|
@@ -24,6 +25,7 @@ export function initExamples(initCount) {
|
|
|
24
25
|
inDialogExample();
|
|
25
26
|
resetStateExample();
|
|
26
27
|
auroMenuLoadingExample();
|
|
28
|
+
valueTextExample();
|
|
27
29
|
} catch (err) {
|
|
28
30
|
if (initCount <= 20) {
|
|
29
31
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
@@ -48,11 +48,11 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
|
|
|
48
48
|
|
|
49
49
|
## Events
|
|
50
50
|
|
|
51
|
-
| Event | Type
|
|
52
|
-
|
|
53
|
-
| `auroFormElement-validated` |
|
|
54
|
-
| `auroSelect-valueSet` | `CustomEvent<any>`
|
|
55
|
-
| [input](#input) | `CustomEvent<any>` | Notifies every time the value prop of the element is changed. |
|
|
51
|
+
| Event | Type | Description |
|
|
52
|
+
|-----------------------------|--------------------------------------------------|--------------------------------------------------|
|
|
53
|
+
| `auroFormElement-validated` | | Notifies that the `validity` and `errorMessage` values have changed. |
|
|
54
|
+
| `auroSelect-valueSet` | `CustomEvent<any>` | Notifies that the component has a new value set. |
|
|
55
|
+
| [input](#input) | `CustomEvent<{ optionSelected: any; value: any; }>` | Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object. |
|
|
56
56
|
|
|
57
57
|
## Slots
|
|
58
58
|
|
|
@@ -62,7 +62,8 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
|
|
|
62
62
|
| `bib.fullscreen.headline` | Defines the headline to display above menu-options |
|
|
63
63
|
| [helpText](#helpText) | Defines the content of the helpText. |
|
|
64
64
|
| [label](#label) | Defines the content of the label. |
|
|
65
|
-
| [placeholder](#placeholder) | Defines the content of the placeholder to be shown when there is no value |
|
|
65
|
+
| [placeholder](#placeholder) | Defines the content of the placeholder to be shown when there is no value |
|
|
66
|
+
| [valueText](#valueText) | Dropdown value text display. |
|
|
66
67
|
|
|
67
68
|
## CSS Shadow Parts
|
|
68
69
|
|
|
@@ -1033,6 +1034,63 @@ export function auroMenuLoadingExample() {
|
|
|
1033
1034
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1034
1035
|
</auro-accordion>
|
|
1035
1036
|
|
|
1037
|
+
### valueText <a name="valueText"></a>
|
|
1038
|
+
The label for selected option can be customized using `valueText` slot.
|
|
1039
|
+
This slot can be manipulated on the `input` event which delivers the new value and selected `auro-menuoption` element in the `detail` object.
|
|
1040
|
+
|
|
1041
|
+
<div class="exampleWrapper">
|
|
1042
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/valueText.html) -->
|
|
1043
|
+
<!-- The below content is automatically added from ./../apiExamples/valueText.html -->
|
|
1044
|
+
<auro-select id="valueTextExample" autocomplete="address-level1">
|
|
1045
|
+
<span slot="bib.fullscreen.headline">Select Your Gender</span>
|
|
1046
|
+
<span slot="label">Gender</span>
|
|
1047
|
+
<span slot="valueText"></span>
|
|
1048
|
+
<auro-menu>
|
|
1049
|
+
<auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
|
|
1050
|
+
<auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
|
|
1051
|
+
<auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
|
|
1052
|
+
<auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
|
|
1053
|
+
</auro-menu>
|
|
1054
|
+
</auro-select>
|
|
1055
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1056
|
+
</div>
|
|
1057
|
+
<auro-accordion alignRight>
|
|
1058
|
+
<span slot="trigger">See code</span>
|
|
1059
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.js) -->
|
|
1060
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/valueText.js -->
|
|
1061
|
+
|
|
1062
|
+
```js
|
|
1063
|
+
export function valueTextExample() {
|
|
1064
|
+
const onValueTextSelectInput = (e) => {
|
|
1065
|
+
const valueText = e.target.querySelector("[slot=valueText]");
|
|
1066
|
+
|
|
1067
|
+
valueText.textContent = e.detail.optionSelected.dataset.display;
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
const select = document.querySelector("#valueTextExample");
|
|
1071
|
+
select.addEventListener('input', onValueTextSelectInput);
|
|
1072
|
+
}
|
|
1073
|
+
```
|
|
1074
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1075
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.html) -->
|
|
1076
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/valueText.html -->
|
|
1077
|
+
|
|
1078
|
+
```html
|
|
1079
|
+
<auro-select id="valueTextExample" autocomplete="address-level1">
|
|
1080
|
+
<span slot="bib.fullscreen.headline">Select Your Gender</span>
|
|
1081
|
+
<span slot="label">Gender</span>
|
|
1082
|
+
<span slot="valueText"></span>
|
|
1083
|
+
<auro-menu>
|
|
1084
|
+
<auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
|
|
1085
|
+
<auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
|
|
1086
|
+
<auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
|
|
1087
|
+
<auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
|
|
1088
|
+
</auro-menu>
|
|
1089
|
+
</auro-select>
|
|
1090
|
+
```
|
|
1091
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1092
|
+
</auro-accordion>
|
|
1093
|
+
|
|
1036
1094
|
### Customized bib position
|
|
1037
1095
|
The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
|
|
1038
1096
|
|
|
@@ -90,6 +90,17 @@ function auroMenuLoadingExample() {
|
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
function valueTextExample() {
|
|
94
|
+
const onValueTextSelectInput = (e) => {
|
|
95
|
+
const valueText = e.target.querySelector("[slot=valueText]");
|
|
96
|
+
|
|
97
|
+
valueText.textContent = e.detail.optionSelected.dataset.display;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const select = document.querySelector("#valueTextExample");
|
|
101
|
+
select.addEventListener('input', onValueTextSelectInput);
|
|
102
|
+
}
|
|
103
|
+
|
|
93
104
|
/**
|
|
94
105
|
* @license
|
|
95
106
|
* Copyright 2019 Google LLC
|
|
@@ -5537,8 +5548,9 @@ var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
5537
5548
|
* @slot label - Defines the content of the label.
|
|
5538
5549
|
* @slot helpText - Defines the content of the helpText.
|
|
5539
5550
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
5551
|
+
* @slot valueText - Dropdown value text display.
|
|
5540
5552
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
5541
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
5553
|
+
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
5542
5554
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
5543
5555
|
* @csspart helpText - Apply CSS to the help text.
|
|
5544
5556
|
*/
|
|
@@ -5880,12 +5892,8 @@ class AuroSelect extends i$2 {
|
|
|
5880
5892
|
updateDisplayedValue() {
|
|
5881
5893
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
5882
5894
|
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
triggerContentEl.innerHTML = '';
|
|
5886
|
-
if (placeholder) {
|
|
5887
|
-
triggerContentEl.appendChild(placeholder);
|
|
5888
|
-
}
|
|
5895
|
+
const valueText = triggerContentEl.querySelector("#valueText");
|
|
5896
|
+
valueText.textContent = '';
|
|
5889
5897
|
|
|
5890
5898
|
// Handle selected options
|
|
5891
5899
|
if (this.optionSelected) {
|
|
@@ -5898,9 +5906,7 @@ class AuroSelect extends i$2 {
|
|
|
5898
5906
|
displayText = this.optionSelected.textContent;
|
|
5899
5907
|
}
|
|
5900
5908
|
|
|
5901
|
-
|
|
5902
|
-
span.textContent = displayText;
|
|
5903
|
-
triggerContentEl.appendChild(span);
|
|
5909
|
+
valueText.textContent = displayText;
|
|
5904
5910
|
}
|
|
5905
5911
|
|
|
5906
5912
|
this.dropdown.requestUpdate();
|
|
@@ -6229,6 +6235,10 @@ class AuroSelect extends i$2 {
|
|
|
6229
6235
|
bubbles: true,
|
|
6230
6236
|
cancelable: true,
|
|
6231
6237
|
composed: true,
|
|
6238
|
+
detail: {
|
|
6239
|
+
optionSelected: this.optionSelected,
|
|
6240
|
+
value: this.value
|
|
6241
|
+
}
|
|
6232
6242
|
}));
|
|
6233
6243
|
}
|
|
6234
6244
|
|
|
@@ -6357,7 +6367,13 @@ class AuroSelect extends i$2 {
|
|
|
6357
6367
|
?noFlip="${this.noFlip}"
|
|
6358
6368
|
part="dropdown">
|
|
6359
6369
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6360
|
-
<span id="placeholder"
|
|
6370
|
+
<span id="placeholder"
|
|
6371
|
+
class="${e(placeholderClass)}"
|
|
6372
|
+
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
6373
|
+
>
|
|
6374
|
+
<slot name="placeholder"></slot>
|
|
6375
|
+
</span>
|
|
6376
|
+
<slot name="valueText" id="valueText"></slot>
|
|
6361
6377
|
</span>
|
|
6362
6378
|
|
|
6363
6379
|
<div class="menuWrapper">
|
|
@@ -7650,6 +7666,7 @@ function initExamples(initCount) {
|
|
|
7650
7666
|
inDialogExample();
|
|
7651
7667
|
resetStateExample();
|
|
7652
7668
|
auroMenuLoadingExample();
|
|
7669
|
+
valueTextExample();
|
|
7653
7670
|
} catch (err) {
|
|
7654
7671
|
if (initCount <= 20) {
|
|
7655
7672
|
// setTimeout handles issue where content is sometimes loaded after the functions get called
|
|
@@ -5445,8 +5445,9 @@ var styleCss$3 = i$5`:focus:not(:focus-visible){outline:3px solid transparent}.u
|
|
|
5445
5445
|
* @slot label - Defines the content of the label.
|
|
5446
5446
|
* @slot helpText - Defines the content of the helpText.
|
|
5447
5447
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
5448
|
+
* @slot valueText - Dropdown value text display.
|
|
5448
5449
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
5449
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
5450
|
+
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
5450
5451
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
5451
5452
|
* @csspart helpText - Apply CSS to the help text.
|
|
5452
5453
|
*/
|
|
@@ -5788,12 +5789,8 @@ class AuroSelect extends i$2 {
|
|
|
5788
5789
|
updateDisplayedValue() {
|
|
5789
5790
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
5790
5791
|
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
triggerContentEl.innerHTML = '';
|
|
5794
|
-
if (placeholder) {
|
|
5795
|
-
triggerContentEl.appendChild(placeholder);
|
|
5796
|
-
}
|
|
5792
|
+
const valueText = triggerContentEl.querySelector("#valueText");
|
|
5793
|
+
valueText.textContent = '';
|
|
5797
5794
|
|
|
5798
5795
|
// Handle selected options
|
|
5799
5796
|
if (this.optionSelected) {
|
|
@@ -5806,9 +5803,7 @@ class AuroSelect extends i$2 {
|
|
|
5806
5803
|
displayText = this.optionSelected.textContent;
|
|
5807
5804
|
}
|
|
5808
5805
|
|
|
5809
|
-
|
|
5810
|
-
span.textContent = displayText;
|
|
5811
|
-
triggerContentEl.appendChild(span);
|
|
5806
|
+
valueText.textContent = displayText;
|
|
5812
5807
|
}
|
|
5813
5808
|
|
|
5814
5809
|
this.dropdown.requestUpdate();
|
|
@@ -6137,6 +6132,10 @@ class AuroSelect extends i$2 {
|
|
|
6137
6132
|
bubbles: true,
|
|
6138
6133
|
cancelable: true,
|
|
6139
6134
|
composed: true,
|
|
6135
|
+
detail: {
|
|
6136
|
+
optionSelected: this.optionSelected,
|
|
6137
|
+
value: this.value
|
|
6138
|
+
}
|
|
6140
6139
|
}));
|
|
6141
6140
|
}
|
|
6142
6141
|
|
|
@@ -6265,7 +6264,13 @@ class AuroSelect extends i$2 {
|
|
|
6265
6264
|
?noFlip="${this.noFlip}"
|
|
6266
6265
|
part="dropdown">
|
|
6267
6266
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6268
|
-
<span id="placeholder"
|
|
6267
|
+
<span id="placeholder"
|
|
6268
|
+
class="${e(placeholderClass)}"
|
|
6269
|
+
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
6270
|
+
>
|
|
6271
|
+
<slot name="placeholder"></slot>
|
|
6272
|
+
</span>
|
|
6273
|
+
<slot name="valueText" id="valueText"></slot>
|
|
6269
6274
|
</span>
|
|
6270
6275
|
|
|
6271
6276
|
<div class="menuWrapper">
|
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* @slot label - Defines the content of the label.
|
|
7
7
|
* @slot helpText - Defines the content of the helpText.
|
|
8
8
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
9
|
+
* @slot valueText - Dropdown value text display.
|
|
9
10
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
10
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
11
|
+
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
11
12
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
12
13
|
* @csspart helpText - Apply CSS to the help text.
|
|
13
14
|
*/
|
|
@@ -5399,8 +5399,9 @@ var styleCss = css`:focus:not(:focus-visible){outline:3px solid transparent}.uti
|
|
|
5399
5399
|
* @slot label - Defines the content of the label.
|
|
5400
5400
|
* @slot helpText - Defines the content of the helpText.
|
|
5401
5401
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
5402
|
+
* @slot valueText - Dropdown value text display.
|
|
5402
5403
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
5403
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
5404
|
+
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
5404
5405
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
5405
5406
|
* @csspart helpText - Apply CSS to the help text.
|
|
5406
5407
|
*/
|
|
@@ -5742,12 +5743,8 @@ class AuroSelect extends LitElement {
|
|
|
5742
5743
|
updateDisplayedValue() {
|
|
5743
5744
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
5744
5745
|
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
triggerContentEl.innerHTML = '';
|
|
5748
|
-
if (placeholder) {
|
|
5749
|
-
triggerContentEl.appendChild(placeholder);
|
|
5750
|
-
}
|
|
5746
|
+
const valueText = triggerContentEl.querySelector("#valueText");
|
|
5747
|
+
valueText.textContent = '';
|
|
5751
5748
|
|
|
5752
5749
|
// Handle selected options
|
|
5753
5750
|
if (this.optionSelected) {
|
|
@@ -5760,9 +5757,7 @@ class AuroSelect extends LitElement {
|
|
|
5760
5757
|
displayText = this.optionSelected.textContent;
|
|
5761
5758
|
}
|
|
5762
5759
|
|
|
5763
|
-
|
|
5764
|
-
span.textContent = displayText;
|
|
5765
|
-
triggerContentEl.appendChild(span);
|
|
5760
|
+
valueText.textContent = displayText;
|
|
5766
5761
|
}
|
|
5767
5762
|
|
|
5768
5763
|
this.dropdown.requestUpdate();
|
|
@@ -6091,6 +6086,10 @@ class AuroSelect extends LitElement {
|
|
|
6091
6086
|
bubbles: true,
|
|
6092
6087
|
cancelable: true,
|
|
6093
6088
|
composed: true,
|
|
6089
|
+
detail: {
|
|
6090
|
+
optionSelected: this.optionSelected,
|
|
6091
|
+
value: this.value
|
|
6092
|
+
}
|
|
6094
6093
|
}));
|
|
6095
6094
|
}
|
|
6096
6095
|
|
|
@@ -6219,7 +6218,13 @@ class AuroSelect extends LitElement {
|
|
|
6219
6218
|
?noFlip="${this.noFlip}"
|
|
6220
6219
|
part="dropdown">
|
|
6221
6220
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6222
|
-
<span id="placeholder"
|
|
6221
|
+
<span id="placeholder"
|
|
6222
|
+
class="${classMap(placeholderClass)}"
|
|
6223
|
+
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
6224
|
+
>
|
|
6225
|
+
<slot name="placeholder"></slot>
|
|
6226
|
+
</span>
|
|
6227
|
+
<slot name="valueText" id="valueText"></slot>
|
|
6223
6228
|
</span>
|
|
6224
6229
|
|
|
6225
6230
|
<div class="menuWrapper">
|
|
@@ -5399,8 +5399,9 @@ var styleCss = css`:focus:not(:focus-visible){outline:3px solid transparent}.uti
|
|
|
5399
5399
|
* @slot label - Defines the content of the label.
|
|
5400
5400
|
* @slot helpText - Defines the content of the helpText.
|
|
5401
5401
|
* @slot placeholder - Defines the content of the placeholder to be shown when there is no value
|
|
5402
|
+
* @slot valueText - Dropdown value text display.
|
|
5402
5403
|
* @event auroSelect-valueSet - Notifies that the component has a new value set.
|
|
5403
|
-
* @event input - Notifies every time the value prop of the element is changed.
|
|
5404
|
+
* @event input - Notifies every time the value prop of the element is changed. The updated `value` and `optionSelected` will be delivered in `detail` object.
|
|
5404
5405
|
* @event auroFormElement-validated - Notifies that the `validity` and `errorMessage` values have changed.
|
|
5405
5406
|
* @csspart helpText - Apply CSS to the help text.
|
|
5406
5407
|
*/
|
|
@@ -5742,12 +5743,8 @@ class AuroSelect extends LitElement {
|
|
|
5742
5743
|
updateDisplayedValue() {
|
|
5743
5744
|
const triggerContentEl = this.dropdown.querySelector('#triggerFocus');
|
|
5744
5745
|
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
triggerContentEl.innerHTML = '';
|
|
5748
|
-
if (placeholder) {
|
|
5749
|
-
triggerContentEl.appendChild(placeholder);
|
|
5750
|
-
}
|
|
5746
|
+
const valueText = triggerContentEl.querySelector("#valueText");
|
|
5747
|
+
valueText.textContent = '';
|
|
5751
5748
|
|
|
5752
5749
|
// Handle selected options
|
|
5753
5750
|
if (this.optionSelected) {
|
|
@@ -5760,9 +5757,7 @@ class AuroSelect extends LitElement {
|
|
|
5760
5757
|
displayText = this.optionSelected.textContent;
|
|
5761
5758
|
}
|
|
5762
5759
|
|
|
5763
|
-
|
|
5764
|
-
span.textContent = displayText;
|
|
5765
|
-
triggerContentEl.appendChild(span);
|
|
5760
|
+
valueText.textContent = displayText;
|
|
5766
5761
|
}
|
|
5767
5762
|
|
|
5768
5763
|
this.dropdown.requestUpdate();
|
|
@@ -6091,6 +6086,10 @@ class AuroSelect extends LitElement {
|
|
|
6091
6086
|
bubbles: true,
|
|
6092
6087
|
cancelable: true,
|
|
6093
6088
|
composed: true,
|
|
6089
|
+
detail: {
|
|
6090
|
+
optionSelected: this.optionSelected,
|
|
6091
|
+
value: this.value
|
|
6092
|
+
}
|
|
6094
6093
|
}));
|
|
6095
6094
|
}
|
|
6096
6095
|
|
|
@@ -6219,7 +6218,13 @@ class AuroSelect extends LitElement {
|
|
|
6219
6218
|
?noFlip="${this.noFlip}"
|
|
6220
6219
|
part="dropdown">
|
|
6221
6220
|
<span slot="trigger" aria-haspopup="true" id="triggerFocus">
|
|
6222
|
-
<span id="placeholder"
|
|
6221
|
+
<span id="placeholder"
|
|
6222
|
+
class="${classMap(placeholderClass)}"
|
|
6223
|
+
?aria-hidden="${this.optionSelected && this.optionSelected.length ? 'true' : false}"
|
|
6224
|
+
>
|
|
6225
|
+
<slot name="placeholder"></slot>
|
|
6226
|
+
</span>
|
|
6227
|
+
<slot name="valueText" id="valueText"></slot>
|
|
6223
6228
|
</span>
|
|
6224
6229
|
|
|
6225
6230
|
<div class="menuWrapper">
|
package/package.json
CHANGED