@czi-sds/mcp 0.3.0 → 0.4.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.
Files changed (145) hide show
  1. package/data/component-props/Accordion.json +14 -15
  2. package/data/component-props/Alert.json +2 -44
  3. package/data/component-props/Autocomplete.json +14 -32
  4. package/data/component-props/Banner.json +11 -12
  5. package/data/component-props/Button.json +17 -82
  6. package/data/component-props/ButtonDropdown.json +26 -0
  7. package/data/component-props/ButtonIcon.json +4 -60
  8. package/data/component-props/ButtonToggle.json +2 -66
  9. package/data/component-props/Callout.json +11 -65
  10. package/data/component-props/CellBasic.json +28 -56
  11. package/data/component-props/CellComponent.json +4 -32
  12. package/data/component-props/CellHeader.json +13 -49
  13. package/data/component-props/ComplexFilter.json +24 -4
  14. package/data/component-props/ContentCard.json +66 -2
  15. package/data/component-props/Dialog.json +26 -0
  16. package/data/component-props/Dropdown.json +29 -67
  17. package/data/component-props/DropdownMenu.json +16 -56
  18. package/data/component-props/HeatmapChart.json +6 -87
  19. package/data/component-props/Icon.json +3 -8
  20. package/data/component-props/InputCheckbox.json +5 -53
  21. package/data/component-props/InputDropdown.json +11 -33
  22. package/data/component-props/InputRadio.json +5 -53
  23. package/data/component-props/InputSearch.json +6 -70
  24. package/data/component-props/InputSlider.json +21 -35
  25. package/data/component-props/InputText.json +7 -63
  26. package/data/component-props/InputToggle.json +5 -54
  27. package/data/component-props/Link.json +18 -0
  28. package/data/component-props/LoadingIndicator.json +1 -2
  29. package/data/component-props/MenuItem.json +11 -41
  30. package/data/component-props/MenuSelect.json +4 -67
  31. package/data/component-props/NavigationFooter.json +0 -8
  32. package/data/component-props/NavigationHeader.json +14 -65
  33. package/data/component-props/NavigationJumpTo.json +0 -40
  34. package/data/component-props/Notification.json +14 -58
  35. package/data/component-props/Pagination.json +8 -33
  36. package/data/component-props/Panel.json +4 -54
  37. package/data/component-props/SegmentedControl.json +0 -55
  38. package/data/component-props/TableRow.json +10 -38
  39. package/data/component-props/Tabs.json +18 -0
  40. package/data/component-props/Tag.json +10 -56
  41. package/data/component-props/TagFilter.json +0 -47
  42. package/data/component-props/Tooltip.json +12 -61
  43. package/data/component-props/TooltipCondensed.json +18 -0
  44. package/data/component-props/TooltipTable.json +0 -4
  45. package/data/zeroheight-exports/Accordion.md +167 -125
  46. package/data/zeroheight-exports/Banner.md +71 -48
  47. package/data/zeroheight-exports/Borders.md +72 -73
  48. package/data/zeroheight-exports/Buttons.md +375 -330
  49. package/data/zeroheight-exports/Callout.md +138 -116
  50. package/data/zeroheight-exports/Colors.md +254 -255
  51. package/data/zeroheight-exports/Content-Card.md +36 -37
  52. package/data/zeroheight-exports/Contributing-to-SDS.md +34 -35
  53. package/data/zeroheight-exports/Control-Inputs.md +289 -234
  54. package/data/zeroheight-exports/Corners.md +63 -64
  55. package/data/zeroheight-exports/Cover-page.md +0 -1
  56. package/data/zeroheight-exports/Dialog.md +237 -179
  57. package/data/zeroheight-exports/Downloads.md +10 -11
  58. package/data/zeroheight-exports/Drop-Shadows.md +40 -41
  59. package/data/zeroheight-exports/Dropdown-Input.md +158 -127
  60. package/data/zeroheight-exports/Dropdown-Menu.md +814 -718
  61. package/data/zeroheight-exports/Element-Status-Tracker.md +191 -192
  62. package/data/zeroheight-exports/Field-Inputs.md +149 -130
  63. package/data/zeroheight-exports/Filters.md +114 -94
  64. package/data/zeroheight-exports/Getting-Started.md +112 -249
  65. package/data/zeroheight-exports/Hero.md +43 -37
  66. package/data/zeroheight-exports/Icons.md +205 -206
  67. package/data/zeroheight-exports/Intent.md +6 -7
  68. package/data/zeroheight-exports/Introduction-to-Bases.md +8 -9
  69. package/data/zeroheight-exports/Introduction-to-Cells.md +11 -12
  70. package/data/zeroheight-exports/Introduction-to-DNA.md +8 -9
  71. package/data/zeroheight-exports/Introduction-to-Genes.md +8 -9
  72. package/data/zeroheight-exports/Introduction.md +52 -53
  73. package/data/zeroheight-exports/Link.md +50 -37
  74. package/data/zeroheight-exports/Lists.md +78 -63
  75. package/data/zeroheight-exports/Loading-Indicator.md +7 -8
  76. package/data/zeroheight-exports/Navigation.md +163 -142
  77. package/data/zeroheight-exports/Notification.md +132 -102
  78. package/data/zeroheight-exports/Panel.md +231 -115
  79. package/data/zeroheight-exports/Responsive-Design.md +35 -32
  80. package/data/zeroheight-exports/Search-Input.md +9 -10
  81. package/data/zeroheight-exports/Search.md +87 -104
  82. package/data/zeroheight-exports/Segmented-Control.md +68 -45
  83. package/data/zeroheight-exports/Spacing.md +210 -211
  84. package/data/zeroheight-exports/Table.md +414 -302
  85. package/data/zeroheight-exports/Tabs.md +126 -98
  86. package/data/zeroheight-exports/Tags.md +148 -118
  87. package/data/zeroheight-exports/Text-Link.md +32 -33
  88. package/data/zeroheight-exports/Theming.md +48 -29
  89. package/data/zeroheight-exports/Tooltips.md +253 -237
  90. package/data/zeroheight-exports/Typography.md +463 -464
  91. package/dist/stdio.js +44 -132
  92. package/package.json +3 -4
  93. package/data/component-props/Chip.json +0 -73
  94. package/data/component-props/List.json +0 -43
  95. package/data/component-props/Menu.json +0 -48
  96. package/data/component-props/Table.json +0 -26
  97. package/data/component-props-storybook/Accordion-storybook.json +0 -45
  98. package/data/component-props-storybook/Alert-storybook.json +0 -30
  99. package/data/component-props-storybook/Autocomplete-storybook.json +0 -67
  100. package/data/component-props-storybook/Banner-storybook.json +0 -78
  101. package/data/component-props-storybook/Button-storybook.json +0 -115
  102. package/data/component-props-storybook/ButtonDropdown-storybook.json +0 -73
  103. package/data/component-props-storybook/ButtonIcon-storybook.json +0 -60
  104. package/data/component-props-storybook/ButtonToggle-storybook.json +0 -68
  105. package/data/component-props-storybook/Callout-storybook.json +0 -90
  106. package/data/component-props-storybook/CellBasic-storybook.json +0 -138
  107. package/data/component-props-storybook/CellComponent-storybook.json +0 -48
  108. package/data/component-props-storybook/CellHeader-storybook.json +0 -71
  109. package/data/component-props-storybook/Chip-storybook.json +0 -26
  110. package/data/component-props-storybook/ComplexFilter-storybook.json +0 -60
  111. package/data/component-props-storybook/ContentCard-storybook.json +0 -175
  112. package/data/component-props-storybook/Dialog-storybook.json +0 -56
  113. package/data/component-props-storybook/Dropdown-storybook.json +0 -93
  114. package/data/component-props-storybook/DropdownMenu-storybook.json +0 -73
  115. package/data/component-props-storybook/HeatmapChart-storybook.json +0 -55
  116. package/data/component-props-storybook/Icon-storybook.json +0 -75
  117. package/data/component-props-storybook/InputCheckbox-storybook.json +0 -57
  118. package/data/component-props-storybook/InputDropdown-storybook.json +0 -80
  119. package/data/component-props-storybook/InputRadio-storybook.json +0 -56
  120. package/data/component-props-storybook/InputSearch-storybook.json +0 -55
  121. package/data/component-props-storybook/InputSlider-storybook.json +0 -55
  122. package/data/component-props-storybook/InputText-storybook.json +0 -59
  123. package/data/component-props-storybook/InputToggle-storybook.json +0 -42
  124. package/data/component-props-storybook/Link-storybook.json +0 -50
  125. package/data/component-props-storybook/List-storybook.json +0 -26
  126. package/data/component-props-storybook/LoadingIndicator-storybook.json +0 -34
  127. package/data/component-props-storybook/Menu-storybook.json +0 -26
  128. package/data/component-props-storybook/MenuItem-storybook.json +0 -74
  129. package/data/component-props-storybook/MenuSelect-storybook.json +0 -38
  130. package/data/component-props-storybook/NavigationFooter-storybook.json +0 -67
  131. package/data/component-props-storybook/NavigationHeader-storybook.json +0 -115
  132. package/data/component-props-storybook/NavigationJumpTo-storybook.json +0 -41
  133. package/data/component-props-storybook/Notification-storybook.json +0 -89
  134. package/data/component-props-storybook/Pagination-storybook.json +0 -50
  135. package/data/component-props-storybook/Panel-storybook.json +0 -52
  136. package/data/component-props-storybook/SegmentedControl-storybook.json +0 -30
  137. package/data/component-props-storybook/Table-storybook.json +0 -26
  138. package/data/component-props-storybook/TableHeader-storybook.json +0 -26
  139. package/data/component-props-storybook/TableRow-storybook.json +0 -62
  140. package/data/component-props-storybook/Tabs-storybook.json +0 -45
  141. package/data/component-props-storybook/Tag-storybook.json +0 -78
  142. package/data/component-props-storybook/TagFilter-storybook.json +0 -30
  143. package/data/component-props-storybook/Tooltip-storybook.json +0 -85
  144. package/data/component-props-storybook/TooltipCondensed-storybook.json +0 -38
  145. package/data/component-props-storybook/TooltipTable-storybook.json +0 -47
