@aurodesignsystem-dev/auro-formkit 0.0.0-pr1379.0 → 0.0.0-pr1379.10

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.
Files changed (226) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +87 -113
  3. package/components/combobox/demo/keyboardBehavior.html +81 -0
  4. package/components/counter/demo/keyboardBehavior.html +81 -0
  5. package/components/datepicker/demo/keyboard-behavior.html +81 -0
  6. package/components/dropdown/demo/keyboardBehavior.html +81 -0
  7. package/components/select/demo/keyboardBehavior.html +81 -0
  8. package/package.json +64 -53
  9. package/components/bibtemplate/dist/auro-bibtemplate.d.ts +0 -66
  10. package/components/bibtemplate/dist/buttonVersion.d.ts +0 -2
  11. package/components/bibtemplate/dist/headerVersion.d.ts +0 -2
  12. package/components/bibtemplate/dist/iconVersion.d.ts +0 -2
  13. package/components/bibtemplate/dist/index.d.ts +0 -2
  14. package/components/bibtemplate/dist/index.js +0 -395
  15. package/components/bibtemplate/dist/registered.js +0 -395
  16. package/components/bibtemplate/dist/styles/color-css.d.ts +0 -2
  17. package/components/bibtemplate/dist/styles/style-css.d.ts +0 -2
  18. package/components/bibtemplate/dist/styles/tokens-css.d.ts +0 -2
  19. package/components/checkbox/demo/api.md +0 -489
  20. package/components/checkbox/demo/api.min.js +0 -2133
  21. package/components/checkbox/demo/index.md +0 -55
  22. package/components/checkbox/demo/index.min.js +0 -2108
  23. package/components/checkbox/demo/readme.md +0 -142
  24. package/components/checkbox/dist/auro-checkbox-group.d.ts +0 -176
  25. package/components/checkbox/dist/auro-checkbox.d.ts +0 -209
  26. package/components/checkbox/dist/index.d.ts +0 -3
  27. package/components/checkbox/dist/index.js +0 -2057
  28. package/components/checkbox/dist/registered.js +0 -2058
  29. package/components/checkbox/dist/styles/auro-checkbox-css.d.ts +0 -2
  30. package/components/checkbox/dist/styles/auro-checkbox-group-css.d.ts +0 -2
  31. package/components/checkbox/dist/styles/color-css.d.ts +0 -2
  32. package/components/checkbox/dist/styles/colorGroup-css.d.ts +0 -2
  33. package/components/checkbox/dist/styles/tokens-css.d.ts +0 -2
  34. package/components/combobox/demo/api.md +0 -2287
  35. package/components/combobox/demo/api.min.js +0 -17549
  36. package/components/combobox/demo/index.md +0 -196
  37. package/components/combobox/demo/index.min.js +0 -17454
  38. package/components/combobox/demo/readme.md +0 -158
  39. package/components/combobox/dist/auro-combobox.d.ts +0 -552
  40. package/components/combobox/dist/comboboxKeyboardStrategy.d.ts +0 -6
  41. package/components/combobox/dist/index.d.ts +0 -2
  42. package/components/combobox/dist/index.js +0 -15474
  43. package/components/combobox/dist/registered.js +0 -15476
  44. package/components/combobox/dist/styles/emphasized/style-css.d.ts +0 -2
  45. package/components/combobox/dist/styles/snowflake/style-css.d.ts +0 -2
  46. package/components/combobox/dist/styles/style-css.d.ts +0 -2
  47. package/components/counter/demo/api.md +0 -1285
  48. package/components/counter/demo/api.min.js +0 -7993
  49. package/components/counter/demo/index.md +0 -92
  50. package/components/counter/demo/index.min.js +0 -7974
  51. package/components/counter/demo/readme.md +0 -161
  52. package/components/counter/dist/auro-counter-button.d.ts +0 -14
  53. package/components/counter/dist/auro-counter-group.d.ts +0 -390
  54. package/components/counter/dist/auro-counter-wrapper.d.ts +0 -17
  55. package/components/counter/dist/auro-counter.d.ts +0 -126
  56. package/components/counter/dist/buttonVersion.d.ts +0 -2
  57. package/components/counter/dist/iconVersion.d.ts +0 -2
  58. package/components/counter/dist/index.d.ts +0 -3
  59. package/components/counter/dist/index.js +0 -7896
  60. package/components/counter/dist/registered.js +0 -7897
  61. package/components/counter/dist/styles/color-css.d.ts +0 -2
  62. package/components/counter/dist/styles/counter-button-color-css.d.ts +0 -2
  63. package/components/counter/dist/styles/counter-button-css.d.ts +0 -2
  64. package/components/counter/dist/styles/counter-group-css.d.ts +0 -2
  65. package/components/counter/dist/styles/counter-wrapper-color-css.d.ts +0 -2
  66. package/components/counter/dist/styles/counter-wrapper-css.d.ts +0 -2
  67. package/components/counter/dist/styles/shapeSize-css.d.ts +0 -2
  68. package/components/counter/dist/styles/style-css.d.ts +0 -2
  69. package/components/counter/dist/styles/tokens-css.d.ts +0 -2
  70. package/components/datepicker/demo/api.md +0 -1824
  71. package/components/datepicker/demo/api.min.js +0 -24530
  72. package/components/datepicker/demo/index.md +0 -158
  73. package/components/datepicker/demo/index.min.js +0 -24251
  74. package/components/datepicker/demo/readme.md +0 -137
  75. package/components/datepicker/dist/auro-calendar-cell.d.ts +0 -169
  76. package/components/datepicker/dist/auro-calendar-month.d.ts +0 -20
  77. package/components/datepicker/dist/auro-calendar.d.ts +0 -173
  78. package/components/datepicker/dist/auro-datepicker.d.ts +0 -722
  79. package/components/datepicker/dist/buttonVersion.d.ts +0 -2
  80. package/components/datepicker/dist/iconVersion.d.ts +0 -2
  81. package/components/datepicker/dist/index.d.ts +0 -2
  82. package/components/datepicker/dist/index.js +0 -24166
  83. package/components/datepicker/dist/popoverVersion.d.ts +0 -2
  84. package/components/datepicker/dist/registered.js +0 -24166
  85. package/components/datepicker/dist/styles/classic/color-css.d.ts +0 -2
  86. package/components/datepicker/dist/styles/classic/style-css.d.ts +0 -2
  87. package/components/datepicker/dist/styles/color-calendar-css.d.ts +0 -2
  88. package/components/datepicker/dist/styles/color-cell-css.d.ts +0 -2
  89. package/components/datepicker/dist/styles/color-css.d.ts +0 -2
  90. package/components/datepicker/dist/styles/color-month-css.d.ts +0 -2
  91. package/components/datepicker/dist/styles/shapeSize-css.d.ts +0 -2
  92. package/components/datepicker/dist/styles/snowflake/color-css.d.ts +0 -2
  93. package/components/datepicker/dist/styles/snowflake/style-css.d.ts +0 -2
  94. package/components/datepicker/dist/styles/style-auro-calendar-cell-css.d.ts +0 -2
  95. package/components/datepicker/dist/styles/style-auro-calendar-css.d.ts +0 -2
  96. package/components/datepicker/dist/styles/style-auro-calendar-month-css.d.ts +0 -2
  97. package/components/datepicker/dist/styles/style-css.d.ts +0 -2
  98. package/components/datepicker/dist/styles/tokens-css.d.ts +0 -2
  99. package/components/datepicker/dist/utilities.d.ts +0 -78
  100. package/components/datepicker/dist/utilitiesCalendar.d.ts +0 -38
  101. package/components/datepicker/dist/utilitiesCalendarRender.d.ts +0 -50
  102. package/components/datepicker/dist/vendor/wc-range-datepicker/day.d.ts +0 -5
  103. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-calendar.d.ts +0 -60
  104. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker-cell.d.ts +0 -1
  105. package/components/datepicker/dist/vendor/wc-range-datepicker/range-datepicker.d.ts +0 -57
  106. package/components/dropdown/demo/api.md +0 -1358
  107. package/components/dropdown/demo/api.min.js +0 -4853
  108. package/components/dropdown/demo/index.md +0 -283
  109. package/components/dropdown/demo/index.min.js +0 -4788
  110. package/components/dropdown/demo/readme.md +0 -160
  111. package/components/dropdown/dist/auro-dropdown.d.ts +0 -482
  112. package/components/dropdown/dist/auro-dropdownBib.d.ts +0 -155
  113. package/components/dropdown/dist/iconVersion.d.ts +0 -2
  114. package/components/dropdown/dist/index.d.ts +0 -2
  115. package/components/dropdown/dist/index.js +0 -4685
  116. package/components/dropdown/dist/keyboardUtils.d.ts +0 -18
  117. package/components/dropdown/dist/registered.js +0 -4685
  118. package/components/dropdown/dist/styles/classic/bibColors-css.d.ts +0 -2
  119. package/components/dropdown/dist/styles/classic/bibStyles-css.d.ts +0 -2
  120. package/components/dropdown/dist/styles/classic/color-css.d.ts +0 -2
  121. package/components/dropdown/dist/styles/classic/style-css.d.ts +0 -2
  122. package/components/dropdown/dist/styles/color-css.d.ts +0 -2
  123. package/components/dropdown/dist/styles/emphasized/style-css.d.ts +0 -2
  124. package/components/dropdown/dist/styles/shapeSize-css.d.ts +0 -2
  125. package/components/dropdown/dist/styles/snowflake/style-css.d.ts +0 -2
  126. package/components/dropdown/dist/styles/style-css.d.ts +0 -2
  127. package/components/dropdown/dist/styles/tokens-css.d.ts +0 -2
  128. package/components/form/demo/api.md +0 -319
  129. package/components/form/demo/api.min.js +0 -69996
  130. package/components/form/demo/index.md +0 -128
  131. package/components/form/demo/index.min.js +0 -69996
  132. package/components/form/demo/readme.md +0 -145
  133. package/components/form/dist/auro-form.d.ts +0 -280
  134. package/components/form/dist/index.d.ts +0 -2
  135. package/components/form/dist/index.js +0 -718
  136. package/components/form/dist/registered.d.ts +0 -1
  137. package/components/form/dist/registered.js +0 -718
  138. package/components/form/dist/styles/style-css.d.ts +0 -2
  139. package/components/helptext/dist/auro-helptext.d.ts +0 -69
  140. package/components/helptext/dist/index.d.ts +0 -2
  141. package/components/helptext/dist/index.js +0 -231
  142. package/components/helptext/dist/registered.js +0 -231
  143. package/components/helptext/dist/styles/color-css.d.ts +0 -2
  144. package/components/helptext/dist/styles/style-css.d.ts +0 -2
  145. package/components/helptext/dist/styles/tokens-css.d.ts +0 -2
  146. package/components/input/demo/api.md +0 -1397
  147. package/components/input/demo/api.min.js +0 -7435
  148. package/components/input/demo/index.md +0 -161
  149. package/components/input/demo/index.min.js +0 -7355
  150. package/components/input/demo/readme.md +0 -134
  151. package/components/input/dist/auro-input.d.ts +0 -195
  152. package/components/input/dist/base-input.d.ts +0 -628
  153. package/components/input/dist/buttonVersion.d.ts +0 -2
  154. package/components/input/dist/i18n.d.ts +0 -18
  155. package/components/input/dist/iconVersion.d.ts +0 -2
  156. package/components/input/dist/index.d.ts +0 -2
  157. package/components/input/dist/index.js +0 -7278
  158. package/components/input/dist/registered.js +0 -7278
  159. package/components/input/dist/styles/classic/color-css.d.ts +0 -2
  160. package/components/input/dist/styles/classic/style-css.d.ts +0 -2
  161. package/components/input/dist/styles/color-css.d.ts +0 -2
  162. package/components/input/dist/styles/default/borders-css.d.ts +0 -2
  163. package/components/input/dist/styles/default/color-css.d.ts +0 -2
  164. package/components/input/dist/styles/default/mixins-css.d.ts +0 -2
  165. package/components/input/dist/styles/default/notificationIcons-css.d.ts +0 -2
  166. package/components/input/dist/styles/default/style-css.d.ts +0 -2
  167. package/components/input/dist/styles/emphasized/color-css.d.ts +0 -2
  168. package/components/input/dist/styles/emphasized/style-css.d.ts +0 -2
  169. package/components/input/dist/styles/mixins-css.d.ts +0 -2
  170. package/components/input/dist/styles/shapeSize-css.d.ts +0 -2
  171. package/components/input/dist/styles/snowflake/style-css.d.ts +0 -2
  172. package/components/input/dist/styles/style-css.d.ts +0 -2
  173. package/components/input/dist/styles/tokens-css.d.ts +0 -2
  174. package/components/input/dist/utilities.d.ts +0 -25
  175. package/components/layoutElement/dist/auroElement.d.ts +0 -40
  176. package/components/layoutElement/dist/index.d.ts +0 -2
  177. package/components/layoutElement/dist/index.js +0 -107
  178. package/components/layoutElement/dist/registered.js +0 -107
  179. package/components/menu/demo/api.md +0 -1200
  180. package/components/menu/demo/api.min.js +0 -2292
  181. package/components/menu/demo/index.md +0 -72
  182. package/components/menu/demo/index.min.js +0 -2185
  183. package/components/menu/demo/readme.md +0 -145
  184. package/components/menu/dist/auro-menu-utils.d.ts +0 -34
  185. package/components/menu/dist/auro-menu.context.d.ts +0 -227
  186. package/components/menu/dist/auro-menu.d.ts +0 -324
  187. package/components/menu/dist/auro-menuoption.d.ts +0 -210
  188. package/components/menu/dist/iconVersion.d.ts +0 -2
  189. package/components/menu/dist/index.d.ts +0 -4
  190. package/components/menu/dist/index.js +0 -2148
  191. package/components/menu/dist/registered.js +0 -2096
  192. package/components/menu/dist/styles/default/color-menu-css.d.ts +0 -2
  193. package/components/menu/dist/styles/default/color-menuoption-css.d.ts +0 -2
  194. package/components/menu/dist/styles/default/style-menu-css.d.ts +0 -2
  195. package/components/menu/dist/styles/default/style-menuoption-css.d.ts +0 -2
  196. package/components/menu/dist/styles/default/tokens-css.d.ts +0 -2
  197. package/components/radio/demo/api.md +0 -675
  198. package/components/radio/demo/api.min.js +0 -2210
  199. package/components/radio/demo/index.md +0 -73
  200. package/components/radio/demo/index.min.js +0 -2167
  201. package/components/radio/demo/readme.md +0 -141
  202. package/components/radio/dist/auro-radio-group.d.ts +0 -250
  203. package/components/radio/dist/auro-radio.d.ts +0 -180
  204. package/components/radio/dist/index.d.ts +0 -3
  205. package/components/radio/dist/index.js +0 -2116
  206. package/components/radio/dist/registered.js +0 -2117
  207. package/components/radio/dist/styles/auro-radio-group-css.d.ts +0 -2
  208. package/components/radio/dist/styles/color-css.d.ts +0 -2
  209. package/components/radio/dist/styles/groupColor-css.d.ts +0 -2
  210. package/components/radio/dist/styles/style-css.d.ts +0 -2
  211. package/components/radio/dist/styles/tokens-css.d.ts +0 -2
  212. package/components/select/demo/api.md +0 -2378
  213. package/components/select/demo/api.min.js +0 -10133
  214. package/components/select/demo/index.md +0 -355
  215. package/components/select/demo/index.min.js +0 -10040
  216. package/components/select/demo/readme.md +0 -148
  217. package/components/select/dist/auro-select.d.ts +0 -545
  218. package/components/select/dist/index.d.ts +0 -2
  219. package/components/select/dist/index.js +0 -8072
  220. package/components/select/dist/registered.js +0 -8072
  221. package/components/select/dist/selectKeyboardStrategy.d.ts +0 -8
  222. package/components/select/dist/styles/emphasized/color-css.d.ts +0 -2
  223. package/components/select/dist/styles/shapeSize-css.d.ts +0 -2
  224. package/components/select/dist/styles/style-css.d.ts +0 -2
  225. package/components/select/dist/styles/tokens-css.d.ts +0 -2
  226. package/custom-elements.json +0 -18656
