@czi-sds/mcp 0.2.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/data/component-props/Accordion.json +14 -15
  2. package/data/component-props/Alert.json +2 -44
  3. package/data/component-props/Autocomplete.json +14 -32
  4. package/data/component-props/Banner.json +11 -12
  5. package/data/component-props/Button.json +17 -82
  6. package/data/component-props/ButtonDropdown.json +26 -0
  7. package/data/component-props/ButtonIcon.json +4 -60
  8. package/data/component-props/ButtonToggle.json +2 -66
  9. package/data/component-props/Callout.json +11 -65
  10. package/data/component-props/CellBasic.json +28 -56
  11. package/data/component-props/CellComponent.json +4 -32
  12. package/data/component-props/CellHeader.json +13 -49
  13. package/data/component-props/ComplexFilter.json +24 -4
  14. package/data/component-props/ContentCard.json +66 -2
  15. package/data/component-props/Dialog.json +26 -0
  16. package/data/component-props/Dropdown.json +29 -67
  17. package/data/component-props/DropdownMenu.json +16 -56
  18. package/data/component-props/HeatmapChart.json +6 -87
  19. package/data/component-props/Icon.json +3 -8
  20. package/data/component-props/InputCheckbox.json +5 -53
  21. package/data/component-props/InputDropdown.json +11 -33
  22. package/data/component-props/InputRadio.json +5 -53
  23. package/data/component-props/InputSearch.json +6 -70
  24. package/data/component-props/InputSlider.json +21 -35
  25. package/data/component-props/InputText.json +7 -63
  26. package/data/component-props/InputToggle.json +5 -54
  27. package/data/component-props/Link.json +18 -0
  28. package/data/component-props/LoadingIndicator.json +1 -2
  29. package/data/component-props/MenuItem.json +11 -41
  30. package/data/component-props/MenuSelect.json +4 -67
  31. package/data/component-props/NavigationFooter.json +0 -8
  32. package/data/component-props/NavigationHeader.json +14 -65
  33. package/data/component-props/NavigationJumpTo.json +0 -40
  34. package/data/component-props/Notification.json +14 -58
  35. package/data/component-props/Pagination.json +8 -33
  36. package/data/component-props/Panel.json +4 -54
  37. package/data/component-props/SegmentedControl.json +0 -55
  38. package/data/component-props/TableRow.json +10 -38
  39. package/data/component-props/Tabs.json +18 -0
  40. package/data/component-props/Tag.json +10 -56
  41. package/data/component-props/TagFilter.json +0 -47
  42. package/data/component-props/Tooltip.json +12 -61
  43. package/data/component-props/TooltipCondensed.json +18 -0
  44. package/data/component-props/TooltipTable.json +0 -4
  45. package/data/zeroheight-cache.json +5195 -0
  46. package/data/zeroheight-exports/Accordion.md +717 -0
  47. package/data/zeroheight-exports/Banner.md +599 -0
  48. package/data/zeroheight-exports/Borders.md +117 -0
  49. package/data/zeroheight-exports/Buttons.md +2305 -0
  50. package/data/zeroheight-exports/Callout.md +778 -0
  51. package/data/zeroheight-exports/Colors.md +632 -0
  52. package/data/zeroheight-exports/Content-Card.md +161 -0
  53. package/data/zeroheight-exports/Contributing-to-SDS.md +98 -0
  54. package/data/zeroheight-exports/Control-Inputs.md +2121 -0
  55. package/data/zeroheight-exports/Corners.md +111 -0
  56. package/data/zeroheight-exports/Cover-page.md +3 -0
  57. package/data/zeroheight-exports/Dialog.md +1191 -0
  58. package/data/zeroheight-exports/Downloads.md +120 -0
  59. package/data/zeroheight-exports/Drop-Shadows.md +79 -0
  60. package/data/zeroheight-exports/Dropdown-Input.md +1180 -0
  61. package/data/zeroheight-exports/Dropdown-Menu.md +3883 -0
  62. package/data/zeroheight-exports/Element-Status-Tracker.md +267 -0
  63. package/data/zeroheight-exports/Field-Inputs.md +984 -0
  64. package/data/zeroheight-exports/Filters.md +888 -0
  65. package/data/zeroheight-exports/Getting-Started.md +1159 -0
  66. package/data/zeroheight-exports/Hero.md +262 -0
  67. package/data/zeroheight-exports/Icons.md +431 -0
  68. package/data/zeroheight-exports/Intent.md +46 -0
  69. package/data/zeroheight-exports/Introduction-to-Bases.md +35 -0
  70. package/data/zeroheight-exports/Introduction-to-Cells.md +35 -0
  71. package/data/zeroheight-exports/Introduction-to-DNA.md +35 -0
  72. package/data/zeroheight-exports/Introduction-to-Genes.md +35 -0
  73. package/data/zeroheight-exports/Introduction.md +115 -0
  74. package/data/zeroheight-exports/Link.md +386 -0
  75. package/data/zeroheight-exports/Lists.md +632 -0
  76. package/data/zeroheight-exports/Loading-Indicator.md +37 -0
  77. package/data/zeroheight-exports/Navigation.md +874 -0
  78. package/data/zeroheight-exports/Notification.md +888 -0
  79. package/data/zeroheight-exports/Panel.md +978 -0
  80. package/data/zeroheight-exports/README.md +124 -0
  81. package/data/zeroheight-exports/Responsive-Design.md +278 -0
  82. package/data/zeroheight-exports/Search-Input.md +53 -0
  83. package/data/zeroheight-exports/Search.md +592 -0
  84. package/data/zeroheight-exports/Segmented-Control.md +584 -0
  85. package/data/zeroheight-exports/Spacing.md +297 -0
  86. package/data/zeroheight-exports/Table.md +4944 -0
  87. package/data/zeroheight-exports/Tabs.md +801 -0
  88. package/data/zeroheight-exports/Tags.md +1055 -0
  89. package/data/zeroheight-exports/Text-Link.md +184 -0
  90. package/data/zeroheight-exports/Theming.md +332 -0
  91. package/data/zeroheight-exports/Tooltips.md +1580 -0
  92. package/data/zeroheight-exports/Typography.md +768 -0
  93. package/dist/stdio.js +193 -93
  94. package/package.json +4 -4
  95. package/data/component-props/Chip.json +0 -73
  96. package/data/component-props/List.json +0 -43
  97. package/data/component-props/Menu.json +0 -48
  98. package/data/component-props/Table.json +0 -26
  99. package/data/component-props-storybook/Accordion-storybook.json +0 -45
  100. package/data/component-props-storybook/Alert-storybook.json +0 -30
  101. package/data/component-props-storybook/Autocomplete-storybook.json +0 -67
  102. package/data/component-props-storybook/Banner-storybook.json +0 -78
  103. package/data/component-props-storybook/Button-storybook.json +0 -115
  104. package/data/component-props-storybook/ButtonDropdown-storybook.json +0 -73
  105. package/data/component-props-storybook/ButtonIcon-storybook.json +0 -60
  106. package/data/component-props-storybook/ButtonToggle-storybook.json +0 -68
  107. package/data/component-props-storybook/Callout-storybook.json +0 -90
  108. package/data/component-props-storybook/CellBasic-storybook.json +0 -138
  109. package/data/component-props-storybook/CellComponent-storybook.json +0 -48
  110. package/data/component-props-storybook/CellHeader-storybook.json +0 -71
  111. package/data/component-props-storybook/Chip-storybook.json +0 -26
  112. package/data/component-props-storybook/ComplexFilter-storybook.json +0 -60
  113. package/data/component-props-storybook/ContentCard-storybook.json +0 -175
  114. package/data/component-props-storybook/Dialog-storybook.json +0 -56
  115. package/data/component-props-storybook/Dropdown-storybook.json +0 -93
  116. package/data/component-props-storybook/DropdownMenu-storybook.json +0 -73
  117. package/data/component-props-storybook/HeatmapChart-storybook.json +0 -55
  118. package/data/component-props-storybook/Icon-storybook.json +0 -75
  119. package/data/component-props-storybook/InputCheckbox-storybook.json +0 -57
  120. package/data/component-props-storybook/InputDropdown-storybook.json +0 -80
  121. package/data/component-props-storybook/InputRadio-storybook.json +0 -56
  122. package/data/component-props-storybook/InputSearch-storybook.json +0 -55
  123. package/data/component-props-storybook/InputSlider-storybook.json +0 -55
  124. package/data/component-props-storybook/InputText-storybook.json +0 -59
  125. package/data/component-props-storybook/InputToggle-storybook.json +0 -42
  126. package/data/component-props-storybook/Link-storybook.json +0 -50
  127. package/data/component-props-storybook/List-storybook.json +0 -26
  128. package/data/component-props-storybook/LoadingIndicator-storybook.json +0 -34
  129. package/data/component-props-storybook/Menu-storybook.json +0 -26
  130. package/data/component-props-storybook/MenuItem-storybook.json +0 -74
  131. package/data/component-props-storybook/MenuSelect-storybook.json +0 -38
  132. package/data/component-props-storybook/NavigationFooter-storybook.json +0 -67
  133. package/data/component-props-storybook/NavigationHeader-storybook.json +0 -115
  134. package/data/component-props-storybook/NavigationJumpTo-storybook.json +0 -41
  135. package/data/component-props-storybook/Notification-storybook.json +0 -89
  136. package/data/component-props-storybook/Pagination-storybook.json +0 -50
  137. package/data/component-props-storybook/Panel-storybook.json +0 -52
  138. package/data/component-props-storybook/SegmentedControl-storybook.json +0 -30
  139. package/data/component-props-storybook/Table-storybook.json +0 -26
  140. package/data/component-props-storybook/TableHeader-storybook.json +0 -26
  141. package/data/component-props-storybook/TableRow-storybook.json +0 -62
  142. package/data/component-props-storybook/Tabs-storybook.json +0 -45
  143. package/data/component-props-storybook/Tag-storybook.json +0 -78
  144. package/data/component-props-storybook/TagFilter-storybook.json +0 -30
  145. package/data/component-props-storybook/Tooltip-storybook.json +0 -85
  146. package/data/component-props-storybook/TooltipCondensed-storybook.json +0 -38
  147. package/data/component-props-storybook/TooltipTable-storybook.json +0 -47
