@czi-sds/mcp 0.2.2 → 0.3.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.
- package/data/zeroheight-cache.json +5195 -0
- package/data/zeroheight-exports/Accordion.md +675 -0
- package/data/zeroheight-exports/Banner.md +576 -0
- package/data/zeroheight-exports/Borders.md +118 -0
- package/data/zeroheight-exports/Buttons.md +2260 -0
- package/data/zeroheight-exports/Callout.md +756 -0
- package/data/zeroheight-exports/Colors.md +633 -0
- package/data/zeroheight-exports/Content-Card.md +162 -0
- package/data/zeroheight-exports/Contributing-to-SDS.md +99 -0
- package/data/zeroheight-exports/Control-Inputs.md +2066 -0
- package/data/zeroheight-exports/Corners.md +112 -0
- package/data/zeroheight-exports/Cover-page.md +4 -0
- package/data/zeroheight-exports/Dialog.md +1133 -0
- package/data/zeroheight-exports/Downloads.md +121 -0
- package/data/zeroheight-exports/Drop-Shadows.md +80 -0
- package/data/zeroheight-exports/Dropdown-Input.md +1149 -0
- package/data/zeroheight-exports/Dropdown-Menu.md +3787 -0
- package/data/zeroheight-exports/Element-Status-Tracker.md +268 -0
- package/data/zeroheight-exports/Field-Inputs.md +965 -0
- package/data/zeroheight-exports/Filters.md +868 -0
- package/data/zeroheight-exports/Getting-Started.md +1296 -0
- package/data/zeroheight-exports/Hero.md +256 -0
- package/data/zeroheight-exports/Icons.md +432 -0
- package/data/zeroheight-exports/Intent.md +47 -0
- package/data/zeroheight-exports/Introduction-to-Bases.md +36 -0
- package/data/zeroheight-exports/Introduction-to-Cells.md +36 -0
- package/data/zeroheight-exports/Introduction-to-DNA.md +36 -0
- package/data/zeroheight-exports/Introduction-to-Genes.md +36 -0
- package/data/zeroheight-exports/Introduction.md +116 -0
- package/data/zeroheight-exports/Link.md +373 -0
- package/data/zeroheight-exports/Lists.md +617 -0
- package/data/zeroheight-exports/Loading-Indicator.md +38 -0
- package/data/zeroheight-exports/Navigation.md +853 -0
- package/data/zeroheight-exports/Notification.md +858 -0
- package/data/zeroheight-exports/Panel.md +862 -0
- package/data/zeroheight-exports/README.md +124 -0
- package/data/zeroheight-exports/Responsive-Design.md +275 -0
- package/data/zeroheight-exports/Search-Input.md +54 -0
- package/data/zeroheight-exports/Search.md +609 -0
- package/data/zeroheight-exports/Segmented-Control.md +561 -0
- package/data/zeroheight-exports/Spacing.md +298 -0
- package/data/zeroheight-exports/Table.md +4832 -0
- package/data/zeroheight-exports/Tabs.md +773 -0
- package/data/zeroheight-exports/Tags.md +1025 -0
- package/data/zeroheight-exports/Text-Link.md +185 -0
- package/data/zeroheight-exports/Theming.md +313 -0
- package/data/zeroheight-exports/Tooltips.md +1564 -0
- package/data/zeroheight-exports/Typography.md +769 -0
- package/dist/stdio.js +188 -0
- package/package.json +4 -3
|
@@ -0,0 +1,617 @@
|
|
|
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
|
+
"./**/*"
|
|
295
|
+
],
|
|
296
|
+
"compilerOptions": {
|
|
297
|
+
"strict": true,
|
|
298
|
+
"esModuleInterop": true,
|
|
299
|
+
"lib": [ "dom", "es2015" ],
|
|
300
|
+
"jsx": "react-jsx"
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**/App.tsx**
|
|
306
|
+
|
|
307
|
+
```tsx
|
|
308
|
+
import { List, ListItem } from "@czi-sds/components";
|
|
309
|
+
import "./styles.css";
|
|
310
|
+
|
|
311
|
+
function App() {
|
|
312
|
+
return (
|
|
313
|
+
<div className="app">
|
|
314
|
+
<List>
|
|
315
|
+
<ListItem fontSize="l" marginBottom="s">
|
|
316
|
+
fontSize=l marginBottom=s
|
|
317
|
+
</ListItem>
|
|
318
|
+
<ListItem fontSize="m" marginBottom="s">
|
|
319
|
+
fontSize=m marginBottom=s
|
|
320
|
+
</ListItem>
|
|
321
|
+
<ListItem fontSize="s" marginBottom="xs">
|
|
322
|
+
fontSize=s marginBottom=xs
|
|
323
|
+
</ListItem>
|
|
324
|
+
<ListItem fontSize="xs" marginBottom="xs">
|
|
325
|
+
fontSize=xs marginBottom=xs
|
|
326
|
+
</ListItem>
|
|
327
|
+
<ListItem fontSize="xxs" marginBottom="xs">
|
|
328
|
+
fontSize=xxs marginBottom=xs
|
|
329
|
+
</ListItem>
|
|
330
|
+
<ListItem fontSize="xxxs" marginBottom="xxs">
|
|
331
|
+
fontSize=xxxs marginBottom=xxs
|
|
332
|
+
</ListItem>
|
|
333
|
+
</List>
|
|
334
|
+
</div>
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export default App;
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**/index.tsx**
|
|
342
|
+
|
|
343
|
+
```tsx
|
|
344
|
+
import React from "react";
|
|
345
|
+
import { createRoot } from "react-dom/client";
|
|
346
|
+
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
347
|
+
import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
|
|
348
|
+
import { Theme } from "@czi-sds/components";
|
|
349
|
+
import CssBaseline from "@mui/material/CssBaseline";
|
|
350
|
+
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
351
|
+
|
|
352
|
+
import App from "./App";
|
|
353
|
+
|
|
354
|
+
const container = document.getElementById("root");
|
|
355
|
+
const root = createRoot(container!);
|
|
356
|
+
|
|
357
|
+
const RootApp = () => {
|
|
358
|
+
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
|
359
|
+
const theme = prefersDarkMode ? Theme("dark") : Theme("light");
|
|
360
|
+
|
|
361
|
+
return (
|
|
362
|
+
<StyledEngineProvider injectFirst>
|
|
363
|
+
<ThemeProvider theme={theme}>
|
|
364
|
+
<EmotionThemeProvider theme={theme}>
|
|
365
|
+
<CssBaseline />
|
|
366
|
+
<App />
|
|
367
|
+
</EmotionThemeProvider>
|
|
368
|
+
</ThemeProvider>
|
|
369
|
+
</StyledEngineProvider>
|
|
370
|
+
);
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
root.render(
|
|
374
|
+
<React.StrictMode>
|
|
375
|
+
<RootApp />
|
|
376
|
+
</React.StrictMode>
|
|
377
|
+
);
|
|
378
|
+
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
**/public/index.html**
|
|
382
|
+
|
|
383
|
+
```html
|
|
384
|
+
<!DOCTYPE html>
|
|
385
|
+
<html lang="en">
|
|
386
|
+
<head>
|
|
387
|
+
<meta charset="UTF-8" />
|
|
388
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
389
|
+
<title>Lists</title>
|
|
390
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
391
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
392
|
+
<link
|
|
393
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
|
|
394
|
+
rel="stylesheet"
|
|
395
|
+
/>
|
|
396
|
+
<link
|
|
397
|
+
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
|
|
398
|
+
rel="stylesheet"
|
|
399
|
+
/>
|
|
400
|
+
</head>
|
|
401
|
+
<body>
|
|
402
|
+
<div id="root"></div>
|
|
403
|
+
</body>
|
|
404
|
+
</html>
|
|
405
|
+
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
**/package.json**
|
|
409
|
+
|
|
410
|
+
```json
|
|
411
|
+
{"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
#### Ordered List
|
|
417
|
+
|
|
418
|
+
This example shows an ordered `List` of items with nested items.
|
|
419
|
+
|
|
420
|
+
**/styles.css**
|
|
421
|
+
|
|
422
|
+
```css
|
|
423
|
+
body {
|
|
424
|
+
font-size: 13px;
|
|
425
|
+
font-weight: 400;
|
|
426
|
+
letter-spacing: 0.08px;
|
|
427
|
+
line-height: 20px;
|
|
428
|
+
text-transform: none;
|
|
429
|
+
font-family: "Inter", sans-serif;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
h1 {
|
|
433
|
+
font-size: 1.5rem;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.app {
|
|
437
|
+
padding: 20px;
|
|
438
|
+
}
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**tsconfig.json**
|
|
442
|
+
|
|
443
|
+
```json
|
|
444
|
+
{
|
|
445
|
+
"include": [
|
|
446
|
+
"./**/*"
|
|
447
|
+
],
|
|
448
|
+
"compilerOptions": {
|
|
449
|
+
"strict": true,
|
|
450
|
+
"esModuleInterop": true,
|
|
451
|
+
"lib": [ "dom", "es2015" ],
|
|
452
|
+
"jsx": "react-jsx"
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
**/App.tsx**
|
|
458
|
+
|
|
459
|
+
```tsx
|
|
460
|
+
import { List, ListItem, ListSubheader } from "@czi-sds/components";
|
|
461
|
+
import "./styles.css";
|
|
462
|
+
|
|
463
|
+
function App() {
|
|
464
|
+
return (
|
|
465
|
+
<div className="app">
|
|
466
|
+
<List
|
|
467
|
+
ordered
|
|
468
|
+
subheader={
|
|
469
|
+
<ListSubheader disableSticky>
|
|
470
|
+
Font sizes and spacing for a nested ordered list
|
|
471
|
+
</ListSubheader>
|
|
472
|
+
}
|
|
473
|
+
>
|
|
474
|
+
<ListItem ordered>
|
|
475
|
+
<span>
|
|
476
|
+
Nested List 1
|
|
477
|
+
<List ordered>
|
|
478
|
+
<ListItem ordered fontSize="l" marginBottom="s">
|
|
479
|
+
fontSize=l marginBottom=s
|
|
480
|
+
</ListItem>
|
|
481
|
+
<ListItem ordered fontSize="m" marginBottom="s">
|
|
482
|
+
fontSize=m marginBottom=s
|
|
483
|
+
</ListItem>
|
|
484
|
+
<ListItem ordered fontSize="s" marginBottom="xs">
|
|
485
|
+
fontSize=s marginBottom=xs
|
|
486
|
+
</ListItem>
|
|
487
|
+
</List>
|
|
488
|
+
</span>
|
|
489
|
+
</ListItem>
|
|
490
|
+
<ListItem ordered>
|
|
491
|
+
<span>
|
|
492
|
+
Nested List 2
|
|
493
|
+
<List ordered>
|
|
494
|
+
<ListItem ordered fontSize="l">
|
|
495
|
+
<span>
|
|
496
|
+
Nested List 2
|
|
497
|
+
<List ordered>
|
|
498
|
+
<ListItem ordered fontSize="l" marginBottom="s">
|
|
499
|
+
fontSize=l marginBottom=s
|
|
500
|
+
</ListItem>
|
|
501
|
+
<ListItem ordered fontSize="m" marginBottom="s">
|
|
502
|
+
fontSize=m marginBottom=s
|
|
503
|
+
</ListItem>
|
|
504
|
+
<ListItem ordered fontSize="s" marginBottom="xs">
|
|
505
|
+
fontSize=s marginBottom=xs
|
|
506
|
+
</ListItem>
|
|
507
|
+
</List>
|
|
508
|
+
</span>
|
|
509
|
+
</ListItem>
|
|
510
|
+
<ListItem ordered fontSize="m" marginBottom="s">
|
|
511
|
+
fontSize=m marginBottom=s
|
|
512
|
+
</ListItem>
|
|
513
|
+
<ListItem ordered fontSize="s" marginBottom="xs">
|
|
514
|
+
fontSize=s marginBottom=xs
|
|
515
|
+
</ListItem>
|
|
516
|
+
</List>
|
|
517
|
+
</span>
|
|
518
|
+
</ListItem>
|
|
519
|
+
<ListItem ordered>
|
|
520
|
+
<span>
|
|
521
|
+
Nested List 3
|
|
522
|
+
<List ordered>
|
|
523
|
+
<ListItem ordered fontSize="l" marginBottom="s">
|
|
524
|
+
fontSize=l marginBottom=s
|
|
525
|
+
</ListItem>
|
|
526
|
+
<ListItem ordered fontSize="m" marginBottom="s">
|
|
527
|
+
fontSize=m marginBottom=s
|
|
528
|
+
</ListItem>
|
|
529
|
+
<ListItem ordered fontSize="s" marginBottom="xs">
|
|
530
|
+
fontSize=s marginBottom=xs
|
|
531
|
+
</ListItem>
|
|
532
|
+
</List>
|
|
533
|
+
</span>
|
|
534
|
+
</ListItem>
|
|
535
|
+
</List>
|
|
536
|
+
</div>
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export default App;
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
**/index.tsx**
|
|
544
|
+
|
|
545
|
+
```tsx
|
|
546
|
+
import React from "react";
|
|
547
|
+
import { createRoot } from "react-dom/client";
|
|
548
|
+
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
549
|
+
import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
|
|
550
|
+
import { Theme } from "@czi-sds/components";
|
|
551
|
+
import CssBaseline from "@mui/material/CssBaseline";
|
|
552
|
+
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
553
|
+
|
|
554
|
+
import App from "./App";
|
|
555
|
+
|
|
556
|
+
const container = document.getElementById("root");
|
|
557
|
+
const root = createRoot(container!);
|
|
558
|
+
|
|
559
|
+
const RootApp = () => {
|
|
560
|
+
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
|
561
|
+
const theme = prefersDarkMode ? Theme("dark") : Theme("light");
|
|
562
|
+
|
|
563
|
+
return (
|
|
564
|
+
<StyledEngineProvider injectFirst>
|
|
565
|
+
<ThemeProvider theme={theme}>
|
|
566
|
+
<EmotionThemeProvider theme={theme}>
|
|
567
|
+
<CssBaseline />
|
|
568
|
+
<App />
|
|
569
|
+
</EmotionThemeProvider>
|
|
570
|
+
</ThemeProvider>
|
|
571
|
+
</StyledEngineProvider>
|
|
572
|
+
);
|
|
573
|
+
};
|
|
574
|
+
|
|
575
|
+
root.render(
|
|
576
|
+
<React.StrictMode>
|
|
577
|
+
<RootApp />
|
|
578
|
+
</React.StrictMode>
|
|
579
|
+
);
|
|
580
|
+
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
**/public/index.html**
|
|
584
|
+
|
|
585
|
+
```html
|
|
586
|
+
<!DOCTYPE html>
|
|
587
|
+
<html lang="en">
|
|
588
|
+
<head>
|
|
589
|
+
<meta charset="UTF-8" />
|
|
590
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
591
|
+
<title>Lists</title>
|
|
592
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
593
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
594
|
+
<link
|
|
595
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
|
|
596
|
+
rel="stylesheet"
|
|
597
|
+
/>
|
|
598
|
+
<link
|
|
599
|
+
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
|
|
600
|
+
rel="stylesheet"
|
|
601
|
+
/>
|
|
602
|
+
</head>
|
|
603
|
+
<body>
|
|
604
|
+
<div id="root"></div>
|
|
605
|
+
</body>
|
|
606
|
+
</html>
|
|
607
|
+
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
**/package.json**
|
|
611
|
+
|
|
612
|
+
```json
|
|
613
|
+
{"dependencies":{"react":"^18.0.0","react-dom":"^18.0.0","react-scripts":"^4.0.0"},"devDependencies":{"@types/react":"^18.0.0","@types/react-dom":"^18.0.0","typescript":"^4.0.0"},"main":"/index.tsx"}
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
---
|
|
617
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
|
|
38
|
+
|