@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
@@ -4,8 +4,8 @@ The Dropdown Input is an element that triggers Dropdown Menus to open, enabling
4
4
 
5
5
  ## Overview
6
6
 
7
- | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
8
- | --- | --- | --- | --- | --- | --- | --- | --- |
7
+ | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
8
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
9
9
 
10
10
  Dropdown Inputs are always accompanied by a Dropdown Menu which is triggered by the user clicking on the input.
11
11
 
@@ -14,7 +14,7 @@ The Dropdown Input is used on napari hub as part of plugin Filters, enabling use
14
14
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
15
15
 
16
16
  | **Default** | **Hover** | **Open** | **Disabled** |
17
- | --- | --- | --- | --- |
17
+ | ----------- | --------- | -------- | ------------ |
18
18
 
19
19
  ---
20
20
 
@@ -22,26 +22,26 @@ Click on each state below to enter inspect view and get details on its code attr
22
22
 
23
23
  These rules establish how much margin should exist between and around elements.
24
24
 
25
-  
26
25
 
27
-  
26
+
27
+
28
28
 
29
29
  ## Code
30
30
 
31
31
  ## Dropdown Input Component
32
32
 
33
- | Below you will find an interactive Storybook iframe for Dropdown Inputs. 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:** InputDropdown |
34
- | --- | --- | --- |
33
+ | Below you will find an interactive Storybook iframe for Dropdown Inputs. 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:** InputDropdown |
34
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------ |
35
35
 
36
36
  ---
37
37
 
38
- >This component appears as it is 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.
38
+ > This component appears as it is 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.
39
39
 
40
40
  ### InputDropdown
41
41
 
42
42
  Storybook
43
43
 
44
-  
44
+
45
45
 
46
46
  ---
47
47
 
@@ -51,8 +51,8 @@ Dropdown Inputs are elements that trigger Dropdown Menus to open, enabling users
51
51
 
52
52
  ## Dropdown Input Variants
53
53
 
54
- | There are three Dropdown Input variants available for designers to use depending on the placement location within the UI. Dropdown Inputs are always accompanied by a Dropdown Menu which is triggered by the user clicking on the input. Follow the usage criteria accompanying each variant as a guide for selecting the correct Dropdown Input for any given use case. | | **Jump to variant:** Rounded Square Minimal |
55
- | --- | --- | --- |
54
+ | There are three Dropdown Input variants available for designers to use depending on the placement location within the UI. Dropdown Inputs are always accompanied by a Dropdown Menu which is triggered by the user clicking on the input. Follow the usage criteria accompanying each variant as a guide for selecting the correct Dropdown Input for any given use case. | | **Jump to variant:** Rounded Square Minimal |
55
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------- |
56
56
 
57
57
  ### Visual Preview
58
58
 
@@ -62,8 +62,8 @@ Use the links below to jump to information on a specific Dropdown Input variant:
62
62
 
63
63
  ## Rounded Dropdown Input
64
64
 
65
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
66
- | --- | --- | --- | --- | --- | --- | --- | --- |
65
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
66
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
67
67
 
68
68
  ### Single-select Rounded Dropdown Input
69
69
 
@@ -76,10 +76,10 @@ Using the `details` prop, optional text can be added to the Input to communicate
76
76
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
77
77
 
78
78
  | **Default** | **Hover** | **Default** | **Open** | **Disabled** |
79
- | --- | --- | --- | --- | --- |
79
+ | ----------- | --------- | ----------- | -------- | ------------ |
80
80
 
81
81
  | **Default + Details** | **Hover** | **Default** | **Open** | **Disabled** |
82
- | --- | --- | --- | --- | --- |
82
+ | --------------------- | --------- | ----------- | -------- | ------------ |
83
83
 
84
84
  ### Multi-select Rounded Dropdown Input
85
85
 
@@ -92,10 +92,10 @@ Using the `details` prop, an optional counter can be added to the Input to commu
92
92
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
93
93
 
94
94
  | **Default** | **Hover** | **Default** | **Open** | **Disabled** |
