@czi-sds/mcp 0.16.0 → 0.17.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/README.md +2 -1
- package/data/component-docs/Accordion.md +291 -0
- package/data/component-docs/Autocomplete.md +525 -0
- package/data/component-docs/Banner.md +231 -0
- package/data/component-docs/Button.md +224 -0
- package/data/component-docs/ButtonDropdown.md +256 -0
- package/data/component-docs/ButtonGroup.md +320 -0
- package/data/component-docs/ButtonToggle.md +397 -0
- package/data/component-docs/Callout.md +268 -0
- package/data/component-docs/CellBasic.md +122 -0
- package/data/component-docs/CellComponent.md +63 -0
- package/data/component-docs/CellHeader.md +128 -0
- package/data/component-docs/ComplexFilter.md +294 -0
- package/data/component-docs/ContentCard.md +406 -0
- package/data/component-docs/Dialog.md +651 -0
- package/data/component-docs/Dropdown.md +155 -0
- package/data/component-docs/DropdownMenu.md +949 -0
- package/data/component-docs/HeatmapChart.md +782 -0
- package/data/component-docs/Hero.md +363 -0
- package/data/component-docs/Icon.md +283 -0
- package/data/component-docs/InputCheckbox.md +205 -0
- package/data/component-docs/InputDropdown.md +482 -0
- package/data/component-docs/InputRadio.md +173 -0
- package/data/component-docs/InputSearch.md +81 -0
- package/data/component-docs/InputSlider.md +189 -0
- package/data/component-docs/InputText.md +110 -0
- package/data/component-docs/InputToggle.md +141 -0
- package/data/component-docs/IntentMessage.md +293 -0
- package/data/component-docs/Legend.md +442 -0
- package/data/component-docs/Link.md +23 -0
- package/data/component-docs/List.md +300 -0
- package/data/component-docs/LoadingIndicator.md +198 -0
- package/data/component-docs/Menu.md +298 -0
- package/data/component-docs/MenuItem.md +100 -0
- package/data/component-docs/NavigationFooter.md +165 -0
- package/data/component-docs/NavigationHeader.md +500 -0
- package/data/component-docs/NavigationJumpTo.md +414 -0
- package/data/component-docs/Notification.md +288 -0
- package/data/component-docs/Pagination.md +67 -0
- package/data/component-docs/Panel.md +636 -0
- package/data/component-docs/Popover.md +448 -0
- package/data/component-docs/PreComposedTable.md +2947 -0
- package/data/component-docs/SegmentedControl.md +396 -0
- package/data/component-docs/StackedBarChart.md +475 -0
- package/data/component-docs/Table.md +2000 -0
- package/data/component-docs/TableHeader.md +53 -0
- package/data/component-docs/TableRow.md +74 -0
- package/data/component-docs/Tabs.md +455 -0
- package/data/component-docs/Tag.md +647 -0
- package/data/component-docs/TagFilter.md +131 -0
- package/data/component-docs/Tooltip.md +561 -0
- package/data/component-docs/TooltipCondensed.md +203 -0
- package/data/component-docs/TooltipTable.md +145 -0
- package/data/component-docs/index.json +262 -0
- package/data/component-list.json +2 -5
- package/data/component-props/Accordion.json +31 -11
- package/data/component-props/Alert.json +3 -3
- package/data/component-props/Autocomplete.json +150 -15
- package/data/component-props/Banner.json +31 -17
- package/data/component-props/Button.json +45 -20
- package/data/component-props/ButtonDropdown.json +36 -17
- package/data/component-props/ButtonDropdownLegacy.json +11 -11
- package/data/component-props/ButtonGroup.json +32 -11
- package/data/component-props/ButtonIcon.json +10 -10
- package/data/component-props/ButtonLegacy.json +19 -19
- package/data/component-props/ButtonToggle.json +32 -19
- package/data/component-props/ButtonToggleLegacy.json +11 -11
- package/data/component-props/Callout.json +58 -17
- package/data/component-props/CellBasic.json +94 -41
- package/data/component-props/CellComponent.json +23 -7
- package/data/component-props/CellHeader.json +62 -19
- package/data/component-props/ComplexFilter.json +52 -21
- package/data/component-props/ContentCard.json +70 -47
- package/data/component-props/Dialog.json +47 -14
- package/data/component-props/Dropdown.json +68 -31
- package/data/component-props/DropdownMenu.json +128 -23
- package/data/component-props/HeatmapChart.json +88 -12
- package/data/component-props/Hero.json +80 -39
- package/data/component-props/Icon.json +20 -9
- package/data/component-props/InputCheckbox.json +36 -14
- package/data/component-props/InputDropdown.json +75 -27
- package/data/component-props/InputRadio.json +31 -13
- package/data/component-props/InputSearch.json +41 -18
- package/data/component-props/InputSlider.json +46 -19
- package/data/component-props/InputText.json +26 -19
- package/data/component-props/InputToggle.json +26 -9
- package/data/component-props/IntentMessage.json +38 -9
- package/data/component-props/Link.json +13 -7
- package/data/component-props/LoadingIndicator.json +11 -3
- package/data/component-props/MenuItem.json +38 -19
- package/data/component-props/MenuSelect.json +8 -8
- package/data/component-props/NavigationFooter.json +49 -19
- package/data/component-props/NavigationHeader.json +150 -37
- package/data/component-props/NavigationJumpTo.json +33 -7
- package/data/component-props/Notification.json +39 -21
- package/data/component-props/Pagination.json +39 -11
- package/data/component-props/Panel.json +62 -9
- package/data/component-props/Popover.json +80 -7
- package/data/component-props/PreComposedTable.json +99 -27
- package/data/component-props/SegmentedControl.json +42 -3
- package/data/component-props/StackedBarChart.json +116 -42
- package/data/component-props/TableRow.json +38 -19
- package/data/component-props/Tabs.json +66 -9
- package/data/component-props/Tag.json +34 -17
- package/data/component-props/TagFilter.json +10 -3
- package/data/component-props/Tooltip.json +49 -18
- package/data/component-props/TooltipCondensed.json +18 -9
- package/data/component-props/TooltipTable.json +17 -7
- package/data/resources/{zeroheight-rules.md → documentation-rules.md} +43 -30
- package/data/resources/figma-rules.md +2 -2
- package/dist/stdio.js +112 -208
- package/package.json +9 -5
- package/data/component-props/ButtonDropdownV2.json +0 -34
- package/data/component-props/ButtonNew.json +0 -47
- package/data/component-props/ButtonToggleV2.json +0 -44
- package/data/component-props/ButtonV2.json +0 -43
- package/data/zeroheight-cache.json +0 -10259
- package/data/zeroheight-exports/Accordion.md +0 -774
- package/data/zeroheight-exports/Banner.md +0 -691
- package/data/zeroheight-exports/Borders.md +0 -117
- package/data/zeroheight-exports/Buttons.md +0 -1854
- package/data/zeroheight-exports/Callout.md +0 -931
- package/data/zeroheight-exports/Colors.md +0 -1755
- package/data/zeroheight-exports/Content-Card.md +0 -309
- package/data/zeroheight-exports/Contributing-to-SDS.md +0 -98
- package/data/zeroheight-exports/Control-Inputs.md +0 -2818
- package/data/zeroheight-exports/Corners.md +0 -104
- package/data/zeroheight-exports/Cover-page.md +0 -3
- package/data/zeroheight-exports/Dialog.md +0 -1367
- package/data/zeroheight-exports/Downloads.md +0 -236
- package/data/zeroheight-exports/Drop-Shadows.md +0 -79
- package/data/zeroheight-exports/Dropdown-Input.md +0 -1776
- package/data/zeroheight-exports/Dropdown-Menus.md +0 -913
- package/data/zeroheight-exports/Element-Status-Tracker.md +0 -267
- package/data/zeroheight-exports/Field-Inputs.md +0 -1405
- package/data/zeroheight-exports/Filters.md +0 -1111
- package/data/zeroheight-exports/Getting-Started.md +0 -1157
- package/data/zeroheight-exports/Hero.md +0 -414
- package/data/zeroheight-exports/Icons.md +0 -2067
- package/data/zeroheight-exports/Intent.md +0 -86
- package/data/zeroheight-exports/Introduction-to-Bases.md +0 -35
- package/data/zeroheight-exports/Introduction-to-Cells.md +0 -35
- package/data/zeroheight-exports/Introduction-to-DNA.md +0 -35
- package/data/zeroheight-exports/Introduction-to-Genes.md +0 -35
- package/data/zeroheight-exports/Introduction.md +0 -115
- package/data/zeroheight-exports/Link.md +0 -432
- package/data/zeroheight-exports/Lists.md +0 -986
- package/data/zeroheight-exports/Loading-Indicator.md +0 -41
- package/data/zeroheight-exports/Navigation.md +0 -1190
- package/data/zeroheight-exports/Notification.md +0 -1038
- package/data/zeroheight-exports/Panel.md +0 -1030
- package/data/zeroheight-exports/README.md +0 -122
- package/data/zeroheight-exports/Responsive-Design.md +0 -330
- package/data/zeroheight-exports/Search-Input.md +0 -91
- package/data/zeroheight-exports/Search.md +0 -822
- package/data/zeroheight-exports/Segmented-Control.md +0 -609
- package/data/zeroheight-exports/Spacing.md +0 -297
- package/data/zeroheight-exports/Table.md +0 -5345
- package/data/zeroheight-exports/Tabs.md +0 -1324
- package/data/zeroheight-exports/Tags.md +0 -1545
- package/data/zeroheight-exports/Text-Link.md +0 -268
- package/data/zeroheight-exports/Theming.md +0 -362
- package/data/zeroheight-exports/Tooltips.md +0 -2015
- package/data/zeroheight-exports/Typography.md +0 -800
|
@@ -2,39 +2,56 @@
|
|
|
2
2
|
"Tag": {
|
|
3
3
|
"props": {
|
|
4
4
|
"color": {
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"defaultValue": "neutral",
|
|
6
|
+
"description": "The tag's intent, given either as one of the six names or as CSS colors: [label color, background color]: the icon stays white [label color, background color, icon color]",
|
|
7
|
+
"isRequired": false,
|
|
8
|
+
"type": "\"info\" | \"negative\" | \"notice\" | \"positive\" | \"neutral\" | \"beta\" | [string, string] | [string, string, string]"
|
|
7
9
|
},
|
|
8
10
|
"hover": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
+
"defaultValue": true,
|
|
12
|
+
"description": "Whether the tag responds to the pointer with a darker fill and a pointer cursor. False removes the tag from pointer events altogether, which also keeps a surrounding Tooltip from opening.",
|
|
13
|
+
"isRequired": false,
|
|
14
|
+
"type": "boolean"
|
|
11
15
|
},
|
|
12
16
|
"icon": {
|
|
13
|
-
"
|
|
17
|
+
"description": "Icon element.",
|
|
14
18
|
"isRequired": false,
|
|
15
|
-
"
|
|
19
|
+
"type": "ReactElement"
|
|
16
20
|
},
|
|
17
21
|
"label": {
|
|
18
|
-
"
|
|
22
|
+
"defaultValue": "- (required)",
|
|
23
|
+
"description": "The tag's text, and its accessible name. It is cut off with an ellipsis\nrather than wrapped, so keep it to a word or two.",
|
|
19
24
|
"isRequired": true,
|
|
20
|
-
"
|
|
25
|
+
"type": "string"
|
|
21
26
|
},
|
|
22
27
|
"onClick": {
|
|
23
|
-
"
|
|
24
|
-
"isRequired": false
|
|
28
|
+
"description": "MUI's prop. Makes the tag a button: a tab stop that answers Enter and Space.",
|
|
29
|
+
"isRequired": false,
|
|
30
|
+
"type": "function"
|
|
25
31
|
},
|
|
26
32
|
"sdsSize": {
|
|
27
|
-
"
|
|
28
|
-
"
|
|
33
|
+
"defaultValue": "s",
|
|
34
|
+
"description": "The size of the tag: an 11px label with a 12px icon, or a 13px label with a 24px icon. A large tag has to have an icon.",
|
|
35
|
+
"isRequired": false,
|
|
36
|
+
"type": "\"s\" | \"l\""
|
|
29
37
|
},
|
|
30
38
|
"sdsStyle": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
39
|
+
"defaultValue": "square",
|
|
40
|
+
"description": "The shape of the tag. The design guidance treats rounded as the default for the system, so it is usually worth passing.",
|
|
41
|
+
"isRequired": false,
|
|
42
|
+
"type": "\"square\" | \"rounded\""
|
|
33
43
|
},
|
|
34
44
|
"sdsType": {
|
|
35
|
-
"
|
|
36
|
-
"
|
|
45
|
+
"defaultValue": "primary",
|
|
46
|
+
"description": "primary fills the tag with the intent color and sets the label white. secondary tints the fill and keeps the label and a 1px border in the intent color.",
|
|
47
|
+
"isRequired": false,
|
|
48
|
+
"type": "\"primary\" | \"secondary\""
|
|
49
|
+
},
|
|
50
|
+
"onDelete": {
|
|
51
|
+
"description": "Callback fired when the delete icon is clicked.\nIf set, the delete icon will be shown.",
|
|
52
|
+
"isRequired": false,
|
|
53
|
+
"type": "(event: any) => void"
|
|
37
54
|
}
|
|
38
55
|
}
|
|
39
56
|
}
|
|
40
|
-
}
|
|
57
|
+
}
|
|
@@ -2,10 +2,17 @@
|
|
|
2
2
|
"TagFilter": {
|
|
3
3
|
"props": {
|
|
4
4
|
"label": {
|
|
5
|
-
"
|
|
5
|
+
"defaultValue": "- (required)",
|
|
6
|
+
"description": "The filter's text. Cut off with an ellipsis when there is not room for it.",
|
|
6
7
|
"isRequired": true,
|
|
7
|
-
"
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"onDelete": {
|
|
11
|
+
"defaultValue": "- (required)",
|
|
12
|
+
"description": "Runs when the X is clicked or activated, and when Backspace or Delete is\npressed on the tag. Drop the filter from your state here; the component\ndoes not remove itself.",
|
|
13
|
+
"isRequired": true,
|
|
14
|
+
"type": "(event: any) => void"
|
|
8
15
|
}
|
|
9
16
|
}
|
|
10
17
|
}
|
|
11
|
-
}
|
|
18
|
+
}
|
|
@@ -2,36 +2,67 @@
|
|
|
2
2
|
"Tooltip": {
|
|
3
3
|
"props": {
|
|
4
4
|
"arrowOffset": {
|
|
5
|
-
"
|
|
6
|
-
"isRequired": false
|
|
5
|
+
"description": "Sets the arrow's left position, in pixels from the tooltip's left edge, instead of letting it be calculated. Values past the tooltip's width move the arrow out of sight.",
|
|
6
|
+
"isRequired": false,
|
|
7
|
+
"type": "number"
|
|
7
8
|
},
|
|
8
9
|
"componentSlot": {
|
|
9
|
-
"
|
|
10
|
-
"isRequired": false
|
|
11
|
-
|
|
12
|
-
"hasInvertedStyle": {
|
|
13
|
-
"type": "\"false\" | \"true\"",
|
|
14
|
-
"isRequired": false
|
|
10
|
+
"description": "Content below the text, with 12px above it when there is text. The place for anything that is not a string, including TooltipTable.",
|
|
11
|
+
"isRequired": false,
|
|
12
|
+
"type": "ReactNode"
|
|
15
13
|
},
|
|
16
14
|
"placement": {
|
|
17
|
-
"
|
|
18
|
-
"isRequired": false,
|
|
15
|
+
"defaultValue": "bottom",
|
|
19
16
|
"description": "Tooltip placement.",
|
|
20
|
-
"
|
|
17
|
+
"isRequired": false,
|
|
18
|
+
"type": "\"bottom\" | \"left\" | \"right\" | \"top\" | \"auto\" | \"auto-start\" | \"auto-end\" | \"top-start\" | \"top-end\" | \"bottom-start\" | \"bottom-end\" | \"right-start\" | \"right-end\" | \"left-start\" | \"left-end\""
|
|
21
19
|
},
|
|
22
20
|
"textAlign": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
"defaultValue": "center, or left when wide",
|
|
22
|
+
"description": "Overrides the alignment the width would pick.",
|
|
23
|
+
"isRequired": false,
|
|
24
|
+
"type": "\"center\" | \"left\" | \"right\""
|
|
25
25
|
},
|
|
26
26
|
"title": {
|
|
27
|
-
"
|
|
27
|
+
"description": "Tooltip title. Zero-length titles string, undefined, null and false are never displayed.",
|
|
28
28
|
"isRequired": false,
|
|
29
|
-
"
|
|
29
|
+
"type": "ReactNode"
|
|
30
30
|
},
|
|
31
31
|
"width": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
32
|
+
"defaultValue": "default",
|
|
33
|
+
"description": "Caps the tooltip at 250px or 550px. Wide also left-aligns the text.",
|
|
34
|
+
"isRequired": false,
|
|
35
|
+
"type": "\"default\" | \"wide\""
|
|
36
|
+
},
|
|
37
|
+
"subtitle": {
|
|
38
|
+
"description": "A smaller, dimmer second line under the title, for a detail such as how to use what the tooltip points at.",
|
|
39
|
+
"isRequired": false,
|
|
40
|
+
"type": "ReactNode"
|
|
41
|
+
},
|
|
42
|
+
"arrow": {
|
|
43
|
+
"defaultValue": false,
|
|
44
|
+
"description": "If `true`, adds an arrow to the tooltip.",
|
|
45
|
+
"isRequired": false,
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
},
|
|
48
|
+
"PopperComponent": {
|
|
49
|
+
"defaultValue": "SDS StyledPopper",
|
|
50
|
+
"description": "The popper the tooltip renders into, carrying the arrow's shape and\nplacement.\n\n(v9): MUI removed the Tooltip `PopperComponent` prop in favor of\n`slots.popper`. We keep `PopperComponent` as an SDS prop for backward\ncompatibility and map it to `slots.popper` internally.",
|
|
51
|
+
"isRequired": false,
|
|
52
|
+
"type": "\"symbol\" | \"object\" | \"style\" | \"button\" | \"div\" | \"a\" | \"abbr\" | \"address\" | \"area\" | \"article\" | \"aside\" | \"audio\" | \"b\" | \"base\" | \"bdi\" | \"bdo\" | \"big\" | \"blockquote\" | \"body\" | \"br\" | \"canvas\" | \"caption\" | \"center\" | \"cite\" | \"code\" | \"col\" | \"colgroup\" | \"data\" | \"datalist\" | \"dd\" | \"del\" | \"details\" | \"dfn\" | \"dialog\" | \"dl\" | \"dt\" | \"em\" | \"embed\" | \"fieldset\" | \"figcaption\" | \"figure\" | \"footer\" | \"form\" | \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"head\" | \"header\" | \"hgroup\" | \"hr\" | \"html\" | \"i\" | \"iframe\" | \"img\" | \"input\" | \"ins\" | \"kbd\" | \"keygen\" | \"label\" | \"legend\" | \"li\" | \"link\" | \"main\" | \"map\" | \"mark\" | \"menu\" | \"menuitem\" | \"meta\" | \"meter\" | \"nav\" | \"noindex\" | \"noscript\" | \"ol\" | \"optgroup\" | \"option\" | \"output\" | \"p\" | \"param\" | \"picture\" | \"pre\" | \"progress\" | \"q\" | \"rp\" | \"rt\" | \"ruby\" | \"s\" | \"samp\" | \"search\" | \"slot\" | \"script\" | \"section\" | \"select\" | \"small\" | \"source\" | \"span\" | \"strong\" | \"sub\" | \"summary\" | \"sup\" | \"table\" | \"template\" | \"tbody\" | \"td\" | \"textarea\" | \"tfoot\" | \"th\" | \"thead\" | \"time\" | \"title\" | \"tr\" | \"track\" | \"u\" | \"ul\" | \"var\" | \"video\" | \"wbr\" | \"webview\" | \"svg\" | \"animate\" | \"animateMotion\" | \"animateTransform\" | \"circle\" | \"clipPath\" | \"defs\" | \"desc\" | \"ellipse\" | \"feBlend\" | \"feColorMatrix\" | \"feComponentTransfer\" | \"feComposite\" | \"feConvolveMatrix\" | \"feDiffuseLighting\" | \"feDisplacementMap\" | \"feDistantLight\" | \"feDropShadow\" | \"feFlood\" | \"feFuncA\" | \"feFuncB\" | \"feFuncG\" | \"feFuncR\" | \"feGaussianBlur\" | \"feImage\" | \"feMerge\" | \"feMergeNode\" | \"feMorphology\" | \"feOffset\" | \"fePointLight\" | \"feSpecularLighting\" | \"feSpotLight\" | \"feTile\" | \"feTurbulence\" | \"filter\" | \"foreignObject\" | \"g\" | \"image\" | \"line\" | \"linearGradient\" | \"marker\" | \"mask\" | \"metadata\" | \"mpath\" | \"path\" | \"pattern\" | \"polygon\" | \"polyline\" | \"radialGradient\" | \"rect\" | \"set\" | \"stop\" | \"switch\" | \"text\" | \"textPath\" | \"tspan\" | \"use\" | \"view\" | ComponentClass<any, any> | FunctionComponent<any>"
|
|
53
|
+
},
|
|
54
|
+
"disableInteractive": {
|
|
55
|
+
"defaultValue": false,
|
|
56
|
+
"description": "Makes a tooltip not interactive, i.e. it will close when the user\nhovers over the tooltip before the `leaveDelay` is expired.",
|
|
57
|
+
"isRequired": false,
|
|
58
|
+
"type": "boolean"
|
|
59
|
+
},
|
|
60
|
+
"followCursor": {
|
|
61
|
+
"defaultValue": false,
|
|
62
|
+
"description": "If `true`, the tooltip follow the cursor over the wrapped element.",
|
|
63
|
+
"isRequired": false,
|
|
64
|
+
"type": "boolean"
|
|
34
65
|
}
|
|
35
66
|
}
|
|
36
67
|
}
|
|
37
|
-
}
|
|
68
|
+
}
|
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"TooltipCondensed": {
|
|
3
3
|
"props": {
|
|
4
|
-
"hasInvertedStyle": {
|
|
5
|
-
"type": "any",
|
|
6
|
-
"isRequired": false
|
|
7
|
-
},
|
|
8
4
|
"indicator": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
5
|
+
"defaultValue": false,
|
|
6
|
+
"description": "Draws a 12px round dot before the text.",
|
|
7
|
+
"isRequired": false,
|
|
8
|
+
"type": "boolean"
|
|
11
9
|
},
|
|
12
10
|
"indicatorColor": {
|
|
13
|
-
"
|
|
14
|
-
"isRequired": false
|
|
11
|
+
"description": "The dot's colour, as a CSS colour. Without it the dot occupies its space but cannot be seen.",
|
|
12
|
+
"isRequired": false,
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"title": {
|
|
16
|
+
"description": "The label to show. Pass null when the content is coming through componentSlot instead.",
|
|
17
|
+
"isRequired": false,
|
|
18
|
+
"type": "ReactNode"
|
|
19
|
+
},
|
|
20
|
+
"componentSlot": {
|
|
21
|
+
"description": "Inherited from Tooltip, and how a TooltipTable is placed inside a condensed tooltip.",
|
|
22
|
+
"isRequired": false,
|
|
23
|
+
"type": "ReactNode"
|
|
15
24
|
}
|
|
16
25
|
}
|
|
17
26
|
}
|
|
18
|
-
}
|
|
27
|
+
}
|
|
@@ -2,17 +2,27 @@
|
|
|
2
2
|
"TooltipTable": {
|
|
3
3
|
"props": {
|
|
4
4
|
"contentAlert": {
|
|
5
|
-
"
|
|
6
|
-
"isRequired": false
|
|
5
|
+
"description": "A note above the whole table, for a caveat about the numbers. Takes an element, so it can hold a link.",
|
|
6
|
+
"isRequired": false,
|
|
7
|
+
"type": "string | Element"
|
|
7
8
|
},
|
|
8
9
|
"itemAlign": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
10
|
+
"defaultValue": "right",
|
|
11
|
+
"description": "Which side of its column each value sits on. Right lines numbers up with each other.",
|
|
12
|
+
"isRequired": false,
|
|
13
|
+
"type": "\"left\" | \"right\""
|
|
11
14
|
},
|
|
12
15
|
"showSectionHeader": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
16
|
+
"defaultValue": true,
|
|
17
|
+
"description": "Whether section labels are drawn. False hides all of them; the dividers between sections stay.",
|
|
18
|
+
"isRequired": false,
|
|
19
|
+
"type": "boolean"
|
|
20
|
+
},
|
|
21
|
+
"data": {
|
|
22
|
+
"description": "The sections, drawn in order and separated by dividers. A section's label heads it, its dataRows fill it, and disabled greys the whole block.",
|
|
23
|
+
"isRequired": false,
|
|
24
|
+
"type": "{ label?: string; dataRows: { label: string; value: string | number; }[]; disabled?: boolean; }[]"
|
|
15
25
|
}
|
|
16
26
|
}
|
|
17
27
|
}
|
|
18
|
-
}
|
|
28
|
+
}
|
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# SDS Documentation Adherence Rules
|
|
2
2
|
|
|
3
|
-
These rules guide
|
|
3
|
+
These rules guide AI assistants in using the SDS documentation to ensure accurate implementation of the CZI Science Design System (SDS).
|
|
4
4
|
|
|
5
5
|
## Documentation as Source of Truth
|
|
6
6
|
|
|
7
|
+
The documentation served by `get_component_docs` is generated from the component
|
|
8
|
+
documentation that ships with the SDS repository and renders in Storybook. It is
|
|
9
|
+
the same content the design system team maintains, so it describes the library as
|
|
10
|
+
it actually is rather than as it once was.
|
|
11
|
+
|
|
7
12
|
### Component Usage Guidelines
|
|
8
13
|
|
|
9
|
-
- **Always
|
|
14
|
+
- **Always call `get_component_docs`** before implementing a component
|
|
10
15
|
- Follow documented usage patterns and restrictions
|
|
11
16
|
- Respect component do's and don'ts specified in documentation
|
|
12
17
|
- Use documented prop combinations and avoid deprecated patterns
|
|
13
18
|
|
|
14
19
|
### API Documentation Priority
|
|
15
20
|
|
|
16
|
-
- **
|
|
17
|
-
- Check documented prop options before implementing
|
|
21
|
+
- **Component documentation overrides assumptions**
|
|
22
|
+
- Check documented prop options with `get_component_props` before implementing
|
|
18
23
|
- Follow documented accessibility requirements
|
|
19
|
-
- Use
|
|
24
|
+
- Use the code examples in the documentation as implementation templates
|
|
20
25
|
|
|
21
26
|
## Component Implementation Rules
|
|
22
27
|
|
|
@@ -25,7 +30,8 @@ These rules guide Claude Code when using Zeroheight documentation to ensure accu
|
|
|
25
30
|
- **Use only documented prop values** and combinations
|
|
26
31
|
- Follow documented prop hierarchies (e.g., `sdsStyle` + `sdsType` combinations)
|
|
27
32
|
- Respect documented prop requirements (required vs optional)
|
|
28
|
-
-
|
|
33
|
+
- Note where a component departs from the MUI component it wraps; each page has
|
|
34
|
+
an "SDS vs MUI" section covering exactly this
|
|
29
35
|
|
|
30
36
|
### Usage Patterns
|
|
31
37
|
|
|
@@ -45,7 +51,7 @@ These rules guide Claude Code when using Zeroheight documentation to ensure accu
|
|
|
45
51
|
|
|
46
52
|
### Terminology
|
|
47
53
|
|
|
48
|
-
- **Use SDS-approved terminology** from
|
|
54
|
+
- **Use SDS-approved terminology** from the documentation
|
|
49
55
|
- Follow documented naming conventions for UI elements
|
|
50
56
|
- Use consistent language patterns across components
|
|
51
57
|
- Respect documented content guidelines (e.g., button text patterns)
|
|
@@ -62,11 +68,13 @@ These rules guide Claude Code when using Zeroheight documentation to ensure accu
|
|
|
62
68
|
|
|
63
69
|
### Design Specifications
|
|
64
70
|
|
|
65
|
-
- **
|
|
71
|
+
- **Use design tokens rather than literal values.** `get_tailwind_tokens`
|
|
72
|
+
returns the full set, covering:
|
|
66
73
|
- Spacing measurements and relationships
|
|
67
74
|
- Typography specifications
|
|
68
75
|
- Color usage in different contexts
|
|
69
|
-
-
|
|
76
|
+
- Corners, borders, and drop shadows
|
|
77
|
+
- Never hard-code a value that a token already expresses
|
|
70
78
|
|
|
71
79
|
### Responsive Behavior
|
|
72
80
|
|
|
@@ -96,15 +104,17 @@ These rules guide Claude Code when using Zeroheight documentation to ensure accu
|
|
|
96
104
|
|
|
97
105
|
### Implementation Validation
|
|
98
106
|
|
|
99
|
-
- **Cross-reference implementation with
|
|
100
|
-
|
|
107
|
+
- **Cross-reference implementation with the documented code examples.** Every
|
|
108
|
+
documented variation of a component ships with the source of a working
|
|
109
|
+
example; prefer adapting one over writing from scratch
|
|
110
|
+
- Verify component behavior matches those examples
|
|
101
111
|
- Test edge cases mentioned in documentation
|
|
102
112
|
- Validate accessibility implementation against documented requirements
|
|
103
113
|
|
|
104
114
|
### Documentation Gaps
|
|
105
115
|
|
|
106
116
|
- **When documentation is unclear or missing**:
|
|
107
|
-
- Use
|
|
117
|
+
- Use the component's Storybook stories as a secondary reference
|
|
108
118
|
- Follow established SDS patterns from similar components
|
|
109
119
|
- Document any assumptions made for future clarification
|
|
110
120
|
- Prefer conservative/minimal implementations
|
|
@@ -113,36 +123,39 @@ These rules guide Claude Code when using Zeroheight documentation to ensure accu
|
|
|
113
123
|
|
|
114
124
|
### Documentation Workflow
|
|
115
125
|
|
|
116
|
-
1. **Always
|
|
126
|
+
1. **Always call `get_component_docs` first** before implementing any SDS component
|
|
117
127
|
2. **Read the full component documentation** including usage guidelines
|
|
118
|
-
3. **Review
|
|
128
|
+
3. **Review the code examples** provided in the documentation
|
|
119
129
|
4. **Check for any usage restrictions** or warnings
|
|
120
|
-
5. **Validate implementation** against documented examples
|
|
130
|
+
5. **Validate implementation** against the documented examples
|
|
121
131
|
|
|
122
132
|
### Staying Current
|
|
123
133
|
|
|
124
|
-
- **Documentation updates**:
|
|
125
|
-
|
|
126
|
-
- **
|
|
127
|
-
- **
|
|
134
|
+
- **Documentation updates**: the docs are generated from the installed version of
|
|
135
|
+
the library, so they describe the components you are actually building against
|
|
136
|
+
- **Version compatibility**: check documented version compatibility
|
|
137
|
+
- **Deprecation notices**: follow documented migration paths for deprecated patterns
|
|
138
|
+
- **New features**: use documented new features rather than workarounds
|
|
128
139
|
|
|
129
140
|
### Implementation Priority Order
|
|
130
141
|
|
|
131
|
-
1. **
|
|
132
|
-
2. **
|
|
133
|
-
3. **
|
|
142
|
+
1. **Component documentation** via `get_component_docs` (primary source of truth)
|
|
143
|
+
2. **Prop definitions** via `get_component_props` (authoritative types and defaults)
|
|
144
|
+
3. **Design tokens** via `get_tailwind_tokens` (spacing, color, typography)
|
|
134
145
|
4. **Existing codebase patterns** (established usage in project)
|
|
135
146
|
|
|
136
147
|
## Common Documentation Patterns
|
|
137
148
|
|
|
138
149
|
### Component Pages Structure
|
|
139
150
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
- **
|
|
143
|
-
- **
|
|
144
|
-
- **
|
|
145
|
-
- **
|
|
151
|
+
Sections appear in this order:
|
|
152
|
+
|
|
153
|
+
- **Source Code**: a link to the component's implementation
|
|
154
|
+
- **Import**: the import statement for the component and its sub-components
|
|
155
|
+
- **Code examples**: one runnable example per supported variation
|
|
156
|
+
- **SDS vs MUI**: how the SDS component differs from the MUI one it wraps
|
|
157
|
+
- **MUI Documentation**: a link to the underlying component's own docs
|
|
158
|
+
- **Props**: the SDS and MUI props required for implementation
|
|
146
159
|
|
|
147
160
|
### Information Hierarchy
|
|
148
161
|
|
|
@@ -155,7 +168,7 @@ These rules guide Claude Code when using Zeroheight documentation to ensure accu
|
|
|
155
168
|
|
|
156
169
|
### When Implementation Doesn't Match Design
|
|
157
170
|
|
|
158
|
-
1. **Check
|
|
171
|
+
1. **Check the documentation for variant coverage**
|
|
159
172
|
2. **Look for conditional usage patterns**
|
|
160
173
|
3. **Verify responsive behavior specifications**
|
|
161
174
|
4. **Check for theme-specific implementations**
|
|
@@ -95,7 +95,7 @@ import { Button, Icon } from "@czi-sds/components";
|
|
|
95
95
|
|
|
96
96
|
## Design System Integration
|
|
97
97
|
|
|
98
|
-
- Always check
|
|
98
|
+
- Always check the SDS component documentation for component usage guidelines
|
|
99
99
|
- Verify SDS component APIs before implementing
|
|
100
|
-
- Use
|
|
100
|
+
- Use the documented code examples and prop references before writing your own
|
|
101
101
|
- When in doubt, prefer SDS patterns over custom solutions
|