@@ -1,675 +0,0 @@
1
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/api.md) -->
2
- <!-- The below content is automatically added from ./../docs/api.md -->
3
-
4
- # auro-radio-group
5
-
6
- The `auro-radio-group` element is used to group a set `auro-radio` elements.
7
-
8
- ## Properties
9
-
10
- | Property | Attribute | Type | Default | Description |
11
- |---------------------------------|---------------------------------|--------------------------|-------------|--------------------------------------------------|
12
- | [appearance](#appearance) | `appearance` | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
13
- | [disabled](#disabled) | `disabled` | `boolean` | | If true, all radio buttons will be disabled. |
14
- | [error](#error) | `error` | `string` | | If true, sets persistent validity to `customError` and sets `setCustomValidity` = attribute value. |
15
- | [horizontal](#horizontal) | `horizontal` | `boolean` | | If true, displays radio buttons horizontally. |
16
- | [noValidate](#noValidate) | `noValidate` | `boolean` | | If true, disables auto-validation on blur. |
17
- | [onDark](#onDark) | `onDark` | `boolean` | | DEPRECATED - use `appearance="inverse"` instead. |
18
- | [optionSelected](#optionSelected) | `optionSelected` | `object` | | Specifies the current selected radio button. |
19
- | [required](#required) | `required` | `boolean` | | Populates the `required` attribute on the element. Used for client-side validation. |
20
- | [setCustomValidity](#setCustomValidity) | `setCustomValidity` | `string` | | Sets a custom help text message to display for all validityStates. |
21
- | [setCustomValidityCustomError](#setCustomValidityCustomError) | `setCustomValidityCustomError` | `string` | | Custom help text message to display when validity = `customError`. |
22
- | [setCustomValidityValueMissing](#setCustomValidityValueMissing) | `setCustomValidityValueMissing` | `string` | | Custom help text message to display when validity = `valueMissing`. |
23
- | [validity](#validity) | `validity` | `string` | | Specifies the `validityState` this element is in. |
24
- | [value](#value) | `value` | `string` | | Specifies the current value of the selected radio button. |
25
-
26
- ## Methods
27
-
28
- | Method | Type | Description |
29
- |------------|----------------------------------------|--------------------------------------------------|
30
- | [reset](#reset) | `(): void` | Resets component to initial state. |
31
- | [validate](#validate) | `(force?: boolean \| undefined): void` | Validates value.<br /><br />**force**: Whether to force validation. |
32
-
33
- ## Events
34
-
35
- | Event | Type | Description |
36
- |-----------------------------|--------------------|--------------------------------------------------|
37
- | `auroFormElement-validated` | | Notifies that the element has been validated. |
38
- | [input](#input) | `CustomEvent<any>` | Notifies every time the value prop of the element is changed. |
39
-
40
- ## Slots
41
-
42
- | Name | Description |
43
- |-----------------|--------------------------------------------------|
44
- | [helpText](#helpText) | Allows for the helper text to be overridden. |
45
- | [legend](#legend) | Allows for the legend to be overridden. |
46
- | [optionalLabel](#optionalLabel) | Allows overriding the optional display text "(optional)", which appears next to the label. |
47
-
48
- ## CSS Shadow Parts
49
-
50
- | Part | Description |
51
- |---------------|--------------------------------------------------|
52
- | `radio-group` | Apply css to the fieldset element in the shadow DOM |
53
-
54
- # auro-radio
55
-
56
- The `auro-radio` element is used to a button that allows the user to select one option from a set.
57
-
58
- ## Properties
59
-
60
- | Property | Attribute | Type | Default | Description |
61
- |--------------|--------------|--------------------------|-------------|--------------------------------------------------|
62
- | [appearance](#appearance) | `appearance` | `'default' \| 'inverse'` | "'default'" | Defines whether the component will be on lighter or darker backgrounds. |
63
- | [checked](#checked) | `checked` | `boolean` | | If set to true, the radio button will be filled. |
64
- | [disabled](#disabled) | `disabled` | `boolean` | | If set to true, the radio button will be non-clickable. |
65
- | [error](#error) | `error` | `boolean` | | If set to true, sets an error state on the radio button. |
66
- | [id](#id) | `id` | `string` | | The id global attribute defines an identifier (ID) which must be unique in the whole document. |
67
- | [label](#label) | `label` | `string` | | Label for the radio button. |
68
- | [name](#name) | `name` | `string` | | Name for the radio button group. |
69
- | [onDark](#onDark) | `onDark` | `boolean` | | DEPRECATED - use `appearance="inverse"` instead. |
70
- | [required](#required) | `required` | `boolean` | | Defines element as required. |
71
- | [value](#value) | `value` | `string` | | The value of the radio button. |
72
-
73
- ## Methods
74
-
75
- | Method | Type | Description |
76
- |---------|------------|------------------------------------|
77
- | [reset](#reset) | `(): void` | Resets component to initial state. |
78
-
79
- ## Events
80
-
81
- | Event | Type | Description |
82
- |----------------------|--------------------|--------------------------------------------------|
83
- | `auroRadio-blur` | `CustomEvent<any>` | Notifies that the component has lost focus. |
84
- | `auroRadio-selected` | `CustomEvent<any>` | Notifies that the component has been marked as checked/selected. |
85
- | [change](#change) | `CustomEvent<any>` | (Deprecated) Notifies when checked value is changed. |
86
- | [focusSelected](#focusSelected) | `CustomEvent<any>` | Notifies that the component has gained focus. |
87
- | [input](#input) | `InputEvent` | Notifies when when checked value is changed by user's interface. |
88
- | [resetRadio](#resetRadio) | `CustomEvent<any>` | Notifies that the component has reset the checked/selected state. |
89
- | [toggleSelected](#toggleSelected) | `CustomEvent<any>` | Notifies that the component has toggled the checked/selected state. |
90
-
91
- ## CSS Shadow Parts
92
-
93
- | Part | Description |
94
- |---------------|-------------------------------------------|
95
- | [radio](#radio) | apply css to a specific checkbox. |
96
- | `radio-input` | apply css to a specific checkbox's input. |
97
- | `radio-label` | apply css to a specific checkbox's label. |
98
- <!-- AURO-GENERATED-CONTENT:END -->
99
-
100
- ## Basic Radio
101
-
102
- <div class="exampleWrapper">
103
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic-standalone.html) -->
104
- <!-- The below content is automatically added from ./../apiExamples/basic-standalone.html -->
105
- <auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
106
- <!-- AURO-GENERATED-CONTENT:END -->
107
- </div>
108
- <auro-accordion alignRight>
109
- <span slot="trigger">See code</span>
110
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic-standalone.html) -->
111
- <!-- The below code snippet is automatically added from ./../apiExamples/basic-standalone.html -->
112
-
113
- ```html
114
- <auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
115
- ```
116
- <!-- AURO-GENERATED-CONTENT:END -->
117
- </auro-accordion>
118
-
119
- ## Basic Radio Group
120
-
121
- <div class="exampleWrapper">
122
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
123
- <!-- The below content is automatically added from ./../apiExamples/basic.html -->
124
- <auro-radio-group>
125
- <span slot="legend">Form label goes here</span>
126
- <auro-radio id="basicGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
127
- <auro-radio id="basicGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
128
- <auro-radio id="basicGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
129
- </auro-radio-group>
130
- <!-- AURO-GENERATED-CONTENT:END -->
131
- </div>
132
- <auro-accordion alignRight>
133
- <span slot="trigger">See code</span>
134
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
135
- <!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
136
-
137
- ```html
138
- <auro-radio-group>
139
- <span slot="legend">Form label goes here</span>
140
- <auro-radio id="basicGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
141
- <auro-radio id="basicGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
142
- <auro-radio id="basicGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
143
- </auro-radio-group>
144
- ```
145
- <!-- AURO-GENERATED-CONTENT:END -->
146
- </auro-accordion>
147
-
148
- ## Property & Attribute Examples
149
-
150
- ### Appearance on Dark Backgrounds
151
-
152
- Use the `appearance="inverse"` attribute to render the radio for use on dark backgrounds.
153
-
154
- <div class="exampleWrapper--ondark">
155
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse.html) -->
156
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse.html -->
157
- <auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes" appearance="inverse"></auro-radio>
158
- <!-- AURO-GENERATED-CONTENT:END -->
159
- </div>
160
- <auro-accordion alignRight>
161
- <span slot="trigger">See code</span>
162
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/appearance-inverse.html) -->
163
- <!-- The below code snippet is automatically added from ./../apiExamples/appearance-inverse.html -->
164
-
165
- ```html
166
- <auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes" appearance="inverse"></auro-radio>
167
- ```
168
- <!-- AURO-GENERATED-CONTENT:END -->
169
- </auro-accordion>
170
- <div class="exampleWrapper--ondark">
171
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-group.html) -->
172
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse-group.html -->
173
- <auro-radio-group appearance="inverse">
174
- <span slot="legend">Form label goes here</span>
175
- <auro-radio id="basicGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
176
- <auro-radio id="basicGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
177
- <auro-radio id="basicGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
178
- </auro-radio-group>
179
- <!-- AURO-GENERATED-CONTENT:END -->
180
- </div>
181
- <auro-accordion alignRight>
182
- <span slot="trigger">See code</span>
183
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/appearance-inverse-group.html) -->
184
- <!-- The below code snippet is automatically added from ./../apiExamples/appearance-inverse-group.html -->
185
-
186
- ```html
187
- <auro-radio-group appearance="inverse">
188
- <span slot="legend">Form label goes here</span>
189
- <auro-radio id="basicGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
190
- <auro-radio id="basicGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
191
- <auro-radio id="basicGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
192
- </auro-radio-group>
193
- ```
194
- <!-- AURO-GENERATED-CONTENT:END -->
195
- </auro-accordion>
196
-
197
- ### Checked
198
-
199
- Use the `checked` attribute to pre-select a `<auro-radio>` element.
200
-
201
- <div class="exampleWrapper">
202
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/checked.html) -->
203
- <!-- The below content is automatically added from ./../apiExamples/checked.html -->
204
- <auro-radio-group>
205
- <span slot="legend">Form label goes here</span>
206
- <auro-radio id="radio4" label="Yes" name="radioDemo" value="yes">Yes</auro-radio>
207
- <auro-radio id="radio5" label="No" name="radioDemo" value="no" checked>No</auro-radio>
208
- <auro-radio id="radio6" label="Maybe" name="radioDemo" value="maybe">Maybe</auro-radio>
209
- </auro-radio-group>
210
- <!-- AURO-GENERATED-CONTENT:END -->
211
- </div>
212
- <auro-accordion alignRight>
213
- <span slot="trigger">See code</span>
214
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/checked.html) -->
215
- <!-- The below content is automatically added from ./../apiExamples/checked.html -->
216
- <auro-radio-group>
217
- <span slot="legend">Form label goes here</span>
218
- <auro-radio id="radio4" label="Yes" name="radioDemo" value="yes">Yes</auro-radio>
219
- <auro-radio id="radio5" label="No" name="radioDemo" value="no" checked>No</auro-radio>
220
- <auro-radio id="radio6" label="Maybe" name="radioDemo" value="maybe">Maybe</auro-radio>
221
- </auro-radio-group>
222
- <!-- AURO-GENERATED-CONTENT:END -->
223
- </auro-accordion>
224
- <div class="exampleWrapper--ondark">
225
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-checked.html) -->
226
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse-checked.html -->
227
- <auro-radio-group appearance="inverse">
228
- <span slot="legend">Form label goes here</span>
229
- <auro-radio id="radio4" label="Yes" name="radioDemo" value="yes">Yes</auro-radio>
230
- <auro-radio id="radio5" label="No" name="radioDemo" value="no" checked>No</auro-radio>
231
- <auro-radio id="radio6" label="Maybe" name="radioDemo" value="maybe">Maybe</auro-radio>
232
- </auro-radio-group>
233
- <!-- AURO-GENERATED-CONTENT:END -->
234
- </div>
235
- <auro-accordion alignRight>
236
- <span slot="trigger">See code</span>
237
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-checked.html) -->
238
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse-checked.html -->
239
- <auro-radio-group appearance="inverse">
240
- <span slot="legend">Form label goes here</span>
241
- <auro-radio id="radio4" label="Yes" name="radioDemo" value="yes">Yes</auro-radio>
242
- <auro-radio id="radio5" label="No" name="radioDemo" value="no" checked>No</auro-radio>
243
- <auro-radio id="radio6" label="Maybe" name="radioDemo" value="maybe">Maybe</auro-radio>
244
- </auro-radio-group>
245
- <!-- AURO-GENERATED-CONTENT:END -->
246
- </auro-accordion>
247
-
248
- ### Disabled
249
-
250
- Use the `disabled` attribute to disable singular `<auro-radio>` elements or the entire `<auro-radio-group>`.
251
-
252
- <div class="exampleWrapper">
253
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/disabled.html) -->
254
- <!-- The below content is automatically added from ./../apiExamples/disabled.html -->
255
- <auro-radio-group>
256
- <span slot="legend">Form label goes here</span>
257
- <auro-radio id="disabledRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
258
- <auro-radio id="disabledRadio2" label="No" name="radioDemo" value="no" disabled></auro-radio>
259
- <auro-radio id="disabledRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
260
- </auro-radio-group>
261
- <auro-radio-group disabled>
262
- <span slot="legend">Form label goes here</span>
263
- <auro-radio id="disabledRadio4" label="Yes" name="radioDemo" value="yes"></auro-radio>
264
- <auro-radio id="disabledRadio5" label="No" name="radioDemo" value="no" checked></auro-radio>
265
- <auro-radio id="disabledRadio6" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
266
- </auro-radio-group>
267
- <!-- AURO-GENERATED-CONTENT:END -->
268
- </div>
269
- <auro-accordion alignRight>
270
- <span slot="trigger">See code</span>
271
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/disabled.html) -->
272
- <!-- The below code snippet is automatically added from ./../apiExamples/disabled.html -->
273
- ```html
274
- <auro-radio-group>
275
- <span slot="legend">Form label goes here</span>
276
- <auro-radio id="disabledRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
277
- <auro-radio id="disabledRadio2" label="No" name="radioDemo" value="no" disabled></auro-radio>
278
- <auro-radio id="disabledRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
279
- </auro-radio-group>
280
- <auro-radio-group disabled>
281
- <span slot="legend">Form label goes here</span>
282
- <auro-radio id="disabledRadio4" label="Yes" name="radioDemo" value="yes"></auro-radio>
283
- <auro-radio id="disabledRadio5" label="No" name="radioDemo" value="no" checked></auro-radio>
284
- <auro-radio id="disabledRadio6" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
285
- </auro-radio-group>
286
- ```
287
- <!-- AURO-GENERATED-CONTENT:END -->
288
- </auro-accordion>
289
- <div class="exampleWrapper--ondark">
290
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-disabled.html) -->
291
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse-disabled.html -->
292
- <auro-radio-group appearance="inverse">
293
- <span slot="legend">Form label goes here</span>
294
- <auro-radio id="disabledRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
295
- <auro-radio id="disabledRadio2" label="No" name="radioDemo" value="no" disabled></auro-radio>
296
- <auro-radio id="disabledRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
297
- </auro-radio-group>
298
- <auro-radio-group appearance="inverse" disabled>
299
- <span slot="legend">Form label goes here</span>
300
- <auro-radio id="disabledRadio4" label="Yes" name="radioDemo" value="yes"></auro-radio>
301
- <auro-radio id="disabledRadio5" label="No" name="radioDemo" value="no" checked></auro-radio>
302
- <auro-radio id="disabledRadio6" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
303
- </auro-radio-group>
304
- <!-- AURO-GENERATED-CONTENT:END -->
305
- </div>
306
- <auro-accordion alignRight>
307
- <span slot="trigger">See code</span>
308
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-disabled.html) -->
309
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse-disabled.html -->
310
- <auro-radio-group appearance="inverse">
311
- <span slot="legend">Form label goes here</span>
312
- <auro-radio id="disabledRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
313
- <auro-radio id="disabledRadio2" label="No" name="radioDemo" value="no" disabled></auro-radio>
314
- <auro-radio id="disabledRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
315
- </auro-radio-group>
316
- <auro-radio-group appearance="inverse" disabled>
317
- <span slot="legend">Form label goes here</span>
318
- <auro-radio id="disabledRadio4" label="Yes" name="radioDemo" value="yes"></auro-radio>
319
- <auro-radio id="disabledRadio5" label="No" name="radioDemo" value="no" checked></auro-radio>
320
- <auro-radio id="disabledRadio6" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
321
- </auro-radio-group>
322
- <!-- AURO-GENERATED-CONTENT:END -->
323
- </auro-accordion>
324
-
325
- ### Error
326
-
327
- Use the `error` attribute to apply a persistent custom error that supersedes the HTML5 validation logic.
328
-
329
- A custom error message can be set using the `error` attribute, or it can be used in conjunction with the `setCustomValidityCustomError` attribute.
330
-
331
- <div class="exampleWrapper">
332
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/error.html) -->
333
- <!-- The below content is automatically added from ./../apiExamples/error.html -->
334
- <auro-radio-group error="There is an error with this form entry">
335
- <span slot="legend">Form label goes here</span>
336
- <auro-radio id="errorRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
337
- <auro-radio id="errorRadio2" label="No" name="radioDemo" value="no"></auro-radio>
338
- <auro-radio id="errorRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
339
- </auro-radio-group>
340
- <!-- AURO-GENERATED-CONTENT:END -->
341
- </div>
342
- <auro-accordion alignRight>
343
- <span slot="trigger">See code</span>
344
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/error.html) -->
345
- <!-- The below code snippet is automatically added from ./../apiExamples/error.html -->
346
- ```html
347
- <auro-radio-group error="There is an error with this form entry">
348
- <span slot="legend">Form label goes here</span>
349
- <auro-radio id="errorRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
350
- <auro-radio id="errorRadio2" label="No" name="radioDemo" value="no"></auro-radio>
351
- <auro-radio id="errorRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
352
- </auro-radio-group>
353
- ```
354
- <!-- AURO-GENERATED-CONTENT:END -->
355
- </auro-accordion>
356
- <div class="exampleWrapper--ondark">
357
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-error.html) -->
358
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse-error.html -->
359
- <auro-radio-group appearance="inverse" error="There is an error with this form entry">
360
- <span slot="legend">Form label goes here</span>
361
- <auro-radio id="errorRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
362
- <auro-radio id="errorRadio2" label="No" name="radioDemo" value="no"></auro-radio>
363
- <auro-radio id="errorRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
364
- </auro-radio-group>
365
- <!-- AURO-GENERATED-CONTENT:END -->
366
- </div>
367
- <auro-accordion alignRight>
368
- <span slot="trigger">See code</span>
369
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/appearance-inverse-error.html) -->
370
- <!-- The below content is automatically added from ./../apiExamples/appearance-inverse-error.html -->
371
- <auro-radio-group appearance="inverse" error="There is an error with this form entry">
372
- <span slot="legend">Form label goes here</span>
373
- <auro-radio id="errorRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
374
- <auro-radio id="errorRadio2" label="No" name="radioDemo" value="no"></auro-radio>
375
- <auro-radio id="errorRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
376
- </auro-radio-group>
377
- <!-- AURO-GENERATED-CONTENT:END -->
378
- </auro-accordion>
379
-
380
- ### Horizontal Group
381
-
382
- Using the `horizontal` attribute will render the `auro-radio` elements in a horizontal line.
383
-
384
- **Note**: Using the horizontal attribute has a limit of 3 options. Beyond three, options will be listed in vertically.
385
-
386
- <div class="exampleWrapper">
387
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/horizontal.html) -->
388
- <!-- The below content is automatically added from ./../apiExamples/horizontal.html -->
389
- <auro-radio-group horizontal>
390
- <span slot="legend">Form label goes here</span>
391
- <auro-radio id="horizontalRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
392
- <auro-radio id="horizontalRadio2" label="No" name="radioDemo" value="no"></auro-radio>
393
- <auro-radio id="horizontalRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
394
- </auro-radio-group>
395
- <!-- AURO-GENERATED-CONTENT:END -->
396
- </div>
397
- <auro-accordion alignRight>
398
- <span slot="trigger">See code</span>
399
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/horizontal.html) -->
400
- <!-- The below code snippet is automatically added from ./../apiExamples/horizontal.html -->
401
-
402
- ```html
403
- <auro-radio-group horizontal>
404
- <span slot="legend">Form label goes here</span>
405
- <auro-radio id="horizontalRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
406
- <auro-radio id="horizontalRadio2" label="No" name="radioDemo" value="no"></auro-radio>
407
- <auro-radio id="horizontalRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
408
- </auro-radio-group>
409
- ```
410
- <!-- AURO-GENERATED-CONTENT:END -->
411
- </auro-accordion>
412
-
413
- ### Required
414
-
415
- When present, the `required` attribute specifies that an `<auro-radio>` within the `<auro-radio-group>` must be checked. There is no error message associated with the `required` attribute by default. Use `setCustomValidityValueMissing` to set a custom error message.
416
-
417
- <div class="exampleWrapper">
418
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/required.html) -->
419
- <!-- The below content is automatically added from ./../apiExamples/required.html -->
420
- <auro-radio-group required setCustomValidityValueMissing="value missing">
421
- <span slot="legend">Form label goes here</span>
422
- <auro-radio id="requiredRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
423
- <auro-radio id="requiredRadio2" label="No" name="radioDemo" value="no"></auro-radio>
424
- <auro-radio id="requiredRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
425
- </auro-radio-group>
426
- <!-- AURO-GENERATED-CONTENT:END -->
427
- </div>
428
- <auro-accordion alignRight>
429
- <span slot="trigger">See code</span>
430
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/required.html) -->
431
- <!-- The below code snippet is automatically added from ./../apiExamples/required.html -->
432
-
433
- ```html
434
- <auro-radio-group required setCustomValidityValueMissing="value missing">
435
- <span slot="legend">Form label goes here</span>
436
- <auro-radio id="requiredRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
437
- <auro-radio id="requiredRadio2" label="No" name="radioDemo" value="no"></auro-radio>
438
- <auro-radio id="requiredRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
439
- </auro-radio-group>
440
- ```
441
- <!-- AURO-GENERATED-CONTENT:END -->
442
- </auro-accordion>
443
-
444
- ## Method Examples
445
-
446
- ### Reset State
447
-
448
- Use the `reset()` method to reset the `<auro-radio-group>`'s `value` and `validity` state. Doing so will preserve all other attributes and properties.
449
-
450
- <div class="exampleWrapper">
451
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/reset-state.html) -->
452
- <!-- The below content is automatically added from ./../apiExamples/reset-state.html -->
453
- <auro-button id="resetStateBtn">Reset</auro-button>
454
- <br/><br/>
455
- <auro-radio-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
456
- <span slot="legend">Form label goes here</span>
457
- <auro-radio id="resetGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
458
- <auro-radio id="resetGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
459
- <auro-radio id="resetGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
460
- </auro-radio-group>
461
- <!-- AURO-GENERATED-CONTENT:END -->
462
- </div>
463
- <auro-accordion alignRight>
464
- <span slot="trigger">See code</span>
465
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.html) -->
466
- <!-- The below code snippet is automatically added from ./../apiExamples/reset-state.html -->
467
-
468
- ```html
469
- <auro-button id="resetStateBtn">Reset</auro-button>
470
- <br/><br/>
471
- <auro-radio-group id="resetStateExample" required setCustomValidityValueMissing="Please select an option">
472
- <span slot="legend">Form label goes here</span>
473
- <auro-radio id="resetGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
474
- <auro-radio id="resetGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
475
- <auro-radio id="resetGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
476
- </auro-radio-group>
477
- ```
478
- <!-- AURO-GENERATED-CONTENT:END -->
479
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/reset-state.js) -->
480
- <!-- The below code snippet is automatically added from ./../apiExamples/reset-state.js -->
481
-
482
- ```js
483
- export function resetStateExample() {
484
- const elem = document.querySelector('#resetStateExample');
485
-
486
- document.querySelector('#resetStateBtn').addEventListener('click', () => {
487
- elem.reset();
488
- });
489
- }
490
- ```
491
- <!-- AURO-GENERATED-CONTENT:END -->
492
- </auro-accordion>
493
-
494
- ## Slot Examples
495
-
496
- ### Optional Label
497
-
498
- The `<auro-radio-group>` supports an `optionalLabel` slot, where users can can override the default `(optional)` notification text.
499
-
500
- <div class="exampleWrapper">
501
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/optional-label.html) -->
502
- <!-- The below content is automatically added from ./../apiExamples/optional-label.html -->
503
- <auro-radio-group>
504
- <span slot="legend">Form label goes here</span>
505
- <span slot="optionalLabel">(add custom label here)</span>
506
- <auro-radio id="labelRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
507
- <auro-radio id="labelRadio2" label="No" name="radioDemo" value="no"></auro-radio>
508
- <auro-radio id="labelRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
509
- </auro-radio-group>
510
- <!-- AURO-GENERATED-CONTENT:END -->
511
- </div>
512
- <auro-accordion alignRight>
513
- <span slot="trigger">See code</span>
514
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/optional-label.html) -->
515
- <!-- The below code snippet is automatically added from ./../apiExamples/optional-label.html -->
516
-
517
- ```html
518
- <auro-radio-group>
519
- <span slot="legend">Form label goes here</span>
520
- <span slot="optionalLabel">(add custom label here)</span>
521
- <auro-radio id="labelRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
522
- <auro-radio id="labelRadio2" label="No" name="radioDemo" value="no"></auro-radio>
523
- <auro-radio id="labelRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
524
- </auro-radio-group>
525
- ```
526
- <!-- AURO-GENERATED-CONTENT:END -->
527
- </auro-accordion>
528
-
529
- ## Common Usage Patterns & Functional Examples
530
-
531
- ### Dynamic Example
532
-
533
- This example demonstrates a data drive approach to rendering `<auro-radio>` buttons.
534
-
535
- **Note**: When dynamically creating `<auro-radio>` elements, make sure to add an `id` attribute, as it is a required part of the HTML5 spec for all form elements.
536
-
537
- <div class="exampleWrapper">
538
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/dynamic.html) -->
539
- <!-- The below content is automatically added from ./../apiExamples/dynamic.html -->
540
- <auro-radio-group required id="dynamicExample">
541
- <span slot="legend">Form label goes here</span>
542
- </auro-radio-group>
543
- <!-- AURO-GENERATED-CONTENT:END -->
544
- </div>
545
- <auro-accordion alignRight>
546
- <span slot="trigger">See code</span>
547
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamic.html) -->
548
- <!-- The below code snippet is automatically added from ./../apiExamples/dynamic.html -->
549
-
550
- ```html
551
- <auro-radio-group required id="dynamicExample">
552
- <span slot="legend">Form label goes here</span>
553
- </auro-radio-group>
554
- ```
555
- <!-- AURO-GENERATED-CONTENT:END -->
556
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/dynamic.js) -->
557
- <!-- The below code snippet is automatically added from ./../apiExamples/dynamic.js -->
558
-
559
- ```js
560
- export function dynamicExample() {
561
- const values = ['Yes', 'No', 'Maybe'];
562
- const radioGroup = document.getElementById('dynamicExample');
563
-
564
- for (let i = 0; i < values.length; i++) {
565
- const radio = document.createElement('auro-radio');
566
-
567
- radio.id = `dynamicRadio${i}`;
568
- radio.label = values[i];
569
- radio.name = 'radioDemo';
570
- radio.value = values[i];
571
- radio.textContent = values[i];
572
-
573
- radioGroup.appendChild(radio);
574
- }
575
- }
576
- ```
577
- <!-- AURO-GENERATED-CONTENT:END -->
578
- </auro-accordion>
579
-
580
- ### Multiline Label
581
-
582
- Example to show text wrapping on multiline labels.
583
-
584
- <div class="exampleWrapper">
585
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/multiline-group.html) -->
586
- <!-- The below content is automatically added from ./../apiExamples/multiline-group.html -->
587
- <auro-radio-group>
588
- <span slot="legend">Form label goes here</span>
589
- <auro-radio id="basicGroupRadio1" label="Sample text" name="radioDemo" value="option1"></auro-radio>
590
- <auro-radio id="basicGroupRadio2" label="This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines." name="radioDemo" value="option2"></auro-radio>
591
- <auro-radio id="basicGroupRadio3" label="Sample text" name="radioDemo" value="option3"></auro-radio>
592
- </auro-radio-group>
593
- <!-- AURO-GENERATED-CONTENT:END -->
594
- </div>
595
- <auro-accordion alignRight>
596
- <span slot="trigger">See code</span>
597
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/multiline-group.html) -->
598
- <!-- The below code snippet is automatically added from ./../apiExamples/multiline-group.html -->
599
-
600
- ```html
601
- <auro-radio-group>
602
- <span slot="legend">Form label goes here</span>
603
- <auro-radio id="basicGroupRadio1" label="Sample text" name="radioDemo" value="option1"></auro-radio>
604
- <auro-radio id="basicGroupRadio2" label="This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines. This text is long enough to wrap onto multiple lines." name="radioDemo" value="option2"></auro-radio>
605
- <auro-radio id="basicGroupRadio3" label="Sample text" name="radioDemo" value="option3"></auro-radio>
606
- </auro-radio-group>
607
- ```
608
- <!-- AURO-GENERATED-CONTENT:END -->
609
- </auro-accordion>
610
-
611
- ### Accordion Nested Group
612
-
613
- This example shows how to use `<auro-accordion>` with the `<auro-radio-group>` and `<auro-radio>` elements for
614
- nested/optional groups (such as a "More Options" section in a payment processor).
615
-
616
- <div class="exampleWrapper">
617
- <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/accordion-example.html) -->
618
- <!-- The below content is automatically added from ./../apiExamples/accordion-example.html -->
619
- <auro-radio-group>
620
- <span slot="legend">Accordion Test</span>
621
- <auro-radio id="basicGroupRadio1" label="Credit or debit card" name="creditordebit" value="credit"></auro-radio>
622
- <auro-radio id="basicGroupRadio2" label="Apple Pay" name="applePay" value="applePay"></auro-radio>
623
- <auro-radio id="basicGroupRadio3" label="Alaska Airlines Commercial Account" name="alaskaCommercial" value="alaskaCommercial"></auro-radio>
624
- <auro-accordion>
625
- <span slot="trigger">More payment options</span>
626
- <auro-radio id="basicGroupRadio4" label="Click to pay" name="manualCredit" value="manualCredit"></auro-radio>
627
- <auro-radio id="basicGroupRadio5" label="Google Pay" name="googlePay" value="googlePay"></auro-radio>
628
- </auro-accordion>
629
- </auro-radio-group>
630
- <!-- AURO-GENERATED-CONTENT:END -->
631
- </div>
632
- <auro-accordion alignRight>
633
- <span slot="trigger">See code</span>
634
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/accordion-example.html) -->
635
- <!-- The below code snippet is automatically added from ./../apiExamples/accordion-example.html -->
636
-
637
- ```html
638
- <auro-radio-group>
639
- <span slot="legend">Accordion Test</span>
640
- <auro-radio id="basicGroupRadio1" label="Credit or debit card" name="creditordebit" value="credit"></auro-radio>
641
- <auro-radio id="basicGroupRadio2" label="Apple Pay" name="applePay" value="applePay"></auro-radio>
642
- <auro-radio id="basicGroupRadio3" label="Alaska Airlines Commercial Account" name="alaskaCommercial" value="alaskaCommercial"></auro-radio>
643
- <auro-accordion>
644
- <span slot="trigger">More payment options</span>
645
- <auro-radio id="basicGroupRadio4" label="Click to pay" name="manualCredit" value="manualCredit"></auro-radio>
646
- <auro-radio id="basicGroupRadio5" label="Google Pay" name="googlePay" value="googlePay"></auro-radio>
647
- </auro-accordion>
648
- </auro-radio-group>
649
- ```
650
- <!-- AURO-GENERATED-CONTENT:END -->
651
- </auro-accordion>
652
-
653
- ## Restyle Component with CSS Variables
654
-
655
- The component may be restyled by changing the values of the following token(s).
656
-
657
- <!-- AURO-GENERATED-CONTENT:START (CODE:src=./../src/styles/tokens.scss) -->
658
- <!-- The below code snippet is automatically added from ./../src/styles/tokens.scss -->
659
-
660
- ```scss
661
- @use "@aurodesignsystem/design-tokens/dist/themes/alaska/SCSSVariables--alaska" as v;
662
-
663
- :host {
664
- // auro-radio-group colors
665
- --ds-auro-radio-group-label-color: inherit;
666
-
667
- // auro-radio colors
668
- --ds-auro-radio-btn-border-color: var(--ds-basic-color-border-bold, #{v.$ds-basic-color-border-bold});
669
- --ds-auro-radio-btn-fill-color: transparent;
670
- --ds-auro-radio-btn-inset-color: transparent;
671
- --ds-auro-radio-label-color: inherit;
672
- --ds-auro-radio-tap-color: transparent;
673
- }
674
- ```
675
- <!-- AURO-GENERATED-CONTENT:END -->