@aurodesignsystem-dev/auro-formkit 0.0.0-pr1451.2 → 0.0.0-pr1451.21
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/checkbox/README.md +11 -27
- package/components/checkbox/demo/accessibility.html +49 -0
- package/components/checkbox/demo/accessibility.md +44 -0
- package/components/checkbox/demo/api.html +17 -25
- package/components/checkbox/demo/api.md +40 -416
- package/components/checkbox/demo/api.min.js +5 -4
- package/components/checkbox/demo/customize.html +52 -0
- package/components/checkbox/demo/customize.md +361 -0
- package/components/checkbox/demo/demo-support.js +60 -0
- package/components/checkbox/demo/design.html +52 -0
- package/components/checkbox/demo/design.md +149 -0
- package/components/checkbox/demo/getting-started.html +52 -0
- package/components/checkbox/demo/getting-started.md +261 -0
- package/components/checkbox/demo/index.html +17 -20
- package/components/checkbox/demo/index.md +144 -29
- package/components/checkbox/demo/index.min.js +5 -4
- package/components/checkbox/demo/keyboard-behavior.html +49 -0
- package/components/checkbox/demo/keyboard-behavior.md +0 -3
- package/components/checkbox/demo/layout.md +30 -0
- package/components/checkbox/demo/readme.html +10 -17
- package/components/checkbox/demo/readme.md +11 -27
- package/components/checkbox/demo/styles.css +974 -0
- package/components/checkbox/demo/voiceover.html +49 -0
- package/components/checkbox/demo/voiceover.md +37 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +1 -0
- package/components/checkbox/dist/index.js +5 -4
- package/components/checkbox/dist/registered.js +5 -4
- package/components/combobox/README.md +8 -29
- package/components/combobox/demo/accessibility.html +2 -20
- package/components/combobox/demo/accessibility.md +1 -1
- package/components/combobox/demo/api.html +5 -52
- package/components/combobox/demo/api.md +53 -2261
- package/components/combobox/demo/api.min.js +15 -12
- package/components/combobox/demo/customize.html +53 -0
- package/components/combobox/demo/customize.js +24 -0
- package/components/combobox/demo/customize.md +1249 -0
- package/components/combobox/demo/customize.min.js +18132 -0
- package/components/combobox/demo/demo-support.js +60 -0
- package/components/combobox/demo/design.html +2 -43
- package/components/combobox/demo/design.md +4 -4
- package/components/combobox/demo/getting-started.html +53 -0
- package/components/combobox/demo/{install.js → getting-started.js} +2 -5
- package/components/combobox/demo/getting-started.md +397 -0
- package/components/combobox/demo/{install.min.js → getting-started.min.js} +14 -38
- package/components/combobox/demo/index.html +4 -47
- package/components/combobox/demo/index.md +3 -569
- package/components/combobox/demo/index.min.js +15 -12
- package/components/combobox/demo/keyboard-behavior.html +2 -20
- package/components/combobox/demo/keyboard-behavior.md +2 -2
- package/components/combobox/demo/layout.md +2 -2
- package/components/combobox/demo/readme.html +2 -43
- package/components/combobox/demo/readme.md +8 -29
- package/components/combobox/demo/styles.css +98 -105
- package/components/combobox/demo/voiceover.html +2 -20
- package/components/combobox/demo/voiceover.md +1 -1
- package/components/combobox/dist/index.js +12 -10
- package/components/combobox/dist/registered.js +12 -10
- package/components/counter/README.md +21 -51
- package/components/counter/demo/accessibility.html +49 -0
- package/components/counter/demo/accessibility.md +34 -0
- package/components/counter/demo/api.html +12 -20
- package/components/counter/demo/api.md +49 -1299
- package/components/counter/demo/api.min.js +6 -6
- package/components/counter/demo/customize.html +53 -0
- package/components/counter/demo/customize.md +650 -0
- package/components/counter/demo/demo-support.js +60 -0
- package/components/counter/demo/design.html +52 -0
- package/components/counter/demo/design.md +192 -0
- package/components/counter/demo/getting-started.html +54 -0
- package/components/counter/demo/getting-started.md +332 -0
- package/components/counter/demo/index.html +14 -19
- package/components/counter/demo/index.md +113 -47
- package/components/counter/demo/index.min.js +6 -6
- package/components/counter/demo/keyboard-behavior.html +49 -0
- package/components/counter/demo/keyboard-behavior.md +1 -1
- package/components/counter/demo/keyboardBehavior.html +7 -39
- package/components/counter/demo/layout.md +10 -0
- package/components/counter/demo/readme.html +11 -15
- package/components/counter/demo/readme.md +21 -51
- package/components/counter/demo/styles.css +974 -0
- package/components/counter/demo/voiceover.html +51 -0
- package/components/counter/demo/voiceover.md +80 -0
- package/components/counter/dist/index.js +6 -6
- package/components/counter/dist/registered.js +6 -6
- package/components/datepicker/README.md +10 -24
- package/components/datepicker/demo/accessibility.html +50 -0
- package/components/datepicker/demo/accessibility.md +64 -0
- package/components/datepicker/demo/api.md +69 -1739
- package/components/datepicker/demo/api.min.js +14 -14
- package/components/datepicker/demo/customize.html +53 -0
- package/components/datepicker/demo/customize.md +723 -0
- package/components/datepicker/demo/demo-support.js +60 -0
- package/components/{select/demo/layout.html → datepicker/demo/design.html} +7 -47
- package/components/datepicker/demo/design.md +158 -0
- package/components/datepicker/demo/getting-started.html +53 -0
- package/components/datepicker/demo/getting-started.md +237 -0
- package/components/datepicker/demo/index.html +14 -34
- package/components/datepicker/demo/index.md +160 -103
- package/components/datepicker/demo/index.min.js +14 -14
- package/components/datepicker/demo/keyboard-behavior.html +12 -33
- package/components/datepicker/demo/layout.md +92 -0
- package/components/datepicker/demo/readme.md +10 -24
- package/components/datepicker/demo/styles.css +974 -0
- package/components/{dropdown/demo/keyboardBehavior.html → datepicker/demo/voiceover.html} +14 -36
- package/components/datepicker/demo/voiceover.md +98 -0
- package/components/datepicker/dist/index.js +14 -14
- package/components/datepicker/dist/registered.js +14 -14
- package/components/dropdown/README.md +0 -25
- package/components/dropdown/demo/accessibility.html +49 -0
- package/components/dropdown/demo/accessibility.md +45 -0
- package/components/dropdown/demo/api.html +10 -19
- package/components/dropdown/demo/api.md +40 -1364
- package/components/dropdown/demo/api.min.js +2 -2
- package/components/dropdown/demo/customize.html +54 -0
- package/components/dropdown/demo/customize.md +780 -0
- package/components/dropdown/demo/demo-support.js +60 -0
- package/components/dropdown/demo/design.html +52 -0
- package/components/dropdown/demo/design.md +186 -0
- package/components/dropdown/demo/getting-started.html +54 -0
- package/components/dropdown/demo/getting-started.md +317 -0
- package/components/dropdown/demo/index.html +12 -20
- package/components/dropdown/demo/index.md +70 -225
- package/components/dropdown/demo/index.min.js +2 -2
- package/components/dropdown/demo/keyboard-behavior.html +49 -0
- package/components/dropdown/demo/keyboard-behavior.md +4 -8
- package/components/dropdown/demo/layout.md +21 -0
- package/components/dropdown/demo/readme.html +7 -20
- package/components/dropdown/demo/readme.md +0 -25
- package/components/dropdown/demo/styles.css +974 -0
- package/components/dropdown/demo/voiceover.html +51 -0
- package/components/dropdown/demo/voiceover.md +63 -0
- package/components/dropdown/dist/index.js +2 -2
- package/components/dropdown/dist/registered.js +2 -2
- package/components/form/README.md +9 -13
- package/components/form/demo/accessibility.html +51 -0
- package/components/form/demo/accessibility.md +23 -0
- package/components/form/demo/api.html +11 -14
- package/components/form/demo/api.md +14 -290
- package/components/form/demo/api.min.js +53 -50
- package/components/form/demo/customize.html +54 -0
- package/components/form/demo/customize.md +246 -0
- package/components/form/demo/demo-support.js +60 -0
- package/components/form/demo/getting-started.html +54 -0
- package/components/form/demo/getting-started.md +291 -0
- package/components/form/demo/index.html +12 -14
- package/components/form/demo/index.md +66 -96
- package/components/form/demo/index.min.js +53 -50
- package/components/form/demo/keyboard-behavior.html +51 -0
- package/components/form/demo/readme.html +12 -17
- package/components/form/demo/readme.md +9 -13
- package/components/form/demo/styles.css +974 -0
- package/components/form/demo/voiceover.html +51 -0
- package/components/form/demo/voiceover.md +36 -0
- package/components/helptext/dist/index.js +1 -1
- package/components/helptext/dist/registered.js +1 -1
- package/components/input/README.md +17 -28
- package/components/input/demo/accessibility.html +38 -0
- package/components/input/demo/accessibility.md +69 -0
- package/components/input/demo/api.html +17 -22
- package/components/input/demo/api.js +4 -23
- package/components/input/demo/api.md +67 -1267
- package/components/input/demo/api.min.js +6 -98
- package/components/input/demo/customize.html +54 -0
- package/components/input/demo/customize.js +25 -0
- package/components/input/demo/customize.md +1372 -0
- package/components/input/demo/customize.min.js +7431 -0
- package/components/input/demo/demo-support.js +60 -0
- package/components/input/demo/design.html +39 -0
- package/components/input/demo/design.md +224 -0
- package/components/input/demo/getting-started.html +53 -0
- package/components/input/demo/getting-started.js +8 -0
- package/components/input/demo/getting-started.md +312 -0
- package/components/input/demo/getting-started.min.js +7369 -0
- package/components/input/demo/index.html +16 -22
- package/components/input/demo/index.js +0 -11
- package/components/input/demo/index.md +171 -139
- package/components/input/demo/index.min.js +6 -18
- package/components/input/demo/keyboard-behavior.html +38 -0
- package/components/input/demo/layout.md +77 -0
- package/components/input/demo/readme.md +17 -28
- package/components/input/demo/styles.css +974 -0
- package/components/input/demo/voiceover.html +38 -0
- package/components/input/demo/voiceover.md +70 -0
- package/components/input/dist/base-input.d.ts +1 -0
- package/components/input/dist/index.js +6 -6
- package/components/input/dist/registered.js +6 -6
- package/components/menu/README.md +1 -5
- package/components/menu/demo/api.md +43 -43
- package/components/menu/demo/api.min.js +2 -2
- package/components/menu/demo/index.md +1 -1
- package/components/menu/demo/index.min.js +2 -2
- package/components/menu/demo/readme.md +1 -5
- package/components/menu/dist/index.js +2 -2
- package/components/menu/dist/registered.js +2 -2
- package/components/radio/README.md +9 -22
- package/components/radio/demo/accessibility.html +51 -0
- package/components/radio/demo/accessibility.md +44 -0
- package/components/radio/demo/api.html +13 -20
- package/components/radio/demo/api.md +44 -589
- package/components/radio/demo/api.min.js +3 -3
- package/components/radio/demo/customize.html +53 -0
- package/components/radio/demo/customize.md +368 -0
- package/components/radio/demo/demo-support.js +60 -0
- package/components/radio/demo/design.html +52 -0
- package/components/radio/demo/design.md +143 -0
- package/components/radio/demo/getting-started.html +54 -0
- package/components/radio/demo/getting-started.md +296 -0
- package/components/radio/demo/index.html +16 -19
- package/components/radio/demo/index.md +110 -45
- package/components/radio/demo/index.min.js +3 -3
- package/components/radio/demo/keyboard-behavior.html +51 -0
- package/components/radio/demo/layout.md +30 -0
- package/components/radio/demo/readme.html +11 -17
- package/components/radio/demo/readme.md +9 -22
- package/components/radio/demo/styles.css +974 -0
- package/components/radio/demo/voiceover.html +51 -0
- package/components/radio/demo/voiceover.md +43 -0
- package/components/radio/dist/index.js +3 -3
- package/components/radio/dist/registered.js +3 -3
- package/components/select/README.md +7 -4
- package/components/select/demo/accessibility.html +5 -21
- package/components/select/demo/accessibility.md +1 -1
- package/components/select/demo/api.html +3 -48
- package/components/select/demo/api.md +52 -2342
- package/components/select/demo/customize.html +54 -0
- package/components/select/demo/customize.js +11 -0
- package/components/select/demo/customize.md +1049 -0
- package/components/select/demo/{api.min.js → customize.min.js} +12 -113
- package/components/select/demo/demo-support.js +60 -0
- package/components/select/demo/design.html +3 -44
- package/components/select/demo/design.md +2 -2
- package/components/select/demo/getting-started.html +5 -76
- package/components/select/demo/getting-started.js +20 -3
- package/components/select/demo/getting-started.md +97 -705
- package/components/select/demo/getting-started.min.js +58 -9
- package/components/select/demo/index.html +4 -43
- package/components/select/demo/index.js +5 -3
- package/components/select/demo/index.md +2 -2
- package/components/select/demo/index.min.js +14 -9
- package/components/select/demo/keyboard-behavior.html +6 -47
- package/components/select/demo/keyboard-behavior.md +5 -6
- package/components/select/demo/keyboardBehavior.html +4 -46
- package/components/select/demo/readme.html +3 -44
- package/components/select/demo/readme.md +7 -4
- package/components/select/demo/styles.css +57 -109
- package/components/select/demo/voiceover.html +3 -30
- package/components/select/dist/index.js +5 -5
- package/components/select/dist/registered.js +5 -5
- package/custom-elements.json +249 -246
- package/package.json +3 -3
- package/components/combobox/demo/install.html +0 -94
- package/components/combobox/demo/install.md +0 -98
- package/components/select/demo/api.js +0 -39
- package/components/select/demo/install.md +0 -92
|
@@ -8,41 +8,41 @@ The `auro-checkbox-group` element is a wrapper for `auro-checkbox` elements..
|
|
|
8
8
|
## Properties
|
|
9
9
|
|
|
10
10
|
| Property | Attribute | Type | Default | Description |
|
|
11
|
-
|---------------------------------|---------------------------------|--------------------------|-------------|--------------------------------------------------|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
11
|
+
|---------------------------------|---------------------------------|--------------------------|-------------|--------------------------------------------------|
|
|
12
|
+
| `appearance` | `appearance` | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
|
|
13
|
+
| `disabled` | `disabled` | `boolean` | | If set, disables the checkbox group. |
|
|
14
|
+
| `error` | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
15
|
+
| `horizontal` | `horizontal` | `boolean` | | If set, checkboxes will be aligned horizontally. |
|
|
16
|
+
| `noValidate` | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
17
|
+
| `onDark` | `onDark` | `boolean` | | DEPRECATED - use `appearance="inverse"` instead. |
|
|
18
|
+
| `required` | `required` | `boolean` | | Populates the `required` attribute on the element. Used for client-side validation. |
|
|
19
|
+
| `setCustomValidity` | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
20
|
+
| `setCustomValidityCustomError` | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
21
|
+
| `setCustomValidityValueMissing` | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
22
|
+
| `validity` | `validity` | `string` | | Specifies the `validityState` this element is in. |
|
|
23
23
|
|
|
24
24
|
## Methods
|
|
25
25
|
|
|
26
26
|
| Method | Type | Description |
|
|
27
|
-
|------------|----------------------------------------|--------------------------------------------------|
|
|
28
|
-
|
|
|
29
|
-
|
|
|
27
|
+
|------------|----------------------------------------|--------------------------------------------------|
|
|
28
|
+
| `reset` | `(): void` | Resets component to initial state. |
|
|
29
|
+
| `validate` | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
30
30
|
|
|
31
31
|
## Events
|
|
32
32
|
|
|
33
33
|
| Event | Type | Description |
|
|
34
34
|
|-----------------------------|--------------------|--------------------------------------------------|
|
|
35
|
-
| `auroFormElement-validated` | | Notifies that the `validity` and `errorMessage` values have changed. |
|
|
36
|
-
|
|
|
35
|
+
| `auroFormElement-validated` | | Notifies that the `validity` and `errorMessage` values have changed. |
|
|
36
|
+
| `input` | `CustomEvent<any>` | |
|
|
37
37
|
|
|
38
38
|
## Slots
|
|
39
39
|
|
|
40
40
|
| Name | Description |
|
|
41
|
-
|-----------------|--------------------------------------------------|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
41
|
+
|-----------------|--------------------------------------------------|
|
|
42
|
+
| `default` | The default slot for the checkbox items. |
|
|
43
|
+
| `helpText` | Allows for the helper text to be overridden. |
|
|
44
|
+
| `legend` | Allows for the legend to be overridden. |
|
|
45
|
+
| `optionalLabel` | Allows overriding the optional display text "(optional)", which appears next to the label. |
|
|
46
46
|
|
|
47
47
|
# auro-checkbox
|
|
48
48
|
|
|
@@ -51,21 +51,21 @@ The `auro-checkbox` element is for the purpose of allowing users to select one o
|
|
|
51
51
|
## Properties
|
|
52
52
|
|
|
53
53
|
| Property | Attribute | Type | Default | Description |
|
|
54
|
-
|--------------|--------------|--------------------------|-------------|--------------------------------------------------|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
54
|
+
|--------------|--------------|--------------------------|-------------|--------------------------------------------------|
|
|
55
|
+
| `appearance` | `appearance` | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
|
|
56
|
+
| `checked` | `checked` | `boolean` | | If set to true, the checkbox will be filled with a checkmark. |
|
|
57
|
+
| `disabled` | `disabled` | `boolean` | | If set to true, the checkbox will not be clickable. |
|
|
58
|
+
| `error` | `error` | `boolean` | | If set to true, the checkbox will be displayed with an error state. |
|
|
59
|
+
| `id` | `id` | `string` | | The id global attribute defines an identifier (ID) which must be unique in the whole document. |
|
|
60
|
+
| `name` | `name` | `string` | | Accepts any string and is used to identify related checkboxes when submitting form data. |
|
|
61
|
+
| `onDark` | `onDark` | `boolean` | | DEPRECATED - use `appearance="inverse"` instead. |
|
|
62
|
+
| `value` | `value` | `string` | | Sets the element's input value. Must be unique within an auro-checkbox-group element. |
|
|
63
63
|
|
|
64
64
|
## Methods
|
|
65
65
|
|
|
66
66
|
| Method | Type | Description |
|
|
67
|
-
|---------|------------|------------------------------------|
|
|
68
|
-
|
|
|
67
|
+
|---------|------------|------------------------------------|
|
|
68
|
+
| `reset` | `(): void` | Resets component to initial state. |
|
|
69
69
|
|
|
70
70
|
## Events
|
|
71
71
|
|
|
@@ -73,397 +73,21 @@ The `auro-checkbox` element is for the purpose of allowing users to select one o
|
|
|
73
73
|
|-------------------------|--------------------|--------------------------------------------------|
|
|
74
74
|
| `auroCheckbox-focusin` | `CustomEvent<any>` | |
|
|
75
75
|
| `auroCheckbox-focusout` | `CustomEvent<any>` | |
|
|
76
|
-
| `auroCheckbox-input` | `CustomEvent<any>` | |
|
|
77
|
-
|
|
|
78
|
-
|
|
|
76
|
+
| `auroCheckbox-input` | `CustomEvent<any>` | |
|
|
77
|
+
| `change` | | (Deprecated) Notifies when checked value is changed. |
|
|
78
|
+
| `input` | | Notifies when when checked value is changed by user's interface. |
|
|
79
79
|
|
|
80
80
|
## Slots
|
|
81
81
|
|
|
82
82
|
| Name | Description |
|
|
83
|
-
|-----------|------------------------------------------|
|
|
84
|
-
|
|
|
83
|
+
|-----------|------------------------------------------|
|
|
84
|
+
| `default` | The default slot for the checkbox label. |
|
|
85
85
|
|
|
86
86
|
## CSS Shadow Parts
|
|
87
87
|
|
|
88
88
|
| Part | Description |
|
|
89
|
-
|------------------|-------------------------------------------|
|
|
90
|
-
|
|
|
89
|
+
|------------------|-------------------------------------------|
|
|
90
|
+
| `checkbox` | apply css to a specific checkbox. |
|
|
91
91
|
| `checkbox-input` | apply css to a specific checkbox's input. |
|
|
92
92
|
| `checkbox-label` | apply css to a specific checkbox's label. |
|
|
93
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
94
|
-
|
|
95
|
-
## Basic
|
|
96
|
-
|
|
97
|
-
<div class="exampleWrapper">
|
|
98
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
99
|
-
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
100
|
-
<auro-checkbox-group>
|
|
101
|
-
<span slot="legend">Form label goes here</span>
|
|
102
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
103
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
104
|
-
<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>
|
|
105
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
106
|
-
</auro-checkbox-group>
|
|
107
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
108
|
-
</div>
|
|
109
|
-
<auro-accordion alignRight>
|
|
110
|
-
<span slot="trigger">See code</span>
|
|
111
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
112
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
113
|
-
|
|
114
|
-
<pre class="language-html"><code class="language-html"><auro-checkbox-group>
|
|
115
|
-
<span slot="legend">Form label goes here</span>
|
|
116
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
117
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
118
|
-
<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>
|
|
119
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
120
|
-
</auro-checkbox-group></code></pre>
|
|
121
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
122
|
-
</auro-accordion>
|
|
123
|
-
|
|
124
|
-
## Property & Attribute Examples
|
|
125
|
-
|
|
126
|
-
### Appearance on Dark Backgrounds
|
|
127
|
-
|
|
128
|
-
Use the `appearance="inverse"` attribute to render the checkbox for use on dark backgrounds.
|
|
129
|
-
|
|
130
|
-
<div class="exampleWrapper--ondark" aria-hidden>
|
|
131
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
|
|
132
|
-
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
133
|
-
<auro-checkbox-group appearance="inverse">
|
|
134
|
-
<span slot="legend">Form label goes here</span>
|
|
135
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
136
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
137
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
138
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
139
|
-
</auro-checkbox-group>
|
|
140
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
141
|
-
</div>
|
|
142
|
-
<auro-accordion alignRight>
|
|
143
|
-
<span slot="trigger">See code</span>
|
|
144
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
|
|
145
|
-
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
|
|
146
|
-
<auro-checkbox-group appearance="inverse">
|
|
147
|
-
<span slot="legend">Form label goes here</span>
|
|
148
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
149
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
150
|
-
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
151
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
152
|
-
</auro-checkbox-group>
|
|
153
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
154
|
-
</auro-accordion>
|
|
155
|
-
|
|
156
|
-
### Disabled
|
|
157
|
-
|
|
158
|
-
Use the `disabled` attribute to disable individual `<auro-checkbox>` elements or the entire `<auro-checkbox-group>`.
|
|
159
|
-
|
|
160
|
-
#### Disabled Checkbox within Group
|
|
161
|
-
|
|
162
|
-
The `disabled` attribute used to disable a single `<auro-checkbox>` element.
|
|
163
|
-
|
|
164
|
-
<div class="exampleWrapper">
|
|
165
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
|
|
166
|
-
<!-- The below content is automatically added from ./../apiExamples/disabled.html -->
|
|
167
|
-
<auro-checkbox-group>
|
|
168
|
-
<span slot="legend">Form label goes here</span>
|
|
169
|
-
<auro-checkbox value="disabled-value1" name="disabled" id="checkbox-disabled1">Checkbox option</auro-checkbox>
|
|
170
|
-
<auro-checkbox value="disabled-value2" name="disabled" id="checkbox-disabled2" checked disabled>Disabled checkbox option</auro-checkbox>
|
|
171
|
-
<auro-checkbox value="disabled-value3" name="disabled" id="checkbox-disabled3" disabled>Disabled checkbox option</auro-checkbox>
|
|
172
|
-
<auro-checkbox value="disabled-value4" name="disabled" id="checkbox-disabled4" checked>Checkbox option</auro-checkbox>
|
|
173
|
-
</auro-checkbox-group>
|
|
174
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
175
|
-
</div>
|
|
176
|
-
<auro-accordion alignRight>
|
|
177
|
-
<span slot="trigger">See code</span>
|
|
178
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
|
|
179
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
|
|
180
|
-
|
|
181
|
-
<pre class="language-html"><code class="language-html"><auro-checkbox-group>
|
|
182
|
-
<span slot="legend">Form label goes here</span>
|
|
183
|
-
<auro-checkbox value="disabled-value1" name="disabled" id="checkbox-disabled1">Checkbox option</auro-checkbox>
|
|
184
|
-
<auro-checkbox value="disabled-value2" name="disabled" id="checkbox-disabled2" checked disabled>Disabled checkbox option</auro-checkbox>
|
|
185
|
-
<auro-checkbox value="disabled-value3" name="disabled" id="checkbox-disabled3" disabled>Disabled checkbox option</auro-checkbox>
|
|
186
|
-
<auro-checkbox value="disabled-value4" name="disabled" id="checkbox-disabled4" checked>Checkbox option</auro-checkbox>
|
|
187
|
-
</auro-checkbox-group></code></pre>
|
|
188
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
189
|
-
</auro-accordion>
|
|
190
|
-
|
|
191
|
-
#### Disabled Group
|
|
192
|
-
|
|
193
|
-
The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
194
|
-
|
|
195
|
-
<div class="exampleWrapper">
|
|
196
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled-group.html) -->
|
|
197
|
-
<!-- The below content is automatically added from ./../apiExamples/disabled-group.html -->
|
|
198
|
-
<auro-checkbox-group disabled>
|
|
199
|
-
<span slot="legend">Form label goes here</span>
|
|
200
|
-
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
201
|
-
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
202
|
-
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
203
|
-
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
204
|
-
</auro-checkbox-group>
|
|
205
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
206
|
-
</div>
|
|
207
|
-
<div class="exampleWrapper--ondark" aria-hidden>
|
|
208
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-disabled.html) -->
|
|
209
|
-
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-disabled.html -->
|
|
210
|
-
<auro-checkbox-group appearance="inverse" disabled>
|
|
211
|
-
<span slot="legend">Form label goes here</span>
|
|
212
|
-
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
213
|
-
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
214
|
-
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
215
|
-
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
216
|
-
</auro-checkbox-group>
|
|
217
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
218
|
-
</div>
|
|
219
|
-
<auro-accordion alignRight>
|
|
220
|
-
<span slot="trigger">See code</span>
|
|
221
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled-group.html) -->
|
|
222
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/disabled-group.html -->
|
|
223
|
-
|
|
224
|
-
<pre class="language-html"><code class="language-html"><auro-checkbox-group disabled>
|
|
225
|
-
<span slot="legend">Form label goes here</span>
|
|
226
|
-
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
227
|
-
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
228
|
-
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
229
|
-
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
230
|
-
</auro-checkbox-group></code></pre>
|
|
231
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
232
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-disabled.html) -->
|
|
233
|
-
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-disabled.html -->
|
|
234
|
-
<auro-checkbox-group appearance="inverse" disabled>
|
|
235
|
-
<span slot="legend">Form label goes here</span>
|
|
236
|
-
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
237
|
-
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
238
|
-
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
239
|
-
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
240
|
-
</auro-checkbox-group>
|
|
241
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
242
|
-
</auro-accordion>
|
|
243
|
-
|
|
244
|
-
### Horizontal Group
|
|
245
|
-
|
|
246
|
-
Using the `horizontal` attribute will render the checkbox options on a horizontal line.
|
|
247
|
-
|
|
248
|
-
**Note**: Using the `horizontal` attribute has a limit of 3 options. Beyond three, options will be listed in vertically.
|
|
249
|
-
|
|
250
|
-
<div class="exampleWrapper">
|
|
251
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/horizontal.html) -->
|
|
252
|
-
<!-- The below content is automatically added from ./../apiExamples/horizontal.html -->
|
|
253
|
-
<auro-checkbox-group horizontal>
|
|
254
|
-
<span slot="legend">Form label goes here</span>
|
|
255
|
-
<auro-checkbox value="yes" name="horizontal" id="checkbox-horizontal1">Yes</auro-checkbox>
|
|
256
|
-
<auro-checkbox value="no" name="horizontal" id="checkbox-horizontal2">No</auro-checkbox>
|
|
257
|
-
<auro-checkbox value="maybe" name="horizontal" id="checkbox-horizontal3">Maybe</auro-checkbox>
|
|
258
|
-
</auro-checkbox-group>
|
|
259
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
260
|
-
</div>
|
|
261
|
-
<auro-accordion alignRight>
|
|
262
|
-
<span slot="trigger">See code</span>
|
|
263
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/horizontal.html) -->
|
|
264
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/horizontal.html -->
|
|
265
|
-
|
|
266
|
-
<pre class="language-html"><code class="language-html"><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></code></pre>
|
|
272
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
273
|
-
</auro-accordion>
|
|
274
|
-
|
|
275
|
-
### Form Validation
|
|
276
|
-
|
|
277
|
-
In the `auro-checkbox-group` element, the `required` and `error` states are the two possible validation states.
|
|
278
|
-
|
|
279
|
-
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`.
|
|
280
|
-
|
|
281
|
-
### Error
|
|
282
|
-
|
|
283
|
-
Use the `error` attribute to force an error state on the element.
|
|
284
|
-
|
|
285
|
-
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.
|
|
286
|
-
|
|
287
|
-
**Note**: The `error` attribute is only supported on the `<auro-checkbox-group>` element, not on individual `<auro-checkbox>` elements.
|
|
288
|
-
|
|
289
|
-
<div class="exampleWrapper">
|
|
290
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/error-group.html) -->
|
|
291
|
-
<!-- The below content is automatically added from ./../apiExamples/error-group.html -->
|
|
292
|
-
<auro-checkbox-group error="custom error">
|
|
293
|
-
<span slot="legend">Form label goes here</span>
|
|
294
|
-
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
295
|
-
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
296
|
-
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
297
|
-
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
298
|
-
</auro-checkbox-group>
|
|
299
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
300
|
-
</div>
|
|
301
|
-
<div class="exampleWrapper--ondark" aria-hidden>
|
|
302
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-error.html) -->
|
|
303
|
-
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-error.html -->
|
|
304
|
-
<auro-checkbox-group appearance="inverse" error="custom error">
|
|
305
|
-
<span slot="legend">Form label goes here</span>
|
|
306
|
-
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
307
|
-
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
308
|
-
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
309
|
-
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
310
|
-
</auro-checkbox-group>
|
|
311
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
312
|
-
</div>
|
|
313
|
-
<auro-accordion alignRight>
|
|
314
|
-
<span slot="trigger">See code</span>
|
|
315
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error-group.html) -->
|
|
316
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/error-group.html -->
|
|
317
|
-
|
|
318
|
-
<pre class="language-html"><code class="language-html"><auro-checkbox-group error="custom error">
|
|
319
|
-
<span slot="legend">Form label goes here</span>
|
|
320
|
-
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
321
|
-
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
322
|
-
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
323
|
-
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
324
|
-
</auro-checkbox-group></code></pre>
|
|
325
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
326
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-error.html) -->
|
|
327
|
-
<!-- The below content is automatically added from ./../apiExamples/appearance-inverse-error.html -->
|
|
328
|
-
<auro-checkbox-group appearance="inverse" error="custom error">
|
|
329
|
-
<span slot="legend">Form label goes here</span>
|
|
330
|
-
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
331
|
-
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
332
|
-
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
333
|
-
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
334
|
-
</auro-checkbox-group>
|
|
335
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
336
|
-
</auro-accordion>
|
|
337
|
-
|
|
338
|
-
#### Required
|
|
339
|
-
|
|
340
|
-
When present, the `required` attribute specifies that at least one or more `<auro-checkbox>` elements within the `<auro-checkbox-group>` must be checked.
|
|
341
|
-
|
|
342
|
-
<div class="exampleWrapper">
|
|
343
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/required.html) -->
|
|
344
|
-
<!-- The below content is automatically added from ./../apiExamples/required.html -->
|
|
345
|
-
<auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
346
|
-
<span slot="legend">Form label goes here</span>
|
|
347
|
-
<auro-checkbox value="value1" name="required" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
348
|
-
<auro-checkbox value="value2" name="required" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
349
|
-
<auro-checkbox value="value3" name="required" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
350
|
-
<auro-checkbox value="value4" name="required" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
351
|
-
</auro-checkbox-group>
|
|
352
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
353
|
-
</div>
|
|
354
|
-
<auro-accordion alignRight>
|
|
355
|
-
<span slot="trigger">See code</span>
|
|
356
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/required.html) -->
|
|
357
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/required.html -->
|
|
358
|
-
|
|
359
|
-
<pre class="language-html"><code class="language-html"><auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
360
|
-
<span slot="legend">Form label goes here</span>
|
|
361
|
-
<auro-checkbox value="value1" name="required" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
362
|
-
<auro-checkbox value="value2" name="required" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
363
|
-
<auro-checkbox value="value3" name="required" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
364
|
-
<auro-checkbox value="value4" name="required" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
365
|
-
</auro-checkbox-group></code></pre>
|
|
366
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
367
|
-
</auro-accordion>
|
|
368
|
-
|
|
369
|
-
## Slot Examples
|
|
370
|
-
|
|
371
|
-
### Custom Optional Label
|
|
372
|
-
|
|
373
|
-
The `<auro-checkbox-group>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
|
|
374
|
-
|
|
375
|
-
<div class="exampleWrapper">
|
|
376
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optional-label.html) -->
|
|
377
|
-
<!-- The below content is automatically added from ./../apiExamples/optional-label.html -->
|
|
378
|
-
<auro-checkbox-group>
|
|
379
|
-
<span slot="legend">Form label goes here</span>
|
|
380
|
-
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
381
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
382
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
383
|
-
<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>
|
|
384
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
385
|
-
</auro-checkbox-group>
|
|
386
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
387
|
-
</div>
|
|
388
|
-
<auro-accordion alignRight>
|
|
389
|
-
<span slot="trigger">See code</span>
|
|
390
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optional-label.html) -->
|
|
391
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/optional-label.html -->
|
|
392
|
-
|
|
393
|
-
<pre class="language-html"><code class="language-html"><auro-checkbox-group>
|
|
394
|
-
<span slot="legend">Form label goes here</span>
|
|
395
|
-
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
396
|
-
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
397
|
-
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
398
|
-
<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>
|
|
399
|
-
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
400
|
-
</auro-checkbox-group></code></pre>
|
|
401
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
402
|
-
</auro-accordion>
|
|
403
|
-
|
|
404
|
-
## Common Usage Patterns & Functional Examples
|
|
405
|
-
|
|
406
|
-
### Reset State
|
|
407
|
-
|
|
408
|
-
Use the `reset()` method to reset the `<auro-checkbox-group>`'s `value` and `validity` state. Doing so will preserve all other attributes and properties.
|
|
409
|
-
|
|
410
|
-
<div class="exampleWrapper">
|
|
411
|
-
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reset-state.html) -->
|
|
412
|
-
<!-- The below content is automatically added from ./../apiExamples/reset-state.html -->
|
|
413
|
-
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
414
|
-
<br/><br/>
|
|
415
|
-
<auro-checkbox-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
|
|
416
|
-
<span slot="legend">Form label goes here</span>
|
|
417
|
-
<auro-checkbox value="value1" name="resetState" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
418
|
-
<auro-checkbox value="value2" name="resetState" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
419
|
-
<auro-checkbox value="value3" name="resetState" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
420
|
-
<auro-checkbox value="value4" name="resetState" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
421
|
-
</auro-checkbox-group>
|
|
422
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
423
|
-
</div>
|
|
424
|
-
<auro-accordion alignRight>
|
|
425
|
-
<span slot="trigger">See code</span>
|
|
426
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.html) -->
|
|
427
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.html -->
|
|
428
|
-
|
|
429
|
-
<pre class="language-html"><code class="language-html"><auro-button id="resetStateBtn">Reset</auro-button>
|
|
430
|
-
<br/><br/>
|
|
431
|
-
<auro-checkbox-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
|
|
432
|
-
<span slot="legend">Form label goes here</span>
|
|
433
|
-
<auro-checkbox value="value1" name="resetState" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
434
|
-
<auro-checkbox value="value2" name="resetState" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
435
|
-
<auro-checkbox value="value3" name="resetState" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
436
|
-
<auro-checkbox value="value4" name="resetState" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
437
|
-
</auro-checkbox-group></code></pre>
|
|
438
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
439
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.js) -->
|
|
440
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/reset-state.js -->
|
|
441
|
-
|
|
442
|
-
<pre class="language-js"><code class="language-js">export function resetStateExample() {
|
|
443
|
-
const elem = document.querySelector('#resetStateExample');
|
|
444
|
-
|
|
445
|
-
document.querySelector('#resetStateBtn').addEventListener('click', () => {
|
|
446
|
-
elem.reset();
|
|
447
|
-
});
|
|
448
|
-
}</code></pre>
|
|
449
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
450
|
-
</auro-accordion>
|
|
451
|
-
|
|
452
|
-
## Restyle Component with CSS Variables
|
|
453
|
-
|
|
454
|
-
The component may be restyled by changing the values of the following token(s).
|
|
455
|
-
|
|
456
|
-
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
|
|
457
|
-
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
458
|
-
|
|
459
|
-
<pre class="language-scss"><code class="language-scss">@use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
|
|
460
|
-
|
|
461
|
-
:host {
|
|
462
|
-
--ds-auro-checkbox-border-color: var(--ds-basic-color-border-bold, #{v.$ds-basic-color-border-bold});
|
|
463
|
-
--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator, #{v.$ds-advanced-color-boolean-indicator});
|
|
464
|
-
--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #{v.$ds-advanced-color-boolean-isfalse});
|
|
465
|
-
--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
466
|
-
--ds-auro-checkbox-outline-color: transparent;
|
|
467
|
-
--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
468
|
-
}</code></pre>
|
|
469
93
|
<!-- AURO-GENERATED-CONTENT:END -->
|