@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,931 +0,0 @@
1
- # Callouts
2
-
3
- Callouts are used within the flow of the page to highlight information to the user whether in response to an action they have completed or to bring their attention to important details.
4
-
5
- ## Overview
6
-
7
- ## Callout Variants
8
-
9
- | Callouts come in three different variants for designers to use depending on the type of information they need to display and whether they want the user to have the ability to manually dismiss them or not. All Callout variants can be set to automatically dismiss after a designated period of time (8 seconds by default). Callouts appear within the flow of the page as opposed to Notifications which appear outside of the page's flow on top of other elements. They span the full width of the `<div>` they are placed within. Follow the usage criteria accompanying each variant as a guide for selecting the correct Callout for any given use case. | | **Jump to variant:** Persistent Dismissible Expandable Intent Variations |
10
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- | ------------------------------------------------------------------------ |
11
-
12
- ---
13
-
14
- ## Callout
15
-
16
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
17
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
18
-
19
- ### Persistent Callout
20
-
21
- Use when communicating information that is intended to remain persistent on the screen and is not manually dismissible by the user. It can be set to automatically dismiss after a designated period of time using the `autoDismiss` prop; when set to `true`, the automatic dismissal will occur after 8 milliseconds by default, but can be set to a custom length of time by entering a millisecond value into the prop.
22
-
23
- Used in CZ GEN EPI to display warnings, errors, and supplemental information to users in reaction to actions they have taken in a flow.
24
-
25
- An additional block of text can be added in addition to the Callout's title if more space is needed to communicate the Callout's message.
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 + Child Node (alert text)**
36
-
37
- ---
38
-
39
- ### Dismissible Callout
40
-
41
- Use when communicating information that is manually dismissible by the user and does not need to remain persistent on the screen. It can be set to automatically dismiss after a designated period of time using the `autoDismiss` prop; when set to `true`, the automatic dismissal will occur after 8 milliseconds by default, but can be set to a custom length of time by entering a millisecond value into the prop.
42
-
43
- Used in CZ GEN EPI to highlight helpful information to users when viewing a page; typically placed at the top of the page.
44
-
45
- An additional block of text can be added in addition to the Callout's title if more space is needed to communicate the Callout's message.
46
-
47
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
48
-
49
- **Default**
50
-
51
- ---
52
-
53
- ---
54
-
55
- **Default + Child Node (alert text)**
56
-
57
- ---
58
-
59
- ### Expandable Callout
60
-
61
- Use when communicating a lengthy amount of information, most of which is hidden by default within an accordion. This Callout variant is intended to remain persistent on the screen and is not manually dismissible by the user. It can be set to automatically dismiss after a designated period of time using the `autoDismiss` prop; when set to `true`, the automatic dismissal will occur after 8 milliseconds by default, but can be set to a custom length of time by entering a millisecond value into the prop.
62
-
63
- An additional block of text can be added in addition to the Callout's title if more space is needed to communicate the Callout's message.
64
-
65
- Additional content, whether more text or relevant components, can be included in the content module block within the accordion.
66
-
67
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
68
-
69
- **Default (collapsed) + Child Node (content module)**
70
-
71
- ---
72
-
73
- ---
74
-
75
- **Default (expanded) + Child Node (content module)**
76
-
77
- ---
78
-
79
- ---
80
-
81
- **Default (collapsed) + Child Node (alert text) + Child Node (content module)**
82
-
83
- ---
84
-
85
- ---
86
-
87
- **Default (expanded) + Child Node (alert text) + Child Node (content module)**
88
-
89
- ---
90
-
91
- ### Callout Spacing
92
-
93
- These rules establish how much margin should exist between and around elements.
94
-
95
- **Callout spacing**
96
-
97
- ---
98
-
99
- ---
100
-
101
- ### Intent Variations
102
-
103
- There are four different intents that all Callout variants can communicate—Info, Error, Success, and Warning—indicated with the use of color and iconography and selected using the `intent` prop.
104
-
105
- Each intent is demonstrated below using the Persistent Callout for reference. Regardless of variant, the colors and icons used are the same:
106
-
107
- | **Error** | **Info** |
108
- | --------- | -------- |
109
-
110
- **Callout**
111
-
112
- ---
113
-
114
- **Callout**
115
-
116
- ---
117
-
118
- | **Success** | **Warning** |
119
- | ----------- | ----------- |
120
-
121
- **Callout**
122
-
123
- ---
124
-
125
- **Callout**
126
-
127
- ---
128
-
129
- ## Code
130
-
131
- ## Callout Component
132
-
133
- | Below you will find an interactive Storybook iframe for Callouts. 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:** Callout |
134
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------ |
135
-
136
- ---
137
-
138
- > 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.
139
-
140
- ### Callout
141
-
142
- Storybook
143
-
144
- ---
145
-
146
- Callouts are used within the flow of the page to highlight information to the user whether in response to an action they have completed or to bring their attention to important details.
147
-
148
- ## Overview
149
-
150
- ## Callout Variants
151
-
152
- | Callouts come in three different variants for designers to use depending on the type of information they need to display and whether they want the user to have the ability to manually dismiss them or not. All Callout variants can be set to automatically dismiss after a designated period of time (8 seconds by default). Callouts appear within the flow of the page as opposed to Notifications which appear outside of the page's flow on top of other elements. They span the full width of the `<div>` they are placed within. Follow the usage criteria accompanying each variant as a guide for selecting the correct Callout for any given use case. | | **Jump to variant:** Persistent Dismissible Expandable Intent Variations |
153
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- | ------------------------------------------------------------------------ |
154
-
155
- ---
156
-
157
- ## Callout
158
-
159
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
160
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
161
-
162
- ### Persistent Callout
163
-
164
- Use when communicating information that is intended to remain persistent on the screen and is not manually dismissible by the user. It can be set to automatically dismiss after a designated period of time using the `autoDismiss` prop; when set to `true`, the automatic dismissal will occur after 8 milliseconds by default, but can be set to a custom length of time by entering a millisecond value into the prop.
165
-
166
- Used in CZ ID to display warnings, errors, and supplemental information to users in reaction to actions they have taken in a flow.
167
-
168
- An additional block of text can be added in addition to the Callout's title if more space is needed to communicate the Callout's message.
169
-
170
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
171
-
172
- **Default**
173
-
174
- ---
175
-
176
- ---
177
-
178
- **Default + Child Node (alert text)**
179
-
180
- ---
181
-
182
- ### Dismissible Callout
183
-
184
- Use when communicating information that is manually dismissible by the user and does not need to remain persistent on the screen. It can be set to automatically dismiss after a designated period of time using the `autoDismiss` prop; when set to `true`, the automatic dismissal will occur after 8 milliseconds by default, but can be set to a custom length of time by entering a millisecond value into the prop.
185
-
186
- Used in CZ ID to highlight helpful information to users when viewing a page; typically placed at the top of the page.
187
-
188
- An additional block of text can be added in addition to the Callout's title if more space is needed to communicate the Callout's message.
189
-
190
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
191
-
192
- **Default**
193
-
194
- ---
195
-
196
- ---
197
-
198
- **Default + Child Node (alert text)**
199
-
200
- ---
201
-
202
- ### Expandable Callout
203
-
204
- Use when communicating a lengthy amount of information, most of which is hidden by default within an accordion. This Callout variant is intended to remain persistent on the screen and is not manually dismissible by the user. It can be set to automatically dismiss after a designated period of time using the `autoDismiss` prop; when set to `true`, the automatic dismissal will occur after 8 milliseconds by default, but can be set to a custom length of time by entering a millisecond value into the prop.
205
-
206
- An additional block of text can be added in addition to the Callout's title if more space is needed to communicate the Callout's message.
207
-
208
- Additional content, whether more text or relevant components, can be included in the content module block within the accordion.
209
-
210
- Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
211
-
212
- **Default (collapsed) + Child Node (content module)**
213
-
214
- ---
215
-
216
- ---
217
-
218
- **Default (expanded) + Child Node (content module)**
219
-
220
- ---
221
-
222
- ---
223
-
224
- **Default (collapsed) + Child Node (alert text) + Child Node (content module)**
225
-
226
- ---
227
-
228
- ---
229
-
230
- **Default (expanded) + Child Node (alert text) + Child Node (content module)**
231
-
232
- ---
233
-
234
- ---
235
-
236
- ### Callout Spacing
237
-
238
- These rules establish how much margin should exist between and around elements.
239
-
240
- **Callout spacing**
241
-
242
- ---
243
-
244
- ---
245
-
246
- ### Intent Variations
247
-
248
- There are four different intents that all Callout variants can communicate—Info, Error, Success, and Warning—indicated with the use of color and iconography and selected using the `intent` prop.
249
-
250
- Each intent is demonstrated below using the Persistent Callout for reference. Regardless of variant, the colors and icons used are the same:
251
-
252
- | **Error** | **Info** |
253
- | --------- | -------- |
254
-
255
- **Callout**
256
-
257
- ---
258
-
259
- **Callout**
260
-
261
- ---
262
-
263
- | **Success** | **Warning** |
264
- | ----------- | ----------- |
265
-
266
- **Callout**
267
-
268
- ---
269
-
270
- **Callout**
271
-
272
- ---
273
-
274
- ## Code
275
-
276
- ## Callout Component
277
-
278
- | Below you will find an interactive Storybook iframe for Callouts. 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:** Callout |
279
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------ |
280
-
281
- ---
282
-
283
- ### Callout
284
-
285
- Storybook
286
-
287
- ---
288
-
289
- Callouts are used within the flow of the page to highlight information to the user whether in response to an action they have completed or to bring their attention to important details.
290
-
291
- ## Guidelines
292
-
293
- ## Overview
294
-
295
- | | In Figma | | | Meets Accessibility | | | In Code |
296
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
297
-
298
- ### Callout Variants
299
-
300
- Callouts come in three different variants: Persistent, Dismissible, and Expandable. All Callout variants can be set to automatically dismiss after a designated period of time (8 seconds by default).
301
-
302
- Callouts appear within the flow of the page, unlike Notifications which appear outside of the page's flow on top of other elements. They span the full width of their container.
303
-
304
- **Preview_Guidelines_Callout_persistent**
305
-
306
- ---
307
-
308
- **Preview_Guidelines_Callout_dismissible**
309
-
310
- ---
311
-
312
- **Preview_Guidelines_Callout_expandable**
313
-
314
- ---
315
-
316
- ---
317
-
318
- ### Live Instance
319
-
320
- Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
321
-
322
- Default
323
-
324
- ---
325
-
326
- ### Callout – Persistent
327
-
328
- Use Callout – Persistent when communicating information that should remain on the screen and can't be manually dismissed by the user. Additional text may be displayed below the Callout's title.
329
-
330
- | Default | Default + Alert Text |
331
- | ------- | -------------------- |
332
-
333
- **Callout_persistent_default**
334
-
335
- ---
336
-
337
- **Callout_persistent_default+alert**
338
-
339
- ---
340
-
341
- ---
342
-
343
- ### Callout – Dismissible
344
-
345
- Use when communicating information that doesn't need to remain on the screen and, therefore, may be dismissed by the user. Additional text may be displayed below the Callout's title.
346
-
347
- | Default | Default + Alert Text |
348
- | ------- | -------------------- |
349
-
350
- **Callout_dismissible_default**
351
-
352
- ---
353
-
354
- **Callout_dismissible_default+alert**
355
-
356
- ---
357
-
358
- ---
359
-
360
- ### Callout – Expandable
361
-
362
- Use when communicating a lot of information that may be useful, but isn't strictly necessary for the user to see, since the additional content may be hidden by the Accordion. Additional text may be displayed below the Callout's title, outside of the accordion. This Callout variant remains on the screen and can't be manually dismissed by the user.
363
-
364
- | Collapsed | Collapsed + Alert Text | Expanded + Content Module | Expanded + Alert Text + Content Module |
365
- | --------- | ---------------------- | ------------------------- | -------------------------------------- |
366
-
367
- **Callout_expandable_default**
368
-
369
- ---
370
-
371
- **Callout_expandable_default+alert**
372
-
373
- ---
374
-
375
- **Callout_expandable_open**
376
-
377
- ---
378
-
379
- **Callout_expandable_open+alert**
380
-
381
- ---
382
-
383
- ---
384
-
385
- ### Callout Spacing
386
-
387
- These rules establish how much margin should exist between and around elements.
388
-
389
- **Callout spacing**
390
-
391
- ---
392
-
393
- ---
394
-
395
- ### Intent Variations
396
-
397
- There are four different intents that Callouts can communicate: Info, Negative, Notice, and Positive. Each intent is communicated using color and iconography.
398
-
399
- Each intent is demonstrated below using the Persistent variant for reference. Regardless of variant, the colors and icons used are the same.
400
-
401
- | Info | Negative | Notice | Positive |
402
- | ---- | -------- | ------ | -------- |
403
-
404
- **Callout_intent_info**
405
-
406
- ---
407
-
408
- **Callout_intent_error**
409
-
410
- ---
411
-
412
- **Callout_intent_warning**
413
-
414
- ---
415
-
416
- **Callout_intent_success**
417
-
418
- ---
419
-
420
- ## Code
421
-
422
- > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
423
-
424
- ## Callout
425
-
426
- ### SDS Source Code
427
-
428
- The component's source code in the SDS codebase can be found here.
429
-
430
- ### SDS vs MUI
431
-
432
- The SDS `Callout` component is built upon the MUI `Alert` component (as is the SDS `Notification` component), but there are some important differences:
433
-
434
- - **Color:** SDS's `Callout` component has its own `intent` prop designed for setting both the color and default icon, and takes the values of `"info"`, `"error"`, `"success"`, or `"warning"`. MUI's `Alert` instead uses the `severity` prop for this purpose (`severity` can also be used for SDS's `Notification`, and will take the same values as `intent`; this is not recommended)
435
- - **Titles:** SDS's `Callout` uses the `CalloutTitle` in place of the `AlertTitle` used by MUI's `Alert` to wrap title text. It is a stylized version of `AlertTitle`, and can be imported with `import { CalloutTitle } from "@czi-sds/components"`
436
- - **Expanding and closing:** SDS's `Callout` introduces a prop called `expandable` that, when `true`, allows any additional text (beyond the title text) to be visible or hidden by toggling a chevron (automatically added) in the top right of the callout (`expandable` should ideally only be used if there _is_ in fact text in addition to the title text; otherwise the chevron will still appear but will not do anything functional because there will be no extra text to reveal). If the ability to close the Callout is desired, pass a callback function to `onClose`, and SDS will automatically render a close button. SDS uses MUI's Alert `action` prop under the hood, in case there is a need to further override the behavior
437
- - **Transitions:** SDS's `Callout` uses the `Grow` transition component by default
438
- - **Icons:** Like with MUI's `Alert`, SDS's `Callout` also shows an icon to the left of the title text. This can be changed manually (it also changes automatically based on the `intent` setting; see first bullet). The format for setting the `icon` prop for SDS's `Notification` is slightly different than for MUI, in that it invokes the `Icon` component:
439
-
440
- `icon={<Icon sdsSize="l" sdsIcon="download" sdsType="static" />`
441
-
442
- Additionally, setting `icon={false}` has no effect, and `iconMapping` does not work to change icons associated to `intent` or `severity`.
443
-
444
- - **Variants:** The `variant` prop is not available for SDS's `Callout` component.
445
-
446
- ### MUI Documentation
447
-
448
- Documentation for the underlying MUI `Alert` component can be found here.
449
-
450
- ### Props
451
-
452
- Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
453
-
454
- | Name | Type | Default | Description |
455
- | ------------- | ----------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
456
- | `autoDismiss` | `bool` | `false` | Control the automatic dismissal behavior of `Callouts`. Specify a numeric value in milliseconds to set the duration after which the callout will automatically disappear. Alternatively, set `autoDismiss` to `false` to keep the callout visible until manually dismissed. |
457
- | `intent` | `"info"` ` | "negative"` ` | "positive"` ` | "notice"` | `-` | The color of the component. |
458
- | `icon` | `ReactNode` | `-` | Icon displayed to the left of the `Callout` title. |
459
- | `onClose` | `func` | `function(event: React.SyntheticEvent) => void` | Callback fired when the component requests to be closed. When provided and no action prop is set, a close icon button is displayed that triggers the callback when clicked. |
460
- | `title` | `string` | `-` | Callout title |
461
- | `hideTitle` | `boolean` | `false` | If set to `true`, Hides the Callout title |
462
- | `body` | `string` | `-` | Callout body |
463
- | `hideBody` | `boolean` | `false` | If set to `true`, Hides the Callout body |
464
- | `children` | `ReactNode` | `-` | Extra content to show in the component slot section of the Callout |
465
- | `sdsStyle` | ` | "persistent"`` | "expandable"`` | "dismissible"` | `"persistent"` | Defines the style of the Callout:  - "persistent": Cannot be closed.  - "expandable": Includes a chevron icon to toggle extra content visibility.  - "dismissible": Includes an “x” icon for manual dismissal. |
466
-
467
- ### Code examples
468
-
469
- #### Default Callout
470
-
471
- This example has the minimum props needed for the `Callout` component.
472
-
473
- **/styles.css**
474
-
475
- ```css
476
- body {
477
- font-size: 13px;
478
- font-weight: 400;
479
- letter-spacing: 0.08px;
480
- line-height: 20px;
481
- text-transform: none;
482
- font-family: "Inter", sans-serif;
483
- }
484
-
485
- h1 {
486
- font-size: 1.5rem;
487
- }
488
-
489
- .app {
490
- padding: 20px;
491
- }
492
- ```
493
-
494
- **tsconfig.json**
495
-
496
- ```json
497
- {
498
- "include": ["./**/*"],
499
- "compilerOptions": {
500
- "strict": true,
501
- "esModuleInterop": true,
502
- "lib": ["dom", "es2015"],
503
- "jsx": "react-jsx"
504
- }
505
- }
506
- ```
507
-
508
- **/App.tsx**
509
-
510
- ```tsx
511
- // Most minimal Callout (just has the basic requirements)
512
-
513
- import { Callout, CalloutTitle } from "@czi-sds/components";
514
- import "./styles.css";
515
-
516
- function App() {
517
- return (
518
- <div className="app">
519
- <Callout intent="info">
520
- <CalloutTitle>Callout box</CalloutTitle>
521
- The Callout Box component is a versatile UI element designed to draw
522
- attention to important information or messages within your interface.
523
- With its clean and elegant design, the Callout Box helps highlight key
524
- content, alerts, or contextual details.
525
- </Callout>
526
- </div>
527
- );
528
- }
529
-
530
- export default App;
531
- ```
532
-
533
- **/index.tsx**
534
-
535
- ```tsx
536
- import React from "react";
537
- import { createRoot } from "react-dom/client";
538
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
539
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
540
- import { Theme } from "@czi-sds/components";
541
- import CssBaseline from "@mui/material/CssBaseline";
542
- import useMediaQuery from "@mui/material/useMediaQuery";
543
-
544
- import App from "./App";
545
-
546
- const container = document.getElementById("root");
547
- const root = createRoot(container!);
548
-
549
- const RootApp = () => {
550
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
551
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
552
-
553
- return (
554
- <StyledEngineProvider injectFirst>
555
- <ThemeProvider theme={theme}>
556
- <EmotionThemeProvider theme={theme}>
557
- <CssBaseline />
558
- <App />
559
- </EmotionThemeProvider>
560
- </ThemeProvider>
561
- </StyledEngineProvider>
562
- );
563
- };
564
-
565
- root.render(
566
- <React.StrictMode>
567
- <RootApp />
568
- </React.StrictMode>
569
- );
570
- ```
571
-
572
- **/public/index.html**
573
-
574
- ```html
575
- <!doctype html>
576
- <html lang="en">
577
- <head>
578
- <meta charset="UTF-8" />
579
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
580
- <link rel="preconnect" href="https://fonts.googleapis.com" />
581
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
582
- <link
583
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
584
- rel="stylesheet"
585
- />
586
- <link
587
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
588
- rel="stylesheet"
589
- />
590
- </head>
591
- <body>
592
- <div id="root"></div>
593
- </body>
594
- </html>
595
- ```
596
-
597
- **/package.json**
598
-
599
- ```json
600
- {
601
- "dependencies": {
602
- "react": "^18.0.0",
603
- "react-dom": "^18.0.0",
604
- "react-scripts": "^4.0.0"
605
- },
606
- "devDependencies": {
607
- "@types/react": "^18.0.0",
608
- "@types/react-dom": "^18.0.0",
609
- "typescript": "^4.0.0"
610
- },
611
- "main": "/index.tsx"
612
- }
613
- ```
614
-
615
- ---
616
-
617
- #### Expandable Callout
618
-
619
- The Expandable `Callout` component provides an interactive and space-efficient way to present information. By default, it displays a brief summary, however, users can expand it to reveal more detailed content, similar to an accordion. This feature is particularly useful for sharing additional context or insights while keeping the initial interface clutter-free.
620
-
621
- **/styles.css**
622
-
623
- ```css
624
- body {
625
- font-size: 13px;
626
- font-weight: 400;
627
- letter-spacing: 0.08px;
628
- line-height: 20px;
629
- text-transform: none;
630
- font-family: "Inter", sans-serif;
631
- }
632
-
633
- h1 {
634
- font-size: 1.5rem;
635
- }
636
-
637
- .app {
638
- padding: 20px;
639
- }
640
- ```
641
-
642
- **tsconfig.json**
643
-
644
- ```json
645
- {
646
- "include": ["./**/*"],
647
- "compilerOptions": {
648
- "strict": true,
649
- "esModuleInterop": true,
650
- "lib": ["dom", "es2015"],
651
- "jsx": "react-jsx"
652
- }
653
- }
654
- ```
655
-
656
- **/App.tsx**
657
-
658
- ```tsx
659
- // Expandable Callout
660
-
661
- import { Callout, CalloutTitle } from "@czi-sds/components";
662
- import "./styles.css";
663
-
664
- function App() {
665
- return (
666
- <div className="app">
667
- <Callout intent="notice" expandable>
668
- <CalloutTitle>Attention Required</CalloutTitle>
669
- The Warning Callout serves as a visual alert to draw immediate attention
670
- to critical information that requires action or consideration. Its
671
- distinct appearance, coupled with the "Attention Required" message,
672
- signals urgency and prompts users to take appropriate steps. Use this
673
- component strategically to ensure vital messages are noticed promptly
674
- and acted upon, enhancing user awareness and responsiveness.
675
- </Callout>
676
- </div>
677
- );
678
- }
679
-
680
- export default App;
681
- ```
682
-
683
- **/index.tsx**
684
-
685
- ```tsx
686
- import React from "react";
687
- import { createRoot } from "react-dom/client";
688
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
689
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
690
- import { Theme } from "@czi-sds/components";
691
- import CssBaseline from "@mui/material/CssBaseline";
692
- import useMediaQuery from "@mui/material/useMediaQuery";
693
-
694
- import App from "./App";
695
-
696
- const container = document.getElementById("root");
697
- const root = createRoot(container!);
698
-
699
- const RootApp = () => {
700
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
701
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
702
-
703
- return (
704
- <StyledEngineProvider injectFirst>
705
- <ThemeProvider theme={theme}>
706
- <EmotionThemeProvider theme={theme}>
707
- <CssBaseline />
708
- <App />
709
- </EmotionThemeProvider>
710
- </ThemeProvider>
711
- </StyledEngineProvider>
712
- );
713
- };
714
-
715
- root.render(
716
- <React.StrictMode>
717
- <RootApp />
718
- </React.StrictMode>
719
- );
720
- ```
721
-
722
- **/public/index.html**
723
-
724
- ```html
725
- <!doctype html>
726
- <html lang="en">
727
- <head>
728
- <meta charset="UTF-8" />
729
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
730
- <link rel="preconnect" href="https://fonts.googleapis.com" />
731
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
732
- <link
733
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
734
- rel="stylesheet"
735
- />
736
- <link
737
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
738
- rel="stylesheet"
739
- />
740
- </head>
741
- <body>
742
- <div id="root"></div>
743
- </body>
744
- </html>
745
- ```
746
-
747
- **/package.json**
748
-
749
- ```json
750
- {
751
- "dependencies": {
752
- "react": "^18.0.0",
753
- "react-dom": "^18.0.0",
754
- "react-scripts": "^4.0.0"
755
- },
756
- "devDependencies": {
757
- "@types/react": "^18.0.0",
758
- "@types/react-dom": "^18.0.0",
759
- "typescript": "^4.0.0"
760
- },
761
- "main": "/index.tsx"
762
- }
763
- ```
764
-
765
- ---
766
-
767
- #### Dismissible Callout
768
-
769
- The dismissible `Callout` variant provides users with the ability to dismiss it at their convenience. It includes a close button located in the top right corner, offering a familiar interaction pattern for users to remove the `Callout` from view. Moreover, the `onClose` prop allows developers to define custom actions that are triggered when the `Callout` is closed.
770
-
771
- **/styles.css**
772
-
773
- ```css
774
- body {
775
- font-size: 13px;
776
- font-weight: 400;
777
- letter-spacing: 0.08px;
778
- line-height: 20px;
779
- text-transform: none;
780
- font-family: "Inter", sans-serif;
781
- }
782
-
783
- h1 {
784
- font-size: 1.5rem;
785
- }
786
-
787
- .app {
788
- padding: 20px;
789
- }
790
- ```
791
-
792
- **tsconfig.json**
793
-
794
- ```json
795
- {
796
- "include": ["./**/*"],
797
- "compilerOptions": {
798
- "strict": true,
799
- "esModuleInterop": true,
800
- "lib": ["dom", "es2015"],
801
- "jsx": "react-jsx"
802
- }
803
- }
804
- ```
805
-
806
- **/App.tsx**
807
-
808
- ```tsx
809
- // Closable Callout
810
-
811
- import { useState } from "react";
812
- import { Callout, CalloutTitle, Button } from "@czi-sds/components";
813
- import "./styles.css";
814
-
815
- function App() {
816
- const [dismissed, setDismissed] = useState(false);
817
- const handleClick = () => {
818
- setDismissed((prev) => !prev);
819
- };
820
- return (
821
- <div className="app">
822
- {!dismissed ? (
823
- <Callout
824
- intent="negative"
825
- dismissed={dismissed}
826
- onClose={() => {
827
- console.log("Callout closed!");
828
- setDismissed(true);
829
- }}
830
- >
831
- <CalloutTitle>An Error Occurred</CalloutTitle>
832
- The Error Callout is a crucial component for communicating critical
833
- errors or issues to users. With its distinct appearance and the
834
- message "An Error Occurred," it ensures that users are immediately
835
- informed about unexpected situations that require attention.
836
- </Callout>
837
- ) : (
838
- <Button onClick={handleClick} sdsType="primary" sdsStyle="rounded">
839
- Reset Callout
840
- </Button>
841
- )}
842
- </div>
843
- );
844
- }
845
-
846
- export default App;
847
- ```
848
-
849
- **/index.tsx**
850
-
851
- ```tsx
852
- import React from "react";
853
- import { createRoot } from "react-dom/client";
854
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
855
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
856
- import { Theme } from "@czi-sds/components";
857
- import CssBaseline from "@mui/material/CssBaseline";
858
- import useMediaQuery from "@mui/material/useMediaQuery";
859
-
860
- import App from "./App";
861
-
862
- const container = document.getElementById("root");
863
- const root = createRoot(container!);
864
-
865
- const RootApp = () => {
866
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
867
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
868
-
869
- return (
870
- <StyledEngineProvider injectFirst>
871
- <ThemeProvider theme={theme}>
872
- <EmotionThemeProvider theme={theme}>
873
- <CssBaseline />
874
- <App />
875
- </EmotionThemeProvider>
876
- </ThemeProvider>
877
- </StyledEngineProvider>
878
- );
879
- };
880
-
881
- root.render(
882
- <React.StrictMode>
883
- <RootApp />
884
- </React.StrictMode>
885
- );
886
- ```
887
-
888
- **/public/index.html**
889
-
890
- ```html
891
- <!doctype html>
892
- <html lang="en">
893
- <head>
894
- <meta charset="UTF-8" />
895
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
896
- <link rel="preconnect" href="https://fonts.googleapis.com" />
897
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
898
- <link
899
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
900
- rel="stylesheet"
901
- />
902
- <link
903
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
904
- rel="stylesheet"
905
- />
906
- </head>
907
- <body>
908
- <div id="root"></div>
909
- </body>
910
- </html>
911
- ```
912
-
913
- **/package.json**
914
-
915
- ```json
916
- {
917
- "dependencies": {
918
- "react": "^18.0.0",
919
- "react-dom": "^18.0.0",
920
- "react-scripts": "^4.0.0"
921
- },
922
- "devDependencies": {
923
- "@types/react": "^18.0.0",
924
- "@types/react-dom": "^18.0.0",
925
- "typescript": "^4.0.0"
926
- },
927
- "main": "/index.tsx"
928
- }
929
- ```
930
-
931
- ---