@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.
Files changed (50) hide show
  1. package/data/zeroheight-cache.json +5195 -0
  2. package/data/zeroheight-exports/Accordion.md +675 -0
  3. package/data/zeroheight-exports/Banner.md +576 -0
  4. package/data/zeroheight-exports/Borders.md +118 -0
  5. package/data/zeroheight-exports/Buttons.md +2260 -0
  6. package/data/zeroheight-exports/Callout.md +756 -0
  7. package/data/zeroheight-exports/Colors.md +633 -0
  8. package/data/zeroheight-exports/Content-Card.md +162 -0
  9. package/data/zeroheight-exports/Contributing-to-SDS.md +99 -0
  10. package/data/zeroheight-exports/Control-Inputs.md +2066 -0
  11. package/data/zeroheight-exports/Corners.md +112 -0
  12. package/data/zeroheight-exports/Cover-page.md +4 -0
  13. package/data/zeroheight-exports/Dialog.md +1133 -0
  14. package/data/zeroheight-exports/Downloads.md +121 -0
  15. package/data/zeroheight-exports/Drop-Shadows.md +80 -0
  16. package/data/zeroheight-exports/Dropdown-Input.md +1149 -0
  17. package/data/zeroheight-exports/Dropdown-Menu.md +3787 -0
  18. package/data/zeroheight-exports/Element-Status-Tracker.md +268 -0
  19. package/data/zeroheight-exports/Field-Inputs.md +965 -0
  20. package/data/zeroheight-exports/Filters.md +868 -0
  21. package/data/zeroheight-exports/Getting-Started.md +1296 -0
  22. package/data/zeroheight-exports/Hero.md +256 -0
  23. package/data/zeroheight-exports/Icons.md +432 -0
  24. package/data/zeroheight-exports/Intent.md +47 -0
  25. package/data/zeroheight-exports/Introduction-to-Bases.md +36 -0
  26. package/data/zeroheight-exports/Introduction-to-Cells.md +36 -0
  27. package/data/zeroheight-exports/Introduction-to-DNA.md +36 -0
  28. package/data/zeroheight-exports/Introduction-to-Genes.md +36 -0
  29. package/data/zeroheight-exports/Introduction.md +116 -0
  30. package/data/zeroheight-exports/Link.md +373 -0
  31. package/data/zeroheight-exports/Lists.md +617 -0
  32. package/data/zeroheight-exports/Loading-Indicator.md +38 -0
  33. package/data/zeroheight-exports/Navigation.md +853 -0
  34. package/data/zeroheight-exports/Notification.md +858 -0
  35. package/data/zeroheight-exports/Panel.md +862 -0
  36. package/data/zeroheight-exports/README.md +124 -0
  37. package/data/zeroheight-exports/Responsive-Design.md +275 -0
  38. package/data/zeroheight-exports/Search-Input.md +54 -0
  39. package/data/zeroheight-exports/Search.md +609 -0
  40. package/data/zeroheight-exports/Segmented-Control.md +561 -0
  41. package/data/zeroheight-exports/Spacing.md +298 -0
  42. package/data/zeroheight-exports/Table.md +4832 -0
  43. package/data/zeroheight-exports/Tabs.md +773 -0
  44. package/data/zeroheight-exports/Tags.md +1025 -0
  45. package/data/zeroheight-exports/Text-Link.md +185 -0
  46. package/data/zeroheight-exports/Theming.md +313 -0
  47. package/data/zeroheight-exports/Tooltips.md +1564 -0
  48. package/data/zeroheight-exports/Typography.md +769 -0
  49. package/dist/stdio.js +188 -0
  50. package/package.json +4 -3
