@czi-sds/mcp 0.16.0 → 0.17.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 (164) hide show
  1. package/README.md +2 -1
  2. package/data/component-docs/Accordion.md +291 -0
  3. package/data/component-docs/Autocomplete.md +525 -0
  4. package/data/component-docs/Banner.md +231 -0
  5. package/data/component-docs/Button.md +224 -0
  6. package/data/component-docs/ButtonDropdown.md +256 -0
  7. package/data/component-docs/ButtonGroup.md +320 -0
  8. package/data/component-docs/ButtonToggle.md +397 -0
  9. package/data/component-docs/Callout.md +268 -0
  10. package/data/component-docs/CellBasic.md +122 -0
  11. package/data/component-docs/CellComponent.md +63 -0
  12. package/data/component-docs/CellHeader.md +128 -0
  13. package/data/component-docs/ComplexFilter.md +294 -0
  14. package/data/component-docs/ContentCard.md +406 -0
  15. package/data/component-docs/Dialog.md +651 -0
  16. package/data/component-docs/Dropdown.md +155 -0
  17. package/data/component-docs/DropdownMenu.md +949 -0
  18. package/data/component-docs/HeatmapChart.md +782 -0
  19. package/data/component-docs/Hero.md +363 -0
  20. package/data/component-docs/Icon.md +283 -0
  21. package/data/component-docs/InputCheckbox.md +205 -0
  22. package/data/component-docs/InputDropdown.md +482 -0
  23. package/data/component-docs/InputRadio.md +173 -0
  24. package/data/component-docs/InputSearch.md +81 -0
  25. package/data/component-docs/InputSlider.md +189 -0
  26. package/data/component-docs/InputText.md +110 -0
  27. package/data/component-docs/InputToggle.md +141 -0
  28. package/data/component-docs/IntentMessage.md +293 -0
  29. package/data/component-docs/Legend.md +442 -0
  30. package/data/component-docs/Link.md +23 -0
  31. package/data/component-docs/List.md +300 -0
  32. package/data/component-docs/LoadingIndicator.md +198 -0
  33. package/data/component-docs/Menu.md +298 -0
  34. package/data/component-docs/MenuItem.md +100 -0
  35. package/data/component-docs/NavigationFooter.md +165 -0
  36. package/data/component-docs/NavigationHeader.md +500 -0
  37. package/data/component-docs/NavigationJumpTo.md +414 -0
  38. package/data/component-docs/Notification.md +288 -0
  39. package/data/component-docs/Pagination.md +67 -0
  40. package/data/component-docs/Panel.md +636 -0
  41. package/data/component-docs/Popover.md +448 -0
  42. package/data/component-docs/PreComposedTable.md +2947 -0
  43. package/data/component-docs/SegmentedControl.md +396 -0
  44. package/data/component-docs/StackedBarChart.md +475 -0
  45. package/data/component-docs/Table.md +2000 -0
  46. package/data/component-docs/TableHeader.md +53 -0
  47. package/data/component-docs/TableRow.md +74 -0
  48. package/data/component-docs/Tabs.md +455 -0
  49. package/data/component-docs/Tag.md +647 -0
  50. package/data/component-docs/TagFilter.md +131 -0
  51. package/data/component-docs/Tooltip.md +561 -0
  52. package/data/component-docs/TooltipCondensed.md +203 -0
  53. package/data/component-docs/TooltipTable.md +145 -0
  54. package/data/component-docs/index.json +262 -0
  55. package/data/component-list.json +2 -5
  56. package/data/component-props/Accordion.json +31 -11
  57. package/data/component-props/Alert.json +3 -3
  58. package/data/component-props/Autocomplete.json +150 -15
  59. package/data/component-props/Banner.json +31 -17
  60. package/data/component-props/Button.json +45 -20
  61. package/data/component-props/ButtonDropdown.json +36 -17
  62. package/data/component-props/ButtonDropdownLegacy.json +11 -11
  63. package/data/component-props/ButtonGroup.json +32 -11
  64. package/data/component-props/ButtonIcon.json +10 -10
  65. package/data/component-props/ButtonLegacy.json +19 -19
  66. package/data/component-props/ButtonToggle.json +32 -19
  67. package/data/component-props/ButtonToggleLegacy.json +11 -11
  68. package/data/component-props/Callout.json +58 -17
  69. package/data/component-props/CellBasic.json +94 -41
  70. package/data/component-props/CellComponent.json +23 -7
  71. package/data/component-props/CellHeader.json +62 -19
  72. package/data/component-props/ComplexFilter.json +52 -21
  73. package/data/component-props/ContentCard.json +70 -47
  74. package/data/component-props/Dialog.json +47 -14
  75. package/data/component-props/Dropdown.json +68 -31
  76. package/data/component-props/DropdownMenu.json +128 -23
  77. package/data/component-props/HeatmapChart.json +88 -12
  78. package/data/component-props/Hero.json +80 -39
  79. package/data/component-props/Icon.json +20 -9
  80. package/data/component-props/InputCheckbox.json +36 -14
  81. package/data/component-props/InputDropdown.json +75 -27
  82. package/data/component-props/InputRadio.json +31 -13
  83. package/data/component-props/InputSearch.json +41 -18
  84. package/data/component-props/InputSlider.json +46 -19
  85. package/data/component-props/InputText.json +26 -19
  86. package/data/component-props/InputToggle.json +26 -9
  87. package/data/component-props/IntentMessage.json +38 -9
  88. package/data/component-props/Link.json +13 -7
  89. package/data/component-props/LoadingIndicator.json +11 -3
  90. package/data/component-props/MenuItem.json +38 -19
  91. package/data/component-props/MenuSelect.json +8 -8
  92. package/data/component-props/NavigationFooter.json +49 -19
  93. package/data/component-props/NavigationHeader.json +150 -37
  94. package/data/component-props/NavigationJumpTo.json +33 -7
  95. package/data/component-props/Notification.json +39 -21
  96. package/data/component-props/Pagination.json +39 -11
  97. package/data/component-props/Panel.json +62 -9
  98. package/data/component-props/Popover.json +80 -7
  99. package/data/component-props/PreComposedTable.json +99 -27
  100. package/data/component-props/SegmentedControl.json +42 -3
  101. package/data/component-props/StackedBarChart.json +116 -42
  102. package/data/component-props/TableRow.json +38 -19
  103. package/data/component-props/Tabs.json +66 -9
  104. package/data/component-props/Tag.json +34 -17
  105. package/data/component-props/TagFilter.json +10 -3
  106. package/data/component-props/Tooltip.json +49 -18
  107. package/data/component-props/TooltipCondensed.json +18 -9
  108. package/data/component-props/TooltipTable.json +17 -7
  109. package/data/resources/{zeroheight-rules.md → documentation-rules.md} +43 -30
  110. package/data/resources/figma-rules.md +2 -2
  111. package/dist/stdio.js +112 -208
  112. package/package.json +9 -5
  113. package/data/component-props/ButtonDropdownV2.json +0 -34
  114. package/data/component-props/ButtonNew.json +0 -47
  115. package/data/component-props/ButtonToggleV2.json +0 -44
  116. package/data/component-props/ButtonV2.json +0 -43
  117. package/data/zeroheight-cache.json +0 -10259
  118. package/data/zeroheight-exports/Accordion.md +0 -774
  119. package/data/zeroheight-exports/Banner.md +0 -691
  120. package/data/zeroheight-exports/Borders.md +0 -117
  121. package/data/zeroheight-exports/Buttons.md +0 -1854
  122. package/data/zeroheight-exports/Callout.md +0 -931
  123. package/data/zeroheight-exports/Colors.md +0 -1755
  124. package/data/zeroheight-exports/Content-Card.md +0 -309
  125. package/data/zeroheight-exports/Contributing-to-SDS.md +0 -98
  126. package/data/zeroheight-exports/Control-Inputs.md +0 -2818
  127. package/data/zeroheight-exports/Corners.md +0 -104
  128. package/data/zeroheight-exports/Cover-page.md +0 -3
  129. package/data/zeroheight-exports/Dialog.md +0 -1367
  130. package/data/zeroheight-exports/Downloads.md +0 -236
  131. package/data/zeroheight-exports/Drop-Shadows.md +0 -79
  132. package/data/zeroheight-exports/Dropdown-Input.md +0 -1776
  133. package/data/zeroheight-exports/Dropdown-Menus.md +0 -913
  134. package/data/zeroheight-exports/Element-Status-Tracker.md +0 -267
  135. package/data/zeroheight-exports/Field-Inputs.md +0 -1405
  136. package/data/zeroheight-exports/Filters.md +0 -1111
  137. package/data/zeroheight-exports/Getting-Started.md +0 -1157
  138. package/data/zeroheight-exports/Hero.md +0 -414
  139. package/data/zeroheight-exports/Icons.md +0 -2067
  140. package/data/zeroheight-exports/Intent.md +0 -86
  141. package/data/zeroheight-exports/Introduction-to-Bases.md +0 -35
  142. package/data/zeroheight-exports/Introduction-to-Cells.md +0 -35
  143. package/data/zeroheight-exports/Introduction-to-DNA.md +0 -35
  144. package/data/zeroheight-exports/Introduction-to-Genes.md +0 -35
  145. package/data/zeroheight-exports/Introduction.md +0 -115
  146. package/data/zeroheight-exports/Link.md +0 -432
  147. package/data/zeroheight-exports/Lists.md +0 -986
  148. package/data/zeroheight-exports/Loading-Indicator.md +0 -41
  149. package/data/zeroheight-exports/Navigation.md +0 -1190
  150. package/data/zeroheight-exports/Notification.md +0 -1038
  151. package/data/zeroheight-exports/Panel.md +0 -1030
  152. package/data/zeroheight-exports/README.md +0 -122
  153. package/data/zeroheight-exports/Responsive-Design.md +0 -330
  154. package/data/zeroheight-exports/Search-Input.md +0 -91
  155. package/data/zeroheight-exports/Search.md +0 -822
  156. package/data/zeroheight-exports/Segmented-Control.md +0 -609
  157. package/data/zeroheight-exports/Spacing.md +0 -297
  158. package/data/zeroheight-exports/Table.md +0 -5345
  159. package/data/zeroheight-exports/Tabs.md +0 -1324
  160. package/data/zeroheight-exports/Tags.md +0 -1545
  161. package/data/zeroheight-exports/Text-Link.md +0 -268
  162. package/data/zeroheight-exports/Theming.md +0 -362
  163. package/data/zeroheight-exports/Tooltips.md +0 -2015
  164. package/data/zeroheight-exports/Typography.md +0 -800
