@czi-sds/mcp 0.16.0 → 0.18.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 (167) 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/ProteinStructureViewer.md +1044 -0
  44. package/data/component-docs/SegmentedControl.md +396 -0
  45. package/data/component-docs/StackedBarChart.md +475 -0
  46. package/data/component-docs/Table.md +2000 -0
  47. package/data/component-docs/TableHeader.md +53 -0
  48. package/data/component-docs/TableRow.md +74 -0
  49. package/data/component-docs/Tabs.md +455 -0
  50. package/data/component-docs/Tag.md +647 -0
  51. package/data/component-docs/TagFilter.md +131 -0
  52. package/data/component-docs/Tooltip.md +561 -0
  53. package/data/component-docs/TooltipCondensed.md +203 -0
  54. package/data/component-docs/TooltipTable.md +145 -0
  55. package/data/component-docs/index.json +267 -0
  56. package/data/component-list.json +2 -5
  57. package/data/component-props/Accordion.json +31 -11
  58. package/data/component-props/Alert.json +3 -3
  59. package/data/component-props/Autocomplete.json +150 -15
  60. package/data/component-props/Banner.json +31 -17
  61. package/data/component-props/Button.json +45 -20
  62. package/data/component-props/ButtonDropdown.json +36 -17
  63. package/data/component-props/ButtonDropdownLegacy.json +11 -11
  64. package/data/component-props/ButtonGroup.json +32 -11
  65. package/data/component-props/ButtonIcon.json +10 -10
  66. package/data/component-props/ButtonLegacy.json +19 -19
  67. package/data/component-props/ButtonToggle.json +32 -19
  68. package/data/component-props/ButtonToggleLegacy.json +11 -11
  69. package/data/component-props/Callout.json +58 -17
  70. package/data/component-props/CellBasic.json +94 -41
  71. package/data/component-props/CellComponent.json +23 -7
  72. package/data/component-props/CellHeader.json +62 -19
  73. package/data/component-props/ComplexFilter.json +52 -21
  74. package/data/component-props/ContentCard.json +70 -47
  75. package/data/component-props/Dialog.json +47 -14
  76. package/data/component-props/Dropdown.json +68 -31
  77. package/data/component-props/DropdownMenu.json +128 -23
  78. package/data/component-props/HeatmapChart.json +88 -12
  79. package/data/component-props/Hero.json +80 -39
  80. package/data/component-props/Icon.json +20 -9
  81. package/data/component-props/InputCheckbox.json +36 -14
  82. package/data/component-props/InputDropdown.json +75 -27
  83. package/data/component-props/InputRadio.json +31 -13
  84. package/data/component-props/InputSearch.json +41 -18
  85. package/data/component-props/InputSlider.json +46 -19
  86. package/data/component-props/InputText.json +26 -19
  87. package/data/component-props/InputToggle.json +26 -9
  88. package/data/component-props/IntentMessage.json +38 -9
  89. package/data/component-props/Link.json +13 -7
  90. package/data/component-props/LoadingIndicator.json +11 -3
  91. package/data/component-props/MenuItem.json +38 -19
  92. package/data/component-props/MenuSelect.json +8 -8
  93. package/data/component-props/NavigationFooter.json +49 -19
  94. package/data/component-props/NavigationHeader.json +150 -37
  95. package/data/component-props/NavigationJumpTo.json +33 -7
  96. package/data/component-props/Notification.json +39 -21
  97. package/data/component-props/Pagination.json +39 -11
  98. package/data/component-props/Panel.json +62 -9
  99. package/data/component-props/Popover.json +80 -7
  100. package/data/component-props/PreComposedTable.json +99 -27
  101. package/data/component-props/ProteinStructureViewer.json +117 -0
  102. package/data/component-props/SegmentedControl.json +42 -3
  103. package/data/component-props/StackedBarChart.json +116 -42
  104. package/data/component-props/TableRow.json +38 -19
  105. package/data/component-props/Tabs.json +66 -9
  106. package/data/component-props/Tag.json +34 -17
  107. package/data/component-props/TagFilter.json +10 -3
  108. package/data/component-props/Tooltip.json +49 -18
  109. package/data/component-props/TooltipCondensed.json +18 -9
  110. package/data/component-props/TooltipTable.json +17 -7
  111. package/data/resources/{zeroheight-rules.md → documentation-rules.md} +43 -30
  112. package/data/resources/figma-rules.md +2 -2
  113. package/data/tailwind.json +20 -14
  114. package/dist/stdio.js +112 -208
  115. package/package.json +9 -5
  116. package/data/component-props/ButtonDropdownV2.json +0 -34
  117. package/data/component-props/ButtonNew.json +0 -47
  118. package/data/component-props/ButtonToggleV2.json +0 -44
  119. package/data/component-props/ButtonV2.json +0 -43
  120. package/data/zeroheight-cache.json +0 -10259
  121. package/data/zeroheight-exports/Accordion.md +0 -774
  122. package/data/zeroheight-exports/Banner.md +0 -691
  123. package/data/zeroheight-exports/Borders.md +0 -117
  124. package/data/zeroheight-exports/Buttons.md +0 -1854
  125. package/data/zeroheight-exports/Callout.md +0 -931
  126. package/data/zeroheight-exports/Colors.md +0 -1755
  127. package/data/zeroheight-exports/Content-Card.md +0 -309
  128. package/data/zeroheight-exports/Contributing-to-SDS.md +0 -98
  129. package/data/zeroheight-exports/Control-Inputs.md +0 -2818
  130. package/data/zeroheight-exports/Corners.md +0 -104
  131. package/data/zeroheight-exports/Cover-page.md +0 -3
  132. package/data/zeroheight-exports/Dialog.md +0 -1367
  133. package/data/zeroheight-exports/Downloads.md +0 -236
  134. package/data/zeroheight-exports/Drop-Shadows.md +0 -79
  135. package/data/zeroheight-exports/Dropdown-Input.md +0 -1776
  136. package/data/zeroheight-exports/Dropdown-Menus.md +0 -913
  137. package/data/zeroheight-exports/Element-Status-Tracker.md +0 -267
  138. package/data/zeroheight-exports/Field-Inputs.md +0 -1405
  139. package/data/zeroheight-exports/Filters.md +0 -1111
  140. package/data/zeroheight-exports/Getting-Started.md +0 -1157
  141. package/data/zeroheight-exports/Hero.md +0 -414
  142. package/data/zeroheight-exports/Icons.md +0 -2067
  143. package/data/zeroheight-exports/Intent.md +0 -86
  144. package/data/zeroheight-exports/Introduction-to-Bases.md +0 -35
  145. package/data/zeroheight-exports/Introduction-to-Cells.md +0 -35
  146. package/data/zeroheight-exports/Introduction-to-DNA.md +0 -35
  147. package/data/zeroheight-exports/Introduction-to-Genes.md +0 -35
  148. package/data/zeroheight-exports/Introduction.md +0 -115
  149. package/data/zeroheight-exports/Link.md +0 -432
  150. package/data/zeroheight-exports/Lists.md +0 -986
  151. package/data/zeroheight-exports/Loading-Indicator.md +0 -41
  152. package/data/zeroheight-exports/Navigation.md +0 -1190
  153. package/data/zeroheight-exports/Notification.md +0 -1038
  154. package/data/zeroheight-exports/Panel.md +0 -1030
  155. package/data/zeroheight-exports/README.md +0 -122
  156. package/data/zeroheight-exports/Responsive-Design.md +0 -330
  157. package/data/zeroheight-exports/Search-Input.md +0 -91
  158. package/data/zeroheight-exports/Search.md +0 -822
  159. package/data/zeroheight-exports/Segmented-Control.md +0 -609
  160. package/data/zeroheight-exports/Spacing.md +0 -297
  161. package/data/zeroheight-exports/Table.md +0 -5345
  162. package/data/zeroheight-exports/Tabs.md +0 -1324
  163. package/data/zeroheight-exports/Tags.md +0 -1545
  164. package/data/zeroheight-exports/Text-Link.md +0 -268
  165. package/data/zeroheight-exports/Theming.md +0 -362
  166. package/data/zeroheight-exports/Tooltips.md +0 -2015
  167. package/data/zeroheight-exports/Typography.md +0 -800
