@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.
Files changed (164) hide show
  1. package/README.md +2 -1
  2. package/data/component-docs/Accordion.md +291 -0
  3. package/data/component-docs/Autocomplete.md +525 -0
  4. package/data/component-docs/Banner.md +231 -0
  5. package/data/component-docs/Button.md +224 -0
  6. package/data/component-docs/ButtonDropdown.md +256 -0
  7. package/data/component-docs/ButtonGroup.md +320 -0
  8. package/data/component-docs/ButtonToggle.md +397 -0
  9. package/data/component-docs/Callout.md +268 -0
  10. package/data/component-docs/CellBasic.md +122 -0
  11. package/data/component-docs/CellComponent.md +63 -0
  12. package/data/component-docs/CellHeader.md +128 -0
  13. package/data/component-docs/ComplexFilter.md +294 -0
  14. package/data/component-docs/ContentCard.md +406 -0
  15. package/data/component-docs/Dialog.md +651 -0
  16. package/data/component-docs/Dropdown.md +155 -0
  17. package/data/component-docs/DropdownMenu.md +949 -0
  18. package/data/component-docs/HeatmapChart.md +782 -0
  19. package/data/component-docs/Hero.md +363 -0
  20. package/data/component-docs/Icon.md +283 -0
  21. package/data/component-docs/InputCheckbox.md +205 -0
  22. package/data/component-docs/InputDropdown.md +482 -0
  23. package/data/component-docs/InputRadio.md +173 -0
  24. package/data/component-docs/InputSearch.md +81 -0
  25. package/data/component-docs/InputSlider.md +189 -0
  26. package/data/component-docs/InputText.md +110 -0
  27. package/data/component-docs/InputToggle.md +141 -0
  28. package/data/component-docs/IntentMessage.md +293 -0
  29. package/data/component-docs/Legend.md +442 -0
  30. package/data/component-docs/Link.md +23 -0
  31. package/data/component-docs/List.md +300 -0
  32. package/data/component-docs/LoadingIndicator.md +198 -0
  33. package/data/component-docs/Menu.md +298 -0
  34. package/data/component-docs/MenuItem.md +100 -0
  35. package/data/component-docs/NavigationFooter.md +165 -0
  36. package/data/component-docs/NavigationHeader.md +500 -0
  37. package/data/component-docs/NavigationJumpTo.md +414 -0
  38. package/data/component-docs/Notification.md +288 -0
  39. package/data/component-docs/Pagination.md +67 -0
  40. package/data/component-docs/Panel.md +636 -0
  41. package/data/component-docs/Popover.md +448 -0
  42. package/data/component-docs/PreComposedTable.md +2947 -0
  43. package/data/component-docs/SegmentedControl.md +396 -0
  44. package/data/component-docs/StackedBarChart.md +475 -0
  45. package/data/component-docs/Table.md +2000 -0
  46. package/data/component-docs/TableHeader.md +53 -0
  47. package/data/component-docs/TableRow.md +74 -0
  48. package/data/component-docs/Tabs.md +455 -0
  49. package/data/component-docs/Tag.md +647 -0
  50. package/data/component-docs/TagFilter.md +131 -0
  51. package/data/component-docs/Tooltip.md +561 -0
  52. package/data/component-docs/TooltipCondensed.md +203 -0
  53. package/data/component-docs/TooltipTable.md +145 -0
  54. package/data/component-docs/index.json +262 -0
  55. package/data/component-list.json +2 -5
  56. package/data/component-props/Accordion.json +31 -11
  57. package/data/component-props/Alert.json +3 -3
  58. package/data/component-props/Autocomplete.json +150 -15
  59. package/data/component-props/Banner.json +31 -17
  60. package/data/component-props/Button.json +45 -20
  61. package/data/component-props/ButtonDropdown.json +36 -17
  62. package/data/component-props/ButtonDropdownLegacy.json +11 -11
  63. package/data/component-props/ButtonGroup.json +32 -11
  64. package/data/component-props/ButtonIcon.json +10 -10
  65. package/data/component-props/ButtonLegacy.json +19 -19
  66. package/data/component-props/ButtonToggle.json +32 -19
  67. package/data/component-props/ButtonToggleLegacy.json +11 -11
  68. package/data/component-props/Callout.json +58 -17
  69. package/data/component-props/CellBasic.json +94 -41
  70. package/data/component-props/CellComponent.json +23 -7
  71. package/data/component-props/CellHeader.json +62 -19
  72. package/data/component-props/ComplexFilter.json +52 -21
  73. package/data/component-props/ContentCard.json +70 -47
  74. package/data/component-props/Dialog.json +47 -14
  75. package/data/component-props/Dropdown.json +68 -31
  76. package/data/component-props/DropdownMenu.json +128 -23
  77. package/data/component-props/HeatmapChart.json +88 -12
  78. package/data/component-props/Hero.json +80 -39
  79. package/data/component-props/Icon.json +20 -9
  80. package/data/component-props/InputCheckbox.json +36 -14
  81. package/data/component-props/InputDropdown.json +75 -27
  82. package/data/component-props/InputRadio.json +31 -13
  83. package/data/component-props/InputSearch.json +41 -18
  84. package/data/component-props/InputSlider.json +46 -19
  85. package/data/component-props/InputText.json +26 -19
  86. package/data/component-props/InputToggle.json +26 -9
  87. package/data/component-props/IntentMessage.json +38 -9
  88. package/data/component-props/Link.json +13 -7
  89. package/data/component-props/LoadingIndicator.json +11 -3
  90. package/data/component-props/MenuItem.json +38 -19
  91. package/data/component-props/MenuSelect.json +8 -8
  92. package/data/component-props/NavigationFooter.json +49 -19
  93. package/data/component-props/NavigationHeader.json +150 -37
  94. package/data/component-props/NavigationJumpTo.json +33 -7
  95. package/data/component-props/Notification.json +39 -21
  96. package/data/component-props/Pagination.json +39 -11
  97. package/data/component-props/Panel.json +62 -9
  98. package/data/component-props/Popover.json +80 -7
  99. package/data/component-props/PreComposedTable.json +99 -27
  100. package/data/component-props/SegmentedControl.json +42 -3
  101. package/data/component-props/StackedBarChart.json +116 -42
  102. package/data/component-props/TableRow.json +38 -19
  103. package/data/component-props/Tabs.json +66 -9
  104. package/data/component-props/Tag.json +34 -17
  105. package/data/component-props/TagFilter.json +10 -3
  106. package/data/component-props/Tooltip.json +49 -18
  107. package/data/component-props/TooltipCondensed.json +18 -9
  108. package/data/component-props/TooltipTable.json +17 -7
  109. package/data/resources/{zeroheight-rules.md → documentation-rules.md} +43 -30
  110. package/data/resources/figma-rules.md +2 -2
  111. package/dist/stdio.js +112 -208
  112. package/package.json +9 -5
  113. package/data/component-props/ButtonDropdownV2.json +0 -34
  114. package/data/component-props/ButtonNew.json +0 -47
  115. package/data/component-props/ButtonToggleV2.json +0 -44
  116. package/data/component-props/ButtonV2.json +0 -43
  117. package/data/zeroheight-cache.json +0 -10259
  118. package/data/zeroheight-exports/Accordion.md +0 -774
  119. package/data/zeroheight-exports/Banner.md +0 -691
  120. package/data/zeroheight-exports/Borders.md +0 -117
  121. package/data/zeroheight-exports/Buttons.md +0 -1854
  122. package/data/zeroheight-exports/Callout.md +0 -931
  123. package/data/zeroheight-exports/Colors.md +0 -1755
  124. package/data/zeroheight-exports/Content-Card.md +0 -309
  125. package/data/zeroheight-exports/Contributing-to-SDS.md +0 -98
  126. package/data/zeroheight-exports/Control-Inputs.md +0 -2818
  127. package/data/zeroheight-exports/Corners.md +0 -104
  128. package/data/zeroheight-exports/Cover-page.md +0 -3
  129. package/data/zeroheight-exports/Dialog.md +0 -1367
  130. package/data/zeroheight-exports/Downloads.md +0 -236
  131. package/data/zeroheight-exports/Drop-Shadows.md +0 -79
  132. package/data/zeroheight-exports/Dropdown-Input.md +0 -1776
  133. package/data/zeroheight-exports/Dropdown-Menus.md +0 -913
  134. package/data/zeroheight-exports/Element-Status-Tracker.md +0 -267
  135. package/data/zeroheight-exports/Field-Inputs.md +0 -1405
  136. package/data/zeroheight-exports/Filters.md +0 -1111
  137. package/data/zeroheight-exports/Getting-Started.md +0 -1157
  138. package/data/zeroheight-exports/Hero.md +0 -414
  139. package/data/zeroheight-exports/Icons.md +0 -2067
  140. package/data/zeroheight-exports/Intent.md +0 -86
  141. package/data/zeroheight-exports/Introduction-to-Bases.md +0 -35
  142. package/data/zeroheight-exports/Introduction-to-Cells.md +0 -35
  143. package/data/zeroheight-exports/Introduction-to-DNA.md +0 -35
  144. package/data/zeroheight-exports/Introduction-to-Genes.md +0 -35
  145. package/data/zeroheight-exports/Introduction.md +0 -115
  146. package/data/zeroheight-exports/Link.md +0 -432
  147. package/data/zeroheight-exports/Lists.md +0 -986
  148. package/data/zeroheight-exports/Loading-Indicator.md +0 -41
  149. package/data/zeroheight-exports/Navigation.md +0 -1190
  150. package/data/zeroheight-exports/Notification.md +0 -1038
  151. package/data/zeroheight-exports/Panel.md +0 -1030
  152. package/data/zeroheight-exports/README.md +0 -122
  153. package/data/zeroheight-exports/Responsive-Design.md +0 -330
  154. package/data/zeroheight-exports/Search-Input.md +0 -91
  155. package/data/zeroheight-exports/Search.md +0 -822
  156. package/data/zeroheight-exports/Segmented-Control.md +0 -609
  157. package/data/zeroheight-exports/Spacing.md +0 -297
  158. package/data/zeroheight-exports/Table.md +0 -5345
  159. package/data/zeroheight-exports/Tabs.md +0 -1324
  160. package/data/zeroheight-exports/Tags.md +0 -1545
  161. package/data/zeroheight-exports/Text-Link.md +0 -268
  162. package/data/zeroheight-exports/Theming.md +0 -362
  163. package/data/zeroheight-exports/Tooltips.md +0 -2015
  164. package/data/zeroheight-exports/Typography.md +0 -800