@@ -6,15 +6,15 @@ Control Inputs are elements that enable users to make selections and communicate
6
6
 
7
7
  ## Control Input Variants
8
8
 
9
- | There are two Control Input components available for designers to use depending on the type of action or response they are needing to elicit from the user. Checkbox and Radio Inputs must always be accompanied by a label that communicates the result of the selection. Follow the usage criteria accompanying each variant as a guide for selecting the correct Control Input for any given use case. | | **Jump to variant:** Checkbox Radio |
10
- | --- | --- | --- |
9
+ | There are two Control Input components available for designers to use depending on the type of action or response they are needing to elicit from the user. Checkbox and Radio Inputs must always be accompanied by a label that communicates the result of the selection. Follow the usage criteria accompanying each variant as a guide for selecting the correct Control Input for any given use case. | | **Jump to variant:** Checkbox Radio |
10
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------- |
11
11
 
12
12
  ---
13
13
 
14
14
  ## Checkbox Input
15
15
 
16
- | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
17
- | --- | --- | --- | --- | --- | --- | --- | --- |
16
+ | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
17
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
18
18
 
19
19
  Use when the user can select multiple options from a group of choices. Each Checkbox must be coupled with a label to communicate the result of a selection.
20
20
 
@@ -23,7 +23,7 @@ Use `sdsStage: indeterminate` to indicate a mixed selection; reserved for cases
23
23
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
24
24
 
25
25
  | **Default** | **Hover** | **Disabled** |
26
- | --- | --- | --- |
26
+ | ----------- | --------- | ------------ |
27
27
 
28
28
  ---
29
29
 
@@ -31,9 +31,9 @@ Click on each state below to enter inspect view and get details on its code attr
31
31
 
32
32
  ### Checkbox Lockups
33
33
 
34
- Each Checkbox must be coupled with a label to communicate the result of a selection.
34
+ Each Checkbox must be coupled with a label to communicate the result of a selection.
35
+
35
36
 
36
-  
37
37
 
38
38
  ---
39
39
 
@@ -41,21 +41,21 @@ Each Checkbox must be coupled with a label to communicate the result of a select
41
41
 
42
42
  These rules establish how much margin should exist between and around elements.
43
43
 
44
-  
44
+
45
45
 
46
46
  ---
47
47
 
48
48
  ## Radio Input
49
49
 
50
- | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
51
- | --- | --- | --- | --- | --- | --- | --- | --- |
50
+ | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
51
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
52
52
 
53
53
  Use when the user can select only one option from a group of choices. Each Radio Input must be coupled with a label to communicate the result of a selection.
54
54
 
55
55
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
56
56
 
57
57
  | **Default** | **Hover** | **Disabled** |
58
- | --- | --- | --- |
58
+ | ----------- | --------- | ------------ |
59
59
 
60
60
  ---
61
61
 
@@ -69,18 +69,18 @@ Each Radio must be coupled with a label to communicate the result of a selection
69
69
 
70
70
  These rules establish how much margin should exist between and around elements.
71
71
 
72
-  
72
+
73
73
 
74
74
  ## Code
75
75
 
76
76
  ## Control Input Components
77
77
 
78
- | Below you will find interactive Storybook iframes for each component within the Control Input element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputCheckbox InputRadio |
79
- | --- | --- | --- |
78
+ | Below you will find interactive Storybook iframes for each component within the Control Input element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputCheckbox InputRadio |
79
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------------------- |
80
80
 
81
81
  ---
82
82
 
83
- >These components appear as they are in the default SDS codebase. Once imported into the napari hub or napari.org codebases, use a theme file to enable the napari visual appearance customization.
83
+ > These components appear as they are in the default SDS codebase. Once imported into the napari hub or napari.org codebases, use a theme file to enable the napari visual appearance customization.
84
84
 
85
85
  ### InputCheckbox
86
86
 
@@ -100,8 +100,8 @@ Control Inputs are elements that enable users to make selections and communicate
100
100
 
101
101
  ## Control Input Variants
102
102
 
103
- | There is a range of Control Input variants available for designers to use depending on the type of action or response they are needing to elicit from the user. Checkbox and Radio Inputs must always be accompanied by a label that communicates the result of the selection. Follow the usage criteria accompanying each variant as a guide for selecting the correct Control Input for any given use case. | | **Jump to variant:** Checkbox Radio Toggle |
104
- | --- | --- | --- |
103
+ | There is a range of Control Input variants available for designers to use depending on the type of action or response they are needing to elicit from the user. Checkbox and Radio Inputs must always be accompanied by a label that communicates the result of the selection. Follow the usage criteria accompanying each variant as a guide for selecting the correct Control Input for any given use case. | | **Jump to variant:** Checkbox Radio Toggle |
104
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------ |
105
105
 
106
106
  ### Visual Preview
107
107
 
@@ -111,8 +111,8 @@ Use the links below to jump to information on a specific Control Input variant:
111
111
 
112
112
  ## Checkbox Input
113
113
 
114
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
115
- | --- | --- | --- | --- | --- | --- | --- | --- |
114
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
115
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
116
116
 
117
117
  Use when the user can select multiple options from a group of choices. Each Checkbox must be coupled with a label (and optional caption) to communicate the result of a selection.
118
118
 
@@ -121,15 +121,15 @@ Use `sdsStage: indeterminate` to indicate a mixed selection; reserved for cases
121
121
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
122
122
 
123
123
  | **Default** | **Hover** | **Disabled** |
124
- | --- | --- | --- |
124
+ | ----------- | --------- | ------------ |
125
125
 
126
126
  ---
127
127
 
128
-  
128
+
129
129
 
130
130
  ---
131
131
 
132
-  
132
+
133
133
 
134
134
  ### Checkbox Intent States
135
135
 
@@ -140,9 +140,9 @@ Use `intent: error` to communicate when a user has entered an incorrect or incom
140
140
  Use `intent: warning` to communicate when a user needs to be alerted that their response needs attention.
141
141
 
