@czi-sds/mcp 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/README.md +2 -1
  2. package/data/component-docs/Accordion.md +291 -0
  3. package/data/component-docs/Autocomplete.md +525 -0
  4. package/data/component-docs/Banner.md +231 -0
  5. package/data/component-docs/Button.md +224 -0
  6. package/data/component-docs/ButtonDropdown.md +256 -0
  7. package/data/component-docs/ButtonGroup.md +320 -0
  8. package/data/component-docs/ButtonToggle.md +397 -0
  9. package/data/component-docs/Callout.md +268 -0
  10. package/data/component-docs/CellBasic.md +122 -0
  11. package/data/component-docs/CellComponent.md +63 -0
  12. package/data/component-docs/CellHeader.md +128 -0
  13. package/data/component-docs/ComplexFilter.md +294 -0
  14. package/data/component-docs/ContentCard.md +406 -0
  15. package/data/component-docs/Dialog.md +651 -0
  16. package/data/component-docs/Dropdown.md +155 -0
  17. package/data/component-docs/DropdownMenu.md +949 -0
  18. package/data/component-docs/HeatmapChart.md +782 -0
  19. package/data/component-docs/Hero.md +363 -0
  20. package/data/component-docs/Icon.md +283 -0
  21. package/data/component-docs/InputCheckbox.md +205 -0
  22. package/data/component-docs/InputDropdown.md +482 -0
  23. package/data/component-docs/InputRadio.md +173 -0
  24. package/data/component-docs/InputSearch.md +81 -0
  25. package/data/component-docs/InputSlider.md +189 -0
  26. package/data/component-docs/InputText.md +110 -0
  27. package/data/component-docs/InputToggle.md +141 -0
  28. package/data/component-docs/IntentMessage.md +293 -0
  29. package/data/component-docs/Legend.md +442 -0
  30. package/data/component-docs/Link.md +23 -0
  31. package/data/component-docs/List.md +300 -0
  32. package/data/component-docs/LoadingIndicator.md +198 -0
  33. package/data/component-docs/Menu.md +298 -0
  34. package/data/component-docs/MenuItem.md +100 -0
  35. package/data/component-docs/NavigationFooter.md +165 -0
  36. package/data/component-docs/NavigationHeader.md +500 -0
  37. package/data/component-docs/NavigationJumpTo.md +414 -0
  38. package/data/component-docs/Notification.md +288 -0
  39. package/data/component-docs/Pagination.md +67 -0
  40. package/data/component-docs/Panel.md +636 -0
  41. package/data/component-docs/Popover.md +448 -0
  42. package/data/component-docs/PreComposedTable.md +2947 -0
  43. package/data/component-docs/SegmentedControl.md +396 -0
  44. package/data/component-docs/StackedBarChart.md +475 -0
  45. package/data/component-docs/Table.md +2000 -0
  46. package/data/component-docs/TableHeader.md +53 -0
  47. package/data/component-docs/TableRow.md +74 -0
  48. package/data/component-docs/Tabs.md +455 -0
  49. package/data/component-docs/Tag.md +647 -0
  50. package/data/component-docs/TagFilter.md +131 -0
  51. package/data/component-docs/Tooltip.md +561 -0
  52. package/data/component-docs/TooltipCondensed.md +203 -0
  53. package/data/component-docs/TooltipTable.md +145 -0
  54. package/data/component-docs/index.json +262 -0
  55. package/data/component-list.json +2 -5
  56. package/data/component-props/Accordion.json +31 -11
  57. package/data/component-props/Alert.json +3 -3
  58. package/data/component-props/Autocomplete.json +150 -15
  59. package/data/component-props/Banner.json +31 -17
  60. package/data/component-props/Button.json +45 -20
  61. package/data/component-props/ButtonDropdown.json +36 -17
  62. package/data/component-props/ButtonDropdownLegacy.json +11 -11
  63. package/data/component-props/ButtonGroup.json +32 -11
  64. package/data/component-props/ButtonIcon.json +10 -10
  65. package/data/component-props/ButtonLegacy.json +19 -19
  66. package/data/component-props/ButtonToggle.json +32 -19
  67. package/data/component-props/ButtonToggleLegacy.json +11 -11
  68. package/data/component-props/Callout.json +58 -17
  69. package/data/component-props/CellBasic.json +94 -41
  70. package/data/component-props/CellComponent.json +23 -7
  71. package/data/component-props/CellHeader.json +62 -19
  72. package/data/component-props/ComplexFilter.json +52 -21
  73. package/data/component-props/ContentCard.json +70 -47
  74. package/data/component-props/Dialog.json +47 -14
  75. package/data/component-props/Dropdown.json +68 -31
  76. package/data/component-props/DropdownMenu.json +128 -23
  77. package/data/component-props/HeatmapChart.json +88 -12
  78. package/data/component-props/Hero.json +80 -39
  79. package/data/component-props/Icon.json +20 -9
  80. package/data/component-props/InputCheckbox.json +36 -14
  81. package/data/component-props/InputDropdown.json +75 -27
  82. package/data/component-props/InputRadio.json +31 -13
  83. package/data/component-props/InputSearch.json +41 -18
  84. package/data/component-props/InputSlider.json +46 -19
  85. package/data/component-props/InputText.json +26 -19
  86. package/data/component-props/InputToggle.json +26 -9
  87. package/data/component-props/IntentMessage.json +38 -9
  88. package/data/component-props/Link.json +13 -7
  89. package/data/component-props/LoadingIndicator.json +11 -3
  90. package/data/component-props/MenuItem.json +38 -19
  91. package/data/component-props/MenuSelect.json +8 -8
  92. package/data/component-props/NavigationFooter.json +49 -19
  93. package/data/component-props/NavigationHeader.json +150 -37
  94. package/data/component-props/NavigationJumpTo.json +33 -7
  95. package/data/component-props/Notification.json +39 -21
  96. package/data/component-props/Pagination.json +39 -11
  97. package/data/component-props/Panel.json +62 -9
  98. package/data/component-props/Popover.json +80 -7
  99. package/data/component-props/PreComposedTable.json +99 -27
  100. package/data/component-props/SegmentedControl.json +42 -3
  101. package/data/component-props/StackedBarChart.json +116 -42
  102. package/data/component-props/TableRow.json +38 -19
  103. package/data/component-props/Tabs.json +66 -9
  104. package/data/component-props/Tag.json +34 -17
  105. package/data/component-props/TagFilter.json +10 -3
  106. package/data/component-props/Tooltip.json +49 -18
  107. package/data/component-props/TooltipCondensed.json +18 -9
  108. package/data/component-props/TooltipTable.json +17 -7
  109. package/data/resources/{zeroheight-rules.md → documentation-rules.md} +43 -30
  110. package/data/resources/figma-rules.md +2 -2
  111. package/dist/stdio.js +112 -208
  112. package/package.json +9 -5
  113. package/data/component-props/ButtonDropdownV2.json +0 -34
  114. package/data/component-props/ButtonNew.json +0 -47
  115. package/data/component-props/ButtonToggleV2.json +0 -44
  116. package/data/component-props/ButtonV2.json +0 -43
  117. package/data/zeroheight-cache.json +0 -10259
  118. package/data/zeroheight-exports/Accordion.md +0 -774
  119. package/data/zeroheight-exports/Banner.md +0 -691
  120. package/data/zeroheight-exports/Borders.md +0 -117
  121. package/data/zeroheight-exports/Buttons.md +0 -1854
  122. package/data/zeroheight-exports/Callout.md +0 -931
  123. package/data/zeroheight-exports/Colors.md +0 -1755
  124. package/data/zeroheight-exports/Content-Card.md +0 -309
  125. package/data/zeroheight-exports/Contributing-to-SDS.md +0 -98
  126. package/data/zeroheight-exports/Control-Inputs.md +0 -2818
  127. package/data/zeroheight-exports/Corners.md +0 -104
  128. package/data/zeroheight-exports/Cover-page.md +0 -3
  129. package/data/zeroheight-exports/Dialog.md +0 -1367
  130. package/data/zeroheight-exports/Downloads.md +0 -236
  131. package/data/zeroheight-exports/Drop-Shadows.md +0 -79
  132. package/data/zeroheight-exports/Dropdown-Input.md +0 -1776
  133. package/data/zeroheight-exports/Dropdown-Menus.md +0 -913
  134. package/data/zeroheight-exports/Element-Status-Tracker.md +0 -267
  135. package/data/zeroheight-exports/Field-Inputs.md +0 -1405
  136. package/data/zeroheight-exports/Filters.md +0 -1111
  137. package/data/zeroheight-exports/Getting-Started.md +0 -1157
  138. package/data/zeroheight-exports/Hero.md +0 -414
  139. package/data/zeroheight-exports/Icons.md +0 -2067
  140. package/data/zeroheight-exports/Intent.md +0 -86
  141. package/data/zeroheight-exports/Introduction-to-Bases.md +0 -35
  142. package/data/zeroheight-exports/Introduction-to-Cells.md +0 -35
  143. package/data/zeroheight-exports/Introduction-to-DNA.md +0 -35
  144. package/data/zeroheight-exports/Introduction-to-Genes.md +0 -35
  145. package/data/zeroheight-exports/Introduction.md +0 -115
  146. package/data/zeroheight-exports/Link.md +0 -432
  147. package/data/zeroheight-exports/Lists.md +0 -986
  148. package/data/zeroheight-exports/Loading-Indicator.md +0 -41
  149. package/data/zeroheight-exports/Navigation.md +0 -1190
  150. package/data/zeroheight-exports/Notification.md +0 -1038
  151. package/data/zeroheight-exports/Panel.md +0 -1030
  152. package/data/zeroheight-exports/README.md +0 -122
  153. package/data/zeroheight-exports/Responsive-Design.md +0 -330
  154. package/data/zeroheight-exports/Search-Input.md +0 -91
  155. package/data/zeroheight-exports/Search.md +0 -822
  156. package/data/zeroheight-exports/Segmented-Control.md +0 -609
  157. package/data/zeroheight-exports/Spacing.md +0 -297
  158. package/data/zeroheight-exports/Table.md +0 -5345
  159. package/data/zeroheight-exports/Tabs.md +0 -1324
  160. package/data/zeroheight-exports/Tags.md +0 -1545
  161. package/data/zeroheight-exports/Text-Link.md +0 -268
  162. package/data/zeroheight-exports/Theming.md +0 -362
  163. package/data/zeroheight-exports/Tooltips.md +0 -2015
  164. package/data/zeroheight-exports/Typography.md +0 -800