@@ -2,9 +2,9 @@
2
2
  "Alert": {
3
3
  "props": {
4
4
  "text": {
5
- "type": "any",
6
- "isRequired": false
5
+ "isRequired": true,
6
+ "type": "any"
7
7
  }
8
8
  }
9
9
  }
10
- }
10
+ }
@@ -2,33 +2,168 @@
2
2
  "Autocomplete": {
3
3
  "props": {
4
4
  "groupBy": {
5
- "type": "any",
6
- "isRequired": false
5
+ "description": "If provided, the options will be grouped under the returned string.\nThe groupBy value is also used as the text for group headings when `renderGroup` is not provided.\n@param option The Autocomplete option.\n@returns",
6
+ "isRequired": false,
7
+ "type": "(option: T) => string"
7
8
  },
8
9
  "intent": {
9
- "type": "any",
10
- "isRequired": false
10
+ "defaultValue": "default",
11
+ "description": "Validation styling on the search field. Single column only; the multi-column field does not take it.",
12
+ "isRequired": false,
13
+ "type": "InputSearchProps"
11
14
  },
12
15
  "keepSearchOnSelect": {
13
- "type": "any",
14
- "isRequired": false
16
+ "defaultValue": false,
17
+ "description": "For a multi-select, leaves the typed text in place after a selection instead of clearing it.",
18
+ "isRequired": false,
19
+ "type": "boolean"
15
20
  },
16
21
  "label": {
17
- "type": "any",
18
- "isRequired": false
22
+ "defaultValue": "Label Search (columns)",
23
+ "description": "The search field's label and placeholder.",
24
+ "isRequired": false,
25
+ "type": "string"
19
26
  },
20
27
  "multiple": {
21
- "type": "any",
22
- "isRequired": false
28
+ "defaultValue": false,
29
+ "description": "If `true`, `value` must be an array and the menu will support multiple selections.",
30
+ "isRequired": false,
31
+ "type": "boolean"
23
32
  },
24
33
  "onChange": {
25
- "type": "FormEventHandler<HTMLDivElement>",
26
- "isRequired": false
34
+ "description": "Fired on every selection change with the whole value. details.option is the one that just changed. Signature: function(event: SyntheticEvent, value: T | T[], reason: AutocompleteChangeReason, details?: AutocompleteChangeDetails<T>) => void",
35
+ "isRequired": false,
36
+ "type": "AutocompleteSingleColumnOnChange<T, Multiple, DisableClearable, FreeSolo> | AutocompleteMultiColumnOnChange<T, Multiple, DisableClearable, FreeSolo>"
27
37
  },
28
38
  "options": {
29
- "type": "any",
30
- "isRequired": false
39
+ "defaultValue": "- (required)",
40
+ "description": "The options, or an array of named columns each with their own options.",
41
+ "isRequired": true,
42
+ "type": "T[] | AutocompleteMultiColumnOption<T, Multiple, DisableClearable, FreeSolo>[]"
43
+ },
44
+ "value": {
45
+ "description": "The selection. An array when multiple, and a record keyed by column name when there is more than one column.",
46
+ "isRequired": false,
47
+ "type": "string | Exclusive<AutocompleteOptionBasic, AutocompleteOptionComponent> | Exclusive<AutocompleteOptionComponent, AutocompleteOptionBasic> | Record<string | number | symbol, AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>> | (T | AutocompleteFreeSoloValueMapping<FreeSolo>)[] | AutocompleteOptionBasic & { component?: undefined; } | AutocompleteOptionComponent & { details?: undefined; icon?: undefined; count?: undefined; sdsIconProps?: undefined; }"
48
+ },
49
+ "onInputChange": {
50
+ "description": "Callback fired when the input value changes.\n@param event The event source of the callback.\n@param value The new value of the text input.\n@param reason Can be: `\"input\"` (user input), `\"reset\"` (programmatic change), `\"clear\"`, `\"blur\"`, `\"selectOption\"`, `\"removeOption\"`",
51
+ "isRequired": false,
52
+ "type": "((event: SyntheticEvent"
53
+ },
54
+ "search": {
55
+ "defaultValue": false,
56
+ "description": "Shows the search field. Without it the input is hidden and disabled, and the list must be opened through open.",
57
+ "isRequired": false,
58
+ "type": "boolean"
59
+ },
60
+ "open": {
61
+ "description": "If `true`, the component is shown.",
62
+ "isRequired": false,
63
+ "type": "boolean"
64
+ },
65
+ "onClick": {
66
+ "description": "Fired when the component would like to open.",
67
+ "isRequired": false,
68
+ "type": "function"
69
+ },
70
+ "onClickAway": {
71
+ "description": "Fired when the component would like to close, including on Escape and on a click outside.",
72
+ "isRequired": false,
73
+ "type": "function"
74
+ },
75
+ "InputBaseProps": {
76
+ "description": "Props for the search field. This is the way in: SDS supplies renderInput itself.",
77
+ "isRequired": false,
78
+ "type": "InputSearchProps"
79
+ },
80
+ "renderInput": {
81
+ "defaultValue": "an SDS InputSearch",
82
+ "description": "(params: AutocompleteRenderInputParams) => ReactNode. Replaces the whole input, losing the search and clear buttons SDS puts there, so prefer InputBaseProps. On a multi-column Autocomplete it reaches the hidden per-column inputs rather than the trigger.",
83
+ "isRequired": false,
84
+ "type": "ReactNode"
85
+ },
86
+ "PopperBaseProps": {
87
+ "description": "Props for the popper holding the columns. Multi-column only; a single column uses MUI's own popper.",
88
+ "isRequired": false,
89
+ "type": "Partial<PopperProps>"
90
+ },
91
+ "PopperComponent": {
92
+ "defaultValue": "SDS styled Popper",
93
+ "description": "Replaces that popper outright. Multi-column only.",
94
+ "isRequired": false,
95
+ "type": "component"
96
+ },
97
+ "PopperPlacement": {
98
+ "defaultValue": "bottom-start",
99
+ "description": "Where the columns are placed. Multi-column only.",
100
+ "isRequired": false,
101
+ "type": "\"bottom-start\" | \"bottom-end\" | \"top-start\" | \"top-end\""
102
+ },
103
+ "ClickAwayListenerProps": {
104
+ "description": "Props for the MUI ClickAwayListener that closes the columns. Multi-column only.",
105
+ "isRequired": false,
106
+ "type": "Partial<ClickAwayListenerProps>"
107
+ },
108
+ "disableCloseOnSelect": {
109
+ "defaultValue": false,
110
+ "description": "If `true`, the popup won't close when a value is selected.",
111
+ "isRequired": false,
112
+ "type": "boolean"
113
+ },
114
+ "blurOnSelect": {
115
+ "defaultValue": false,
116
+ "description": "Control if the input should be blurred when an option is selected:\n\n- `false` the input is not blurred.\n- `true` the input is always blurred.\n- `touch` the input is blurred after a touch event.\n- `mouse` the input is blurred after a mouse event.",
117
+ "isRequired": false,
118
+ "type": "false | true | \"mouse\" | \"touch\""
119
+ },
120
+ "clearOnBlur": {
121
+ "defaultValue": "!props.freeSolo",
122
+ "description": "If `true`, the input's text is cleared on blur if no value is selected.\n\nSet it to `true` if you want to help the user enter a new value.\nSet it to `false` if you want to help the user resume their search.",
123
+ "isRequired": false,
124
+ "type": "boolean"
125
+ },
126
+ "getOptionLabel": {
127
+ "defaultValue": "(option) => option.label ?? option",
128
+ "description": "Used to determine the string value for a given option.\nIt's used to fill the input (and the list box options if `renderOption` is not provided).\n\nIf used in free solo mode, it must accept both the type of the options and a string.\n@param option\n@returns",
129
+ "isRequired": false,
130
+ "type": "(option: AutocompleteValueOrFreeSoloValueMapping<T, FreeSolo>) => string"
131
+ },
132
+ "isOptionEqualToValue": {
133
+ "defaultValue": "compares names",
134
+ "description": "Used to determine if the option represents the given value.\nUses strict equality by default.\n⚠️ Both arguments need to be handled, an option can only match with one value.\n@param option The option to test.\n@param value The value to test against.\n@returns",
135
+ "isRequired": false,
136
+ "type": "(option: T, value: AutocompleteValueOrFreeSoloValueMapping<T, FreeSolo>) => boolean"
137
+ },
138
+ "getOptionDisabled": {
139
+ "description": "Used to determine the disabled state for a given option.\n@param option The option to test.\n@template Value The option shape. Will be the same shape as an item of the options.\n@returns",
140
+ "isRequired": false,
141
+ "type": "(option: T) => boolean"
142
+ },
143
+ "renderOption": {
144
+ "defaultValue": "SDS MenuItem",
145
+ "description": "Render the option, use `getOptionLabel` by default.\n@param props The props to apply on the li element.\n@param option The option to render.\n@param state The state of each option.\n@param ownerState The state of the Autocomplete component.\n@returns",
146
+ "isRequired": false,
147
+ "type": "ReactNode"
148
+ },
149
+ "noOptionsText": {
150
+ "defaultValue": "No options",
151
+ "description": "Text to display when there are no options.\n\nFor localization purposes, you can use the provided [translations](https://mui.com/material-ui/guides/localization/).",
152
+ "isRequired": false,
153
+ "type": "ReactNode"
154
+ },
155
+ "loading": {
156
+ "defaultValue": false,
157
+ "description": "If `true`, the component is in a loading state.\nThis shows the `loadingText` in place of suggestions (only if there are no suggestions to show, for example `options` are empty).",
158
+ "isRequired": false,
159
+ "type": "boolean"
160
+ },
161
+ "disabled": {
162
+ "defaultValue": false,
163
+ "description": "If `true`, the component is disabled.",
164
+ "isRequired": false,
165
+ "type": "boolean"
31
166
  }
32
167
  }
33
168
  }
