@aurodesignsystem-dev/auro-formkit 0.0.0-pr624.0 → 0.0.0-pr624.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +1 -0
- package/components/bibtemplate/dist/index.js +88 -6
- package/components/bibtemplate/dist/registered.js +88 -6
- package/components/checkbox/demo/api.min.js +4 -3
- package/components/checkbox/demo/index.min.js +4 -3
- package/components/checkbox/dist/index.js +4 -3
- package/components/checkbox/dist/registered.js +4 -3
- package/components/combobox/demo/api.md +30 -29
- package/components/combobox/demo/api.min.js +609 -532
- package/components/combobox/demo/index.html +0 -1
- package/components/combobox/demo/index.md +43 -0
- package/components/combobox/demo/index.min.js +607 -530
- package/components/combobox/dist/auro-combobox.d.ts +13 -18
- package/components/combobox/dist/index.js +479 -387
- package/components/combobox/dist/registered.js +479 -387
- package/components/counter/demo/api.min.js +377 -62
- package/components/counter/demo/index.min.js +377 -62
- package/components/counter/dist/index.js +377 -62
- package/components/counter/dist/registered.js +377 -62
- package/components/datepicker/demo/api.md +13 -5
- package/components/datepicker/demo/api.min.js +868 -438
- package/components/datepicker/demo/index.md +13 -0
- package/components/datepicker/demo/index.min.js +868 -438
- package/components/datepicker/dist/auro-datepicker.d.ts +21 -2
- package/components/datepicker/dist/index.js +710 -280
- package/components/datepicker/dist/registered.js +710 -280
- package/components/dropdown/demo/api.md +2 -2
- package/components/dropdown/demo/api.min.js +199 -37
- package/components/dropdown/demo/index.md +45 -0
- package/components/dropdown/demo/index.min.js +199 -37
- package/components/dropdown/dist/auro-dropdown.d.ts +10 -1
- package/components/dropdown/dist/auro-dropdownBib.d.ts +8 -0
- package/components/dropdown/dist/index.js +199 -37
- package/components/dropdown/dist/registered.js +199 -37
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/README.md +1 -1
- package/components/input/demo/api.md +57 -53
- package/components/input/demo/api.min.js +142 -141
- package/components/input/demo/index.md +4 -4
- package/components/input/demo/index.min.js +142 -141
- package/components/input/demo/readme.md +1 -1
- package/components/input/dist/auro-input.d.ts +22 -13
- package/components/input/dist/base-input.d.ts +1 -1
- package/components/input/dist/index.js +142 -141
- package/components/input/dist/registered.js +142 -141
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/layoutElement/dist/index.d.ts +1 -0
- package/components/layoutElement/dist/index.js +95 -1
- package/components/menu/demo/api.md +11 -11
- package/components/menu/demo/api.min.js +115 -130
- package/components/menu/demo/index.min.js +115 -130
- package/components/menu/dist/auro-menu-utils.d.ts +0 -8
- package/components/menu/dist/auro-menu.d.ts +3 -8
- package/components/menu/dist/index.d.ts +1 -1
- package/components/menu/dist/index.js +116 -90
- package/components/menu/dist/registered.js +115 -130
- package/components/radio/demo/api.min.js +4 -3
- package/components/radio/demo/index.min.js +4 -3
- package/components/radio/dist/index.js +4 -3
- package/components/radio/dist/registered.js +4 -3
- package/components/select/demo/api.js +2 -0
- package/components/select/demo/api.md +108 -42
- package/components/select/demo/api.min.js +1264 -352
- package/components/select/demo/index.html +1 -0
- package/components/select/demo/index.md +298 -777
- package/components/select/demo/index.min.js +1251 -351
- package/components/select/dist/auro-select.d.ts +110 -18
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.js +1105 -190
- package/components/select/dist/registered.js +1105 -190
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +3 -3
- /package/components/{dropdown → datepicker}/dist/styles/default/color-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default → datepicker/dist/styles/emphasized}/style-css.d.ts +0 -0
- /package/components/{dropdown/dist/styles/default/bibColors-css.d.ts → datepicker/dist/styles/shapeSize-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{default/bibStyles-css.d.ts → classic/bibColors-css.d.ts} +0 -0
- /package/components/dropdown/dist/styles/{style-css.d.ts → classic/bibStyles-css.d.ts} +0 -0
|
@@ -14,45 +14,53 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
|
|
|
14
14
|
|
|
15
15
|
## Properties
|
|
16
16
|
|
|
17
|
-
| Property | Attribute | Type
|
|
18
|
-
|
|
19
|
-
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean`
|
|
20
|
-
| [autocomplete](#autocomplete) | `autocomplete` | `string`
|
|
21
|
-
| [disabled](#disabled) | `disabled` | `boolean`
|
|
22
|
-
| [error](#error) | `error` | `string`
|
|
23
|
-
| [flexMenuWidth](#flexMenuWidth) | `flexMenuWidth` | `boolean`
|
|
24
|
-
| [
|
|
25
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
38
|
-
| [
|
|
39
|
-
| [
|
|
40
|
-
| [
|
|
17
|
+
| Property | Attribute | Type | Default | Description |
|
|
18
|
+
|---------------------------------|---------------------------------|-----------------------------------|----------------|--------------------------------------------------|
|
|
19
|
+
| [autoPlacement](#autoPlacement) | `autoPlacement` | `boolean` | "false" | If declared, bib's position will be automatically calculated where to appear. |
|
|
20
|
+
| [autocomplete](#autocomplete) | `autocomplete` | `string` | | If declared, sets the autocomplete attribute for the select element. |
|
|
21
|
+
| [disabled](#disabled) | `disabled` | `boolean` | | When attribute is present, element shows disabled state. |
|
|
22
|
+
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value. |
|
|
23
|
+
| [flexMenuWidth](#flexMenuWidth) | `flexMenuWidth` | `boolean` | | If set, makes dropdown width match the size of the content, rather than the width of the trigger. |
|
|
24
|
+
| [forceDisplayValue](#forceDisplayValue) | `forceDisplayValue` | `boolean` | false | If declared, the label and value will be visually hidden and the displayValue will render 100% of the time. |
|
|
25
|
+
| [fullscreenBreakpoint](#fullscreenBreakpoint) | `fullscreenBreakpoint` | `string` | "sm" | Defines the screen size breakpoint (`xs`, `sm`, `md`, `lg`, `xl`, `disabled`)<br />at which the dropdown switches to fullscreen mode on mobile. `disabled` indicates a dropdown should _never_ enter fullscreen.<br /><br />When expanded, the dropdown will automatically display in fullscreen mode<br />if the screen size is equal to or smaller than the selected breakpoint. |
|
|
26
|
+
| [largeFullscreenHeadline](#largeFullscreenHeadline) | `largeFullscreenHeadline` | `boolean` | | If declared, make bib.fullscreen.headline in HeadingDisplay.<br />Otherwise, Heading 600. |
|
|
27
|
+
| [layout](#layout) | | `string` | "classic" | |
|
|
28
|
+
| [matchWidth](#matchWidth) | `matchWidth` | `boolean` | true | If declared, the popover and trigger will be set to the same width. |
|
|
29
|
+
| [multiSelect](#multiSelect) | `multiselect` | `boolean` | | Sets multi-select mode, allowing multiple options to be selected at once. |
|
|
30
|
+
| [name](#name) | `name` | `string` | | The name for the select element. |
|
|
31
|
+
| [noCheckmark](#noCheckmark) | `noCheckmark` | `boolean` | | When true, checkmark on selected option will no longer be present. |
|
|
32
|
+
| [noFlip](#noFlip) | `noFlip` | `boolean` | "false" | If declared, the bib will NOT flip to an alternate position<br />when there isn't enough space in the specified `placement`. |
|
|
33
|
+
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
34
|
+
| [offset](#offset) | `offset` | `number` | "0" | Gap between the trigger element and bib. |
|
|
35
|
+
| [onDark](#onDark) | `onDark` | `boolean` | | If declared, onDark styles will be applied to the trigger. |
|
|
36
|
+
| [optionSelected](#optionSelected) | `optionSelected` | `HTMLElement\|Array<HTMLElement>` | | Specifies the current selected menuOption. Default type is `HTMLElement`, changing to `Array<HTMLElement>` when `multiSelect` is true. |
|
|
37
|
+
| [placement](#placement) | `placement` | `string` | "bottom-start" | Position where the bib should appear relative to the trigger.<br />Accepted values:<br />"top" \| "right" \| "bottom" \| "left" \|<br />"bottom-start" \| "top-start" \| "top-end" \|<br />"right-start" \| "right-end" \| "bottom-end" \|<br />"left-start" \| "left-end" |
|
|
38
|
+
| [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the element. Used for client-side validation. |
|
|
39
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
40
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
41
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
42
|
+
| [shape](#shape) | | `string` | "classic" | |
|
|
43
|
+
| [size](#size) | | `string` | "xl" | |
|
|
44
|
+
| [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
|
|
45
|
+
| [value](#value) | `value` | `String\|Array<String>` | | Value selected for the component. Default type is `String`, changing to `Array<String>` when `multiSelect` is true. |
|
|
41
46
|
|
|
42
47
|
## Methods
|
|
43
48
|
|
|
44
|
-
| Method
|
|
45
|
-
|
|
46
|
-
| [
|
|
47
|
-
| [
|
|
49
|
+
| Method | Type | Description |
|
|
50
|
+
|----------------------|----------------------------------------|--------------------------------------------------|
|
|
51
|
+
| [renderAriaHtml](#renderAriaHtml) | `(): TemplateResult` | |
|
|
52
|
+
| [renderBACKUP](#renderBACKUP) | `(): TemplateResult` | |
|
|
53
|
+
| [renderNativeSelect](#renderNativeSelect) | `(): TemplateResult` | |
|
|
54
|
+
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
55
|
+
| [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
48
56
|
|
|
49
57
|
## Events
|
|
50
58
|
|
|
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. |
|
|
59
|
+
| Event | Type | Description |
|
|
60
|
+
|-----------------------------|--------------------------------------------------|--------------------------------------------------|
|
|
61
|
+
| `auroFormElement-validated` | | Notifies that the `validity` and `errorMessage` values have changed. |
|
|
62
|
+
| `auroSelect-valueSet` | `CustomEvent<any>` | Notifies that the component has a new value set. |
|
|
63
|
+
| [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
64
|
|
|
57
65
|
## Slots
|
|
58
66
|
|
|
@@ -62,7 +70,8 @@ The auro-select element is a wrapper for auro-dropdown and auro-menu to create a
|
|
|
62
70
|
| `bib.fullscreen.headline` | Defines the headline to display above menu-options |
|
|
63
71
|
| [helpText](#helpText) | Defines the content of the helpText. |
|
|
64
72
|
| [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 |
|
|
73
|
+
| [placeholder](#placeholder) | Defines the content of the placeholder to be shown when there is no value |
|
|
74
|
+
| [valueText](#valueText) | Dropdown value text display. |
|
|
66
75
|
|
|
67
76
|
## CSS Shadow Parts
|
|
68
77
|
|
|
@@ -161,7 +170,7 @@ To pre-set the value of auro-select on load, use the `value` property. The `sele
|
|
|
161
170
|
<auro-button id="validValueExampleBtn">Set Value to Valid Option</auro-button>
|
|
162
171
|
<auro-button id="invalidValueExampleBtn">Set Value to Invalid Option</auro-button>
|
|
163
172
|
<br/><br/>
|
|
164
|
-
<auro-select id="valueExample" value='["price"]'>
|
|
173
|
+
<auro-select id="valueExample" multiselect value='["price", "duration"]'>
|
|
165
174
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
166
175
|
<span slot="label">Name</span>
|
|
167
176
|
<auro-menu>
|
|
@@ -184,7 +193,7 @@ To pre-set the value of auro-select on load, use the `value` property. The `sele
|
|
|
184
193
|
<auro-button id="validValueExampleBtn">Set Value to Valid Option</auro-button>
|
|
185
194
|
<auro-button id="invalidValueExampleBtn">Set Value to Invalid Option</auro-button>
|
|
186
195
|
<br/><br/>
|
|
187
|
-
<auro-select id="valueExample" value='["price"]'>
|
|
196
|
+
<auro-select id="valueExample" multiselect value='["price", "duration"]'>
|
|
188
197
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
189
198
|
<span slot="label">Name</span>
|
|
190
199
|
<auro-menu>
|
|
@@ -206,11 +215,11 @@ export function valueExample() {
|
|
|
206
215
|
const valueExample = document.querySelector('#valueExample');
|
|
207
216
|
|
|
208
217
|
document.querySelector('#validValueExampleBtn').addEventListener('click', () => {
|
|
209
|
-
valueExample.value = [
|
|
218
|
+
valueExample.value = '["arrival", "prefer alaska"]';
|
|
210
219
|
});
|
|
211
220
|
|
|
212
221
|
document.querySelector('#invalidValueExampleBtn').addEventListener('click', () => {
|
|
213
|
-
valueExample.value = [
|
|
222
|
+
valueExample.value = '["flight course"]';
|
|
214
223
|
});
|
|
215
224
|
}
|
|
216
225
|
```
|
|
@@ -786,7 +795,7 @@ Use the `reset()` method to reset the `<auro-select>`'s `value` and `validity` s
|
|
|
786
795
|
<!-- The below content is automatically added from ./../apiExamples/resetState.html -->
|
|
787
796
|
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
788
797
|
<br/><br/>
|
|
789
|
-
<auro-select id="resetStateExample" value=
|
|
798
|
+
<auro-select id="resetStateExample" value="price">
|
|
790
799
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
791
800
|
<label slot="placeholder">Placeholder Text</label>
|
|
792
801
|
<span slot="label">Name</span>
|
|
@@ -809,7 +818,7 @@ Use the `reset()` method to reset the `<auro-select>`'s `value` and `validity` s
|
|
|
809
818
|
```html
|
|
810
819
|
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
811
820
|
<br/><br/>
|
|
812
|
-
<auro-select id="resetStateExample" value=
|
|
821
|
+
<auro-select id="resetStateExample" value="price">
|
|
813
822
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
814
823
|
<label slot="placeholder">Placeholder Text</label>
|
|
815
824
|
<span slot="label">Name</span>
|
|
@@ -1033,6 +1042,63 @@ export function auroMenuLoadingExample() {
|
|
|
1033
1042
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1034
1043
|
</auro-accordion>
|
|
1035
1044
|
|
|
1045
|
+
### valueText <a name="valueText"></a>
|
|
1046
|
+
The label for selected option can be customized using `valueText` slot.
|
|
1047
|
+
This slot can be manipulated on the `input` event which delivers the new value and selected `auro-menuoption` element in the `detail` object.
|
|
1048
|
+
|
|
1049
|
+
<div class="exampleWrapper">
|
|
1050
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/valueText.html) -->
|
|
1051
|
+
<!-- The below content is automatically added from ./../apiExamples/valueText.html -->
|
|
1052
|
+
<auro-select id="valueTextExample" autocomplete="address-level1">
|
|
1053
|
+
<span slot="bib.fullscreen.headline">Select Your Gender</span>
|
|
1054
|
+
<span slot="label">Gender</span>
|
|
1055
|
+
<span slot="valueText"></span>
|
|
1056
|
+
<auro-menu>
|
|
1057
|
+
<auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
|
|
1058
|
+
<auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
|
|
1059
|
+
<auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
|
|
1060
|
+
<auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
|
|
1061
|
+
</auro-menu>
|
|
1062
|
+
</auro-select>
|
|
1063
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1064
|
+
</div>
|
|
1065
|
+
<auro-accordion alignRight>
|
|
1066
|
+
<span slot="trigger">See code</span>
|
|
1067
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.js) -->
|
|
1068
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/valueText.js -->
|
|
1069
|
+
|
|
1070
|
+
```js
|
|
1071
|
+
export function valueTextExample() {
|
|
1072
|
+
const onValueTextSelectInput = (e) => {
|
|
1073
|
+
const valueText = e.target.querySelector("[slot=valueText]");
|
|
1074
|
+
|
|
1075
|
+
valueText.textContent = e.detail.optionSelected.dataset.display;
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
const select = document.querySelector("#valueTextExample");
|
|
1079
|
+
select.addEventListener('input', onValueTextSelectInput);
|
|
1080
|
+
}
|
|
1081
|
+
```
|
|
1082
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1083
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/valueText.html) -->
|
|
1084
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/valueText.html -->
|
|
1085
|
+
|
|
1086
|
+
```html
|
|
1087
|
+
<auro-select id="valueTextExample" autocomplete="address-level1">
|
|
1088
|
+
<span slot="bib.fullscreen.headline">Select Your Gender</span>
|
|
1089
|
+
<span slot="label">Gender</span>
|
|
1090
|
+
<span slot="valueText"></span>
|
|
1091
|
+
<auro-menu>
|
|
1092
|
+
<auro-menuoption value="m" data-display="Male">M - Male</auro-menuoption>
|
|
1093
|
+
<auro-menuoption value="f" data-display="Female">F - Female</auro-menuoption>
|
|
1094
|
+
<auro-menuoption value="x" data-display="Unspecified">X - Unspecified</auro-menuoption>
|
|
1095
|
+
<auro-menuoption value="u" data-display="Undisclosed">U - Undisclosed</auro-menuoption>
|
|
1096
|
+
</auro-menu>
|
|
1097
|
+
</auro-select>
|
|
1098
|
+
```
|
|
1099
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
1100
|
+
</auro-accordion>
|
|
1101
|
+
|
|
1036
1102
|
### Customized bib position
|
|
1037
1103
|
The bib position can be customized with `placement`, `offset`, `flip`, `autoPlacement` attributes.
|
|
1038
1104
|
|
|
@@ -1193,7 +1259,7 @@ The component can be in a dialog.
|
|
|
1193
1259
|
<auro-dialog id="select-dialog">
|
|
1194
1260
|
<span slot="header">Select in Dialog</span>
|
|
1195
1261
|
<div slot="content">
|
|
1196
|
-
<auro-select id="valueExample" value=
|
|
1262
|
+
<auro-select id="valueExample" value="price">
|
|
1197
1263
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
1198
1264
|
<span slot="label">Name</span>
|
|
1199
1265
|
<auro-menu>
|
|
@@ -1221,7 +1287,7 @@ The component can be in a dialog.
|
|
|
1221
1287
|
<auro-dialog id="select-dialog">
|
|
1222
1288
|
<span slot="header">Select in Dialog</span>
|
|
1223
1289
|
<div slot="content">
|
|
1224
|
-
<auro-select id="valueExample" value=
|
|
1290
|
+
<auro-select id="valueExample" value="price">
|
|
1225
1291
|
<span slot="bib.fullscreen.headline">Bib Headline</span>
|
|
1226
1292
|
<span slot="label">Name</span>
|
|
1227
1293
|
<auro-menu>
|