@czi-sds/mcp 0.5.2 → 0.5.4

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 (42) hide show
  1. package/data/component-list.json +1 -0
  2. package/data/component-props/NavigationHeader.json +4 -0
  3. package/data/tailwind.json +25 -25
  4. package/data/zeroheight-cache.json +5065 -1
  5. package/data/zeroheight-exports/Accordion.md +79 -22
  6. package/data/zeroheight-exports/Banner.md +102 -10
  7. package/data/zeroheight-exports/Buttons.md +1010 -1461
  8. package/data/zeroheight-exports/Callout.md +164 -11
  9. package/data/zeroheight-exports/Colors.md +1164 -41
  10. package/data/zeroheight-exports/Content-Card.md +148 -0
  11. package/data/zeroheight-exports/Control-Inputs.md +769 -72
  12. package/data/zeroheight-exports/Corners.md +8 -15
  13. package/data/zeroheight-exports/Dialog.md +190 -14
  14. package/data/zeroheight-exports/Downloads.md +116 -0
  15. package/data/zeroheight-exports/Dropdown-Input.md +612 -16
  16. package/data/zeroheight-exports/Dropdown-Menus.md +935 -0
  17. package/data/zeroheight-exports/Field-Inputs.md +430 -9
  18. package/data/zeroheight-exports/Filters.md +232 -9
  19. package/data/zeroheight-exports/Getting-Started.md +7 -9
  20. package/data/zeroheight-exports/Hero.md +152 -0
  21. package/data/zeroheight-exports/Icons.md +1854 -218
  22. package/data/zeroheight-exports/Intent.md +40 -0
  23. package/data/zeroheight-exports/Link.md +52 -6
  24. package/data/zeroheight-exports/Lists.md +360 -6
  25. package/data/zeroheight-exports/Loading-Indicator.md +6 -2
  26. package/data/zeroheight-exports/Navigation.md +324 -8
  27. package/data/zeroheight-exports/Notification.md +166 -16
  28. package/data/zeroheight-exports/Panel.md +68 -16
  29. package/data/zeroheight-exports/README.md +17 -19
  30. package/data/zeroheight-exports/Responsive-Design.md +52 -0
  31. package/data/zeroheight-exports/Search-Input.md +40 -2
  32. package/data/zeroheight-exports/Search.md +232 -2
  33. package/data/zeroheight-exports/Segmented-Control.md +34 -9
  34. package/data/zeroheight-exports/Table.md +452 -51
  35. package/data/zeroheight-exports/Tabs.md +534 -11
  36. package/data/zeroheight-exports/Tags.md +504 -14
  37. package/data/zeroheight-exports/Text-Link.md +90 -6
  38. package/data/zeroheight-exports/Theming.md +36 -6
  39. package/data/zeroheight-exports/Tooltips.md +453 -18
  40. package/data/zeroheight-exports/Typography.md +64 -32
  41. package/package.json +3 -3
  42. package/data/zeroheight-exports/Dropdown-Menu.md +0 -3883
