@aurodesignsystem/auro-formkit 2.0.0-beta.1 → 2.0.0-beta.3
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/.turbo/cache/013a48308b893dac-meta.json +1 -1
- package/.turbo/cache/02244170c798a2bd-meta.json +1 -0
- package/.turbo/cache/02244170c798a2bd.tar.zst +0 -0
- package/.turbo/cache/07ca42419b9f050c-meta.json +1 -1
- package/.turbo/cache/0cea4c1f34f3683b-meta.json +1 -1
- package/.turbo/cache/17259cf94d8f8925-meta.json +1 -1
- package/.turbo/cache/1ab37ce15d9be440-meta.json +1 -0
- package/.turbo/cache/1ab37ce15d9be440.tar.zst +0 -0
- package/.turbo/cache/1b9818717e4bdf9f-meta.json +1 -0
- package/.turbo/cache/1b9818717e4bdf9f.tar.zst +0 -0
- package/.turbo/cache/1c0f580d37370ba2-meta.json +1 -0
- package/.turbo/cache/1c0f580d37370ba2.tar.zst +0 -0
- package/.turbo/cache/1c99a949ec63ab35-meta.json +1 -1
- package/.turbo/cache/1de15d89eed2d760-meta.json +1 -1
- package/.turbo/cache/2110a4d14e0d11b2-meta.json +1 -0
- package/.turbo/cache/2110a4d14e0d11b2.tar.zst +0 -0
- package/.turbo/cache/257a7a26ea72dbc5-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967-meta.json +1 -1
- package/.turbo/cache/2990aaa7ebc5b967.tar.zst +0 -0
- package/.turbo/cache/2fd056afdf4eb39d-meta.json +1 -0
- package/.turbo/cache/2fd056afdf4eb39d.tar.zst +0 -0
- package/.turbo/cache/3bf45120d0cc9bd8-meta.json +1 -1
- package/.turbo/cache/3e12285c614db539-meta.json +1 -0
- package/.turbo/cache/3e12285c614db539.tar.zst +0 -0
- package/.turbo/cache/45035bf5c4147ccd-meta.json +1 -1
- package/.turbo/cache/4f92cea2d8c63de2-meta.json +1 -1
- package/.turbo/cache/5bf2d3f7ba5891e0-meta.json +1 -0
- package/.turbo/cache/5bf2d3f7ba5891e0.tar.zst +0 -0
- package/.turbo/cache/5c16ce3cff5c9dff-meta.json +1 -1
- package/.turbo/cache/5f304c0f37ef25f3-meta.json +1 -1
- package/.turbo/cache/64de7a53e02db647-meta.json +1 -1
- package/.turbo/cache/691a74627ec57993-meta.json +1 -1
- package/.turbo/cache/69aae513b7ec6c7d-meta.json +1 -1
- package/.turbo/cache/6dd67d179191bda8-meta.json +1 -0
- package/.turbo/cache/6dd67d179191bda8.tar.zst +0 -0
- package/.turbo/cache/6dd7058e6703cb35-meta.json +1 -1
- package/.turbo/cache/73e9073a5274616d-meta.json +1 -1
- package/.turbo/cache/773edc0f83c8c5a5-meta.json +1 -1
- package/.turbo/cache/784c03fe9fd5ac05-meta.json +1 -1
- package/.turbo/cache/786a822763403879-meta.json +1 -1
- package/.turbo/cache/7e1043cffa69f327-meta.json +1 -0
- package/.turbo/cache/7e1043cffa69f327.tar.zst +0 -0
- package/.turbo/cache/80a13352066a9801-meta.json +1 -0
- package/.turbo/cache/80a13352066a9801.tar.zst +0 -0
- package/.turbo/cache/80b5d974184a01df-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd-meta.json +1 -1
- package/.turbo/cache/87219c41a4ace9cd.tar.zst +0 -0
- package/.turbo/cache/8954c6073396fadd-meta.json +1 -1
- package/.turbo/cache/8e79bd5c3a16a72e-meta.json +1 -0
- package/.turbo/cache/92daa6d7c389d548-meta.json +1 -1
- package/.turbo/cache/993dff2edb7b6766-meta.json +1 -1
- package/.turbo/cache/9a097d6576dadd64-meta.json +1 -1
- package/.turbo/cache/a63cbfecf0f78586-meta.json +1 -0
- package/.turbo/cache/a63cbfecf0f78586.tar.zst +0 -0
- package/.turbo/cache/a6a56bb802e1c20f-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8-meta.json +1 -1
- package/.turbo/cache/a77bc920ea508bb8.tar.zst +0 -0
- package/.turbo/cache/b2c66328fdd78093-meta.json +1 -0
- package/.turbo/cache/b2c66328fdd78093.tar.zst +0 -0
- package/.turbo/cache/b54fc4f664a7a5a0-meta.json +1 -1
- package/.turbo/cache/ba4418918621fbcd-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b-meta.json +1 -1
- package/.turbo/cache/be7c23c37b8ec74b.tar.zst +0 -0
- package/.turbo/cache/bffc7582905c2a5e-meta.json +1 -0
- package/.turbo/cache/bffc7582905c2a5e.tar.zst +0 -0
- package/.turbo/cache/caa0b4ac8d2a04dd-meta.json +1 -1
- package/.turbo/cache/caa0b4ac8d2a04dd.tar.zst +0 -0
- package/.turbo/cache/cc81de9c0b452a7c-meta.json +1 -1
- package/.turbo/cache/d39e6ef95ebc4cc0-meta.json +1 -0
- package/.turbo/cache/d39e6ef95ebc4cc0.tar.zst +0 -0
- package/.turbo/cache/d572ebb3c833e8f4-meta.json +1 -0
- package/.turbo/cache/d572ebb3c833e8f4.tar.zst +0 -0
- package/.turbo/cache/d61543843c932504-meta.json +1 -0
- package/.turbo/cache/d61543843c932504.tar.zst +0 -0
- package/.turbo/cache/dad1301ac69bcb85-meta.json +1 -1
- package/.turbo/cache/dea5945f55c6aba5-meta.json +1 -0
- package/.turbo/cache/dea5945f55c6aba5.tar.zst +0 -0
- package/.turbo/cache/e992dab20aeefbaf-meta.json +1 -1
- package/.turbo/cache/e992dab20aeefbaf.tar.zst +0 -0
- package/.turbo/cache/f411e2deb0676959-meta.json +1 -0
- package/.turbo/cache/f411e2deb0676959.tar.zst +0 -0
- package/.turbo/cache/fa132b5b5f0e75f8-meta.json +1 -1
- package/.turbo/cache/fbbe2704bf9cb90b-meta.json +1 -1
- package/CHANGELOG.md +34 -0
- package/components/checkbox/.turbo/turbo-build.log +3 -3
- package/components/checkbox/.turbo/turbo-bundler.log +3 -3
- package/components/checkbox/README.md +8 -8
- package/components/checkbox/demo/api.md +53 -51
- package/components/checkbox/demo/api.min.js +32 -37
- package/components/checkbox/demo/index.md +62 -62
- package/components/checkbox/demo/index.min.js +32 -37
- package/components/checkbox/dist/auro-checkbox-group.d.ts +1 -1
- package/components/checkbox/dist/auro-checkbox.d.ts +1 -1
- package/components/checkbox/dist/index.js +32 -37
- package/components/checkbox/src/auro-checkbox-group.js +2 -2
- package/components/checkbox/src/auro-checkbox.js +1 -1
- package/components/combobox/.turbo/turbo-build.log +3 -3
- package/components/combobox/demo/api.md +17 -15
- package/components/combobox/demo/api.min.js +104 -116
- package/components/combobox/demo/index.min.js +104 -116
- package/components/combobox/dist/auro-combobox.d.ts +11 -4
- package/components/combobox/dist/auro-combobox.d.ts.map +1 -1
- package/components/combobox/dist/index.js +103 -115
- package/components/combobox/src/auro-combobox.js +22 -20
- package/components/counter/.turbo/turbo-build.log +3 -3
- package/components/counter/.turbo/turbo-bundler.log +3 -3
- package/components/datepicker/.turbo/turbo-build.log +9 -8
- package/components/datepicker/demo/api.md +107 -87
- package/components/datepicker/demo/api.min.js +96 -130
- package/components/datepicker/demo/index.min.js +96 -130
- package/components/datepicker/dist/auro-datepicker.d.ts +6 -13
- package/components/datepicker/dist/auro-datepicker.d.ts.map +1 -1
- package/components/datepicker/dist/index.js +96 -130
- package/components/datepicker/src/auro-datepicker.js +15 -35
- package/components/dropdown/.turbo/turbo-build.log +3 -3
- package/components/dropdown/.turbo/turbo-bundler.log +2 -2
- package/components/form/.turbo/turbo-build.log +3 -3
- package/components/form/.turbo/turbo-bundler.log +3 -3
- package/components/input/.turbo/turbo-build$colon$sass.log +51 -1
- package/components/input/.turbo/turbo-build.log +56 -6
- package/components/input/.turbo/turbo-bundler.log +2 -2
- package/components/input/.turbo/turbo-sass$colon$render.log +6 -0
- package/components/input/demo/api.md +83 -83
- package/components/input/demo/api.min.js +52 -61
- package/components/input/demo/index.md +6 -6
- package/components/input/demo/index.min.js +52 -61
- package/components/input/dist/auro-input.d.ts.map +1 -1
- package/components/input/dist/base-input.d.ts +5 -12
- package/components/input/dist/base-input.d.ts.map +1 -1
- package/components/input/dist/index.js +52 -61
- package/components/input/dist/styles/mixins-css.d.ts +3 -0
- package/components/input/dist/styles/mixins-css.d.ts.map +1 -0
- package/components/input/src/auro-input.js +0 -1
- package/components/input/src/base-input.js +22 -25
- package/components/input/src/styles/borders.scss +3 -19
- package/components/input/src/styles/color.css +1 -2
- package/components/input/src/styles/color.scss +3 -10
- package/components/input/src/styles/input-css.js +1 -1
- package/components/input/src/styles/input.css +1 -1
- package/components/input/src/styles/input.scss +4 -1
- package/components/input/src/styles/label-css.js +1 -1
- package/components/input/src/styles/label.css +1 -1
- package/components/input/src/styles/label.scss +4 -7
- package/components/input/src/styles/mixins-css.js +2 -0
- package/components/input/src/styles/mixins.css +1 -0
- package/components/input/src/styles/mixins.scss +45 -0
- package/components/input/src/styles/notificationIcons-css.js +1 -1
- package/components/input/src/styles/notificationIcons.css +13 -12
- package/components/input/src/styles/notificationIcons.scss +17 -25
- package/components/input/src/styles/style-css.js +1 -1
- package/components/input/src/styles/style.css +15 -17
- package/components/input/src/styles/style.scss +0 -4
- package/components/menu/.turbo/turbo-build.log +3 -3
- package/components/menu/.turbo/turbo-bundler.log +3 -3
- package/components/menu/demo/api.min.js +1 -1
- package/components/menu/demo/index.min.js +1 -1
- package/components/menu/dist/auro-menu.d.ts +1 -1
- package/components/menu/dist/index.js +1 -1
- package/components/menu/src/auro-menu.js +1 -1
- package/components/radio/.turbo/turbo-build.log +3 -3
- package/components/radio/.turbo/turbo-bundler.log +3 -3
- package/components/radio/demo/api.md +3 -1
- package/components/radio/demo/api.min.js +30 -35
- package/components/radio/demo/index.min.js +30 -35
- package/components/radio/dist/index.js +30 -35
- package/components/radio/src/auro-radio-group.js +1 -1
- package/components/select/.turbo/turbo-build.log +3 -3
- package/components/select/demo/api.md +7 -11
- package/components/select/demo/api.min.js +33 -60
- package/components/select/demo/index.min.js +33 -56
- package/components/select/dist/auro-select.d.ts +2 -2
- package/components/select/dist/auro-select.d.ts.map +1 -1
- package/components/select/dist/index.js +32 -55
- package/components/select/src/auro-select.js +3 -21
- package/package.json +1 -1
- package/packages/form-validation/src/validation.js +29 -34
- package/.turbo/cache/0663fcbb1d711029-meta.json +0 -1
- package/.turbo/cache/0663fcbb1d711029.tar.zst +0 -0
- package/.turbo/cache/0a2b0a4df8a0443f-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35-meta.json +0 -1
- package/.turbo/cache/120c8e207aa1ba35.tar.zst +0 -0
- package/.turbo/cache/141bb7d9a95e288b-meta.json +0 -1
- package/.turbo/cache/141bb7d9a95e288b.tar.zst +0 -0
- package/.turbo/cache/17dd4bdef6550a07-meta.json +0 -1
- package/.turbo/cache/17dd4bdef6550a07.tar.zst +0 -0
- package/.turbo/cache/32c0b9995fb5f8dd-meta.json +0 -1
- package/.turbo/cache/32c0b9995fb5f8dd.tar.zst +0 -0
- package/.turbo/cache/56cb35d4c7473a23-meta.json +0 -1
- package/.turbo/cache/56cb35d4c7473a23.tar.zst +0 -0
- package/.turbo/cache/626afdc67e0cb540-meta.json +0 -1
- package/.turbo/cache/626afdc67e0cb540.tar.zst +0 -0
- package/.turbo/cache/6ef81cf9a66f982a-meta.json +0 -1
- package/.turbo/cache/6ef81cf9a66f982a.tar.zst +0 -0
- package/.turbo/cache/9154e8fe6ab767ea-meta.json +0 -1
- package/.turbo/cache/9154e8fe6ab767ea.tar.zst +0 -0
- package/.turbo/cache/a49cc58242467fdc-meta.json +0 -1
- package/.turbo/cache/a49cc58242467fdc.tar.zst +0 -0
- package/.turbo/cache/af061e7a077a9ba5-meta.json +0 -1
- package/.turbo/cache/af061e7a077a9ba5.tar.zst +0 -0
- package/.turbo/cache/b50f1b283b4b81cd-meta.json +0 -1
- package/.turbo/cache/b50f1b283b4b81cd.tar.zst +0 -0
- package/.turbo/cache/bb8b41cd0ade3986-meta.json +0 -1
- package/.turbo/cache/bb8b41cd0ade3986.tar.zst +0 -0
- package/.turbo/cache/bf85bc040b7e64db-meta.json +0 -1
- package/.turbo/cache/bf85bc040b7e64db.tar.zst +0 -0
- package/.turbo/cache/cd5f6987783fb56d-meta.json +0 -1
- package/.turbo/cache/cd5f6987783fb56d.tar.zst +0 -0
- package/.turbo/cache/cd845bb6102c589a-meta.json +0 -1
- package/.turbo/cache/cd845bb6102c589a.tar.zst +0 -0
- package/.turbo/cache/ce67b6522dd09e64-meta.json +0 -1
- package/.turbo/cache/ce67b6522dd09e64.tar.zst +0 -0
- package/.turbo/cache/d7a47b77deb3d9a4-meta.json +0 -1
- package/.turbo/cache/d7a47b77deb3d9a4.tar.zst +0 -0
- package/.turbo/cache/ff58f630c9d69af4-meta.json +0 -1
- package/.turbo/cache/ff58f630c9d69af4.tar.zst +0 -0
- /package/.turbo/cache/{0a2b0a4df8a0443f.tar.zst → 8e79bd5c3a16a72e.tar.zst} +0 -0
|
@@ -10,7 +10,7 @@ The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
|
10
10
|
| Property | Attribute | Type | Default | Description |
|
|
11
11
|
|---------------------------------|---------------------------------|-----------|-------------|--------------------------------------------------|
|
|
12
12
|
| [disabled](#disabled) | `disabled` | `boolean` | "undefined" | |
|
|
13
|
-
| [error](#error) | `error` | `String` | | When defined, sets persistent validity to `customError` and sets
|
|
13
|
+
| [error](#error) | `error` | `String` | | When defined, sets persistent validity to `customError` and sets the validity message to the attribute value. |
|
|
14
14
|
| [horizontal](#horizontal) | `horizontal` | `Boolean` | false | If set, checkboxes will be aligned horizontally. |
|
|
15
15
|
| [noValidate](#noValidate) | `noValidate` | `Boolean` | | If set, disables auto-validation on blur. |
|
|
16
16
|
| [required](#required) | `required` | `Boolean` | false | Populates the `required` attribute on the element. Used for client-side validation. |
|
|
@@ -54,7 +54,7 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
54
54
|
| [error](#error) | `error` | `Boolean` | false | If set to true, sets an error state on the checkbox. |
|
|
55
55
|
| [id](#id) | `id` | `String` | | Sets the individual `id` per element. |
|
|
56
56
|
| [name](#name) | `name` | `String` | | Accepts any string, `DOMString` representing the value of the input. |
|
|
57
|
-
| [value](#value) | `value` | `String` | | Sets the element's input value.
|
|
57
|
+
| [value](#value) | `value` | `String` | | Sets the element's input value. Must be unique within an auro-checkbox-group element. |
|
|
58
58
|
|
|
59
59
|
## Methods
|
|
60
60
|
|
|
@@ -90,10 +90,10 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
90
90
|
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
91
91
|
<auro-checkbox-group>
|
|
92
92
|
<span slot="legend">Form label goes here</span>
|
|
93
|
-
<auro-checkbox value="
|
|
94
|
-
<auro-checkbox value="
|
|
95
|
-
<auro-checkbox value="
|
|
96
|
-
<auro-checkbox value="
|
|
93
|
+
<auro-checkbox value="value1" name="example1" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
94
|
+
<auro-checkbox value="value2" name="example2" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
95
|
+
<auro-checkbox value="value3" name="example3" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
96
|
+
<auro-checkbox value="value4" name="example4" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
97
97
|
</auro-checkbox-group>
|
|
98
98
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
99
99
|
</div>
|
|
@@ -105,10 +105,10 @@ Custom element for the purpose of allowing users to select one or more options o
|
|
|
105
105
|
```html
|
|
106
106
|
<auro-checkbox-group>
|
|
107
107
|
<span slot="legend">Form label goes here</span>
|
|
108
|
-
<auro-checkbox value="
|
|
109
|
-
<auro-checkbox value="
|
|
110
|
-
<auro-checkbox value="
|
|
111
|
-
<auro-checkbox value="
|
|
108
|
+
<auro-checkbox value="value1" name="example1" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
109
|
+
<auro-checkbox value="value2" name="example2" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
110
|
+
<auro-checkbox value="value3" name="example3" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
111
|
+
<auro-checkbox value="value4" name="example4" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
112
112
|
</auro-checkbox-group>
|
|
113
113
|
```
|
|
114
114
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -127,10 +127,10 @@ The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
|
127
127
|
<!-- The below content is automatically added from ./../apiExamples/disabledGroup.html -->
|
|
128
128
|
<auro-checkbox-group disabled>
|
|
129
129
|
<span slot="legend">Form label goes here</span>
|
|
130
|
-
<auro-checkbox value="disabled
|
|
131
|
-
<auro-checkbox value="disabled
|
|
132
|
-
<auro-checkbox value="disabled
|
|
133
|
-
<auro-checkbox value="disabled
|
|
130
|
+
<auro-checkbox value="disabled-value1" name="example1" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
131
|
+
<auro-checkbox value="disabled-value2" name="example2" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
132
|
+
<auro-checkbox value="disabled-value3" name="example3" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
133
|
+
<auro-checkbox value="disabled-value4" name="example4" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
134
134
|
</auro-checkbox-group>
|
|
135
135
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
136
136
|
</div>
|
|
@@ -142,10 +142,10 @@ The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
|
142
142
|
```html
|
|
143
143
|
<auro-checkbox-group disabled>
|
|
144
144
|
<span slot="legend">Form label goes here</span>
|
|
145
|
-
<auro-checkbox value="disabled
|
|
146
|
-
<auro-checkbox value="disabled
|
|
147
|
-
<auro-checkbox value="disabled
|
|
148
|
-
<auro-checkbox value="disabled
|
|
145
|
+
<auro-checkbox value="disabled-value1" name="example1" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
146
|
+
<auro-checkbox value="disabled-value2" name="example2" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
147
|
+
<auro-checkbox value="disabled-value3" name="example3" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
148
|
+
<auro-checkbox value="disabled-value4" name="example4" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
149
149
|
</auro-checkbox-group>
|
|
150
150
|
```
|
|
151
151
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -160,10 +160,10 @@ The `disabled` attribute used to disable a single `<auro-checkbox>` element.
|
|
|
160
160
|
<!-- The below content is automatically added from ./../apiExamples/disabled.html -->
|
|
161
161
|
<auro-checkbox-group>
|
|
162
162
|
<span slot="legend">Form label goes here</span>
|
|
163
|
-
<auro-checkbox value="disabled
|
|
164
|
-
<auro-checkbox value="disabled
|
|
165
|
-
<auro-checkbox value="disabled
|
|
166
|
-
<auro-checkbox value="disabled
|
|
163
|
+
<auro-checkbox value="disabled-value1" name="example1" id="checkbox-disabled1">Checkbox option</auro-checkbox>
|
|
164
|
+
<auro-checkbox value="disabled-value2" name="example2" id="checkbox-disabled2" checked disabled>Disabled checkbox option</auro-checkbox>
|
|
165
|
+
<auro-checkbox value="disabled-value3" name="example3" id="checkbox-disabled3" disabled>Disabled checkbox option</auro-checkbox>
|
|
166
|
+
<auro-checkbox value="disabled-value4" name="example4" id="checkbox-disabled4" checked>Checkbox option</auro-checkbox>
|
|
167
167
|
</auro-checkbox-group>
|
|
168
168
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
169
169
|
</div>
|
|
@@ -175,10 +175,10 @@ The `disabled` attribute used to disable a single `<auro-checkbox>` element.
|
|
|
175
175
|
```html
|
|
176
176
|
<auro-checkbox-group>
|
|
177
177
|
<span slot="legend">Form label goes here</span>
|
|
178
|
-
<auro-checkbox value="disabled
|
|
179
|
-
<auro-checkbox value="disabled
|
|
180
|
-
<auro-checkbox value="disabled
|
|
181
|
-
<auro-checkbox value="disabled
|
|
178
|
+
<auro-checkbox value="disabled-value1" name="example1" id="checkbox-disabled1">Checkbox option</auro-checkbox>
|
|
179
|
+
<auro-checkbox value="disabled-value2" name="example2" id="checkbox-disabled2" checked disabled>Disabled checkbox option</auro-checkbox>
|
|
180
|
+
<auro-checkbox value="disabled-value3" name="example3" id="checkbox-disabled3" disabled>Disabled checkbox option</auro-checkbox>
|
|
181
|
+
<auro-checkbox value="disabled-value4" name="example4" id="checkbox-disabled4" checked>Checkbox option</auro-checkbox>
|
|
182
182
|
</auro-checkbox-group>
|
|
183
183
|
```
|
|
184
184
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -199,10 +199,10 @@ When present, the `required` attribute specifies that at least one or more `<aur
|
|
|
199
199
|
<!-- The below content is automatically added from ./../apiExamples/required.html -->
|
|
200
200
|
<auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
201
201
|
<span slot="legend">Form label goes here</span>
|
|
202
|
-
<auro-checkbox value="
|
|
203
|
-
<auro-checkbox value="
|
|
204
|
-
<auro-checkbox value="
|
|
205
|
-
<auro-checkbox value="
|
|
202
|
+
<auro-checkbox value="value1" name="example1" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
203
|
+
<auro-checkbox value="value2" name="example2" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
204
|
+
<auro-checkbox value="value3" name="example3" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
205
|
+
<auro-checkbox value="value4" name="example4" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
206
206
|
</auro-checkbox-group>
|
|
207
207
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
208
208
|
</div>
|
|
@@ -214,10 +214,10 @@ When present, the `required` attribute specifies that at least one or more `<aur
|
|
|
214
214
|
```html
|
|
215
215
|
<auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
216
216
|
<span slot="legend">Form label goes here</span>
|
|
217
|
-
<auro-checkbox value="
|
|
218
|
-
<auro-checkbox value="
|
|
219
|
-
<auro-checkbox value="
|
|
220
|
-
<auro-checkbox value="
|
|
217
|
+
<auro-checkbox value="value1" name="example1" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
218
|
+
<auro-checkbox value="value2" name="example2" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
219
|
+
<auro-checkbox value="value3" name="example3" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
220
|
+
<auro-checkbox value="value4" name="example4" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
221
221
|
</auro-checkbox-group>
|
|
222
222
|
```
|
|
223
223
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -225,17 +225,19 @@ When present, the `required` attribute specifies that at least one or more `<aur
|
|
|
225
225
|
|
|
226
226
|
#### Error
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
Use the `error` attribute to apply a persistent custom error that supersedes the HTML5 validation logic.
|
|
229
|
+
|
|
230
|
+
A custom error message can be set using the `error` attribute, or it can be used in conjuction with the `setCustomValidityCustomError` attribute.
|
|
229
231
|
|
|
230
232
|
<div class="exampleWrapper">
|
|
231
233
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/errorGroup.html) -->
|
|
232
234
|
<!-- The below content is automatically added from ./../apiExamples/errorGroup.html -->
|
|
233
235
|
<auro-checkbox-group error="custom error">
|
|
234
236
|
<span slot="legend">Form label goes here</span>
|
|
235
|
-
<auro-checkbox value="error
|
|
236
|
-
<auro-checkbox value="error
|
|
237
|
-
<auro-checkbox value="error
|
|
238
|
-
<auro-checkbox value="error
|
|
237
|
+
<auro-checkbox value="error-value1" name="example1" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
238
|
+
<auro-checkbox value="error-value2" name="example2" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
239
|
+
<auro-checkbox value="error-value3" name="example3" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
240
|
+
<auro-checkbox value="error-value4" name="example4" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
239
241
|
</auro-checkbox-group>
|
|
240
242
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
241
243
|
</div>
|
|
@@ -247,10 +249,10 @@ The `error` attribute used to set error state on the entire `<auro-checkbox-grou
|
|
|
247
249
|
```html
|
|
248
250
|
<auro-checkbox-group error="custom error">
|
|
249
251
|
<span slot="legend">Form label goes here</span>
|
|
250
|
-
<auro-checkbox value="error
|
|
251
|
-
<auro-checkbox value="error
|
|
252
|
-
<auro-checkbox value="error
|
|
253
|
-
<auro-checkbox value="error
|
|
252
|
+
<auro-checkbox value="error-value1" name="example1" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
253
|
+
<auro-checkbox value="error-value2" name="example2" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
254
|
+
<auro-checkbox value="error-value3" name="example3" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
255
|
+
<auro-checkbox value="error-value4" name="example4" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
254
256
|
</auro-checkbox-group>
|
|
255
257
|
```
|
|
256
258
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -269,10 +271,10 @@ Use the `reset()` method to reset the `<auro-checkbox-group>`'s `value` and `val
|
|
|
269
271
|
<br/><br/>
|
|
270
272
|
<auro-checkbox-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
|
|
271
273
|
<span slot="legend">Form label goes here</span>
|
|
272
|
-
<auro-checkbox value="
|
|
273
|
-
<auro-checkbox value="
|
|
274
|
-
<auro-checkbox value="
|
|
275
|
-
<auro-checkbox value="
|
|
274
|
+
<auro-checkbox value="value1" name="example1" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
275
|
+
<auro-checkbox value="value2" name="example2" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
276
|
+
<auro-checkbox value="value3" name="example3" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
277
|
+
<auro-checkbox value="value4" name="example4" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
276
278
|
</auro-checkbox-group>
|
|
277
279
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
278
280
|
</div>
|
|
@@ -286,10 +288,10 @@ Use the `reset()` method to reset the `<auro-checkbox-group>`'s `value` and `val
|
|
|
286
288
|
<br/><br/>
|
|
287
289
|
<auro-checkbox-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
|
|
288
290
|
<span slot="legend">Form label goes here</span>
|
|
289
|
-
<auro-checkbox value="
|
|
290
|
-
<auro-checkbox value="
|
|
291
|
-
<auro-checkbox value="
|
|
292
|
-
<auro-checkbox value="
|
|
291
|
+
<auro-checkbox value="value1" name="example1" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
292
|
+
<auro-checkbox value="value2" name="example2" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
293
|
+
<auro-checkbox value="value3" name="example3" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
294
|
+
<auro-checkbox value="value4" name="example4" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
293
295
|
</auro-checkbox-group>
|
|
294
296
|
```
|
|
295
297
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -141,7 +141,7 @@ class AuroLibraryRuntimeUtils {
|
|
|
141
141
|
* @attr {Boolean} error - If set to true, sets an error state on the checkbox.
|
|
142
142
|
* @attr {String} id - Sets the individual `id` per element.
|
|
143
143
|
* @attr {String} name - Accepts any string, `DOMString` representing the value of the input.
|
|
144
|
-
* @attr {String} value - Sets the element's input value.
|
|
144
|
+
* @attr {String} value - Sets the element's input value. Must be unique within an auro-checkbox-group element.
|
|
145
145
|
* @csspart checkbox - apply css to a specific checkbox.
|
|
146
146
|
* @csspart checkbox-input - apply css to a specific checkbox's input.
|
|
147
147
|
* @csspart checkbox-label - apply css to a specific checkbox's label.
|
|
@@ -354,20 +354,20 @@ class AuroFormValidation {
|
|
|
354
354
|
const pattern = new RegExp(`^${elem.pattern}$`, 'u');
|
|
355
355
|
|
|
356
356
|
if (!pattern.test(elem.value)) {
|
|
357
|
-
elem.validity = '
|
|
358
|
-
elem.
|
|
357
|
+
elem.validity = 'patternMismatch';
|
|
358
|
+
elem.errorMessage = elem.setCustomValidityPatternMismatch || elem.setCustomValidity || '';
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
// Length > 0 is required to prevent the error message from showing when the input is empty
|
|
363
363
|
if (elem.value?.length > 0 && elem.value?.length < elem.minLength) {
|
|
364
364
|
elem.validity = 'tooShort';
|
|
365
|
-
elem.
|
|
365
|
+
elem.errorMessage = elem.setCustomValidityTooShort || elem.setCustomValidity || '';
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
if (elem.value?.length > elem.maxLength) {
|
|
369
369
|
elem.validity = 'tooLong';
|
|
370
|
-
elem.
|
|
370
|
+
elem.errorMessage = elem.setCustomValidityTooLong || elem.setCustomValidity || '';
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
|
|
@@ -383,33 +383,32 @@ class AuroFormValidation {
|
|
|
383
383
|
const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/; // eslint-disable-line require-unicode-regexp
|
|
384
384
|
|
|
385
385
|
if (!elem.value.match(emailRegex)) {
|
|
386
|
-
elem.validity = '
|
|
387
|
-
elem.
|
|
386
|
+
elem.validity = 'patternMismatch';
|
|
387
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
388
388
|
}
|
|
389
389
|
} else if (elem.type === 'credit-card') {
|
|
390
390
|
if (elem.value.length > 0 && elem.value.length < elem.validationCCLength) {
|
|
391
391
|
elem.validity = 'tooShort';
|
|
392
|
-
elem.
|
|
392
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
393
393
|
}
|
|
394
394
|
} else if (elem.type === 'number') {
|
|
395
395
|
if (elem.max !== undefined && Number(elem.max) < Number(elem.value)) {
|
|
396
396
|
elem.validity = 'rangeOverflow';
|
|
397
|
-
elem.
|
|
397
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
if (elem.min !== undefined && Number(elem.min) > Number(elem.value)) {
|
|
400
|
+
if (elem.min !== undefined && elem.value?.length > 0 && Number(elem.min) > Number(elem.value)) {
|
|
401
401
|
elem.validity = 'rangeUnderflow';
|
|
402
|
-
elem.
|
|
402
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
403
403
|
}
|
|
404
|
-
|
|
405
404
|
} else if (elem.type === 'month-day-year' ||
|
|
406
405
|
elem.type === 'month-year' ||
|
|
407
406
|
elem.type === 'month-fullYear' ||
|
|
408
407
|
elem.type === 'year-month-day'
|
|
409
408
|
) {
|
|
410
|
-
if (elem.value
|
|
409
|
+
if (elem.value?.length > 0 && elem.value.length < elem.dateStrLength) {
|
|
411
410
|
elem.validity = 'tooShort';
|
|
412
|
-
elem.
|
|
411
|
+
elem.errorMessage = elem.setCustomValidityForType || elem.setCustomValidity || '';
|
|
413
412
|
} else {
|
|
414
413
|
const valueDate = new Date(elem.value);
|
|
415
414
|
|
|
@@ -419,7 +418,7 @@ class AuroFormValidation {
|
|
|
419
418
|
|
|
420
419
|
if (valueDate > maxDate) {
|
|
421
420
|
elem.validity = 'rangeOverflow';
|
|
422
|
-
elem.
|
|
421
|
+
elem.errorMessage = elem.setCustomValidityRangeOverflow || elem.setCustomValidity || '';
|
|
423
422
|
}
|
|
424
423
|
}
|
|
425
424
|
|
|
@@ -429,7 +428,7 @@ class AuroFormValidation {
|
|
|
429
428
|
|
|
430
429
|
if (valueDate < minDate) {
|
|
431
430
|
elem.validity = 'rangeUnderflow';
|
|
432
|
-
elem.
|
|
431
|
+
elem.errorMessage = elem.setCustomValidityRangeUnderflow || elem.setCustomValidity || '';
|
|
433
432
|
}
|
|
434
433
|
}
|
|
435
434
|
}
|
|
@@ -452,10 +451,10 @@ class AuroFormValidation {
|
|
|
452
451
|
|
|
453
452
|
if (elem.hasAttribute('error')) {
|
|
454
453
|
elem.validity = 'customError';
|
|
455
|
-
elem.
|
|
454
|
+
elem.errorMessage = elem.setCustomValidityCustomError || elem.error || elem.setCustomValidity || '';
|
|
456
455
|
} else if (validationShouldRun) {
|
|
457
456
|
elem.validity = 'valid';
|
|
458
|
-
elem.
|
|
457
|
+
elem.errorMessage = '';
|
|
459
458
|
|
|
460
459
|
/**
|
|
461
460
|
* Only validate once we interact with the datepicker
|
|
@@ -467,7 +466,7 @@ class AuroFormValidation {
|
|
|
467
466
|
let hasValue = elem.value && elem.value.length > 0;
|
|
468
467
|
|
|
469
468
|
// If there is a second input in the elem and that value is undefined or an empty string set hasValue to false;
|
|
470
|
-
if (this.auroInputElements
|
|
469
|
+
if (this.auroInputElements?.length === 2) {
|
|
471
470
|
if (!this.auroInputElements[1].value || this.auroInputElements[1].length === 0) {
|
|
472
471
|
hasValue = false;
|
|
473
472
|
}
|
|
@@ -475,31 +474,27 @@ class AuroFormValidation {
|
|
|
475
474
|
|
|
476
475
|
if (!hasValue && elem.required) {
|
|
477
476
|
elem.validity = 'valueMissing';
|
|
478
|
-
elem.
|
|
477
|
+
elem.errorMessage = elem.setCustomValidityValueMissing || elem.setCustomValidity || '';
|
|
479
478
|
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
480
479
|
this.validateType(elem);
|
|
481
480
|
this.validateAttributes(elem);
|
|
482
481
|
}
|
|
483
482
|
}
|
|
484
483
|
|
|
485
|
-
if (this.auroInputElements
|
|
484
|
+
if (this.auroInputElements?.length > 0) {
|
|
486
485
|
elem.validity = this.auroInputElements[0].validity;
|
|
487
|
-
elem.
|
|
486
|
+
elem.errorMessage = this.auroInputElements[0].errorMessage;
|
|
488
487
|
|
|
489
|
-
if (elem.validity === 'valid') {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
elem.setCustomValidity = this.auroInputElements[1].setCustomValidity;
|
|
493
|
-
}
|
|
488
|
+
if (elem.validity === 'valid' && this.auroInputElements.length > 1) {
|
|
489
|
+
elem.validity = this.auroInputElements[1].validity;
|
|
490
|
+
elem.errorMessage = this.auroInputElements[1].errorMessage;
|
|
494
491
|
}
|
|
495
492
|
}
|
|
496
493
|
|
|
497
494
|
if (validationShouldRun || elem.hasAttribute('error')) {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
elem.setCustomValidity = elem.ValidityMessageOverride;
|
|
502
|
-
}
|
|
495
|
+
// Use the validity message override if it is declared
|
|
496
|
+
if (elem.validity && elem.validity !== 'valid' && elem.ValidityMessageOverride) {
|
|
497
|
+
elem.errorMessage = elem.ValidityMessageOverride;
|
|
503
498
|
}
|
|
504
499
|
|
|
505
500
|
this.getErrorMessage(elem);
|
|
@@ -545,18 +540,18 @@ class AuroFormValidation {
|
|
|
545
540
|
if (elem.validity !== 'valid') {
|
|
546
541
|
if (elem.setCustomValidity) {
|
|
547
542
|
elem.errorMessage = elem.setCustomValidity;
|
|
548
|
-
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input')) {
|
|
543
|
+
} else if (this.runtimeUtils.elementMatch(elem, 'auro-input') && elem.errorMessage === '') {
|
|
549
544
|
const input = elem.renderRoot.querySelector('input');
|
|
550
545
|
|
|
551
546
|
if (input.validationMessage.length > 0) {
|
|
552
547
|
elem.errorMessage = input.validationMessage;
|
|
553
548
|
}
|
|
554
|
-
} else if (this.inputElements &&
|
|
549
|
+
} else if (this.inputElements?.length > 0 && elem.errorMessage === '') {
|
|
555
550
|
const firstInput = this.inputElements[0];
|
|
556
551
|
|
|
557
552
|
if (firstInput.validationMessage.length > 0) {
|
|
558
553
|
elem.errorMessage = firstInput.validationMessage;
|
|
559
|
-
} else if (this.inputElements
|
|
554
|
+
} else if (this.inputElements?.length === 2) {
|
|
560
555
|
const secondInput = this.inputElements[1];
|
|
561
556
|
|
|
562
557
|
if (secondInput.validationMessage.length > 0) {
|
|
@@ -585,7 +580,7 @@ var colorCss = i$4`:host{color:var(--ds-auro-checkbox-group-text-color)}:host([d
|
|
|
585
580
|
* @attr {String} setCustomValidity - Sets a custom help text message to display for all validityStates.
|
|
586
581
|
* @attr {String} setCustomValidityCustomError - Custom help text message to display when validity = `customError`.
|
|
587
582
|
* @attr {String} setCustomValidityValueMissing - Custom help text message to display when validity = `valueMissing`.
|
|
588
|
-
* @attr {String} error - When defined, sets persistent validity to `customError` and sets
|
|
583
|
+
* @attr {String} error - When defined, sets persistent validity to `customError` and sets the validity message to the attribute value.
|
|
589
584
|
* @attr {Boolean} noValidate - If set, disables auto-validation on blur.
|
|
590
585
|
* @attr {Boolean} required - Populates the `required` attribute on the element. Used for client-side validation.
|
|
591
586
|
* @attr {Boolean} horizontal - If set, checkboxes will be aligned horizontally.
|
|
@@ -885,7 +880,7 @@ class AuroCheckboxGroup extends r {
|
|
|
885
880
|
</p>`
|
|
886
881
|
: x`
|
|
887
882
|
<p class="checkboxGroupElement-helpText" role="alert" aria-live="assertive" part="helpText">
|
|
888
|
-
${this.
|
|
883
|
+
${this.errorMessage}
|
|
889
884
|
</p>`
|
|
890
885
|
}
|
|
891
886
|
`;
|