34
- }
169
+ }
@@ -1,34 +1,48 @@
1
1
  {
2
2
  "Banner": {
3
3
  "props": {
4
+ "children": {
5
+ "description": "Required. The content of the Banner, laid out beside the icon and centered in the space left by the close button.",
6
+ "isRequired": true,
7
+ "type": "ReactNode"
8
+ },
4
9
  "dismissed": {
5
- "type": "\"false\" | \"true\"",
6
- "isRequired": false
10
+ "description": "If true, the banner has been dismissed and renders nothing. Leave this unset to let the Banner keep track of its own dismissed state. Passing any value, false included, takes that over: the close button then only fires onClose, and the Banner closes when you set dismissed to true.",
11
+ "isRequired": false,
12
+ "type": "boolean"
7
13
  },
8
14
  "dismissible": {
9
- "type": "\"false\" | \"true\"",
10
- "isRequired": false
15
+ "defaultValue": true,
16
+ "description": "If true, the banner can be dismissed by the user. This is what controls whether the close button is rendered.",
17
+ "isRequired": false,
18
+ "type": "boolean"
11
19
  },
12
20
  "icon": {
13
- "type": "ReactElement",
14
- "isRequired": false
21
+ "description": "The name of an SDS icon, or a custom SVG element, shown in place of the icon the intent would pick. Without it, \"positive\" shows \"CheckCircle\", \"negative\" and \"notice\" show \"ExclamationMarkCircle\", and every other intent shows \"InfoCircle\".",
22
+ "isRequired": false,
23
+ "type": "ReactElement"
15
24
  },
16
25
  "intent": {
17
- "type": "\"accent\" | \"info\" | \"negative\" | \"notice\" | \"positive\"",
18
- "isRequired": false
26
+ "defaultValue": "info",
27
+ "description": "The intent color of the Banner component, which also selects the default icon.",
28
+ "isRequired": false,
29
+ "type": "\"info\" | \"accent\" | \"negative\" | \"notice\" | \"positive\""
30
+ },
31
+ "onClose": {
32
+ "description": "Callback fired when the user clicks the close button. Signature: function(event: React.MouseEvent) => void event The event source of the callback.",
33
+ "isRequired": false,
34
+ "type": "function"
19
35
  },
20
36
  "sdsIconProps": {
21
- "type": "IconProps<string | number | symbol>",
22
- "isRequired": false
37
+ "description": "Additional props to be passed to the icon component.",
38
+ "isRequired": false,
39
+ "type": "IconProps<string | number | symbol>"
23
40
  },
24
41
  "sdsType": {
25
- "type": "\"primary\" | \"secondary\"",
26
- "isRequired": true
27
- },
28
- "textChild": {
29
- "type": "any",
30
- "isRequired": false
42
+ "description": "Required. The primary variant fills the Banner with the intent's primary surface color and uses the on-fill text color. The secondary variant uses the intent's secondary surface color with the standard primary text color.",
43
+ "isRequired": true,
44
+ "type": "\"primary\" | \"secondary\""
31
45
  }
32
46
  }
33
47
  }
34
- }
48
+ }
@@ -2,46 +2,71 @@
2
2
  "Button": {
3
3
  "props": {
4
4
  "backgroundOnHover": {
5
- "type": "\"false\" | \"true\"",
6
- "isRequired": false
5
+ "defaultValue": true,
6
+ "description": "Only applies when sdsStyle is \"minimal\". When false, the button drops its padding and renders no background on hover or press, so it sits flush with surrounding text.",
7
+ "isRequired": false,
8
+ "type": "boolean"
7
9
  },
8
10
  "backgroundAppearance": {
9
- "type": "\"matchBackground\" | \"dark\"",
10
- "isRequired": false
11
+ "defaultValue": "matchBackground",
12
+ "description": "Tells the button which surface it sits on so it can pick colors with enough contrast. Set it to \"dark\" when the button is placed on a dark background in light mode.",
13
+ "isRequired": false,
14
+ "type": "\"matchBackground\" | \"dark\""
11
15
  },
12
16
  "children": {
13
- "type": "ReactNode",
17
+ "description": "The content of the component.",
14
18
  "isRequired": false,
15
- "description": "The content of the component."
19
+ "type": "ReactNode"
16
20
  },
17
21
  "endIcon": {
18
- "type": "ReactNode",
22
+ "description": "Element placed after the children.",
19
23
  "isRequired": false,
20
- "description": "Element placed after the children."
24
+ "type": "ReactNode"
21
25
  },
22
26
  "onClick": {
23
- "type": "function",
24
- "isRequired": false
27
+ "description": "Callback fired when the button is clicked.",
28
+ "isRequired": false,
29
+ "type": "function"
25
30
  },
26
31
  "size": {
27
- "type": "\"small\" | \"medium\" | \"large\"",
28
- "isRequired": false,
32
+ "defaultValue": "medium",
29
33
  "description": "The size of the component.\n`small` is equivalent to the dense button styling.",
30
- "defaultValue": "medium"
34
+ "isRequired": false,
35
+ "type": "\"small\" | \"large\" | \"medium\""
31
36
  },
32
37
  "sdsStyle": {
33
- "type": "\"outline\" | \"solid\" | \"minimal\"",
34
- "isRequired": false
38
+ "defaultValue": "solid",
39
+ "description": "Style of the button, in descending order of emphasis. Solid is filled, outline draws a 1px border over a transparent background, and minimal is text only.",
40
+ "isRequired": false,
41
+ "type": "\"outline\" | \"solid\" | \"minimal\""
35
42
  },
36
43
  "sdsType": {
37
- "type": "\"primary\" | \"secondary\" | \"destructive\"",
38
- "isRequired": false
44
+ "defaultValue": "primary",
45
+ "description": "Color scheme of the button within the chosen style. Primary uses the accent color, secondary is neutral, and destructive signals an irreversible action.",
46
+ "isRequired": false,
47
+ "type": "\"primary\" | \"secondary\" | \"destructive\""
39
48
  },
40
49
  "startIcon": {
41
- "type": "ReactNode",
50
+ "description": "Element placed before the children.",
51
+ "isRequired": false,
52
+ "type": "ReactNode"
53
+ },
54
+ "disabled": {
55
+ "defaultValue": false,
56
+ "description": "If `true`, the component is disabled.",
57
+ "isRequired": false,
58
+ "type": "boolean"
59
+ },
60
+ "href": {
61
+ "description": "The URL to link to when the button is clicked.\nIf defined, an `a` element will be used as the root node.",
62
+ "isRequired": false,
63
+ "type": "string"
64
+ },
65
+ "target": {
66
+ "description": "Where the link opens, for example \"_blank\". Only has an effect alongside href.",
42
67
  "isRequired": false,
43
- "description": "Element placed before the children."
68
+ "type": "string & {} | \"_self\" | \"_blank\" | \"_parent\" | \"_top\""
44
69
  }
45
70
  }
46
71
  }