142
142
  | **Default** | **Error** | **Warning** |
143
- | --- | --- | --- |
143
+ | ----------- | --------- | ----------- |
144
+
144
145
 
145
-  
146
146
 
147
147
  ### Checkbox Lockups
148
148
 
@@ -158,20 +158,20 @@ These rules establish how much margin should exist between and around elements.
158
158
 
159
159
  ## Radio Input
160
160
 
161
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
162
- | --- | --- | --- | --- | --- | --- | --- | --- |
161
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
162
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
163
163
 
164
164
  Use when the user can select only one option from a group of choices. Each Radio must be coupled with a label (and optional caption) to communicate the result of a selection.
165
165
 
166
166
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
167
167
 
168
168
  | **Default** | **Hover** | **Disabled** |
169
- | --- | --- | --- |
169
+ | ----------- | --------- | ------------ |
170
170
 
171
171
  | **Default** | **Disabled** |
172
- | --- | --- |
172
+ | ----------- | ------------ |
173
+
173
174
 
174
-  
175
175
 
176
176
  ### Radio Intent States
177
177
 
@@ -182,7 +182,7 @@ Use `intent: error` to communicate when a user has entered an incorrect or incom
182
182
  Use `intent: warning` to communicate when a user needs to be alerted that their response needs attention.
183
183
 
184
184
  | **Default** | **Error** | **Warning** |
185
- | --- | --- | --- |
185
+ | ----------- | --------- | ----------- |
186
186
 
187
187
  ### Radio Lockups
188
188
 
@@ -198,15 +198,15 @@ These rules establish how much margin should exist between and around elements.
198
198
 
199
199
  ## Toggle
200
200
 
201
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
202
- | --- | --- | --- | --- | --- | --- | --- | --- |
201
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
202
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
203
203
 
204
204
  Use to allow the user to flip a setting or option from off to on and vice versa.
205
205
 
206
206
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
207
207
 
208
208
  | **Default** | **Hover** | **Disabled** |
209
- | --- | --- | --- |
209
+ | ----------- | --------- | ------------ |
210
210
 
211
211
  ---
212
212
 
@@ -220,12 +220,12 @@ These rules establish how much margin should exist between and around elements.
220
220
 
221
221
  ## Control Input Components
222
222
 
223
- | Below you will find interactive Storybook iframes for each component within the Control Input element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputCheckbox InputRadio InputToggle InputSlider |
224
- | --- | --- | --- |
223
+ | Below you will find interactive Storybook iframes for each component within the Control Input element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputCheckbox InputRadio InputToggle InputSlider |
224
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------------------------------------------- |
225
225
 
226
226
  ---
227
227
 
228
- >These components appear as they are in the default SDS codebase. Once imported into the CZ GEN EPI codebase, use a theme file to enable the CZ GEN EPI visual appearance customization.
228
+ > These components appear as they are in the default SDS codebase. Once imported into the CZ GEN EPI codebase, use a theme file to enable the CZ GEN EPI visual appearance customization.
229
229
 
230
230
  ### InputCheckbox
231
231
 
@@ -251,8 +251,8 @@ Control Inputs are elements that enable users to make selections and communicate
251
251
 
252
252
  ## Control Input Variants
253
253
 
254
- | There is a range of Control Input variants available for designers to use depending on the type of action or response they are needing to elicit from the user. Checkbox and Radio Inputs must always be accompanied by a label that communicates the result of the selection. Follow the usage criteria accompanying each variant as a guide for selecting the correct Control Input for any given use case. | | **Jump to variant:** Checkbox Radio Toggle Slider |
255
- | --- | --- | --- |
254
+ | There is a range of Control Input variants available for designers to use depending on the type of action or response they are needing to elicit from the user. Checkbox and Radio Inputs must always be accompanied by a label that communicates the result of the selection. Follow the usage criteria accompanying each variant as a guide for selecting the correct Control Input for any given use case. | | **Jump to variant:** Checkbox Radio Toggle Slider |
255
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------- |
256
256
 
257
257
  ### Visual Preview
258
258
 
@@ -262,8 +262,8 @@ Use the links below to jump to information on a specific Control Input variant:
262
262
 
263
263
  ## Checkbox Input
264
264
 
265
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
266
- | --- | --- | --- | --- | --- | --- | --- | --- |
265
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
266
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
267
267
 
268
268
  Use when the user can select multiple options from a group of choices. Each Checkbox must be coupled with a label (and optional caption) to communicate the result of a selection.
269
269
 
@@ -272,13 +272,13 @@ Use `sdsStage: indeterminate` to indicate a mixed selection; reserved for cases
272
272
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
273
273
 
274
274
  | **Default** | **Hover** | **Disabled** |
275
- | --- | --- | --- |
275
+ | ----------- | --------- | ------------ |
276
276
 
277
277
  ---
278
278
 
279
279
  ---
280
280
 
281
-  
281
+
282
282
 
283
283
  ### Checkbox Intent States
284
284
 
@@ -289,7 +289,7 @@ Use `intent: error` to communicate when a user has entered an incorrect or incom
289
289
  Use `intent: warning` to communicate when a user needs to be alerted that their response needs attention.
290
290
 
291
291
  | **Default** | **Error** | **Warning** |
292
- | --- | --- | --- |
292
+ | ----------- | --------- | ----------- |
293
293
 
294
294
  ### Checkbox Lockups
295
295
 
@@ -305,18 +305,18 @@ These rules establish how much margin should exist between and around elements.
305
305
 
306
306
  ## Radio Input
307
307
 
308
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
309
- | --- | --- | --- | --- | --- | --- | --- | --- |
308
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
309
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
310
310
 
311
311
  Use when the user can select only one option from a group of choices. Each Radio must be coupled with a label (and optional caption) to communicate the result of a selection.
312
312
 
313
313
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
314
314
 
315
315
  | **Default** | **Hover** | **Disabled** |
316
- | --- | --- | --- |
316
+ | ----------- | --------- | ------------ |
317
317
 
318
318
  | **Default** | **Disabled** |
319
- | --- | --- |
319
+ | ----------- | ------------ |
320
320
 
321
321
  ### Radio Intent States
322
322
 
@@ -327,9 +327,9 @@ Use `intent: error` to communicate when a user has entered an incorrect or incom
327
327
  Use `intent: warning` to communicate when a user needs to be alerted that their response needs attention.
328
328
 
329
329
  | **Default** | **Error** | **Warning** |
330
- | --- | --- | --- |
330
+ | ----------- | --------- | ----------- |
331
+
331
332
 
332
-  
333
333
 
334
334
  ### Radio Lockups
335
335
 
@@ -345,15 +345,15 @@ These rules establish how much margin should exist between and around elements.
345
345
 
346
346
  ## Toggle
347
347
 
348
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
349
- | --- | --- | --- | --- | --- | --- | --- | --- |
348
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
349
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
350
350
 
351
351
  Use to allow the user to flip a setting or option from off to on and vice versa.
352
352
 
353
353
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
354
354
 
355
355
  | **Default** | **Hover** | **Disabled** |
356
- | --- | --- | --- |
356
+ | ----------- | --------- | ------------ |
357
357
 
358
358
  ---
359
359
 
@@ -367,8 +367,8 @@ These rules establish how much margin should exist between and around elements.
367
367
 
368
368
  ## Slider
369
369
 
370
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
371
- | --- | --- | --- | --- | --- | --- | --- | --- |
370
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
371
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
372
372
 
373
373
  ### Single-sided Slider
374
374
 
@@ -392,8 +392,8 @@ These rules establish how much margin should exist between and around elements.
392
392
 
393
393
  ## Control Input Components
394
394
 
395
- | Below you will find interactive Storybook iframes for each component within the Control Input element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputCheckbox InputRadio InputToggle InputSlider |
396
- | --- | --- | --- |
395
+ | Below you will find interactive Storybook iframes for each component within the Control Input element group. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** InputCheckbox InputRadio InputToggle InputSlider |
396
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------------------------------------------- |
397
397
 
398
398
  ---
399
399
 