95
- | --- | --- | --- | --- | --- |
95
+ | ----------- | --------- | ----------- | -------- | ------------ |
96
96
 
97
97
  | **Default + Details** | **Hover** | **Default** | **Open** | **Disabled** |
98
- | --- | --- | --- | --- | --- |
98
+ | --------------------- | --------- | ----------- | -------- | ------------ |
99
99
 
100
100
  ### Rounded Dropdown Input Intent States
101
101
 
@@ -110,7 +110,7 @@ Use `intent: warning` to communicate when a user needs to be alerted that their
110
110
  Each intent is demonstrated below using the Single-select Dropdown Input for reference; all variants follow the same pattern:
111
111
 
112
112
  | **Default** | **Error** | **Warning** |
113
- | --- | --- | --- |
113
+ | ----------- | --------- | ----------- |
114
114
 
115
115
  ---
116
116
 
@@ -122,12 +122,12 @@ These rules establish how much margin should exist between and around elements.
122
122
 
123
123
  ## Square Dropdown Input
124
124
 
125
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
126
- | --- | --- | --- | --- | --- | --- | --- | --- |
125
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
126
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
127
127
 
128
128
  ### Single-select Square Dropdown Input
129
129
 
130
- Use when the user is only able to select one option from a group of choices within the triggered Dropdown Menu.
130
+ Use when the user is only able to select one option from a group of choices within the triggered Dropdown Menu.
131
131
 
132
132
  Used within CZ ID on forms and Dialogs that contain menu options for users.
133
133
 
@@ -138,10 +138,10 @@ Note: `singleSelect` is the only `sdsType` prop value available for Square Dropd
138
138
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
139
139
 
140
140
  | **Default** | **Hover** | **Default** | **Open** | **Disabled** |
141
- | --- | --- | --- | --- | --- |
141
+ | ----------- | --------- | ----------- | -------- | ------------ |
142
142
 
143
143
  | **Default + Details** | **Hover** | **Default** | **Open** | **Disabled** |
144
- | --- | --- | --- | --- | --- |
144
+ | --------------------- | --------- | ----------- | -------- | ------------ |
145
145
 
146
146
  ### Square Dropdown Input Intent States
147
147
 
@@ -156,7 +156,7 @@ Use `intent: warning` to communicate when a user needs to be alerted that their
156
156
  Each intent is demonstrated below using the Single-select Dropdown Input for reference; all variants follow the same pattern:
157
157
 
158
158
  | **Default** | **Error** | **Warning** |
159
- | --- | --- | --- |
159
+ | ----------- | --------- | ----------- |
160
160
 
161
161
  ---
162
162
 
@@ -168,8 +168,8 @@ These rules establish how much margin should exist between and around elements.
168
168
 
169
169
  ## Minimal Dropdown Input
170
170
 
171
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
172
- | --- | --- | --- | --- | --- | --- | --- | --- |
171
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
172
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
173
173
 
174
174
  Use when the user is only able to select one option from a group of choices within the triggered Dropdown Menu.
175
175
 
@@ -180,7 +180,7 @@ Note: `singleSelect` is the only `sdsType` prop value available for Minimal Drop
180
180
  Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
181
181
 
182
182
  | **Default** | **Hover** | **Default** | **Open** | **Disabled** |
183
- | --- | --- | --- | --- | --- |
183
+ | ----------- | --------- | ----------- | -------- | ------------ |
184
184
 
185
185
  ### Minimal Dropdown Input Intent States
186
186
 
@@ -188,8 +188,8 @@ The `intent` prop is used to communicate the state of the user's response from t
188
188
 
189
189
  Use `intent: default` to communicate when a user has entered an accepted or complete response.
190
190
 
191
- | **Default** | | |
192
- | --- | --- | --- |
191
+ | **Default** | | |
192
+ | ----------- | --- | --- |
193
193
 
194
194
  ---
195
195
 
@@ -201,8 +201,8 @@ These rules establish how much margin should exist between and around elements.
201
201
 
202
202
  ## Dropdown Input Component
203
203
 