@@ -1,913 +0,0 @@
1
- # Dropdown Menus
2
-
3
- Dropdown Menus are coupled with Dropdown Inputs and in some cases Icon Buttons whenever those elements present the user with options to choose from or selections to make.
4
-
5
- ## Overview
6
-
7
- > **Warning:** The Dropdown Menu and its affiliated components have undergone a major overhaul in their construction and how they have been coded, rendering the documentation below out of date.
8
- >
9
- > While the SDS works on updating the documentation to reflect these changes, see `src/core/Dropdown/index.stories.tsx` within the `sci-components` codebase for example usage of the new Dropdown Menu structure.
10
-
11
- ## Dropdown Menu Variants
12
-
13
- | In their basic form, Dropdown Menus are composed of a Menu Container that is filled with Menu Items offering the user options to adjust or select that are contextually relevant to the Dropdown Input they are coupled with. Menu Items can be optionally paired with additional details or with counters that indicate the number of items within that Menu Item's category. Additionally, Dropdown Menus can be configured to include a Search Input, have their Menu Items separated out into different sections or groupings, or a combination of these features. | | **Jump to section:** Dropdown Menu Common Configurations Menu Item |
14
- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
15
-
16
- ---
17
-
18
- ## Dropdown Menu
19
-
20
- | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
21
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
22
-
23
- Dropdown Menus can be configured to have their Menu Items all in one large list or separated out into different sections or groupings; these Menu Item formats are established by the `[array]` passed into the `options` prop. Additionally, Dropdown Menus can be configured to include a Search Input. See the Data Format section below for details about configuring the `[array]`.
24
-
25
- Dropdown Menus are used in combination with Dropdown Inputs on napari hub as part of plugin Filters, accessible on the left side of the plugin page.
26
-
27
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
28
-
29
- **Default**
30
-
31
- ---
32
-
33
- ---
34
-
35
- **Default + Search**
36
-
37
- ---
38
-
39
- ---
40
-
41
- **Default + Sections**
42
-
43
- ---
44
-
45
- ### Data Format
46
-
47
- Use the following configuration for the `[array]` passed into the `options` prop:
48
-
49
- ```js
50
- data = [
51
- {
52
- // section with a Header and Menu Item Details
53
- dataRows: [
54
- {
55
- name: "Menu Item",
56
- details: "Details",
57
- },
58
- {
59
- name: "Menu Item",
60
- details: "Details",
61
- },
62
- {
63
- name: "Menu Item",
64
- details: "Details",
65
- },
66
- ],
67
- label: "Section One",
68
- },
69
- {
70
- // section with Menu Item Counts
71
- dataRows: [
72
- {
73
- name: "Menu Item",
74
- count: 20,
75
- },
76
- {
77
- name: "Menu Item",
78
- count: 40,
79
- },
80
- {
81
- name: "Menu Item",
82
- count: 60,
83
- },
84
- ],
85
- },
86
- {
87
- // section with disabled Menu Items
88
- dataRows: [
89
- {
90
- name: "Menu Item",
91
- disabled: true,
92
- },
93
- {
94
- name: "Menu Item",
95
- disabled: true,
96
- },
97
- {
98
- name: "Menu Item",
99
- disabled: true,
100
- },
101
- ],
102
- },
103
- ];
104
- ```
105
-
106
- ---
107
-
108
- ### Dropdown Menu Spacing
109
-
110
- These rules establish how much margin should exist between and around elements.
111
-
112
- **Dropdown Menu spacing**
113
-
114
- ---
115
-
116
- ---
117
-
118
- ## Common Configurations
119
-
120
- Dropdown Menus can be thought of as being comprised of different combinations of building blocks all within a Menu Container, ensuring a wide range of flexibility for whatever need a designer has with their designs.
121
-
122
- Below are a number of common Dropdown Menu configurations, but by no means is this an exhaustive list:
123
-
124
- | **Search + Count** | **Search + Sections** | **Search + Details** |
125
- | ------------------ | --------------------- | -------------------- |
126
-
127
- **Search + Count**
128
-
129
- ---
130
-
131
- **Search + Sections**
132
-
133
- ---
134
-
135
- **Search + Details**
136
-
137
- ---
138
-
139
- | **Sections + Details** | **Search + Sections + Details** | **Search + Sections + Count** |
140
- | ---------------------- | ------------------------------- | ----------------------------- |
141
-
142
- **Sections + Details**
143
-
144
- ---
145
-
146
- **Search + Sections + Details**
147
-
148
- ---
149
-
150
- **Search + Sections + Count**
151
-
152
- ---
153
-
154
- ---
155
-
156
- ## Menu Item
157
-
158
- | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
159
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
160
-
161
- Menu Items can be optionally paired with additional clarifying details, with counters that indicate the number of items within that Menu Item's category, or be disabled entirely. These details are established within the `[array]` passed into the `options` prop on the Dropdown Menu component.
162
-
163
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
164
-
165
- | **Default** | **Hover** | **Selected** | **Selected + Hover** | **Disabled** | **Selected + Disabled** |
166
- | ----------- | --------- | ------------ | -------------------- | ------------ | ----------------------- |
167
-
168
- **MenuItem**
169
-
170
- ---
171
-
172
- **MenuItem**
173
-
174
- ---
175
-
176
- **MenuItem**
177
-
178
- ---
179
-
180
- **MenuItem**
181
-
182
- ---
183
-
184
- **MenuItem**
185
-
186
- ---
187
-
188
- **MenuItem**
189
-
190
- ---
191
-
192
- | **Default + Count** | **Hover** | **Selected** | **Selected + Hover** | **Disabled** | **Selected + Disabled** |
193
- | ------------------- | --------- | ------------ | -------------------- | ------------ | ----------------------- |
194
-
195
- **MenuItem**
196
-
197
- ---
198
-
199
- **MenuItem**
200
-
201
- ---
202
-
203
- **MenuItem**
204
-
205
- ---
206
-
207
- **MenuItem**
208
-
209
- ---
210
-
211
- **MenuItem**
212
-
213
- ---
214
-
215
- **MenuItem**
216
-
217
- ---
218
-
219
- | **Default + Details** | **Hover** | **Selected** | **Selected + Hover** | **Disabled** | **Selected + Disabled**  |
220
- | --------------------- | --------- | ------------ | -------------------- | ------------ | ------------------------ |
221
-
222
- **MenuItem**
223
-
224
- ---
225
-
226
- **MenuItem**
227
-
228
- ---
229
-
230
- **MenuItem**
231
-
232
- ---
233
-
234
- **MenuItem**
235
-
236
- ---
237
-
238
- **MenuItem**
239
-
240
- ---
241
-
242
- **MenuItem**
243
-
244
- ---
245
-
246
- ## Code
247
-
248
- ## Dropdown Menu Component
249
-
250
- | Below you will find interactive Storybook iframes for the Dropdown Menu. 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:** DropdownMenu |
251
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------- |
252
-
253
- ---
254
-
255
- > **Warning:** The Dropdown Menu and its affiliated components have undergone a major overhaul in their construction and how they have been coded, rendering the documentation below out of date.
256
- >
257
- > While the SDS works on updating the documentation to reflect these changes, see `src/core/Dropdown/index.stories.tsx` within the `sci-components` codebase for example usage of the new Dropdown Menu structure.
258
-
259
- > 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.
260
-
261
- ### DropdownMenu
262
-
263
- Storybook
264
-
265
- ---
266
-
267
- Dropdown Menus are coupled with Dropdown Inputs, Dropdown Buttons, and in some cases Icon Buttons whenever those elements present the user with options to choose from or selections to make.
268
-
269
- ## Overview
270
-
271
- > **NOTE:** The Dropdown Menu and its affiliated components have undergone a major overhaul in their construction and how they have been coded, rendering the documentation below out of date.
272
- >
273
- > While the SDS works on updating the documentation to reflect these changes, see `src/core/Dropdown/index.stories.tsx` within the `sci-components` codebase for example usage of the new Dropdown Menu structure.
274
-
275
- ## Dropdown Menu Variants
276
-
277
- | In their basic form, Dropdown Menus are composed of a Menu Container that is filled with Menu Items offering the user options to adjust or select that are contextually relevant to the Button or Dropdown Input they are coupled with. Menu Items can be optionally paired with additional details or with counters that indicate the number of items within that Menu Item's category. Dropdown Menus can also be multi-select, allowing the user to choose multiple options from the group of Menu Items. Additionally, Dropdown Menus can be configured to include a Search Input, have their Menu Items separated out into different sections or groupings, have a built-in title, or any combination of these features. | | **Jump to section:** Dropdown Menu Common Configurations Menu Item |
278
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
279
-
280
- ---
281
-
282
- ## Dropdown Menu
283
-
284
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
285
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
286
-
287
- ### Single-select Dropdown Menu
288
-
289
- Use the Single-select Dropdown Menu when users are only able to select one item from the menu. They can be configured to have their Menu Items separated out into different sections or groupings, or have a built-in title; both of these features are established by the `[array]` passed into the `options` prop. Additionally, they can be configured to include a Search Input. See the Data Format section below for details around configuring the `[array]`.
290
-
291
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
292
-
293
- **Default**
294
-
295
- ---
296
-
297
- ---
298
-
299
- **Default + Title**
300
-
301
- ---
302
-
303
- ---
304
-
305
- **Default + Search**
306
-
307
- ---
308
-
309
- ---
310
-
311
- **Default + Sections**
312
-
313
- ---
314
-
315
- ### Multi-select Dropdown Menu
316
-
317
- Use the Multi-select Dropdown Menu when users are able to select one or more items from the menu. They can be configured to have their Menu Items separated out into different sections or groupings, or have a built-in title; both of these features are established by the `[array]` passed into the `options` prop. Additionally, they can be configured to include a Search Input. See the Data Format section below for details around configuring the `[array]`.
318
-
319
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
320
-
321
- **Default**
322
-
323
- ---
324
-
325
- ---
326
-
327
- **Default + Title**
328
-
329
- ---
330
-
331
- ---
332
-
333
- **Default + Search**
334
-
335
- ---
336
-
337
- ---
338
-
339
- **Default + Sections**
340
-
341
- ---
342
-
343
- ### Data Format
344
-
345
- Use the following configuration for the `[array]` passed into the `options` prop:
346
-
347
- ```js
348
- data = [
349
- {
350
- // section with a Header and Menu Item Details
351
- dataRows: [
352
- {
353
- name: "Menu Item",
354
- details: "Details",
355
- },
356
- {
357
- name: "Menu Item",
358
- details: "Details",
359
- },
360
- {
361
- name: "Menu Item",
362
- details: "Details",
363
- },
364
- ],
365
- label: "Section One",
366
- },
367
- {
368
- // section with Menu Item Counts
369
- dataRows: [
370
- {
371
- name: "Menu Item",
372
- count: 20,
373
- },
374
- {
375
- name: "Menu Item",
376
- count: 40,
377
- },
378
- {
379
- name: "Menu Item",
380
- count: 60,
381
- },
382
- ],
383
- },
384
- ];
385
- ```
386
-
387
- ---
388
-
389
- ### Dropdown Menu Spacing
390
-
391
- These rules establish how much margin should exist between and around elements.
392
-
393
- **Dropdown Menu Spacing**
394
-
395
- ---
396
-
397
- ---
398
-
399
- ## Common Configurations
400
-
401
- Dropdown Menus can be thought of as being comprised of different combinations of building blocks all within a Menu Container, ensuring a wide range of flexibility for whatever need a designer has with their designs.
402
-
403
- Below are a number of common Dropdown Menu configurations, but by no means is this an exhaustive list:
404
-
405
- | **Title + Count** | **Search + Sections + Details** | **Title + Details** |
406
- | ----------------- | ------------------------------- | ------------------- |
407
-
408
- **Title + Count**
409
-
410
- ---
411
-
412
- **Search + Sections + Details**
413
-
414
- ---
415
-
416
- **Title + Details**
417
-
418
- ---
419
-
420
- | **Search + Details** | **Title + Search + Count** | **Title + Sections + Details** |
421
- | -------------------- | -------------------------- | ------------------------------ |
422
-
423
- **Search + Details**
424
-
425
- ---
426
-
427
- **Search + Title + Count**
428
-
429
- ---
430
-
431
- **Title + Sections + Details**
432
-
433
- ---
434
-
435
- ---
436
-
437
- ## Menu Item
438
-
439
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
440
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
441
-
442
- ### Single-select Menu Item
443
-
444
- Menu Items can be optionally paired with additional clarifying details, with counters that indicate the number of items within that Menu Item's category, or be disabled entirely. These details are established within the `[array]` passed into the `options` prop on the Dropdown Menu component.
445
-
446
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
447
-
448
- | **Default** | **Hover** | **Selected** | **Disabled** |
449
- | ----------- | --------- | ------------ | ------------ |
450
-
451
- **MenuItem**
452
-
453
- ---
454
-
455
- **MenuItem**
456
-
457
- ---
458
-
459
- **MenuItem**
460
-
461
- ---
462
-
463
- **MenuItem**
464
-
465
- ---
466
-
467
- | **Default + Count** | **Hover** | **Selected** | **Disabled** |
468
- | ------------------- | --------- | ------------ | ------------ |
469
-
470
- **MenuItem**
471
-
472
- ---
473
-
474
- **MenuItem**
475
-
476
- ---
477
-
478
- **MenuItem**
479
-
480
- ---
481
-
482
- **MenuItem**
483
-
484
- ---
485
-
486
- | **Default + Details** | **Hover** | **Selected** | **Disabled** |
487
- | --------------------- | --------- | ------------ | ------------ |
488
-
489
- **MenuItem**
490
-
491
- ---
492
-
493
- **MenuItem**
494
-
495
- ---
496
-
497
- **MenuItem**
498
-
499
- ---
500
-
501
- **MenuItem**
502
-
503
- ---
504
-
505
- ### Multi-select Menu Item
506
-
507
- Menu Items can be optionally paired with additional clarifying details, with counters that indicate the number of items within that Menu Item's category, or be disabled entirely. These details are established within the `[array]` passed into the `options` prop on the Dropdown Menu component.
508
-
509
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
510
-
511
- | **Default** | **Hover** | **Selected** | **Disabled** |
512
- | ----------- | --------- | ------------ | ------------ |
513
-
514
- **MenuItem**
515
-
516
- ---
517
-
518
- **MenuItem**
519
-
520
- ---
521
-
522
- **MenuItem**
523
-
524
- ---
525
-
526
- **MenuItem**
527
-
528
- ---
529
-
530
- | **Default + Count** | **Hover** | **Selected** | **Disabled** |
531
- | ------------------- | --------- | ------------ | ------------ |
532
-
533
- **MenuItem**
534
-
535
- ---
536
-
537
- **MenuItem**
538
-
539
- ---
540
-
541
- **MenuItem**
542
-
543
- ---
544
-
545
- **MenuItem**
546
-
547
- ---
548
-
549
- | **Default + Details** | **Hover** | **Selected** | **Disabled** |
550
- | --------------------- | --------- | ------------ | ------------ |
551
-
552
- **MenuItem**
553
-
554
- ---
555
-
556
- **MenuItem**
557
-
558
- ---
559
-
560
- **MenuItem**
561
-
562
- ---
563
-
564
- **MenuItem**
565
-
566
- ---
567
-
568
- ## Code
569
-
570
- ## Dropdown Menu Component
571
-
572
- | Below you will find interactive Storybook iframes for the Dropdown Menu. 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:** DropdownMenu |
573
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------- |
574
-
575
- ---
576
-
577
- > **NOTE:** The Dropdown Menu and its affiliated components have undergone a major overhaul in their construction and how they have been coded, rendering the documentation below out of date.
578
- >
579
- > While the SDS works on updating the documentation to reflect these changes, see `src/core/Dropdown/index.stories.tsx` within the `sci-components` codebase for example usage of the new Dropdown Menu structure.
580
-
581
- > This component appears as it is 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.
582
-
583
- ### DropdownMenu
584
-
585
- Storybook
586
-
587
- ---
588
-
589
- Dropdown Menus are coupled with Dropdown Inputs, Dropdown Buttons, and in some cases Icon Buttons whenever those elements present the user with options to choose from or selections to make.
590
-
591
- ## Overview
592
-
593
- > **Warning:** The Dropdown Menu and its affiliated components have undergone a major overhaul in their construction and how they have been coded, rendering the documentation below out of date.
594
- >
595
- > While the SDS works on updating the documentation to reflect these changes, see `src/core/Dropdown/index.stories.tsx` within the `sci-components` codebase for example usage of the new Dropdown Menu structure.
596
-
597
- ## Dropdown Menu Variants
598
-
599
- | In their basic form, Dropdown Menus are composed of a Menu Container that is filled with Menu Items offering the user options to adjust or select that are contextually relevant to the Button or Dropdown Input they are coupled with. Menu Items can be optionally paired with additional details or with counters that indicate the number of items within that Menu Item's category. Dropdown Menus can also be multi-select, allowing the user to choose multiple options from the group of Menu Items. Additionally, Dropdown Menus can be configured to include a Search Input, have their Menu Items separated out into different sections or groupings, have a built-in title, or any combination of these features. | | **Jump to section:** Dropdown Menu Common Configurations Menu Item |
600
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
601
-
602
- ---
603
-
604
- ## Dropdown Menu
605
-
606
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
607
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
608
-
609
- ### Single-select Dropdown Menu
610
-
611
- Use the Single-select Dropdown Menu when users are only able to select one item from the menu. They can be configured to have their Menu Items separated out into different sections or groupings, or have a built-in title; both of these features are established by the `[array]` passed into the `options` prop. Additionally, they can be configured to include a Search Input. See the Data Format section below for details around configuring the `[array]`.
612
-
613
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
614
-
615
- **Default**
616
-
617
- ---
618
-
619
- ---
620
-
621
- **Default + Title**
622
-
623
- ---
624
-
625
- ---
626
-
627
- **Default + Search**
628
-
629
- ---
630
-
631
- ---
632
-
633
- **Default + Sections**
634
-
635
- ---
636
-
637
- ### Multi-select Dropdown Menu
638
-
639
- Use the Multi-select Dropdown Menu when users are able to select one or more items from the menu. They can be configured to have their Menu Items separated out into different sections or groupings, or have a built-in title; both of these features are established by the `[array]` passed into the `options` prop. Additionally, they can be configured to include a Search Input. See the Data Format section below for details around configuring the `[array]`.
640
-
641
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
642
-
643
- **Default**
644
-
645
- ---
646
-
647
- ---
648
-
649
- **Default + Title**
650
-
651
- ---
652
-
653
- ---
654
-
655
- **Default + Search**
656
-
657
- ---
658
-
659
- ---
660
-
661
- **Default + Sections**
662
-
663
- ---
664
-
665
- ---
666
-
667
- **Default + Buttons**
668
-
669
- ---
670
-
671
- ---
672
-
673
- ### Data Format
674
-
675
- Use the following configuration for the `[array]` passed into the `options` prop:
676
-
677
- ```js
678
- data = [
679
- {
680
- // section with a Header and Menu Item Details
681
- dataRows: [
682
- {
683
- name: "Menu Item",
684
- details: "Details",
685
- },
686
- {
687
- name: "Menu Item",
688
- details: "Details",
689
- },
690
- {
691
- name: "Menu Item",
692
- details: "Details",
693
- },
694
- ],
695
- label: "Section One",
696
- },
697
- {
698
- // section with Menu Item Counts
699
- dataRows: [
700
- {
701
- name: "Menu Item",
702
- count: 20,
703
- },
704
- {
705
- name: "Menu Item",
706
- count: 40,
707
- },
708
- {
709
- name: "Menu Item",
710
- count: 60,
711
- },
712
- ],
713
- },
714
- ];
715
- ```
716
-
717
- ---
718
-
719
- ### Dropdown Menu Spacing
720
-
721
- These rules establish how much margin should exist between and around elements.
722
-
723
- **Dropdown Menu Spacing**
724
-
725
- ---
726
-
727
- ---
728
-
729
- ## Common Configurations
730
-
731
- Dropdown Menus can be thought of as being comprised of different combinations of building blocks all within a Menu Container, ensuring a wide range of flexibility for whatever need a designer has with their designs.
732
-
733
- Below are a number of common Dropdown Menu configurations, but by no means is this an exhaustive list:
734
-
735
- | **Title + Count** | **Search + Sections + Details** | **Title + Details** |
736
- | ----------------- | ------------------------------- | ------------------- |
737
-
738
- **Title + Count**
739
-
740
- ---
741
-
742
- **Search + Sections + Details**
743
-
744
- ---
745
-
746
- **Title + Details**
747
-
748
- ---
749
-
750
- | **Search + Details** | **Title + Search + Count** | **Title + Sections + Details** |
751
- | -------------------- | -------------------------- | ------------------------------ |
752
-
753
- **Search + Details**
754
-
755
- ---
756
-
757
- **Search + Title + Count**
758
-
759
- ---
760
-
761
- **Title + Sections + Details**
762
-
763
- ---
764
-
765
- ---
766
-
767
- ## Menu Item
768
-
769
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
770
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
771
-
772
- ### Single-select Menu Item
773
-
774
- Menu Items can be optionally paired with additional clarifying details, with counters that indicate the number of items within that Menu Item's category, or be disabled entirely. These details are established within the `[array]` passed into the `options` prop on the Dropdown Menu component.
775
-
776
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
777
-
778
- | **Default** | **Hover** | **Selected** | **Disabled** |
779
- | ----------- | --------- | ------------ | ------------ |
780
-
781
- **MenuItem**
782
-
783
- ---
784
-
785
- **MenuItem**
786
-
787
- ---
788
-
789
- **MenuItem**
790
-
791
- ---
792
-
793
- **MenuItem**
794
-
795
- ---
796
-
797
- | **Default + Count** | **Hover** | **Selected** | **Disabled** |
798
- | ------------------- | --------- | ------------ | ------------ |
799
-
800
- **MenuItem**
801
-
802
- ---
803
-
804
- **MenuItem**
805
-
806
- ---
807
-
808
- **MenuItem**
809
-
810
- ---
811
-
812
- **MenuItem**
813
-
814
- ---
815
-
816
- | **Default + Details** | **Hover** | **Selected** | **Disabled** |
817
- | --------------------- | --------- | ------------ | ------------ |
818
-
819
- **MenuItem**
820
-
821
- ---
822
-
823
- **MenuItem**
824
-
825
- ---
826
-
827
- **MenuItem**
828
-
829
- ---
830
-
831
- **MenuItem**
832
-
833
- ---
834
-
835
- ### Multi-select Menu Item
836
-
837
- Menu Items can be optionally paired with additional clarifying details, with counters that indicate the number of items within that Menu Item's category, or be disabled entirely. These details are established within the `[array]` passed into the `options` prop on the Dropdown Menu component.
838
-
839
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
840
-
841
- | **Default** | **Hover** | **Selected** | **Disabled** |
842
- | ----------- | --------- | ------------ | ------------ |
843
-
844
- **MenuItem**
845
-
846
- ---
847
-
848
- **MenuItem**
849
-
850
- ---
851
-
852
- **MenuItem**
853
-
854
- ---
855
-
856
- **MenuItem**
857
-
858
- ---
859
-
860
- | **Default + Count** | **Hover** | **Selected** | **Disabled** |
861
- | ------------------- | --------- | ------------ | ------------ |
862
-
863
- **MenuItem**
864
-
865
- ---
866
-
867
- **MenuItem**
868
-
869
- ---
870
-
871
- **MenuItem**
872
-
873
- ---
874
-
875
- **MenuItem**
876
-
877
- ---
878
-
879
- | **Default + Details** | **Hover** | **Selected** | **Disabled** |
880
- | --------------------- | --------- | ------------ | ------------ |
881
-
882
- **MenuItem**
883
-
884
- ---
885
-
886
- **MenuItem**
887
-
888
- ---
889
-
890
- **MenuItem**
891
-
892
- ---
893
-
894
- **MenuItem**
895
-
896
- ---
897
-
898
- ## Code
899
-
900
- ## Dropdown Menu Component
901
-
902
- | Below you will find interactive Storybook iframes for the Dropdown Menu. 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:** DropdownMenu |
903
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------- |
904
-
905
- ---
906
-
907
- > **NOTE:** The Dropdown Menu and its affiliated components have undergone a major overhaul in their construction and how they have been coded, rendering the documentation below out of date.
908
- >
909
- > While the SDS works on updating the documentation to reflect these changes, see `src/core/Dropdown/index.stories.tsx` within the `sci-components` codebase for example usage of the new Dropdown Menu structure.
910
-
911
- ### DropdownMenu
912
-
913
- Storybook