@@ -427,8 +427,8 @@ Control Inputs are elements that enable users to make selections and communicate
427
427
 
428
428
  ## Control Input Components
429
429
 
430
- | There are a range of Control Input components available to use depending on the type of action or response the application needs from the user. | | **Jump to component:** Checkbox Radio Slider Toggle |
431
- | --- | --- | --- |
430
+ | There are a range of Control Input components available to use depending on the type of action or response the application needs from the user. | | **Jump to component:** Checkbox Radio Slider Toggle |
431
+ | ----------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------------------- |
432
432
 
433
433
  ### Visual Preview
434
434
 
@@ -436,8 +436,8 @@ Control Inputs are elements that enable users to make selections and communicate
436
436
 
437
437
  ## Checkbox
438
438
 
439
- | | In Figma | | | Meets Accessibility | | | In Code |
440
- | --- | --- | --- | --- | --- | --- | --- | --- |
439
+ | | In Figma | | | Meets Accessibility | | | In Code |
440
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
441
441
 
442
442
  ### Live Instance
443
443
 
@@ -458,17 +458,17 @@ Use the indeterminate variant to indicate a mixed selection; reserved for cases
458
458
  Use when Checkbox functionality is needed but a custom label is desired.
459
459
 
460
460
  | Default | Hover | Disabled |
461
- | --- | --- | --- |
461
+ | ------- | ----- | -------- |
462
462
 
463
463
  #### Checkbox – Label
464
464
 
465
465
  | Default | Hover | Disabled |
466
- | --- | --- | --- |
466
+ | ------- | ----- | -------- |
467
467
 
468
468
  #### Checkbox – Label + Caption
469
469
 
470
470
  | Default | Hover | Disabled |
471
- | --- | --- | --- |
471
+ | ------- | ----- | -------- |
472
472
 
473
473
  ---
474
474
 
@@ -483,14 +483,14 @@ These rules establish how much margin should exist between and around elements.
483
483
  Use Default to communicate that the user has yet to enter a response, Negative to communicate when a user has entered an incorrect or incomplete response, and Notice when a user's response needs attention. Optionally, Intent Messages can be displayed to further communicate why a Negative or Notice intent was triggered. For more information see Intents.
484
484
 
485
485
  | Default | Negative | Negative + Intent Message | Notice | Notice + Intent Message |
486
- | --- | --- | --- | --- | --- |
486
+ | ------- | -------- | ------------------------- | ------ | ----------------------- |
487
487
 
488
488
  ---
489
489
 
490
490
  ## Radio
491
491
 
492
- | | In Figma | | | Meets Accessibility | | | In Code |
493
- | --- | --- | --- | --- | --- | --- | --- | --- |
492
+ | | In Figma | | | Meets Accessibility | | | In Code |
493
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
494
494
 
495
495
  ### Live Instance
496
496
 
@@ -509,26 +509,26 @@ Use Radios when the user can only select one option from a group of choices. Eac
509
509
  Use when Radio functionality is needed but a custom label is desired.
510
510
 
511
511
  | Default | Hover | Disabled |
512
- | --- | --- | --- |
512
+ | ------- | ----- | -------- |
513
513
 
514
514
  | Default | Disabled |
515
- | --- | --- |
515
+ | ------- | -------- |
516
516
 
517
517
  #### Radio – Label
518
518
 
519
519
  | Default | Hover | Disabled |
520
- | --- | --- | --- |
520
+ | ------- | ----- | -------- |
521
521
 
522
522
  | Default | Disabled |
523
- | --- | --- |
523
+ | ------- | -------- |
524
524
 
525
525
  #### Radio – Label + Caption
526
526
 
527
527
  | Default | Hover | Disabled |
528
- | --- | --- | --- |
528
+ | ------- | ----- | -------- |
529
529
 
530
530
  | Default | Disabled |
531
- | --- | --- |
531
+ | ------- | -------- |
532
532
 
533
533
  ---
534
534
 
@@ -543,14 +543,14 @@ These rules establish how much margin should exist between and around elements.
543
543
  Use Default to communicate that the user has yet to enter a response, Negative to communicate when a user has entered an incorrect or incomplete response, and Notice when a user's response needs attention. Optionally, Intent Messages can be displayed to further communicate why a Negative or Notice intent was triggered. For more information see Intents.
544
544
 
545
545
  | Default | Negative | Negative + Intent Message | Notice | Notice + intent Message |
546
- | --- | --- | --- | --- | --- |
546
+ | ------- | -------- | ------------------------- | ------ | ----------------------- |
547
547
 
548
548
  ---
549
549
 
550
550
  ## Slider
551
551
 
552
- | | In Figma | | | Meets Accessibility | | | In Code |
553
- | --- | --- | --- | --- | --- | --- | --- | --- |
552
+ | | In Figma | | | Meets Accessibility | | | In Code |
553
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
554
554
 
555
555
  ### Live Instance
556
556
 
@@ -569,14 +569,14 @@ Sliders allow users to select specific values or a range of values to input. Opt
569
569
  Use when there is a specific datapoint or value within a dataset that the user is able to select.
570
570
 
571
571
  | No Tick Marks | Tick Marks |
572
- | --- | --- |
572
+ | ------------- | ---------- |
573
573
 
574
574
  #### Slider – Double-sided
575
575
 
576
576
  Use when users need the ability to select a range between two values within a dataset.
577
577
 
578
578
  | No Tick Marks | Tick Marks |
579
- | --- | --- |
579
+ | ------------- | ---------- |
580
580
 
581
581
  ---
582
582
 
@@ -588,8 +588,8 @@ These rules establish how much margin should exist between and around elements.
588
588
 
589
589
  ## Toggle Input
590
590
 
591
- | | In Figma | | | Meets Accessibility | | | In Code |
592
- | --- | --- | --- | --- | --- | --- | --- | --- |
591
+ | | In Figma | | | Meets Accessibility | | | In Code |
592
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
593
593
 
594
594
  ### Live Instance
595
595
 
@@ -604,7 +604,7 @@ Default
604
604
  Toggle Inputs allow users to indicate true or false as part of a form or flip a setting or option from off to on (and vise versa). For toggling visibility of UI elements (like Panels), use a Toggle Button.
605
605
 
606
606
  | Default | Hover | Disabled |
607
- | --- | --- | --- |
607
+ | ------- | ----- | -------- |
608
608
 
609
609
  ---
610
610
 
@@ -616,12 +616,12 @@ These rules establish how much margin should exist between and around elements.
616
616
 
617
617
  ## Control Input Components
618
618
 
619
- | There are a range of Control Input components available to use depending on the type of action or response the application needs from the user. | | **Jump to component:** InputCheckbox InputRadio InputSlider InputToggle |
620
- | --- | --- | --- |
619
+ | There are a range of Control Input components available to use depending on the type of action or response the application needs from the user. | | **Jump to component:** InputCheckbox InputRadio InputSlider InputToggle |
620
+ | ----------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------------------------------------------- |
621
621
 
622
622
  ### Visual Preview
623
623
 
624
- >**Note:** The code examples below must install dependencies before displaying and may take extra time to load
624
+ > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
625
625
 
626
626
  ---
627
627
 
@@ -635,14 +635,14 @@ The component's source code in the SDS codebase can be found here.
635
635
 
636
636
  The following props and options differ in how they function across the MUI `Checkbox` component and the SDS `InputCheckbox` component:
637
637
 