204
- | Below you will find an interactive Storybook iframe for Dropdown Inputs. 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:** InputDropdown |
205
- | --- | --- | --- |
204
+ | Below you will find an interactive Storybook iframe for Dropdown Inputs. 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:** InputDropdown |
205
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------ |
206
206
 
207
207
  ---
208
208
 
@@ -218,8 +218,8 @@ Dropdown Inputs are elements that trigger Dropdown Menus to open, enabling users
218
218
 
219
219
  ## Dropdown Input Component
220
220
 
221
- | | In Figma | | | Meets Accessibility | | | In Code |
222
- | --- | --- | --- | --- | --- | --- | --- | --- |
221
+ | | In Figma | | | Meets Accessibility | | | In Code |
222
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
223
223
 
224
224
  ### Dropdown Input Types
225
225
 
@@ -227,7 +227,7 @@ There are two Dropdown Input types designers can use depending on whether their
227
227
 
228
228
  On click, Dropdown Inputs always trigger a Dropdown Menu to open.
229
229
 
230
- >**Note:** The external field label shown as part of the Value variant visual below is for demonstration purposes only and is not built into the component itself; a separate label must be added to achieve this in product.
230
+ > **Note:** The external field label shown as part of the Value variant visual below is for demonstration purposes only and is not built into the component itself; a separate label must be added to achieve this in product.
231
231
 
232
232
  ---
233
233
 
@@ -250,31 +250,31 @@ Optionally, Intent Messages can be displayed to further communicate why a Negati
250
250
  #### Rounded
251
251
 
252
252
  | Default | Hover | Open | Disabled |
253
- | :---: | :---: | :---: | :---: |
253
+ | :-----: | :---: | :--: | :------: |
254
254
 
255
- *Intent Variations*
255
+ _Intent Variations_
256
256
 
257
257
  Use 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.
258
258
 
259
259
  | Negative | Negative + Intent Message | Notice | Notice + Intent Message |
260
- | :---: | --- | :---: | --- |
260
+ | :------: | ------------------------- | :----: | ----------------------- |
261
261
 
262
262
  #### Square
263
263
 
264
264
  | Default | Hover | Open | Disabled |
265
- | :---: | :---: | :---: | :---: |
265
+ | :-----: | :---: | :--: | :------: |
266
266
 
267
- *Intent Variations*
267
+ _Intent Variations_
268
268
 
269
269
  Use 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.
270
270
 
271
271
  | Negative | Negative + Intent Message | Notice | Notice + Intent Message |
272
- | :---: | --- | :---: | --- |
272
+ | :------: | ------------------------- | :----: | ----------------------- |
273
273
 
274
274
  #### Minimal
275
275
 
276
276
  | Default | Hover | Open | Disabled |
277
- | :---: | :---: | :---: | :---: |
277
+ | :-----: | :---: | :--: | :------: |
278
278
 
279
279
  ---
280
280
 
@@ -289,31 +289,31 @@ Optionally, Intent Messages can be displayed to further communicate why a Negati
289
289
  #### **Rounded**
290
290
 
291
291
  | Default | Hover | Open | Disabled |
292
- | :---: | :---: | :---: | :---: |
292
+ | :-----: | :---: | :--: | :------: |
293
293
 
294
- *Intent Variations*
294
+ _Intent Variations_
295
295
 
296
296
  Use 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.
297
297
 
298
298
  | Negative | Negative + Intent Message | Notice | Notice + Intent Message |
299
- | :---: | --- | :---: | --- |
299
+ | :------: | ------------------------- | :----: | ----------------------- |
300
300
 
301
301
  #### **Square**
302
302
 
303
303
  | Default | Hover | Open | Disabled |
304
- | :---: | :---: | :---: | :---: |
304
+ | :-----: | :---: | :--: | :------: |
305
305
 
306
- *Intent Variations*
306
+ _Intent Variations_
307
307
 
308
308
  Use 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.
309
309
 
310
310
  | Negative | Negative + Intent Message | Notice | Notice + Intent Message |
311
- | :---: | --- | :---: | --- |
311
+ | :------: | ------------------------- | :----: | ----------------------- |
312
312
 
313
313
  #### **Minimal**
314
314
 