package/README.md CHANGED
@@ -31,7 +31,8 @@ packages/mcp/
31
31
  ├── data/ # Static data files
32
32
  │ ├── component-list.json
33
33
  │ ├── component-props/
34
- │ ├── component-props-storybook/
34
+ │ ├── component-docs/
35
+ │ ├── resources/
35
36
  │ └── tailwind.json
36
37
  ├── scripts/ # Build and generation scripts
37
38
  │ ├── generate-*.ts # Data generation scripts
@@ -0,0 +1,291 @@
1
+ # Accordion
2
+
3
+ ## SDS Source Code
4
+
5
+ The component's source code in the SDS codebase can be found [here](https://github.com/chanzuckerberg/sci-components/tree/main/packages/components/src/core/Accordion).
6
+
7
+ ## Import
8
+
9
+ **React TypeScript**
10
+
11
+ ```tsx
12
+ import {
13
+ Accordion,
14
+ AccordionDetails,
15
+ AccordionHeader,
16
+ } from "@czi-sds/components";
17
+ ```
18
+
19
+ ## Code examples
20
+
21
+ ### Default Accordion
22
+
23
+ This example has the minimum props needed for the Accordion component.
24
+
25
+ **Example: DefaultAccordion**
26
+
27
+ ```tsx
28
+ // Most minimal Accordion (just has the basic requirements)
29
+
30
+ import {
31
+ Accordion,
32
+ AccordionHeader,
33
+ AccordionDetails,
34
+ } from "@czi-sds/components";
35
+
36
+ function App() {
37
+ return (
38
+ <div className="app">
39
+ <Accordion id="accordion-1">
40
+ <AccordionHeader>Accordion Header</AccordionHeader>
41
+ <AccordionDetails>
42
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
43
+ malesuada lacus ex, sit amet blandit leo lobortis eget.
44
+ </AccordionDetails>
45
+ </Accordion>
46
+ </div>
47
+ );
48
+ }
49
+
50
+ export default App;
51
+ ```
52
+
53
+ ### Accordion with subtitles
54
+
55
+ This example show a group of Accordions, each with its own subtitle and dividing line.
56
+
57
+ **Example: AccordionWithSubtitles**
58
+
59
+ ```tsx
60
+ // A group of Accordions, each with a subtitle and a dividing line
61
+
62
+ import {
63
+ Accordion,
64
+ AccordionHeader,
65
+ AccordionDetails,
66
+ } from "@czi-sds/components";
67
+
68
+ function App() {
69
+ return (
70
+ <div className="app">
71
+ <Accordion id="accordion-1" useDivider>
72
+ <AccordionHeader subtitle="Explore the functionalities of our amazing product">
73
+ Product Features
74
+ </AccordionHeader>
75
+ <AccordionDetails>
76
+ Unveil the multitude of features that make our product stand out. From
77
+ seamless integration with your existing workflow to advanced
78
+ customization options, each feature has been meticulously crafted to
79
+ empower you. Navigate through this section to discover how our product
80
+ can revolutionize the way you work.
81
+ </AccordionDetails>
82
+ </Accordion>
83
+ <Accordion id="accordion-2" useDivider>
84
+ <AccordionHeader subtitle="Answers to commonly asked questions about our service">
85
+ FAQ Section
86
+ </AccordionHeader>
87
+ <AccordionDetails>
88
+ Delve into a comprehensive compilation of frequently asked questions
89
+ and their detailed answers. This section is your go-to resource for
90
+ clarifying any doubts you might have about our service. Whether it's
91
+ about pricing, compatibility, or functionality, we've got you covered
92
+ with clear and concise explanations, ensuring a smooth and informed
93
+ experience.
94
+ </AccordionDetails>
95
+ </Accordion>
96
+ <Accordion id="accordion-3">
97
+ <AccordionHeader subtitle="Enhance your skills with our collection of educational materials">
98
+ Learning Resources
99
+ </AccordionHeader>
100
+ <AccordionDetails>
101
+ Embark on a journey of continuous improvement with our treasure trove
102
+ of learning materials. This section hosts an array of tutorials,
103
+ guides, and insightful articles designed to enhance your skills and
104
+ deepen your understanding. Whether you're a beginner or an expert,
105
+ these resources offer valuable insights to help you grow and excel in
106
+ your endeavors.
107
+ </AccordionDetails>
108
+ </Accordion>
109
+ </div>
110
+ );
111
+ }
112
+
113
+ export default App;
114
+ ```
115
+
116
+ ### Accordion with disabled item
117
+
118
+ This example shows a group of multiple Accordions, one of which is disabled and cannot be opened.
119
+
120
+ **Example: AccordionWithDisabledItem**
121
+
122
+ ```tsx
123
+ // A group of Accordions where the second one cannot be opened
124
+
125
+ import {
126
+ Accordion,
127
+ AccordionHeader,
128
+ AccordionDetails,
129
+ } from "@czi-sds/components";
130
+
131
+ function App() {
132
+ return (
133
+ <div className="app">
134
+ <Accordion id="accordion-1" useDivider>
135
+ <AccordionHeader subtitle="Explore the functionalities of our amazing product">
136
+ Product Features
137
+ </AccordionHeader>
138
+ <AccordionDetails>
139
+ Unveil the multitude of features that make our product stand out. From
140
+ seamless integration with your existing workflow to advanced
141
+ customization options, each feature has been meticulously crafted to
142
+ empower you. Navigate through this section to discover how our product
143
+ can revolutionize the way you work.
144
+ </AccordionDetails>
145
+ </Accordion>
146
+ <Accordion id="accordion-2" useDivider disabled>
147
+ <AccordionHeader subtitle="Answers to commonly asked questions about our service">
148
+ FAQ Section
149
+ </AccordionHeader>
150
+ <AccordionDetails>
151
+ Delve into a comprehensive compilation of frequently asked questions
152
+ and their detailed answers. This section is your go-to resource for
153
+ clarifying any doubts you might have about our service. Whether it's
154
+ about pricing, compatibility, or functionality, we've got you covered
155
+ with clear and concise explanations, ensuring a smooth and informed
156
+ experience.
157
+ </AccordionDetails>
158
+ </Accordion>
159
+ <Accordion id="accordion-3">
160
+ <AccordionHeader subtitle="Enhance your skills with our collection of educational materials">
161
+ Learning Resources
162
+ </AccordionHeader>
163
+ <AccordionDetails>
164
+ Embark on a journey of continuous improvement with our treasure trove
165
+ of learning materials. This section hosts an array of tutorials,
166
+ guides, and insightful articles designed to enhance your skills and
167
+ deepen your understanding. Whether you're a beginner or an expert,
168
+ these resources offer valuable insights to help you grow and excel in
169
+ your endeavors.
170
+ </AccordionDetails>
171
+ </Accordion>
172
+ </div>
173
+ );
174
+ }
175
+
176
+ export default App;
177
+ ```
178
+
179
+ ### Accordion with left toggle
180
+
181
+ This example moves the toggle chevron before the header text, which reads better in a wide container.
182
+
183
+ **Example: AccordionWithLeftToggle**
184
+
185
+ ```tsx
186
+ // The toggle chevron rendered before the header text instead of after it
187
+
188
+ import {
189
+ Accordion,
190
+ AccordionHeader,
191
+ AccordionDetails,
192
+ } from "@czi-sds/components";
193
+
194
+ function App() {
195
+ return (
196
+ <div className="app">
197
+ <Accordion id="accordion-1" togglePosition="left" useDivider>
198
+ <AccordionHeader subtitle="Explore the functionalities of our amazing product">
199
+ Product Features
200
+ </AccordionHeader>
201
+ <AccordionDetails>
202
+ Unveil the multitude of features that make our product stand out. From
203
+ seamless integration with your existing workflow to advanced
204
+ customization options, each feature has been meticulously crafted to
205
+ empower you.
206
+ </AccordionDetails>
207
+ </Accordion>
208
+ <Accordion id="accordion-2" togglePosition="left">
209
+ <AccordionHeader subtitle="Answers to commonly asked questions about our service">
210
+ FAQ Section
211
+ </AccordionHeader>
212
+ <AccordionDetails>
213
+ Delve into a comprehensive compilation of frequently asked questions
214
+ and their detailed answers. This section is your go-to resource for
215
+ clarifying any doubts you might have about our service.
216
+ </AccordionDetails>
217
+ </Accordion>
218
+ </div>
219
+ );
220
+ }
221
+
222
+ export default App;
223
+ ```
224
+
225
+ ### Accordion expanded by default
226
+
227
+ This example opens on first render and uses the larger of the two chevron sizes.
228
+
229
+ **Example: AccordionExpandedByDefault**
230
+
231
+ ```tsx
232
+ // An Accordion that is already open on first render
233
+
234
+ import {
235
+ Accordion,
236
+ AccordionHeader,
237
+ AccordionDetails,
238
+ } from "@czi-sds/components";
239
+
240
+ function App() {
241
+ return (
242
+ <div className="app">
243
+ <Accordion id="accordion-1" defaultExpanded>
244
+ <AccordionHeader chevronSize="xs">Accordion Header</AccordionHeader>
245
+ <AccordionDetails>
246
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse
247
+ malesuada lacus ex, sit amet blandit leo lobortis eget.
248
+ </AccordionDetails>
249
+ </Accordion>
250
+ </div>
251
+ );
252
+ }
253
+
254
+ export default App;
255
+ ```
256
+
257
+ ## SDS vs MUI
258
+
259
+ 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:
260
+
261
+ - `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
262
+
263
+ - `togglePosition`: takes `"right"` (default) or `"left"` as values, and specifies where the baked-in Chevron icon that acts as a visual toggle sits
264
+
265
+ Additionally, there are a couple of MUI props that are not currently supported by the SDS Accordion component:
266
+
267
+ - `defaultExpanded`: this boolean prop has no effect when used
268
+
269
+ - `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
270
+
271
+ - `disableGutters`: this boolean prop is not needed with the SDS accordion design, and has no effect
272
+
273
+ ## MUI Documentation
274
+
275
+ Documentation for the underlying MUI component can be found [here](https://mui.com/material-ui/react-accordion/).
276
+
277
+ ## Props
278
+
279
+ Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
280
+
281
+ | Name | Type | Default | Description |
282
+ | ----------------- | --------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- |
283
+ | `id` | `string` | - | Required. A unique id for each accordion item, also used to derive the ids that link the header and its content for screen readers. |
284
+ | `defaultExpanded` | `boolean` | `false` | Render the accordion already expanded on first paint. |
285
+ | `disabled` | `boolean` | `false` | The `disabled` prop, when set to `true`, prevents user interaction with the Accordion component, keeping it in a static state. |
286
+ | `togglePosition` | `"right"` \| `"left"` | `"right"` | Position of the toggle chevron icon. |
287
+ | `useDivider` | `boolean` | `false` | Display a divider line between accordion items. |
288
+ | `subtitle` | `string` | - | Set on AccordionHeader. A text that will be displayed as a subtitle beneath the accordion title. |
289
+ | `chevronSize` | `"xs"` \| `"s"` | `"xs"` | Set on AccordionHeader. Size of the toggle chevron icon. |
290
+
291
+ There are more props that can be used with the Accordion component, via those available to [MUI's Accordion component](https://mui.com/material-ui/api/accordion/#props).