@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,717 @@
1
+ # Accordions
2
+
3
+ To help control the amount of information presented to the user, Accordions are expandable/collapsable elements that hide and reveal content.
4
+
5
+ ## Overview
6
+
7
+ | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
8
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
9
+
10
+ Accordions are elements that can be used by designers to hide or reveal content. Use the header text to communicate what type of content the user can expect to see when the Accordion is expanded.
11
+
12
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
13
+
14
+
15
+
16
+ ---
17
+
18
+ ---
19
+
20
+ ### Accordion Spacing
21
+
22
+ These rules establish how much margin should exist between and around elements.
23
+
24
+ ## Code
25
+
26
+ ## Accordion Component
27
+
28
+ | Below you will find an interactive Storybook iframe for Accordions. 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:** Accordion |
29
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------- |
30
+
31
+ ---
32
+
33
+ > This component appears as it is in the default SDS codebase. Once imported into the napari hub or napari.org codebases, use a theme file to enable the napari visual appearance customization.
34
+
35
+ ### Accordion
36
+
37
+ Storybook
38
+
39
+ ---
40
+
41
+ To help control the amount of information presented to the user, Accordions are expandable/collapsable elements that hide and reveal content.
42
+
43
+ ## Overview
44
+
45
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
46
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
47
+
48
+ Accordions are elements that can be used by designers to hide or reveal content. Use the header text to communicate what type of content the user can expect to see when the Accordion is expanded. They can optionally include a bottom-positioned divider line to help visually separate an Accordion from the one below it.
49
+
50
+ Once expanded, the content revealed within the Accordion can be whatever the designer desires, whether basic text or another component or element.
51
+
52
+ Click on each state below to enter inspect view and get details on its code attributes and any global styles it uses.
53
+
54
+ ---
55
+
56
+ ---
57
+
58
+ ---
59
+
60
+ ### Accordion Spacing
61
+
62
+ These rules establish how much margin should exist between and around elements.
63
+
64
+ ## Code
65
+
66
+ ## Accordion Component
67
+
68
+ | Below you will find an interactive Storybook iframe for Accordions. 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:** Accordion |
69
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------- |
70
+
71
+ ---
72
+
73
+ ### Accordion
74
+
75
+ Storybook
76
+
77
+
78
+
79
+ ---
80
+
81
+ Accordions are expandable/collapsable elements that hide and reveal content to help control the amount of information presented to the user at one time.
82
+
83
+ ## Guidelines
84
+
85
+ ## Overview
86
+
87
+ | | In Figma | | | Meets Accessibility | | | In Code |
88
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
89
+
90
+ ### Accordion Variants
91
+
92
+ Accordions are elements that can be used to hide or reveal content. Use the header text to communicate what type of content the user can expect to see when the Accordion is expanded. Accordions can contain anything from — basic text to others components or elements.
93
+
94
+ The Accordion indicator arrow may appear to the left or the right of the header. Accordions may show a subtitle below the header text. Accordions may show bottom divider lines to help visually separate them from one another.
95
+
96
+ ---
97
+
98
+ ### Live Instance
99
+
100
+ Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
101
+
102
+ Default
103
+
104
+ ---
105
+
106
+ ### Accordion – Left Toggle
107
+
108
+ Left-aligned toggles works well when the Accordion's container is wide, because a right-aligned toggle would be far from the header text and it is less obvious that the two elements are related.
109
+
110
+ | Default | Default + Divider | Default + Subtitle | Expanded |
111
+ | ------- | ----------------- | ------------------ | -------- |
112
+
113
+ ---
114
+
115
+ ### Accordion – Right Toggle
116
+
117
+ Use when there's a preference for the Accordion toggle to appear to the right of its header text. The toggle icon right aligns to the right edge of the Accordion's container.
118
+
119
+ | Default | Default + Divider | Default + Subtitle | Expanded |
120
+ | ------- | ----------------- | ------------------ | -------- |
121
+
122
+ ---
123
+
124
+ ### Accordion Spacing
125
+
126
+ These rules establish how much margin should exist between and around elements.
127
+
128
+ ## Code
129
+
130
+ > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
131
+
132
+ ## Accordion
133
+
134
+ ### SDS Source Code
135
+
136
+ The component's source code in the SDS codebase can be found here.
137
+
138
+ ### SDS vs MUI
139
+
140
+ The SDS `Accordion` component introduces a couple new props that aren't part of the MUI version, that make it easier to implement options that may be needed in CZI products:
141
+
142
+ - **`useDivider`\*\***:\*\* this boolean prop adds a horizontal line below the accordion, which can help to visually separate it from other accordions if they are stacked
143
+ - **`togglePosition`\*\***:\*\* takes `right` (default) or `left` as values, and specifies where the baked-in Chevron icon that acts as a visual toggle sits
144
+
145
+ Additionally, there are a couple of MUI props that are not currently supported by the SDS `Accordion` component:
146
+
147
+ - **`defaultExpanded`\*\***:\*\* this boolean prop has no effect when used
148
+ - **`expanded`\*\***:\*\* this boolean prop is not recommended to be used with the SDS `Accordion` component, because it forces the accordion to remain open even when the user clicks it as though to close it
149
+ - **`disableGutters`\*\***:\*\* this boolean prop is not needed with the SDS accordion design, and has no effect
150
+
151
+ ### MUI Documentation
152
+
153
+ Documentation for the underlying MUI component can be found here.
154
+
155
+ ### Props
156
+
157
+ Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
158
+
159
+ | Name | Type | Default | Description |
160
+ | ---------------- | ----------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
161
+ | `id` | `string` | `-` | A unique id for each accordion item. |
162
+ | `disabled` | `bool` | `false` | The `disabled` prop, when set to true, prevents user interaction with the Accordion component, keeping it in a static state. |
163
+ | `togglePosition` | `"right"` ` | "left"` | `right` | Position of the toggle chevron icon. |
164
+ | `subtitle` | `string` | `-` | A text that will be displayed as a subtitle beneath the accordion title. |
165
+ | `useDivider` | `bool` | `false` | Display a divider line between accordion items. |
166
+
167
+ There are more props that can be used with the `InputDropdown` component, via those available to MUI's `Accordion` component.
168
+
169
+ ### Code examples
170
+
171
+ #### Default Accordion
172
+
173
+ This example has the minimum props needed for the `Accordion` component.
174
+
175
+ **/styles.css**
176
+
177
+ ```css
178
+ body {
179
+ font-size: 13px;
180
+ font-weight: 400;
181
+ letter-spacing: 0.08px;
182
+ line-height: 20px;
183
+ text-transform: none;
184
+ font-family: "Inter", sans-serif;
185
+ }
186
+
187
+ h1 {
188
+ font-size: 1.5rem;
189
+ }
190
+
191
+ .app {
192
+ padding: 20px;
193
+ }
194
+ ```
195
+
196
+ **tsconfig.json**
197
+
198
+ ```json
199
+ {
200
+ "include": ["./**/*"],
201
+ "compilerOptions": {
202
+ "strict": true,
203
+ "esModuleInterop": true,
204
+ "lib": ["dom", "es2015"],
205
+ "jsx": "react-jsx"
206
+ }
207
+ }
208
+ ```
209
+
210
+ **/App.tsx**
211
+
212
+ ```tsx
213
+ // Most minimal Accordion (just has the basic requirements)
214
+
215
+ import {
216
+ Accordion,
217
+ AccordionHeader,
218
+ AccordionDetails,
219
+ } from "@czi-sds/components";
220
+ import "./styles.css";
221
+
222
+ function App() {
223
+ return (
224
+ <div className="app">
225
+ <Accordion id="accordion-1" useDivider={false} togglePosition="right">
226
+ <AccordionHeader id={`accordion-1-header`}>
227
+ Accordion Header
228
+ </AccordionHeader>
229
+ <AccordionDetails>
230
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
231
+ malesuada lacus ex, sit amet blandit leo lobortis eget.
232
+ </AccordionDetails>
233
+ </Accordion>
234
+ </div>
235
+ );
236
+ }
237
+
238
+ export default App;
239
+ ```
240
+
241
+ **/index.tsx**
242
+
243
+ ```tsx
244
+ import React from "react";
245
+ import { createRoot } from "react-dom/client";
246
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
247
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
248
+ import { Theme } from "@czi-sds/components";
249
+ import CssBaseline from "@mui/material/CssBaseline";
250
+ import useMediaQuery from "@mui/material/useMediaQuery";
251
+
252
+ import App from "./App";
253
+
254
+ const container = document.getElementById("root");
255
+ const root = createRoot(container!);
256
+
257
+ const RootApp = () => {
258
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
259
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
260
+
261
+ return (
262
+ <StyledEngineProvider injectFirst>
263
+ <ThemeProvider theme={theme}>
264
+ <EmotionThemeProvider theme={theme}>
265
+ <CssBaseline />
266
+ <App />
267
+ </EmotionThemeProvider>
268
+ </ThemeProvider>
269
+ </StyledEngineProvider>
270
+ );
271
+ };
272
+
273
+ root.render(
274
+ <React.StrictMode>
275
+ <RootApp />
276
+ </React.StrictMode>
277
+ );
278
+ ```
279
+
280
+ **/public/index.html**
281
+
282
+ ```html
283
+ <!doctype html>
284
+ <html lang="en">
285
+ <head>
286
+ <meta charset="UTF-8" />
287
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
288
+ <title>Accordion</title>
289
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
290
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
291
+ <link
292
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
293
+ rel="stylesheet"
294
+ />
295
+ <link
296
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
297
+ rel="stylesheet"
298
+ />
299
+ </head>
300
+ <body>
301
+ <div id="root"></div>
302
+ </body>
303
+ </html>
304
+ ```
305
+
306
+ **/package.json**
307
+
308
+ ```json
309
+ {
310
+ "dependencies": {
311
+ "react": "^18.0.0",
312
+ "react-dom": "^18.0.0",
313
+ "react-scripts": "^4.0.0"
314
+ },
315
+ "devDependencies": {
316
+ "@types/react": "^18.0.0",
317
+ "@types/react-dom": "^18.0.0",
318
+ "typescript": "^4.0.0"
319
+ },
320
+ "main": "/index.tsx"
321
+ }
322
+ ```
323
+
324
+ ---
325
+
326
+ #### Accordion with subtitles
327
+
328
+ This example show a group of `Accordions`, each with its own subtitle and dividing line.
329
+
330
+ **/styles.css**
331
+
332
+ ```css
333
+ body {
334
+ font-size: 13px;
335
+ font-weight: 400;
336
+ letter-spacing: 0.08px;
337
+ line-height: 20px;
338
+ text-transform: none;
339
+ font-family: "Inter", sans-serif;
340
+ }
341
+
342
+ h1 {
343
+ font-size: 1.5rem;
344
+ }
345
+
346
+ .app {
347
+ padding: 20px;
348
+ }
349
+ ```
350
+
351
+ **tsconfig.json**
352
+
353
+ ```json
354
+ {
355
+ "include": ["./**/*"],
356
+ "compilerOptions": {
357
+ "strict": true,
358
+ "esModuleInterop": true,
359
+ "lib": ["dom", "es2015"],
360
+ "jsx": "react-jsx"
361
+ }
362
+ }
363
+ ```
364
+
365
+ **/App.tsx**
366
+
367
+ ```tsx
368
+ // Most minimal InputDropdown (just has the basic requirements)
369
+
370
+ import {
371
+ Accordion,
372
+ AccordionHeader,
373
+ AccordionDetails,
374
+ } from "@czi-sds/components";
375
+ import "./styles.css";
376
+
377
+ function App() {
378
+ return (
379
+ <div className="app">
380
+ <Accordion id="accordion-1" useDivider={true} togglePosition="right">
381
+ <AccordionHeader
382
+ id={`accordion-1-header`}
383
+ subtitle="Explore the functionalities of our amazing product"
384
+ >
385
+ Product Features
386
+ </AccordionHeader>
387
+ <AccordionDetails>
388
+ Unveil the multitude of features that make our product stand out. From
389
+ seamless integration with your existing workflow to advanced
390
+ customization options, each feature has been meticulously crafted to
391
+ empower you. Navigate through this section to discover how our product
392
+ can revolutionize the way you work.
393
+ </AccordionDetails>
394
+ </Accordion>
395
+ <Accordion id="accordion-2" useDivider={true} togglePosition="right">
396
+ <AccordionHeader
397
+ id={`accordion-2-header`}
398
+ subtitle="Answers to commonly asked questions about our service"
399
+ >
400
+ FAQ Section
401
+ </AccordionHeader>
402
+ <AccordionDetails>
403
+ Delve into a comprehensive compilation of frequently asked questions
404
+ and their detailed answers. This section is your go-to resource for
405
+ clarifying any doubts you might have about our service. Whether it's
406
+ about pricing, compatibility, or functionality, we've got you covered
407
+ with clear and concise explanations, ensuring a smooth and informed
408
+ experience.
409
+ </AccordionDetails>
410
+ </Accordion>
411
+
412
+ <Accordion id="accordion-3" useDivider={false} togglePosition="right">
413
+ <AccordionHeader
414
+ id={`accordion-3-header`}
415
+ subtitle="Enhance your skills with our collection of educational materials"
416
+ >
417
+ Learning Resources
418
+ </AccordionHeader>
419
+ <AccordionDetails>
420
+ Embark on a journey of continuous improvement with our treasure trove
421
+ of learning materials. This section hosts an array of tutorials,
422
+ guides, and insightful articles designed to enhance your skills and
423
+ deepen your understanding. Whether you're a beginner or an expert,
424
+ these resources offer valuable insights to help you grow and excel in
425
+ your endeavors.
426
+ </AccordionDetails>
427
+ </Accordion>
428
+ </div>
429
+ );
430
+ }
431
+
432
+ export default App;
433
+ ```
434
+
435
+ **/index.tsx**
436
+
437
+ ```tsx
438
+ import React from "react";
439
+ import { createRoot } from "react-dom/client";
440
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
441
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
442
+ import { Theme } from "@czi-sds/components";
443
+ import CssBaseline from "@mui/material/CssBaseline";
444
+ import useMediaQuery from "@mui/material/useMediaQuery";
445
+
446
+ import App from "./App";
447
+
448
+ const container = document.getElementById("root");
449
+ const root = createRoot(container!);
450
+
451
+ const RootApp = () => {
452
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
453
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
454
+
455
+ return (
456
+ <StyledEngineProvider injectFirst>
457
+ <ThemeProvider theme={theme}>
458
+ <EmotionThemeProvider theme={theme}>
459
+ <CssBaseline />
460
+ <App />
461
+ </EmotionThemeProvider>
462
+ </ThemeProvider>
463
+ </StyledEngineProvider>
464
+ );
465
+ };
466
+
467
+ root.render(
468
+ <React.StrictMode>
469
+ <RootApp />
470
+ </React.StrictMode>
471
+ );
472
+ ```
473
+
474
+ **/public/index.html**
475
+
476
+ ```html
477
+ <!doctype html>
478
+ <html lang="en">
479
+ <head>
480
+ <meta charset="UTF-8" />
481
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
482
+ <title>Accordion</title>
483
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
484
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
485
+ <link
486
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
487
+ rel="stylesheet"
488
+ />
489
+ <link
490
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
491
+ rel="stylesheet"
492
+ />
493
+ </head>
494
+ <body>
495
+ <div id="root"></div>
496
+ </body>
497
+ </html>
498
+ ```
499
+
500
+ **/package.json**
501
+
502
+ ```json
503
+ {
504
+ "dependencies": {
505
+ "react": "^18.0.0",
506
+ "react-dom": "^18.0.0",
507
+ "react-scripts": "^4.0.0"
508
+ },
509
+ "devDependencies": {
510
+ "@types/react": "^18.0.0",
511
+ "@types/react-dom": "^18.0.0",
512
+ "typescript": "^4.0.0"
513
+ },
514
+ "main": "/index.tsx"
515
+ }
516
+ ```
517
+
518
+ ---
519
+
520
+ #### Accordion with disabled item
521
+
522
+ This example shows a group of multiple `Accordions`, one of which is disabled and cannot be opened.
523
+
524
+ **/styles.css**
525
+
526
+ ```css
527
+ body {
528
+ font-size: 13px;
529
+ font-weight: 400;
530
+ letter-spacing: 0.08px;
531
+ line-height: 20px;
532
+ text-transform: none;
533
+ font-family: "Inter", sans-serif;
534
+ }
535
+
536
+ h1 {
537
+ font-size: 1.5rem;
538
+ }
539
+
540
+ .app {
541
+ padding: 20px;
542
+ }
543
+ ```
544
+
545
+ **tsconfig.json**
546
+
547
+ ```json
548
+ {
549
+ "include": ["./**/*"],
550
+ "compilerOptions": {
551
+ "strict": true,
552
+ "esModuleInterop": true,
553
+ "lib": ["dom", "es2015"],
554
+ "jsx": "react-jsx"
555
+ }
556
+ }
557
+ ```
558
+
559
+ **/App.tsx**
560
+
561
+ ```tsx
562
+ // Most minimal InputDropdown (just has the basic requirements)
563
+
564
+ import {
565
+ Accordion,
566
+ AccordionHeader,
567
+ AccordionDetails,
568
+ } from "@czi-sds/components";
569
+ import "./styles.css";
570
+
571
+ function App() {
572
+ return (
573
+ <div className="app">
574
+ <Accordion id="accordion-1" useDivider={true} togglePosition="right">
575
+ <AccordionHeader
576
+ id={`accordion-1-header`}
577
+ subtitle="Explore the functionalities of our amazing product"
578
+ >
579
+ Product Features
580
+ </AccordionHeader>
581
+ <AccordionDetails>
582
+ Unveil the multitude of features that make our product stand out. From
583
+ seamless integration with your existing workflow to advanced
584
+ customization options, each feature has been meticulously crafted to
585
+ empower you. Navigate through this section to discover how our product
586
+ can revolutionize the way you work.
587
+ </AccordionDetails>
588
+ </Accordion>
589
+ <Accordion
590
+ disabled={true}
591
+ id="accordion-2"
592
+ useDivider={true}
593
+ togglePosition="right"
594
+ >
595
+ <AccordionHeader
596
+ id={`accordion-2-header`}
597
+ subtitle="Answers to commonly asked questions about our service"
598
+ >
599
+ FAQ Section
600
+ </AccordionHeader>
601
+ <AccordionDetails>
602
+ Delve into a comprehensive compilation of frequently asked questions
603
+ and their detailed answers. This section is your go-to resource for
604
+ clarifying any doubts you might have about our service. Whether it's
605
+ about pricing, compatibility, or functionality, we've got you covered
606
+ with clear and concise explanations, ensuring a smooth and informed
607
+ experience.
608
+ </AccordionDetails>
609
+ </Accordion>
610
+
611
+ <Accordion id="accordion-3" useDivider={false} togglePosition="right">
612
+ <AccordionHeader
613
+ id={`accordion-3-header`}
614
+ subtitle="Enhance your skills with our collection of educational materials"
615
+ >
616
+ Learning Resources
617
+ </AccordionHeader>
618
+ <AccordionDetails>
619
+ Embark on a journey of continuous improvement with our treasure trove
620
+ of learning materials. This section hosts an array of tutorials,
621
+ guides, and insightful articles designed to enhance your skills and
622
+ deepen your understanding. Whether you're a beginner or an expert,
623
+ these resources offer valuable insights to help you grow and excel in
624
+ your endeavors.
625
+ </AccordionDetails>
626
+ </Accordion>
627
+ </div>
628
+ );
629
+ }
630
+
631
+ export default App;
632
+ ```
633
+
634
+ **/index.tsx**
635
+
636
+ ```tsx
637
+ import React from "react";
638
+ import { createRoot } from "react-dom/client";
639
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
640
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
641
+ import { Theme } from "@czi-sds/components";
642
+ import CssBaseline from "@mui/material/CssBaseline";
643
+ import useMediaQuery from "@mui/material/useMediaQuery";
644
+
645
+ import App from "./App";
646
+
647
+ const container = document.getElementById("root");
648
+ const root = createRoot(container!);
649
+
650
+ const RootApp = () => {
651
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
652
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
653
+
654
+ return (
655
+ <StyledEngineProvider injectFirst>
656
+ <ThemeProvider theme={theme}>
657
+ <EmotionThemeProvider theme={theme}>
658
+ <CssBaseline />
659
+ <App />
660
+ </EmotionThemeProvider>
661
+ </ThemeProvider>
662
+ </StyledEngineProvider>
663
+ );
664
+ };
665
+
666
+ root.render(
667
+ <React.StrictMode>
668
+ <RootApp />
669
+ </React.StrictMode>
670
+ );
671
+ ```
672
+
673
+ **/public/index.html**
674
+
675
+ ```html
676
+ <!doctype html>
677
+ <html lang="en">
678
+ <head>
679
+ <meta charset="UTF-8" />
680
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
681
+ <title>Accordion</title>
682
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
683
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
684
+ <link
685
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
686
+ rel="stylesheet"
687
+ />
688
+ <link
689
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
690
+ rel="stylesheet"
691
+ />
692
+ </head>
693
+ <body>
694
+ <div id="root"></div>
695
+ </body>
696
+ </html>
697
+ ```
698
+
699
+ **/package.json**
700
+
701
+ ```json
702
+ {
703
+ "dependencies": {
704
+ "react": "^18.0.0",
705
+ "react-dom": "^18.0.0",
706
+ "react-scripts": "^4.0.0"
707
+ },
708
+ "devDependencies": {
709
+ "@types/react": "^18.0.0",
710
+ "@types/react-dom": "^18.0.0",
711
+ "typescript": "^4.0.0"
712
+ },
713
+ "main": "/index.tsx"
714
+ }
715
+ ```
716
+
717
+ ---