315
315
  | Default | Hover | Open | Disabled |
316
- | :---: | :---: | :---: | :---: |
316
+ | :-----: | :---: | :--: | :------: |
317
317
 
318
318
  ---
319
319
 
@@ -321,11 +321,11 @@ Use Negative to communicate when a user has entered an incorrect or incomplete r
321
321
 
322
322
  These rules establish how much margin should exist between and around elements.
323
323
 
324
-  
324
+
325
325
 
326
326
  ## Code
327
327
 
328
- >**Note:** The code examples below must install dependencies before displaying and may take extra time to load
328
+ > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
329
329
 
330
330
  ## InputDropdown
331
331
 
@@ -337,10 +337,10 @@ The component's source code in the SDS codebase can be found here.
337
337
 
338
338
  The SDS's `InputDropdown` component utilizes MUI's `Button` component as its foundation but introduces some SDS-specific enhancements. Below, the key distinctions between the SDS's `InputDropdown` and MUI's `Button` are outlined:
339
339
 
340
- * **Variation**: MUI's `Button` offers a `variant` prop to define different visual styles for buttons. SDS's `InputDropdown`, however, uses the `sdsStyle` prop instead, providing the ability to select between three variants: `square`, `rounded`, or `minimal`.
341
- * **Color**: In MUI's `Button`, the button's color can be modified using the `color` prop. SDS's `InputDropdown` deviates from this and introduces the `intent` prop. This prop provides the ability to choose between `default`, `warning`, and `error` colors, depending on the state of the `InputDropdown`.
342
- * **Size**: While MUI's `Button` provides a `size` prop for adjusting the button's size, SDS's `InputDropdown` does not offer this capability. The size of the `InputDropdown` component remains fixed and cannot be altered through props.
343
- * **Icon**: Unlike MUI's `Button`, which supports custom icons, SDS's `InputDropdown` does not accept external icon components. Instead, SDS's `InputDropdown` incorporates a built-in Chevron icon, which is an integral part of the component and cannot be replaced.
340
+ - **Variation**: MUI's `Button` offers a `variant` prop to define different visual styles for buttons. SDS's `InputDropdown`, however, uses the `sdsStyle` prop instead, providing the ability to select between three variants: `square`, `rounded`, or `minimal`.
341
+ - **Color**: In MUI's `Button`, the button's color can be modified using the `color` prop. SDS's `InputDropdown` deviates from this and introduces the `intent` prop. This prop provides the ability to choose between `default`, `warning`, and `error` colors, depending on the state of the `InputDropdown`.
342
+ - **Size**: While MUI's `Button` provides a `size` prop for adjusting the button's size, SDS's `InputDropdown` does not offer this capability. The size of the `InputDropdown` component remains fixed and cannot be altered through props.
343
+ - **Icon**: Unlike MUI's `Button`, which supports custom icons, SDS's `InputDropdown` does not accept external icon components. Instead, SDS's `InputDropdown` incorporates a built-in Chevron icon, which is an integral part of the component and cannot be replaced.
344
344
 
345
345
  ### MUI Documentation
346
346
 
@@ -350,22 +350,22 @@ Documentation for the underlying MUI component can be found here.
350
350
 
351
351
  Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
352
352
 
