@aurodesignsystem-dev/auro-formkit 0.0.0-pr1456.1 → 0.0.0-pr1457.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/components/bibtemplate/dist/iconVersion.d.ts +1 -1
- package/components/bibtemplate/dist/index.js +10 -10
- package/components/bibtemplate/dist/registered.js +10 -10
- package/components/checkbox/README.md +26 -56
- package/components/checkbox/demo/accessibility.html +48 -0
- package/components/checkbox/demo/accessibility.md +44 -0
- package/components/checkbox/demo/api.html +17 -26
- package/components/checkbox/demo/api.md +0 -396
- package/components/checkbox/demo/api.min.js +2 -2106
- package/components/checkbox/demo/customize.html +51 -0
- package/components/checkbox/demo/customize.md +361 -0
- package/components/checkbox/demo/demo-support.js +60 -0
- package/components/checkbox/demo/demo-support.min.js +55732 -0
- package/components/checkbox/demo/design.html +51 -0
- package/components/checkbox/demo/design.md +149 -0
- package/components/checkbox/demo/getting-started.html +51 -0
- package/components/checkbox/demo/getting-started.md +261 -0
- package/components/checkbox/demo/index.html +17 -21
- package/components/checkbox/demo/index.md +158 -45
- package/components/checkbox/demo/index.min.js +2 -3
- package/components/checkbox/demo/install.md +82 -0
- package/components/checkbox/demo/keyboard-behavior.html +48 -0
- package/components/checkbox/demo/readme.html +10 -18
- package/components/checkbox/demo/readme.md +26 -56
- package/components/checkbox/demo/styles.min.css +1 -0
- package/components/checkbox/demo/styles.scss +1 -0
- package/components/checkbox/demo/voiceover.html +48 -0
- package/components/checkbox/demo/voiceover.md +37 -0
- package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -6
- package/components/checkbox/dist/auro-checkbox.d.ts +8 -9
- package/components/checkbox/dist/index.js +2 -3
- package/components/checkbox/dist/registered.js +2 -3
- package/components/combobox/README.md +41 -66
- package/components/combobox/demo/accessibility.html +50 -0
- package/components/combobox/demo/accessibility.md +77 -0
- package/components/combobox/demo/api.html +8 -20
- package/components/combobox/demo/api.md +54 -2334
- package/components/combobox/demo/api.min.js +3 -17971
- package/components/combobox/demo/customize.html +52 -0
- package/components/combobox/demo/customize.js +24 -0
- package/components/combobox/demo/customize.md +1249 -0
- package/components/combobox/demo/customize.min.js +177 -0
- package/components/combobox/demo/demo-support.js +60 -0
- package/components/combobox/demo/demo-support.min.js +55732 -0
- package/components/combobox/demo/design.html +53 -0
- package/components/combobox/demo/design.md +283 -0
- package/components/combobox/demo/getting-started.html +52 -0
- package/components/combobox/demo/getting-started.js +21 -0
- package/components/combobox/demo/getting-started.md +397 -0
- package/components/combobox/demo/getting-started.min.js +12 -0
- package/components/combobox/demo/index.html +16 -22
- package/components/combobox/demo/index.js +3 -2
- package/components/combobox/demo/index.md +298 -188
- package/components/combobox/demo/index.min.js +13 -17956
- package/components/combobox/demo/install.md +77 -0
- package/components/combobox/demo/{keyboardBehavior.html → keyboard-behavior.html} +5 -11
- package/components/combobox/demo/keyboard-behavior.md +276 -0
- package/components/combobox/demo/readme.html +5 -11
- package/components/combobox/demo/readme.md +41 -66
- package/components/combobox/demo/registered.min.js +18095 -0
- package/components/combobox/demo/styles.css +974 -0
- package/components/combobox/demo/styles.min.css +1 -0
- package/components/combobox/demo/styles.scss +1 -0
- package/components/combobox/demo/swap-value.min.js +16 -0
- package/components/combobox/demo/voiceover.html +59 -0
- package/components/combobox/demo/voiceover.md +118 -0
- package/components/combobox/dist/auro-combobox.d.ts +35 -35
- package/components/combobox/dist/index.js +183 -46
- package/components/combobox/dist/registered.js +183 -46
- package/components/counter/README.md +37 -55
- package/components/counter/demo/api.md +745 -813
- package/components/counter/demo/api.min.js +182 -44
- package/components/counter/demo/index.md +28 -32
- package/components/counter/demo/index.min.js +182 -44
- package/components/counter/demo/keyboard-behavior.md +127 -0
- package/components/counter/demo/readme.md +37 -55
- package/components/counter/dist/auro-counter-group.d.ts +2 -2
- package/components/counter/dist/auro-counter.d.ts +10 -10
- package/components/counter/dist/index.js +181 -43
- package/components/counter/dist/registered.js +181 -43
- package/components/datepicker/README.md +23 -51
- package/components/datepicker/demo/accessibility.html +50 -0
- package/components/datepicker/demo/accessibility.md +64 -0
- package/components/datepicker/demo/api.md +0 -1774
- package/components/datepicker/demo/api.min.js +2 -24475
- package/components/datepicker/demo/auro-datepicker.min.js +24613 -0
- package/components/datepicker/demo/customize.html +52 -0
- package/components/datepicker/demo/customize.md +723 -0
- package/components/datepicker/demo/demo-support.js +60 -0
- package/components/datepicker/demo/demo-support.min.js +55732 -0
- package/components/datepicker/demo/design.html +54 -0
- package/components/datepicker/demo/design.md +158 -0
- package/components/datepicker/demo/getting-started.html +52 -0
- package/components/datepicker/demo/getting-started.md +237 -0
- package/components/datepicker/demo/index.html +14 -35
- package/components/datepicker/demo/index.md +201 -152
- package/components/datepicker/demo/index.min.js +1 -24474
- package/components/datepicker/demo/keyboard-behavior.html +12 -33
- package/components/datepicker/demo/readme.md +23 -51
- package/components/datepicker/demo/styles.min.css +1 -0
- package/components/datepicker/demo/styles.scss +1 -0
- package/components/datepicker/demo/voiceover.html +59 -0
- package/components/datepicker/demo/voiceover.md +98 -0
- package/components/datepicker/dist/index.js +194 -57
- package/components/datepicker/dist/registered.js +194 -57
- package/components/datepicker/dist/{auro-calendar-cell.d.ts → src/auro-calendar-cell.d.ts} +2 -2
- package/components/datepicker/dist/{auro-datepicker.d.ts → src/auro-datepicker.d.ts} +13 -13
- package/components/datepicker/dist/src/iconVersion.d.ts +2 -0
- package/components/datepicker/dist/{utilities.d.ts → src/utilities.d.ts} +4 -4
- package/components/datepicker/dist/{utilitiesCalendar.d.ts → src/utilitiesCalendar.d.ts} +3 -3
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +2 -2
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker.d.ts +1 -1
- package/components/dropdown/README.md +35 -53
- package/components/dropdown/demo/api.md +717 -773
- package/components/dropdown/demo/api.min.js +161 -23
- package/components/dropdown/demo/index.md +120 -130
- package/components/dropdown/demo/index.min.js +161 -23
- package/components/dropdown/demo/{keyboardBehavior.md → keyboard-behavior.md} +52 -57
- package/components/dropdown/demo/readme.md +35 -53
- package/components/dropdown/dist/auro-dropdown.d.ts +22 -22
- package/components/dropdown/dist/auro-dropdownBib.d.ts +3 -3
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +1 -1
- package/components/dropdown/dist/iconVersion.d.ts +1 -1
- package/components/dropdown/dist/index.js +160 -22
- package/components/dropdown/dist/registered.js +160 -22
- package/components/form/README.md +14 -34
- package/components/form/demo/api.md +156 -162
- package/components/form/demo/api.min.js +756 -208
- package/components/form/demo/index.md +27 -33
- package/components/form/demo/index.min.js +756 -208
- package/components/form/demo/keyboard-behavior.md +38 -0
- package/components/form/demo/readme.md +14 -34
- package/components/input/README.md +28 -53
- package/components/input/demo/accessibility.html +37 -0
- package/components/input/demo/accessibility.md +69 -0
- package/components/input/demo/api.html +17 -23
- package/components/input/demo/api.js +4 -23
- package/components/input/demo/api.md +67 -1359
- package/components/input/demo/api.min.js +1 -7453
- package/components/input/demo/auro-input.min.js +7362 -0
- package/components/input/demo/customize.html +53 -0
- package/components/input/demo/customize.js +25 -0
- package/components/input/demo/customize.md +1372 -0
- package/components/input/demo/customize.min.js +71 -0
- package/components/input/demo/demo-support.js +60 -0
- package/components/input/demo/demo-support.min.js +55732 -0
- package/components/input/demo/design.html +38 -0
- package/components/input/demo/design.md +224 -0
- package/components/input/demo/getting-started.html +52 -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 +9 -0
- package/components/input/demo/index.html +16 -23
- package/components/input/demo/index.js +0 -11
- package/components/input/demo/index.md +180 -154
- package/components/input/demo/index.min.js +1 -7373
- package/components/input/demo/keyboard-behavior.html +37 -0
- package/components/input/demo/readme.md +28 -53
- package/components/input/demo/styles.css +974 -0
- package/components/input/demo/styles.min.css +1 -0
- package/components/input/demo/styles.scss +1 -0
- package/components/input/demo/voiceover.html +37 -0
- package/components/input/demo/voiceover.md +70 -0
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +29 -30
- package/components/input/dist/iconVersion.d.ts +1 -1
- package/components/input/dist/index.js +10 -11
- package/components/input/dist/registered.js +10 -11
- package/components/menu/README.md +24 -42
- package/components/menu/demo/api.md +785 -829
- package/components/menu/demo/api.min.js +7 -7
- package/components/menu/demo/index.md +33 -35
- package/components/menu/demo/index.min.js +7 -7
- package/components/menu/demo/keyboard-behavior.md +18 -0
- package/components/menu/demo/readme.md +24 -42
- package/components/menu/dist/auro-menu-utils.d.ts +1 -1
- package/components/menu/dist/auro-menu.context.d.ts +3 -3
- package/components/menu/dist/auro-menu.d.ts +4 -4
- package/components/menu/dist/auro-menuoption.d.ts +6 -6
- package/components/menu/dist/index.js +6 -6
- package/components/menu/dist/registered.js +6 -6
- package/components/radio/README.md +22 -49
- 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 -621
- package/components/radio/demo/api.min.js +1 -1
- 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 +124 -63
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/keyboard-behavior.html +51 -0
- package/components/radio/demo/keyboard-behavior.md +72 -0
- package/components/radio/demo/layout.md +30 -0
- package/components/radio/demo/readme.html +11 -17
- package/components/radio/demo/readme.md +22 -49
- 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/auro-radio-group.d.ts +9 -9
- package/components/radio/dist/auro-radio.d.ts +8 -8
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +50 -68
- package/components/select/demo/accessibility.html +50 -0
- package/components/select/demo/accessibility.md +76 -0
- package/components/select/demo/api.html +5 -17
- package/components/select/demo/api.md +52 -2422
- package/components/select/demo/customize.html +52 -0
- package/components/select/demo/customize.js +11 -0
- package/components/select/demo/customize.md +1049 -0
- package/components/select/demo/customize.min.js +12 -0
- package/components/select/demo/demo-support.js +60 -0
- package/components/select/demo/demo-support.min.js +55732 -0
- package/components/select/demo/design.html +51 -0
- package/components/select/demo/design.md +391 -0
- package/components/select/demo/getting-started.html +52 -0
- package/components/select/demo/getting-started.js +26 -0
- package/components/select/demo/getting-started.md +412 -0
- package/components/select/demo/getting-started.min.js +56 -0
- package/components/select/demo/index.html +18 -35
- package/components/select/demo/index.js +5 -3
- package/components/select/demo/index.md +165 -345
- package/components/select/demo/index.min.js +6 -10484
- package/components/select/demo/install.md +95 -0
- package/components/select/demo/keyboard-behavior.html +8 -39
- package/components/select/demo/keyboard-behavior.md +249 -0
- package/components/select/demo/keyboardBehavior.html +5 -38
- package/components/select/demo/layout.html +51 -0
- package/components/select/demo/readme.html +5 -13
- package/components/select/demo/readme.md +50 -68
- package/components/select/demo/{api.min.js → registered.min.js} +179 -151
- package/components/select/demo/styles.min.css +1 -0
- package/components/select/demo/styles.scss +1 -0
- package/components/select/demo/voiceover.html +48 -0
- package/components/select/demo/voiceover.md +183 -0
- package/components/select/dist/auro-select.d.ts +11 -11
- package/components/select/dist/index.js +171 -33
- package/components/select/dist/registered.js +171 -33
- package/custom-elements.json +1491 -1494
- package/package.json +37 -30
- package/components/checkbox/demo/keyboardBehavior.md +0 -0
- package/components/combobox/demo/keyboardBehavior.md +0 -281
- package/components/counter/demo/keyboardBehavior.md +0 -127
- package/components/datepicker/demo/keyboardBehavior.md +0 -19
- package/components/datepicker/dist/iconVersion.d.ts +0 -2
- package/components/form/demo/keyboardBehavior.md +0 -0
- package/components/input/demo/keyboardBehavior.md +0 -0
- package/components/menu/demo/keyboardBehavior.md +0 -0
- package/components/radio/demo/keyboardBehavior.md +0 -0
- package/components/select/demo/api.js +0 -39
- package/components/select/demo/keyboardBehavior.md +0 -245
- /package/components/datepicker/dist/{auro-calendar-month.d.ts → src/auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{auro-calendar.d.ts → src/auro-calendar.d.ts} +0 -0
- /package/components/datepicker/dist/{buttonVersion.d.ts → src/buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{datepickerKeyboardStrategy.d.ts → src/datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/components/datepicker/dist/{popoverVersion.d.ts → src/popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{utilitiesCalendarRender.d.ts → src/utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
|
@@ -1,55 +1,168 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
#
|
|
8
|
-
|
|
1
|
+
<auro-header level="1" id="overview">Checkbox - Overview and UX Guide</auro-header>
|
|
2
|
+
<div class="contentWrapper">
|
|
3
|
+
<nav>
|
|
4
|
+
<auro-nav anchorNavContent=".scrollWrapper">
|
|
5
|
+
<span slot="mobileToggleCollapsed">View More</span>
|
|
6
|
+
<span slot="mobileToggleExpanded">View Less</span>
|
|
7
|
+
<auro-anchorlink fluid href="#description">Description</auro-anchorlink>
|
|
8
|
+
<auro-anchorlink fluid href="#userStories">User Stories</auro-anchorlink>
|
|
9
|
+
<auro-anchorlink fluid href="#selectOptions" class="level2 body-xs">Select Options</auro-anchorlink>
|
|
10
|
+
<auro-anchorlink fluid href="#presetValue" class="level2 body-xs">Preset Value</auro-anchorlink>
|
|
11
|
+
<auro-anchorlink fluid href="#skipSelection" class="level2 body-xs">Skip Selection</auro-anchorlink>
|
|
12
|
+
</auro-nav>
|
|
13
|
+
</nav>
|
|
14
|
+
<div class="mainContent">
|
|
15
|
+
<div class="scrollWrapper">
|
|
16
|
+
<auro-header level="2" id="description">Description</auro-header>
|
|
9
17
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/description.md) -->
|
|
10
18
|
<!-- The below content is automatically added from ./../docs/partials/description.md -->
|
|
11
|
-
|
|
12
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
19
|
+
<code><auro-checkbox></code> is a <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements" target="_blank">HTML custom element</auro-hyperlink> for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
20
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
21
|
+
<div class="exampleWrapper">
|
|
22
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
23
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
24
|
+
<auro-checkbox-group>
|
|
25
|
+
<span slot="legend">Form label goes here</span>
|
|
26
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
27
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
28
|
+
<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>
|
|
29
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
30
|
+
</auro-checkbox-group>
|
|
31
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
32
|
+
</div>
|
|
33
|
+
<auro-accordion alignRight>
|
|
34
|
+
<span slot="trigger">See code</span>
|
|
35
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
36
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
37
|
+
<pre class="language-html"><code class="language-html"><auro-checkbox-group>
|
|
38
|
+
<span slot="legend">Form label goes here</span>
|
|
39
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
40
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
41
|
+
<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>
|
|
42
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
43
|
+
</auro-checkbox-group></code></pre>
|
|
44
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
45
|
+
</auro-accordion>
|
|
46
|
+
<section>
|
|
47
|
+
<auro-header level="2" id="userStories">User Stories</auro-header>
|
|
16
48
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/useCases.md) -->
|
|
17
49
|
<!-- The below content is automatically added from ./../docs/partials/useCases.md -->
|
|
18
|
-
The
|
|
19
|
-
|
|
20
|
-
* Be filling out a form
|
|
21
|
-
* Need to select one or more options
|
|
22
|
-
<!-- AURO-GENERATED-CONTENT:END -->
|
|
23
|
-
|
|
24
|
-
## Example(s)
|
|
25
|
-
|
|
26
|
-
### Basic
|
|
50
|
+
The <code><auro-checkbox></code> element should be used in situations where users may:
|
|
27
51
|
|
|
52
|
+
* Be filling out a form
|
|
53
|
+
* Need to select one or more options
|
|
54
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/index/userStories.md) -->
|
|
56
|
+
<!-- The below content is automatically added from ./../docs/partials/index/userStories.md -->
|
|
57
|
+
<auro-header level="3" id="selectOptions">Select one or more options</auro-header>
|
|
58
|
+
<ol>
|
|
59
|
+
<li>
|
|
60
|
+
Move focus to a checkbox
|
|
61
|
+
<div class="note">
|
|
62
|
+
<p>
|
|
63
|
+
Each checkbox is an independent tab stop. Focus moves to the checkbox via <kbd>Tab</kbd> or by clicking/tapping the checkbox or its label.
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
</li>
|
|
67
|
+
<li>
|
|
68
|
+
Toggle the checkbox
|
|
69
|
+
<div class="note">
|
|
70
|
+
<p>
|
|
71
|
+
Press <kbd>Space</kbd> or click/tap to toggle the <code>checked</code> state. Multiple checkboxes can be checked simultaneously.
|
|
72
|
+
</p>
|
|
73
|
+
</div>
|
|
74
|
+
</li>
|
|
75
|
+
<li>
|
|
76
|
+
Move focus away from the checkbox group
|
|
77
|
+
<div class="note">
|
|
78
|
+
<p>
|
|
79
|
+
If the group is <code>required</code>, validation is triggered on blur. If no checkbox is checked the component renders the <code>valueMissing</code> error state.
|
|
80
|
+
</p>
|
|
81
|
+
</div>
|
|
82
|
+
</li>
|
|
83
|
+
</ol>
|
|
28
84
|
<div class="exampleWrapper">
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</div>
|
|
85
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
86
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
87
|
+
<auro-checkbox-group>
|
|
88
|
+
<span slot="legend">Form label goes here</span>
|
|
89
|
+
<auro-checkbox value="value1" name="basic" id="checkbox-basic1">Checkbox option</auro-checkbox>
|
|
90
|
+
<auro-checkbox value="value2" name="basic" id="checkbox-basic2">Checkbox option</auro-checkbox>
|
|
91
|
+
<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>
|
|
92
|
+
<auro-checkbox value="value4" name="basic" id="checkbox-basic4">Checkbox option</auro-checkbox>
|
|
93
|
+
</auro-checkbox-group>
|
|
94
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
95
|
+
</div>
|
|
40
96
|
<auro-accordion alignRight>
|
|
41
|
-
|
|
97
|
+
<span slot="trigger">See code</span>
|
|
42
98
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
43
|
-
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
44
|
-
|
|
45
|
-
|
|
99
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
100
|
+
<pre class="language-html"><code class="language-html"><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">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></code></pre>
|
|
107
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
108
|
+
</auro-accordion>
|
|
109
|
+
<auro-header level="3" id="presetValue">Preset checked options</auro-header>
|
|
110
|
+
<p>Use the <code>checked</code> attribute on individual <code><auro-checkbox></code> elements to preset which options are selected on initial render.</p>
|
|
111
|
+
<div class="exampleWrapper">
|
|
112
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/preset-checked.html) -->
|
|
113
|
+
<!-- The below content is automatically added from ./../apiExamples/preset-checked.html -->
|
|
46
114
|
<auro-checkbox-group>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</auro-checkbox-group>
|
|
53
|
-
|
|
54
|
-
|
|
115
|
+
<span slot="legend">Select your preferences</span>
|
|
116
|
+
<auro-checkbox value="wifi" name="preset" id="checkbox-preset1" checked>Wi-Fi</auro-checkbox>
|
|
117
|
+
<auro-checkbox value="power" name="preset" id="checkbox-preset2" checked>Power outlet</auro-checkbox>
|
|
118
|
+
<auro-checkbox value="legroom" name="preset" id="checkbox-preset3">Extra legroom</auro-checkbox>
|
|
119
|
+
<auro-checkbox value="window" name="preset" id="checkbox-preset4">Window seat</auro-checkbox>
|
|
120
|
+
</auro-checkbox-group>
|
|
121
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
122
|
+
</div>
|
|
123
|
+
<auro-accordion alignRight>
|
|
124
|
+
<span slot="trigger">See code</span>
|
|
125
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/preset-checked.html) -->
|
|
126
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/preset-checked.html -->
|
|
127
|
+
<pre class="language-html"><code class="language-html"><auro-checkbox-group>
|
|
128
|
+
<span slot="legend">Select your preferences</span>
|
|
129
|
+
<auro-checkbox value="wifi" name="preset" id="checkbox-preset1" checked>Wi-Fi</auro-checkbox>
|
|
130
|
+
<auro-checkbox value="power" name="preset" id="checkbox-preset2" checked>Power outlet</auro-checkbox>
|
|
131
|
+
<auro-checkbox value="legroom" name="preset" id="checkbox-preset3">Extra legroom</auro-checkbox>
|
|
132
|
+
<auro-checkbox value="window" name="preset" id="checkbox-preset4">Window seat</auro-checkbox>
|
|
133
|
+
</auro-checkbox-group></code></pre>
|
|
134
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
135
|
+
</auro-accordion>
|
|
136
|
+
<auro-header level="3" id="skipSelection">Skip selection</auro-header>
|
|
137
|
+
<p>The checkbox group does not force the user to make a selection. If no checkbox is checked and the group is not <code>required</code>, the user can move past the group without checking any option.</p>
|
|
138
|
+
<p>If the group is <code>required</code>, moving focus away without checking any option triggers validation and renders the <code>valueMissing</code> error state.</p>
|
|
139
|
+
<div class="exampleWrapper">
|
|
140
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/required.html) -->
|
|
141
|
+
<!-- The below content is automatically added from ./../apiExamples/required.html -->
|
|
142
|
+
<auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
143
|
+
<span slot="legend">Form label goes here</span>
|
|
144
|
+
<auro-checkbox value="value1" name="required" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
145
|
+
<auro-checkbox value="value2" name="required" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
146
|
+
<auro-checkbox value="value3" name="required" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
147
|
+
<auro-checkbox value="value4" name="required" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
148
|
+
</auro-checkbox-group>
|
|
149
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
150
|
+
</div>
|
|
151
|
+
<auro-accordion alignRight>
|
|
152
|
+
<span slot="trigger">See code</span>
|
|
153
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/required.html) -->
|
|
154
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/required.html -->
|
|
155
|
+
<pre class="language-html"><code class="language-html"><auro-checkbox-group required setCustomValidityValueMissing="Please select an option">
|
|
156
|
+
<span slot="legend">Form label goes here</span>
|
|
157
|
+
<auro-checkbox value="value1" name="required" id="checkbox-required1">Checkbox option</auro-checkbox>
|
|
158
|
+
<auro-checkbox value="value2" name="required" id="checkbox-required2">Checkbox option</auro-checkbox>
|
|
159
|
+
<auro-checkbox value="value3" name="required" id="checkbox-required3">Checkbox option</auro-checkbox>
|
|
160
|
+
<auro-checkbox value="value4" name="required" id="checkbox-required4">Checkbox option</auro-checkbox>
|
|
161
|
+
</auro-checkbox-group></code></pre>
|
|
162
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
55
163
|
</auro-accordion>
|
|
164
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
165
|
+
</section>
|
|
166
|
+
</div>
|
|
167
|
+
</div>
|
|
168
|
+
</div>
|
|
@@ -230,8 +230,7 @@ class AuroCheckbox extends i$2 {
|
|
|
230
230
|
* The id global attribute defines an identifier (ID) which must be unique in the whole document.
|
|
231
231
|
*/
|
|
232
232
|
id: {
|
|
233
|
-
type: String
|
|
234
|
-
reflect: true
|
|
233
|
+
type: String
|
|
235
234
|
},
|
|
236
235
|
|
|
237
236
|
/**
|
|
@@ -1682,7 +1681,7 @@ class AuroHelpText extends i$2 {
|
|
|
1682
1681
|
}
|
|
1683
1682
|
}
|
|
1684
1683
|
|
|
1685
|
-
var formkitVersion = '
|
|
1684
|
+
var formkitVersion = '202605041857';
|
|
1686
1685
|
|
|
1687
1686
|
// Copyright (c) 2026 Alaska Airlines. All rights reserved. Licensed under the Apache-2.0 license
|
|
1688
1687
|
// See LICENSE in the project root for license information.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
<auro-header level="2" id="setup">Setup</auro-header>
|
|
2
|
+
<auro-accordion-group Emphasis>
|
|
3
|
+
<auro-accordion expanded class="section" id="recommendedAccordion">
|
|
4
|
+
<span slot="trigger">Recommended Installation and Implementation</span>
|
|
5
|
+
<div class="accordion-content">
|
|
6
|
+
<auro-header level="3">Install</auro-header>
|
|
7
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/templates/componentInstall.md) -->
|
|
8
|
+
<!-- The below content is automatically added from ./../../../docs/templates/componentInstall.md -->
|
|
9
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/</code></pre>
|
|
10
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
11
|
+
<auro-header level="3">Implementation</auro-header>
|
|
12
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/customRegistration.md) -->
|
|
13
|
+
<!-- The below content is automatically added from ./../docs/partials/customRegistration.md -->
|
|
14
|
+
<auro-header level="2" id="customRegistration">Custom Component Registration for Version Management</auro-header>
|
|
15
|
+
There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
16
|
+
|
|
17
|
+
You can do this by importing only the component class and using the <code>register(name)</code> method with a unique name:
|
|
18
|
+
|
|
19
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
20
|
+
import { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
21
|
+
|
|
22
|
+
// Register with a custom name if desired
|
|
23
|
+
AuroCheckbox.register('custom-checkbox');
|
|
24
|
+
AuroCheckboxGroup.register('custom-checkbox-group');</code></pre>
|
|
25
|
+
|
|
26
|
+
This will create a new custom element <code>>custom-checkbox<</code> and <code>>custom-checkbox-group<</code> that behaves exactly like <code>>auro-checkbox<</code> and <code><auro-checkbox-group></code>, allowing both to coexist on the same page without interfering with each other.
|
|
27
|
+
|
|
28
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/custom.html) -->
|
|
29
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/custom.html -->
|
|
30
|
+
<pre class="language-html"><code class="language-html"><custom-checkbox-group>
|
|
31
|
+
<span slot="legend">Form label goes here</span>
|
|
32
|
+
<custom-checkbox value="value1" name="custom" id="checkbox-custom1">Custom checkbox option</custom-checkbox>
|
|
33
|
+
<custom-checkbox value="value2" name="custom" id="checkbox-custom2" checked>Custom checkbox option</custom-checkbox>
|
|
34
|
+
<custom-checkbox value="value3" name="custom" id="checkbox-custom3">Custom checkbox option</custom-checkbox>
|
|
35
|
+
<custom-checkbox value="value4" name="custom" id="checkbox-custom4">Custom checkbox option</custom-checkbox>
|
|
36
|
+
</custom-checkbox-group></code></pre>
|
|
37
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
38
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
39
|
+
</div>
|
|
40
|
+
</auro-accordion>
|
|
41
|
+
<auro-accordion class="section" id="autoAccordion">
|
|
42
|
+
<span slot="trigger">Auto Installation and Implementation</span>
|
|
43
|
+
<div class="accordion-content">
|
|
44
|
+
<p class="warning"><strong>Warning:</strong> Default registration can cause conflicts if another package registers the same tag name using a different version of the component, leading to unexpected behavior. Use custom registration to avoid this risk.</p>
|
|
45
|
+
<auro-header level="3">Install</auro-header>
|
|
46
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../../docs/templates/componentInstall.md) -->
|
|
47
|
+
<!-- The below content is automatically added from ./../../../docs/templates/componentInstall.md -->
|
|
48
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/</code></pre>
|
|
49
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
50
|
+
<auro-header level="3">Implementation</auro-header>
|
|
51
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/defaultRegistration.md) -->
|
|
52
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/defaultRegistration.md -->
|
|
53
|
+
<p>Once installed, the component can be used in your project by importing the component's registered module:</p>
|
|
54
|
+
<pre class="language-js"><code class="language-js">import '@aurodesignsystem/auro-formkit/auro-checkbox';</code></pre>
|
|
55
|
+
<p>This import registers the <code><auro-checkbox></code> and <code><auro-checkbox-group></code> custom elements globally. You can then use them in your HTML:</p>
|
|
56
|
+
<pre class="language-html"><code class="language-html"><auro-checkbox-group>
|
|
57
|
+
<span slot="legend">Choose your options</span>
|
|
58
|
+
<auro-checkbox value="option1" name="default" id="cb1">Option 1</auro-checkbox>
|
|
59
|
+
<auro-checkbox value="option2" name="default" id="cb2">Option 2</auro-checkbox>
|
|
60
|
+
</auro-checkbox-group></code></pre>
|
|
61
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
62
|
+
</div>
|
|
63
|
+
</auro-accordion>
|
|
64
|
+
<auro-accordion class="section" id="cdnAccordion">
|
|
65
|
+
<span slot="trigger">CDN Installation and Implementation</span>
|
|
66
|
+
<div class="accordion-content">
|
|
67
|
+
<p class="warning"><strong>Warning:</strong> CDN install & registration can cause conflicts if another package registers the same tag name using a different version of the component, leading to unexpected behavior. Use custom registration to avoid this risk.</p>
|
|
68
|
+
<auro-header level="3">Install & Implementation</auro-header>
|
|
69
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/getting-started/cdnRegistration.md) -->
|
|
70
|
+
<!-- The below content is automatically added from ./../docs/partials/getting-started/cdnRegistration.md -->
|
|
71
|
+
<p>Add the following script tag to your HTML to load the component directly from a CDN:</p>
|
|
72
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-checkbox/+esm"></script></code></pre>
|
|
73
|
+
<p>This script registers the <code><auro-checkbox></code> and <code><auro-checkbox-group></code> custom elements globally. You can then use them in your HTML:</p>
|
|
74
|
+
<pre class="language-html"><code class="language-html"><auro-checkbox-group>
|
|
75
|
+
<span slot="legend">Choose your options</span>
|
|
76
|
+
<auro-checkbox value="option1" name="cdn" id="cb-cdn1">Option 1</auro-checkbox>
|
|
77
|
+
<auro-checkbox value="option2" name="cdn" id="cb-cdn2">Option 2</auro-checkbox>
|
|
78
|
+
</auro-checkbox-group></code></pre>
|
|
79
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
|
+
</div>
|
|
81
|
+
</auro-accordion>
|
|
82
|
+
</auro-accordion-group>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/keyboard-behavior.md
|
|
7
|
+
|
|
8
|
+
With the exception of adding custom elements if needed for the demo.
|
|
9
|
+
|
|
10
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
11
|
+
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!DOCTYPE html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="UTF-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
+
<title>Auro Web Component Demo | auro-checkbox | Keyboard Behavior</title>
|
|
20
|
+
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-checkbox's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="./styles.min.css" />
|
|
35
|
+
</head>
|
|
36
|
+
<body class="auro-markdown">
|
|
37
|
+
<main></main>
|
|
38
|
+
|
|
39
|
+
<script type="module">
|
|
40
|
+
import { renderPage } from './demo-support.js';
|
|
41
|
+
await renderPage('./keyboard-behavior.md');
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
45
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
See LICENSE in the project root for license information.
|
|
4
4
|
|
|
5
5
|
HTML in this document is standardized and NOT to be edited.
|
|
6
|
-
All demo code should be added/edited in ./demo/
|
|
6
|
+
All demo code should be added/edited in ./demo/readme.md
|
|
7
7
|
|
|
8
8
|
With the exception of adding custom elements if needed for the demo.
|
|
9
9
|
|
|
@@ -18,35 +18,27 @@
|
|
|
18
18
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
19
|
<title>Auro Web Component Demo | auro-checkbox</title>
|
|
20
20
|
|
|
21
|
-
<!--
|
|
22
|
-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
23
|
|
|
24
24
|
<!-- Legacy reference is still needed to support auro-checkbox's use of legacy token values at this time -->
|
|
25
25
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
26
|
|
|
27
27
|
<!-- Design Token Alaska Theme -->
|
|
28
28
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
-
|
|
29
|
+
|
|
30
30
|
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
-
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem
|
|
32
|
-
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
33
|
<!-- Demo Specific Styles -->
|
|
34
|
-
<link rel="stylesheet" type="text/css" href="
|
|
35
|
-
|
|
36
|
-
</head>
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="./styles.min.css" />
|
|
35
|
+
</head>
|
|
37
36
|
<body class="auro-markdown">
|
|
38
37
|
<main></main>
|
|
39
38
|
|
|
40
39
|
<script type="module">
|
|
41
|
-
import '
|
|
42
|
-
|
|
43
|
-
fetch('./readme.md')
|
|
44
|
-
.then((response) => response.text())
|
|
45
|
-
.then((text) => {
|
|
46
|
-
const rawHtml = marked.parse(text);
|
|
47
|
-
document.querySelector('main').innerHTML = rawHtml;
|
|
48
|
-
Prism.highlightAll();
|
|
49
|
-
})
|
|
40
|
+
import { renderPage } from './demo-support.js';
|
|
41
|
+
await renderPage('./readme.md');
|
|
50
42
|
</script>
|
|
51
43
|
<script src="./index.min.js" data-demo-script="true" type="module"></script>
|
|
52
44
|
|
|
@@ -21,7 +21,7 @@ The following sections are editable by making changes to the following files:
|
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
|
-
|
|
24
|
+
<code><auro-checkbox></code> is a <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements" target="_blank">HTML custom element</auro-hyperlink> for the purpose of allowing users to select one or more options of a limited number of choices.
|
|
25
25
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
26
26
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
27
27
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
@@ -32,7 +32,7 @@ The following sections are editable by making changes to the following files:
|
|
|
32
32
|
|
|
33
33
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/useCases.md) -->
|
|
34
34
|
<!-- The below content is automatically added from ./docs/partials/useCases.md -->
|
|
35
|
-
The
|
|
35
|
+
The <code><auro-checkbox></code> element should be used in situations where users may:
|
|
36
36
|
|
|
37
37
|
* Be filling out a form
|
|
38
38
|
* Need to select one or more options
|
|
@@ -43,11 +43,7 @@ The `<auro-checkbox>` element should be used in situations where users may:
|
|
|
43
43
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/componentInstall.md) -->
|
|
44
44
|
<!-- The below content is automatically added from ../../docs/templates/componentInstall.md -->
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```shell
|
|
49
|
-
$ npm i @aurodesignsystem/auro-formkit
|
|
50
|
-
```
|
|
46
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/</code></pre>
|
|
51
47
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
52
48
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
53
49
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
@@ -56,13 +52,11 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
56
52
|
|
|
57
53
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
58
54
|
|
|
59
|
-
|
|
60
|
-
{
|
|
55
|
+
<pre class="language-json"><code class="language-json">{
|
|
61
56
|
"compilerOptions": {
|
|
62
57
|
"moduleResolution": "bundler"
|
|
63
58
|
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
59
|
+
}</code></pre>
|
|
66
60
|
|
|
67
61
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
68
62
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -73,9 +67,7 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
73
67
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
74
68
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
75
69
|
|
|
76
|
-
|
|
77
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-checkbox/+esm"></script>
|
|
78
|
-
```
|
|
70
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/@latest/auro-checkbox/+esm"></script></code></pre>
|
|
79
71
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
80
72
|
|
|
81
73
|
## Formkit Development
|
|
@@ -89,54 +81,32 @@ Running the `dev` command will open a `localhost` development server for all com
|
|
|
89
81
|
|
|
90
82
|
To only develop a single component, use the `--filter` flag:
|
|
91
83
|
|
|
92
|
-
|
|
93
|
-
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
94
|
-
```
|
|
84
|
+
<pre class="language-shell"><code class="language-shell">npx turbo dev --filter=@aurodesignsystem/auro-input</code></pre>
|
|
95
85
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
96
86
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
97
|
-
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
98
|
-
|
|
99
|
-
## Custom Component Registration for Version Management
|
|
100
|
-
|
|
87
|
+
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
88
|
+
<auro-header level="2" id="customRegistration">Custom Component Registration for Version Management</auro-header>
|
|
101
89
|
There are two key parts to every Auro component: the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes">class</a> and the custom element definition. The class defines the component’s behavior, while the custom element registers it under a specific name so it can be used in HTML.
|
|
102
90
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
However, if you need to load multiple versions of the same component on a single page (for example, when two projects depend on different versions), you can manually register the class under a custom element name to avoid conflicts.
|
|
91
|
+
You can do this by importing only the component class and using the <code>register(name)</code> method with a unique name:
|
|
106
92
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
```js
|
|
110
|
-
// Import the class only
|
|
93
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
111
94
|
import { AuroCheckbox, AuroCheckboxGroup } from '@aurodesignsystem/auro-formkit/auro-checkbox/class';
|
|
112
|
-
|
|
95
|
+
|
|
113
96
|
// Register with a custom name if desired
|
|
114
97
|
AuroCheckbox.register('custom-checkbox');
|
|
115
|
-
AuroCheckboxGroup.register('custom-checkbox-group')
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<auro-accordion alignRight>
|
|
130
|
-
<span slot="trigger">See code</span>
|
|
131
|
-
|
|
132
|
-
```html
|
|
133
|
-
<custom-checkbox-group>
|
|
134
|
-
<span slot="legend">Form label goes here</span>
|
|
135
|
-
<custom-checkbox value="value1" name="custom" id="checkbox-custom1">Custom checkbox option</custom-checkbox>
|
|
136
|
-
<custom-checkbox value="value2" name="custom" id="checkbox-custom2" checked>Custom checkbox option</custom-checkbox>
|
|
137
|
-
<custom-checkbox value="value3" name="custom" id="checkbox-custom3">Custom checkbox option</custom-checkbox>
|
|
138
|
-
<custom-checkbox value="value4" name="custom" id="checkbox-custom4">Custom checkbox option</custom-checkbox>
|
|
139
|
-
</custom-checkbox-group>
|
|
140
|
-
```
|
|
141
|
-
</auro-accordion>
|
|
98
|
+
AuroCheckboxGroup.register('custom-checkbox-group');</code></pre>
|
|
99
|
+
|
|
100
|
+
This will create a new custom element <code>>custom-checkbox<</code> and <code>>custom-checkbox-group<</code> that behaves exactly like <code>>auro-checkbox<</code> and <code><auro-checkbox-group></code>, allowing both to coexist on the same page without interfering with each other.
|
|
101
|
+
|
|
102
|
+
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/custom.html) -->
|
|
103
|
+
<!-- The below code snippet is automatically added from ./../apiExamples/custom.html -->
|
|
104
|
+
<pre class="language-html"><code class="language-html"><custom-checkbox-group>
|
|
105
|
+
<span slot="legend">Form label goes here</span>
|
|
106
|
+
<custom-checkbox value="value1" name="custom" id="checkbox-custom1">Custom checkbox option</custom-checkbox>
|
|
107
|
+
<custom-checkbox value="value2" name="custom" id="checkbox-custom2" checked>Custom checkbox option</custom-checkbox>
|
|
108
|
+
<custom-checkbox value="value3" name="custom" id="checkbox-custom3">Custom checkbox option</custom-checkbox>
|
|
109
|
+
<custom-checkbox value="value4" name="custom" id="checkbox-custom4">Custom checkbox option</custom-checkbox>
|
|
110
|
+
</custom-checkbox-group></code></pre>
|
|
111
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
142
112
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import'@aurodesignsystem/webcorestylesheets/dist/elementDemoStyles.css';@import'@aurodesignsystem/webcorestylesheets/dist/demoWrapper.css'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import '@aurodesignsystem/config/demo-styles';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/voiceover.md
|
|
7
|
+
|
|
8
|
+
With the exception of adding custom elements if needed for the demo.
|
|
9
|
+
|
|
10
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
11
|
+
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!DOCTYPE html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="UTF-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
+
<title>Auro Web Component Demo | auro-checkbox | VoiceOver</title>
|
|
20
|
+
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-checkbox's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="./styles.min.css" />
|
|
35
|
+
</head>
|
|
36
|
+
<body class="auro-markdown">
|
|
37
|
+
<main></main>
|
|
38
|
+
|
|
39
|
+
<script type="module">
|
|
40
|
+
import { renderPage } from './demo-support.js';
|
|
41
|
+
await renderPage('./voiceover.md');
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
45
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
|
|
46
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|