@czi-sds/mcp 0.3.0 → 0.5.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/component-props/Accordion.json +14 -15
- package/data/component-props/Alert.json +2 -44
- package/data/component-props/Autocomplete.json +14 -32
- package/data/component-props/Banner.json +11 -12
- package/data/component-props/Button.json +17 -82
- package/data/component-props/ButtonDropdown.json +26 -0
- package/data/component-props/ButtonIcon.json +4 -60
- package/data/component-props/ButtonToggle.json +2 -66
- package/data/component-props/Callout.json +11 -65
- package/data/component-props/CellBasic.json +28 -56
- package/data/component-props/CellComponent.json +4 -32
- package/data/component-props/CellHeader.json +13 -49
- package/data/component-props/ComplexFilter.json +24 -4
- package/data/component-props/ContentCard.json +66 -2
- package/data/component-props/Dialog.json +26 -0
- package/data/component-props/Dropdown.json +29 -67
- package/data/component-props/DropdownMenu.json +16 -56
- package/data/component-props/HeatmapChart.json +6 -87
- package/data/component-props/Icon.json +3 -8
- package/data/component-props/InputCheckbox.json +5 -53
- package/data/component-props/InputDropdown.json +11 -33
- package/data/component-props/InputRadio.json +5 -53
- package/data/component-props/InputSearch.json +6 -70
- package/data/component-props/InputSlider.json +21 -35
- package/data/component-props/InputText.json +7 -63
- package/data/component-props/InputToggle.json +5 -54
- package/data/component-props/Link.json +18 -0
- package/data/component-props/LoadingIndicator.json +1 -2
- package/data/component-props/MenuItem.json +11 -41
- package/data/component-props/MenuSelect.json +4 -67
- package/data/component-props/NavigationFooter.json +0 -8
- package/data/component-props/NavigationHeader.json +14 -65
- package/data/component-props/NavigationJumpTo.json +0 -40
- package/data/component-props/Notification.json +14 -58
- package/data/component-props/Pagination.json +8 -33
- package/data/component-props/Panel.json +4 -54
- package/data/component-props/SegmentedControl.json +0 -55
- package/data/component-props/TableRow.json +10 -38
- package/data/component-props/Tabs.json +18 -0
- package/data/component-props/Tag.json +10 -56
- package/data/component-props/TagFilter.json +0 -47
- package/data/component-props/Tooltip.json +12 -61
- package/data/component-props/TooltipCondensed.json +18 -0
- package/data/component-props/TooltipTable.json +0 -4
- package/data/resources/figma-rules.md +101 -0
- package/data/resources/sds-component-rules.md +189 -0
- package/data/resources/zeroheight-rules.md +180 -0
- package/data/zeroheight-cache.json +1 -1
- package/data/zeroheight-exports/Accordion.md +167 -125
- package/data/zeroheight-exports/Banner.md +71 -48
- package/data/zeroheight-exports/Borders.md +72 -73
- package/data/zeroheight-exports/Buttons.md +375 -330
- package/data/zeroheight-exports/Callout.md +138 -116
- package/data/zeroheight-exports/Colors.md +254 -255
- package/data/zeroheight-exports/Content-Card.md +36 -37
- package/data/zeroheight-exports/Contributing-to-SDS.md +34 -35
- package/data/zeroheight-exports/Control-Inputs.md +289 -234
- package/data/zeroheight-exports/Corners.md +63 -64
- package/data/zeroheight-exports/Cover-page.md +0 -1
- package/data/zeroheight-exports/Dialog.md +237 -179
- package/data/zeroheight-exports/Downloads.md +10 -11
- package/data/zeroheight-exports/Drop-Shadows.md +40 -41
- package/data/zeroheight-exports/Dropdown-Input.md +158 -127
- package/data/zeroheight-exports/Dropdown-Menu.md +814 -718
- package/data/zeroheight-exports/Element-Status-Tracker.md +191 -192
- package/data/zeroheight-exports/Field-Inputs.md +149 -130
- package/data/zeroheight-exports/Filters.md +114 -94
- package/data/zeroheight-exports/Getting-Started.md +112 -249
- package/data/zeroheight-exports/Hero.md +43 -37
- package/data/zeroheight-exports/Icons.md +205 -206
- package/data/zeroheight-exports/Intent.md +6 -7
- package/data/zeroheight-exports/Introduction-to-Bases.md +8 -9
- package/data/zeroheight-exports/Introduction-to-Cells.md +11 -12
- package/data/zeroheight-exports/Introduction-to-DNA.md +8 -9
- package/data/zeroheight-exports/Introduction-to-Genes.md +8 -9
- package/data/zeroheight-exports/Introduction.md +52 -53
- package/data/zeroheight-exports/Link.md +50 -37
- package/data/zeroheight-exports/Lists.md +78 -63
- package/data/zeroheight-exports/Loading-Indicator.md +7 -8
- package/data/zeroheight-exports/Navigation.md +163 -142
- package/data/zeroheight-exports/Notification.md +132 -102
- package/data/zeroheight-exports/Panel.md +231 -115
- package/data/zeroheight-exports/README.md +1 -1
- package/data/zeroheight-exports/Responsive-Design.md +35 -32
- package/data/zeroheight-exports/Search-Input.md +9 -10
- package/data/zeroheight-exports/Search.md +87 -104
- package/data/zeroheight-exports/Segmented-Control.md +68 -45
- package/data/zeroheight-exports/Spacing.md +210 -211
- package/data/zeroheight-exports/Table.md +414 -302
- package/data/zeroheight-exports/Tabs.md +126 -98
- package/data/zeroheight-exports/Tags.md +148 -118
- package/data/zeroheight-exports/Text-Link.md +32 -33
- package/data/zeroheight-exports/Theming.md +48 -29
- package/data/zeroheight-exports/Tooltips.md +253 -237
- package/data/zeroheight-exports/Typography.md +463 -464
- package/dist/stdio.js +136 -135
- package/package.json +3 -4
- package/data/component-props/Chip.json +0 -73
- package/data/component-props/List.json +0 -43
- package/data/component-props/Menu.json +0 -48
- package/data/component-props/Table.json +0 -26
- package/data/component-props-storybook/Accordion-storybook.json +0 -45
- package/data/component-props-storybook/Alert-storybook.json +0 -30
- package/data/component-props-storybook/Autocomplete-storybook.json +0 -67
- package/data/component-props-storybook/Banner-storybook.json +0 -78
- package/data/component-props-storybook/Button-storybook.json +0 -115
- package/data/component-props-storybook/ButtonDropdown-storybook.json +0 -73
- package/data/component-props-storybook/ButtonIcon-storybook.json +0 -60
- package/data/component-props-storybook/ButtonToggle-storybook.json +0 -68
- package/data/component-props-storybook/Callout-storybook.json +0 -90
- package/data/component-props-storybook/CellBasic-storybook.json +0 -138
- package/data/component-props-storybook/CellComponent-storybook.json +0 -48
- package/data/component-props-storybook/CellHeader-storybook.json +0 -71
- package/data/component-props-storybook/Chip-storybook.json +0 -26
- package/data/component-props-storybook/ComplexFilter-storybook.json +0 -60
- package/data/component-props-storybook/ContentCard-storybook.json +0 -175
- package/data/component-props-storybook/Dialog-storybook.json +0 -56
- package/data/component-props-storybook/Dropdown-storybook.json +0 -93
- package/data/component-props-storybook/DropdownMenu-storybook.json +0 -73
- package/data/component-props-storybook/HeatmapChart-storybook.json +0 -55
- package/data/component-props-storybook/Icon-storybook.json +0 -75
- package/data/component-props-storybook/InputCheckbox-storybook.json +0 -57
- package/data/component-props-storybook/InputDropdown-storybook.json +0 -80
- package/data/component-props-storybook/InputRadio-storybook.json +0 -56
- package/data/component-props-storybook/InputSearch-storybook.json +0 -55
- package/data/component-props-storybook/InputSlider-storybook.json +0 -55
- package/data/component-props-storybook/InputText-storybook.json +0 -59
- package/data/component-props-storybook/InputToggle-storybook.json +0 -42
- package/data/component-props-storybook/Link-storybook.json +0 -50
- package/data/component-props-storybook/List-storybook.json +0 -26
- package/data/component-props-storybook/LoadingIndicator-storybook.json +0 -34
- package/data/component-props-storybook/Menu-storybook.json +0 -26
- package/data/component-props-storybook/MenuItem-storybook.json +0 -74
- package/data/component-props-storybook/MenuSelect-storybook.json +0 -38
- package/data/component-props-storybook/NavigationFooter-storybook.json +0 -67
- package/data/component-props-storybook/NavigationHeader-storybook.json +0 -115
- package/data/component-props-storybook/NavigationJumpTo-storybook.json +0 -41
- package/data/component-props-storybook/Notification-storybook.json +0 -89
- package/data/component-props-storybook/Pagination-storybook.json +0 -50
- package/data/component-props-storybook/Panel-storybook.json +0 -52
- package/data/component-props-storybook/SegmentedControl-storybook.json +0 -30
- package/data/component-props-storybook/Table-storybook.json +0 -26
- package/data/component-props-storybook/TableHeader-storybook.json +0 -26
- package/data/component-props-storybook/TableRow-storybook.json +0 -62
- package/data/component-props-storybook/Tabs-storybook.json +0 -45
- package/data/component-props-storybook/Tag-storybook.json +0 -78
- package/data/component-props-storybook/TagFilter-storybook.json +0 -30
- package/data/component-props-storybook/Tooltip-storybook.json +0 -85
- package/data/component-props-storybook/TooltipCondensed-storybook.json +0 -38
- package/data/component-props-storybook/TooltipTable-storybook.json +0 -47
|
@@ -6,8 +6,8 @@ Let the following guides serve as starting points for working with the SDS. Unde
|
|
|
6
6
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products.
|
|
10
|
-
|
|
|
9
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products. Within Figma, the elements of the SDS are accessible to product designers via a collection of published libraries. These libraries have been built to allow for maximum flexibility depending on each product team's component needs. The SDS Documentation serves as an in-depth guide for both designers and engineers for using elements of the design system within projects. In instances where the available SDS components don't fulfill a product team's needs, there is a straightforward process for requesting additional elements for the design system. | | **Jump to section:** Figma SDS Documentation Contributing to the SDS |
|
|
10
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------------------------------- |
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -29,8 +29,8 @@ When working on a project, ensure the necessary SDS libraries for your product a
|
|
|
29
29
|
|
|
30
30
|
For reference, below are the libraries that should be enabled for napari hub + .org projects:
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
- SDS Icons
|
|
33
|
+
- napari hub + .org Design System
|
|
34
34
|
|
|
35
35
|
For more details around using and working with libraries in Figma, see this helpful guide from the Figma team.
|
|
36
36
|
|
|
@@ -42,10 +42,10 @@ The SDS documentation should be the go-to place to learn about using elements of
|
|
|
42
42
|
|
|
43
43
|
Below are a few tips around navigating the documentation:
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
- Visit the Element Status Tracker page for the most up-to-date view of which elements are available for use within the Figma libraries and the SDS codebase; a more detailed status spreadsheet is linked at the bottom of this page for an in-depth look at status by component variant as well as links to implementation tickets for a granular view of when to expect components to be available for use
|
|
46
|
+
- Most components have a Live Preview section on their Overview tabs; this displays an interactive instance of the element, providing the ability to engage with it and get a better feel for how it will work when included as part of a product build
|
|
47
|
+
- Each variant of every component is viewable on their Overview tabs; aside from displaying all of the available props for each variant, these views are able to be clicked on and inspected to get further design details such as typography and color styles, border radiuses, spacing, etc.
|
|
48
|
+
- On every component page there is a Code tab containing individual iframes imported from Storybook of each variant available to that component; each iframe has all of the same functionality found within Storybook, allowing engineers to explore props, adjust colors and text, see any event handlers, etc. all without leaving the documentation site
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
@@ -66,8 +66,8 @@ See a more detailed flow of the component request process here.
|
|
|
66
66
|
|
|
67
67
|
## Overview
|
|
68
68
|
|
|
69
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. |
|
|
70
|
-
|
|
|
69
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. | | **Jump to section:** Getting Started Usage Contributing to the SDS |
|
|
70
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
@@ -89,28 +89,15 @@ npm i czifui
|
|
|
89
89
|
yarn add czifui
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
|
|
93
93
|
|
|
94
94
|
SDS currently uses Material UI v5
|
|
95
95
|
|
|
96
96
|
czifui installs without direct dependencies to prevent version errors. Please ensure the following peer dependencies are also installed:
|
|
97
97
|
|
|
98
98
|
```html
|
|
99
|
-
"@emotion/css"
|
|
100
|
-
|
|
101
|
-
"@emotion/react"
|
|
102
|
-
|
|
103
|
-
"@emotion/styled"
|
|
104
|
-
|
|
105
|
-
"@material-ui/core"
|
|
106
|
-
|
|
107
|
-
"@material-ui/icons"
|
|
108
|
-
|
|
109
|
-
"@material-ui/lab"
|
|
110
|
-
|
|
111
|
-
"react"
|
|
112
|
-
|
|
113
|
-
"react-dom"
|
|
99
|
+
"@emotion/css" "@emotion/react" "@emotion/styled" "@material-ui/core"
|
|
100
|
+
"@material-ui/icons" "@material-ui/lab" "react" "react-dom"
|
|
114
101
|
```
|
|
115
102
|
|
|
116
103
|
To install the dependencies:
|
|
@@ -141,9 +128,7 @@ import React from "react";
|
|
|
141
128
|
import { Button } from "czifui";
|
|
142
129
|
|
|
143
130
|
<Button onClick={actions.onClick} sdsStyle="rounded" sdsType="primary">
|
|
144
|
-
|
|
145
|
-
{text}
|
|
146
|
-
|
|
131
|
+
{text}
|
|
147
132
|
</Button>;
|
|
148
133
|
```
|
|
149
134
|
|
|
@@ -186,16 +171,12 @@ import styled from "@emotion/styled";
|
|
|
186
171
|
|
|
187
172
|
import { getColors, getCorners } from "czifui";
|
|
188
173
|
|
|
189
|
-
|
|
190
|
-
|
|
191
174
|
export const Tag = styled.div`
|
|
175
|
+
// This is a callback function that returns more CSS rules, but the only way
|
|
192
176
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// to access the custom theme object
|
|
196
|
-
|
|
197
|
-
${(props) => {
|
|
177
|
+
// to access the custom theme object
|
|
198
178
|
|
|
179
|
+
${(props) => {
|
|
199
180
|
// getColors() is a selector that picks out colors from the theme object
|
|
200
181
|
|
|
201
182
|
const colors = getColors(props);
|
|
@@ -204,8 +185,6 @@ export const Tag = styled.div`
|
|
|
204
185
|
|
|
205
186
|
const spacings = getSpaces(props);
|
|
206
187
|
|
|
207
|
-
|
|
208
|
-
|
|
209
188
|
return `
|
|
210
189
|
|
|
211
190
|
background-color: ${colors?.gray[500]};
|
|
@@ -215,9 +194,7 @@ export const Tag = styled.div`
|
|
|
215
194
|
margin-bottom: ${spacings?.xxl}px;
|
|
216
195
|
|
|
217
196
|
`;
|
|
218
|
-
|
|
219
|
-
}}
|
|
220
|
-
|
|
197
|
+
}}
|
|
221
198
|
`;
|
|
222
199
|
```
|
|
223
200
|
|
|
@@ -263,11 +240,8 @@ To use the default theme in your React application, complete the following:
|
|
|
263
240
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
264
241
|
|
|
265
242
|
<link
|
|
266
|
-
|
|
267
243
|
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400;1,600;1,700&display=swap"
|
|
268
|
-
|
|
269
|
-
rel="stylesheet"
|
|
270
|
-
|
|
244
|
+
rel="stylesheet"
|
|
271
245
|
/>
|
|
272
246
|
```
|
|
273
247
|
|
|
@@ -280,20 +254,12 @@ import { StylesProvider, ThemeProvider } from "@material-ui/core/styles";
|
|
|
280
254
|
|
|
281
255
|
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
282
256
|
|
|
283
|
-
|
|
284
|
-
|
|
285
257
|
<StylesProvider injectFirst>
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
<YourApp />
|
|
292
|
-
|
|
293
|
-
</ThemeProvider>
|
|
294
|
-
|
|
295
|
-
</EmotionThemeProvider>
|
|
296
|
-
|
|
258
|
+
<EmotionThemeProvider theme={defaultTheme}>
|
|
259
|
+
<ThemeProvider theme={defaultTheme}>
|
|
260
|
+
<YourApp />
|
|
261
|
+
</ThemeProvider>
|
|
262
|
+
</EmotionThemeProvider>
|
|
297
263
|
</StylesProvider>;
|
|
298
264
|
```
|
|
299
265
|
|
|
@@ -324,8 +290,8 @@ Let the following guides serve as starting points for working with the SDS. Unde
|
|
|
324
290
|
|
|
325
291
|
## Overview
|
|
326
292
|
|
|
327
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products.
|
|
328
|
-
|
|
|
293
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products. Within Figma, the elements of the SDS are accessible to product designers via a collection of published libraries. These libraries have been built to allow for maximum flexibility depending on each product team's component needs. The SDS Documentation serves as an in-depth guide for both designers and engineers for using elements of the design system within projects. In instances where the available SDS components don't fulfill a product team's needs, there is a straightforward process for requesting additional elements for the design system. | | **Jump to section:** Figma SDS Documentation Contributing to the SDS |
|
|
294
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------------------------------- |
|
|
329
295
|
|
|
330
296
|
---
|
|
331
297
|
|
|
@@ -347,10 +313,10 @@ When working on a project, ensure the necessary SDS libraries for your product a
|
|
|
347
313
|
|
|
348
314
|
For reference, below are the libraries that should be enabled for CZ GEN EPI projects:
|
|
349
315
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
316
|
+
- SDS Bases
|
|
317
|
+
- SDS Typography
|
|
318
|
+
- SDS Icons
|
|
319
|
+
- CZ GEN EPI Design System
|
|
354
320
|
|
|
355
321
|
For more details around using and working with libraries in Figma, see this helpful guide from the Figma team.
|
|
356
322
|
|
|
@@ -362,10 +328,10 @@ The SDS documentation should be the go-to place to learn about using elements of
|
|
|
362
328
|
|
|
363
329
|
Below are a few tips around navigating the documentation:
|
|
364
330
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
331
|
+
- Visit the Element Status Tracker page for the most up-to-date view of which elements are available for use within the Figma libraries and the SDS codebase; a more detailed status spreadsheet is linked at the bottom of this page for an in-depth look at status by component variant as well as links to implementation tickets for a granular view of when to expect components to be available for use
|
|
332
|
+
- Most components have a Live Preview section on their Overview tabs; this displays an interactive instance of the element, providing the ability to engage with it and get a better feel for how it will work when included as part of a product build
|
|
333
|
+
- Each variant of every component is viewable on their Overview tabs; aside from displaying all of the available props for each variant, these views are able to be clicked on and inspected to get further design details such as typography and color styles, border radiuses, spacing, etc.
|
|
334
|
+
- On every component page there is a Code tab containing individual iframes imported from Storybook of each variant available to that component; each iframe has all of the same functionality found within Storybook, allowing engineers to explore props, adjust colors and text, see any event handlers, etc. all without leaving the documentation site
|
|
369
335
|
|
|
370
336
|
---
|
|
371
337
|
|
|
@@ -386,8 +352,8 @@ See a more detailed flow of the component request process here.
|
|
|
386
352
|
|
|
387
353
|
## Overview
|
|
388
354
|
|
|
389
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. |
|
|
390
|
-
|
|
|
355
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. | | **Jump to section:** Getting Started Usage Contributing to the SDS |
|
|
356
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
|
|
391
357
|
|
|
392
358
|
---
|
|
393
359
|
|
|
@@ -409,29 +375,16 @@ npm i czifui
|
|
|
409
375
|
yarn add czifui
|
|
410
376
|
```
|
|
411
377
|
|
|
412
|
-
|
|
378
|
+
SDS currently uses Material UI v5
|
|
413
379
|
|
|
414
380
|
czifui installs without direct dependencies to prevent version errors. Please ensure the following peer dependencies are also installed:
|
|
415
381
|
|
|
416
382
|
```html
|
|
417
|
-
"@emotion/css"
|
|
418
|
-
|
|
419
|
-
"@emotion/react"
|
|
420
|
-
|
|
421
|
-
"@emotion/styled"
|
|
422
|
-
|
|
423
|
-
"@material-ui/core"
|
|
424
|
-
|
|
425
|
-
"@material-ui/icons"
|
|
426
|
-
|
|
427
|
-
"@material-ui/lab"
|
|
428
|
-
|
|
429
|
-
"react"
|
|
430
|
-
|
|
431
|
-
"react-dom"
|
|
383
|
+
"@emotion/css" "@emotion/react" "@emotion/styled" "@material-ui/core"
|
|
384
|
+
"@material-ui/icons" "@material-ui/lab" "react" "react-dom"
|
|
432
385
|
```
|
|
433
386
|
|
|
434
|
-
|
|
387
|
+
To install the dependencies:
|
|
435
388
|
|
|
436
389
|
```sh
|
|
437
390
|
// with npm
|
|
@@ -459,9 +412,7 @@ import React from "react";
|
|
|
459
412
|
import { Button } from "czifui";
|
|
460
413
|
|
|
461
414
|
<Button onClick={actions.onClick} sdsStyle="rounded" sdsType="primary">
|
|
462
|
-
|
|
463
|
-
{text}
|
|
464
|
-
|
|
415
|
+
{text}
|
|
465
416
|
</Button>;
|
|
466
417
|
```
|
|
467
418
|
|
|
@@ -504,16 +455,12 @@ import styled from "@emotion/styled";
|
|
|
504
455
|
|
|
505
456
|
import { getColors, getCorners } from "czifui";
|
|
506
457
|
|
|
507
|
-
|
|
508
|
-
|
|
509
458
|
export const Tag = styled.div`
|
|
459
|
+
// This is a callback function that returns more CSS rules, but the only way
|
|
510
460
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
// to access the custom theme object
|
|
514
|
-
|
|
515
|
-
${(props) => {
|
|
461
|
+
// to access the custom theme object
|
|
516
462
|
|
|
463
|
+
${(props) => {
|
|
517
464
|
// getColors() is a selector that picks out colors from the theme object
|
|
518
465
|
|
|
519
466
|
const colors = getColors(props);
|
|
@@ -522,8 +469,6 @@ export const Tag = styled.div`
|
|
|
522
469
|
|
|
523
470
|
const spacings = getSpaces(props);
|
|
524
471
|
|
|
525
|
-
|
|
526
|
-
|
|
527
472
|
return `
|
|
528
473
|
|
|
529
474
|
background-color: ${colors?.gray[500]};
|
|
@@ -533,13 +478,11 @@ export const Tag = styled.div`
|
|
|
533
478
|
margin-bottom: ${spacings?.xxl}px;
|
|
534
479
|
|
|
535
480
|
`;
|
|
536
|
-
|
|
537
|
-
}}
|
|
538
|
-
|
|
481
|
+
}}
|
|
539
482
|
`;
|
|
540
483
|
```
|
|
541
484
|
|
|
542
|
-
|
|
485
|
+
|
|
543
486
|
|
|
544
487
|
4. **CSS & SCSS Variables** - Variables for the `defaultTheme` to use if your app doesn't support `@emotion/styled`
|
|
545
488
|
|
|
@@ -583,11 +526,8 @@ To use the default theme in your React application, complete the following:
|
|
|
583
526
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
584
527
|
|
|
585
528
|
<link
|
|
586
|
-
|
|
587
529
|
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400;1,600;1,700&display=swap"
|
|
588
|
-
|
|
589
|
-
rel="stylesheet"
|
|
590
|
-
|
|
530
|
+
rel="stylesheet"
|
|
591
531
|
/>
|
|
592
532
|
```
|
|
593
533
|
|
|
@@ -600,24 +540,16 @@ import { StylesProvider, ThemeProvider } from "@material-ui/core/styles";
|
|
|
600
540
|
|
|
601
541
|
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
602
542
|
|
|
603
|
-
|
|
604
|
-
|
|
605
543
|
<StylesProvider injectFirst>
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
<YourApp />
|
|
612
|
-
|
|
613
|
-
</ThemeProvider>
|
|
614
|
-
|
|
615
|
-
</EmotionThemeProvider>
|
|
616
|
-
|
|
544
|
+
<EmotionThemeProvider theme={defaultTheme}>
|
|
545
|
+
<ThemeProvider theme={defaultTheme}>
|
|
546
|
+
<YourApp />
|
|
547
|
+
</ThemeProvider>
|
|
548
|
+
</EmotionThemeProvider>
|
|
617
549
|
</StylesProvider>;
|
|
618
550
|
```
|
|
619
551
|
|
|
620
|
-
|
|
552
|
+
|
|
621
553
|
|
|
622
554
|
3. If you need to override the default SDS theme, please follow the instructions here.
|
|
623
555
|
|
|
@@ -646,8 +578,8 @@ Let the following guides serve as starting points for working with the SDS. Unde
|
|
|
646
578
|
|
|
647
579
|
## Overview
|
|
648
580
|
|
|
649
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products.
|
|
650
|
-
|
|
|
581
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products. Within Figma, the elements of the SDS are accessible to product designers via a collection of published libraries. These libraries have been built to allow for maximum flexibility depending on each product team's component needs. The SDS Documentation serves as an in-depth guide for both designers and engineers for using elements of the design system within projects. In instances where the available SDS components don't fulfill a product team's needs, there is a straightforward process for requesting additional elements for the design system. | | **Jump to section:** Figma SDS Documentation Contributing to the SDS |
|
|
582
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------------------------------- |
|
|
651
583
|
|
|
652
584
|
---
|
|
653
585
|
|
|
@@ -669,10 +601,10 @@ When working on a project, ensure the necessary SDS libraries for your product a
|
|
|
669
601
|
|
|
670
602
|
For reference, below are the libraries that should be enabled for CZ ID projects:
|
|
671
603
|
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
604
|
+
- SDS Bases
|
|
605
|
+
- SDS Typography
|
|
606
|
+
- SDS Icons
|
|
607
|
+
- CZ ID Design System
|
|
676
608
|
|
|
677
609
|
For more details around using and working with libraries in Figma, see this helpful guide from the Figma team.
|
|
678
610
|
|
|
@@ -684,10 +616,10 @@ The SDS documentation should be the go-to place to learn about using elements of
|
|
|
684
616
|
|
|
685
617
|
Below are a few tips around navigating the documentation:
|
|
686
618
|
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
619
|
+
- Visit the Element Status Tracker page for the most up-to-date view of which elements are available for use within the Figma libraries and the SDS codebase; a more detailed status spreadsheet is linked at the bottom of this page for an in-depth look at status by component variant as well as links to implementation tickets for a granular view of when to expect components to be available for use
|
|
620
|
+
- Most components have a Live Preview section on their Overview tabs; this displays an interactive instance of the element, providing the ability to engage with it and get a better feel for how it will work when included as part of a product build
|
|
621
|
+
- Each variant of every component is viewable on their Overview tabs; aside from displaying all of the available props for each variant, these views are able to be clicked on and inspected to get further design details such as typography and color styles, border radiuses, spacing, etc.
|
|
622
|
+
- On every component page there is a Code tab containing individual iframes imported from Storybook of each variant available to that component; each iframe has all of the same functionality found within Storybook, allowing engineers to explore props, adjust colors and text, see any event handlers, etc. all without leaving the documentation site
|
|
691
623
|
|
|
692
624
|
---
|
|
693
625
|
|
|
@@ -708,8 +640,8 @@ See a more detailed flow of the component request process here.
|
|
|
708
640
|
|
|
709
641
|
## Overview
|
|
710
642
|
|
|
711
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. |
|
|
712
|
-
|
|
|
643
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. | | **Jump to section:** Getting Started Usage Contributing to the SDS |
|
|
644
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------ |
|
|
713
645
|
|
|
714
646
|
---
|
|
715
647
|
|
|
@@ -736,21 +668,8 @@ SDS currently uses Material UI v5
|
|
|
736
668
|
czifui installs without direct dependencies to prevent version errors. Please ensure the following peer dependencies are also installed:
|
|
737
669
|
|
|
738
670
|
```html
|
|
739
|
-
"@emotion/css"
|
|
740
|
-
|
|
741
|
-
"@emotion/react"
|
|
742
|
-
|
|
743
|
-
"@emotion/styled"
|
|
744
|
-
|
|
745
|
-
"@material-ui/core"
|
|
746
|
-
|
|
747
|
-
"@material-ui/icons"
|
|
748
|
-
|
|
749
|
-
"@material-ui/lab"
|
|
750
|
-
|
|
751
|
-
"react"
|
|
752
|
-
|
|
753
|
-
"react-dom"
|
|
671
|
+
"@emotion/css" "@emotion/react" "@emotion/styled" "@material-ui/core"
|
|
672
|
+
"@material-ui/icons" "@material-ui/lab" "react" "react-dom"
|
|
754
673
|
```
|
|
755
674
|
|
|
756
675
|
To install the dependencies:
|
|
@@ -781,9 +700,7 @@ import React from "react";
|
|
|
781
700
|
import { Button } from "czifui";
|
|
782
701
|
|
|
783
702
|
<Button onClick={actions.onClick} sdsStyle="rounded" sdsType="primary">
|
|
784
|
-
|
|
785
|
-
{text}
|
|
786
|
-
|
|
703
|
+
{text}
|
|
787
704
|
</Button>;
|
|
788
705
|
```
|
|
789
706
|
|
|
@@ -826,16 +743,12 @@ import styled from "@emotion/styled";
|
|
|
826
743
|
|
|
827
744
|
import { getColors, getCorners } from "czifui";
|
|
828
745
|
|
|
829
|
-
|
|
830
|
-
|
|
831
746
|
export const Tag = styled.div`
|
|
747
|
+
// This is a callback function that returns more CSS rules, but the only way
|
|
832
748
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
// to access the custom theme object
|
|
836
|
-
|
|
837
|
-
${(props) => {
|
|
749
|
+
// to access the custom theme object
|
|
838
750
|
|
|
751
|
+
${(props) => {
|
|
839
752
|
// getColors() is a selector that picks out colors from the theme object
|
|
840
753
|
|
|
841
754
|
const colors = getColors(props);
|
|
@@ -844,8 +757,6 @@ export const Tag = styled.div`
|
|
|
844
757
|
|
|
845
758
|
const spacings = getSpaces(props);
|
|
846
759
|
|
|
847
|
-
|
|
848
|
-
|
|
849
760
|
return `
|
|
850
761
|
|
|
851
762
|
background-color: ${colors?.gray[500]};
|
|
@@ -855,9 +766,7 @@ export const Tag = styled.div`
|
|
|
855
766
|
margin-bottom: ${spacings?.xxl}px;
|
|
856
767
|
|
|
857
768
|
`;
|
|
858
|
-
|
|
859
|
-
}}
|
|
860
|
-
|
|
769
|
+
}}
|
|
861
770
|
`;
|
|
862
771
|
```
|
|
863
772
|
|
|
@@ -903,11 +812,8 @@ To use the default theme in your React application, complete the following:
|
|
|
903
812
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
904
813
|
|
|
905
814
|
<link
|
|
906
|
-
|
|
907
815
|
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400;1,600;1,700&display=swap"
|
|
908
|
-
|
|
909
|
-
rel="stylesheet"
|
|
910
|
-
|
|
816
|
+
rel="stylesheet"
|
|
911
817
|
/>
|
|
912
818
|
```
|
|
913
819
|
|
|
@@ -920,20 +826,12 @@ import { StylesProvider, ThemeProvider } from "@material-ui/core/styles";
|
|
|
920
826
|
|
|
921
827
|
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
922
828
|
|
|
923
|
-
|
|
924
|
-
|
|
925
829
|
<StylesProvider injectFirst>
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
<YourApp />
|
|
932
|
-
|
|
933
|
-
</ThemeProvider>
|
|
934
|
-
|
|
935
|
-
</EmotionThemeProvider>
|
|
936
|
-
|
|
830
|
+
<EmotionThemeProvider theme={defaultTheme}>
|
|
831
|
+
<ThemeProvider theme={defaultTheme}>
|
|
832
|
+
<YourApp />
|
|
833
|
+
</ThemeProvider>
|
|
834
|
+
</EmotionThemeProvider>
|
|
937
835
|
</StylesProvider>;
|
|
938
836
|
```
|
|
939
837
|
|
|
@@ -964,8 +862,8 @@ Let the following guides serve as starting points for working with the SDS. Unde
|
|
|
964
862
|
|
|
965
863
|
## Overview
|
|
966
864
|
|
|
967
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products.
|
|
968
|
-
|
|
|
865
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI's science products. Within Figma, the elements of the SDS are accessible to product designers via a collection of published libraries. These libraries have been built to allow for maximum flexibility depending on each product team's component needs. The SDS Documentation serves as an in-depth guide for both designers and engineers for using elements of the design system within projects. In instances where the available SDS components don't fulfill a product team's needs, there is a straightforward process for requesting additional elements for the design system. | | **Jump to** **s\*\***ection:\*\* Figma SDS Documentation Contributing to the SDS |
|
|
866
|
+
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | -------------------------------------------------------------------------------- |
|
|
969
867
|
|
|
970
868
|
---
|
|
971
869
|
|
|
@@ -989,28 +887,28 @@ Below are the libraries that should be enabled by product:
|
|
|
989
887
|
|
|
990
888
|
CZ ID
|
|
991
889
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
890
|
+
- SDS Bases
|
|
891
|
+
- SDS Typography
|
|
892
|
+
- SDS Icons
|
|
893
|
+
- CZ ID Design System
|
|
996
894
|
|
|
997
895
|
CZ GEN EPI
|
|
998
896
|
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
897
|
+
- SDS Bases
|
|
898
|
+
- SDS Typography
|
|
899
|
+
- SDS Icons
|
|
900
|
+
- CZ GEN EPI Design System
|
|
1003
901
|
|
|
1004
902
|
Single Cell Biology
|
|
1005
903
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
904
|
+
- SDS Bases
|
|
905
|
+
- SDS Icons
|
|
906
|
+
- Single Cell Design System
|
|
1009
907
|
|
|
1010
908
|
Imaging
|
|
1011
909
|
|
|
1012
|
-
|
|
1013
|
-
|
|
910
|
+
- SDS Icons
|
|
911
|
+
- napari hub + .org Design System
|
|
1014
912
|
|
|
1015
913
|
For more details around using and working with libraries in Figma, see this helpful guide from the Figma team.
|
|
1016
914
|
|
|
@@ -1022,10 +920,10 @@ The SDS documentation should be the go-to place to learn about using elements of
|
|
|
1022
920
|
|
|
1023
921
|
Below are a few tips around navigating the documentation:
|
|
1024
922
|
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
923
|
+
- Visit the Element Status Tracker page for the most up-to-date view of which elements are available for use within the Figma libraries and the SDS codebase; a more detailed status spreadsheet is linked at the bottom of this page for an in-depth look at status by component variant as well as links to implementation tickets for a granular view of when to expect components to be available for use
|
|
924
|
+
- Most components have a Live Preview section on their Overview tabs; this displays an interactive instance of the element, providing the ability to engage with it and get a better feel for how it will work when included as part of a product build
|
|
925
|
+
- Each variant of every component is viewable on their Overview tabs; aside from displaying all of the available props for each variant, these views are able to be clicked on and inspected to get further design details such as typography and color styles, border radiuses, spacing, etc.
|
|
926
|
+
- On every component page there is a Code tab containing individual iframes imported from Storybook of each variant available to that component; each iframe has all of the same functionality found within Storybook, allowing engineers to explore props, adjust colors and text, see any event handlers, etc. all without leaving the documentation site
|
|
1029
927
|
|
|
1030
928
|
---
|
|
1031
929
|
|
|
@@ -1046,8 +944,8 @@ See a more detailed flow of the component request process here.
|
|
|
1046
944
|
|
|
1047
945
|
## Overview
|
|
1048
946
|
|
|
1049
|
-
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. |
|
|
1050
|
-
|
|
|
947
|
+
| The Science Design System (SDS) brings consistency and universal standards to CZI’s science products by offering a library of high quality, reusable components that deliver predictable, accessible and easy to learn experiences. Our goal is to democratize access to tools and technologies for scientists. | | **Jump to** **s\*\***ection:\*\* Getting Started Usage Contributing to the SDS |
|
|
948
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------------------ |
|
|
1051
949
|
|
|
1052
950
|
---
|
|
1053
951
|
|
|
@@ -1074,21 +972,8 @@ SDS currently uses Material UI v5
|
|
|
1074
972
|
czifui installs without direct dependencies to prevent version errors. Please ensure the following peer dependencies are also installed:
|
|
1075
973
|
|
|
1076
974
|
```html
|
|
1077
|
-
"@emotion/css"
|
|
1078
|
-
|
|
1079
|
-
"@emotion/react"
|
|
1080
|
-
|
|
1081
|
-
"@emotion/styled"
|
|
1082
|
-
|
|
1083
|
-
"@material-ui/core"
|
|
1084
|
-
|
|
1085
|
-
"@material-ui/icons"
|
|
1086
|
-
|
|
1087
|
-
"@material-ui/lab"
|
|
1088
|
-
|
|
1089
|
-
"react"
|
|
1090
|
-
|
|
1091
|
-
"react-dom"
|
|
975
|
+
"@emotion/css" "@emotion/react" "@emotion/styled" "@material-ui/core"
|
|
976
|
+
"@material-ui/icons" "@material-ui/lab" "react" "react-dom"
|
|
1092
977
|
```
|
|
1093
978
|
|
|
1094
979
|
To install the dependencies:
|
|
@@ -1119,9 +1004,7 @@ import React from "react";
|
|
|
1119
1004
|
import { Button } from "czifui";
|
|
1120
1005
|
|
|
1121
1006
|
<Button onClick={actions.onClick} sdsStyle="rounded" sdsType="primary">
|
|
1122
|
-
|
|
1123
|
-
{text}
|
|
1124
|
-
|
|
1007
|
+
{text}
|
|
1125
1008
|
</Button>;
|
|
1126
1009
|
```
|
|
1127
1010
|
|
|
@@ -1164,16 +1047,12 @@ import styled from "@emotion/styled";
|
|
|
1164
1047
|
|
|
1165
1048
|
import { getColors, getCorners } from "czifui";
|
|
1166
1049
|
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
1050
|
export const Tag = styled.div`
|
|
1051
|
+
// This is a callback function that returns more CSS rules, but the only way
|
|
1170
1052
|
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
// to access the custom theme object
|
|
1174
|
-
|
|
1175
|
-
${(props) => {
|
|
1053
|
+
// to access the custom theme object
|
|
1176
1054
|
|
|
1055
|
+
${(props) => {
|
|
1177
1056
|
// getColors() is a selector that picks out colors from the theme object
|
|
1178
1057
|
|
|
1179
1058
|
const colors = getColors(props);
|
|
@@ -1182,8 +1061,6 @@ export const Tag = styled.div`
|
|
|
1182
1061
|
|
|
1183
1062
|
const spacings = getSpaces(props);
|
|
1184
1063
|
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
1064
|
return `
|
|
1188
1065
|
|
|
1189
1066
|
background-color: ${colors?.gray[500]};
|
|
@@ -1193,9 +1070,7 @@ export const Tag = styled.div`
|
|
|
1193
1070
|
margin-bottom: ${spacings?.xxl}px;
|
|
1194
1071
|
|
|
1195
1072
|
`;
|
|
1196
|
-
|
|
1197
|
-
}}
|
|
1198
|
-
|
|
1073
|
+
}}
|
|
1199
1074
|
`;
|
|
1200
1075
|
```
|
|
1201
1076
|
|
|
@@ -1241,11 +1116,8 @@ To use the default theme in your React application, complete the following:
|
|
|
1241
1116
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
1242
1117
|
|
|
1243
1118
|
<link
|
|
1244
|
-
|
|
1245
1119
|
href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,400;1,600;1,700&display=swap"
|
|
1246
|
-
|
|
1247
|
-
rel="stylesheet"
|
|
1248
|
-
|
|
1120
|
+
rel="stylesheet"
|
|
1249
1121
|
/>
|
|
1250
1122
|
```
|
|
1251
1123
|
|
|
@@ -1258,20 +1130,12 @@ import { StylesProvider, ThemeProvider } from "@material-ui/core/styles";
|
|
|
1258
1130
|
|
|
1259
1131
|
import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
|
|
1260
1132
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
1133
|
<StylesProvider injectFirst>
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
<YourApp />
|
|
1270
|
-
|
|
1271
|
-
</ThemeProvider>
|
|
1272
|
-
|
|
1273
|
-
</EmotionThemeProvider>
|
|
1274
|
-
|
|
1134
|
+
<EmotionThemeProvider theme={defaultTheme}>
|
|
1135
|
+
<ThemeProvider theme={defaultTheme}>
|
|
1136
|
+
<YourApp />
|
|
1137
|
+
</ThemeProvider>
|
|
1138
|
+
</EmotionThemeProvider>
|
|
1275
1139
|
</StylesProvider>;
|
|
1276
1140
|
```
|
|
1277
1141
|
|
|
@@ -1293,4 +1157,3 @@ Once a request is submitted, the SDS team will conduct an evaluation across all
|
|
|
1293
1157
|
If it is determined that the new component should not become part of the SDS, it will become the requesting product team's responsibility to design and maintain the component on their own.
|
|
1294
1158
|
|
|
1295
1159
|
See a more detailed flow of the component request process here.
|
|
1296
|
-
|