@@ -0,0 +1,778 @@
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
+
30
+
31
+ ---
32
+
33
+ ### Dismissible Callout
34
+
35
+ 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.
36
+
37
+ Used in CZ GEN EPI to highlight helpful information to users when viewing a page; typically placed at the top of the page.
38
+
39
+ 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.
40
+
41
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
42
+
43
+ ---
44
+
45
+ ### Expandable Callout
46
+
47
+ 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.
48
+
49
+ 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.
50
+
51
+ Additional content, whether more text or relevant components, can be included in the content module block within the accordion.
52
+
53
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
54
+
55
+
56
+
57
+ ---
58
+
59
+ ---
60
+
61
+ ---
62
+
63
+ ### Callout Spacing
64
+
65
+ These rules establish how much margin should exist between and around elements.
66
+
67
+ ---
68
+
69
+ ### Intent Variations
70
+
71
+ 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.
72
+
73
+ Each intent is demonstrated below using the Persistent Callout for reference. Regardless of variant, the colors and icons used are the same:
74
+
75
+ | **Error** | **Info** |
76
+ | --------- | -------- |
77
+
78
+ | **Success** | **Warning** |
79
+ | ----------- | ----------- |
80
+
81
+ ## Code
82
+
83
+ ## Callout Component
84
+
85
+ | 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 |
86
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------ |
87
+
88
+ ---
89
+
90
+ > 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.
91
+
92
+ ### Callout
93
+
94
+ Storybook
95
+
96
+
97
+
98
+ ---
99
+
100
+ 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.
101
+
102
+ ## Overview
103
+
104
+ ## Callout Variants
105
+
106
+ | 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 |
107
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --- | ------------------------------------------------------------------------ |
108
+
109
+ ---
110
+
111
+ ## Callout
112
+
113
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
114
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
115
+
116
+ ### Persistent Callout
117
+
118
+ 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.
119
+
120
+ Used in CZ ID to display warnings, errors, and supplemental information to users in reaction to actions they have taken in a flow.
121
+
122
+ 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.
123
+
124
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
125
+
126
+
127
+
128
+ ---
129
+
130
+
131
+
132
+ ### Dismissible Callout
133
+
134
+ 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.
135
+
136
+ Used in CZ ID to highlight helpful information to users when viewing a page; typically placed at the top of the page.
137
+
138
+ 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.
139
+
140
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
141
+
142
+ ---
143
+
144
+ ### Expandable Callout
145
+
146
+ 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.
147
+
148
+ 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.
149
+
150
+ Additional content, whether more text or relevant components, can be included in the content module block within the accordion.
151
+
152
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
153
+
154
+
155
+
156
+ ---
157
+
158
+ ---
159
+
160
+ ---
161
+
162
+ ---
163
+
164
+ ### Callout Spacing
165
+
166
+ These rules establish how much margin should exist between and around elements.
167
+
168
+ ---
169
+
170
+ ### Intent Variations
171
+
172
+ 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.
173
+
174
+ Each intent is demonstrated below using the Persistent Callout for reference. Regardless of variant, the colors and icons used are the same:
175
+
176
+ | **Error** | **Info** |
177
+ | --------- | -------- |
178
+
179
+ | **Success** | **Warning** |
180
+ | ----------- | ----------- |
181
+
182
+ ## Code
183
+
184
+ ## Callout Component
185
+
186
+ | 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 |
187
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------ |
188
+
189
+ ---
190
+
191
+ ### Callout
192
+
193
+ Storybook
194
+
195
+ ---
196
+
197
+ 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.
198
+
199
+ ## Guidelines
200
+
201
+ ## Overview
202
+
203
+ | | In Figma | | | Meets Accessibility | | | In Code |
204
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
205
+
206
+ ### Callout Variants
207
+
208
+ 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).
209
+
210
+ 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.
211
+
212
+ ---
213
+
214
+ ### Live Instance
215
+
216
+ Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
217
+
218
+ Default
219
+
220
+ ---
221
+
222
+ ### Callout – Persistent
223
+
224
+ 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.
225
+
226
+ | Default | Default + Alert Text |
227
+ | ------- | -------------------- |
228
+
229
+ ---
230
+
231
+ ### Callout – Dismissible
232
+
233
+ 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.
234
+
235
+ | Default | Default + Alert Text |
236
+ | ------- | -------------------- |
237
+
238
+ ---
239
+
240
+ ### Callout – Expandable
241
+
242
+ 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.
243
+
244
+ | Collapsed | Collapsed + Alert Text | Expanded + Content Module | Expanded + Alert Text + Content Module |
245
+ | --------- | ---------------------- | ------------------------- | -------------------------------------- |
246
+
247
+ ---
248
+
249
+ ### Callout Spacing
250
+
251
+ These rules establish how much margin should exist between and around elements.
252
+
253
+ ---
254
+
255
+ ### Intent Variations
256
+
257
+ There are four different intents that Callouts can communicate: Info, Negative, Notice, and Positive. Each intent is communicated using color and iconography.
258
+
259
+ Each intent is demonstrated below using the Persistent variant for reference. Regardless of variant, the colors and icons used are the same.
260
+
261
+ | Info | Negative | Notice | Positive |
262
+ | ---- | -------- | ------ | -------- |
263
+
264
+ ## Code
265
+
266
+ > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
267
+
268
+ ## Callout
269
+
270
+ ### SDS Source Code
271
+
272
+ The component's source code in the SDS codebase can be found here.
273
+
274
+ ### SDS vs MUI
275
+
276
+ The SDS `Callout` component is built upon the MUI `Alert` component (as is the SDS `Notification` component), but there are some important differences:
277
+
278
+ - **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)
279
+ - **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"`
280
+ - **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
281
+ - **Transitions:** SDS's `Callout` uses the `Grow` transition component by default
282
+ - **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:
283
+
284
+ `icon={<Icon sdsSize="l" sdsIcon="download" sdsType="static" />`
285
+
286
+ Additionally, setting `icon={false}` has no effect, and `iconMapping` does not work to change icons associated to `intent` or `severity`.
287
+
288
+ - **Variants:** The `variant` prop is not available for SDS's `Callout` component.
289
+
290
+ ### MUI Documentation
291
+
292
+ Documentation for the underlying MUI `Alert` component can be found here.
293
+
294
+ ### Props
295
+
296
+ Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
297
+
298
+ | Name | Type | Default | Description |
299
+ | ------------- | ----------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
300
+ | `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. |
301
+ | `intent` | `"info"` ` | "negative"` ` | "positive"` ` | "notice"` | `-` | The color of the component. |
302
+ | `icon` | `ReactNode` | `-` | Icon displayed to the left of the `Callout` title. |
303
+ | `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. |
304
+ | `title` | `string` | `-` | Callout title |
305
+ | `hideTitle` | `boolean` | `false` | If set to `true`, Hides the Callout title |
306
+ | `body` | `string` | `-` | Callout body |
307
+ | `hideBody` | `boolean` | `false` | If set to `true`, Hides the Callout body |
308
+ | `children` | `ReactNode` | `-` | Extra content to show in the component slot section of the Callout |
309
+ | `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. |
310
+
311
+ ### Code examples
312
+
313
+ #### Default Callout
314
+
315
+ This example has the minimum props needed for the `Callout` component.
316
+
317
+ **/styles.css**
318
+
319
+ ```css
320
+ body {
321
+ font-size: 13px;
322
+ font-weight: 400;
323
+ letter-spacing: 0.08px;
324
+ line-height: 20px;
325
+ text-transform: none;
326
+ font-family: "Inter", sans-serif;
327
+ }
328
+
329
+ h1 {
330
+ font-size: 1.5rem;
331
+ }
332
+
333
+ .app {
334
+ padding: 20px;
335
+ }
336
+ ```
337
+
338
+ **tsconfig.json**
339
+
340
+ ```json
341
+ {
342
+ "include": ["./**/*"],
343
+ "compilerOptions": {
344
+ "strict": true,
345
+ "esModuleInterop": true,
346
+ "lib": ["dom", "es2015"],
347
+ "jsx": "react-jsx"
348
+ }
349
+ }
350
+ ```
351
+
352
+ **/App.tsx**
353
+
354
+ ```tsx
355
+ // Most minimal Callout (just has the basic requirements)
356
+
357
+ import { Callout, CalloutTitle } from "@czi-sds/components";
358
+ import "./styles.css";
359
+
360
+ function App() {
361
+ return (
362
+ <div className="app">
363
+ <Callout intent="info">
364
+ <CalloutTitle>Callout box</CalloutTitle>
365
+ The Callout Box component is a versatile UI element designed to draw
366
+ attention to important information or messages within your interface.
367
+ With its clean and elegant design, the Callout Box helps highlight key
368
+ content, alerts, or contextual details.
369
+ </Callout>
370
+ </div>
371
+ );
372
+ }
373
+
374
+ export default App;
375
+ ```
376
+
377
+ **/index.tsx**
378
+
379
+ ```tsx
380
+ import React from "react";
381
+ import { createRoot } from "react-dom/client";
382
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
383
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
384
+ import { Theme } from "@czi-sds/components";
385
+ import CssBaseline from "@mui/material/CssBaseline";
386
+ import useMediaQuery from "@mui/material/useMediaQuery";
387
+
388
+ import App from "./App";
389
+
390
+ const container = document.getElementById("root");
391
+ const root = createRoot(container!);
392
+
393
+ const RootApp = () => {
394
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
395
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
396
+
397
+ return (
398
+ <StyledEngineProvider injectFirst>
399
+ <ThemeProvider theme={theme}>
400
+ <EmotionThemeProvider theme={theme}>
401
+ <CssBaseline />
402
+ <App />
403
+ </EmotionThemeProvider>
404
+ </ThemeProvider>
405
+ </StyledEngineProvider>
406
+ );
407
+ };
408
+
409
+ root.render(
410
+ <React.StrictMode>
411
+ <RootApp />
412
+ </React.StrictMode>
413
+ );
414
+ ```
415
+
416
+ **/public/index.html**
417
+
418
+ ```html
419
+ <!doctype html>
420
+ <html lang="en">
421
+ <head>
422
+ <meta charset="UTF-8" />
423
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
424
+ <title>Callout</title>
425
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
426
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
427
+ <link
428
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
429
+ rel="stylesheet"
430
+ />
431
+ <link
432
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
433
+ rel="stylesheet"
434
+ />
435
+ </head>
436
+ <body>
437
+ <div id="root"></div>
438
+ </body>
439
+ </html>
440
+ ```
441
+
442
+ **/package.json**
443
+
444
+ ```json
445
+ {
446
+ "dependencies": {
447
+ "react": "^18.0.0",
448
+ "react-dom": "^18.0.0",
449
+ "react-scripts": "^4.0.0"
450
+ },
451
+ "devDependencies": {
452
+ "@types/react": "^18.0.0",
453
+ "@types/react-dom": "^18.0.0",
454
+ "typescript": "^4.0.0"
455
+ },
456
+ "main": "/index.tsx"
457
+ }
458
+ ```
459
+
460
+ ---
461
+
462
+ #### Expandable Callout
463
+
464
+ 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.
465
+
466
+ **/styles.css**
467
+
468
+ ```css
469
+ body {
470
+ font-size: 13px;
471
+ font-weight: 400;
472
+ letter-spacing: 0.08px;
473
+ line-height: 20px;
474
+ text-transform: none;
475
+ font-family: "Inter", sans-serif;
476
+ }
477
+
478
+ h1 {
479
+ font-size: 1.5rem;
480
+ }
481
+
482
+ .app {
483
+ padding: 20px;
484
+ }
485
+ ```
486
+
487
+ **tsconfig.json**
488
+
489
+ ```json
490
+ {
491
+ "include": ["./**/*"],
492
+ "compilerOptions": {
493
+ "strict": true,
494
+ "esModuleInterop": true,
495
+ "lib": ["dom", "es2015"],
496
+ "jsx": "react-jsx"
497
+ }
498
+ }
499
+ ```
500
+
501
+ **/App.tsx**
502
+
503
+ ```tsx
504
+ // Expandable Callout
505
+
506
+ import { Callout, CalloutTitle } from "@czi-sds/components";
507
+ import "./styles.css";
508
+
509
+ function App() {
510
+ return (
511
+ <div className="app">
512
+ <Callout intent="notice" expandable>
513
+ <CalloutTitle>Attention Required</CalloutTitle>
514
+ The Warning Callout serves as a visual alert to draw immediate attention
515
+ to critical information that requires action or consideration. Its
516
+ distinct appearance, coupled with the "Attention Required" message,
517
+ signals urgency and prompts users to take appropriate steps. Use this
518
+ component strategically to ensure vital messages are noticed promptly
519
+ and acted upon, enhancing user awareness and responsiveness.
520
+ </Callout>
521
+ </div>
522
+ );
523
+ }
524
+
525
+ export default App;
526
+ ```
527
+
528
+ **/index.tsx**
529
+
530
+ ```tsx
531
+ import React from "react";
532
+ import { createRoot } from "react-dom/client";
533
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
534
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
535
+ import { Theme } from "@czi-sds/components";
536
+ import CssBaseline from "@mui/material/CssBaseline";
537
+ import useMediaQuery from "@mui/material/useMediaQuery";
538
+
539
+ import App from "./App";
540
+
541
+ const container = document.getElementById("root");
542
+ const root = createRoot(container!);
543
+
544
+ const RootApp = () => {
545
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
546
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
547
+
548
+ return (
549
+ <StyledEngineProvider injectFirst>
550
+ <ThemeProvider theme={theme}>
551
+ <EmotionThemeProvider theme={theme}>
552
+ <CssBaseline />
553
+ <App />
554
+ </EmotionThemeProvider>
555
+ </ThemeProvider>
556
+ </StyledEngineProvider>
557
+ );
558
+ };
559
+
560
+ root.render(
561
+ <React.StrictMode>
562
+ <RootApp />
563
+ </React.StrictMode>
564
+ );
565
+ ```
566
+
567
+ **/public/index.html**
568
+
569
+ ```html
570
+ <!doctype html>
571
+ <html lang="en">
572
+ <head>
573
+ <meta charset="UTF-8" />
574
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
575
+ <title>Callout</title>
576
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
577
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
578
+ <link
579
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
580
+ rel="stylesheet"
581
+ />
582
+ <link
583
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
584
+ rel="stylesheet"
585
+ />
586
+ </head>
587
+ <body>
588
+ <div id="root"></div>
589
+ </body>
590
+ </html>
591
+ ```
592
+
593
+ **/package.json**
594
+
595
+ ```json
596
+ {
597
+ "dependencies": {
598
+ "react": "^18.0.0",
599
+ "react-dom": "^18.0.0",
600
+ "react-scripts": "^4.0.0"
601
+ },
602
+ "devDependencies": {
603
+ "@types/react": "^18.0.0",
604
+ "@types/react-dom": "^18.0.0",
605
+ "typescript": "^4.0.0"
606
+ },
607
+ "main": "/index.tsx"
608
+ }
609
+ ```
610
+
611
+ ---
612
+
613
+ #### Dismissible Callout
614
+
615
+ 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.
616
+
617
+ **/styles.css**
618
+
619
+ ```css
620
+ body {
621
+ font-size: 13px;
622
+ font-weight: 400;
623
+ letter-spacing: 0.08px;
624
+ line-height: 20px;
625
+ text-transform: none;
626
+ font-family: "Inter", sans-serif;
627
+ }
628
+
629
+ h1 {
630
+ font-size: 1.5rem;
631
+ }
632
+
633
+ .app {
634
+ padding: 20px;
635
+ }
636
+ ```
637
+
638
+ **tsconfig.json**
639
+
640
+ ```json
641
+ {
642
+ "include": ["./**/*"],
643
+ "compilerOptions": {
644
+ "strict": true,
645
+ "esModuleInterop": true,
646
+ "lib": ["dom", "es2015"],
647
+ "jsx": "react-jsx"
648
+ }
649
+ }
650
+ ```
651
+
652
+ **/App.tsx**
653
+
654
+ ```tsx
655
+ // Closable Callout
656
+
657
+ import { useState } from "react";
658
+ import { Callout, CalloutTitle, Button } from "@czi-sds/components";
659
+ import "./styles.css";
660
+
661
+ function App() {
662
+ const [dismissed, setDismissed] = useState(false);
663
+ const handleClick = () => {
664
+ setDismissed((prev) => !prev);
665
+ };
666
+ return (
667
+ <div className="app">
668
+ {!dismissed ? (
669
+ <Callout
670
+ intent="negative"
671
+ dismissed={dismissed}
672
+ onClose={() => {
673
+ console.log("Callout closed!");
674
+ setDismissed(true);
675
+ }}
676
+ >
677
+ <CalloutTitle>An Error Occurred</CalloutTitle>
678
+ The Error Callout is a crucial component for communicating critical
679
+ errors or issues to users. With its distinct appearance and the
680
+ message "An Error Occurred," it ensures that users are immediately
681
+ informed about unexpected situations that require attention.
682
+ </Callout>
683
+ ) : (
684
+ <Button onClick={handleClick} sdsType="primary" sdsStyle="rounded">
685
+ Reset Callout
686
+ </Button>
687
+ )}
688
+ </div>
689
+ );
690
+ }
691
+
692
+ export default App;
693
+ ```
694
+
695
+ **/index.tsx**
696
+
697
+ ```tsx
698
+ import React from "react";
699
+ import { createRoot } from "react-dom/client";
700
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
701
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
702
+ import { Theme } from "@czi-sds/components";
703
+ import CssBaseline from "@mui/material/CssBaseline";
704
+ import useMediaQuery from "@mui/material/useMediaQuery";
705
+
706
+ import App from "./App";
707
+
708
+ const container = document.getElementById("root");
709
+ const root = createRoot(container!);
710
+
711
+ const RootApp = () => {
712
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
713
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
714
+
715
+ return (
716
+ <StyledEngineProvider injectFirst>
717
+ <ThemeProvider theme={theme}>
718
+ <EmotionThemeProvider theme={theme}>
719
+ <CssBaseline />
720
+ <App />
721
+ </EmotionThemeProvider>
722
+ </ThemeProvider>
723
+ </StyledEngineProvider>
724
+ );
725
+ };
726
+
727
+ root.render(
728
+ <React.StrictMode>
729
+ <RootApp />
730
+ </React.StrictMode>
731
+ );
732
+ ```
733
+
734
+ **/public/index.html**
735
+
736
+ ```html
737
+ <!doctype html>
738
+ <html lang="en">
739
+ <head>
740
+ <meta charset="UTF-8" />
741
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
742
+ <title>Callout</title>
743
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
744
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
745
+ <link
746
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
747
+ rel="stylesheet"
748
+ />
749
+ <link
750
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
751
+ rel="stylesheet"
752
+ />
753
+ </head>
754
+ <body>
755
+ <div id="root"></div>
756
+ </body>
757
+ </html>
758
+ ```
759
+
760
+ **/package.json**
761
+
762
+ ```json
763
+ {
764
+ "dependencies": {
765
+ "react": "^18.0.0",
766
+ "react-dom": "^18.0.0",
767
+ "react-scripts": "^4.0.0"
768
+ },
769
+ "devDependencies": {
770
+ "@types/react": "^18.0.0",
771
+ "@types/react-dom": "^18.0.0",
772
+ "typescript": "^4.0.0"
773
+ },
774
+ "main": "/index.tsx"
775
+ }
776
+ ```
777
+
778
+ ---