353
- | Name | Type | Default | Description |
354
- | --- | --- | --- | --- |
355
- | `counter` | `ReactNode` | `-` | If multiple set to `true`, this number shows the number of selected menu items. |
356
- | `details` | `ReactNode` | `-` | A text showing details for the selected menu item. |
357
- | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
358
- | `intent` | `"default"` `| "negative"` `| "notice"` `| "positive"` | `default` | The color of the component. |
359
- | `label` | `ReactNode` | `-` | The label of the Input Button. |
360
- | `multiple` | `bool` | `false` | Allows users to select multiple menu items.`multiple=true` cannot be used with the `minimum` variant. |
361
- | `onClick` | `func` | `(event: React.MouseEvent<HTMLElement>) => void` | Sets what happens when a user clicks on the component. |
362
- | `sdsStyle` | `"minimal"` `| "square"` `| "rounded"` | `square` | The visual appearance of the component. |
363
- | `sdsType` | `"label"` `| "value"` | `label` | The `label` variant includes the label within the input field and showcases the selected menu item as additional details or sets the counter when in multi-select mode. The `value` variant replaces the label with the selected value directly within the input field. The detailed information is then displayed in a separate section dedicated to displaying additional details. However, it's important to note that the value variant cannot be used in conjunction with multi-select mode. |
364
- | `shouldPutAColonAfterLabel` | `bool` | `true` | If `true`, a colon (:) will be added after the label or value. |
365
- | `shouldTruncateMinimalDetails` | `bool` | `false` | If `true`, the details section of the minimal variant displays a truncated one-liner with an ellipsis (...), if `false` the details section expands to multiple lines for a comprehensive display. |
366
- | `value` | `ReactNode` | `-` | The value that will be displayed in the component for the `value` variant. |
367
-
368
- There are more props that can be used with the `InputDropdown` component, via those available to MUI's `Button` component.
353
+ | Name | Type | Default | Description |
354
+ | ------------------------------ | ------------- | ------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | --------------------------- |
355
+ | `counter` | `ReactNode` | `-` | If multiple set to `true`, this number shows the number of selected menu items. |
356
+ | `details` | `ReactNode` | `-` | A text showing details for the selected menu item. |
357
+ | `disabled` | `bool` | `false` | If `true`, the component is disabled. |
358
+ | `intent` | `"default"` ` | "negative"` ` | "notice"` ` | "positive"` | `default` | The color of the component. |
359
+ | `label` | `ReactNode` | `-` | The label of the Input Button. |
360
+ | `multiple` | `bool` | `false` | Allows users to select multiple menu items.`multiple=true` cannot be used with the `minimum` variant. |
361
+ | `onClick` | `func` | `(event: React.MouseEvent<HTMLElement>) => void` | Sets what happens when a user clicks on the component. |
362
+ | `sdsStyle` | `"minimal"` ` | "square"` ` | "rounded"` | `square` | The visual appearance of the component. |
363
+ | `sdsType` | `"label"` ` | "value"` | `label` | The `label` variant includes the label within the input field and showcases the selected menu item as additional details or sets the counter when in multi-select mode. The `value` variant replaces the label with the selected value directly within the input field. The detailed information is then displayed in a separate section dedicated to displaying additional details. However, it's important to note that the value variant cannot be used in conjunction with multi-select mode. |
364
+ | `shouldPutAColonAfterLabel` | `bool` | `true` | If `true`, a colon (:) will be added after the label or value. |
365
+ | `shouldTruncateMinimalDetails` | `bool` | `false` | If `true`, the details section of the minimal variant displays a truncated one-liner with an ellipsis (...), if `false` the details section expands to multiple lines for a comprehensive display. |
366
+ | `value` | `ReactNode` | `-` | The value that will be displayed in the component for the `value` variant. |
367
+
368
+ There are more props that can be used with the `InputDropdown` component, via those available to MUI's `Button` component.
369
369
 
370
370
  ### Code Examples
371
371
 