@@ -0,0 +1,373 @@
1
+ # Link
2
+
3
+ Links are interactive elements that, when clicked, navigate the user away from the page they are currently viewing to another page or screen.
4
+
5
+ ## Guidelines
6
+
7
+ ## Overview
8
+
9
+ | | In Figma | | | Meets Accessibility | | | In Code |
10
+ | --- | --- | --- | --- | --- | --- | --- | --- |
11
+
12
+ ### Link Variants
13
+
14
+ There are two Link variants available to use depending on the background on top of which they are placed and whether that background provides enough contrast for Link – Default to be seen. Links can be used inline or separate from a paragraph of text.
15
+
16
+ Though visually similar to Button – Minimal, Links navigate the user away from the page they are currently viewing to another page. This is in contrast to Button – Minimal, which keeps the user on the same page and facilitates on-screen actions such as opening Dialogs or indicating less-emphasized actions.
17
+
18
+ Links come in two sizes: fontXs and fontS to align with SDS' most common body copy font sizes.
19
+
20
+ >**Note:** When including an inline Link in your Figma designs, styles must be manually applied as there is no way to save the Link style in Figma as a text style. Use the Link Figma component for links that are not inline.
21
+
22
+ ---
23
+
24
+ ### Live Instance
25
+
26
+ Interact with the live instance below and adjust the available props to better conceptualize how it will appear in product:
27
+
28
+ Default
29
+
30
+ ---
31
+
32
+ ### Link – Default
33
+
34
+ Use Link – Default only when the Link is placed on `surface-primary`, `surface-secondary`, or `surface-tertiary` backgrounds to ensure there is enough contrast to pass visual accessibility standards, otherwise use Link – Dashed.
35
+
36
+ | Default | Hover | Pressed |
37
+ | --- | --- | --- |
38
+
39
+ ---
40
+
41
+ ### Link – Dashed
42
+
43
+ Use Link – Dashed when the Link is placed on a background where the Link – Default does not provide enough contrast to pass visual accessibility standards. The color of the link and its underline should match the color of the text used in the paragraph it is placed within, see Color Rules below.
44
+
45
+ See Borders section for Link Underline details.
46
+
47
+ | Default | Hover | Pressed |
48
+ | --- | --- | --- |
49
+
50
+ #### Color Rules
51
+
52
+ The color of Link – Dashed and its underline should match the color of the text used in the paragraph it is placed within.
53
+
54
+ | Primary Text | Secondary Text | On-fill Text |
55
+ | --- | --- | --- |
56
+
57
+ ---
58
+
59
+ ### Link Spacing Rules
60
+
61
+ These rules establish how much margin should exist between and around elements.
62
+
63
+ >**Note:** The underline for Link – Dashed is spaced lower than the default text-decoration underline.
64
+
65
+ ## Code
66
+
67
+ >**Note:** The code examples below must install dependencies before displaying and may take extra time to load
68
+
69
+ ## Link
70
+
71
+ ### SDS Source Code
72
+
73
+ The component's source code in the SDS codebase can be found here.
74
+
75
+ ### MUI Documentation
76
+
77
+ Documentation for the underlying MUI component can be found here. There are no differences between the SDS and MUI component.
78
+
79
+ ### Props
80
+
81
+ Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
82
+
83
+ | Name | Type | Default | Description |
84
+ | --- | --- | --- | --- |
85
+ | `sdsStyle` | `"default"` `| "dashed"` | `"default"` | The style of underline corresponding to the `text-decoration` CSS property. Default is `underline`. |
86
+ | `sdsSize` | `"xs" | "s"` | `"xs"` | The font size of the `Link` component |
87
+ | `fontWeight` | `"normal"` `| "bold"` | `"normal"` | The font weight of the `Link` component. |
88
+
89
+ ### Code examples
90
+
91
+ #### Link – Default
92
+
93
+ This example has the minimum props needed for the `Link` component.
94
+
95
+ **/styles.css**
96
+
97
+ ```css
98
+ body {
99
+ font-size: 13px;
100
+ font-weight: 400;
101
+ letter-spacing: 0.08px;
102
+ line-height: 20px;
103
+ text-transform: none;
104
+ font-family: "Inter", sans-serif;
105
+ }
106
+
107
+ h1 {
108
+ font-size: 1.5rem;
109
+ }
110
+
111
+ .app {
112
+ padding: 20px;
113
+ }
114
+ ```
115
+
116
+ **tsconfig.json**
117
+
118
+ ```json
119
+ {
120
+ "include": [
121
+ "./**/*"
122
+ ],
123
+ "compilerOptions": {
124
+ "strict": true,
125
+ "esModuleInterop": true,
126
+ "lib": [ "dom", "es2015" ],
127
+ "jsx": "react-jsx"
128
+ }
129
+ }
130
+ ```
131
+
132
+ **/App.tsx**
133
+
134
+ ```tsx
135
+ import { Link } from "@czi-sds/components";
136
+ import "./styles.css";
137
+
138
+ function App() {
139
+ return (
140
+ <div className="app">
141
+ <Link href="#">
142
+ Science Design System
143
+ </Link>
144
+ </div>
145
+ );
146
+ }
147
+
148
+ export default App;
149
+ ```
150
+
151
+ **/index.tsx**
152
+
153
+ ```tsx
154
+ import React from "react";
155
+ import { createRoot } from "react-dom/client";
156
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
157
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
158
+ import { Theme } from "@czi-sds/components";
159
+ import CssBaseline from "@mui/material/CssBaseline";
160
+ import useMediaQuery from "@mui/material/useMediaQuery";
161
+
162
+ import App from "./App";
163
+
164
+ const container = document.getElementById("root");
165
+ const root = createRoot(container!);
166
+
167
+ const RootApp = () => {
168
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
169
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
170
+
171
+ return (
172
+ <StyledEngineProvider injectFirst>
173
+ <ThemeProvider theme={theme}>
174
+ <EmotionThemeProvider theme={theme}>
175
+ <CssBaseline />
176
+ <App />
177
+ </EmotionThemeProvider>
178
+ </ThemeProvider>
179
+ </StyledEngineProvider>
180
+ );
181
+ };
182
+
183
+ root.render(
184
+ <React.StrictMode>
185
+ <RootApp />
186
+ </React.StrictMode>
187
+ );
188
+
189
+ ```
190
+
191
+ **/public/index.html**
192
+
193
+ ```html
194
+ <!DOCTYPE html>
195
+ <html lang="en">
196
+ <head>
197
+ <meta charset="UTF-8" />
198
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
199
+ <title>Link</title>
200
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
201
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
202
+ <link
203
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
204
+ rel="stylesheet"
205
+ />
206
+ <link
207
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
208
+ rel="stylesheet"
209
+ />
210
+ </head>
211
+ <body>
212
+ <div id="root"></div>
213
+ </body>
214
+ </html>
215
+
216
+ ```
217
+
218
+ **/package.json**
219
+
220
+ ```json
221
+ {"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"}
222
+ ```
223
+
224
+ ---
225
+
226
+ #### Link – Dashed
227
+
228
+ This example demonstrates the use of a the dashed variant of the `Link` component embedded within a sentence.
229
+
230
+ **/styles.css**
231
+
232
+ ```css
233
+ body {
234
+ font-size: 13px;
235
+ font-weight: 400;
236
+ letter-spacing: 0.08px;
237
+ line-height: 20px;
238
+ text-transform: none;
239
+ font-family: "Inter", sans-serif;
240
+ }
241
+
242
+ h1 {
243
+ font-size: 1.5rem;
244
+ }
245
+
246
+ .app {
247
+ padding: 20px;
248
+ }
249
+ ```
250
+
251
+ **tsconfig.json**
252
+
253
+ ```json
254
+ {
255
+ "include": [
256
+ "./**/*"
257
+ ],
258
+ "compilerOptions": {
259
+ "strict": true,
260
+ "esModuleInterop": true,
261
+ "lib": [ "dom", "es2015" ],
262
+ "jsx": "react-jsx"
263
+ }
264
+ }
265
+ ```
266
+
267
+ **/App.tsx**
268
+
269
+ ```tsx
270
+ import { Link, getSemanticColors } from "@czi-sds/components";
271
+ import { styled, useTheme } from "@mui/material";
272
+ import "./styles.css";
273
+
274
+ function App() {
275
+ const theme = useTheme();
276
+ const semanticColors = getSemanticColors({theme});
277
+
278
+ const StyledParagraph = styled("p")`
279
+ background-color: ${semanticColors?.accent?.surfacePrimary};
280
+ padding: 10px;
281
+ `;
282
+
283
+ return (
284
+ <div className="app">
285
+ <StyledParagraph>
286
+ Lorem ipsum{" "}
287
+ <Link href="#" sdsStyle="dashed">
288
+ dolor sit apsidy
289
+ </Link>{" "}
290
+ consectetur, adipisicing elit.
291
+ </StyledParagraph>
292
+ </div>
293
+ );
294
+ }
295
+
296
+ export default App;
297
+ ```
298
+
299
+ **/index.tsx**
300
+
301
+ ```tsx
302
+ import React from "react";
303
+ import { createRoot } from "react-dom/client";
304
+ import { ThemeProvider as EmotionThemeProvider } from "@emotion/react";
305
+ import { StyledEngineProvider, ThemeProvider } from "@mui/material/styles";
306
+ import { Theme } from "@czi-sds/components";
307
+ import CssBaseline from "@mui/material/CssBaseline";
308
+ import useMediaQuery from "@mui/material/useMediaQuery";
309
+
310
+ import App from "./App";
311
+
312
+ const container = document.getElementById("root");
313
+ const root = createRoot(container!);
314
+
315
+ const RootApp = () => {
316
+ const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
317
+ const theme = prefersDarkMode ? Theme("dark") : Theme("light");
318
+
319
+ return (
320
+ <StyledEngineProvider injectFirst>
321
+ <ThemeProvider theme={theme}>
322
+ <EmotionThemeProvider theme={theme}>
323
+ <CssBaseline />
324
+ <App />
325
+ </EmotionThemeProvider>
326
+ </ThemeProvider>
327
+ </StyledEngineProvider>
328
+ );
329
+ };
330
+
331
+ root.render(
332
+ <React.StrictMode>
333
+ <RootApp />
334
+ </React.StrictMode>
335
+ );
336
+
337
+ ```
338
+
339
+ **/public/index.html**
340
+
341
+ ```html
342
+ <!DOCTYPE html>
343
+ <html lang="en">
344
+ <head>
345
+ <meta charset="UTF-8" />
346
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
347
+ <title>Link</title>
348
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
349
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
350
+ <link
351
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap"
352
+ rel="stylesheet"
353
+ />
354
+ <link
355
+ href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap"
356
+ rel="stylesheet"
357
+ />
358
+ </head>
359
+ <body>
360
+ <div id="root"></div>
361
+ </body>
362
+ </html>
363
+
364
+ ```
365
+
366
+ **/package.json**
367
+
368
+ ```json
369
+ {"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"}
370
+ ```
371
+
372
+ ---
373
+