47
- }
72
+ }
@@ -2,37 +2,56 @@
2
2
  "ButtonDropdown": {
3
3
  "props": {
4
4
  "backgroundAppearance": {
5
- "type": "any",
6
- "isRequired": false
5
+ "defaultValue": "matchBackground",
6
+ "description": "Tells the button which surface it sits on so it can pick colors with enough contrast. Set it to \"dark\" when the button is placed on a dark background in light mode.",
7
+ "isRequired": false,
8
+ "type": "\"matchBackground\" | \"dark\""
7
9
  },
8
10
  "backgroundOnHover": {
9
- "type": "any",
10
- "isRequired": false
11
+ "defaultValue": true,
12
+ "description": "Only applies when sdsStyle is \"minimal\". When false, the button drops its padding and renders no background on hover or press, so it sits flush with surrounding text.",
13
+ "isRequired": false,
14
+ "type": "boolean"
11
15
  },
12
16
  "children": {
13
- "type": "any",
14
- "isRequired": false
17
+ "description": "The button label. The trailing chevron is only rendered when a label is present.",
18
+ "isRequired": false,
19
+ "type": "ReactNode"
15
20
  },
16
21
  "disabled": {
17
- "type": "any",
18
- "isRequired": false
22
+ "defaultValue": false,
23
+ "description": "Disables the button when set to true.",
24
+ "isRequired": false,
25
+ "type": "boolean"
19
26
  },
20
27
  "startIcon": {
21
- "type": "any",
22
- "isRequired": false
28
+ "description": "An optional icon placed before the label. Pass the SDS Icon component, for example <Icon sdsIcon=\"Download\" sdsSize=\"s\" />.",
29
+ "isRequired": false,
30
+ "type": "ReactNode"
23
31
  },
24
32
  "size": {
25
- "type": "any",
26
- "isRequired": false
33
+ "defaultValue": "large",
34
+ "description": "Size of the button. Also sets the size of the trailing chevron.",
35
+ "isRequired": false,
36
+ "type": "\"small\" | \"medium\" | \"large\""
27
37
  },
28
38
  "sdsStyle": {
29
- "type": "any",
30
- "isRequired": false
39
+ "defaultValue": "solid",
40
+ "description": "Style of the button. Same values as Button.",
41
+ "isRequired": true,
42
+ "type": "\"solid\" | \"outline\" | \"minimal\""
31
43
  },
32
44
  "sdsType": {
33
- "type": "any",
34
- "isRequired": false
45
+ "defaultValue": "primary",
46
+ "description": "Color scheme of the button. Unlike Button, \"destructive\" is not supported.",
47
+ "isRequired": true,
48
+ "type": "\"primary\" | \"secondary\""
49
+ },
50
+ "onClick": {
51
+ "description": "Callback fired when the button is clicked. Typically used to open the associated menu.",
52
+ "isRequired": false,
53
+ "type": "(event: React.MouseEvent) => void"
35
54
  }
36
55
  }
37
56
  }