@@ -398,13 +398,11 @@ h1 {
398
398
 
399
399
  ```json
400
400
  {
401
- "include": [
402
- "./**/*"
403
- ],
401
+ "include": ["./**/*"],
404
402
  "compilerOptions": {
405
403
  "strict": true,
406
404
  "esModuleInterop": true,
407
- "lib": [ "dom", "es2015" ],
405
+ "lib": ["dom", "es2015"],
408
406
  "jsx": "react-jsx"
409
407
  }
410
408
  }
@@ -414,7 +412,7 @@ h1 {
414
412
 
415
413
  ```tsx
416
414
  // Most minimal InputDropdown (just has the basic requirements)
417
-
415
+
418
416
  import React, { SyntheticEvent, useState, useRef, useEffect } from "react";
419
417
  import { InputDropdown } from "@czi-sds/components";
420
418
  import "./styles.css";
@@ -422,7 +420,7 @@ import "./styles.css";
422
420
  function App() {
423
421
  return (
424
422
  <div className="app">
425
- <InputDropdown label="Label"/>
423
+ <InputDropdown label="Label" />
426
424
  </div>
427
425
  );
428
426
  }
@@ -467,13 +465,12 @@ root.render(
467
465
  <RootApp />
468
466
  </React.StrictMode>
469
467
  );
470
-
471
468
  ```
472
469
 
473
470
  **/public/index.html**
474
471
 
475
472
  ```html
476
- <!DOCTYPE html>
473
+ <!doctype html>
477
474
  <html lang="en">
478
475
  <head>
479
476
  <meta charset="UTF-8" />
@@ -494,18 +491,29 @@ root.render(
494
491
  <div id="root"></div>
495
492
  </body>
496
493
  </html>
497
-
498
494
  ```
499
495
 
500
496
  **/package.json**
501
497
 
502
498
  ```json
503
- {"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"}
499
+ {
500
+ "dependencies": {
501
+ "react": "^18.0.0",
502
+ "react-dom": "^18.0.0",
503
+ "react-scripts": "^4.0.0"
504
+ },
505
+ "devDependencies": {
506
+ "@types/react": "^18.0.0",
507
+ "@types/react-dom": "^18.0.0",
508
+ "typescript": "^4.0.0"
509
+ },
510
+ "main": "/index.tsx"
511
+ }
504
512
  ```
505
513
 
506
514
  ---
507
515
 
508
- >**MUI Tip:** To ensure the InputDropdown button expands to fit the width of its container, users can utilize the `fullWidth` prop provided by MUI. When set to `true`, the `fullWidth` prop enables the InputDropdown button to occupy the entire available width within its parent container.
516
+ > **MUI Tip:** To ensure the InputDropdown button expands to fit the width of its container, users can utilize the `fullWidth` prop provided by MUI. When set to `true`, the `fullWidth` prop enables the InputDropdown button to occupy the entire available width within its parent container.
509
517
 
510
518
  #### InputDropdown combined with a multi-select Dropdown
511
519
 
@@ -536,13 +544,11 @@ h1 {
536
544
 
537
545
  ```json
538
546
  {
539
- "include": [
540
- "./**/*"
541
- ],
547
+ "include": ["./**/*"],
542
548
  "compilerOptions": {
543
549
  "strict": true,
544
550
  "esModuleInterop": true,
545
- "lib": [ "dom", "es2015" ],
551
+ "lib": ["dom", "es2015"],
546
552
  "jsx": "react-jsx"
547
553
  }
548
554
  }
@@ -584,7 +590,7 @@ function App() {
584
590
 
585
591
  return (
586
592
  <div className="app">
587
- <InputDropdown
593
+ <InputDropdown
588
594
  label="Label"
589
595
  onClick={handleClick}
590
596
  sdsStyle="square"
@@ -620,22 +626,22 @@ function App() {
620
626
  setAnchorEl(event.currentTarget);
621
627
  setOpen(true);
622
628
  }
623
- };
629
+ }
624
630
 
625
631
  function handleChange(
626
632
  _: React.SyntheticEvent<Element, Event>,
627
633
  newValue: DefaultDropdownMenuOption | DefaultDropdownMenuOption[] | null
628
- ){
634
+ ) {
629
635
  setPendingValue(newValue);
630
636
  setCounter((newValue as DefaultDropdownMenuOption[])?.length.toString());
631
- };
637
+ }
632
638
 
633
- function handleClickAway(){
639
+ function handleClickAway() {
634
640
  if (open) {
635
641
  setOpen(false);
636
642
  }
637
643
  setValue(pendingValue);
638
- };
644
+ }
639
645
  }
640
646
 
641
647
  export default App;
@@ -678,13 +684,12 @@ root.render(
678
684
  <RootApp />
679
685
  </React.StrictMode>
680
686
  );
681
-
682
687
  ```
683
688
 
684
689
  **/public/index.html**
685
690
 
686
691
  ```html
687
- <!DOCTYPE html>
692
+ <!doctype html>
688
693
  <html lang="en">
689
694
  <head>
690
695
  <meta charset="UTF-8" />