638
- * **`size`****:** Has no effect in SDS
639
- * **`color`****:** Has no effect in SDS
640
- * **`labelPlacement`****:** Has no effect in SDS
641
- * **`icon`****:** SDS's `InputCheckbox` is not currently set up to support icons (if you add one as shown in the MUI documentation, it will replace the empty checkbox square, but clicking the icon will result in the checked checkbox square appearing in the icon's place)
642
- * **`stage`** **and checkbox state :** This is the SDS prop that sets the checkbox's state as `unchecked`, `checked`, or `indeterminate`. If `stage` is set, interacting with the component has no effect in changing the checkbox state. By contrast, MUI has a boolean `defaultChecked` prop that sets the checkbox's state and *does* allow the user to interact to change the state.
643
- * **`caption`****:** This is an SDS-specific prop, which takes a string of text that is displayed below the primary `label` text.
638
+ - **`size`\*\***:\*\* Has no effect in SDS
639
+ - **`color`\*\***:\*\* Has no effect in SDS
640
+ - **`labelPlacement`\*\***:\*\* Has no effect in SDS
641
+ - **`icon`\*\***:\*\* SDS's `InputCheckbox` is not currently set up to support icons (if you add one as shown in the MUI documentation, it will replace the empty checkbox square, but clicking the icon will result in the checked checkbox square appearing in the icon's place)
642
+ - **`stage`** **and checkbox state :** This is the SDS prop that sets the checkbox's state as `unchecked`, `checked`, or `indeterminate`. If `stage` is set, interacting with the component has no effect in changing the checkbox state. By contrast, MUI has a boolean `defaultChecked` prop that sets the checkbox's state and _does_ allow the user to interact to change the state.
643
+ - **`caption`\*\***:\*\* This is an SDS-specific prop, which takes a string of text that is displayed below the primary `label` text.
644
644
 
645
- The following props are available for both the MUI and SDS components: **`required`**, **`disabled`**, and **`indeterminate`****.**
645
+ The following props are available for both the MUI and SDS components: **`required`**, **`disabled`**, and **`indeterminate`\*\***.\*\*
646
646
 
647
647
  ### MUI Documentation
648
648
 
@@ -652,14 +652,14 @@ Documentation for the underlying MUI component can be found here.
652
652
 
653
653
  Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
654
654
 
655
- | Name | Type | Default | Description |
656
- | --- | --- | --- | --- |
657
- | `caption` | `string` | `-` | The caption of the InputCheckbox appears beneath the label in a lighter text color. |
658
- | `checkboxProps` | `Partial<MUICheckboxProps>` | `{}` | Directly pass these props to the underlying MUI checkbox. |
659
- | `label` | `string` | `-` | The label of the InputCheckbox. |
660
- | `stage` | `"checked"` `| "unchecked"` `| "indeterminate"` | | Defines the stage or state of the checkbox. |
661
- | `intent` | `"default"` `| "notice"` `| "negative"` `| "positive"` | `"default"` | Defines the color of the `InputCheckbox` |
662
- | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
655
+ | Name | Type | Default | Description |
656
+ | --------------- | --------------------------- | -------------- | ----------------------------------------------------------------------------------- | ----------- | ------------------------------------------- | ---------------------------------------- |
657
+ | `caption` | `string` | `-` | The caption of the InputCheckbox appears beneath the label in a lighter text color. |
658
+ | `checkboxProps` | `Partial<MUICheckboxProps>` | `{}` | Directly pass these props to the underlying MUI checkbox. |
659
+ | `label` | `string` | `-` | The label of the InputCheckbox. |
660
+ | `stage` | `"checked"` ` | "unchecked"` ` | "indeterminate"` | | Defines the stage or state of the checkbox. |
661
+ | `intent` | `"default"` ` | "notice"` ` | "negative"` ` | "positive"` | `"default"` | Defines the color of the `InputCheckbox` |
662
+ | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
663
663
 
664
664
  ### Code examples
665
665
 
