@aurodesignsystem-dev/auro-formkit 0.0.0-pr1001.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +314 -0
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +50 -0
- package/components/bibtemplate/dist/buttonVersion.d.ts +2 -0
- package/components/bibtemplate/dist/headerVersion.d.ts +2 -0
- package/components/bibtemplate/dist/iconVersion.d.ts +2 -0
- package/components/bibtemplate/dist/index.d.ts +2 -0
- package/components/bibtemplate/dist/index.js +1940 -0
- package/components/bibtemplate/dist/registered.js +1940 -0
- package/components/bibtemplate/dist/styles/color-css.d.ts +2 -0
- package/components/bibtemplate/dist/styles/style-css.d.ts +2 -0
- package/components/bibtemplate/dist/styles/tokens-css.d.ts +2 -0
- package/components/checkbox/README.md +142 -0
- package/components/checkbox/demo/api.html +61 -0
- package/components/checkbox/demo/api.js +17 -0
- package/components/checkbox/demo/api.md +436 -0
- package/components/checkbox/demo/api.min.js +1870 -0
- package/components/checkbox/demo/index.html +57 -0
- package/components/checkbox/demo/index.js +8 -0
- package/components/checkbox/demo/index.md +327 -0
- package/components/checkbox/demo/index.min.js +1845 -0
- package/components/checkbox/demo/readme.html +57 -0
- package/components/checkbox/demo/readme.md +142 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts +166 -0
- package/components/checkbox/dist/auro-checkbox.d.ts +136 -0
- package/components/checkbox/dist/helptextVersion.d.ts +2 -0
- package/components/checkbox/dist/index.d.ts +3 -0
- package/components/checkbox/dist/index.js +1794 -0
- package/components/checkbox/dist/registered.js +1795 -0
- package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +2 -0
- package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +2 -0
- package/components/checkbox/dist/styles/color-css.d.ts +2 -0
- package/components/checkbox/dist/styles/colorGroup-css.d.ts +2 -0
- package/components/checkbox/dist/styles/tokens-css.d.ts +2 -0
- package/components/combobox/README.md +154 -0
- package/components/combobox/demo/api.html +63 -0
- package/components/combobox/demo/api.js +36 -0
- package/components/combobox/demo/api.md +1326 -0
- package/components/combobox/demo/api.min.js +18691 -0
- package/components/combobox/demo/index.html +63 -0
- package/components/combobox/demo/index.js +26 -0
- package/components/combobox/demo/index.md +725 -0
- package/components/combobox/demo/index.min.js +18545 -0
- package/components/combobox/demo/readme.html +57 -0
- package/components/combobox/demo/readme.md +154 -0
- package/components/combobox/dist/auro-combobox.d.ts +434 -0
- package/components/combobox/dist/bibtemplateVersion.d.ts +2 -0
- package/components/combobox/dist/dropdownVersion.d.ts +2 -0
- package/components/combobox/dist/index.d.ts +2 -0
- package/components/combobox/dist/index.js +16999 -0
- package/components/combobox/dist/inputVersion.d.ts +2 -0
- package/components/combobox/dist/registered.js +17001 -0
- package/components/combobox/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/combobox/dist/styles/style-css.d.ts +2 -0
- package/components/counter/README.md +146 -0
- package/components/counter/demo/api.html +61 -0
- package/components/counter/demo/api.js +20 -0
- package/components/counter/demo/api.md +730 -0
- package/components/counter/demo/api.min.js +10406 -0
- package/components/counter/demo/index.html +61 -0
- package/components/counter/demo/index.js +21 -0
- package/components/counter/demo/index.md +401 -0
- package/components/counter/demo/index.min.js +10370 -0
- package/components/counter/demo/readme.html +57 -0
- package/components/counter/demo/readme.md +146 -0
- package/components/counter/dist/auro-counter-button.d.ts +14 -0
- package/components/counter/dist/auro-counter-group.d.ts +386 -0
- package/components/counter/dist/auro-counter-wrapper.d.ts +22 -0
- package/components/counter/dist/auro-counter.d.ts +113 -0
- package/components/counter/dist/bibtemplateVersion.d.ts +2 -0
- package/components/counter/dist/dropdownVersion.d.ts +2 -0
- package/components/counter/dist/helptextVersion.d.ts +2 -0
- package/components/counter/dist/iconVersion.d.ts +2 -0
- package/components/counter/dist/index.d.ts +3 -0
- package/components/counter/dist/index.js +10313 -0
- package/components/counter/dist/registered.js +10314 -0
- package/components/counter/dist/styles/color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-button-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-group-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +2 -0
- package/components/counter/dist/styles/counter-wrapper-css.d.ts +2 -0
- package/components/counter/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/counter/dist/styles/style-css.d.ts +2 -0
- package/components/counter/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/README.md +141 -0
- package/components/datepicker/demo/api.html +63 -0
- package/components/datepicker/demo/api.js +35 -0
- package/components/datepicker/demo/api.md +1529 -0
- package/components/datepicker/demo/api.min.js +29755 -0
- package/components/datepicker/demo/index.html +62 -0
- package/components/datepicker/demo/index.js +19 -0
- package/components/datepicker/demo/index.md +204 -0
- package/components/datepicker/demo/index.min.js +29476 -0
- package/components/datepicker/demo/readme.html +57 -0
- package/components/datepicker/demo/readme.md +141 -0
- package/components/datepicker/dist/auro-calendar-cell.d.ts +163 -0
- package/components/datepicker/dist/auro-calendar-month.d.ts +20 -0
- package/components/datepicker/dist/auro-calendar.d.ts +133 -0
- package/components/datepicker/dist/auro-datepicker.d.ts +625 -0
- package/components/datepicker/dist/bibtemplateVersion.d.ts +2 -0
- package/components/datepicker/dist/buttonVersion.d.ts +2 -0
- package/components/datepicker/dist/dropdownVersion.d.ts +2 -0
- package/components/datepicker/dist/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/index.d.ts +2 -0
- package/components/datepicker/dist/index.js +29406 -0
- package/components/datepicker/dist/inputVersion.d.ts +2 -0
- package/components/datepicker/dist/popoverVersion.d.ts +2 -0
- package/components/datepicker/dist/registered.js +29406 -0
- package/components/datepicker/dist/styles/classic/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/classic/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/color-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/color-css.d.ts +2 -0
- package/components/datepicker/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +2 -0
- package/components/datepicker/dist/styles/style-css.d.ts +2 -0
- package/components/datepicker/dist/styles/tokens-css.d.ts +2 -0
- package/components/datepicker/dist/utilities.d.ts +78 -0
- package/components/datepicker/dist/utilitiesCalendar.d.ts +38 -0
- package/components/datepicker/dist/utilitiesCalendarRender.d.ts +50 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +5 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +60 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +1 -0
- package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +57 -0
- package/components/dropdown/README.md +144 -0
- package/components/dropdown/demo/api.html +63 -0
- package/components/dropdown/demo/api.js +21 -0
- package/components/dropdown/demo/api.md +1266 -0
- package/components/dropdown/demo/api.min.js +4442 -0
- package/components/dropdown/demo/index.html +61 -0
- package/components/dropdown/demo/index.js +19 -0
- package/components/dropdown/demo/index.md +337 -0
- package/components/dropdown/demo/index.min.js +4405 -0
- package/components/dropdown/demo/readme.html +57 -0
- package/components/dropdown/demo/readme.md +144 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +425 -0
- package/components/dropdown/dist/auro-dropdownBib.d.ts +68 -0
- package/components/dropdown/dist/dropdownVersion.d.ts +2 -0
- package/components/dropdown/dist/helptextVersion.d.ts +2 -0
- package/components/dropdown/dist/iconVersion.d.ts +2 -0
- package/components/dropdown/dist/index.d.ts +2 -0
- package/components/dropdown/dist/index.js +4350 -0
- package/components/dropdown/dist/registered.js +4350 -0
- package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/classic/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/color-css.d.ts +2 -0
- package/components/dropdown/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/dropdown/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/style-css.d.ts +2 -0
- package/components/dropdown/dist/styles/tokens-css.d.ts +2 -0
- package/components/form/README.md +142 -0
- package/components/form/demo/api.html +56 -0
- package/components/form/demo/api.js +3 -0
- package/components/form/demo/api.md +51 -0
- package/components/form/demo/api.min.js +638 -0
- package/components/form/demo/autocomplete.html +31 -0
- package/components/form/demo/index.html +57 -0
- package/components/form/demo/index.js +4 -0
- package/components/form/demo/index.md +403 -0
- package/components/form/demo/index.min.js +639 -0
- package/components/form/demo/readme.html +57 -0
- package/components/form/demo/readme.md +142 -0
- package/components/form/demo/registerDemoDeps.js +23 -0
- package/components/form/demo/working.html +124 -0
- package/components/form/dist/auro-form.d.ts +223 -0
- package/components/form/dist/index.d.ts +2 -0
- package/components/form/dist/index.js +614 -0
- package/components/form/dist/registered.d.ts +1 -0
- package/components/form/dist/registered.js +614 -0
- package/components/form/dist/styles/style-css.d.ts +2 -0
- package/components/helptext/dist/auro-helptext.d.ts +59 -0
- package/components/helptext/dist/index.d.ts +2 -0
- package/components/helptext/dist/index.js +207 -0
- package/components/helptext/dist/registered.js +207 -0
- package/components/helptext/dist/styles/color-css.d.ts +2 -0
- package/components/helptext/dist/styles/style-css.d.ts +2 -0
- package/components/helptext/dist/styles/tokens-css.d.ts +2 -0
- package/components/input/README.md +139 -0
- package/components/input/demo/api.html +48 -0
- package/components/input/demo/api.js +29 -0
- package/components/input/demo/api.md +1366 -0
- package/components/input/demo/api.min.js +8542 -0
- package/components/input/demo/index.html +49 -0
- package/components/input/demo/index.js +20 -0
- package/components/input/demo/index.md +270 -0
- package/components/input/demo/index.min.js +8461 -0
- package/components/input/demo/readme.html +57 -0
- package/components/input/demo/readme.md +139 -0
- package/components/input/dist/auro-input.d.ts +167 -0
- package/components/input/dist/base-input.d.ts +566 -0
- package/components/input/dist/buttonVersion.d.ts +2 -0
- package/components/input/dist/helptextVersion.d.ts +2 -0
- package/components/input/dist/i18n.d.ts +18 -0
- package/components/input/dist/iconVersion.d.ts +2 -0
- package/components/input/dist/index.d.ts +2 -0
- package/components/input/dist/index.js +8367 -0
- package/components/input/dist/registered.js +8367 -0
- package/components/input/dist/styles/classic/color-css.d.ts +2 -0
- package/components/input/dist/styles/classic/style-css.d.ts +2 -0
- package/components/input/dist/styles/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/borders-css.d.ts +2 -0
- package/components/input/dist/styles/default/color-css.d.ts +2 -0
- package/components/input/dist/styles/default/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/default/notificationIcons-css.d.ts +2 -0
- package/components/input/dist/styles/default/style-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/color-css.d.ts +2 -0
- package/components/input/dist/styles/emphasized/style-css.d.ts +2 -0
- package/components/input/dist/styles/mixins-css.d.ts +2 -0
- package/components/input/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/input/dist/styles/snowflake/style-css.d.ts +2 -0
- package/components/input/dist/styles/style-css.d.ts +2 -0
- package/components/input/dist/styles/tokens-css.d.ts +2 -0
- package/components/input/dist/utilities.d.ts +25 -0
- package/components/layoutElement/dist/auroElement.d.ts +34 -0
- package/components/layoutElement/dist/index.d.ts +2 -0
- package/components/layoutElement/dist/index.js +98 -0
- package/components/layoutElement/dist/registered.js +98 -0
- package/components/menu/README.md +145 -0
- package/components/menu/demo/api.html +62 -0
- package/components/menu/demo/api.js +27 -0
- package/components/menu/demo/api.md +1011 -0
- package/components/menu/demo/api.min.js +1762 -0
- package/components/menu/demo/index.html +58 -0
- package/components/menu/demo/index.js +28 -0
- package/components/menu/demo/index.md +61 -0
- package/components/menu/demo/index.min.js +1708 -0
- package/components/menu/demo/readme.html +57 -0
- package/components/menu/demo/readme.md +145 -0
- package/components/menu/dist/auro-menu-utils.d.ts +34 -0
- package/components/menu/dist/auro-menu.d.ts +246 -0
- package/components/menu/dist/auro-menuoption.d.ts +81 -0
- package/components/menu/dist/dropdownVersion.d.ts +2 -0
- package/components/menu/dist/iconVersion.d.ts +2 -0
- package/components/menu/dist/index.d.ts +4 -0
- package/components/menu/dist/index.js +1691 -0
- package/components/menu/dist/registered.js +1651 -0
- package/components/menu/dist/styles/default/color-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/color-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menu-css.d.ts +2 -0
- package/components/menu/dist/styles/default/style-menuoption-css.d.ts +2 -0
- package/components/menu/dist/styles/default/tokens-css.d.ts +2 -0
- package/components/radio/README.md +137 -0
- package/components/radio/demo/api.html +59 -0
- package/components/radio/demo/api.js +19 -0
- package/components/radio/demo/api.md +602 -0
- package/components/radio/demo/api.min.js +1951 -0
- package/components/radio/demo/index.html +56 -0
- package/components/radio/demo/index.js +8 -0
- package/components/radio/demo/index.md +150 -0
- package/components/radio/demo/index.min.js +1908 -0
- package/components/radio/demo/readme.html +57 -0
- package/components/radio/demo/readme.md +137 -0
- package/components/radio/dist/auro-radio-group.d.ts +194 -0
- package/components/radio/dist/auro-radio.d.ts +147 -0
- package/components/radio/dist/helptextVersion.d.ts +2 -0
- package/components/radio/dist/index.d.ts +3 -0
- package/components/radio/dist/index.js +1857 -0
- package/components/radio/dist/registered.js +1858 -0
- package/components/radio/dist/styles/auro-radio-group-css.d.ts +2 -0
- package/components/radio/dist/styles/color-css.d.ts +2 -0
- package/components/radio/dist/styles/groupColor-css.d.ts +2 -0
- package/components/radio/dist/styles/style-css.d.ts +2 -0
- package/components/radio/dist/styles/tokens-css.d.ts +2 -0
- package/components/select/README.md +145 -0
- package/components/select/demo/api.html +77 -0
- package/components/select/demo/api.js +35 -0
- package/components/select/demo/api.md +1413 -0
- package/components/select/demo/api.min.js +10502 -0
- package/components/select/demo/index.html +73 -0
- package/components/select/demo/index.js +9 -0
- package/components/select/demo/index.md +1151 -0
- package/components/select/demo/index.min.js +10390 -0
- package/components/select/demo/readme.html +57 -0
- package/components/select/demo/readme.md +145 -0
- package/components/select/dist/auro-select.d.ts +512 -0
- package/components/select/dist/bibtemplateVersion.d.ts +2 -0
- package/components/select/dist/dropdownVersion.d.ts +2 -0
- package/components/select/dist/helptextVersion.d.ts +2 -0
- package/components/select/dist/index.d.ts +2 -0
- package/components/select/dist/index.js +8898 -0
- package/components/select/dist/registered.js +8898 -0
- package/components/select/dist/styles/shapeSize-css.d.ts +2 -0
- package/components/select/dist/styles/style-css.d.ts +2 -0
- package/components/select/dist/styles/tokens-css.d.ts +2 -0
- package/package.json +218 -0
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/api.md) -->
|
|
2
|
+
<!-- The below content is automatically added from ./../docs/api.md -->
|
|
3
|
+
|
|
4
|
+
# auro-checkbox-group
|
|
5
|
+
|
|
6
|
+
The auro-checkbox-group element is a wrapper for auro-checkbox element.
|
|
7
|
+
|
|
8
|
+
## Properties
|
|
9
|
+
|
|
10
|
+
| Property | Attribute | Type | Default | Description |
|
|
11
|
+
|---------------------------------|---------------------------------|-----------|-------------|--------------------------------------------------|
|
|
12
|
+
| [disabled](#disabled) | `disabled` | `boolean` | "undefined" | If set, disables the checkbox group. |
|
|
13
|
+
| [error](#error) | `error` | `string` | | When defined, sets persistent validity to `customError` and sets the validation message to the attribute value. |
|
|
14
|
+
| [horizontal](#horizontal) | `horizontal` | `boolean` | false | If set, checkboxes will be aligned horizontally. |
|
|
15
|
+
| [noValidate](#noValidate) | `noValidate` | `boolean` | | If set, disables auto-validation on blur. |
|
|
16
|
+
| [onDark](#onDark) | `onDark` | `boolean` | false | Sets onDark styles for component. |
|
|
17
|
+
| [required](#required) | `required` | `boolean` | false | Populates the `required` attribute on the element. Used for client-side validation. |
|
|
18
|
+
| [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
|
|
19
|
+
| [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
|
|
20
|
+
| [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
|
|
21
|
+
| [validity](#validity) | `validity` | `string` | "undefined" | Specifies the `validityState` this element is in. |
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
| Method | Type | Description |
|
|
26
|
+
|------------|----------------------------------------|--------------------------------------------------|
|
|
27
|
+
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
28
|
+
| [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
|
|
29
|
+
|
|
30
|
+
## Events
|
|
31
|
+
|
|
32
|
+
| Event | Type | Description |
|
|
33
|
+
|-----------------------------|--------------------|--------------------------------------------------|
|
|
34
|
+
| `auroFormElement-validated` | | Notifies that the `validity` and `errorMessage` values have changed. |
|
|
35
|
+
| [input](#input) | `CustomEvent<any>` | |
|
|
36
|
+
|
|
37
|
+
## Slots
|
|
38
|
+
|
|
39
|
+
| Name | Description |
|
|
40
|
+
|-----------------|--------------------------------------------------|
|
|
41
|
+
| [helpText](#helpText) | Allows for the helper text to be overridden. |
|
|
42
|
+
| [legend](#legend) | Allows for the legend to be overridden. |
|
|
43
|
+
| [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
|
|
44
|
+
|
|
45
|
+
# auro-checkbox
|
|
46
|
+
|
|
47
|
+
Custom element for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
48
|
+
|
|
49
|
+
## Properties
|
|
50
|
+
|
|
51
|
+
| Property | Attribute | Type | Default | Description |
|
|
52
|
+
|------------|------------|-----------|---------|--------------------------------------------------|
|
|
53
|
+
| [checked](#checked) | `checked` | `boolean` | false | If set to true, the checkbox will be filled with a checkmark. |
|
|
54
|
+
| [disabled](#disabled) | `disabled` | `boolean` | false | If set to true, the checkbox will not be clickable. |
|
|
55
|
+
| [error](#error) | `error` | `boolean` | false | If set to true, the checkbox will be displayed with an error state. |
|
|
56
|
+
| [id](#id) | `id` | `string` | | The id global attribute defines an identifier (ID) which must be unique in the whole document. |
|
|
57
|
+
| [name](#name) | `name` | `string` | | Accepts any string and is used to identify related checkboxes when submitting form data. |
|
|
58
|
+
| [onDark](#onDark) | `onDark` | `boolean` | false | Sets onDark styles for component. |
|
|
59
|
+
| [value](#value) | `value` | `string` | | Sets the element's input value. Must be unique within an auro-checkbox-group element. |
|
|
60
|
+
|
|
61
|
+
## Methods
|
|
62
|
+
|
|
63
|
+
| Method | Type | Description |
|
|
64
|
+
|---------|------------|------------------------------------|
|
|
65
|
+
| [reset](#reset) | `(): void` | Resets component to initial state. |
|
|
66
|
+
|
|
67
|
+
## Events
|
|
68
|
+
|
|
69
|
+
| Event | Type | Description |
|
|
70
|
+
|-------------------------|--------------------|--------------------------------------------------|
|
|
71
|
+
| `auroCheckbox-focusin` | `CustomEvent<any>` | |
|
|
72
|
+
| `auroCheckbox-focusout` | `CustomEvent<any>` | |
|
|
73
|
+
| `auroCheckbox-input` | `CustomEvent<any>` | |
|
|
74
|
+
| [change](#change) | `CustomEvent<any>` | (Deprecated) Notifies when checked value is changed. |
|
|
75
|
+
| [input](#input) | `InputEvent` | Notifies when when checked value is changed by user's interface. |
|
|
76
|
+
|
|
77
|
+
## CSS Shadow Parts
|
|
78
|
+
|
|
79
|
+
| Part | Description |
|
|
80
|
+
|------------------|-------------------------------------------|
|
|
81
|
+
| [checkbox](#checkbox) | apply css to a specific checkbox. |
|
|
82
|
+
| `checkbox-input` | apply css to a specific checkbox's input. |
|
|
83
|
+
| `checkbox-label` | apply css to a specific checkbox's label. |
|
|
84
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
85
|
+
|
|
86
|
+
## API Examples
|
|
87
|
+
|
|
88
|
+
### Basic
|
|
89
|
+
|
|
90
|
+
<div class="exampleWrapper">
|
|
91
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
92
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
93
|
+
<auro-checkbox-group>
|
|
94
|
+
<span slot="legend">Form label goes here</span>
|
|
95
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
96
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
97
|
+
<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>
|
|
98
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
99
|
+
</auro-checkbox-group>
|
|
100
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
101
|
+
</div>
|
|
102
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
103
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDark.html) -->
|
|
104
|
+
<!-- The below content is automatically added from ./../apiExamples/onDark.html -->
|
|
105
|
+
<auro-checkbox-group onDark>
|
|
106
|
+
<span slot="legend">Form label goes here</span>
|
|
107
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
108
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
109
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
110
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
111
|
+
</auro-checkbox-group>
|
|
112
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
113
|
+
</div>
|
|
114
|
+
<auro-accordion alignRight>
|
|
115
|
+
<span slot="trigger">See code</span>
|
|
116
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
117
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<auro-checkbox-group>
|
|
121
|
+
<span slot="legend">Form label goes here</span>
|
|
122
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
123
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
124
|
+
<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>
|
|
125
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
126
|
+
</auro-checkbox-group>
|
|
127
|
+
```
|
|
128
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
129
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDark.html) -->
|
|
130
|
+
<!-- The below content is automatically added from ./../apiExamples/onDark.html -->
|
|
131
|
+
<auro-checkbox-group onDark>
|
|
132
|
+
<span slot="legend">Form label goes here</span>
|
|
133
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
134
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
135
|
+
<auro-checkbox value="value3" name="basic" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
136
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
137
|
+
</auro-checkbox-group>
|
|
138
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
139
|
+
</auro-accordion>
|
|
140
|
+
|
|
141
|
+
### Disabled
|
|
142
|
+
|
|
143
|
+
Use the `disabled` attribute to disable individual `<auro-checkbox>` elements or the entire `<auro-checkbox-group>`.
|
|
144
|
+
|
|
145
|
+
#### Disabled Checkbox within Group
|
|
146
|
+
|
|
147
|
+
The `disabled` attribute used to disable a single `<auro-checkbox>` element.
|
|
148
|
+
|
|
149
|
+
<div class="exampleWrapper">
|
|
150
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
|
|
151
|
+
<!-- The below content is automatically added from ./../apiExamples/disabled.html -->
|
|
152
|
+
<auro-checkbox-group>
|
|
153
|
+
<span slot="legend">Form label goes here</span>
|
|
154
|
+
<auro-checkbox value="disabled-value1" name="disabled" id="checkbox-disabled1">Checkbox option</auro-checkbox>
|
|
155
|
+
<auro-checkbox value="disabled-value2" name="disabled" id="checkbox-disabled2" checked disabled>Disabled checkbox option</auro-checkbox>
|
|
156
|
+
<auro-checkbox value="disabled-value3" name="disabled" id="checkbox-disabled3" disabled>Disabled checkbox option</auro-checkbox>
|
|
157
|
+
<auro-checkbox value="disabled-value4" name="disabled" id="checkbox-disabled4" checked>Checkbox option</auro-checkbox>
|
|
158
|
+
</auro-checkbox-group>
|
|
159
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
160
|
+
</div>
|
|
161
|
+
<auro-accordion alignRight>
|
|
162
|
+
<span slot="trigger">See code</span>
|
|
163
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
|
|
164
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
|
|
165
|
+
|
|
166
|
+
```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
|
+
```
|
|
175
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
176
|
+
</auro-accordion>
|
|
177
|
+
|
|
178
|
+
#### Disabled Group
|
|
179
|
+
|
|
180
|
+
The `disabled` attribute used to disable the entire `<auro-checkbox-group>`.
|
|
181
|
+
|
|
182
|
+
<div class="exampleWrapper">
|
|
183
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabledGroup.html) -->
|
|
184
|
+
<!-- The below content is automatically added from ./../apiExamples/disabledGroup.html -->
|
|
185
|
+
<auro-checkbox-group disabled>
|
|
186
|
+
<span slot="legend">Form label goes here</span>
|
|
187
|
+
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
188
|
+
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
189
|
+
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
190
|
+
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
191
|
+
</auro-checkbox-group>
|
|
192
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
193
|
+
</div>
|
|
194
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
195
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkDisabled.html) -->
|
|
196
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkDisabled.html -->
|
|
197
|
+
<auro-checkbox-group onDark disabled>
|
|
198
|
+
<span slot="legend">Form label goes here</span>
|
|
199
|
+
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
200
|
+
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
201
|
+
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
202
|
+
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
203
|
+
</auro-checkbox-group>
|
|
204
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
205
|
+
</div>
|
|
206
|
+
<auro-accordion alignRight>
|
|
207
|
+
<span slot="trigger">See code</span>
|
|
208
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabledGroup.html) -->
|
|
209
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/disabledGroup.html -->
|
|
210
|
+
|
|
211
|
+
```html
|
|
212
|
+
<auro-checkbox-group disabled>
|
|
213
|
+
<span slot="legend">Form label goes here</span>
|
|
214
|
+
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
215
|
+
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
216
|
+
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
217
|
+
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
218
|
+
</auro-checkbox-group>
|
|
219
|
+
```
|
|
220
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
221
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkDisabled.html) -->
|
|
222
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkDisabled.html -->
|
|
223
|
+
<auro-checkbox-group onDark disabled>
|
|
224
|
+
<span slot="legend">Form label goes here</span>
|
|
225
|
+
<auro-checkbox value="disabled-value1" name="disabledGroup" id="checkbox-disabledGroup1">Disabled checkbox option</auro-checkbox>
|
|
226
|
+
<auro-checkbox value="disabled-value2" name="disabledGroup" id="checkbox-disabledGroup2" checked>Disabled checkbox option</auro-checkbox>
|
|
227
|
+
<auro-checkbox value="disabled-value3" name="disabledGroup" id="checkbox-disabledGroup3">Disabled checkbox option</auro-checkbox>
|
|
228
|
+
<auro-checkbox value="disabled-value4" name="disabledGroup" id="checkbox-disabledGroup4">Disabled checkbox option</auro-checkbox>
|
|
229
|
+
</auro-checkbox-group>
|
|
230
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
231
|
+
</auro-accordion>
|
|
232
|
+
|
|
233
|
+
### Error
|
|
234
|
+
|
|
235
|
+
Use the `error` attribute to force an error state on the element.
|
|
236
|
+
|
|
237
|
+
#### Checkbox Group with Error
|
|
238
|
+
|
|
239
|
+
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.
|
|
240
|
+
|
|
241
|
+
<div class="exampleWrapper">
|
|
242
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/errorGroup.html) -->
|
|
243
|
+
<!-- The below content is automatically added from ./../apiExamples/errorGroup.html -->
|
|
244
|
+
<auro-checkbox-group error="custom error">
|
|
245
|
+
<span slot="legend">Form label goes here</span>
|
|
246
|
+
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
247
|
+
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
248
|
+
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
249
|
+
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
250
|
+
</auro-checkbox-group>
|
|
251
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
252
|
+
</div>
|
|
253
|
+
<div class="exampleWrapper--ondark" aria-hidden>
|
|
254
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkError.html) -->
|
|
255
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkError.html -->
|
|
256
|
+
<auro-checkbox-group onDark error="custom error">
|
|
257
|
+
<span slot="legend">Form label goes here</span>
|
|
258
|
+
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
259
|
+
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
260
|
+
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
261
|
+
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
262
|
+
</auro-checkbox-group>
|
|
263
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
264
|
+
</div>
|
|
265
|
+
<auro-accordion alignRight>
|
|
266
|
+
<span slot="trigger">See code</span>
|
|
267
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/errorGroup.html) -->
|
|
268
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/errorGroup.html -->
|
|
269
|
+
|
|
270
|
+
```html
|
|
271
|
+
<auro-checkbox-group error="custom error">
|
|
272
|
+
<span slot="legend">Form label goes here</span>
|
|
273
|
+
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
274
|
+
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
275
|
+
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
276
|
+
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
277
|
+
</auro-checkbox-group>
|
|
278
|
+
```
|
|
279
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
280
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/onDarkError.html) -->
|
|
281
|
+
<!-- The below content is automatically added from ./../apiExamples/onDarkError.html -->
|
|
282
|
+
<auro-checkbox-group onDark error="custom error">
|
|
283
|
+
<span slot="legend">Form label goes here</span>
|
|
284
|
+
<auro-checkbox value="error-value1" name="error" id="checkbox-errorGroup1">Error checkbox option</auro-checkbox>
|
|
285
|
+
<auro-checkbox value="error-value2" name="error" id="checkbox-errorGroup2">Error checkbox option</auro-checkbox>
|
|
286
|
+
<auro-checkbox value="error-value3" name="error" id="checkbox-errorGroup3">Error checkbox option</auro-checkbox>
|
|
287
|
+
<auro-checkbox value="error-value4" name="error" id="checkbox-errorGroup4" checked>Error checkbox option</auro-checkbox>
|
|
288
|
+
</auro-checkbox-group>
|
|
289
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
290
|
+
</auro-accordion>
|
|
291
|
+
|
|
292
|
+
### Form Validation
|
|
293
|
+
|
|
294
|
+
In the `auro-checkbox-group` element, the `required` and `error` states are the tqo possible validation states.
|
|
295
|
+
|
|
296
|
+
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`.
|
|
297
|
+
|
|
298
|
+
#### Required
|
|
299
|
+
|
|
300
|
+
When present, the `required` attribute specifies that at least one or more `<auro-checkbox>` elements within the `<auro-checkbox-group>` must be checked.
|
|
301
|
+
|
|
302
|
+
<div class="exampleWrapper">
|
|
303
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/required.html) -->
|
|
304
|
+
<!-- The below content is automatically added from ./../apiExamples/required.html -->
|
|
305
|
+
<auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
306
|
+
<span slot="legend">Form label goes here</span>
|
|
307
|
+
<auro-checkbox value="value1" name="required" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
308
|
+
<auro-checkbox value="value2" name="required" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
309
|
+
<auro-checkbox value="value3" name="required" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
310
|
+
<auro-checkbox value="value4" name="required" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
311
|
+
</auro-checkbox-group>
|
|
312
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
313
|
+
</div>
|
|
314
|
+
<auro-accordion alignRight>
|
|
315
|
+
<span slot="trigger">See code</span>
|
|
316
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/required.html) -->
|
|
317
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/required.html -->
|
|
318
|
+
|
|
319
|
+
```html
|
|
320
|
+
<auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
321
|
+
<span slot="legend">Form label goes here</span>
|
|
322
|
+
<auro-checkbox value="value1" name="required" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
323
|
+
<auro-checkbox value="value2" name="required" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
324
|
+
<auro-checkbox value="value3" name="required" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
325
|
+
<auro-checkbox value="value4" name="required" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
326
|
+
</auro-checkbox-group>
|
|
327
|
+
```
|
|
328
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
329
|
+
</auro-accordion>
|
|
330
|
+
|
|
331
|
+
### Custom optional label <a name="optionalLabel"></a>
|
|
332
|
+
The `<auro-checkbox-group>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
|
|
333
|
+
|
|
334
|
+
<div class="exampleWrapper">
|
|
335
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optionalLabel.html) -->
|
|
336
|
+
<!-- The below content is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
337
|
+
<auro-checkbox-group>
|
|
338
|
+
<span slot="legend">Form label goes here</span>
|
|
339
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
340
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
341
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
342
|
+
<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>
|
|
343
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
344
|
+
</auro-checkbox-group>
|
|
345
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
346
|
+
</div>
|
|
347
|
+
<auro-accordion alignRight>
|
|
348
|
+
<span slot="trigger">See code</span>
|
|
349
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optionalLabel.html) -->
|
|
350
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/optionalLabel.html -->
|
|
351
|
+
|
|
352
|
+
```html
|
|
353
|
+
<auro-checkbox-group>
|
|
354
|
+
<span slot="legend">Form label goes here</span>
|
|
355
|
+
<span slot="optionalLabel" style="font-size: small; color: grey"> - optional</span>
|
|
356
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
357
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2" checked>Checkbox option</auro-checkbox>
|
|
358
|
+
<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>
|
|
359
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
360
|
+
</auro-checkbox-group>
|
|
361
|
+
```
|
|
362
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
363
|
+
</auro-accordion>
|
|
364
|
+
|
|
365
|
+
### Functional Examples
|
|
366
|
+
|
|
367
|
+
#### Reset State
|
|
368
|
+
|
|
369
|
+
Use the `reset()` method to reset the `<auro-checkbox-group>`'s `value` and `validity` state. Doing so will preserve all other attributes and properties.
|
|
370
|
+
|
|
371
|
+
<div class="exampleWrapper">
|
|
372
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/resetState.html) -->
|
|
373
|
+
<!-- The below content is automatically added from ./../apiExamples/resetState.html -->
|
|
374
|
+
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
375
|
+
<br/><br/>
|
|
376
|
+
<auro-checkbox-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
|
|
377
|
+
<span slot="legend">Form label goes here</span>
|
|
378
|
+
<auro-checkbox value="value1" name="resetState" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
379
|
+
<auro-checkbox value="value2" name="resetState" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
380
|
+
<auro-checkbox value="value3" name="resetState" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
381
|
+
<auro-checkbox value="value4" name="resetState" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
382
|
+
</auro-checkbox-group>
|
|
383
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
384
|
+
</div>
|
|
385
|
+
<auro-accordion alignRight>
|
|
386
|
+
<span slot="trigger">See code</span>
|
|
387
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.html) -->
|
|
388
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/resetState.html -->
|
|
389
|
+
|
|
390
|
+
```html
|
|
391
|
+
<auro-button id="resetStateBtn">Reset</auro-button>
|
|
392
|
+
<br/><br/>
|
|
393
|
+
<auro-checkbox-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
|
|
394
|
+
<span slot="legend">Form label goes here</span>
|
|
395
|
+
<auro-checkbox value="value1" name="resetState" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
396
|
+
<auro-checkbox value="value2" name="resetState" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
397
|
+
<auro-checkbox value="value3" name="resetState" id="checkbox-basic3">Checkbox option</auro-checkbox>
|
|
398
|
+
<auro-checkbox value="value4" name="resetState" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
399
|
+
</auro-checkbox-group>
|
|
400
|
+
```
|
|
401
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
402
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/resetState.js) -->
|
|
403
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/resetState.js -->
|
|
404
|
+
|
|
405
|
+
```js
|
|
406
|
+
export function resetStateExample() {
|
|
407
|
+
const elem = document.querySelector('#resetStateExample');
|
|
408
|
+
|
|
409
|
+
document.querySelector('#resetStateBtn').addEventListener('click', () => {
|
|
410
|
+
elem.reset();
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
```
|
|
414
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
415
|
+
</auro-accordion>
|
|
416
|
+
|
|
417
|
+
### Theme Support
|
|
418
|
+
|
|
419
|
+
The component may be restyled using the following code sample and changing the values of the following token(s).
|
|
420
|
+
|
|
421
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
|
|
422
|
+
<!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
|
|
423
|
+
|
|
424
|
+
```scss
|
|
425
|
+
@use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
|
|
426
|
+
|
|
427
|
+
:host {
|
|
428
|
+
--ds-auro-checkbox-border-color: var(--ds-basic-color-border-bold, #{v.$ds-basic-color-border-bold});
|
|
429
|
+
--ds-auro-checkbox-checkmark-color: var(--ds-advanced-color-boolean-indicator, #{v.$ds-advanced-color-boolean-indicator});
|
|
430
|
+
--ds-auro-checkbox-container-color: var(--ds-advanced-color-boolean-isfalse, #{v.$ds-advanced-color-boolean-isfalse});
|
|
431
|
+
--ds-auro-checkbox-label-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
432
|
+
--ds-auro-checkbox-outline-color: transparent;
|
|
433
|
+
--ds-auro-checkbox-group-text-color: var(--ds-basic-color-texticon-default, #{v.$ds-basic-color-texticon-default});
|
|
434
|
+
}
|
|
435
|
+
```
|
|
436
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|