@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
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
## [5.9.
|
|
1
|
+
## [5.9.2](https://github.com/AlaskaAirlines/auro-formkit/compare/v5.9.1...v5.9.2) (2026-01-27)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
* enhance checkbox a11y & add support for VoiceOver [#1258](https://github.com/AlaskaAirlines/auro-formkit/issues/1258) ([db8e0be](https://github.com/AlaskaAirlines/auro-formkit/commit/db8e0be25bf69ea3d2186bd4394de2db0d657691))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Performance Improvements
|
|
10
|
+
|
|
11
|
+
* modernize checkbox example documentation [#1260](https://github.com/AlaskaAirlines/auro-formkit/issues/1260) [#1270](https://github.com/AlaskaAirlines/auro-formkit/issues/1270) ([fbf5af3](https://github.com/AlaskaAirlines/auro-formkit/commit/fbf5af302ebc3a6fd9e9cc3e2d01c5dfa91cb178))
|
|
12
|
+
* modernize combobox example documentation [#1261](https://github.com/AlaskaAirlines/auro-formkit/issues/1261) ([bfdb6ec](https://github.com/AlaskaAirlines/auro-formkit/commit/bfdb6ec83c36d616d36ee99c18905447ffcdc7e1)), closes [#777](https://github.com/AlaskaAirlines/auro-formkit/issues/777) [#1194](https://github.com/AlaskaAirlines/auro-formkit/issues/1194) [#1273](https://github.com/AlaskaAirlines/auro-formkit/issues/1273)
|
|
13
|
+
* modernize counter example documentation [#1262](https://github.com/AlaskaAirlines/auro-formkit/issues/1262) ([b96e16b](https://github.com/AlaskaAirlines/auro-formkit/commit/b96e16ba77dda295a3cef91fd28483fd31e5bb81))
|
|
14
|
+
* modernize datepicker example documentation [#1263](https://github.com/AlaskaAirlines/auro-formkit/issues/1263) ([cece6f3](https://github.com/AlaskaAirlines/auro-formkit/commit/cece6f33648e6f579711d832b4dbebd5a96dad5b)), closes [#1281](https://github.com/AlaskaAirlines/auro-formkit/issues/1281)
|
|
15
|
+
* modernize dropdown example documentation [#1264](https://github.com/AlaskaAirlines/auro-formkit/issues/1264) ([fa0644f](https://github.com/AlaskaAirlines/auro-formkit/commit/fa0644f0155ea03411b9c0eb2142c5ce22257444)), closes [#777](https://github.com/AlaskaAirlines/auro-formkit/issues/777) [#1284](https://github.com/AlaskaAirlines/auro-formkit/issues/1284)
|
|
16
|
+
* modernize form example documentation [#1259](https://github.com/AlaskaAirlines/auro-formkit/issues/1259) ([47cd1e1](https://github.com/AlaskaAirlines/auro-formkit/commit/47cd1e1f6d1024d39ce932bb4cf4252592d1625b))
|
|
17
|
+
* modernize input example documentation [#1265](https://github.com/AlaskaAirlines/auro-formkit/issues/1265) ([d3a659d](https://github.com/AlaskaAirlines/auro-formkit/commit/d3a659d00355085809af3bb45fcc8be85075f844))
|
|
18
|
+
* modernize menu example documentation [#1266](https://github.com/AlaskaAirlines/auro-formkit/issues/1266) ([03272ff](https://github.com/AlaskaAirlines/auro-formkit/commit/03272ff9d974749d8ad21600583f526e3125d348)), closes [#1288](https://github.com/AlaskaAirlines/auro-formkit/issues/1288)
|
|
19
|
+
* modernize radio example documentation [#1267](https://github.com/AlaskaAirlines/auro-formkit/issues/1267) ([e9f0ee8](https://github.com/AlaskaAirlines/auro-formkit/commit/e9f0ee80f31a209b66b77a4308965bf8043d7ed9))
|
|
20
|
+
* modernize select example documentation [#1290](https://github.com/AlaskaAirlines/auro-formkit/issues/1290) ([c222a1d](https://github.com/AlaskaAirlines/auro-formkit/commit/c222a1d13d10ce4924ec8557ddb63674388e52bf)), closes [#1289](https://github.com/AlaskaAirlines/auro-formkit/issues/1289)
|
|
9
21
|
|
|
10
22
|
### Changelog
|
|
11
23
|
|
|
@@ -18,6 +18,7 @@ The following sections are editable by making changes to the following files:
|
|
|
18
18
|
-->
|
|
19
19
|
|
|
20
20
|
# Checkbox
|
|
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-checkbox>` is a [HTML custom element](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
@@ -27,7 +28,18 @@ 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
|
+
## Checkbox 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
|
+
The `<auro-checkbox>` element should be used in situations where users may:
|
|
36
|
+
|
|
37
|
+
* Be filling out a form
|
|
38
|
+
* Need to select one or more options
|
|
39
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
40
|
+
|
|
30
41
|
## Getting Started
|
|
42
|
+
|
|
31
43
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
32
44
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
33
45
|
|
|
@@ -40,30 +52,7 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
40
52
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
41
53
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
42
54
|
|
|
43
|
-
###
|
|
44
|
-
|
|
45
|
-
#### Automatic Registration
|
|
46
|
-
|
|
47
|
-
For automatic registration, simply import the component:
|
|
48
|
-
|
|
49
|
-
```javascript
|
|
50
|
-
// Registers <auro-checkbox> automatically
|
|
51
|
-
import '@aurodesignsystem/auro-formkit/auro-checkbox';
|
|
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 `AuroCheckbox.register('custom-checkbox')` method on the component class and pass in a unique name.
|
|
57
|
-
|
|
58
|
-
```javascript
|
|
59
|
-
// Import the class only
|
|
60
|
-
import { AuroCheckbox } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
61
|
-
|
|
62
|
-
// Register with a custom name if desired
|
|
63
|
-
AuroCheckbox.register('custom-checkbox');
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
#### TypeScript Module Resolution
|
|
55
|
+
### TypeScript Module Resolution
|
|
67
56
|
|
|
68
57
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
69
58
|
|
|
@@ -76,31 +65,10 @@ When using TypeScript set `moduleResolution` to `bundler`, add the following to
|
|
|
76
65
|
```
|
|
77
66
|
|
|
78
67
|
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-checkbox-group>
|
|
87
|
-
<span slot="legend">Form label goes here</span>
|
|
88
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
89
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
90
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option that has some extra text that should wrap when rendered in a narrow container</auro-checkbox>
|
|
91
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
92
|
-
</auro-checkbox-group>
|
|
93
|
-
```
|
|
94
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
95
|
-
|
|
96
|
-
### Design Token CSS Custom Property dependency
|
|
97
|
-
|
|
98
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/development/designTokens.md) -->
|
|
99
|
-
The use of any Auro custom element has a dependency on the [Auro Design Tokens](https://auro.alaskaair.com/getting-started/developers/design-tokens).
|
|
100
|
-
|
|
101
68
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
102
69
|
|
|
103
70
|
## Install from CDN
|
|
71
|
+
|
|
104
72
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/bundleInstallDescription.md) -->
|
|
105
73
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
106
74
|
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.
|
|
@@ -110,22 +78,7 @@ In cases where the project is not able to process JS assets, there are pre-proce
|
|
|
110
78
|
```
|
|
111
79
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
112
80
|
|
|
113
|
-
##
|
|
114
|
-
<!-- AURO-GENERATED-CONTENT:START (REMOTE:url=https://raw.githubusercontent.com/AlaskaAirlines/WC-Generator/master/componentDocs/partials/browserSupport.md) -->
|
|
115
|
-
For the most up to date information on [UI development browser support](https://auro.alaskaair.com/support/browsersSupport)
|
|
116
|
-
|
|
117
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
118
|
-
|
|
119
|
-
## auro-checkbox use cases
|
|
120
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
121
|
-
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
122
|
-
The `<auro-checkbox>` element should be used in situations where users may:
|
|
123
|
-
|
|
124
|
-
* Be filling out a form
|
|
125
|
-
* Need to select one or more options
|
|
126
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
127
|
-
|
|
128
|
-
## Formkit development
|
|
81
|
+
## Formkit Development
|
|
129
82
|
|
|
130
83
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/partials/developmentDescription.md) -->
|
|
131
84
|
<!-- The below content is automatically added from ../../docs/partials/developmentDescription.md -->
|
|
@@ -139,4 +92,51 @@ To only develop a single component, use the `--filter` flag:
|
|
|
139
92
|
```shell
|
|
140
93
|
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
141
94
|
```
|
|
95
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
97
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
98
|
+
|
|
99
|
+
## Custom Component Registration for Version Management
|
|
100
|
+
|
|
101
|
+
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.
|
|
102
|
+
|
|
103
|
+
When you install the component as described on the `Install` page, the class is imported automatically, and the component is registered globally for you.
|
|
104
|
+
|
|
105
|
+
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.
|
|
106
|
+
|
|
107
|
+
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
// Import the class only
|
|
111
|
+
import { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
112
|
+
|
|
113
|
+
// Register with a custom name if desired
|
|
114
|
+
AuroCheckbox.register('custom-checkbox');
|
|
115
|
+
AuroCheckboxGroup.register('custom-checkbox-group');
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
This will create a new custom element `<custom-checkbox>` and `<custom-checkbox-group>` that behaves exactly like `<auro-checkbox>` and `<auro-checkbox-group>`, allowing both to coexist on the same page without interfering with each other.
|
|
119
|
+
|
|
120
|
+
<div class="exampleWrapper exampleWrapper--flex">
|
|
121
|
+
<custom-checkbox-group>
|
|
122
|
+
<span slot="legend">Form label goes here</span>
|
|
123
|
+
<custom-checkbox value="value1" name="custom" id="checkbox-custom1">Custom checkbox option</custom-checkbox>
|
|
124
|
+
<custom-checkbox value="value2" name="custom" id="checkbox-custom2" checked>Custom checkbox option</custom-checkbox>
|
|
125
|
+
<custom-checkbox value="value3" name="custom" id="checkbox-custom3">Custom checkbox option</custom-checkbox>
|
|
126
|
+
<custom-checkbox value="value4" name="custom" id="checkbox-custom4">Custom checkbox option</custom-checkbox>
|
|
127
|
+
</custom-checkbox-group>
|
|
128
|
+
</div>
|
|
129
|
+
<auro-accordion alignRight>
|
|
130
|
+
<span slot="trigger">See code</span>
|
|
131
|
+
|
|
132
|
+
```html
|
|
133
|
+
<custom-checkbox-group>
|
|
134
|
+
<span slot="legend">Form label goes here</span>
|
|
135
|
+
<custom-checkbox value="value1" name="custom" id="checkbox-custom1">Custom checkbox option</custom-checkbox>
|
|
136
|
+
<custom-checkbox value="value2" name="custom" id="checkbox-custom2" checked>Custom checkbox option</custom-checkbox>
|
|
137
|
+
<custom-checkbox value="value3" name="custom" id="checkbox-custom3">Custom checkbox option</custom-checkbox>
|
|
138
|
+
<custom-checkbox value="value4" name="custom" id="checkbox-custom4">Custom checkbox option</custom-checkbox>
|
|
139
|
+
</custom-checkbox-group>
|
|
140
|
+
```
|
|
141
|
+
</auro-accordion>
|
|
142
142
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -3,23 +3,23 @@
|
|
|
3
3
|
|
|
4
4
|
# auro-checkbox-group
|
|
5
5
|
|
|
6
|
-
The auro-checkbox-group element is a wrapper for auro-checkbox
|
|
6
|
+
The `auro-checkbox-group` element is a wrapper for `auro-checkbox` elements..
|
|
7
7
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
|
-
| Property | Attribute | Type
|
|
11
|
-
|
|
12
|
-
| [appearance](#appearance) | `appearance` | `
|
|
13
|
-
| [disabled](#disabled) | `disabled` | `boolean`
|
|
14
|
-
| [error](#error) | `error` | `string`
|
|
15
|
-
| [horizontal](#horizontal) | `horizontal` | `boolean`
|
|
16
|
-
| [noValidate](#noValidate) | `noValidate` | `boolean`
|
|
17
|
-
| [onDark](#onDark) | `onDark` | `boolean`
|
|
18
|
-
| [required](#required) | `required` | `boolean`
|
|
19
|
-
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string`
|
|
20
|
-
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string`
|
|
21
|
-
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string`
|
|
22
|
-
| [validity](#validity) | `validity` | `string`
|
|
10
|
+
| Property | Attribute | Type | Default | Description |
|
|
11
|
+
|---------------------------------|---------------------------------|--------------------------|-------------|--------------------------------------------------|
|
|
12
|
+
| [appearance](#appearance) | `appearance` | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
|
|
13
|
+
| [disabled](#disabled) | `disabled` | `boolean` | | If set, disables the checkbox group. |
|
|
14
|
+
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
15
|
+
| [horizontal](#horizontal) | `horizontal` | `boolean` | | If set, checkboxes will be aligned horizontally. |
|
|
16
|
+
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
17
|
+
| [onDark](#onDark) | `onDark` | `boolean` | | DEPRECATED - use `appearance="inverse"` instead. |
|
|
18
|
+
| [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the element. Used for client-side validation. |
|
|
19
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
20
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
21
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
22
|
+
| [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
|
|
23
23
|
|
|
24
24
|
## Methods
|
|
25
25
|
|
|
@@ -45,21 +45,20 @@ The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
|
45
45
|
|
|
46
46
|
# auro-checkbox
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
The `auro-checkbox` element is for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
49
49
|
|
|
50
50
|
## Properties
|
|
51
51
|
|
|
52
|
-
| Property | Attribute | Type
|
|
53
|
-
|
|
54
|
-
| [appearance](#appearance) | `appearance` | `
|
|
55
|
-
| [
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
58
|
-
| [
|
|
59
|
-
| [
|
|
60
|
-
| [
|
|
61
|
-
| [
|
|
62
|
-
| [value](#value) | `value` | `string` | | Sets the element's input value. Must be unique within an auro-checkbox-group element. |
|
|
52
|
+
| Property | Attribute | Type | Default | Description |
|
|
53
|
+
|--------------|--------------|--------------------------|-------------|--------------------------------------------------|
|
|
54
|
+
| [appearance](#appearance) | `appearance` | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
|
|
55
|
+
| [checked](#checked) | `checked` | `boolean` | | If set to true, the checkbox will be filled with a checkmark. |
|
|
56
|
+
| [disabled](#disabled) | `disabled` | `boolean` | | If set to true, the checkbox will not be clickable. |
|
|
57
|
+
| [error](#error) | `error` | `boolean` | | If set to true, the checkbox will be displayed with an error state. |
|
|
58
|
+
| [id](#id) | `id` | `string` | | The id global attribute defines an identifier (ID) which must be unique in the whole document. |
|
|
59
|
+
| [name](#name) | `name` | `string` | | Accepts any string and is used to identify related checkboxes when submitting form data. |
|
|
60
|
+
| [onDark](#onDark) | `onDark` | `boolean` | | DEPRECATED - use `appearance="inverse"` instead. |
|
|
61
|
+
| [value](#value) | `value` | `string` | | Sets the element's input value. Must be unique within an auro-checkbox-group element. |
|
|
63
62
|
|
|
64
63
|
## Methods
|
|
65
64
|
|
|
@@ -86,9 +85,7 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
86
85
|
| `checkbox-label` | apply css to a specific checkbox's label. |
|
|
87
86
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
88
87
|
|
|
89
|
-
##
|
|
90
|
-
|
|
91
|
-
### Basic
|
|
88
|
+
## Basic
|
|
92
89
|
|
|
93
90
|
<div class="exampleWrapper">
|
|
94
91
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
@@ -102,18 +99,6 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
102
99
|
</auro-checkbox-group>
|
|
103
100
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
104
101
|
</div>
|
|
105
|
-
<div class="exampleWrapper--ondark" aria-hidden>
|
|
106
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/inverseAppearance.html) -->
|
|
107
|
-
<!-- The below content is automatically added from ./../apiExamples/inverseAppearance.html -->
|
|
108
|
-
<auro-checkbox-group appearance="inverse">
|
|
109
|
-
<span slot="legend">Form label goes here</span>
|
|
110
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
111
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
112
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
113
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
114
|
-
</auro-checkbox-group>
|
|
115
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
116
|
-
</div>
|
|
117
102
|
<auro-accordion alignRight>
|
|
118
103
|
<span slot="trigger">See code</span>
|
|
119
104
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
@@ -129,8 +114,30 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
129
114
|
</auro-checkbox-group>
|
|
130
115
|
```
|
|
131
116
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
132
|
-
|
|
133
|
-
|
|
117
|
+
</auro-accordion>
|
|
118
|
+
|
|
119
|
+
## Property & Attribute Examples
|
|
120
|
+
|
|
121
|
+
### Appearance on Dark Backgrounds
|
|
122
|
+
|
|
123
|
+
Use the `appearance="inverse"` attribute to render the checkbox for use on dark backgrounds.
|
|
124
|
+
|
|
125
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
126
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
|
|
127
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
128
|
+
<auro-checkbox-group appearance="inverse">
|
|
129
|
+
<span slot="legend">Form label goes here</span>
|
|
130
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
131
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
132
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
133
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
134
|
+
</auro-checkbox-group>
|
|
135
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
136
|
+
</div>
|
|
137
|
+
<auro-accordion alignRight>
|
|
138
|
+
<span slot="trigger">See code</span>
|
|
139
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
|
|
140
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
134
141
|
<auro-checkbox-group appearance="inverse">
|
|
135
142
|
<span slot="legend">Form label goes here</span>
|
|
136
143
|
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
@@ -138,7 +145,7 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
138
145
|
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
139
146
|
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
140
147
|
</auro-checkbox-group>
|
|
141
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
148
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
142
149
|
</auro-accordion>
|
|
143
150
|
|
|
144
151
|
### Disabled
|
|
@@ -183,8 +190,8 @@ The `disabled` attribute used to disable a single `<auro-checkbox>` element.
|
|
|
183
190
|
The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
184
191
|
|
|
185
192
|
<div class="exampleWrapper">
|
|
186
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
187
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
193
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled-group.html) -->
|
|
194
|
+
<!-- The below content is automatically added from ./../apiExamples/disabled-group.html -->
|
|
188
195
|
<auro-checkbox-group disabled>
|
|
189
196
|
<span slot="legend">Form label goes here</span>
|
|
190
197
|
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
@@ -195,8 +202,8 @@ The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
|
195
202
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
196
203
|
</div>
|
|
197
204
|
<div class="exampleWrapper--ondark" aria-hidden>
|
|
198
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
199
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
205
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-disabled.html) -->
|
|
206
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-disabled.html -->
|
|
200
207
|
<auro-checkbox-group appearance="inverse" disabled>
|
|
201
208
|
<span slot="legend">Form label goes here</span>
|
|
202
209
|
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
@@ -208,8 +215,8 @@ The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
|
208
215
|
</div>
|
|
209
216
|
<auro-accordion alignRight>
|
|
210
217
|
<span slot="trigger">See code</span>
|
|
211
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
212
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
218
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled-group.html) -->
|
|
219
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/disabled-group.html -->
|
|
213
220
|
|
|
214
221
|
```html
|
|
215
222
|
<auro-checkbox-group disabled>
|
|
@@ -221,8 +228,8 @@ The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
|
221
228
|
</auro-checkbox-group>
|
|
222
229
|
```
|
|
223
230
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
224
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
225
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
231
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-disabled.html) -->
|
|
232
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-disabled.html -->
|
|
226
233
|
<auro-checkbox-group appearance="inverse" disabled>
|
|
227
234
|
<span slot="legend">Form label goes here</span>
|
|
228
235
|
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
@@ -233,17 +240,56 @@ The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
|
233
240
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
234
241
|
</auro-accordion>
|
|
235
242
|
|
|
236
|
-
###
|
|
243
|
+
### Horizontal Group
|
|
244
|
+
|
|
245
|
+
Using the `horizontal` attribute will render the checkbox options on a horizontal line.
|
|
237
246
|
|
|
238
|
-
|
|
247
|
+
**Note**: Using the `horizontal` attribute has a limit of 3 options. Beyond three, options will be listed in vertically.
|
|
248
|
+
|
|
249
|
+
<div class="exampleWrapper">
|
|
250
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/horizontal.html) -->
|
|
251
|
+
<!-- The below content is automatically added from ./../apiExamples/horizontal.html -->
|
|
252
|
+
<auro-checkbox-group horizontal>
|
|
253
|
+
<span slot="legend">Form label goes here</span>
|
|
254
|
+
<auro-checkbox value="yes" name="horizontal" id="checkbox-horizontal1">Yes</auro-checkbox>
|
|
255
|
+
<auro-checkbox value="no" name="horizontal" id="checkbox-horizontal2">No</auro-checkbox>
|
|
256
|
+
<auro-checkbox value="maybe" name="horizontal" id="checkbox-horizontal3">Maybe</auro-checkbox>
|
|
257
|
+
</auro-checkbox-group>
|
|
258
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
259
|
+
</div>
|
|
260
|
+
<auro-accordion alignRight>
|
|
261
|
+
<span slot="trigger">See code</span>
|
|
262
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/horizontal.html) -->
|
|
263
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/horizontal.html -->
|
|
264
|
+
|
|
265
|
+
```html
|
|
266
|
+
<auro-checkbox-group horizontal>
|
|
267
|
+
<span slot="legend">Form label goes here</span>
|
|
268
|
+
<auro-checkbox value="yes" name="horizontal" id="checkbox-horizontal1">Yes</auro-checkbox>
|
|
269
|
+
<auro-checkbox value="no" name="horizontal" id="checkbox-horizontal2">No</auro-checkbox>
|
|
270
|
+
<auro-checkbox value="maybe" name="horizontal" id="checkbox-horizontal3">Maybe</auro-checkbox>
|
|
271
|
+
</auro-checkbox-group>
|
|
272
|
+
```
|
|
273
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
274
|
+
</auro-accordion>
|
|
239
275
|
|
|
240
|
-
|
|
276
|
+
### Form Validation
|
|
277
|
+
|
|
278
|
+
In the `auro-checkbox-group` element, the `required` and `error` states are the two possible validation states.
|
|
279
|
+
|
|
280
|
+
It should be noted that form validation is only supported within an `auro-checkbox-group` element. In order to support validation on a single `auro-checkbox` element, it must be wrapped in an `auro-checkbox-group`.
|
|
281
|
+
|
|
282
|
+
### Error
|
|
283
|
+
|
|
284
|
+
Use the `error` attribute to force an error state on the element.
|
|
241
285
|
|
|
242
286
|
The `error` attribute used to set error state on the entire `<auro-checkbox-group>`. If using the `error` attribute on an `<auro-checkbox-group>`, a string with the error message needs to be passed along with the attribute.
|
|
243
287
|
|
|
288
|
+
**Note**: The `error` attribute is only supported on the `<auro-checkbox-group>` element, not on individual `<auro-checkbox>` elements.
|
|
289
|
+
|
|
244
290
|
<div class="exampleWrapper">
|
|
245
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
246
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
291
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/error-group.html) -->
|
|
292
|
+
<!-- The below content is automatically added from ./../apiExamples/error-group.html -->
|
|
247
293
|
<auro-checkbox-group error="custom error">
|
|
248
294
|
<span slot="legend">Form label goes here</span>
|
|
249
295
|
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
@@ -254,8 +300,8 @@ The `error` attribute used to set error state on the entire `<auro-checkbox-grou
|
|
|
254
300
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
255
301
|
</div>
|
|
256
302
|
<div class="exampleWrapper--ondark" aria-hidden>
|
|
257
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
258
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
303
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-error.html) -->
|
|
304
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-error.html -->
|
|
259
305
|
<auro-checkbox-group appearance="inverse" error="custom error">
|
|
260
306
|
<span slot="legend">Form label goes here</span>
|
|
261
307
|
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
@@ -267,8 +313,8 @@ The `error` attribute used to set error state on the entire `<auro-checkbox-grou
|
|
|
267
313
|
</div>
|
|
268
314
|
<auro-accordion alignRight>
|
|
269
315
|
<span slot="trigger">See code</span>
|
|
270
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
271
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
316
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error-group.html) -->
|
|
317
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/error-group.html -->
|
|
272
318
|
|
|
273
319
|
```html
|
|
274
320
|
<auro-checkbox-group error="custom error">
|
|
@@ -280,8 +326,8 @@ The `error` attribute used to set error state on the entire `<auro-checkbox-grou
|
|
|
280
326
|
</auro-checkbox-group>
|
|
281
327
|
```
|
|
282
328
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
283
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
284
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
329
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-error.html) -->
|
|
330
|
+
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-error.html -->
|
|
285
331
|
<auro-checkbox-group appearance="inverse" error="custom error">
|
|
286
332
|
<span slot="legend">Form label goes here</span>
|
|
287
333
|
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
@@ -292,12 +338,6 @@ The `error` attribute used to set error state on the entire `<auro-checkbox-grou
|
|
|
292
338
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
293
339
|
</auro-accordion>
|
|
294
340
|
|
|
295
|
-
### Form Validation
|
|
296
|
-
|
|
297
|
-
In the `auro-checkbox-group` element, the `required` and `error` states are the tqo possible validation states.
|
|
298
|
-
|
|
299
|
-
It should be noted that form validation is only supported within an `auro-checkbox-group` element. In order to support validation on a single `auro-checkbox` element, it must be wrapped in an `auro-checkbox-group`.
|
|
300
|
-
|
|
301
341
|
#### Required
|
|
302
342
|
|
|
303
343
|
When present, the `required` attribute specifies that at least one or more `<auro-checkbox>` elements within the `<auro-checkbox-group>` must be checked.
|
|
@@ -331,12 +371,15 @@ When present, the `required` attribute specifies that at least one or more `<aur
|
|
|
331
371
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
332
372
|
</auro-accordion>
|
|
333
373
|
|
|
334
|
-
|
|
374
|
+
## Slot Examples
|
|
375
|
+
|
|
376
|
+
### Custom Optional Label
|
|
377
|
+
|
|
335
378
|
The `<auro-checkbox-group>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
|
|
336
379
|
|
|
337
380
|
<div class="exampleWrapper">
|
|
338
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
339
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
381
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optional-label.html) -->
|
|
382
|
+
<!-- The below content is automatically added from ./../apiExamples/optional-label.html -->
|
|
340
383
|
<auro-checkbox-group>
|
|
341
384
|
<span slot="legend">Form label goes here</span>
|
|
342
385
|
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
@@ -349,8 +392,8 @@ The `<auro-checkbox-group>` supports an `optionalLabel` slot, where users can ca
|
|
|
349
392
|
</div>
|
|
350
393
|
<auro-accordion alignRight>
|
|
351
394
|
<span slot="trigger">See code</span>
|
|
352
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
353
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
395
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optional-label.html) -->
|
|
396
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/optional-label.html -->
|
|
354
397
|
|
|
355
398
|
```html
|
|
356
399
|
<auro-checkbox-group>
|
|
@@ -365,15 +408,15 @@ The `<auro-checkbox-group>` supports an `optionalLabel` slot, where users can ca
|
|
|
365
408
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
366
409
|
</auro-accordion>
|
|
367
410
|
|
|
368
|
-
|
|
411
|
+
## Common Usage Patterns & Functional Examples
|
|
369
412
|
|
|
370
|
-
|
|
413
|
+
### Reset State
|
|
371
414
|
|
|
372
415
|
Use the `reset()` method to reset the `<auro-checkbox-group>`'s `value` and `validity` state. Doing so will preserve all other attributes and properties.
|
|
373
416
|
|
|
374
417
|
<div class="exampleWrapper">
|
|
375
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/
|
|
376
|
-
<!-- The below content is automatically added from ./../apiExamples/
|
|
418
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reset-state.html) -->
|
|
419
|
+
<!-- The below content is automatically added from ./../apiExamples/reset-state.html -->
|
|
377
420
|
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
378
421
|
<br/><br/>
|
|
379
422
|
<auro-checkbox-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
|
|
@@ -387,8 +430,8 @@ Use the `reset()` method to reset the `<auro-checkbox-group>`'s `value` and `val
|
|
|
387
430
|
</div>
|
|
388
431
|
<auro-accordion alignRight>
|
|
389
432
|
<span slot="trigger">See code</span>
|
|
390
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
391
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
433
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.html) -->
|
|
434
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.html -->
|
|
392
435
|
|
|
393
436
|
```html
|
|
394
437
|
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
@@ -402,8 +445,8 @@ Use the `reset()` method to reset the `<auro-checkbox-group>`'s `value` and `val
|
|
|
402
445
|
</auro-checkbox-group>
|
|
403
446
|
```
|
|
404
447
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
405
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/
|
|
406
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/
|
|
448
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.js) -->
|
|
449
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.js -->
|
|
407
450
|
|
|
408
451
|
```js
|
|
409
452
|
export function resetStateExample() {
|
|
@@ -417,9 +460,9 @@ export function resetStateExample() {
|
|
|
417
460
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
418
461
|
</auro-accordion>
|
|
419
462
|
|
|
420
|
-
|
|
463
|
+
## Restyle Component with CSS Variables
|
|
421
464
|
|
|
422
|
-
The component may be restyled
|
|
465
|
+
The component may be restyled by changing the values of the following token(s).
|
|
423
466
|
|
|
424
467
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
|
|
425
468
|
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|