@@ -692,13 +692,11 @@ h1 {
692
692
 
693
693
  ```json
694
694
  {
695
- "include": [
696
- "./**/*"
697
- ],
695
+ "include": ["./**/*"],
698
696
  "compilerOptions": {
699
697
  "strict": true,
700
698
  "esModuleInterop": true,
701
- "lib": [ "dom", "es2015" ],
699
+ "lib": ["dom", "es2015"],
702
700
  "jsx": "react-jsx"
703
701
  }
704
702
  }
@@ -713,9 +711,7 @@ import "./styles.css";
713
711
  function App() {
714
712
  return (
715
713
  <div className="app">
716
- <InputCheckbox
717
- label="Label"
718
- />
714
+ <InputCheckbox label="Label" />
719
715
  </div>
720
716
  );
721
717
  }
@@ -760,13 +756,12 @@ root.render(
760
756
  <RootApp />
761
757
  </React.StrictMode>
762
758
  );
763
-
764
759
  ```
765
760
 
766
761
  **/public/index.html**
767
762
 
768
763
  ```html
769
- <!DOCTYPE html>
764
+ <!doctype html>
770
765
  <html lang="en">
771
766
  <head>
772
767
  <meta charset="UTF-8" />
@@ -787,13 +782,24 @@ root.render(
787
782
  <div id="root"></div>
788
783
  </body>
789
784
  </html>
790
-
791
785
  ```
792
786
 
793
787
  **/package.json**
794
788
 
795
789
  ```json
796
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
790
+ {
791
+ "dependencies": {
792
+ "react": "^18.0.0",
793
+ "react-dom": "^18.0.0",
794
+ "react-scripts": "^4.0.0"
795
+ },
796
+ "devDependencies": {
797
+ "@types/react": "^18.0.0",
798
+ "@types/react-dom": "^18.0.0",
799
+ "typescript": "^4.0.0"
800
+ },
801
+ "main": "/index.tsx"
802
+ }
797
803
  ```
798
804
 
799
805
  ---
@@ -827,13 +833,11 @@ h1 {
827
833
 
828
834
  ```json
829
835
  {
830
- "include": [
831
- "./**/*"
832
- ],
836
+ "include": ["./**/*"],
833
837
  "compilerOptions": {
834
838
  "strict": true,
835
839
  "esModuleInterop": true,
836
- "lib": [ "dom", "es2015" ],
840
+ "lib": ["dom", "es2015"],
837
841
  "jsx": "react-jsx"
838
842
  }
839
843
  }
@@ -848,10 +852,7 @@ import "./styles.css";
848
852
  function App() {
849
853
  return (
850
854
  <div className="app">
851
- <InputCheckbox
852
- caption="Caption"
853
- label="Label"
854
- />
855
+ <InputCheckbox caption="Caption" label="Label" />
855
856
  </div>
856
857
  );
857
858
  }
@@ -896,13 +897,12 @@ root.render(
896
897
  <RootApp />
897
898
  </React.StrictMode>
898
899
  );
899
-
900
900
  ```
901
901
 
902
902
  **/public/index.html**
903
903
 
904
904
  ```html
905
- <!DOCTYPE html>
905
+ <!doctype html>
906
906
  <html lang="en">
907
907
  <head>
908
908
  <meta charset="UTF-8" />
@@ -923,13 +923,24 @@ root.render(
923
923
  <div id="root"></div>
924
924
  </body>
925
925
  </html>
926
-
927
926
  ```
928
927
 
929
928
  **/package.json**
930
929
 
931
930
  ```json
932
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
931
+ {
932
+ "dependencies": {
933
+ "react": "^18.0.0",
934
+ "react-dom": "^18.0.0",
935
+ "react-scripts": "^4.0.0"
936
+ },
937
+ "devDependencies": {
938
+ "@types/react": "^18.0.0",
939
+ "@types/react-dom": "^18.0.0",
940
+ "typescript": "^4.0.0"
941
+ },
942
+ "main": "/index.tsx"
943
+ }
933
944
  ```
934
945
 
935
946
  ---
@@ -963,13 +974,11 @@ h1 {
963
974
 
964
975
  ```json
965
976
  {
966
- "include": [
967
- "./**/*"
968
- ],
977
+ "include": ["./**/*"],
969
978
  "compilerOptions": {
970
979
  "strict": true,
971
980
  "esModuleInterop": true,
972
- "lib": [ "dom", "es2015" ],
981
+ "lib": ["dom", "es2015"],
973
982
  "jsx": "react-jsx"
974
983
  }
975
984
  }
@@ -1072,13 +1081,12 @@ root.render(
1072
1081
  <RootApp />
1073
1082
  </React.StrictMode>
1074
1083
  );
1075
-
1076
1084
  ```
1077
1085
 
1078
1086
  **/public/index.html**
1079
1087
 
1080
1088
  ```html
1081
- <!DOCTYPE html>
1089
+ <!doctype html>
1082
1090
  <html lang="en">
1083
1091
  <head>
1084
1092
  <meta charset="UTF-8" />
@@ -1099,13 +1107,24 @@ root.render(
1099
1107
  <div id="root"></div>
1100
1108
  </body>
1101
1109
  </html>
1102
-
1103
1110
  ```
1104
1111
 
1105
1112
  **/package.json**
1106
1113
 
1107
1114
  ```json
1108
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
1115
+ {
1116
+ "dependencies": {
1117
+ "react": "^18.0.0",
1118
+ "react-dom": "^18.0.0",
1119
+ "react-scripts": "^4.0.0"
1120
+ },
1121
+ "devDependencies": {
1122
+ "@types/react": "^18.0.0",
1123
+ "@types/react-dom": "^18.0.0",
1124
+ "typescript": "^4.0.0"
1125
+ },
1126
+ "main": "/index.tsx"
1127
+ }
1109
1128
  ```
1110
1129
 
1111
1130
  ---
@@ -1122,11 +1141,11 @@ The component's source code in the SDS codebase can be found here.
1122
1141
 
1123
1142
  The following props and options differ in whether and how they function across MUI versus SDS's `InputRadio` component:
1124
1143
 
1125
- * **`size`****:** Has no effect in SDS
1126
- * **`color`****:** Has no effect in SDS
1127
- * **`labelPlacement`****:** Has no effect in SDS
1128
- * **`caption`****:** This is an SDS-specific prop, which takes a string of text that is desplayed below the primary `label` text.
1129
- * **`row`****:** This boolean prop functions the same for both MUI and SDS's `InputRadio` component: its presence reformats the radio buttons (and their labels) within the `RadioGroup` parent component into a horizontal row.
1144
+ - **`size`\*\***:\*\* Has no effect in SDS
1145
+ - **`color`\*\***:\*\* Has no effect in SDS
1146
+ - **`labelPlacement`\*\***:\*\* Has no effect in SDS
1147
+ - **`caption`\*\***:\*\* This is an SDS-specific prop, which takes a string of text that is desplayed below the primary `label` text.
1148
+ - **`row`\*\***:\*\* This boolean prop functions the same for both MUI and SDS's `InputRadio` component: its presence reformats the radio buttons (and their labels) within the `RadioGroup` parent component into a horizontal row.
1130
1149
 
1131
1150
  ### MUI Documentation
1132
1151
 
@@ -1136,14 +1155,14 @@ Documentation for the underlying MUI component can be found here.
1136
1155
 
1137
1156
  Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
1138
1157
 
1139
- | Name | Type | Default | Description |
1140
- | --- | --- | --- | --- |
1141
- | `caption` | `string` | - | The caption of the InputRadio appears beneath the label in a lighter text color. |
1142
- | `label` | `string` | - | The label of the InputCheckbox. |
1143
- | `radioProps` | `Partial<MUIRadioProps>` | `{}` | Directly pass these props to the underlying MUI radio. |
1144
- | `stage` | `"checked" | "unchecked"` | `unchecked` | The stage of the radio input. |
1145
- | `intent` | `"default"` `| "notice"` `| "negative"` `| "positive"` | `"default"` | Defines the color of the `InputRadio` |
1146
- | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
1158
+ | Name | Type | Default | Description |
1159
+ | ------------ | ------------------------ | ------------ | -------------------------------------------------------------------------------- | ----------------------------- | ----------- | ------------------------------------- |
1160
+ | `caption` | `string` | - | The caption of the InputRadio appears beneath the label in a lighter text color. |
1161
+ | `label` | `string` | - | The label of the InputCheckbox. |
1162
+ | `radioProps` | `Partial<MUIRadioProps>` | `{}` | Directly pass these props to the underlying MUI radio. |
1163
+ | `stage` | `"checked" | "unchecked"` | `unchecked` | The stage of the radio input. |
1164
+ | `intent` | `"default"` ` | "notice"` ` | "negative"` ` | "positive"` | `"default"` | Defines the color of the `InputRadio` |
1165
+ | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
1147
1166
 
1148
1167
  ### Code examples
1149
1168
 
@@ -1176,13 +1195,11 @@ h1 {
1176
1195
 
1177
1196
  ```json
1178
1197
  {
1179
- "include": [
1180
- "./**/*"
1181
- ],
1198
+ "include": ["./**/*"],
1182
1199
  "compilerOptions": {
1183
1200
  "strict": true,
1184
1201
  "esModuleInterop": true,
1185
- "lib": [ "dom", "es2015" ],
1202
+ "lib": ["dom", "es2015"],
1186
1203
  "jsx": "react-jsx"
1187
1204
  }
1188
1205
  }
@@ -1197,9 +1214,7 @@ import "./styles.css";
1197
1214
  function App() {
1198
1215
  return (
1199
1216
  <div className="app">
1200
- <InputRadio
1201
- label="Label"
1202
- />
1217
+ <InputRadio label="Label" />
1203
1218
  </div>
1204
1219
  );
1205
1220
  }
@@ -1244,13 +1259,12 @@ root.render(
1244
1259
  <RootApp />
1245
1260
  </React.StrictMode>
1246
1261
  );
1247
-
1248
1262
  ```
1249
1263
 
1250
1264
  **/public/index.html**
1251
1265
 
1252
1266
  ```html
1253
- <!DOCTYPE html>
1267
+ <!doctype html>
1254
1268
  <html lang="en">
1255
1269
  <head>
1256
1270
  <meta charset="UTF-8" />
@@ -1271,13 +1285,24 @@ root.render(
1271
1285
  <div id="root"></div>
1272
1286
  </body>
1273
1287
  </html>
1274
-
1275
1288
  ```
1276
1289
 
1277
1290
  **/package.json**
1278
1291
 
1279
1292
  ```json
1280
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
1293
+ {
1294
+ "dependencies": {
1295
+ "react": "^18.0.0",
1296
+ "react-dom": "^18.0.0",
1297
+ "react-scripts": "^4.0.0"
1298
+ },
1299
+ "devDependencies": {
1300
+ "@types/react": "^18.0.0",
1301
+ "@types/react-dom": "^18.0.0",
1302
+ "typescript": "^4.0.0"
1303
+ },
1304
+ "main": "/index.tsx"
1305
+ }
1281
1306
  ```
1282
1307
 
1283
1308
  ---
@@ -1311,13 +1336,11 @@ h1 {
1311
1336
 
1312
1337
  ```json
1313
1338
  {
1314
- "include": [
1315
- "./**/*"
1316
- ],
1339
+ "include": ["./**/*"],
1317
1340
  "compilerOptions": {
1318
1341
  "strict": true,
1319
1342
  "esModuleInterop": true,
1320
- "lib": [ "dom", "es2015" ],
1343
+ "lib": ["dom", "es2015"],
1321
1344
  "jsx": "react-jsx"
1322
1345
  }
1323
1346
  }
@@ -1332,10 +1355,7 @@ import "./styles.css";
1332
1355
  function App() {
1333
1356
  return (
1334
1357
  <div className="app">
1335
- <InputRadio
1336
- caption="Caption"
1337
- label="Label"
1338
- />
1358
+ <InputRadio caption="Caption" label="Label" />
1339
1359
  </div>
1340
1360
  );
1341
1361
  }
@@ -1380,13 +1400,12 @@ root.render(
1380
1400
  <RootApp />
1381
1401
  </React.StrictMode>
1382
1402
  );
1383
-
1384
1403
  ```
1385
1404
 
1386
1405
  **/public/index.html**
1387
1406
 
1388
1407
  ```html
1389
- <!DOCTYPE html>
1408
+ <!doctype html>
1390
1409
  <html lang="en">
1391
1410
  <head>
1392
1411
  <meta charset="UTF-8" />
@@ -1407,13 +1426,24 @@ root.render(
1407
1426
  <div id="root"></div>
1408
1427
  </body>
1409
1428
  </html>
1410
-
1411
1429
  ```
1412
1430
 
1413
1431
  **/package.json**
1414
1432
 
1415
1433
  ```json
1416
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
1434
+ {
1435
+ "dependencies": {
1436
+ "react": "^18.0.0",
1437
+ "react-dom": "^18.0.0",
1438
+ "react-scripts": "^4.0.0"
1439
+ },
1440
+ "devDependencies": {
1441
+ "@types/react": "^18.0.0",
1442
+ "@types/react-dom": "^18.0.0",
1443
+ "typescript": "^4.0.0"
1444
+ },
1445
+ "main": "/index.tsx"
1446
+ }
1417
1447
  ```
1418
1448
 
1419
1449
  ---
@@ -1430,15 +1460,15 @@ The component's source code in the SDS codebase can be found here.
1430
1460
 
1431
1461
  The following props and options differ in how they function across MUI's `Switch` component versus SDS's `InputToggle` component:
1432
1462
 
1433
- * **`size`****:** Has no effect in SDS
1434
- * **`color`****:** Has no effect in SDS
1463
+ - **`size`\*\***:\*\* Has no effect in SDS
1464
+ - **`color`\*\***:\*\* Has no effect in SDS
1435
1465
 
1436
- These are some of the common props that can be used for both the MUI `Switch` component and the SDS `InputToggle` component:
1466
+ These are some of the common props that can be used for both the MUI `Switch` component and the SDS `InputToggle` component:
1437
1467
 
1438
- * **`step`****:** Sets the step distance between selectable stops (and relatedly, if this prop is left out, the toggle is continuous, rather than discrete)
1439
- * **`marks`****:** When present and set to true, invokes the default marks style. When passed a rich array (of objects containing the value and the custom label to show at that value), sets marks and labels only at the positions specified by the array. See the "InputSlider with custom Marks" example below.
1440
- * **`valueLabelDisplay`****:** This prop determines whether and when the value label is displayed, and takes the following props: `auto` (the value label will display when the thumb is hovered or focused), `on` (default; labels display persistently), or `off` (labels are never displayed).
1441
- * **`orientation`****:** This prop controls which direction the slider is shown: `horizontal` (default) or `vertical`
1468
+ - **`step`\*\***:\*\* Sets the step distance between selectable stops (and relatedly, if this prop is left out, the toggle is continuous, rather than discrete)
1469
+ - **`marks`\*\***:\*\* When present and set to true, invokes the default marks style. When passed a rich array (of objects containing the value and the custom label to show at that value), sets marks and labels only at the positions specified by the array. See the "InputSlider with custom Marks" example below.
1470
+ - **`valueLabelDisplay`\*\***:\*\* This prop determines whether and when the value label is displayed, and takes the following props: `auto` (the value label will display when the thumb is hovered or focused), `on` (default; labels display persistently), or `off` (labels are never displayed).
1471
+ - **`orientation`\*\***:\*\* This prop controls which direction the slider is shown: `horizontal` (default) or `vertical`
1442
1472
 
1443
1473
  ### MUI Documentation
1444
1474
 
@@ -1448,16 +1478,16 @@ Documentation for the underlying MUI component can be found here.
1448
1478
 
1449
1479
  Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
1450
1480
 
1451
- | Name | Type | Default | Description |
1452
- | --- | --- | --- | --- |
1453
- | `defaultValue` | `Array<number> | number` | - | The default value. Use when the component is not controlled. |
1454
- | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
1455
- | `marks` | `bool` | `false` | Marks indicate predetermined values to which the user can move the slider. If true the marks are spaced according the value of the step prop. If an array, it should contain objects with value and an optional label keys. |
1456
- | `max` | `number` | `100` | The maximum allowed value of the slider. Should not be equal to min. |
1457
- | `min` | `number` | `0` | The minimum allowed value of the slider. Should not be equal to max. |
1458
- | `orientation` | `"horizontal"` | `horizontal` | The component orientation. |
1459
- | `step` | `number` | `1` | The granularity with which the slider can step through values. (A "discrete" slider.) The `min` prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible by the step. When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop. |
1460
- | `valueLabelDisplay` | `"auto"` `| "off"` `| "on"` | `off` | Controls when the value label is displayed: `auto`. the value label will display when the thumb is hovered or focused. . `on`. will display persistently. . `off`. will never display. |
1481
+ | Name | Type | Default | Description |
1482
+ | ------------------- | -------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1483
+ | `defaultValue` | `Array<number> |  number` | - | The default value. Use when the component is not controlled. |
1484
+ | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
1485
+ | `marks` | `bool` | `false` | Marks indicate predetermined values to which the user can move the slider. If true the marks are spaced according the value of the step prop. If an array, it should contain objects with value and an optional label keys. |
1486
+ | `max` | `number` | `100` | The maximum allowed value of the slider. Should not be equal to min. |
1487
+ | `min` | `number` | `0` | The minimum allowed value of the slider. Should not be equal to max. |
1488
+ | `orientation` | `"horizontal"` | `horizontal` | The component orientation. |
1489
+ | `step` | `number` | `1` | The granularity with which the slider can step through values. (A "discrete" slider.) The `min` prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible by the step. When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop. |
1490
+ | `valueLabelDisplay` | `"auto"` ` |  "off"` ` |  "on"` | `off` | Controls when the value label is displayed: `auto`. the value label will display when the thumb is hovered or focused. . `on`. will display persistently. . `off`. will never display. |
1461
1491
 
1462
1492
  ### Code examples
1463
1493
 
@@ -1490,13 +1520,11 @@ h1 {
1490
1520
 
1491
1521
  ```json
1492
1522
  {
1493
- "include": [
1494
- "./**/*"
1495
- ],
1523
+ "include": ["./**/*"],
1496
1524
  "compilerOptions": {
1497
1525
  "strict": true,
1498
1526
  "esModuleInterop": true,
1499
- "lib": [ "dom", "es2015" ],
1527
+ "lib": ["dom", "es2015"],
1500
1528
  "jsx": "react-jsx"
1501
1529
  }
1502
1530
  }
@@ -1513,9 +1541,7 @@ function App() {
1513
1541
  return (
1514
1542
  <div className="app">
1515
1543
  <Box sx={{ width: 200 }}>
1516
- <InputSlider
1517
- label="Label"
1518
- />
1544
+ <InputSlider label="Label" />
1519
1545
  </Box>
1520
1546
  </div>
1521
1547
  );
@@ -1561,13 +1587,12 @@ root.render(
1561
1587
  <RootApp />
1562
1588
  </React.StrictMode>
1563
1589
  );
1564
-
1565
1590
  ```
1566
1591
 
1567
1592
  **/public/index.html**
1568
1593
 
1569
1594
  ```html
1570
- <!DOCTYPE html>
1595
+ <!doctype html>
1571
1596
  <html lang="en">
1572
1597
  <head>
1573
1598
  <meta charset="UTF-8" />
@@ -1588,20 +1613,31 @@ root.render(
1588
1613
  <div id="root"></div>
1589
1614
  </body>
1590
1615
  </html>
1591
-
1592
1616
  ```
1593
1617
 
1594
1618
  **/package.json**
1595
1619
 
1596
1620
  ```json
1597
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
1621
+ {
1622
+ "dependencies": {
1623
+ "react": "^18.0.0",
1624
+ "react-dom": "^18.0.0",
1625
+ "react-scripts": "^4.0.0"
1626
+ },
1627
+ "devDependencies": {
1628
+ "@types/react": "^18.0.0",
1629
+ "@types/react-dom": "^18.0.0",
1630
+ "typescript": "^4.0.0"
1631
+ },
1632
+ "main": "/index.tsx"
1633
+ }
1598
1634
  ```
1599
1635
 
1600
1636
  ---
1601
1637
 
1602
1638
  #### InputSlider with custom Marks
1603
1639
 
1604
- This example shows an `InputSlider` component that features custom marks precisely positioned at `0%`, `50%`, and `100%` of the slider's value.
1640
+ This example shows an `InputSlider` component that features custom marks precisely positioned at `0%`, `50%`, and `100%` of the slider's value.
1605
1641
 
1606
1642
  **/styles.css**
1607
1643
 
@@ -1628,13 +1664,11 @@ h1 {
1628
1664
 
1629
1665
  ```json
1630
1666
  {
1631
- "include": [
1632
- "./**/*"
1633
- ],
1667
+ "include": ["./**/*"],
1634
1668
  "compilerOptions": {
1635
1669
  "strict": true,
1636
1670
  "esModuleInterop": true,
1637
- "lib": [ "dom", "es2015" ],
1671
+ "lib": ["dom", "es2015"],
1638
1672
  "jsx": "react-jsx"
1639
1673
  }
1640
1674
  }
@@ -1721,13 +1755,12 @@ root.render(
1721
1755
  <RootApp />
1722
1756
  </React.StrictMode>
1723
1757
  );
1724
-
1725
1758
  ```
1726
1759
 
1727
1760
  **/public/index.html**
1728
1761
 
1729
1762
  ```html
1730
- <!DOCTYPE html>
1763
+ <!doctype html>
1731
1764
  <html lang="en">
1732
1765
  <head>
1733
1766
  <meta charset="UTF-8" />
@@ -1748,13 +1781,24 @@ root.render(
1748
1781
  <div id="root"></div>
1749
1782
  </body>
1750
1783
  </html>
1751
-
1752
1784
  ```
1753
1785
 
1754
1786
  **/package.json**
1755
1787
 
1756
1788
  ```json
1757
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
1789
+ {
1790
+ "dependencies": {
1791
+ "react": "^18.0.0",
1792
+ "react-dom": "^18.0.0",
1793
+ "react-scripts": "^4.0.0"
1794
+ },
1795
+ "devDependencies": {
1796
+ "@types/react": "^18.0.0",
1797
+ "@types/react-dom": "^18.0.0",
1798
+ "typescript": "^4.0.0"
1799
+ },
1800
+ "main": "/index.tsx"
1801
+ }
1758
1802
  ```
1759
1803
 
1760
1804
  ---
@@ -1771,10 +1815,10 @@ The component's source code in the SDS codebase can be found here.
1771
1815
 
1772
1816
  The following props and options differ and how they function across the MUI `Switch` component and the SDS `InputToggle` component:
1773
1817
 
1774
- * **`size`****:** Has no effect in SDS
1775
- * **`color`****:** Has no effect in SDS
1776
- * **`label`** **and** **`labelPlacement`****:** Has no effect in SDS
1777
- * The **`required`** prop is available for both the MUI and SDS components.
1818
+ - **`size`\*\***:\*\* Has no effect in SDS
1819
+ - **`color`\*\***:\*\* Has no effect in SDS
1820
+ - **`label`** **and** **`labelPlacement`\*\***:\*\* Has no effect in SDS
1821
+ - The **`required`** prop is available for both the MUI and SDS components.
1778
1822
 
1779
1823
  ### MUI Documentation
1780
1824
 
@@ -1784,13 +1828,13 @@ Documentation for the underlying MUI component can be found here.
1784
1828
 
1785
1829
  Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
1786
1830
 
1787
- | Name | Type | Default | Description |
1788
- | --- | --- | --- | --- |
1789
- | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
1831
+ | Name | Type | Default | Description |
1832
+ | ---------- | -------- | ------- | ------------------------------------------------------- |
1833
+ | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
1790
1834
  | `offLabel` | `string` | `"Off"` | The text displayed within the InputToggle when it's off |
1791
- | `onChange` | `func` | | Sets what happens when a user toggles on the component. |
1792
- | `onLabel` | `string` | `"On"` | The text displayed within the InputToggle when it's off |
1793
- | `width` | `number` | `62` | Controls the `width` of the InputToggle element. |
1835
+ | `onChange` | `func` | | Sets what happens when a user toggles on the component. |
1836
+ | `onLabel` | `string` | `"On"` | The text displayed within the InputToggle when it's off |
1837
+ | `width` | `number` | `62` | Controls the `width` of the InputToggle element. |
1794
1838
 
1795
1839
  ### Code examples
1796
1840
 
@@ -1823,13 +1867,11 @@ h1 {
1823
1867
 
1824
1868
  ```json
1825
1869
  {
1826
- "include": [
1827
- "./**/*"
1828
- ],
1870
+ "include": ["./**/*"],
1829
1871
  "compilerOptions": {
1830
1872
  "strict": true,
1831
1873
  "esModuleInterop": true,
1832
- "lib": [ "dom", "es2015" ],
1874
+ "lib": ["dom", "es2015"],
1833
1875
  "jsx": "react-jsx"
1834
1876
  }
1835
1877
  }
@@ -1889,13 +1931,12 @@ root.render(
1889
1931
  <RootApp />
1890
1932
  </React.StrictMode>
1891
1933
  );
1892
-
1893
1934
  ```
1894
1935
 
1895
1936
  **/public/index.html**
1896
1937
 
1897
1938
  ```html
1898
- <!DOCTYPE html>
1939
+ <!doctype html>
1899
1940
  <html lang="en">
1900
1941
  <head>
1901
1942
  <meta charset="UTF-8" />
@@ -1916,13 +1957,24 @@ root.render(
1916
1957
  <div id="root"></div>
1917
1958
  </body>
1918
1959
  </html>
1919
-
1920
1960
  ```
1921
1961
 
1922
1962
  **/package.json**
1923
1963
 
1924
1964
  ```json
1925
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
1965
+ {
1966
+ "dependencies": {
1967
+ "react": "^18.0.0",
1968
+ "react-dom": "^18.0.0",
1969
+ "react-scripts": "^4.0.0"
1970
+ },
1971
+ "devDependencies": {
1972
+ "@types/react": "^18.0.0",
1973
+ "@types/react-dom": "^18.0.0",
1974
+ "typescript": "^4.0.0"
1975
+ },
1976
+ "main": "/index.tsx"
1977
+ }
1926
1978
  ```
1927
1979
 
1928
1980
  ---
@@ -1956,13 +2008,11 @@ h1 {
1956
2008
 
1957
2009
  ```json
1958
2010
  {
1959
- "include": [
1960
- "./**/*"
1961
- ],
2011
+ "include": ["./**/*"],
1962
2012
  "compilerOptions": {
1963
2013
  "strict": true,
1964
2014
  "esModuleInterop": true,
1965
- "lib": [ "dom", "es2015" ],
2015
+ "lib": ["dom", "es2015"],
1966
2016
  "jsx": "react-jsx"
1967
2017
  }
1968
2018
  }
@@ -1977,11 +2027,7 @@ import "./styles.css";
1977
2027
  function App() {
1978
2028
  return (
1979
2029
  <div className="app">
1980
- <InputToggle
1981
- onLabel="Start"
1982
- offLabel="Finish"
1983
- width={72}
1984
- />
2030
+ <InputToggle onLabel="Start" offLabel="Finish" width={72} />
1985
2031
  </div>
1986
2032
  );
1987
2033
  }
@@ -2026,13 +2072,12 @@ root.render(
2026
2072
  <RootApp />
2027
2073
  </React.StrictMode>
2028
2074
  );
2029
-
2030
2075
  ```
2031
2076
 
2032
2077
  **/public/index.html**
2033
2078
 
2034
2079
  ```html
2035
- <!DOCTYPE html>
2080
+ <!doctype html>
2036
2081
  <html lang="en">
2037
2082
  <head>
2038
2083
  <meta charset="UTF-8" />
@@ -2053,14 +2098,24 @@ root.render(
2053
2098
  <div id="root"></div>
2054
2099
  </body>
2055
2100
  </html>
2056
-
2057
2101
  ```
2058
2102
 
2059
2103
  **/package.json**
2060
2104
 
2061
2105
  ```json
2062
- {"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
2106
+ {
2107
+ "dependencies": {
2108
+ "react": "^18.0.0",
2109
+ "react-dom": "^18.0.0",
2110
+ "react-scripts": "^4.0.0"
2111
+ },
2112
+ "devDependencies": {
2113
+ "@types/react": "^18.0.0",
2114
+ "@types/react-dom": "^18.0.0",
2115
+ "typescript": "^4.0.0"
2116
+ },
2117
+ "main": "/index.tsx"
2118
+ }
2063
2119
  ```
2064
2120
 
2065
2121
  ---
2066
-