@@ -705,20 +710,31 @@ root.render(
705
710
  <div id="root"></div>
706
711
  </body>
707
712
  </html>
708
-
709
713
  ```
710
714
 
711
715
  **/package.json**
712
716
 
713
717
  ```json
714
- {"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"}
718
+ {
719
+ "dependencies": {
720
+ "react": "^18.0.0",
721
+ "react-dom": "^18.0.0",
722
+ "react-scripts": "^4.0.0"
723
+ },
724
+ "devDependencies": {
725
+ "@types/react": "^18.0.0",
726
+ "@types/react-dom": "^18.0.0",
727
+ "typescript": "^4.0.0"
728
+ },
729
+ "main": "/index.tsx"
730
+ }
715
731
  ```
716
732
 
717
733
  ---
718
734
 
719
735
  #### Rounded InputDropdown combined with a single select Dropdown
720
736
 
721
- Below is an example demonstrating the combined utilization of the default `label` variant `InputDropdown` component and a single-select `Dropdown` component.
737
+ Below is an example demonstrating the combined utilization of the default `label` variant `InputDropdown` component and a single-select `Dropdown` component.
722
738
 
723
739
  **/styles.css**
724
740
 
@@ -745,13 +761,11 @@ h1 {
745
761
 
746
762
  ```json
747
763
  {
748
- "include": [
749
- "./**/*"
750
- ],
764
+ "include": ["./**/*"],
751
765
  "compilerOptions": {
752
766
  "strict": true,
753
767
  "esModuleInterop": true,
754
- "lib": [ "dom", "es2015" ],
768
+ "lib": ["dom", "es2015"],
755
769
  "jsx": "react-jsx"
756
770
  }
757
771
  }
@@ -789,7 +803,7 @@ function App() {
789
803
 
790
804
  return (
791
805
  <div className="app">
792
- <InputDropdown
806
+ <InputDropdown
793
807
  label="Label"
794
808
  onClick={handleClick}
795
809
  sdsStyle="rounded"
@@ -824,12 +838,12 @@ function App() {
824
838
  setAnchorEl(event.currentTarget);
825
839
  setOpen(true);
826
840
  }
827
- };
841
+ }
828
842
 
829
843
  function handleChange(
830
844
  _: React.SyntheticEvent<Element, Event>,
831
845
  newValue: DefaultDropdownMenuOption | DefaultDropdownMenuOption[] | null
832
- ){
846
+ ) {
833
847
  setOpen(false);
834
848
  setValue(newValue);
835
849
 
@@ -842,13 +856,13 @@ function App() {
842
856
  setDetials(undefined);
843
857
  setInputDropdownValue(undefined);
844
858
  }
845
- };
859
+ }
846
860
 
847
- function handleClickAway(){
861
+ function handleClickAway() {
848
862
  if (open) {
849
863
  setOpen(false);
850
864
  }
851
- };
865
+ }
852
866
  }
853
867
 
854
868
  export default App;
@@ -891,13 +905,12 @@ root.render(
891
905
  <RootApp />
892
906
  </React.StrictMode>
893
907
  );
894
-
895
908
  ```
896
909
 
897
910
  **/public/index.html**
898
911
 
899
912
  ```html
900
- <!DOCTYPE html>
913
+ <!doctype html>
901
914
  <html lang="en">
902
915
  <head>
903
916
  <meta charset="UTF-8" />