38
- }
57
+ }
@@ -2,25 +2,25 @@
2
2
  "ButtonDropdownLegacy": {
3
3
  "props": {
4
4
  "disabled": {
5
- "type": "any",
6
- "isRequired": false
5
+ "isRequired": false,
6
+ "type": "any"
7
7
  },
8
8
  "icon": {
9
- "type": "any",
10
- "isRequired": false
9
+ "isRequired": false,
10
+ "type": "any"
11
11
  },
12
12
  "sdsSize": {
13
- "type": "any",
14
- "isRequired": false
13
+ "isRequired": false,
14
+ "type": "\"small\" | \"medium\" | \"large\""
15
15
  },
16
16
  "sdsStyle": {
17
- "type": "any",
18
- "isRequired": false
17
+ "isRequired": true,
18
+ "type": "\"rounded\" | \"square\" | \"icon\""
19
19
  },
20
20
  "sdsType": {
21
- "type": "any",
22
- "isRequired": false
21
+ "isRequired": true,
22
+ "type": "\"primary\" | \"secondary\" | \"tertiary\" | \"destructive\""
23
23
  }
24
24
  }
25
25
  }
26
- }
26
+ }
@@ -2,25 +2,46 @@
2
2
  "ButtonGroup": {
3
3
  "props": {
4
4
  "backgroundAppearance": {
5
- "type": "any",
6
- "isRequired": false
5
+ "defaultValue": "matchBackground",
6
+ "description": "Tells the group which surface it sits on so it can pick colors with enough\ncontrast.",
7
+ "isRequired": false,
8
+ "type": "\"matchBackground\" | \"dark\""
7
9
  },
8
10
  "disabled": {
9
- "type": "any",
10
- "isRequired": false
11
+ "defaultValue": false,
12
+ "description": "If `true`, the component is disabled.",
13
+ "isRequired": false,
14
+ "type": "boolean"
11
15
  },
12
16
  "orientation": {
13
- "type": "any",
14
- "isRequired": false
17
+ "defaultValue": "horizontal",
18
+ "description": "The component orientation (layout flow direction).",
19
+ "isRequired": false,
20
+ "type": "\"horizontal\" | \"vertical\""
15
21
  },
16
22
  "size": {
17
- "type": "any",
18
- "isRequired": false
23
+ "defaultValue": "large",
24
+ "description": "Size of the group. It is injected into each Button and ButtonToggle child,\nso setting size on an individual button has no effect.",
25
+ "isRequired": false,
26
+ "type": "\"small\" | \"large\" | \"medium\""
19
27
  },
20
28
  "sdsType": {
21
- "type": "any",
22
- "isRequired": false
29
+ "defaultValue": "primary",
30
+ "description": "Color scheme applied to every button in the group.",
31
+ "isRequired": false,
32
+ "type": "\"primary\" | \"secondary\""
33
+ },
34
+ "sdsStyle": {
35
+ "defaultValue": "outline",
36
+ "description": "Style of the button group. Outline is the only value.",
37
+ "isRequired": false,
38
+ "type": "\"outline\""
39
+ },
40
+ "children": {
41
+ "description": "The content of the component.",
42
+ "isRequired": false,
43
+ "type": "ReactNode"
23
44
  }
24
45
  }
25
46
  }
