@czi-sds/components 19.4.0 → 20.0.1
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/README.md +18 -13
- package/dist/index.cjs.d.ts +556 -188
- package/dist/index.cjs.js +2616 -2144
- package/dist/index.esm.d.ts +556 -188
- package/dist/index.esm.js +2596 -2142
- package/dist/tailwind.json +222 -82
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/variables.css +241 -105
- package/dist/variables.scss +241 -105
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ The Science Design System (SDS) brings consistency and universal standards to CZ
|
|
|
4
4
|
|
|
5
5
|
## Design System Documentation
|
|
6
6
|
|
|
7
|
-
`@czi-sds/components` implements the Science Design System as documented in [Zeroheight](https://sds.czi.design/). As a result, it's very useful to get familiar with the available **theme variables**, such as `colors`, `
|
|
7
|
+
`@czi-sds/components` implements the Science Design System as documented in [Zeroheight](https://sds.czi.design/). As a result, it's very useful to get familiar with the available **theme variables**, such as `colors`, `spaces`, `typography`, etc., so you can leverage the theme properly in your application.
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
@@ -93,24 +93,24 @@ export const Title - styled(Typography)`
|
|
|
93
93
|
|
|
94
94
|
```ts
|
|
95
95
|
import { css, SerializedStyles } from "@emotion/react";
|
|
96
|
-
import { styled } from
|
|
96
|
+
import { styled } from "@mui/material/styles";
|
|
97
97
|
import { getColors, getCorners } from "@czi-sds/components";
|
|
98
98
|
|
|
99
99
|
export const Tag = styled("div")`
|
|
100
100
|
// This is a callback function that returns more CSS rules, but the only way
|
|
101
101
|
// to access the custom theme object
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
${(props) => {
|
|
103
|
+
// getColors() is a selector that picks out colors from the theme object
|
|
104
|
+
const colors = getColors(props);
|
|
105
|
+
// getSpaces() is a selector that picks out spaces from the theme object
|
|
106
|
+
const spaces = getSpaces(props);
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
return `
|
|
109
109
|
background-color: ${colors?.gray[500]};
|
|
110
|
-
padding-bottom: ${
|
|
111
|
-
margin-bottom: ${
|
|
110
|
+
padding-bottom: ${spaces?.m}px;
|
|
111
|
+
margin-bottom: ${spaces?.xxl}px;
|
|
112
112
|
`;
|
|
113
|
-
|
|
113
|
+
}}
|
|
114
114
|
`;
|
|
115
115
|
```
|
|
116
116
|
|
|
@@ -199,9 +199,14 @@ To use the default theme in your React application, complete the following:
|
|
|
199
199
|
|
|
200
200
|
```html
|
|
201
201
|
// installs the sds font from google fonts
|
|
202
|
-
<link rel="preconnect" href="https://fonts.
|
|
202
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
203
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
204
|
+
<link
|
|
205
|
+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
|
|
206
|
+
rel="stylesheet"
|
|
207
|
+
/>
|
|
203
208
|
<link
|
|
204
|
-
href="https://fonts.googleapis.com/css2?family=
|
|
209
|
+
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
|
|
205
210
|
rel="stylesheet"
|
|
206
211
|
/>
|
|
207
212
|
```
|