@@ -0,0 +1,935 @@
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
+
30
+
31
+ **Default**
32
+
33
+ ---
34
+
35
+ ---
36
+
37
+
38
+
39
+ **Default + Search**
40
+
41
+ ---
42
+
43
+ ---
44
+
45
+ **Default + Sections**
46
+
47
+ ---
48
+
49
+ ### Data Format
50
+
51
+ Use the following configuration for the `[array]` passed into the `options` prop:
52
+
53
+ ```js
54
+ data = [
55
+ {
56
+ // section with a Header and Menu Item Details
57
+ dataRows: [
58
+ {
59
+ name: "Menu Item",
60
+ details: "Details",
61
+ },
62
+ {
63
+ name: "Menu Item",
64
+ details: "Details",
65
+ },
66
+ {
67
+ name: "Menu Item",
68
+ details: "Details",
69
+ },
70
+ ],
71
+ label: "Section One",
72
+ },
73
+ {
74
+ // section with Menu Item Counts
75
+ dataRows: [
76
+ {
77
+ name: "Menu Item",
78
+ count: 20,
79
+ },
80
+ {
81
+ name: "Menu Item",
82
+ count: 40,
83
+ },
84
+ {
85
+ name: "Menu Item",
86
+ count: 60,
87
+ },
88
+ ],
89
+ },
90
+ {
91
+ // section with disabled Menu Items
92
+ dataRows: [
93
+ {
94
+ name: "Menu Item",
95
+ disabled: true,
96
+ },
97
+ {
98
+ name: "Menu Item",
99
+ disabled: true,
100
+ },
101
+ {
102
+ name: "Menu Item",
103
+ disabled: true,
104
+ },
105
+ ],
106
+ },
107
+ ];
108
+ ```
109
+
110
+ ---
111
+
112
+ ### Dropdown Menu Spacing
113
+
114
+ These rules establish how much margin should exist between and around elements.
115
+
116
+ **Dropdown Menu spacing**
117
+
118
+ ---
119
+
120
+ ---
121
+
122
+ ## Common Configurations
123
+
124
+ 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.
125
+
126
+ Below are a number of common Dropdown Menu configurations, but by no means is this an exhaustive list:
127
+
128
+ | **Search + Count** | **Search + Sections** | **Search + Details** |
129
+ | ------------------ | --------------------- | -------------------- |
130
+
131
+ **Search + Count**
132
+
133
+ ---
134
+
135
+ **Search + Sections**
136
+
137
+ ---
138
+
139
+ **Search + Details**
140
+
141
+ ---
142
+
143
+ | **Sections + Details** | **Search + Sections + Details** | **Search + Sections + Count** |
144
+ | ---------------------- | ------------------------------- | ----------------------------- |
145
+
146
+ **Sections + Details**
147
+
148
+ ---
149
+
150
+ **Search + Sections + Details**
151
+
152
+ ---
153
+
154
+ **Search + Sections + Count**
155
+
156
+ ---
157
+
158
+ ---
159
+
160
+ ## Menu Item
161
+
162
+ | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
163
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
164
+
165
+ 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.
166
+
167
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
168
+
169
+ | **Default** | **Hover** | **Selected** | **Selected + Hover** | **Disabled** | **Selected + Disabled** |
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
+ **MenuItem**
193
+
194
+ ---
195
+
196
+ | **Default + Count** | **Hover** | **Selected** | **Selected + Hover** | **Disabled** | **Selected + Disabled** |
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
+ **MenuItem**
220
+
221
+ ---
222
+
223
+ | **Default + Details** | **Hover** | **Selected** | **Selected + Hover** | **Disabled** | **Selected + Disabled**  |
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
+ **MenuItem**
247
+
248
+ ---
249
+
250
+ ## Code
251
+
252
+ ## Dropdown Menu Component
253
+
254
+ | 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 |
255
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------- |
256
+
257
+ ---
258
+
259
+ > **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.
260
+ >
261
+ > 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.
262
+
263
+ > 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.
264
+
265
+ ### DropdownMenu
266
+
267
+ Storybook
268
+
269
+
270
+
271
+ ---
272
+
273
+ 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.
274
+
275
+ ## Overview
276
+
277
+ > **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.
278
+ >
279
+ > 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.
280
+
281
+ ## Dropdown Menu Variants
282
+
283
+ | 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 |
284
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
285
+
286
+ ---
287
+
288
+ ## Dropdown Menu
289
+
290
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
291
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
292
+
293
+ ### Single-select Dropdown Menu
294
+
295
+ 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]`.
296
+
297
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
298
+
299
+
300
+
301
+ **Default**
302
+
303
+ ---
304
+
305
+ ---
306
+
307
+ **Default + Title**
308
+
309
+ ---
310
+
311
+ ---
312
+
313
+ **Default + Search**
314
+
315
+ ---
316
+
317
+ ---
318
+
319
+ **Default + Sections**
320
+
321
+ ---
322
+
323
+ ### Multi-select Dropdown Menu
324
+
325
+ 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]`.
326
+
327
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
328
+
329
+
330
+
331
+ **Default**
332
+
333
+ ---
334
+
335
+ ---
336
+
337
+ **Default + Title**
338
+
339
+ ---
340
+
341
+ ---
342
+
343
+ **Default + Search**
344
+
345
+ ---
346
+
347
+ ---
348
+
349
+ **Default + Sections**
350
+
351
+ ---
352
+
353
+ ### Data Format
354
+
355
+ Use the following configuration for the `[array]` passed into the `options` prop:
356
+
357
+ ```js
358
+ data = [
359
+ {
360
+ // section with a Header and Menu Item Details
361
+ dataRows: [
362
+ {
363
+ name: "Menu Item",
364
+ details: "Details",
365
+ },
366
+ {
367
+ name: "Menu Item",
368
+ details: "Details",
369
+ },
370
+ {
371
+ name: "Menu Item",
372
+ details: "Details",
373
+ },
374
+ ],
375
+ label: "Section One",
376
+ },
377
+ {
378
+ // section with Menu Item Counts
379
+ dataRows: [
380
+ {
381
+ name: "Menu Item",
382
+ count: 20,
383
+ },
384
+ {
385
+ name: "Menu Item",
386
+ count: 40,
387
+ },
388
+ {
389
+ name: "Menu Item",
390
+ count: 60,
391
+ },
392
+ ],
393
+ },
394
+ ];
395
+ ```
396
+
397
+ ---
398
+
399
+ ### Dropdown Menu Spacing
400
+
401
+ These rules establish how much margin should exist between and around elements.
402
+
403
+ **Dropdown Menu Spacing**
404
+
405
+ ---
406
+
407
+ ---
408
+
409
+ ## Common Configurations
410
+
411
+ 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.
412
+
413
+ Below are a number of common Dropdown Menu configurations, but by no means is this an exhaustive list:
414
+
415
+ | **Title + Count** | **Search + Sections + Details** | **Title + Details** |
416
+ | ----------------- | ------------------------------- | ------------------- |
417
+
418
+ **Title + Count**
419
+
420
+ ---
421
+
422
+ **Search + Sections + Details**
423
+
424
+ ---
425
+
426
+ **Title + Details**
427
+
428
+ ---
429
+
430
+ | **Search + Details** | **Title + Search + Count** | **Title + Sections + Details** |
431
+ | -------------------- | -------------------------- | ------------------------------ |
432
+
433
+ **Search + Details**
434
+
435
+ ---
436
+
437
+ **Search + Title + Count**
438
+
439
+ ---
440
+
441
+ **Title + Sections + Details**
442
+
443
+ ---
444
+
445
+ ---
446
+
447
+ ## Menu Item
448
+
449
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
450
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
451
+
452
+ ### Single-select Menu Item
453
+
454
+ 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.
455
+
456
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
457
+
458
+ | **Default** | **Hover** | **Selected** | **Disabled** |
459
+ | ----------- | --------- | ------------ | ------------ |
460
+
461
+ **MenuItem**
462
+
463
+ ---
464
+
465
+ **MenuItem**
466
+
467
+ ---
468
+
469
+ **MenuItem**
470
+
471
+ ---
472
+
473
+ **MenuItem**
474
+
475
+ ---
476
+
477
+ | **Default + Count** | **Hover** | **Selected** | **Disabled** |
478
+ | ------------------- | --------- | ------------ | ------------ |
479
+
480
+ **MenuItem**
481
+
482
+ ---
483
+
484
+ **MenuItem**
485
+
486
+ ---
487
+
488
+ **MenuItem**
489
+
490
+ ---
491
+
492
+ **MenuItem**
493
+
494
+ ---
495
+
496
+ | **Default + Details** | **Hover** | **Selected** | **Disabled** |
497
+ | --------------------- | --------- | ------------ | ------------ |
498
+
499
+ **MenuItem**
500
+
501
+ ---
502
+
503
+ **MenuItem**
504
+
505
+ ---
506
+
507
+ **MenuItem**
508
+
509
+ ---
510
+
511
+ **MenuItem**
512
+
513
+ ---
514
+
515
+
516
+
517
+ ### Multi-select Menu Item
518
+
519
+ 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.
520
+
521
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
522
+
523
+ | **Default** | **Hover** | **Selected** | **Disabled** |
524
+ | ----------- | --------- | ------------ | ------------ |
525
+
526
+ **MenuItem**
527
+
528
+ ---
529
+
530
+ **MenuItem**
531
+
532
+ ---
533
+
534
+ **MenuItem**
535
+
536
+ ---
537
+
538
+ **MenuItem**
539
+
540
+ ---
541
+
542
+ | **Default + Count** | **Hover** | **Selected** | **Disabled** |
543
+ | ------------------- | --------- | ------------ | ------------ |
544
+
545
+ **MenuItem**
546
+
547
+ ---
548
+
549
+ **MenuItem**
550
+
551
+ ---
552
+
553
+ **MenuItem**
554
+
555
+ ---
556
+
557
+ **MenuItem**
558
+
559
+ ---
560
+
561
+ | **Default + Details** | **Hover** | **Selected** | **Disabled** |
562
+ | --------------------- | --------- | ------------ | ------------ |
563
+
564
+ **MenuItem**
565
+
566
+ ---
567
+
568
+ **MenuItem**
569
+
570
+ ---
571
+
572
+ **MenuItem**
573
+
574
+ ---
575
+
576
+ **MenuItem**
577
+
578
+ ---
579
+
580
+ ## Code
581
+
582
+ ## Dropdown Menu Component
583
+
584
+ | 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 |
585
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------- |
586
+
587
+ ---
588
+
589
+ > **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.
590
+ >
591
+ > 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.
592
+
593
+ > 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.
594
+
595
+ ### DropdownMenu
596
+
597
+ Storybook
598
+
599
+ ---
600
+
601
+ 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.
602
+
603
+ ## Overview
604
+
605
+ > **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.
606
+ >
607
+ > 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.
608
+
609
+ ## Dropdown Menu Variants
610
+
611
+ | 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 |
612
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
613
+
614
+ ---
615
+
616
+ ## Dropdown Menu
617
+
618
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
619
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
620
+
621
+ ### Single-select Dropdown Menu
622
+
623
+ 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]`.
624
+
625
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
626
+
627
+
628
+
629
+ **Default**
630
+
631
+ ---
632
+
633
+ ---
634
+
635
+ **Default + Title**
636
+
637
+ ---
638
+
639
+ ---
640
+
641
+ **Default + Search**
642
+
643
+ ---
644
+
645
+ ---
646
+
647
+ **Default + Sections**
648
+
649
+ ---
650
+
651
+
652
+
653
+ ### Multi-select Dropdown Menu
654
+
655
+ 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]`.
656
+
657
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
658
+
659
+
660
+
661
+ **Default**
662
+
663
+ ---
664
+
665
+ ---
666
+
667
+ **Default + Title**
668
+
669
+ ---
670
+
671
+ ---
672
+
673
+ **Default + Search**
674
+
675
+ ---
676
+
677
+ ---
678
+
679
+ **Default + Sections**
680
+
681
+ ---
682
+
683
+ ---
684
+
685
+ **Default + Buttons**
686
+
687
+ ---
688
+
689
+ ---
690
+
691
+ ### Data Format
692
+
693
+ Use the following configuration for the `[array]` passed into the `options` prop:
694
+
695
+ ```js
696
+ data = [
697
+ {
698
+ // section with a Header and Menu Item Details
699
+ dataRows: [
700
+ {
701
+ name: "Menu Item",
702
+ details: "Details",
703
+ },
704
+ {
705
+ name: "Menu Item",
706
+ details: "Details",
707
+ },
708
+ {
709
+ name: "Menu Item",
710
+ details: "Details",
711
+ },
712
+ ],
713
+ label: "Section One",
714
+ },
715
+ {
716
+ // section with Menu Item Counts
717
+ dataRows: [
718
+ {
719
+ name: "Menu Item",
720
+ count: 20,
721
+ },
722
+ {
723
+ name: "Menu Item",
724
+ count: 40,
725
+ },
726
+ {
727
+ name: "Menu Item",
728
+ count: 60,
729
+ },
730
+ ],
731
+ },
732
+ ];
733
+ ```
734
+
735
+ ---
736
+
737
+ ### Dropdown Menu Spacing
738
+
739
+ These rules establish how much margin should exist between and around elements.
740
+
741
+ **Dropdown Menu Spacing**
742
+
743
+ ---
744
+
745
+ ---
746
+
747
+ ## Common Configurations
748
+
749
+ 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.
750
+
751
+ Below are a number of common Dropdown Menu configurations, but by no means is this an exhaustive list:
752
+
753
+ | **Title + Count** | **Search + Sections + Details** | **Title + Details** |
754
+ | ----------------- | ------------------------------- | ------------------- |
755
+
756
+ **Title + Count**
757
+
758
+ ---
759
+
760
+ **Search + Sections + Details**
761
+
762
+ ---
763
+
764
+ **Title + Details**
765
+
766
+ ---
767
+
768
+ | **Search + Details** | **Title + Search + Count** | **Title + Sections + Details** |
769
+ | -------------------- | -------------------------- | ------------------------------ |
770
+
771
+ **Search + Details**
772
+
773
+ ---
774
+
775
+ **Search + Title + Count**
776
+
777
+ ---
778
+
779
+ **Title + Sections + Details**
780
+
781
+ ---
782
+
783
+ ---
784
+
785
+ ## Menu Item
786
+
787
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
788
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
789
+
790
+ ### Single-select Menu Item
791
+
792
+ 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.
793
+
794
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
795
+
796
+ | **Default** | **Hover** | **Selected** | **Disabled** |
797
+ | ----------- | --------- | ------------ | ------------ |
798
+
799
+ **MenuItem**
800
+
801
+ ---
802
+
803
+ **MenuItem**
804
+
805
+ ---
806
+
807
+ **MenuItem**
808
+
809
+ ---
810
+
811
+ **MenuItem**
812
+
813
+ ---
814
+
815
+ | **Default + Count** | **Hover** | **Selected** | **Disabled** |
816
+ | ------------------- | --------- | ------------ | ------------ |
817
+
818
+ **MenuItem**
819
+
820
+ ---
821
+
822
+ **MenuItem**
823
+
824
+ ---
825
+
826
+ **MenuItem**
827
+
828
+ ---
829
+
830
+ **MenuItem**
831
+
832
+ ---
833
+
834
+ | **Default + Details** | **Hover** | **Selected** | **Disabled** |
835
+ | --------------------- | --------- | ------------ | ------------ |
836
+
837
+ **MenuItem**
838
+
839
+ ---
840
+
841
+ **MenuItem**
842
+
843
+ ---
844
+
845
+ **MenuItem**
846
+
847
+ ---
848
+
849
+ **MenuItem**
850
+
851
+ ---
852
+
853
+
854
+
855
+ ### Multi-select Menu Item
856
+
857
+ 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.
858
+
859
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
860
+
861
+ | **Default** | **Hover** | **Selected** | **Disabled** |
862
+ | ----------- | --------- | ------------ | ------------ |
863
+
864
+ **MenuItem**
865
+
866
+ ---
867
+
868
+ **MenuItem**
869
+
870
+ ---
871
+
872
+ **MenuItem**
873
+
874
+ ---
875
+
876
+ **MenuItem**
877
+
878
+ ---
879
+
880
+ | **Default + Count** | **Hover** | **Selected** | **Disabled** |
881
+ | ------------------- | --------- | ------------ | ------------ |
882
+
883
+ **MenuItem**
884
+
885
+ ---
886
+
887
+ **MenuItem**
888
+
889
+ ---
890
+
891
+ **MenuItem**
892
+
893
+ ---
894
+
895
+ **MenuItem**
896
+
897
+ ---
898
+
899
+ | **Default + Details** | **Hover** | **Selected** | **Disabled** |
900
+ | --------------------- | --------- | ------------ | ------------ |
901
+
902
+ **MenuItem**
903
+
904
+ ---
905
+
906
+ **MenuItem**
907
+
908
+ ---
909
+
910
+ **MenuItem**
911
+
912
+ ---
913
+
914
+ **MenuItem**
915
+
916
+ ---
917
+
918
+ ## Code
919
+
920
+ ## Dropdown Menu Component
921
+
922
+ | 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 |
923
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------- |
924
+
925
+ ---
926
+
927
+ > **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.
928
+ >
929
+ > 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.
930
+
931
+ ### DropdownMenu
932
+
933
+ Storybook
934
+
935
+