26
- }
47
+ }
@@ -2,23 +2,23 @@
2
2
  "ButtonIcon": {
3
3
  "props": {
4
4
  "disabled": {
5
- "type": "\"false\" | \"true\"",
6
- "isRequired": false,
5
+ "defaultValue": false,
7
6
  "description": "If `true`, the component is disabled.",
8
- "defaultValue": false
7
+ "isRequired": false,
8
+ "type": "boolean"
9
9
  },
10
10
  "icon": {
11
- "type": "ReactElement",
12
- "isRequired": true
11
+ "isRequired": true,
12
+ "type": "ReactElement"
13
13
  },
14
14
  "sdsSize": {
15
- "type": "\"small\" | \"medium\" | \"large\"",
16
- "isRequired": false
15
+ "isRequired": false,
16
+ "type": "\"small\" | \"large\" | \"medium\""
17
17
  },
18
18
  "sdsType": {
19
- "type": "\"primary\" | \"secondary\" | \"tertiary\"",
20
- "isRequired": false
19
+ "isRequired": false,
20
+ "type": "\"primary\" | \"secondary\" | \"tertiary\""
21
21
  }
22
22
  }
23
23
  }
24
- }
24
+ }
@@ -2,43 +2,43 @@
2
2
  "ButtonLegacy": {
3
3
  "props": {
4
4
  "endIcon": {
5
- "type": "ReactNode",
5
+ "description": "Element placed after the children.",
6
6
  "isRequired": false,
7
- "description": "Element placed after the children."
7
+ "type": "ReactNode"
8
8
  },
9
9
  "icon": {
10
- "type": "ReactElement",
11
- "isRequired": true
10
+ "isRequired": true,
11
+ "type": "ReactElement"
12
12
  },
13
13
  "isAllCaps": {
14
- "type": "\"false\" | \"true\"",
15
- "isRequired": false
14
+ "isRequired": false,
15
+ "type": "boolean"
16
16
  },
17
17
  "onClick": {
18
- "type": "function",
19
- "isRequired": false
18
+ "isRequired": false,
19
+ "type": "function"
20
20
  },
21
21
  "sdsSize": {
22
- "type": "\"small\" | \"medium\" | \"large\"",
23
- "isRequired": false
22
+ "isRequired": false,
23
+ "type": "\"small\" | \"large\" | \"medium\""
24
24
  },
25
25
  "sdsStyle": {
26
- "type": "\"icon\" | \"minimal\" | \"rounded\" | \"square\"",
27
- "isRequired": true
26
+ "isRequired": true,
27
+ "type": "\"square\" | \"rounded\" | \"icon\" | \"minimal\""
28
28
  },
29
29
  "sdsType": {
30
- "type": "\"primary\" | \"secondary\" | \"tertiary\" | \"destructive\"",
31
- "isRequired": false
30
+ "isRequired": false,
31
+ "type": "\"primary\" | \"secondary\" | \"destructive\" | \"tertiary\""
32
32
  },
33
33
  "startIcon": {
34
- "type": "ReactNode",
34
+ "description": "Element placed before the children.",
35
35
  "isRequired": false,
36
- "description": "Element placed before the children."
36
+ "type": "ReactNode"
37
37
  },
38
38
  "text": {
39
- "type": "any",
40
- "isRequired": false
39
+ "isRequired": false,
40
+ "type": "any"
41
41
  }
42
42
  }
43
43
  }
44
- }
44
+ }