@@ -1,1030 +0,0 @@
1
- # Panels
2
-
3
- Panels are elements that contain supplementary information or actions for the page's content they appear on. Where and how they display is determined by the type of content on them.
4
-
5
- ## Overview
6
-
7
- ## Basic Panel
8
-
9
- | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
10
- | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
11
-
12
- Panels are comprised of containers within which other elements are placed. Use the Basic Panel when the elements contained within it are able to functionally adjust the content on the page next to it. In CZ GEN EPI's case, the Basic Panel is positioned on the left-hand side of the screen and contains Filters.
13
-
14
- **Basic Panel anatomy**
15
-
16
- ---
17
-
18
- ### Basic Panel Example
19
-
20
- The example below shows where in CZ GEN EPI the Basic Panel is used.
21
-
22
- **Basic Panel_left**
23
-
24
- ---
25
-
26
- ## Code
27
-
28
- ## Panel Components
29
-
30
- | Below you will find an interactive Storybook iframe for Panels. 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:** PanelBasic |
31
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------- |
32
-
33
- ---
34
-
35
- > 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.
36
-
37
- ### PanelBasic (coming soon) 
38
-
39
- ---
40
-
41
- Panels are elements that contain supplementary information or actions for the page's content they appear on. Where and how they display is determined by the type of content on them.
42
-
43
- ## Overview
44
-
45
- ## Panel Variants
46
-
47
- | Panels are comprised of containers within which other elements are placed. They come in two different variants for designers to use depending on the type of content and elements contained within them. These variants also establish how the Panel functions and appears on the page, whether within the flow of the page's content or outside of it, on top of other elements. Follow the usage criteria accompanying each variant as a guide for selecting the correct Panel for any given use case. | | **Jump to variant:** Basic Overlay |
48
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ---------------------------------- |
49
-
50
- ---
51
-
52
- ## Basic Panel
53
-
54
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
55
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
56
-
57
- ### Basic Panel
58
-
59
- Use the Basic Panel when the elements contained within it are able to functionally adjust the content on the page, such as filters or dataset selectors. Basic Panels can be toggled open or closed using an Icon Button. When toggled open, the page's content is resized to make room for the Panel.
60
-
61
- Basic Panels can be positioned on the left or right side of the screen using the `position` prop. If needed, designers can have up to two Panels per page, one of the left and one on the right.
62
-
63
- Although Basic Panels can be designed to contain a wide range of elements, there are a few common configurations used within the products today that have been turned into templates: Filter Panel, Info Panel, and Info Panel with Accordions (templates coming soon).
64
-
65
- **Basic Panel anatomy**
66
-
67
- ---
68
-
69
- ### Basic Panel Examples
70
-
71
- The examples below show where in CZ ID the Basic Panel is currently being used.
72
-
73
- **Basic Panel_left**
74
-
75
- ---
76
-
77
- ---
78
-
79
- **Basic Panel_right**
80
-
81
- ---
82
-
83
- ---
84
-
85
- ## Overlay Panel
86
-
87
- | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
88
- | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
89
-
90
- ### Overlay Panel
91
-
92
- Use the Overlay Panel when needing to display supplementary information about the content on the underlying page. The elements on the Overlay Panel cannot functionally adjust the content on the page below it. Overlay Panels can be toggled open or closed using a range of different Button types (Rounded, Square, Minimal, and Icon Buttons). When active, like its name suggests, the Overlay Panel appears on top of the other content on the page, outside of the page's flow.
93
-
94
- Overlay Panels can be positioned on the bottom or right side of the screen using the `position` prop. Use the bottom-positioned Overlay Panel when the content contained on it is wider than it is tall. Designers can have as many Overlay Panels per page as needed, but only one can be triggered at any time. If one is currently open and another is triggered, the opened Overlay Panel will close before the newly triggered one opens.
95
-
96
- Although Overlay Panels can be designed to contain a wide range of elements, there are a few common configurations used within the products today that have been turned into templates: Sample Details, Taxon Details, Genes Details, and Pipeline Information (templates coming soon).
97
-
98
- **Overlay Panel anatomy**
99
-
100
- ---
101
-
102
- ### Overlay Panel Examples
103
-
104
- The examples below show where in CZ ID the Overlay Panel is currently being used.
105
-
106
- **Overlay Panel_bottom**
107
-
108
- ---
109
-
110
- ---
111
-
112
- **Overlay Panel_right**
113
-
114
- ---
115
-
116
- ## Code
117
-
118
- ## Panel Components
119
-
120
- | Below you will find an interactive Storybook iframe for Panels. 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:** PanelBasic PanelOverlay |
121
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ---------------------------------------------- |
122
-
123
- ---
124
-
125
- ### PanelBasic (coming soon)
126
-
127
- ---
128
-
129
- ### PanelOverlay (coming soon)
130
-
131
- ---
132
-
133
- Panels are elements that contain supplementary information or actions for the page's content they appear on. Where and how they display is determined by the type of content on them.
134
-
135
- ## Guidelines
136
-
137
- ## Panel Components
138
-
139
- | Panels contain containers within which other elements are placed. They come in two different variants depending on the type of content and elements contained within them and their functionality, whether appearing on the page, within the flow of the page's content or outside of it, on top of other elements. | | **Jump to variant:** Basic Overlay |
140
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ---------------------------------- |
141
-
142
- ---
143
-
144
- ## Panel – Basic
145
-
146
- | | In Figma | | | Meets Accessibility | | | In Code |
147
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
148
-
149
- ### Panel – Basic Anatomy
150
-
151
- **Basic Panel anatomy**
152
-
153
- ---
154
-
155
- ---
156
-
157
- ### Overview
158
-
159
- Use Panel – Basic when the elements contained within it are able to make adjustments to the content on the page, such as filters or dataset selectors. Panel – Basic is toggled open or closed using a Button placed on the page (as opposed to contained within the Panel itself). When toggled open, the page's content is resized to make room for the Panel.
160
-
161
- Panel – Basic can be positioned on the left or right side of the screen. Both sides can be open at the same time.
162
-
163
- | Left | Right |
164
- | :--: | :---: |
165
-
166
- **PanelBasic_Left**
167
-
168
- ---
169
-
170
- **PanelBasic_Right**
171
-
172
- ---
173
-
174
- ---
175
-
176
- ### Panel – Basic Spacing
177
-
178
- These rules establish how much margin should exist to the left or right of an opened Panel – Basic.
179
-
180
- **Basic Panel spacing**
181
-
182
- ---
183
-
184
- ---
185
-
186
- ## Panel – Overlay
187
-
188
- | | In Figma | | | Meets Accessibility | | | In Code |
189
- | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
190
-
191
- ### Panel – Overlay Anatomy
192
-
193
- **Overlay Panel anatomy**
194
-
195
- ---
196
-
197
- ---
198
-
199
- ### Overview
200
-
201
- Use Panel – Overlay when needing to display supplementary information about a piece of content on the page beneath it; the elements on Panel – Overlay cannot make adjustments to the page's content. When active, like its name suggests, the Panel – Overlay appears on top of the other content on the page, outside of the page's flow. Panel – Overlay is toggled open by any Button on the page and is closed by clicking the same on-page Button or using the close Button built into panel itself.
202
-
203
- Panel – Overlay can be positioned on the bottom, left, or right side of the screen; use the bottom-positioned Panel – Overlay when the content contained on it is wider than it is tall. A page can contain as many Panel - Overlays per page as needed, but only one can be open at a time. If one is currently open and another is triggered to open, the currently opened Panel – Overlay will close before the newly triggered one opens.
204
-
205
- | Bottom | Left | Right |
206
- | :----: | :--: | :---: |
207
-
208
- **PanelOverlay_Bottom**
209
-
210
- ---
211
-
212
- **PanelOverlay_Left**
213
-
214
- ---
215
-
216
- **PanelOverlay_Right**
217
-
218
- ---
219
-
220
- ## Code
221
-
222
- > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
223
-
224
- ## Panel
225
-
226
- ### SDS Source Code
227
-
228
- The component's source code in the SDS codebase can be found here.
229
-
230
- ### SDS vs MUI
231
-
232
- The SDS `Panel` component is built upon the MUI `Drawer` component, but with several key differences:
233
-
234
- - **Variant vs sdsType:** In MUI’s Drawer, the `variant` prop determines the type of drawer (e.g., persistent, temporary). However, in SDS’s Panel, this is replaced by the `sdsType` prop, which takes two values: `"basic"` and `"overlay"`.
235
- - `"basic"` corresponds to MUI’s persistent drawer.
236
- - `"overlay"` corresponds to MUI’s temporary drawer.
237
- - **Position vs Anchor**: Unlike MUI’s Drawer, which uses the `anchor` prop to determine the placement of the drawer (left, right, top, or bottom), the SDS Panel uses a `position` prop.
238
- - The `"basic"` Panel can only be positioned to the `left` or `right`.
239
- - The `"overlay"` Panel can be positioned to the `left`, `right`, or `bottom`.
240
- - **Width Prop:** The SDS Panel allows control over the width of the panel using the width prop.
241
- - The default width is **240px** for the `"basic"` panel.
242
- - The default width is **320px** for the `"overlay"` panel.
243
- - **Custom Header and Close Button Components:** The `"overlay"` Panel in SDS introduces two additional props that are not available in MUI’s Drawer: `headerComponent` and `closeButtonComponent`. These allow for custom components to be rendered in the panel’s header section, providing greater flexibility for design and functionality.
244
-
245
- ### MUI Documentation
246
-
247
- Documentation for the underlying MUI component can be found here.
248
-
249
- ### Props
250
-
251
- Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
252
-
253
- | Name | Type | Default | Description |
254
- | ---------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
255
- | `sdsType` | `"basic"` | `"overlay"` | `"basic"` | `"basic"` corresponds to a persistent drawer, and `"overlay"` corresponds to a temporary drawer. |
256
- | `position` | `"left"` | `"right"` | `"bottom"` (only for overlay) | `"left"` | Determines the panel’s position. The `"basic"` panel supports only `"left"` and `"right"`, while the `"overlay"` panel also supports `"bottom"`. |
257
- | `width` | `number` | `string` | `"240px"` (basic) | `"320px"` (overlay) | Specifies the `width` of the panel.  |
258
- | `headerComponent` | `React.ReactNode` | `undefined` | For the `"overlay"` panel only, this prop allows you to pass a custom component to be rendered as the panel’s header. |
259
- | `closeButtonComponent` | `React.ReactNode` | <Button sdsStyle="icon" sdsType="tertiary" icon="XMark" aria-label="Panel Toggle" /> | For the `"overlay"` panel only, this prop allows you to pass a custom component to be rendered as the close button. |
260
- | `closeButtonOnClick` | `React.MouseEventHandler<HTMLDivElement>` | `undefined` | For the `"overlay"` panel only, this is the onClick event handler for the close button. |
261
-
262
- ### Code examples
263
-
264
- #### Basic Panel
265
-
266
- This example demonstrates the most basic usage of the `Panel` component with default props.
267
-
268
- **/styles.css**
269
-
270
- ```css
271
- body {
272
- font-size: 13px;
273
- font-weight: 400;
274
- letter-spacing: 0.08px;
275
- line-height: 20px;
276
- text-transform: none;
277
- font-family: "Inter", sans-serif;
278
- }
279
-
280
- h1 {
281
- font-size: 1.5rem;
282
- }
283
-
284
- .app {
285
- padding: 20px;
286
- }
287
- ```
288
-
289
- **tsconfig.json**
290
-
291
- ```json
292
- {
293
- "include": ["./**/*"],
294
- "compilerOptions": {
295
- "strict": true,
296
- "esModuleInterop": true,
297
- "lib": ["dom", "es2015"],
298
- "jsx": "react-jsx"
299
- }
300
- }
301
- ```
302
-
303
- **/App.tsx**
304
-
305
- ```tsx
306
- import { useState } from "react";
307
- import { Button, Panel } from "@czi-sds/components";
308
- import { Box } from "@mui/material";
309
- import "./styles.css";
310
-
311
- function App() {
312
- const [open, setOpen] = useState(true);
313
-
314
- const Main = (props: { open: boolean; children?: React.ReactNode }) => {
315
- const { open, children } = props;
316
-
317
- const margin = "0 0 0 250px";
318
-
319
- return (
320
- <Box
321
- sx={{
322
- margin: open ? margin : "none",
323
- }}
324
- >
325
- {children}
326
- </Box>
327
- );
328
- };
329
-
330
- return (
331
- <div className="app">
332
- <Main open={open}>
333
- <Button
334
- sdsType="primary"
335
- sdsStyle="icon"
336
- icon="InfoCircle"
337
- onClick={() => setOpen((prev) => !prev)}
338
- aria-label="Panel Toggle"
339
- >
340
- Toggle Panel
341
- </Button>
342
- <p>
343
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus
344
- facilisis tortor et pellentesque pulvinar. Ut at convallis ipsum.
345
- Nullam scelerisque tempor arcu, quis pretium magna semper eu. Nam
346
- hendrerit lectus in enim scelerisque, sed ornare sapien consequat.
347
- Proin sed congue quam. Integer consequat elit tristique sodales
348
- rhoncus. In bibendum dolor sit amet erat porta, nec posuere nibh
349
- consectetur. Cras scelerisque interdum eros ut porta. Pellentesque
350
- habitant morbi tristique senectus et netus et malesuada fames ac
351
- turpis egestas. Ut in lacus et mi efficitur scelerisque. Pellentesque
352
- congue purus eu feugiat cursus. Phasellus urna massa, sollicitudin id
353
- elit et, efficitur faucibus nibh.
354
- </p>
355
- <p>
356
- Nam sit amet tortor varius, lacinia velit quis, lacinia metus. Quisque
357
- dictum, nulla at luctus fringilla, ligula diam fringilla nisl, non
358
- consequat nulla turpis at ex. Donec hendrerit facilisis nisl at
359
- fringilla. Pellentesque posuere tortor ac ante luctus, at euismod
360
- augue vulputate. Vivamus pretium pretium nisi, non convallis nunc
361
- volutpat ac. Nam finibus justo leo, vel pellentesque velit gravida
362
- vel. Sed in turpis non sem efficitur eleifend vel ac lacus. Sed
363
- volutpat feugiat dictum. Pellentesque tristique mollis magna sit amet
364
- vestibulum. Nulla ac tellus eu orci volutpat congue. In vitae dolor et
365
- est feugiat fringilla. Sed varius neque nunc, sed pulvinar neque
366
- lobortis posuere.
367
- </p>
368
- <Panel open={open}>[Panel Content]</Panel>
369
- </Main>
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
- <link rel="preconnect" href="https://fonts.googleapis.com" />
425
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
426
- <link
427
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
428
- rel="stylesheet"
429
- />
430
- <link
431
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
432
- rel="stylesheet"
433
- />
434
- </head>
435
- <body>
436
- <div id="root"></div>
437
- </body>
438
- </html>
439
- ```
440
-
441
- **/package.json**
442
-
443
- ```json
444
- {
445
- "dependencies": {
446
- "react": "^18.0.0",
447
- "react-dom": "^18.0.0",
448
- "react-scripts": "^4.0.0"
449
- },
450
- "devDependencies": {
451
- "@types/react": "^18.0.0",
452
- "@types/react-dom": "^18.0.0",
453
- "typescript": "^4.0.0"
454
- },
455
- "main": "/index.tsx"
456
- }
457
- ```
458
-
459
- ---
460
-
461
- **Overlay Panel**
462
-
463
- This example shows how to use the `Panel` component as an overlay. The overlay version allows the panel to slide in over the existing content, typically used for side panels or modal-like interactions. It can be triggered by a button or any other interactive element.
464
-
465
- **/styles.css**
466
-
467
- ```css
468
- body {
469
- font-size: 13px;
470
- font-weight: 400;
471
- letter-spacing: 0.08px;
472
- line-height: 20px;
473
- text-transform: none;
474
- font-family: "Inter", sans-serif;
475
- }
476
-
477
- h1 {
478
- font-size: 1.5rem;
479
- }
480
-
481
- .app {
482
- padding: 20px;
483
- }
484
- ```
485
-
486
- **tsconfig.json**
487
-
488
- ```json
489
- {
490
- "include": ["./**/*"],
491
- "compilerOptions": {
492
- "strict": true,
493
- "esModuleInterop": true,
494
- "lib": ["dom", "es2015"],
495
- "jsx": "react-jsx"
496
- }
497
- }
498
- ```
499
-
500
- **/App.tsx**
501
-
502
- ```tsx
503
- import { useState } from "react";
504
- import { Button, Panel } from "@czi-sds/components";
505
- import { Box } from "@mui/material";
506
- import "./styles.css";
507
-
508
- function App() {
509
- const [open, setOpen] = useState(true);
510
-
511
- return (
512
- <div className="app">
513
- <Button
514
- sdsType="primary"
515
- sdsStyle="icon"
516
- icon="InfoCircle"
517
- onClick={() => setOpen((prev) => !prev)}
518
- aria-label="Panel Toggle"
519
- >
520
- Toggle Panel
521
- </Button>
522
- <p>
523
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus
524
- facilisis tortor et pellentesque pulvinar. Ut at convallis ipsum. Nullam
525
- scelerisque tempor arcu, quis pretium magna semper eu. Nam hendrerit
526
- lectus in enim scelerisque, sed ornare sapien consequat. Proin sed
527
- congue quam. Integer consequat elit tristique sodales rhoncus. In
528
- bibendum dolor sit amet erat porta, nec posuere nibh consectetur. Cras
529
- scelerisque interdum eros ut porta. Pellentesque habitant morbi
530
- tristique senectus et netus et malesuada fames ac turpis egestas. Ut in
531
- lacus et mi efficitur scelerisque. Pellentesque congue purus eu feugiat
532
- cursus. Phasellus urna massa, sollicitudin id elit et, efficitur
533
- faucibus nibh.
534
- </p>
535
- <p>
536
- Nam sit amet tortor varius, lacinia velit quis, lacinia metus. Quisque
537
- dictum, nulla at luctus fringilla, ligula diam fringilla nisl, non
538
- consequat nulla turpis at ex. Donec hendrerit facilisis nisl at
539
- fringilla. Pellentesque posuere tortor ac ante luctus, at euismod augue
540
- vulputate. Vivamus pretium pretium nisi, non convallis nunc volutpat ac.
541
- Nam finibus justo leo, vel pellentesque velit gravida vel. Sed in turpis
542
- non sem efficitur eleifend vel ac lacus. Sed volutpat feugiat dictum.
543
- Pellentesque tristique mollis magna sit amet vestibulum. Nulla ac tellus
544
- eu orci volutpat congue. In vitae dolor et est feugiat fringilla. Sed
545
- varius neque nunc, sed pulvinar neque lobortis posuere.
546
- </p>
547
- <Panel
548
- open={open}
549
- sdsType="overlay"
550
- closeButtonOnClick={() => setOpen(false)}
551
- >
552
- [Panel Content]
553
- </Panel>
554
- </div>
555
- );
556
- }
557
-
558
- export default App;
559
- ```
560
-
561
- **/index.tsx**
562
-
563
- ```tsx
564
- import React from "react";
565
- import { createRoot } from "react-dom/client";
566
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
567
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
568
- import { Theme } from "@czi-sds/components";
569
- import CssBaseline from "@mui/material/CssBaseline";
570
- import useMediaQuery from "@mui/material/useMediaQuery";
571
-
572
- import App from "./App";
573
-
574
- const container = document.getElementById("root");
575
- const root = createRoot(container!);
576
-
577
- const RootApp = () => {
578
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
579
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
580
-
581
- return (
582
- <StyledEngineProvider injectFirst>
583
- <ThemeProvider theme={theme}>
584
- <EmotionThemeProvider theme={theme}>
585
- <CssBaseline />
586
- <App />
587
- </EmotionThemeProvider>
588
- </ThemeProvider>
589
- </StyledEngineProvider>
590
- );
591
- };
592
-
593
- root.render(
594
- <React.StrictMode>
595
- <RootApp />
596
- </React.StrictMode>
597
- );
598
- ```
599
-
600
- **/public/index.html**
601
-
602
- ```html
603
- <!doctype html>
604
- <html lang="en">
605
- <head>
606
- <meta charset="UTF-8" />
607
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
608
- <link rel="preconnect" href="https://fonts.googleapis.com" />
609
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
610
- <link
611
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
612
- rel="stylesheet"
613
- />
614
- <link
615
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
616
- rel="stylesheet"
617
- />
618
- </head>
619
- <body>
620
- <div id="root"></div>
621
- </body>
622
- </html>
623
- ```
624
-
625
- **/package.json**
626
-
627
- ```json
628
- {
629
- "dependencies": {
630
- "react": "^18.0.0",
631
- "react-dom": "^18.0.0",
632
- "react-scripts": "^4.0.0"
633
- },
634
- "devDependencies": {
635
- "@types/react": "^18.0.0",
636
- "@types/react-dom": "^18.0.0",
637
- "typescript": "^4.0.0"
638
- },
639
- "main": "/index.tsx"
640
- }
641
- ```
642
-
643
- ---
644
-
645
- **Overlay Panel with Custom Header (opens from right)**
646
-
647
- This example demonstrates how to implement an overlay `Panel` with a custom header component. The panel still retains the overlay behavior, sliding over the existing content when triggered.
648
-
649
- **/styles.css**
650
-
651
- ```css
652
- body {
653
- font-size: 13px;
654
- font-weight: 400;
655
- letter-spacing: 0.08px;
656
- line-height: 20px;
657
- text-transform: none;
658
- font-family: "Inter", sans-serif;
659
- }
660
-
661
- h1 {
662
- font-size: 1.5rem;
663
- }
664
-
665
- .app {
666
- padding: 20px;
667
- }
668
- ```
669
-
670
- **tsconfig.json**
671
-
672
- ```json
673
- {
674
- "include": ["./**/*"],
675
- "compilerOptions": {
676
- "strict": true,
677
- "esModuleInterop": true,
678
- "lib": ["dom", "es2015"],
679
- "jsx": "react-jsx"
680
- }
681
- }
682
- ```
683
-
684
- **/App.tsx**
685
-
686
- ```tsx
687
- import { useState } from "react";
688
- import { Button, Panel } from "@czi-sds/components";
689
- import { Box, Typography } from "@mui/material";
690
- import "./styles.css";
691
-
692
- function App() {
693
- const [open, setOpen] = useState(true);
694
-
695
- const HeaderComponent = <Typography variant="h2">Panel Header</Typography>;
696
-
697
- return (
698
- <div className="app">
699
- <Button
700
- sdsType="primary"
701
- sdsStyle="icon"
702
- icon="InfoCircle"
703
- onClick={() => setOpen((prev) => !prev)}
704
- aria-label="Panel Toggle"
705
- >
706
- Toggle Panel
707
- </Button>
708
- <p>
709
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus
710
- facilisis tortor et pellentesque pulvinar. Ut at convallis ipsum. Nullam
711
- scelerisque tempor arcu, quis pretium magna semper eu. Nam hendrerit
712
- lectus in enim scelerisque, sed ornare sapien consequat. Proin sed
713
- congue quam. Integer consequat elit tristique sodales rhoncus. In
714
- bibendum dolor sit amet erat porta, nec posuere nibh consectetur. Cras
715
- scelerisque interdum eros ut porta. Pellentesque habitant morbi
716
- tristique senectus et netus et malesuada fames ac turpis egestas. Ut in
717
- lacus et mi efficitur scelerisque. Pellentesque congue purus eu feugiat
718
- cursus. Phasellus urna massa, sollicitudin id elit et, efficitur
719
- faucibus nibh.
720
- </p>
721
- <p>
722
- Nam sit amet tortor varius, lacinia velit quis, lacinia metus. Quisque
723
- dictum, nulla at luctus fringilla, ligula diam fringilla nisl, non
724
- consequat nulla turpis at ex. Donec hendrerit facilisis nisl at
725
- fringilla. Pellentesque posuere tortor ac ante luctus, at euismod augue
726
- vulputate. Vivamus pretium pretium nisi, non convallis nunc volutpat ac.
727
- Nam finibus justo leo, vel pellentesque velit gravida vel. Sed in turpis
728
- non sem efficitur eleifend vel ac lacus. Sed volutpat feugiat dictum.
729
- Pellentesque tristique mollis magna sit amet vestibulum. Nulla ac tellus
730
- eu orci volutpat congue. In vitae dolor et est feugiat fringilla. Sed
731
- varius neque nunc, sed pulvinar neque lobortis posuere.
732
- </p>
733
- <Panel
734
- open={open}
735
- sdsType="overlay"
736
- closeButtonOnClick={() => setOpen(false)}
737
- HeaderComponent={HeaderComponent}
738
- position="right"
739
- >
740
- [Panel Content]
741
- </Panel>
742
- </div>
743
- );
744
- }
745
-
746
- export default App;
747
- ```
748
-
749
- **/index.tsx**
750
-
751
- ```tsx
752
- import React from "react";
753
- import { createRoot } from "react-dom/client";
754
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
755
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
756
- import { Theme } from "@czi-sds/components";
757
- import CssBaseline from "@mui/material/CssBaseline";
758
- import useMediaQuery from "@mui/material/useMediaQuery";
759
-
760
- import App from "./App";
761
-
762
- const container = document.getElementById("root");
763
- const root = createRoot(container!);
764
-
765
- const RootApp = () => {
766
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
767
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
768
-
769
- return (
770
- <StyledEngineProvider injectFirst>
771
- <ThemeProvider theme={theme}>
772
- <EmotionThemeProvider theme={theme}>
773
- <CssBaseline />
774
- <App />
775
- </EmotionThemeProvider>
776
- </ThemeProvider>
777
- </StyledEngineProvider>
778
- );
779
- };
780
-
781
- root.render(
782
- <React.StrictMode>
783
- <RootApp />
784
- </React.StrictMode>
785
- );
786
- ```
787
-
788
- **/public/index.html**
789
-
790
- ```html
791
- <!doctype html>
792
- <html lang="en">
793
- <head>
794
- <meta charset="UTF-8" />
795
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
796
- <link rel="preconnect" href="https://fonts.googleapis.com" />
797
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
798
- <link
799
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
800
- rel="stylesheet"
801
- />
802
- <link
803
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
804
- rel="stylesheet"
805
- />
806
- </head>
807
- <body>
808
- <div id="root"></div>
809
- </body>
810
- </html>
811
- ```
812
-
813
- **/package.json**
814
-
815
- ```json
816
- {
817
- "dependencies": {
818
- "react": "^18.0.0",
819
- "react-dom": "^18.0.0",
820
- "react-scripts": "^4.0.0"
821
- },
822
- "devDependencies": {
823
- "@types/react": "^18.0.0",
824
- "@types/react-dom": "^18.0.0",
825
- "typescript": "^4.0.0"
826
- },
827
- "main": "/index.tsx"
828
- }
829
- ```
830
-
831
- ---
832
-
833
- **Overlay Panel with a Custom Closing Button (opens from bottom)**
834
-
835
- This example demonstrates how to implement an overlay `Panel` with a custom close button. Instead of using the default close functionality, the close button can be customized to match specific design requirements or to add additional features, such as custom icons, animations, or styling. The panel will still function as an overlay, sliding over the current content, but with enhanced control over how it is closed.
836
-
837
- **/styles.css**
838
-
839
- ```css
840
- body {
841
- font-size: 13px;
842
- font-weight: 400;
843
- letter-spacing: 0.08px;
844
- line-height: 20px;
845
- text-transform: none;
846
- font-family: "Inter", sans-serif;
847
- }
848
-
849
- h1 {
850
- font-size: 1.5rem;
851
- }
852
-
853
- .app {
854
- padding: 20px;
855
- }
856
- ```
857
-
858
- **tsconfig.json**
859
-
860
- ```json
861
- {
862
- "include": ["./**/*"],
863
- "compilerOptions": {
864
- "strict": true,
865
- "esModuleInterop": true,
866
- "lib": ["dom", "es2015"],
867
- "jsx": "react-jsx"
868
- }
869
- }
870
- ```
871
-
872
- **/App.tsx**
873
-
874
- ```tsx
875
- import { useState } from "react";
876
- import { Button, Panel } from "@czi-sds/components";
877
- import { Box, Typography } from "@mui/material";
878
- import "./styles.css";
879
-
880
- function App() {
881
- const [open, setOpen] = useState(true);
882
-
883
- const HeaderComponent = <Typography variant="h2">Panel Header</Typography>;
884
-
885
- const CloseButton = (
886
- <Button
887
- sdsStyle="icon"
888
- sdsSize="small"
889
- sdsType="secondary"
890
- icon="ChevronDown"
891
- aria-label="Panel Toggle"
892
- />
893
- );
894
-
895
- return (
896
- <div className="app">
897
- <Button
898
- sdsType="primary"
899
- sdsStyle="icon"
900
- icon="InfoCircle"
901
- onClick={() => setOpen((prev) => !prev)}
902
- aria-label="Panel Toggle"
903
- >
904
- Toggle Panel
905
- </Button>
906
- <p>
907
- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus
908
- facilisis tortor et pellentesque pulvinar. Ut at convallis ipsum. Nullam
909
- scelerisque tempor arcu, quis pretium magna semper eu. Nam hendrerit
910
- lectus in enim scelerisque, sed ornare sapien consequat. Proin sed
911
- congue quam. Integer consequat elit tristique sodales rhoncus. In
912
- bibendum dolor sit amet erat porta, nec posuere nibh consectetur. Cras
913
- scelerisque interdum eros ut porta. Pellentesque habitant morbi
914
- tristique senectus et netus et malesuada fames ac turpis egestas. Ut in
915
- lacus et mi efficitur scelerisque. Pellentesque congue purus eu feugiat
916
- cursus. Phasellus urna massa, sollicitudin id elit et, efficitur
917
- faucibus nibh.
918
- </p>
919
- <p>
920
- Nam sit amet tortor varius, lacinia velit quis, lacinia metus. Quisque
921
- dictum, nulla at luctus fringilla, ligula diam fringilla nisl, non
922
- consequat nulla turpis at ex. Donec hendrerit facilisis nisl at
923
- fringilla. Pellentesque posuere tortor ac ante luctus, at euismod augue
924
- vulputate. Vivamus pretium pretium nisi, non convallis nunc volutpat ac.
925
- Nam finibus justo leo, vel pellentesque velit gravida vel. Sed in turpis
926
- non sem efficitur eleifend vel ac lacus. Sed volutpat feugiat dictum.
927
- Pellentesque tristique mollis magna sit amet vestibulum. Nulla ac tellus
928
- eu orci volutpat congue. In vitae dolor et est feugiat fringilla. Sed
929
- varius neque nunc, sed pulvinar neque lobortis posuere.
930
- </p>
931
- <Panel
932
- open={open}
933
- sdsType="overlay"
934
- closeButtonOnClick={() => setOpen(false)}
935
- HeaderComponent={HeaderComponent}
936
- CloseButtonComponent={CloseButton}
937
- position="bottom"
938
- >
939
- [Panel Content]
940
- </Panel>
941
- </div>
942
- );
943
- }
944
-
945
- export default App;
946
- ```
947
-
948
- **/index.tsx**
949
-
950
- ```tsx
951
- import React from "react";
952
- import { createRoot } from "react-dom/client";
953
- import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
954
- import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
955
- import { Theme } from "@czi-sds/components";
956
- import CssBaseline from "@mui/material/CssBaseline";
957
- import useMediaQuery from "@mui/material/useMediaQuery";
958
-
959
- import App from "./App";
960
-
961
- const container = document.getElementById("root");
962
- const root = createRoot(container!);
963
-
964
- const RootApp = () => {
965
- const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
966
- const theme = prefersDarkMode ? Theme("dark") : Theme("light");
967
-
968
- return (
969
- <StyledEngineProvider injectFirst>
970
- <ThemeProvider theme={theme}>
971
- <EmotionThemeProvider theme={theme}>
972
- <CssBaseline />
973
- <App />
974
- </EmotionThemeProvider>
975
- </ThemeProvider>
976
- </StyledEngineProvider>
977
- );
978
- };
979
-
980
- root.render(
981
- <React.StrictMode>
982
- <RootApp />
983
- </React.StrictMode>
984
- );
985
- ```
986
-
987
- **/public/index.html**
988
-
989
- ```html
990
- <!doctype html>
991
- <html lang="en">
992
- <head>
993
- <meta charset="UTF-8" />
994
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
995
- <link rel="preconnect" href="https://fonts.googleapis.com" />
996
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
997
- <link
998
- href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"
999
- rel="stylesheet"
1000
- />
1001
- <link
1002
- href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap"
1003
- rel="stylesheet"
1004
- />
1005
- </head>
1006
- <body>
1007
- <div id="root"></div>
1008
- </body>
1009
- </html>
1010
- ```
1011
-
1012
- **/package.json**
1013
-
1014
- ```json
1015
- {
1016
- "dependencies": {
1017
- "react": "^18.0.0",
1018
- "react-dom": "^18.0.0",
1019
- "react-scripts": "^4.0.0"
1020
- },
1021
- "devDependencies": {
1022
- "@types/react": "^18.0.0",
1023
- "@types/react-dom": "^18.0.0",
1024
- "typescript": "^4.0.0"
1025
- },
1026
- "main": "/index.tsx"
1027
- }
1028
- ```
1029
-
1030
- ---