@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,632 @@
1
+ # Lists
2
+
3
+ Utilizing a list to present information makes it easier to digest or act upon when compared to showing that same content in a solid block of text.
4
+
5
+ ## Overview
6
+
7
+ ## List Variants
8
+
9
+ | There are two types of Lists—Unordered Lists where the order of content does not matter and Ordered Lists which communicate a specific sequence for the content. Use a Header with either list type to help provide context to the content presented in the list. Follow the usage criteria accompanying each variant as a guide for selecting the correct List for any given use case. | | **Jump to variant:** Unordered Ordered |
10
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------- |
11
+
12
+ ---
13
+
14
+ ## Lists
15
+
16
+ | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
17
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
18
+
19
+ ### Unordered List
20
+
21
+ Use when the order of the list's content does not matter.
22
+
23
+ | **bodyM** | **bodyS** | **bodyXs** | **bodyXxs** |
24
+ | --------- | --------- | ---------- | ----------- |
25
+
26
+ ### Ordered List
27
+
28
+ Use when the list's content needs to be presented in a specific order or sequence.
29
+
30
+ | **bodyM** | **bodyS** | **bodyXs** | **bodyXxs** |
31
+ | --------- | --------- | ---------- | ----------- |
32
+
33
+ ---
34
+
35
+ ### List Spacing
36
+
37
+ Spacing between List Items changes based on the font mixin size used. See the table below for spacing reference.
38
+
39
+ | **bodyM** | **bodyS** | **bodyXs** | **bodyXxs** |
40
+ | --------- | --------- | ---------- | ----------- |
41
+
42
+ ---
43
+
44
+ ## Code
45
+
46
+ ## List Component
47
+
48
+ | Below you will find an interactive Storybook iframe for Lists. 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:** List |
49
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------- |
50
+
51
+ ---
52
+
53
+ > 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.
54
+
55
+ ### List
56
+
57
+ Storybook
58
+
59
+ ---
60
+
61
+ Utilizing a list to present information makes it easier to digest or act upon when compared to showing that same content in a solid block of text.
62
+
63
+ ## Overview
64
+
65
+ ## List Variants
66
+
67
+ | There are two types of Lists—Unordered Lists where the order of content does not matter and Ordered Lists which communicate a specific sequence for the content. Use a Header with either list type to help provide context to the content presented in the list. Follow the usage criteria accompanying each variant as a guide for selecting the correct List for any given use case. | | **Jump to variant:** Unordered Ordered |
68
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------- |
69
+
70
+ ---
71
+
72
+ ## Lists
73
+
74
+ | | In Figma | | | Meets Accessibility | | | In CZ GEN EPI Codebase |
75
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ---------------------- |
76
+
77
+ ### Unordered List
78
+
79
+ Use when the order of the list's content does not matter.
80
+
81
+ | **fontBodyL** | **fontBodyM** | **fontBodyS** | **fontBodyXs** | **fontBodyXxs** | **fontBodyXxxs** |
82
+ | ------------- | ------------- | ------------- | -------------- | --------------- | ---------------- |
83
+
84
+
85
+
86
+ ### Ordered List
87
+
88
+ Use when the list's content needs to be presented in a specific order or sequence.
89
+
90
+ | **fontBodyL** | **fontBodyM** | **fontBodyS** | **fontBodyXs** | **fontBodyXxs** | **fontBodyXxxs** |
91
+ | ------------- | ------------- | ------------- | -------------- | --------------- | ---------------- |
92
+
93
+ ---
94
+
95
+ ### List Spacing
96
+
97
+ Spacing between List Items changes based on the font mixin size used. See the table below for spacing reference.
98
+
99
+ | **fontBodyL** | **fontBodyM** | **fontBodyS** | **fontBodyXs** | **fontBodyXxs** | **fontBodyXxxs** |
100
+ | ------------- | ------------- | ------------- | -------------- | --------------- | ---------------- |
101
+
102
+ ---
103
+
104
+ ## Code
105
+
106
+ ## List Component
107
+
108
+ | Below you will find an interactive Storybook iframe for Lists. 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:** List |
109
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------- |
110
+
111
+ ---
112
+
113
+ > 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.
114
+
115
+ ### List
116
+
117
+ Storybook
118
+
119
+ ---
120
+
121
+ Utilizing a list to present information makes it easier to digest or act upon when compared to showing that same content in a solid block of text.
122
+
123
+ ## Overview
124
+
125
+ ## List Variants
126
+
127
+ | There are two types of Lists—Unordered Lists where the order of content does not matter and Ordered Lists which communicate a specific sequence for the content. Use a Header with either list type to help provide context to the content presented in the list. Follow the usage criteria accompanying each variant as a guide for selecting the correct List for any given use case. | | **Jump to variant:** Unordered Ordered |
128
+ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------- |
129
+
130
+ ---
131
+
132
+ ## Lists
133
+
134
+ | | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
135
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
136
+
137
+ ### Unordered List
138
+
139
+ Use when the order of the list's content does not matter.
140
+
141
+ | **fontBodyL** | **fontBodyM** | **fontBodyS** | **fontBodyXs** | **fontBodyXxs** | **fontBodyXxxs** |
142
+ | ------------- | ------------- | ------------- | -------------- | --------------- | ---------------- |
143
+
144
+
145
+
146
+ ### Ordered List
147
+
148
+ Use when the list's content needs to be presented in a specific order or sequence.
149
+
150
+ | **fontBodyL** | **fontBodyM** | **fontBodyS** | **fontBodyXs** | **fontBodyXxs** | **fontBodyXxxs** |
151
+ | ------------- | ------------- | ------------- | -------------- | --------------- | ---------------- |
152
+
153
+ ---
154
+
155
+ ### List Spacing
156
+
157
+ Spacing between List Items changes based on the font mixin size used. See the table below for spacing reference.
158
+
159
+ | **fontBodyL** | **fontBodyM** | **fontBodyS** | **fontBodyXs** | **fontBodyXxs** | **fontBodyXxxs** |
160
+ | ------------- | ------------- | ------------- | -------------- | --------------- | ---------------- |
161
+
162
+ ---
163
+
164
+ ## Code
165
+
166
+ ## List Component
167
+
168
+ | Below you will find an interactive Storybook iframe for Lists. 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:** List |
169
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------- |
170
+
171
+ ---
172
+
173
+ ### List
174
+
175
+ Storybook
176
+
177
+ ---
178
+
179
+ Utilizing a list to present information makes it easier to digest or act upon when compared to showing that same content in a solid block of text.
180
+
181
+ ## Guidelines
182
+
183
+ ## Overview
184
+
185
+ | | In Figma | | | Meets Accessibility | | | In Code |
186
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
187
+
188
+ ### List Variants
189
+
190
+ There are two types of Lists—Unordered where the order of content does not matter and Ordered which communicate a specific sequence for the content. Use a header with either list type to help provide context to the content presented in the list.
191
+
192
+ ---
193
+
194
+ ### Live Instance
195
+
196
+ Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
197
+
198
+ Default
199
+
200
+ ---
201
+
202
+ ### List – Ordered
203
+
204
+ Use when the list's content needs to be presented in a specific order or sequence.
205
+
206
+ | fontBodyL | fontBodyM | fontBodyS | fontBodyXs | fontBodyXxs | fontBodyXxxs |
207
+ | --------- | --------- | --------- | ---------- | ----------- | ------------ |
208
+
209
+ ---
210
+
211
+ ### List – Unordered
212
+
213
+ Use when the order of the list's content does not matter.
214
+
215
+ | fontBodyL | fontBodyM | fontBodyS | fontBodyXs | fontBodyXxs | fontBodyXxxs |
216
+ | --------- | --------- | --------- | ---------- | ----------- | ------------ |
217
+
218
+ ---
219
+
220
+ ### List Spacing
221
+
222
+ Spacing between List Items changes based on the font size used. See the table below for spacing reference.
223
+
224
+ | fontBodyL | fontBodyM | fontBodyS | fontBodyXs | fontBodyXxs | fontBodyXxxs |
225
+ | --------- | --------- | --------- | ---------- | ----------- | ------------ |
226
+
227
+ ## Code
228
+
229
+ > **Note:** The code examples below must install dependencies before displaying and may take extra time to load
230
+
231
+ ## List
232
+
233
+ ### SDS Source Code
234
+
235
+ The component's source code in the SDS codebase can be found here.
236
+
237
+ ### Props
238
+
239
+ Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
240
+
241
+ | Name | Type | Default | Description |
242
+ | -------------- | ---------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------ | ---- | ----- | -------------------------------------------------------------------------------------------- |
243
+ | `marginBottom` | `"xxxs"` ` | "xxs"` ` | "xs"` ` | "s"` ` | "m"` ` | "l"` | `"s"` | Determines the bottom margin size for the list, controlling its spacing from other elements. |
244
+ | `ordered` | `boolean` | `false` | Specifies the type of list component to render. When set to `true`, the list will be an ordered `"ol"` tag, while `false` will render an unordered `"ul"` tag. |
245
+
246
+ ## ListItem
247
+
248
+ ### SDS Source Code
249
+
250
+ The component's source code in the SDS codebase can be found here.
251
+
252
+ ### Props
253
+
254
+ Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
255
+
256
+ | Name | Type | Default | Description |
257
+ | -------------- | ---------- | -------- | ---------------------------------------------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------- | ---- | ----- | ------------------------------------------------------------------- |
258
+ | `fontSize` | `"xxxs"` ` | "xxs"` ` | "xs"` ` | "s"` ` | "m"` ` | "l"` | `"s"` | Sets the font size for the list items, influencing their text size. |
259
+ | `marginBottom` | `"s"` ` | "xs"` ` | "xxs"` | `"xs"` | Controls the bottom margin size for the list items, affecting the spacing between list items. |
260
+ | `ordered` | `boolean` | `false` | Specifies the style and spacings of the list item components based on the parent list element. |
261
+
262
+ ### Code examples
263
+
264
+ #### Unordered list
265
+
266
+ This example shows an unordered `List` of items.
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 { List, ListItem } from "@czi-sds/components";
307
+ import "./styles.css";
308
+
309
+ function App() {
310
+ return (
311
+ <div className="app">
312
+ <List>
313
+ <ListItem fontSize="l" marginBottom="s">
314
+ fontSize=l marginBottom=s
315
+ </ListItem>
316
+ <ListItem fontSize="m" marginBottom="s">
317
+ fontSize=m marginBottom=s
318
+ </ListItem>
319
+ <ListItem fontSize="s" marginBottom="xs">
320
+ fontSize=s marginBottom=xs
321
+ </ListItem>
322
+ <ListItem fontSize="xs" marginBottom="xs">
323
+ fontSize=xs marginBottom=xs
324
+ </ListItem>
325
+ <ListItem fontSize="xxs" marginBottom="xs">
326
+ fontSize=xxs marginBottom=xs
327
+ </ListItem>
328
+ <ListItem fontSize="xxxs" marginBottom="xxs">
329
+ fontSize=xxxs marginBottom=xxs
330
+ </ListItem>
331
+ </List>
332
+ </div>
333
+ );
334
+ }
335
+
336
+ export default App;
337
+ ```
338
+
339
+ **/index.tsx**
340
+
341
+ ```tsx
342
+ import React from "react";
343
+ import { createRoot } from "react-dom/client";
344
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
345
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
346
+ import { Theme } from "@czi-sds/components";
347
+ import CssBaseline from "@mui/material/CssBaseline";
348
+ import useMediaQuery from "@mui/material/useMediaQuery";
349
+
350
+ import App from "./App";
351
+
352
+ const container = document.getElementById("root");
353
+ const root = createRoot(container!);
354
+
355
+ const RootApp = () => {
356
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
357
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
358
+
359
+ return (
360
+ <StyledEngineProvider injectFirst>
361
+ <ThemeProvider theme={theme}>
362
+ <EmotionThemeProvider theme={theme}>
363
+ <CssBaseline />
364
+ <App />
365
+ </EmotionThemeProvider>
366
+ </ThemeProvider>
367
+ </StyledEngineProvider>
368
+ );
369
+ };
370
+
371
+ root.render(
372
+ <React.StrictMode>
373
+ <RootApp />
374
+ </React.StrictMode>
375
+ );
376
+ ```
377
+
378
+ **/public/index.html**
379
+
380
+ ```html
381
+ <!doctype html>
382
+ <html lang="en">
383
+ <head>
384
+ <meta charset="UTF-8" />
385
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
386
+ <title>Lists</title>
387
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
388
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
389
+ <link
390
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
391
+ rel="stylesheet"
392
+ />
393
+ <link
394
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
395
+ rel="stylesheet"
396
+ />
397
+ </head>
398
+ <body>
399
+ <div id="root"></div>
400
+ </body>
401
+ </html>
402
+ ```
403
+
404
+ **/package.json**
405
+
406
+ ```json
407
+ {
408
+ "dependencies": {
409
+ "react": "^18.0.0",
410
+ "react-dom": "^18.0.0",
411
+ "react-scripts": "^4.0.0"
412
+ },
413
+ "devDependencies": {
414
+ "@types/react": "^18.0.0",
415
+ "@types/react-dom": "^18.0.0",
416
+ "typescript": "^4.0.0"
417
+ },
418
+ "main": "/index.tsx"
419
+ }
420
+ ```
421
+
422
+ ---
423
+
424
+ #### Ordered List
425
+
426
+ This example shows an ordered `List` of items with nested items.
427
+
428
+ **/styles.css**
429
+
430
+ ```css
431
+ body {
432
+ font-size: 13px;
433
+ font-weight: 400;
434
+ letter-spacing: 0.08px;
435
+ line-height: 20px;
436
+ text-transform: none;
437
+ font-family: "Inter", sans-serif;
438
+ }
439
+
440
+ h1 {
441
+ font-size: 1.5rem;
442
+ }
443
+
444
+ .app {
445
+ padding: 20px;
446
+ }
447
+ ```
448
+
449
+ **tsconfig.json**
450
+
451
+ ```json
452
+ {
453
+ "include": ["./**/*"],
454
+ "compilerOptions": {
455
+ "strict": true,
456
+ "esModuleInterop": true,
457
+ "lib": ["dom", "es2015"],
458
+ "jsx": "react-jsx"
459
+ }
460
+ }
461
+ ```
462
+
463
+ **/App.tsx**
464
+
465
+ ```tsx
466
+ import { List, ListItem, ListSubheader } from "@czi-sds/components";
467
+ import "./styles.css";
468
+
469
+ function App() {
470
+ return (
471
+ <div className="app">
472
+ <List
473
+ ordered
474
+ subheader={
475
+ <ListSubheader disableSticky>
476
+ Font sizes and spacing for a nested ordered list
477
+ </ListSubheader>
478
+ }
479
+ >
480
+ <ListItem ordered>
481
+ <span>
482
+ Nested List 1
483
+ <List ordered>
484
+ <ListItem ordered fontSize="l" marginBottom="s">
485
+ fontSize=l marginBottom=s
486
+ </ListItem>
487
+ <ListItem ordered fontSize="m" marginBottom="s">
488
+ fontSize=m marginBottom=s
489
+ </ListItem>
490
+ <ListItem ordered fontSize="s" marginBottom="xs">
491
+ fontSize=s marginBottom=xs
492
+ </ListItem>
493
+ </List>
494
+ </span>
495
+ </ListItem>
496
+ <ListItem ordered>
497
+ <span>
498
+ Nested List 2
499
+ <List ordered>
500
+ <ListItem ordered fontSize="l">
501
+ <span>
502
+ Nested List 2
503
+ <List ordered>
504
+ <ListItem ordered fontSize="l" marginBottom="s">
505
+ fontSize=l marginBottom=s
506
+ </ListItem>
507
+ <ListItem ordered fontSize="m" marginBottom="s">
508
+ fontSize=m marginBottom=s
509
+ </ListItem>
510
+ <ListItem ordered fontSize="s" marginBottom="xs">
511
+ fontSize=s marginBottom=xs
512
+ </ListItem>
513
+ </List>
514
+ </span>
515
+ </ListItem>
516
+ <ListItem ordered fontSize="m" marginBottom="s">
517
+ fontSize=m marginBottom=s
518
+ </ListItem>
519
+ <ListItem ordered fontSize="s" marginBottom="xs">
520
+ fontSize=s marginBottom=xs
521
+ </ListItem>
522
+ </List>
523
+ </span>
524
+ </ListItem>
525
+ <ListItem ordered>
526
+ <span>
527
+ Nested List 3
528
+ <List ordered>
529
+ <ListItem ordered fontSize="l" marginBottom="s">
530
+ fontSize=l marginBottom=s
531
+ </ListItem>
532
+ <ListItem ordered fontSize="m" marginBottom="s">
533
+ fontSize=m marginBottom=s
534
+ </ListItem>
535
+ <ListItem ordered fontSize="s" marginBottom="xs">
536
+ fontSize=s marginBottom=xs
537
+ </ListItem>
538
+ </List>
539
+ </span>
540
+ </ListItem>
541
+ </List>
542
+ </div>
543
+ );
544
+ }
545
+
546
+ export default App;
547
+ ```
548
+
549
+ **/index.tsx**
550
+
551
+ ```tsx
552
+ import React from "react";
553
+ import { createRoot } from "react-dom/client";
554
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
555
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
556
+ import { Theme } from "@czi-sds/components";
557
+ import CssBaseline from "@mui/material/CssBaseline";
558
+ import useMediaQuery from "@mui/material/useMediaQuery";
559
+
560
+ import App from "./App";
561
+
562
+ const container = document.getElementById("root");
563
+ const root = createRoot(container!);
564
+
565
+ const RootApp = () => {
566
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
567
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
568
+
569
+ return (
570
+ <StyledEngineProvider injectFirst>
571
+ <ThemeProvider theme={theme}>
572
+ <EmotionThemeProvider theme={theme}>
573
+ <CssBaseline />
574
+ <App />
575
+ </EmotionThemeProvider>
576
+ </ThemeProvider>
577
+ </StyledEngineProvider>
578
+ );
579
+ };
580
+
581
+ root.render(
582
+ <React.StrictMode>
583
+ <RootApp />
584
+ </React.StrictMode>
585
+ );
586
+ ```
587
+
588
+ **/public/index.html**
589
+
590
+ ```html
591
+ <!doctype html>
592
+ <html lang="en">
593
+ <head>
594
+ <meta charset="UTF-8" />
595
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
596
+ <title>Lists</title>
597
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
598
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
599
+ <link
600
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
601
+ rel="stylesheet"
602
+ />
603
+ <link
604
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
605
+ rel="stylesheet"
606
+ />
607
+ </head>
608
+ <body>
609
+ <div id="root"></div>
610
+ </body>
611
+ </html>
612
+ ```
613
+
614
+ **/package.json**
615
+
616
+ ```json
617
+ {
618
+ "dependencies": {
619
+ "react": "^18.0.0",
620
+ "react-dom": "^18.0.0",
621
+ "react-scripts": "^4.0.0"
622
+ },
623
+ "devDependencies": {
624
+ "@types/react": "^18.0.0",
625
+ "@types/react-dom": "^18.0.0",
626
+ "typescript": "^4.0.0"
627
+ },
628
+ "main": "/index.tsx"
629
+ }
630
+ ```
631
+
632
+ ---
@@ -0,0 +1,37 @@
1
+ # Loading Indicator
2
+
3
+ Loading Indicators provide feedback to users that an action is still completing, serving as a visual cue that the page has not stalled out.
4
+
5
+ ## Overview
6
+
7
+ | | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
8
+ | --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
9
+
10
+ Used in napari hub and napari.org to indicate when on-page components are loading. The Loading Indicator features a looping animation to signal to the user that an action is happening and to wait while it completes.
11
+
12
+ Note: icon spins.
13
+
14
+ ---
15
+
16
+ ### Loading Indicator Spacing
17
+
18
+ These rules establish how much margin should exist between and around elements.
19
+
20
+
21
+
22
+ ## Code
23
+
24
+ ## Loading Indicator Component
25
+
26
+ | Below you will find an interactive Storybook iframe for the Loading Indicator. 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:** LoadingIndicator |
27
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------- |
28
+
29
+ ---
30
+
31
+ > 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.
32
+
33
+ ### LoadingIndicator
34
+
35
+ Storybook
36
+
37
+