@@ -918,22 +931,33 @@ root.render(
918
931
  <div id="root"></div>
919
932
  </body>
920
933
  </html>
921
-
922
934
  ```
923
935
 
924
936
  **/package.json**
925
937
 
926
938
  ```json
927
- {"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"}
939
+ {
940
+ "dependencies": {
941
+ "react": "^18.0.0",
942
+ "react-dom": "^18.0.0",
943
+ "react-scripts": "^4.0.0"
944
+ },
945
+ "devDependencies": {
946
+ "@types/react": "^18.0.0",
947
+ "@types/react-dom": "^18.0.0",
948
+ "typescript": "^4.0.0"
949
+ },
950
+ "main": "/index.tsx"
951
+ }
928
952
  ```
929
953
 
930
954
  ---
931
955
 
932
956
  #### Minimal InputDropdown combined with a single-select Dropdown
933
957
 
934
- An example of the combined use of the value variation `InputDropdown` component and a single-select `Dropdown` component is shown below. 
958
+ An example of the combined use of the value variation `InputDropdown` component and a single-select `Dropdown` component is shown below.
935
959
 
936
- >**Warning:** The `value` variant can not be used in conjunction with the multi-select Dropdowns. If you set `sdsType="value"` and `multiple="true"`, the component will default to showing a label and a counter instead.
960
+ > **Warning:** The `value` variant can not be used in conjunction with the multi-select Dropdowns. If you set `sdsType="value"` and `multiple="true"`, the component will default to showing a label and a counter instead.
937
961
 
938
962
  **/styles.css**
939
963
 
@@ -960,13 +984,11 @@ h1 {
960
984
 
961
985
  ```json
962
986
  {
963
- "include": [
964
- "./**/*"
965
- ],
987
+ "include": ["./**/*"],
966
988
  "compilerOptions": {
967
989
  "strict": true,
968
990
  "esModuleInterop": true,
969
- "lib": [ "dom", "es2015" ],
991
+ "lib": ["dom", "es2015"],
970
992
  "jsx": "react-jsx"
971
993
  }
972
994
  }
@@ -1004,7 +1026,7 @@ function App() {
1004
1026
 
1005
1027
  return (
1006
1028
  <div className="app">
1007
- <InputDropdown
1029
+ <InputDropdown
1008
1030
  label="Label"
1009
1031
  onClick={handleClick}
1010
1032
  sdsType="value"
@@ -1042,12 +1064,12 @@ function App() {
1042
1064
  setAnchorEl(event.currentTarget);
1043
1065
  setOpen(true);
1044
1066
  }
1045
- };
1067
+ }
1046
1068
 
1047
1069
  function handleChange(
1048
1070
  _: React.SyntheticEvent<Element, Event>,
1049
1071
  newValue: DefaultDropdownMenuOption | DefaultDropdownMenuOption[] | null
1050
- ){
1072
+ ) {
1051
1073
  setOpen(false);
1052
1074
  setValue(newValue);
1053
1075
 
@@ -1060,13 +1082,13 @@ function App() {
1060
1082
  setDetials(undefined);
1061
1083
  setInputDropdownValue(undefined);
1062
1084
  }
1063
- };
1085
+ }
1064
1086
 
1065
- function handleClickAway(){
1087
+ function handleClickAway() {
1066
1088
  if (open) {
1067
1089
  setOpen(false);
1068
1090
  }
1069
- };
1091
+ }
1070
1092
  }
1071
1093
 
1072
1094
  export default App;
@@ -1109,13 +1131,12 @@ root.render(
1109
1131
  <RootApp />
1110
1132
  </React.StrictMode>
1111
1133
  );
1112
-
1113
1134
  ```
1114
1135
 
1115
1136
  **/public/index.html**
1116
1137
 
1117
1138
  ```html
1118
- <!DOCTYPE html>
1139
+ <!doctype html>
1119
1140
  <html lang="en">
1120
1141
  <head>
1121
1142
  <meta charset="UTF-8" />
@@ -1136,14 +1157,24 @@ root.render(
1136
1157
  <div id="root"></div>
1137
1158
  </body>
1138
1159
  </html>
1139
-
1140
1160
  ```
1141
1161
 
1142
1162
  **/package.json**
1143
1163
 
1144
1164
  ```json
1145
- {"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"}
1165
+ {
1166
+ "dependencies": {
1167
+ "react": "^18.0.0",
1168
+ "react-dom": "^18.0.0",
1169
+ "react-scripts": "^4.0.0"
1170
+ },
1171
+ "devDependencies": {
1172
+ "@types/react": "^18.0.0",
1173
+ "@types/react-dom": "^18.0.0",
1174
+ "typescript": "^4.0.0"
1175
+ },
1176
+ "main": "/index.tsx"
1177
+ }
1146
1178
  ```
1147
1179
 
1148
1180
  ---
1149
-