@sanity/ui 4.0.0-static.9 → 5.0.0-alpha.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.
Files changed (808) hide show
  1. package/README.md +201 -17
  2. package/bin/sanity-ui.js +14 -0
  3. package/dist/_chunks-es/LazyRefractor.js +20 -0
  4. package/dist/_chunks-es/LazyRefractor.js.map +1 -0
  5. package/dist/cli/checks.js +148 -0
  6. package/dist/cli/config.js +23 -0
  7. package/dist/cli/detect.js +181 -0
  8. package/dist/cli/doctor.js +49 -0
  9. package/dist/cli/index.js +69 -0
  10. package/dist/cli/init.js +189 -0
  11. package/dist/cli/install.js +78 -0
  12. package/dist/cli/log.js +66 -0
  13. package/dist/cli/selfPackage.js +11 -0
  14. package/dist/cli/styles.js +185 -0
  15. package/dist/cli/test-utils.js +8 -0
  16. package/dist/cli/tsconfig.js +236 -0
  17. package/dist/cli/types.js +1 -0
  18. package/dist/cli/versions.js +45 -0
  19. package/dist/index.d.ts +744 -2272
  20. package/dist/index.js +1743 -4395
  21. package/dist/index.js.map +1 -1
  22. package/dist/styles.css +1 -0
  23. package/package.json +66 -206
  24. package/src/cli/checks.test.ts +38 -0
  25. package/src/cli/checks.ts +200 -0
  26. package/src/cli/config.ts +44 -0
  27. package/src/cli/detect.test.ts +191 -0
  28. package/src/cli/detect.ts +205 -0
  29. package/src/cli/doctor.test.ts +52 -0
  30. package/src/cli/doctor.ts +65 -0
  31. package/src/cli/index.ts +77 -0
  32. package/src/cli/init.ts +225 -0
  33. package/src/cli/install.test.ts +52 -0
  34. package/src/cli/install.ts +107 -0
  35. package/src/cli/log.ts +79 -0
  36. package/src/cli/selfPackage.ts +14 -0
  37. package/src/cli/styles.test.ts +130 -0
  38. package/src/cli/styles.ts +205 -0
  39. package/src/cli/test-utils.ts +10 -0
  40. package/src/cli/tsconfig.test.ts +174 -0
  41. package/src/cli/tsconfig.ts +282 -0
  42. package/src/cli/types.ts +77 -0
  43. package/src/cli/versions.test.ts +35 -0
  44. package/src/cli/versions.ts +41 -0
  45. package/src/components/box/Box.tsx +25 -0
  46. package/src/components/box/box.css +4 -0
  47. package/src/components/box/box.props.ts +24 -0
  48. package/src/components/button/Button.tsx +78 -0
  49. package/src/components/button/button.css +72 -0
  50. package/src/components/button/button.props.ts +104 -0
  51. package/src/components/card/Card.tsx +31 -0
  52. package/src/components/card/card.css +4 -0
  53. package/src/components/card/card.props.ts +54 -0
  54. package/src/components/checkbox/Checkbox.tsx +63 -0
  55. package/src/components/checkbox/checkbox.css +100 -0
  56. package/src/components/checkbox/checkbox.props.ts +25 -0
  57. package/src/components/code/Code.tsx +38 -0
  58. package/src/components/code/LazyRefractor.tsx +9 -0
  59. package/src/components/code/code.css +40 -0
  60. package/src/components/code/code.props.ts +37 -0
  61. package/src/components/container/Container.tsx +30 -0
  62. package/src/components/container/container.css +4 -0
  63. package/src/components/container/container.props.ts +24 -0
  64. package/src/components/divider/Divider.tsx +23 -0
  65. package/src/components/divider/divider.props.ts +9 -0
  66. package/src/components/eyebrow/Eyebrow.tsx +54 -0
  67. package/src/components/eyebrow/eyebrow.css +11 -0
  68. package/src/components/eyebrow/eyebrow.props.ts +24 -0
  69. package/src/components/flex/Flex.tsx +25 -0
  70. package/src/components/flex/flex.css +4 -0
  71. package/src/components/flex/flex.props.ts +29 -0
  72. package/src/components/grid/Grid.tsx +25 -0
  73. package/src/components/grid/grid.css +4 -0
  74. package/src/components/grid/grid.props.ts +29 -0
  75. package/src/components/h-stack/HStack.tsx +34 -0
  76. package/src/components/h-stack/hStack.props.ts +15 -0
  77. package/src/components/heading/Heading.tsx +54 -0
  78. package/src/components/heading/heading.css +9 -0
  79. package/src/components/heading/heading.props.ts +25 -0
  80. package/src/components/icon/Icon.tsx +24 -0
  81. package/src/components/icon/icon.css +17 -0
  82. package/src/components/icon/icon.props.ts +31 -0
  83. package/src/components/icon-button/IconButton.tsx +32 -0
  84. package/src/components/icon-button/iconButton.props.ts +26 -0
  85. package/src/components/index.css +25 -0
  86. package/src/components/indicator/Indicator.tsx +42 -0
  87. package/src/components/indicator/indicator.css +4 -0
  88. package/src/components/indicator/indicator.props.ts +20 -0
  89. package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
  90. package/src/components/indicator-stack/indicator-stack.css +7 -0
  91. package/src/components/indicator-stack/indicatorStack.props.ts +13 -0
  92. package/src/components/inline/Inline.tsx +38 -0
  93. package/src/components/inline/inline.css +4 -0
  94. package/src/components/inline/inline.props.ts +96 -0
  95. package/src/components/label/Label.tsx +34 -0
  96. package/src/components/label/label.css +3 -0
  97. package/src/components/label/label.props.ts +19 -0
  98. package/src/components/link/Link.tsx +29 -0
  99. package/src/components/link/link.css +12 -0
  100. package/src/components/link/link.props.ts +23 -0
  101. package/src/components/list/List.tsx +167 -0
  102. package/src/components/list/list.css +25 -0
  103. package/src/components/list/list.props.ts +112 -0
  104. package/src/components/press-area/PressArea.tsx +29 -0
  105. package/src/components/press-area/press-area.css +22 -0
  106. package/src/components/press-area/pressArea.props.ts +14 -0
  107. package/src/components/radio/Radio.tsx +48 -0
  108. package/src/components/radio/radio.css +97 -0
  109. package/src/components/radio/radio.props.ts +20 -0
  110. package/src/components/skip-to-content/SkipToContent.tsx +35 -0
  111. package/src/components/skip-to-content/skip-to-content.css +9 -0
  112. package/src/components/skip-to-content/skipToContent.props.ts +19 -0
  113. package/src/components/spinner/Spinner.tsx +28 -0
  114. package/src/components/spinner/spinner.css +10 -0
  115. package/src/components/spinner/spinner.props.ts +16 -0
  116. package/src/components/switch/Switch.tsx +48 -0
  117. package/src/components/switch/switch.css +119 -0
  118. package/src/components/switch/switch.props.ts +20 -0
  119. package/src/components/text/Text.tsx +53 -0
  120. package/src/components/text/text.css +9 -0
  121. package/src/components/text/text.props.ts +24 -0
  122. package/src/components/tooltip/Tooltip.tsx +93 -0
  123. package/src/components/tooltip/tooltip.css +52 -0
  124. package/src/components/tooltip/tooltip.props.ts +20 -0
  125. package/src/components/tooltip-group/TooltipGroup.tsx +67 -0
  126. package/src/components/tooltip-group/tooltipGroup.props.ts +13 -0
  127. package/src/components/v-stack/VStack.tsx +32 -0
  128. package/src/components/v-stack/vStack.props.ts +15 -0
  129. package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
  130. package/src/components/visually-hidden/visually-hidden.css +9 -0
  131. package/src/components/visually-hidden/visuallyHidden.props.ts +19 -0
  132. package/src/css/classes/dynamic/flex-child.css +5 -0
  133. package/src/css/classes/dynamic/grid-child.css +8 -0
  134. package/src/css/classes/dynamic/grid-parent.css +6 -0
  135. package/src/css/classes/dynamic/height.css +5 -0
  136. package/src/css/classes/dynamic/index.css +7 -0
  137. package/src/css/classes/dynamic/line-clamp.css +5 -0
  138. package/src/css/classes/dynamic/readme.md +3 -0
  139. package/src/css/classes/dynamic/width.css +7 -0
  140. package/src/css/classes/dynamic/z-index.css +3 -0
  141. package/src/css/classes/generic/display.css +10 -0
  142. package/src/css/classes/generic/flex.css +24 -0
  143. package/src/css/classes/generic/grid.css +7 -0
  144. package/src/css/classes/generic/index.css +7 -0
  145. package/src/css/classes/generic/overflow.css +19 -0
  146. package/src/css/classes/generic/placement.css +171 -0
  147. package/src/css/classes/generic/position.css +7 -0
  148. package/src/css/classes/generic/readme.md +3 -0
  149. package/src/css/classes/generic/text-align.css +5 -0
  150. package/src/css/classes/index.css +4 -0
  151. package/src/css/classes/local/border.css +20 -0
  152. package/src/css/classes/local/index.css +4 -0
  153. package/src/css/classes/local/readme.md +3 -0
  154. package/src/css/classes/local/text-overflow.css +5 -0
  155. package/src/css/classes/local/text-trim.css +45 -0
  156. package/src/css/classes/local/tone.css +75 -0
  157. package/src/css/classes/system/color.css +223 -0
  158. package/src/css/classes/system/container.css +8 -0
  159. package/src/css/classes/system/font-family.css +2 -0
  160. package/src/css/classes/system/font-weight.css +4 -0
  161. package/src/css/classes/system/gap.css +37 -0
  162. package/src/css/classes/system/index.css +10 -0
  163. package/src/css/classes/system/inset.css +56 -0
  164. package/src/css/classes/system/margin.css +148 -0
  165. package/src/css/classes/system/padding.css +78 -0
  166. package/src/css/classes/system/radius.css +10 -0
  167. package/src/css/classes/system/readme.md +3 -0
  168. package/src/css/classes/system/shadow.css +6 -0
  169. package/src/css/classes/system/typography.css +31 -0
  170. package/src/css/global/font-face.css +20 -0
  171. package/src/css/global/index.css +2 -0
  172. package/src/css/global/reset.css +74 -0
  173. package/src/css/tokens/index.css +3 -0
  174. package/src/css/tokens/opacity.css +6 -0
  175. package/src/css/tokens/semantic.css +21 -0
  176. package/src/css/tokens/surface.css +27 -0
  177. package/src/index.css +18 -0
  178. package/src/index.ts +60 -0
  179. package/src/props/border.ts +51 -0
  180. package/src/props/flexChild.ts +29 -0
  181. package/src/props/flexParent.ts +47 -0
  182. package/src/props/gap.ts +31 -0
  183. package/src/props/gridChild.ts +50 -0
  184. package/src/props/gridParent.ts +45 -0
  185. package/src/props/height.ts +29 -0
  186. package/src/props/layout.ts +44 -0
  187. package/src/props/margin.ts +59 -0
  188. package/src/props/overflow.ts +30 -0
  189. package/src/props/padding.ts +59 -0
  190. package/src/props/placement.ts +16 -0
  191. package/src/props/position.ts +52 -0
  192. package/src/props/shadow.ts +15 -0
  193. package/src/props/tone.ts +15 -0
  194. package/src/props/typography.ts +62 -0
  195. package/src/props/width.ts +29 -0
  196. package/src/props/zIndex.ts +15 -0
  197. package/src/styles.css.d.ts +1 -0
  198. package/src/styles.css.node.js +2 -0
  199. package/src/styles.css.test.ts +24 -0
  200. package/src/types/Button.ts +8 -0
  201. package/src/types/Code.ts +6 -0
  202. package/src/types/Container.ts +3 -0
  203. package/src/types/Density.ts +3 -0
  204. package/src/types/Display.ts +11 -0
  205. package/src/types/Eyebrow.ts +3 -0
  206. package/src/types/Flex.ts +22 -0
  207. package/src/types/FontWeight.ts +3 -0
  208. package/src/types/Grid.ts +3 -0
  209. package/src/types/Heading.ts +6 -0
  210. package/src/types/Icon.ts +3 -0
  211. package/src/types/Interactive.ts +8 -0
  212. package/src/types/List.ts +2 -0
  213. package/src/types/Overflow.ts +3 -0
  214. package/src/types/Placement.ts +16 -0
  215. package/src/types/Position.ts +3 -0
  216. package/src/types/PropDef.ts +73 -0
  217. package/src/types/Radius.ts +3 -0
  218. package/src/types/Responsive.ts +10 -0
  219. package/src/types/Shadow.ts +3 -0
  220. package/src/types/Space.ts +15 -0
  221. package/src/types/Text.ts +3 -0
  222. package/src/types/TextAlign.ts +3 -0
  223. package/src/types/Tone.ts +3 -0
  224. package/src/utils/getProps.test.ts +156 -0
  225. package/src/utils/getProps.ts +156 -0
  226. package/src/utils/suffixClassName.ts +5 -0
  227. package/src/version.ts +3 -0
  228. package/LICENSE +0 -21
  229. package/dist/_chunks-cjs/refractor.cjs +0 -22
  230. package/dist/_chunks-cjs/refractor.cjs.map +0 -1
  231. package/dist/_chunks-es/refractor.js +0 -25
  232. package/dist/_chunks-es/refractor.js.map +0 -1
  233. package/dist/css/index.cjs +0 -966
  234. package/dist/css/index.cjs.map +0 -1
  235. package/dist/css/index.css +0 -23387
  236. package/dist/css/index.css.map +0 -1
  237. package/dist/css/index.d.cts +0 -1394
  238. package/dist/css/index.d.ts +0 -1394
  239. package/dist/css/index.js +0 -967
  240. package/dist/css/index.js.map +0 -1
  241. package/dist/index.cjs +0 -4515
  242. package/dist/index.cjs.map +0 -1
  243. package/dist/index.d.cts +0 -2521
  244. package/dist/theme.cjs +0 -870
  245. package/dist/theme.cjs.map +0 -1
  246. package/dist/theme.d.cts +0 -499
  247. package/dist/theme.d.ts +0 -499
  248. package/dist/theme.js +0 -870
  249. package/dist/theme.js.map +0 -1
  250. package/exports/css.ts +0 -1
  251. package/exports/index.ts +0 -1
  252. package/exports/theme.ts +0 -1
  253. package/src/core/Root.tsx +0 -88
  254. package/src/core/RootProvider.tsx +0 -40
  255. package/src/core/__workshop__/boundary.tsx +0 -28
  256. package/src/core/__workshop__/index.ts +0 -16
  257. package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
  258. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
  259. package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -91
  260. package/src/core/components/autocomplete/__workshop__/example.tsx +0 -80
  261. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
  262. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -292
  263. package/src/core/components/autocomplete/__workshop__/index.ts +0 -41
  264. package/src/core/components/autocomplete/__workshop__/mock/apiStore.ts +0 -49
  265. package/src/core/components/autocomplete/__workshop__/mock/countries.ts +0 -245
  266. package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
  267. package/src/core/components/autocomplete/autocomplete.tsx +0 -690
  268. package/src/core/components/autocomplete/autocompleteOption.tsx +0 -45
  269. package/src/core/components/autocomplete/autocompleteReducer.ts +0 -47
  270. package/src/core/components/autocomplete/constants.ts +0 -28
  271. package/src/core/components/autocomplete/types.ts +0 -103
  272. package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -61
  273. package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -16
  274. package/src/core/components/breadcrumbs/breadcrumbs.tsx +0 -131
  275. package/src/core/components/dialog/__workshop__/activate.tsx +0 -141
  276. package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
  277. package/src/core/components/dialog/__workshop__/index.ts +0 -21
  278. package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
  279. package/src/core/components/dialog/__workshop__/nested.tsx +0 -71
  280. package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -51
  281. package/src/core/components/dialog/__workshop__/panes.tsx +0 -89
  282. package/src/core/components/dialog/__workshop__/position.tsx +0 -30
  283. package/src/core/components/dialog/__workshop__/props.tsx +0 -77
  284. package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
  285. package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
  286. package/src/core/components/dialog/dialog.tsx +0 -232
  287. package/src/core/components/dialog/dialogCard.tsx +0 -233
  288. package/src/core/components/dialog/dialogContext.ts +0 -21
  289. package/src/core/components/dialog/dialogProvider.tsx +0 -34
  290. package/src/core/components/dialog/isTargetWithinScope.ts +0 -14
  291. package/src/core/components/dialog/types.ts +0 -2
  292. package/src/core/components/dialog/useDialog.ts +0 -11
  293. package/src/core/components/hotkeys/__workshop__/index.ts +0 -16
  294. package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
  295. package/src/core/components/hotkeys/hotkeys.tsx +0 -60
  296. package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
  297. package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -57
  298. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -47
  299. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -133
  300. package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
  301. package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -35
  302. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
  303. package/src/core/components/menu/__workshop__/groups.tsx +0 -156
  304. package/src/core/components/menu/__workshop__/index.ts +0 -91
  305. package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
  306. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -65
  307. package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
  308. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -50
  309. package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
  310. package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -42
  311. package/src/core/components/menu/__workshop__/tones.tsx +0 -25
  312. package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
  313. package/src/core/components/menu/helpers.ts +0 -82
  314. package/src/core/components/menu/menu.test.tsx +0 -129
  315. package/src/core/components/menu/menu.tsx +0 -179
  316. package/src/core/components/menu/menuButton.tsx +0 -225
  317. package/src/core/components/menu/menuContext.ts +0 -19
  318. package/src/core/components/menu/menuDivider.tsx +0 -32
  319. package/src/core/components/menu/menuGroup.tsx +0 -233
  320. package/src/core/components/menu/menuItem.tsx +0 -184
  321. package/src/core/components/menu/useMenu.ts +0 -21
  322. package/src/core/components/menu/useMenuController.ts +0 -241
  323. package/src/core/components/tab/__workshop__/example.tsx +0 -79
  324. package/src/core/components/tab/__workshop__/index.ts +0 -16
  325. package/src/core/components/tab/tab.tsx +0 -109
  326. package/src/core/components/tab/tabList.tsx +0 -90
  327. package/src/core/components/tab/tabPanel.tsx +0 -47
  328. package/src/core/components/toast/__workshop__/hook.tsx +0 -71
  329. package/src/core/components/toast/__workshop__/index.ts +0 -21
  330. package/src/core/components/toast/__workshop__/toast.tsx +0 -26
  331. package/src/core/components/toast/toast.test.tsx +0 -103
  332. package/src/core/components/toast/toast.tsx +0 -191
  333. package/src/core/components/toast/toastContext.ts +0 -7
  334. package/src/core/components/toast/toastLayer.tsx +0 -54
  335. package/src/core/components/toast/toastProvider.tsx +0 -112
  336. package/src/core/components/toast/toastState.ts +0 -6
  337. package/src/core/components/toast/types.ts +0 -24
  338. package/src/core/components/toast/useToast.ts +0 -23
  339. package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
  340. package/src/core/components/tree/__workshop__/basic.tsx +0 -105
  341. package/src/core/components/tree/__workshop__/index.ts +0 -23
  342. package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
  343. package/src/core/components/tree/helpers.ts +0 -105
  344. package/src/core/components/tree/tree.tsx +0 -248
  345. package/src/core/components/tree/treeContext.ts +0 -10
  346. package/src/core/components/tree/treeGroup.tsx +0 -46
  347. package/src/core/components/tree/treeItem.tsx +0 -237
  348. package/src/core/components/tree/types.ts +0 -24
  349. package/src/core/components/tree/useTree.ts +0 -17
  350. package/src/core/components/virtualList/__workshop__/changingProps.tsx +0 -36
  351. package/src/core/components/virtualList/__workshop__/elementScroll.tsx +0 -24
  352. package/src/core/components/virtualList/__workshop__/index.ts +0 -31
  353. package/src/core/components/virtualList/__workshop__/infiniteList.tsx +0 -48
  354. package/src/core/components/virtualList/__workshop__/windowScrolll.tsx +0 -22
  355. package/src/core/components/virtualList/virtualList.tsx +0 -209
  356. package/src/core/constants.ts +0 -67
  357. package/src/core/helpers/animation.ts +0 -27
  358. package/src/core/helpers/element.ts +0 -55
  359. package/src/core/helpers/focus.ts +0 -92
  360. package/src/core/helpers/props.ts +0 -28
  361. package/src/core/helpers/scroll.ts +0 -15
  362. package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -114
  363. package/src/core/hooks/useClickOutsideEvent.ts +0 -67
  364. package/src/core/hooks/useCustomValidity.ts +0 -13
  365. package/src/core/hooks/useDelayed.test.ts +0 -67
  366. package/src/core/hooks/useDelayedState.ts +0 -28
  367. package/src/core/hooks/useElementSize.ts +0 -19
  368. package/src/core/hooks/useGlobalKeyDown.ts +0 -17
  369. package/src/core/hooks/useMatchMedia.ts +0 -28
  370. package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -16
  371. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
  372. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -21
  373. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +0 -107
  374. package/src/core/hooks/useMounted.ts +0 -15
  375. package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -56
  376. package/src/core/hooks/usePrefersDark.test.tsx +0 -20
  377. package/src/core/hooks/usePrefersDark.ts +0 -16
  378. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
  379. package/src/core/hooks/usePrefersReducedMotion.test.tsx +0 -20
  380. package/src/core/hooks/usePrefersReducedMotion.ts +0 -16
  381. package/src/core/hooks/useResponsiveProp.ts +0 -28
  382. package/src/core/index.ts +0 -115
  383. package/src/core/lib/createGlobalScopedContext.ts +0 -37
  384. package/src/core/lib/globalScope.ts +0 -19
  385. package/src/core/lib/isArray.ts +0 -3
  386. package/src/core/lib/isRecord.ts +0 -3
  387. package/src/core/middleware/origin.ts +0 -47
  388. package/src/core/observers/elementSize.ts +0 -116
  389. package/src/core/observers/resize.ts +0 -9
  390. package/src/core/primitives/arrow/arrow.tsx +0 -74
  391. package/src/core/primitives/arrow/cmds.ts +0 -91
  392. package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
  393. package/src/core/primitives/avatar/__workshop__/index.ts +0 -31
  394. package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
  395. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -55
  396. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
  397. package/src/core/primitives/avatar/avatar.tsx +0 -147
  398. package/src/core/primitives/avatar/avatarCounter.tsx +0 -69
  399. package/src/core/primitives/avatar/avatarStack.tsx +0 -79
  400. package/src/core/primitives/avatar/types.ts +0 -2
  401. package/src/core/primitives/badge/__workshop__/index.ts +0 -21
  402. package/src/core/primitives/badge/__workshop__/props.tsx +0 -19
  403. package/src/core/primitives/badge/__workshop__/tones.tsx +0 -16
  404. package/src/core/primitives/badge/badge.test.tsx +0 -16
  405. package/src/core/primitives/badge/badge.tsx +0 -61
  406. package/src/core/primitives/box/__workshop__/index.ts +0 -21
  407. package/src/core/primitives/box/__workshop__/props.tsx +0 -20
  408. package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
  409. package/src/core/primitives/box/box.tsx +0 -222
  410. package/src/core/primitives/button/__workshop__/custom.tsx +0 -27
  411. package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
  412. package/src/core/primitives/button/__workshop__/disabled.tsx +0 -54
  413. package/src/core/primitives/button/__workshop__/index.ts +0 -66
  414. package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
  415. package/src/core/primitives/button/__workshop__/props.tsx +0 -55
  416. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
  417. package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
  418. package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
  419. package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
  420. package/src/core/primitives/button/__workshop__/textOverflow.tsx +0 -13
  421. package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -29
  422. package/src/core/primitives/button/button.test.tsx +0 -30
  423. package/src/core/primitives/button/button.tsx +0 -193
  424. package/src/core/primitives/button/types.ts +0 -2
  425. package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
  426. package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
  427. package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
  428. package/src/core/primitives/card/__workshop__/index.ts +0 -20
  429. package/src/core/primitives/card/__workshop__/interactive.tsx +0 -29
  430. package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -78
  431. package/src/core/primitives/card/__workshop__/props.tsx +0 -52
  432. package/src/core/primitives/card/__workshop__/selected.tsx +0 -62
  433. package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
  434. package/src/core/primitives/card/__workshop__/tones.tsx +0 -27
  435. package/src/core/primitives/card/card.tsx +0 -109
  436. package/src/core/primitives/card/cardContext.ts +0 -10
  437. package/src/core/primitives/card/cardProvider.tsx +0 -27
  438. package/src/core/primitives/card/types.ts +0 -17
  439. package/src/core/primitives/card/useCard.ts +0 -15
  440. package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
  441. package/src/core/primitives/checkbox/__workshop__/index.ts +0 -15
  442. package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -35
  443. package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
  444. package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -27
  445. package/src/core/primitives/checkbox/checkbox.tsx +0 -80
  446. package/src/core/primitives/code/__workshop__/index.ts +0 -21
  447. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -23
  448. package/src/core/primitives/code/__workshop__/props.tsx +0 -18
  449. package/src/core/primitives/code/code.tsx +0 -48
  450. package/src/core/primitives/code/refractor.tsx +0 -18
  451. package/src/core/primitives/container/__workshop__/example.tsx +0 -20
  452. package/src/core/primitives/container/__workshop__/index.ts +0 -10
  453. package/src/core/primitives/container/container.tsx +0 -37
  454. package/src/core/primitives/container/types.ts +0 -6
  455. package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
  456. package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
  457. package/src/core/primitives/flex/__workshop__/index.ts +0 -13
  458. package/src/core/primitives/flex/flex.tsx +0 -58
  459. package/src/core/primitives/grid/__workshop__/index.ts +0 -12
  460. package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
  461. package/src/core/primitives/grid/grid.tsx +0 -35
  462. package/src/core/primitives/heading/__workshop__/index.ts +0 -21
  463. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
  464. package/src/core/primitives/heading/__workshop__/plain.tsx +0 -29
  465. package/src/core/primitives/heading/heading.tsx +0 -78
  466. package/src/core/primitives/inline/__workshop__/index.ts +0 -10
  467. package/src/core/primitives/inline/__workshop__/plain.tsx +0 -24
  468. package/src/core/primitives/inline/inline.tsx +0 -62
  469. package/src/core/primitives/kbd/__workshop__/index.ts +0 -10
  470. package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
  471. package/src/core/primitives/kbd/kbd.tsx +0 -57
  472. package/src/core/primitives/label/__workshop__/index.ts +0 -21
  473. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -54
  474. package/src/core/primitives/label/__workshop__/plain.tsx +0 -28
  475. package/src/core/primitives/label/label.tsx +0 -75
  476. package/src/core/primitives/layer/__workshop__/_debug.tsx +0 -17
  477. package/src/core/primitives/layer/__workshop__/index.ts +0 -26
  478. package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +0 -49
  479. package/src/core/primitives/layer/__workshop__/nested.tsx +0 -98
  480. package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +0 -17
  481. package/src/core/primitives/layer/getLayerContext.test.ts +0 -32
  482. package/src/core/primitives/layer/getLayerContext.ts +0 -21
  483. package/src/core/primitives/layer/layer.test.tsx +0 -110
  484. package/src/core/primitives/layer/layer.tsx +0 -42
  485. package/src/core/primitives/layer/layerCard.tsx +0 -90
  486. package/src/core/primitives/layer/layerContext.ts +0 -7
  487. package/src/core/primitives/layer/layerProvider.tsx +0 -106
  488. package/src/core/primitives/layer/types.ts +0 -9
  489. package/src/core/primitives/layer/useLayer.ts +0 -24
  490. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
  491. package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
  492. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  493. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
  494. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
  495. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -69
  496. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -96
  497. package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -100
  498. package/src/core/primitives/popover/__workshop__/index.ts +0 -51
  499. package/src/core/primitives/popover/constants.ts +0 -22
  500. package/src/core/primitives/popover/floating-ui/size.ts +0 -83
  501. package/src/core/primitives/popover/helpers.ts +0 -32
  502. package/src/core/primitives/popover/popover.tsx +0 -443
  503. package/src/core/primitives/popover/popoverLayer.tsx +0 -149
  504. package/src/core/primitives/popover/types.ts +0 -12
  505. package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
  506. package/src/core/primitives/radio/__workshop__/index.ts +0 -13
  507. package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
  508. package/src/core/primitives/radio/radio.tsx +0 -64
  509. package/src/core/primitives/select/__workshop__/index.ts +0 -13
  510. package/src/core/primitives/select/__workshop__/plain.tsx +0 -39
  511. package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
  512. package/src/core/primitives/select/select.tsx +0 -75
  513. package/src/core/primitives/selectable/selectable.tsx +0 -50
  514. package/src/core/primitives/skeleton/__workshop__/delay.tsx +0 -70
  515. package/src/core/primitives/skeleton/__workshop__/index.ts +0 -13
  516. package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +0 -64
  517. package/src/core/primitives/skeleton/codeSkeleton.tsx +0 -49
  518. package/src/core/primitives/skeleton/headingSkeleton.tsx +0 -48
  519. package/src/core/primitives/skeleton/labelSkeleton.tsx +0 -47
  520. package/src/core/primitives/skeleton/skeleton.tsx +0 -70
  521. package/src/core/primitives/skeleton/textSkeleton.tsx +0 -49
  522. package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
  523. package/src/core/primitives/spinner/__workshop__/index.ts +0 -16
  524. package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +0 -14
  525. package/src/core/primitives/spinner/spinner.tsx +0 -45
  526. package/src/core/primitives/srOnly/srOnly.tsx +0 -33
  527. package/src/core/primitives/stack/__workshop__/index.ts +0 -16
  528. package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
  529. package/src/core/primitives/stack/stack.tsx +0 -60
  530. package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
  531. package/src/core/primitives/switch/__workshop__/index.ts +0 -13
  532. package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
  533. package/src/core/primitives/switch/switch.tsx +0 -84
  534. package/src/core/primitives/text/__workshop__/colored.tsx +0 -23
  535. package/src/core/primitives/text/__workshop__/example.tsx +0 -28
  536. package/src/core/primitives/text/__workshop__/index.ts +0 -26
  537. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -23
  538. package/src/core/primitives/text/text.tsx +0 -76
  539. package/src/core/primitives/textArea/__workshop__/index.ts +0 -16
  540. package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -61
  541. package/src/core/primitives/textArea/textArea.tsx +0 -84
  542. package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
  543. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
  544. package/src/core/primitives/textInput/__workshop__/index.ts +0 -46
  545. package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -110
  546. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
  547. package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
  548. package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
  549. package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
  550. package/src/core/primitives/textInput/textInput.tsx +0 -258
  551. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
  552. package/src/core/primitives/tooltip/__workshop__/index.ts +0 -31
  553. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
  554. package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -112
  555. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
  556. package/src/core/primitives/tooltip/constants.ts +0 -23
  557. package/src/core/primitives/tooltip/tooltip.test.tsx +0 -452
  558. package/src/core/primitives/tooltip/tooltip.tsx +0 -482
  559. package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +0 -4
  560. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -13
  561. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
  562. package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -10
  563. package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
  564. package/src/core/primitives/tooltip/tooltipLayer.tsx +0 -106
  565. package/src/core/types.ts +0 -56
  566. package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -16
  567. package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
  568. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -102
  569. package/src/core/utils/boundaryElement/boundaryElementContext.ts +0 -10
  570. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +0 -18
  571. package/src/core/utils/boundaryElement/types.ts +0 -5
  572. package/src/core/utils/boundaryElement/useBoundaryElement.ts +0 -24
  573. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -41
  574. package/src/core/utils/elementQuery/__workshop__/index.ts +0 -16
  575. package/src/core/utils/elementQuery/elementQuery.tsx +0 -75
  576. package/src/core/utils/elementQuery/helpers.ts +0 -27
  577. package/src/core/utils/errorBoundary.tsx +0 -50
  578. package/src/core/utils/getElementRef.ts +0 -29
  579. package/src/core/utils/portal/__workshop__/index.ts +0 -16
  580. package/src/core/utils/portal/__workshop__/named.tsx +0 -63
  581. package/src/core/utils/portal/portal.test.tsx +0 -105
  582. package/src/core/utils/portal/portal.tsx +0 -36
  583. package/src/core/utils/portal/portalContext.ts +0 -37
  584. package/src/core/utils/portal/portalProvider.tsx +0 -70
  585. package/src/core/utils/portal/types.ts +0 -7
  586. package/src/core/utils/portal/usePortal.ts +0 -23
  587. package/src/css/_assign.ts +0 -3
  588. package/src/css/_composeClassNames.ts +0 -12
  589. package/src/css/_fromEntries.ts +0 -3
  590. package/src/css/_getClassNames.ts +0 -9
  591. package/src/css/_responsiveClassName.ts +0 -45
  592. package/src/css/_responsiveStyle.css.ts +0 -34
  593. package/src/css/_style.css.ts +0 -9
  594. package/src/css/components/breadcrumbs/breadcrumbs.css.ts +0 -6
  595. package/src/css/components/breadcrumbs/breadcrumbs.ts +0 -7
  596. package/src/css/components/dialog/dialog.css.ts +0 -98
  597. package/src/css/components/dialog/dialog.ts +0 -58
  598. package/src/css/components/menu/menu.css.ts +0 -14
  599. package/src/css/components/menu/menu.ts +0 -12
  600. package/src/css/components/skeleton/skeleton.css.ts +0 -128
  601. package/src/css/components/skeleton/skeleton.ts +0 -38
  602. package/src/css/components/skeleton/types.ts +0 -36
  603. package/src/css/components/toast/toast.css.ts +0 -17
  604. package/src/css/components/toast/toast.ts +0 -11
  605. package/src/css/components/tree/tree.css.ts +0 -65
  606. package/src/css/components/tree/tree.ts +0 -7
  607. package/src/css/constants.ts +0 -10
  608. package/src/css/getVarName.ts +0 -27
  609. package/src/css/index.ts +0 -146
  610. package/src/css/layers.css.ts +0 -12
  611. package/src/css/primitives/_arrow/_arrow.css.ts +0 -68
  612. package/src/css/primitives/_arrow/_arrow.ts +0 -26
  613. package/src/css/primitives/_input/_input.css.ts +0 -261
  614. package/src/css/primitives/_input/input.ts +0 -29
  615. package/src/css/primitives/_input/types.ts +0 -13
  616. package/src/css/primitives/avatar/avatar.css.ts +0 -201
  617. package/src/css/primitives/avatar/avatar.ts +0 -68
  618. package/src/css/primitives/avatar/types.ts +0 -10
  619. package/src/css/primitives/badge/badge.css.ts +0 -27
  620. package/src/css/primitives/badge/badge.ts +0 -8
  621. package/src/css/primitives/badge/types.ts +0 -13
  622. package/src/css/primitives/box/box.css.ts +0 -19
  623. package/src/css/primitives/box/box.ts +0 -82
  624. package/src/css/primitives/box/types.ts +0 -75
  625. package/src/css/primitives/button/button.css.ts +0 -287
  626. package/src/css/primitives/button/button.ts +0 -26
  627. package/src/css/primitives/button/types.ts +0 -12
  628. package/src/css/primitives/card/__workshop__/color.tsx +0 -75
  629. package/src/css/primitives/card/__workshop__/index.ts +0 -16
  630. package/src/css/primitives/card/card.css.ts +0 -387
  631. package/src/css/primitives/card/card.ts +0 -13
  632. package/src/css/primitives/card/types.ts +0 -9
  633. package/src/css/primitives/checkbox/checkbox.css.ts +0 -193
  634. package/src/css/primitives/checkbox/checkbox.ts +0 -17
  635. package/src/css/primitives/code/code.css.ts +0 -272
  636. package/src/css/primitives/code/code.ts +0 -19
  637. package/src/css/primitives/code/types.ts +0 -11
  638. package/src/css/primitives/container/container.css.ts +0 -4
  639. package/src/css/primitives/container/container.ts +0 -17
  640. package/src/css/primitives/container/types.ts +0 -9
  641. package/src/css/primitives/heading/heading.css.ts +0 -86
  642. package/src/css/primitives/heading/heading.ts +0 -22
  643. package/src/css/primitives/heading/types.ts +0 -14
  644. package/src/css/primitives/kbd/kbd.css.ts +0 -16
  645. package/src/css/primitives/kbd/kbd.ts +0 -9
  646. package/src/css/primitives/kbd/types.ts +0 -6
  647. package/src/css/primitives/label/label.css.ts +0 -87
  648. package/src/css/primitives/label/label.ts +0 -22
  649. package/src/css/primitives/label/types.ts +0 -14
  650. package/src/css/primitives/popover/popover.css.ts +0 -6
  651. package/src/css/primitives/popover/popover.ts +0 -12
  652. package/src/css/primitives/radio/radio.css.ts +0 -78
  653. package/src/css/primitives/radio/radio.ts +0 -17
  654. package/src/css/primitives/root/root.css.ts +0 -19
  655. package/src/css/primitives/root/root.ts +0 -17
  656. package/src/css/primitives/root/types.ts +0 -10
  657. package/src/css/primitives/select/select.css.ts +0 -24
  658. package/src/css/primitives/select/select.ts +0 -14
  659. package/src/css/primitives/select/types.ts +0 -5
  660. package/src/css/primitives/selectable/selectable.css.ts +0 -131
  661. package/src/css/primitives/selectable/selectable.ts +0 -9
  662. package/src/css/primitives/selectable/types.ts +0 -9
  663. package/src/css/primitives/spinner/spinner.css.ts +0 -19
  664. package/src/css/primitives/spinner/spinner.ts +0 -13
  665. package/src/css/primitives/spinner/types.ts +0 -4
  666. package/src/css/primitives/srOnly/srOnly.css.ts +0 -10
  667. package/src/css/primitives/srOnly/srOnly.ts +0 -7
  668. package/src/css/primitives/stack/stack.css.ts +0 -6
  669. package/src/css/primitives/stack/stack.ts +0 -7
  670. package/src/css/primitives/switch/switch.css.ts +0 -98
  671. package/src/css/primitives/switch/switch.ts +0 -27
  672. package/src/css/primitives/text/text.css.ts +0 -86
  673. package/src/css/primitives/text/text.ts +0 -24
  674. package/src/css/primitives/text/types.ts +0 -18
  675. package/src/css/primitives/textArea/textArea.css.ts +0 -4
  676. package/src/css/primitives/textArea/textArea.ts +0 -9
  677. package/src/css/primitives/textArea/types.ts +0 -7
  678. package/src/css/primitives/textInput/textInput.css.ts +0 -43
  679. package/src/css/primitives/textInput/textInput.ts +0 -24
  680. package/src/css/primitives/textInput/types.ts +0 -7
  681. package/src/css/primitives/tooltip/tooltip.css.ts +0 -4
  682. package/src/css/primitives/tooltip/tooltip.ts +0 -8
  683. package/src/css/primitives/tooltip/types.ts +0 -4
  684. package/src/css/props/alignItems/alignItems.css.ts +0 -22
  685. package/src/css/props/alignItems/alignItems.ts +0 -8
  686. package/src/css/props/alignItems/types.ts +0 -9
  687. package/src/css/props/border/border.css.ts +0 -65
  688. package/src/css/props/border/border.ts +0 -21
  689. package/src/css/props/border/types.ts +0 -13
  690. package/src/css/props/boxSizing/boxSizing.css.ts +0 -12
  691. package/src/css/props/boxSizing/boxSizing.ts +0 -7
  692. package/src/css/props/boxSizing/types.ts +0 -7
  693. package/src/css/props/display/display.css.ts +0 -56
  694. package/src/css/props/display/display.ts +0 -8
  695. package/src/css/props/display/types.ts +0 -16
  696. package/src/css/props/flex/flex.css.ts +0 -52
  697. package/src/css/props/flex/flex.ts +0 -8
  698. package/src/css/props/flex/types.ts +0 -9
  699. package/src/css/props/flexDirection/flexDirection.css.ts +0 -19
  700. package/src/css/props/flexDirection/flexDirection.ts +0 -8
  701. package/src/css/props/flexDirection/types.ts +0 -9
  702. package/src/css/props/flexWrap/flexWrap.css.ts +0 -16
  703. package/src/css/props/flexWrap/flexWrap.ts +0 -8
  704. package/src/css/props/flexWrap/types.ts +0 -9
  705. package/src/css/props/font/font.css.ts +0 -94
  706. package/src/css/props/font/font.ts +0 -8
  707. package/src/css/props/font/types.ts +0 -6
  708. package/src/css/props/gap/gap.css.ts +0 -40
  709. package/src/css/props/gap/gap.ts +0 -13
  710. package/src/css/props/gap/types.ts +0 -10
  711. package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +0 -19
  712. package/src/css/props/gridAutoColumns/gridAutoColumns.ts +0 -8
  713. package/src/css/props/gridAutoColumns/types.ts +0 -9
  714. package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +0 -19
  715. package/src/css/props/gridAutoFlow/gridAutoFlow.ts +0 -8
  716. package/src/css/props/gridAutoFlow/types.ts +0 -9
  717. package/src/css/props/gridAutoRows/gridAutoRows.css.ts +0 -19
  718. package/src/css/props/gridAutoRows/gridAutoRows.ts +0 -8
  719. package/src/css/props/gridAutoRows/types.ts +0 -9
  720. package/src/css/props/gridColumn/gridColumn.css.ts +0 -49
  721. package/src/css/props/gridColumn/gridColumn.ts +0 -8
  722. package/src/css/props/gridColumn/types.ts +0 -9
  723. package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +0 -46
  724. package/src/css/props/gridColumnEnd/gridColumnEnd.ts +0 -8
  725. package/src/css/props/gridColumnEnd/types.ts +0 -9
  726. package/src/css/props/gridColumnStart/gridColumnStart.css.ts +0 -46
  727. package/src/css/props/gridColumnStart/gridColumnStart.ts +0 -8
  728. package/src/css/props/gridColumnStart/types.ts +0 -9
  729. package/src/css/props/gridRow/gridRow.css.ts +0 -49
  730. package/src/css/props/gridRow/gridRow.ts +0 -8
  731. package/src/css/props/gridRow/types.ts +0 -9
  732. package/src/css/props/gridRowEnd/gridRowEnd.css.ts +0 -46
  733. package/src/css/props/gridRowEnd/gridRowEnd.ts +0 -8
  734. package/src/css/props/gridRowEnd/types.ts +0 -9
  735. package/src/css/props/gridRowStart/gridRowStart.css.ts +0 -46
  736. package/src/css/props/gridRowStart/gridRowStart.ts +0 -8
  737. package/src/css/props/gridRowStart/types.ts +0 -9
  738. package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +0 -43
  739. package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +0 -8
  740. package/src/css/props/gridTemplateColumns/types.ts +0 -9
  741. package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +0 -43
  742. package/src/css/props/gridTemplateRows/gridTemplateRows.ts +0 -8
  743. package/src/css/props/gridTemplateRows/types.ts +0 -9
  744. package/src/css/props/height/height.css.ts +0 -25
  745. package/src/css/props/height/height.ts +0 -8
  746. package/src/css/props/height/types.ts +0 -9
  747. package/src/css/props/inset/inset.css.ts +0 -37
  748. package/src/css/props/inset/inset.ts +0 -21
  749. package/src/css/props/inset/types.ts +0 -13
  750. package/src/css/props/justifyContent/justifyContent.css.ts +0 -25
  751. package/src/css/props/justifyContent/justifyContent.ts +0 -8
  752. package/src/css/props/justifyContent/types.ts +0 -15
  753. package/src/css/props/margin/margin.css.ts +0 -117
  754. package/src/css/props/margin/margin.ts +0 -25
  755. package/src/css/props/margin/types.ts +0 -17
  756. package/src/css/props/maxWidth/maxWidth.css.ts +0 -32
  757. package/src/css/props/maxWidth/maxWidth.ts +0 -8
  758. package/src/css/props/maxWidth/types.ts +0 -11
  759. package/src/css/props/minHeight/minHeight.css.ts +0 -13
  760. package/src/css/props/minHeight/minHeight.ts +0 -8
  761. package/src/css/props/minHeight/types.ts +0 -9
  762. package/src/css/props/minWidth/minWidth.css.ts +0 -25
  763. package/src/css/props/minWidth/minWidth.ts +0 -8
  764. package/src/css/props/minWidth/types.ts +0 -9
  765. package/src/css/props/outline/outline.css.ts +0 -10
  766. package/src/css/props/outline/outline.ts +0 -8
  767. package/src/css/props/outline/types.ts +0 -7
  768. package/src/css/props/overflow/overflow.css.ts +0 -16
  769. package/src/css/props/overflow/overflow.ts +0 -8
  770. package/src/css/props/overflow/types.ts +0 -11
  771. package/src/css/props/padding/padding.css.ts +0 -87
  772. package/src/css/props/padding/padding.ts +0 -25
  773. package/src/css/props/padding/types.ts +0 -17
  774. package/src/css/props/pointerEvents/pointerEvents.css.ts +0 -13
  775. package/src/css/props/pointerEvents/pointerEvents.ts +0 -8
  776. package/src/css/props/pointerEvents/types.ts +0 -7
  777. package/src/css/props/position/position.css.ts +0 -22
  778. package/src/css/props/position/position.ts +0 -8
  779. package/src/css/props/position/types.ts +0 -9
  780. package/src/css/props/radius/radius.css.ts +0 -21
  781. package/src/css/props/radius/radius.ts +0 -8
  782. package/src/css/props/radius/types.ts +0 -8
  783. package/src/css/props/shadow/shadow.css.ts +0 -23
  784. package/src/css/props/shadow/shadow.ts +0 -8
  785. package/src/css/props/shadow/types.ts +0 -8
  786. package/src/css/props/textAlign/textAlign.css.ts +0 -22
  787. package/src/css/props/textAlign/textAlign.ts +0 -8
  788. package/src/css/props/textAlign/types.ts +0 -7
  789. package/src/css/props/textOverflow/textOverflow.css.ts +0 -19
  790. package/src/css/props/textOverflow/textOverflow.ts +0 -8
  791. package/src/css/props/textOverflow/types.ts +0 -12
  792. package/src/css/props/width/types.ts +0 -11
  793. package/src/css/props/width/width.css.ts +0 -31
  794. package/src/css/props/width/width.ts +0 -8
  795. package/src/css/theme/buildCSSTheme.ts +0 -488
  796. package/src/css/theme/defaultTheme.css.ts +0 -64
  797. package/src/css/types.ts +0 -427
  798. package/src/css/vars.css.ts +0 -676
  799. package/src/theme/_parseColorToken.ts +0 -180
  800. package/src/theme/buildTheme.ts +0 -32
  801. package/src/theme/constants.ts +0 -90
  802. package/src/theme/defaults/color.ts +0 -197
  803. package/src/theme/defaults/common.ts +0 -71
  804. package/src/theme/defaults/fonts.ts +0 -250
  805. package/src/theme/index.ts +0 -5
  806. package/src/theme/merge.ts +0 -24
  807. package/src/theme/resolveTokens.ts +0 -204
  808. package/src/theme/types.ts +0 -366
package/dist/index.d.ts CHANGED
@@ -1,2521 +1,993 @@
1
- import type {AlignItems} from '@sanity/ui/css'
2
- import type {AvatarColor} from '@sanity/ui/theme'
3
- import type {AvatarSize} from '@sanity/ui/theme'
4
- import {BadgeStyleProps} from '@sanity/ui/css'
5
- import {BoxStyleProps} from '@sanity/ui/css'
6
- import {Breakpoint} from '@sanity/ui/css'
7
- import type {ButtonStyleProps} from '@sanity/ui/css'
8
- import {CardStyleProps} from '@sanity/ui/css'
9
- import type {CardTone} from '@sanity/ui/theme'
10
- import {CodeStyleProps} from '@sanity/ui/css'
11
- import type {ColorScheme} from '@sanity/ui/theme'
12
- import {Component} from 'react'
13
- import type {ComponentClass} from 'react'
14
- import type {ComponentProps} from 'react'
15
- import type {ComponentType as ComponentType_2} from 'react'
16
- import {ContainerStyleProps} from '@sanity/ui/css'
17
- import type {ContainerWidth} from '@sanity/ui/theme'
18
- import type {Context} from 'react'
19
- import type {DisplayStyleProps} from '@sanity/ui/css'
20
- import type {ElementTone} from '@sanity/ui/theme'
21
- import {ElementType as ElementType_2} from 'react'
22
- import {ErrorInfo} from 'react'
23
- import type {ExoticComponent} from 'react'
24
- import type {FlexDirection} from '@sanity/ui/css'
25
- import {FlexStyleProps} from '@sanity/ui/css'
26
- import type {FlexWrap} from '@sanity/ui/css'
27
- import type {FontCodeSize} from '@sanity/ui/theme'
28
- import type {FontHeadingSize} from '@sanity/ui/theme'
29
- import type {FontLabelSize} from '@sanity/ui/theme'
30
- import type {FontTextSize} from '@sanity/ui/theme'
31
- import type {FontWeight} from '@sanity/ui/theme'
32
- import {ForwardedRef} from 'react'
33
- import type {FunctionComponent} from 'react'
34
- import {GapStyleProps} from '@sanity/ui/css'
35
- import {HeadingStyleProps} from '@sanity/ui/css'
36
- import {HTMLAttributes} from 'react'
37
- import {InputStyleProps} from '@sanity/ui/css'
38
- import type {JSX} from 'react'
39
- import type {JustifyContent} from '@sanity/ui/css'
40
- import {LabelStyleProps} from '@sanity/ui/css'
41
- import {MaxWidth} from '@sanity/ui/css'
42
- import {MouseEventHandler} from 'react'
43
- import {PaddingStyleProps} from '@sanity/ui/css'
44
- import {PropsWithChildren} from 'react'
45
- import type {Radius} from '@sanity/ui/theme'
46
- import {RadiusStyleProps} from '@sanity/ui/css'
47
- import {ReactElement} from 'react'
48
- import {ReactNode} from 'react'
49
- import type {ReactPortal} from 'react'
50
- import {Ref} from 'react'
51
- import {RefAttributes} from 'react'
52
- import {ResponsiveProp} from '@sanity/ui/css'
53
- import {RootStyleProps} from '@sanity/ui/css'
54
- import {SelectableStyleProps} from '@sanity/ui/css'
55
- import {SelectStyleProps} from '@sanity/ui/css'
56
- import {ShadowStyleProps} from '@sanity/ui/css'
57
- import {SkeletonStyleProps} from '@sanity/ui/css'
58
- import type {Space} from '@sanity/ui/theme'
59
- import {TextAreaStyleProps} from '@sanity/ui/css'
60
- import {TextOverflowStyleProps} from '@sanity/ui/css'
61
- import {TextStyleProps} from '@sanity/ui/css'
62
- import type {Width} from '@sanity/ui/css'
63
-
64
- /** @internal */
65
- export declare function Arrow<E extends ArrowElementType = typeof DEFAULT_ARROW_ELEMENT>(
66
- props: ArrowProps<E>,
67
- ): React.JSX.Element
68
-
69
- /** @internal */
70
- export declare type ArrowElementType = 'div' | 'span' | ComponentType
71
-
72
- /** @internal */
73
- export declare type ArrowOwnProps = {
74
- width: number
75
- height: number
76
- radius?: number
77
- }
78
-
79
- /** @internal */
80
- export declare type ArrowProps<E extends ArrowElementType = ArrowElementType> = Props<
81
- ArrowOwnProps,
82
- E
83
- >
84
-
85
- /**
86
- * Assign properties from `U` to `T`, excluding properties that already exist in `T`.
87
- *
88
- * @public
89
- */
90
- export declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
91
-
92
- /**
93
- * @internal
94
- */
95
- export declare function attemptFocus(element: HTMLElement): boolean
96
-
97
- /**
98
- * The Autocomplete component is typically used for search components.
99
- * It consists of a text input for writing a query, and properties for rendering suggestions.
100
- *
101
- * @public
102
- */
103
- export declare function Autocomplete<
104
- E extends AutocompleteElementType = typeof DEFAULT_AUTOCOMPLETE_ELEMENT,
105
- O extends BaseAutocompleteOption = BaseAutocompleteOption,
106
- >(props: AutocompleteProps<E, O>): React.JSX.Element
107
-
108
- /** @public */
109
- export declare type AutocompleteElementType = 'input' | ComponentType
110
-
111
- /**
112
- * @internal
113
- */
114
- export declare interface AutocompleteInputChangeMsg {
115
- type: 'input/change'
116
- query: string | null
117
- }
118
-
119
- /**
120
- * @internal
121
- */
122
- export declare interface AutocompleteInputFoocusMsg {
123
- type: 'input/focus'
124
- }
125
-
126
- /**
127
- * @internal
128
- */
129
- export declare type AutocompleteMsg =
130
- | AutocompleteRootBlurMsg
131
- | AutocompleteRootClearMsg
132
- | AutocompleteRootEscapeMsg
133
- | AutocompleteRootOpenMsg
134
- | AutocompleteRootSetActiveValueMsg
135
- | AutocompleteRootSetListFocusedMsg
136
- | AutocompleteInputChangeMsg
137
- | AutocompleteInputFoocusMsg
138
- | AutocompleteValueChangeMsg
139
-
140
- /** @public */
141
- export declare type AutocompleteOpenButtonProps = Omit<ButtonProps<'button'>, 'as'>
142
-
143
- /** @public */
144
- export declare type AutocompleteOwnProps<
145
- O extends BaseAutocompleteOption = BaseAutocompleteOption,
146
- > = TextInputOwnProps & {
147
- border?: boolean
148
- customValidity?: string
149
- filterOption?: (query: string, option: O) => boolean
150
- icon?: ElementType_2 | ReactNode
151
- /** @beta */
152
- listBox?: BoxOwnProps
153
- loading?: boolean
154
- onChange?: (value: string) => void
155
- onQueryChange?: (query: string | null) => void
156
- onSelect?: (value: string) => void
157
- /** @beta */
158
- openButton?: boolean | AutocompleteOpenButtonProps
159
- /** @beta */
160
- openOnFocus?: boolean
161
- /** The options to render. */
162
- options?: O[]
163
- padding?: ResponsiveProp<Space>
164
- popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
165
- prefix?: ReactNode
166
- radius?: Radius | Radius[]
167
- /** @beta */
168
- relatedElements?: HTMLElement[]
169
- /** The callback function for rendering each option. */
170
- renderOption?: (option: O) => React.JSX.Element
171
- /** @beta */
172
- renderPopover?: (
173
- props: {
174
- content: React.JSX.Element | null
175
- hidden: boolean
176
- inputElement: HTMLInputElement | null
177
- onMouseEnter: () => void
178
- onMouseLeave: () => void
179
- },
180
- ref: ForwardedRef<HTMLDivElement>,
181
- ) => ReactNode
182
- renderValue?: (value: string, option?: O) => string
183
- suffix?: ReactNode
184
- value?: string
185
- }
1
+ import type { ComponentProps } from "react";
2
+ import { ComponentPropsWithRef } from "react";
3
+ import { ElementType } from "react";
4
+ import { JSX } from "react";
5
+ import type { default as React_2 } from "react";
6
+ import type { SVGProps } from "react";
7
+
8
+ declare const ALIGN_ITEMS: readonly [
9
+ "baseline",
10
+ "center",
11
+ "flex-end",
12
+ "flex-start",
13
+ "stretch",
14
+ ];
186
15
 
187
16
  /** @public */
188
- export declare type AutocompleteProps<
189
- E extends AutocompleteElementType = AutocompleteElementType,
190
- O extends BaseAutocompleteOption = BaseAutocompleteOption,
191
- > = Props<AutocompleteOwnProps<O>, E>
192
-
193
- /**
194
- * @internal
195
- */
196
- export declare interface AutocompleteRootBlurMsg {
197
- type: 'root/blur'
198
- }
199
-
200
- /**
201
- * @internal
202
- */
203
- export declare interface AutocompleteRootClearMsg {
204
- type: 'root/clear'
205
- }
206
-
207
- /**
208
- * @internal
209
- */
210
- export declare interface AutocompleteRootEscapeMsg {
211
- type: 'root/escape'
212
- }
17
+ export declare type AlignItems = (typeof ALIGN_ITEMS)[number];
213
18
 
214
- /**
215
- * @internal
216
- */
217
- export declare interface AutocompleteRootOpenMsg {
218
- type: 'root/open'
219
- query: string | null
220
- }
221
-
222
- /**
223
- * @internal
224
- */
225
- export declare interface AutocompleteRootSetActiveValueMsg {
226
- type: 'root/setActiveValue'
227
- value: string
228
- listFocused?: boolean
229
- }
230
-
231
- /**
232
- * @internal
233
- */
234
- export declare interface AutocompleteRootSetListFocusedMsg {
235
- type: 'root/setListFocused'
236
- listFocused: boolean
237
- }
238
-
239
- /**
240
- * @internal
241
- */
242
- export declare interface AutocompleteState {
243
- activeValue: string | null
244
- focused: boolean
245
- listFocused: boolean
246
- query: string | null
247
- value: string | null
248
- }
249
-
250
- /**
251
- * @internal
252
- */
253
- export declare interface AutocompleteValueChangeMsg {
254
- type: 'value/change'
255
- value: string | null
256
- }
257
-
258
- /**
259
- * Avatars are used to represent people and other agents (e.g. bots).
260
- *
261
- * @public
262
- */
263
- export declare function Avatar<E extends AvatarElementType = typeof DEFAULT_AVATAR_ELEMENT>(
264
- props: AvatarProps<E>,
265
- ): React.JSX.Element
266
-
267
- /** @public */
268
- export declare function AvatarCounter<
269
- E extends AvatarCounterElementType = typeof DEFAULT_AVATAR_COUNTER_ELEMENT,
270
- >(props: AvatarCounterProps<E>): React.JSX.Element
19
+ declare type BorderProps = {
20
+ /** CSS **border** property */
21
+ border?: Responsive<boolean>;
22
+ /** CSS **border-top** property */
23
+ borderTop?: Responsive<boolean>;
24
+ /** CSS **border-right** property */
25
+ borderRight?: Responsive<boolean>;
26
+ /** CSS **border-bottom** property */
27
+ borderBottom?: Responsive<boolean>;
28
+ /** CSS **border-left** property */
29
+ borderLeft?: Responsive<boolean>;
30
+ /** CSS **border-radius** property */
31
+ radius?: Responsive<Radius>;
32
+ };
271
33
 
272
34
  /** @public */
273
- export declare type AvatarCounterElementType = 'button' | 'div' | 'span' | ComponentType
35
+ export declare function Box<T extends ElementType = "div">({
36
+ display,
37
+ ...props
38
+ }: BoxProps<T> &
39
+ Omit<ComponentPropsWithRef<T>, keyof BoxProps<T>>): JSX.Element;
274
40
 
275
41
  /** @public */
276
- export declare interface AvatarCounterOwnProps {
277
- count: number
278
- size?: ResponsiveProp<AvatarSize>
42
+ export declare interface BoxProps<
43
+ T extends React.ElementType = "div",
44
+ > extends LayoutProps {
45
+ /** Element to render */
46
+ as?: T;
47
+ /** CSS **display** property */
48
+ display?: Responsive<DisplayBlock>;
279
49
  }
280
50
 
281
51
  /** @public */
282
- export declare type AvatarCounterProps<
283
- E extends AvatarCounterElementType = AvatarCounterElementType,
284
- > = Props<AvatarCounterOwnProps, E>
52
+ export declare function Button<T extends ElementType = "button">({
53
+ density,
54
+ level,
55
+ tone,
56
+ ...props
57
+ }: ButtonProps<T> &
58
+ Omit<ComponentPropsWithRef<T>, keyof ButtonProps<T>>): JSX.Element;
285
59
 
286
- /** @public */
287
- export declare type AvatarElementType = 'a' | 'button' | 'div' | 'span' | ComponentType
288
-
289
- /** @public */
290
- export declare interface AvatarOwnProps {
291
- /** @beta */
292
- __unstable_hideInnerStroke?: boolean
293
- animateArrowFrom?: AvatarPosition
294
- arrowPosition?: AvatarPosition
295
- color?: AvatarColor
296
- initials?: string
297
- onImageLoadError?: (event: Error) => void
298
- size?: ResponsiveProp<AvatarSize>
299
- src?: string
300
- title?: string
301
- }
302
-
303
- /** @public */
304
- export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
305
-
306
- /** @public */
307
- export declare type AvatarProps<E extends AvatarElementType = AvatarElementType> = Props<
308
- AvatarOwnProps,
309
- E
310
- >
311
-
312
- /** @public */
313
- export declare function AvatarStack<
314
- E extends AvatarStackElementType = typeof DEFAULT_AVATAR_STACK_ELEMENT,
315
- >(props: AvatarStackProps<E>): React.JSX.Element
316
-
317
- /** @public */
318
- export declare type AvatarStackChild = ReactElement<AvatarProps<'div'>> | null | undefined | false
60
+ declare const BUTTON_DENSITY: readonly ["regular", "loose"];
319
61
 
320
- /** @public */
321
- export declare type AvatarStackElementType = 'div' | 'span' | ComponentType
322
-
323
- /** @public */
324
- export declare type AvatarStackOwnProps = Omit<
325
- BoxOwnProps,
326
- 'align' | 'alignItems' | 'display' | 'justify' | 'justifyContent'
327
- > & {
328
- children: AvatarStackChild | AvatarStackChild[]
329
- maxLength?: number
330
- size?: ResponsiveProp<AvatarSize>
331
- }
332
-
333
- /** @public */
334
- export declare type AvatarStackProps<E extends AvatarStackElementType = AvatarStackElementType> =
335
- Props<AvatarStackOwnProps, E>
62
+ declare const BUTTON_LEVEL: readonly ["primary", "secondary", "tertiary"];
336
63
 
337
- /**
338
- * Badges are used to tag resources.
339
- *
340
- * @public
341
- */
342
- export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_ELEMENT>(
343
- props: BadgeProps<E>,
344
- ): React.JSX.Element
64
+ declare const BUTTON_TONE: readonly ["neutral", "critical"];
345
65
 
346
- /** @public */
347
- export declare type BadgeElementType = 'div' | 'span' | ComponentType
348
-
349
- /** @public */
350
- export declare type BadgeOwnProps = BadgeStyleProps &
351
- FlexStyleProps &
352
- PaddingStyleProps &
353
- RadiusStyleProps
66
+ declare type ButtonDensity = (typeof BUTTON_DENSITY)[number];
354
67
 
355
- /** @public */
356
- export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> = Props<
357
- BadgeOwnProps,
358
- E
359
- >
68
+ declare type ButtonLevel = (typeof BUTTON_LEVEL)[number];
360
69
 
361
70
  /** @public */
362
- export declare interface BaseAutocompleteOption {
363
- value: string
71
+ export declare interface ButtonProps<T extends React.ElementType = "button"> {
72
+ /** Element to render */
73
+ as?: InteractiveAs<T>;
74
+ /** Composite prop for setting padding and gap */
75
+ density?: ButtonDensity;
76
+ /** Set CSS **width** property to 100% */
77
+ fullWidth?: Responsive<boolean>;
78
+ /** Starting icon */
79
+ iconStart?: React.ElementType | React.ReactNode;
80
+ /** Ending icon */
81
+ iconEnd?: React.ElementType | React.ReactNode;
82
+ /** Button level */
83
+ level?: ButtonLevel;
84
+ /** Loading state */
85
+ loading?: boolean;
86
+ /** Button text */
87
+ text?: string;
88
+ /** Button tone */
89
+ tone?: ButtonTone;
364
90
  }
365
91
 
366
- /** @public */
367
- export declare interface BoundaryElementContextValue {
368
- version: 0.0
369
- element: HTMLElement | null
370
- }
92
+ declare type ButtonTone = (typeof BUTTON_TONE)[number];
371
93
 
372
94
  /** @public */
373
- export declare function BoundaryElementProvider(
374
- props: BoundaryElementProviderProps,
375
- ): React.JSX.Element
95
+ export declare function Card<T extends ElementType = "div">({
96
+ density,
97
+ tone,
98
+ ...props
99
+ }: CardProps<T> &
100
+ Omit<ComponentPropsWithRef<T>, keyof CardProps<T>>): JSX.Element;
376
101
 
377
102
  /** @public */
378
- export declare interface BoundaryElementProviderProps {
379
- children: ReactNode
380
- element: HTMLElement | null
103
+ export declare interface CardProps<T extends React.ElementType = "div">
104
+ extends MarginProps, ToneProps {
105
+ /** Element to render */
106
+ as?: T;
107
+ /** Composite prop for setting padding and border radius */
108
+ density?: Responsive<Density>;
381
109
  }
382
110
 
383
- /**
384
- * The `Box` component is a basic layout wrapper component which provides utility properties
385
- * for flex, margins and padding.
386
- *
387
- * @public
388
- */
389
- export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
390
- props: BoxProps<E>,
391
- ): React.JSX.Element
392
-
393
- /** @public */
394
- export declare type BoxElementType =
395
- | 'a'
396
- | 'article'
397
- | 'aside'
398
- | 'blockquote'
399
- | 'body'
400
- | 'button'
401
- | 'details'
402
- | 'div'
403
- | 'header'
404
- | 'fieldset'
405
- | 'figure'
406
- | 'figcaption'
407
- | 'footer'
408
- | 'form'
409
- | 'html'
410
- | 'iframe'
411
- | 'kbd'
412
- | 'label'
413
- | 'legend'
414
- | 'li'
415
- | 'main'
416
- | 'nav'
417
- | 'ol'
418
- | 'pre'
419
- | 'section'
420
- | 'span'
421
- | 'summary'
422
- | 'table'
423
- | 'tbody'
424
- | 'td'
425
- | 'tfoot'
426
- | 'th'
427
- | 'thead'
428
- | 'tr'
429
- | 'ul'
430
- | ComponentType
431
-
432
- /** @public */
433
- export declare type BoxOwnProps = BoxStyleProps
434
-
435
- /** @public */
436
- export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
437
-
438
- /** @beta */
439
- export declare function Breadcrumbs<
440
- E extends BreadcrumbsElementType = typeof DEFAULT_BREADCRUMBS_ELEMENT,
441
- >(props: BreadcrumbsProps<E>): React.JSX.Element
442
-
443
111
  /** @beta */
444
- export declare type BreadcrumbsElementType = 'div' | 'nav' | ComponentType
445
-
446
- /** @beta */
447
- export declare type BreadcrumbsOwnProps = GapStyleProps & {
448
- expandButton?: Omit<ButtonProps<'button'>, 'as' | 'onClick' | 'selected'>
449
- maxLength?: number
450
- separator?: ReactNode
451
- }
112
+ export declare function Checkbox(props: CheckboxProps): JSX.Element;
452
113
 
453
114
  /** @beta */
454
- export declare type BreadcrumbsProps<E extends BreadcrumbsElementType = BreadcrumbsElementType> =
455
- Props<BreadcrumbsOwnProps, E>
456
-
457
- /** @public */
458
- export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
459
- props: ButtonProps<E>,
460
- ): React.JSX.Element
461
-
462
- /** @public */
463
- export declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
464
-
465
- /** @public */
466
- export declare type ButtonOwnProps = ButtonStyleProps &
467
- DisplayStyleProps &
468
- GapStyleProps &
469
- PaddingStyleProps & {
470
- 'align'?: BoxStyleProps['alignItems']
471
- 'data-ui'?: string
472
- 'disabled'?: boolean
473
- 'fontSize'?: ResponsiveProp<FontTextSize>
474
- 'icon'?: ElementType_2 | ReactNode
475
- 'iconRight'?: ElementType_2 | ReactNode
476
- 'justify'?: BoxStyleProps['justifyContent']
477
- /** @beta Do not use in production, as this might change.*/
478
- 'loading'?: boolean
479
- 'selected'?: boolean
480
- 'textAlign'?: ButtonTextAlign
481
- 'muted'?: boolean
482
- 'target'?: string
483
- 'text'?: ReactNode
484
- 'textOverflow'?: TextOwnProps['textOverflow']
485
- 'textWeight'?: TextOwnProps['weight']
486
- 'width'?: ResponsiveProp<Width>
487
- }
488
-
489
- /** @public */
490
- export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
491
- ButtonOwnProps,
492
- E
493
- >
494
-
495
- /** @public */
496
- export declare type ButtonTextAlign = 'left' | 'right' | 'center'
497
-
498
- /**
499
- * The `Card` component acts much like a `Box`, but with a background and foreground color.
500
- * Components within a `Card` inherit its colors.
501
- *
502
- * @public
503
- */
504
- export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
505
- props: CardProps<E>,
506
- ): React.JSX.Element
507
-
508
- /** @internal */
509
- export declare type _CardCompatProviderComponent = ComponentType_2<{
510
- children?: ReactNode
511
- tone: CardTone | 'inherit'
512
- scheme: ColorScheme
513
- }>
514
-
515
- /** @public */
516
- export declare interface CardContextValue {
517
- tone: CardTone
518
- scheme: ColorScheme
519
- /** @internal */
520
- unstable_CompatProvider?: _CardCompatProviderComponent
521
- }
522
-
523
- /** @public */
524
- export declare type CardElementType = BoxElementType
525
-
526
- /** @public */
527
- export declare interface CardOwnProps extends BoxOwnProps, CardStyleProps {
528
- /**
529
- * Do not use in production.
530
- * @beta
531
- */
532
- __unstable_checkered?: boolean
533
- /**
534
- * Do not use in production.
535
- * @beta
536
- */
537
- __unstable_focusRing?: boolean
538
- disabled?: boolean
539
- pressed?: boolean
540
- selected?: boolean
541
- target?: string
115
+ export declare interface CheckboxProps
116
+ extends React.ComponentProps<"input">, MarginProps {
117
+ /** Error state */
118
+ error?: boolean;
119
+ /** Indeterminate state */
120
+ indeterminate?: boolean;
121
+ /** Input label */
122
+ label: React.ReactNode;
542
123
  }
543
124
 
544
125
  /** @public */
545
- export declare type CardProps<E extends CardElementType = CardElementType> = Props<CardOwnProps, E>
126
+ export declare function Code<T extends CodeTag = "pre">({
127
+ size,
128
+ ...props
129
+ }: CodeProps<T> &
130
+ Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>): JSX.Element;
546
131
 
547
- /** @public */
548
- export declare function CardProvider(props: {
549
- children?: ReactNode
550
- tone: CardTone
551
- scheme: ColorScheme
552
- /** @internal */
553
- unstable_CompatProvider?: _CardCompatProviderComponent
554
- }): React.JSX.Element
555
-
556
- /**
557
- * Checkboxes allow the user to select one or more items from a set.
558
- *
559
- * @public
560
- */
561
- export declare function Checkbox<E extends CheckboxElementType = typeof DEFAULT_CHECKBOX_ELEMENT>(
562
- props: CheckboxProps<E>,
563
- ): React.JSX.Element
132
+ declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
564
133
 
565
- /** @public */
566
- export declare type CheckboxElementType = 'input' | ComponentType
134
+ declare const CODE_TAG: readonly ["pre", "span"];
567
135
 
568
136
  /** @public */
569
- export declare type CheckboxOwnProps = {
570
- indeterminate?: boolean
571
- customValidity?: string
137
+ export declare interface CodeProps<T extends CodeTag = "pre"> extends Omit<
138
+ TypographyProps,
139
+ "align" | "truncate" | "tone"
140
+ > {
141
+ /** Element to render */
142
+ as?: T;
143
+ /** Refractor language for syntax highlighting */
144
+ language?: string;
145
+ /** CSS **font-size** property */
146
+ size?: Responsive<CodeSize>;
572
147
  }
573
148
 
574
149
  /** @public */
575
- export declare type CheckboxProps<E extends CheckboxElementType = CheckboxElementType> = Props<
576
- CheckboxOwnProps,
577
- E
578
- >
150
+ export declare type CodeSize = (typeof CODE_SIZE)[number];
579
151
 
580
- /** @public */
581
- export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
582
-
583
- /** @public */
584
- export declare type ClickOutsideEventListener = (event: MouseEvent) => void
152
+ declare type CodeTag = (typeof CODE_TAG)[number];
585
153
 
586
154
  /** @public */
587
- export declare function Code<E extends CodeElementType = typeof DEFAULT_CODE_ELEMENT>(
588
- props: CodeProps<E>,
589
- ): React.JSX.Element
155
+ export declare function Container<T extends ElementType = "div">({
156
+ marginX,
157
+ ...props
158
+ }: ContainerProps<T> &
159
+ Omit<ComponentPropsWithRef<T>, keyof ContainerProps<T>>): JSX.Element;
590
160
 
591
- /** @public */
592
- export declare type CodeElementType = 'div' | 'pre' | ComponentType
593
-
594
- /** @public */
595
- export declare type CodeOwnProps = CodeStyleProps & {
596
- /** Define the language to use for syntax highlighting. */
597
- language?: string
598
- size?: ResponsiveProp<FontCodeSize>
599
- }
161
+ declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
600
162
 
601
163
  /** @public */
602
- export declare type CodeProps<E extends CodeElementType = CodeElementType> = Props<CodeOwnProps, E>
603
-
604
- /**
605
- * This API might change. DO NOT USE IN PRODUCTION.
606
- * @beta
607
- */
608
- export declare function CodeSkeleton<
609
- E extends CodeSkeletonElementType = typeof DEFAULT_CODE_SKELETON_ELEMENT,
610
- >(props: CodeSkeletonProps<E>): React.JSX.Element
611
-
612
- /** @beta */
613
- export declare type CodeSkeletonElementType = SkeletonElementType
614
-
615
- /** @beta */
616
- export declare type CodeSkeletonOwnProps = SkeletonOwnProps & {
617
- size?: ResponsiveProp<FontCodeSize>
164
+ export declare interface ContainerProps<
165
+ T extends React.ElementType = "div",
166
+ > extends LayoutProps {
167
+ /** Element to render */
168
+ as?: T;
169
+ /** CSS **max-width** property */
170
+ size?: Responsive<ContainerSize>;
618
171
  }
619
172
 
620
- /**
621
- * This API might change. DO NOT USE IN PRODUCTION.
622
- * @beta
623
- */
624
- export declare type CodeSkeletonProps<E extends CodeSkeletonElementType = CodeSkeletonElementType> =
625
- Props<CodeSkeletonOwnProps, E>
626
-
627
- /** @public */
628
- export declare type ComponentType<P = any> =
629
- | FunctionComponent<P>
630
- | ComponentClass<P>
631
- | ExoticComponent<P>
632
-
633
- /**
634
- * The `Container` component wraps content layout in a defined set of widths.
635
- *
636
- * @public
637
- */
638
- export declare function Container<
639
- E extends ContainerElementType = typeof DEFAULT_CONTAINER_ELEMENT,
640
- >(props: ContainerProps<E>): React.JSX.Element
641
-
642
- /** @public */
643
- export declare type ContainerElementType = BoxElementType
644
-
645
173
  /** @public */
646
- export declare type ContainerOwnProps = Omit<BoxOwnProps, 'width'> & ContainerStyleProps
174
+ export declare type ContainerSize = (typeof CONTAINER_SIZE)[number];
647
175
 
648
- /** @public */
649
- export declare type ContainerProps<E extends ContainerElementType = ContainerElementType> = Props<
650
- ContainerOwnProps,
651
- E
652
- >
653
-
654
- /**
655
- * @internal
656
- */
657
- export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
658
-
659
- /** @internal */
660
- export declare const DEFAULT_ARROW_ELEMENT = 'div'
176
+ declare const DENSITY: readonly ["compact", "regular", "loose"];
661
177
 
662
178
  /** @public */
663
- export declare const DEFAULT_AUTOCOMPLETE_ELEMENT = 'input'
179
+ export declare type Density = (typeof DENSITY)[number];
664
180
 
665
- /** @public */
666
- export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'span'
181
+ declare const DISPLAY_BLOCK: readonly ["block", "inline-block", "none"];
667
182
 
668
- /** @public */
669
- export declare const DEFAULT_AVATAR_ELEMENT = 'span'
183
+ declare const DISPLAY_FLEX: readonly ["flex", "inline-flex", "none"];
670
184
 
671
- /** @public */
672
- export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'span'
185
+ declare const DISPLAY_GRID: readonly ["grid", "inline-grid", "none"];
673
186
 
674
187
  /** @public */
675
- export declare const DEFAULT_BADGE_ELEMENT = 'span'
188
+ export declare type DisplayBlock = (typeof DISPLAY_BLOCK)[number];
676
189
 
677
190
  /** @public */
678
- export declare const DEFAULT_BOX_ELEMENT = 'div'
679
-
680
- /** @beta */
681
- export declare const DEFAULT_BREADCRUMBS_ELEMENT = 'nav'
191
+ export declare type DisplayFlex = (typeof DISPLAY_FLEX)[number];
682
192
 
683
193
  /** @public */
684
- export declare const DEFAULT_BUTTON_ELEMENT = 'button'
194
+ export declare type DisplayGrid = (typeof DISPLAY_GRID)[number];
685
195
 
686
196
  /** @public */
687
- export declare const DEFAULT_CARD_ELEMENT = 'div'
197
+ export declare function Divider(props: DividerProps): JSX.Element;
688
198
 
689
199
  /** @public */
690
- export declare const DEFAULT_CHECKBOX_ELEMENT = 'input'
200
+ export declare interface DividerProps
201
+ extends React.ComponentProps<"hr">, MarginProps {}
691
202
 
692
203
  /** @public */
693
- export declare const DEFAULT_CODE_ELEMENT = 'pre'
694
-
695
- /** @beta */
696
- export declare const DEFAULT_CODE_SKELETON_ELEMENT = 'div'
204
+ export declare function Eyebrow<T extends ElementType = "span">({
205
+ size,
206
+ weight,
207
+ ...props
208
+ }: EyebrowProps<T> &
209
+ Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>): JSX.Element;
697
210
 
698
- /** @public */
699
- export declare const DEFAULT_CONTAINER_ELEMENT = 'div'
211
+ declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4];
700
212
 
701
213
  /** @public */
702
- export declare const DEFAULT_DIALOG_ELEMENT = 'div'
703
-
704
- /** @beta */
705
- export declare const DEFAULT_ELEMENT_QUERY_ELEMENT = 'div'
706
-
707
- /** @public */
708
- export declare const DEFAULT_FLEX_ELEMENT = 'div'
709
-
710
- /** @public */
711
- export declare const DEFAULT_GRID_ELEMENT = 'div'
712
-
713
- /** @public */
714
- export declare const DEFAULT_HEADING_ELEMENT = 'div'
715
-
716
- /** @beta */
717
- export declare const DEFAULT_HEADING_SKELETON_ELEMENT = 'div'
718
-
719
- /** @public */
720
- export declare const DEFAULT_HOTKEYS_ELEMENT = 'kbd'
721
-
722
- /** @public */
723
- export declare const DEFAULT_INLINE_ELEMENT = 'div'
724
-
725
- /** @public */
726
- export declare const DEFAULT_KBD_ELEMENT = 'kbd'
727
-
728
- /** @public */
729
- export declare const DEFAULT_LABEL_ELEMENT = 'div'
730
-
731
- /** @beta */
732
- export declare const DEFAULT_LABEL_SKELETON_ELEMENT = 'div'
733
-
734
- /** @public */
735
- export declare const DEFAULT_LAYER_ELEMENT = 'div'
736
-
737
- /** @public */
738
- export declare const DEFAULT_MENU_DIVIDER_ELEMENT = 'hr'
739
-
740
- /** @public */
741
- export declare const DEFAULT_MENU_ELEMENT = 'div'
742
-
743
- /** @public */
744
- export declare const DEFAULT_MENU_GROUP_ELEMENT = 'button'
745
-
746
- /** @public */
747
- export declare const DEFAULT_MENU_ITEM_ELEMENT = 'button'
748
-
749
- /** @public */
750
- export declare const DEFAULT_POPOVER_ELEMENT = 'div'
214
+ export declare interface EyebrowProps<
215
+ T extends React.ElementType = "span",
216
+ > extends TypographyProps {
217
+ /** Element to render */
218
+ as?: T;
219
+ /** CSS **font-size** property */
220
+ size?: Responsive<EyebrowSize>;
221
+ }
751
222
 
752
223
  /** @public */
753
- export declare const DEFAULT_RADIO_ELEMENT = 'input'
224
+ export declare type EyebrowSize = (typeof EYEBROW_SIZE)[number];
754
225
 
755
226
  /** @public */
756
- export declare const DEFAULT_ROOT_ELEMENT = 'html'
227
+ export declare function Flex<T extends ElementType = "div">({
228
+ display,
229
+ ...props
230
+ }: FlexProps<T> &
231
+ Omit<ComponentPropsWithRef<T>, keyof FlexProps<T>>): JSX.Element;
757
232
 
758
- /** @public */
759
- export declare const DEFAULT_SELECT_ELEMENT = 'select'
233
+ declare const FLEX_DIRECTION: readonly [
234
+ "row",
235
+ "row-reverse",
236
+ "column",
237
+ "column-reverse",
238
+ ];
760
239
 
761
- /** @internal */
762
- export declare const DEFAULT_SELECTABLE_ELEMENT = 'button'
240
+ declare const FLEX_WRAP: readonly ["wrap", "wrap-reverse", "nowrap"];
763
241
 
764
- /** @beta */
765
- export declare const DEFAULT_SKELETON_ELEMENT = 'div'
242
+ declare type FlexChildProps = {
243
+ /** CSS **flex-basis** property */
244
+ flexBasis?: Responsive<string>;
245
+ /** CSS **flex-grow** property */
246
+ flexGrow?: Responsive<number>;
247
+ /** CSS **flex-shrink** property */
248
+ flexShrink?: Responsive<number>;
249
+ };
766
250
 
767
251
  /** @public */
768
- export declare const DEFAULT_SPINNER_ELEMENT = 'div'
252
+ export declare type FlexDirection = (typeof FLEX_DIRECTION)[number];
769
253
 
770
254
  /** @public */
771
- export declare const DEFAULT_SR_ONLY_ELEMENT = 'span'
255
+ export declare type FlexParentProps = {
256
+ /** CSS **align-items** property */
257
+ alignItems?: Responsive<AlignItems>;
258
+ /** CSS **justify-content** property */
259
+ justifyContent?: Responsive<JustifyContent>;
260
+ /** CSS **flex-direction** property */
261
+ flexDirection?: Responsive<FlexDirection>;
262
+ /** CSS **flex-wrap** property */
263
+ flexWrap?: Responsive<FlexWrap>;
264
+ };
772
265
 
773
266
  /** @public */
774
- export declare const DEFAULT_STACK_ELEMENT = 'div'
267
+ export declare interface FlexProps<T extends React.ElementType = "div">
268
+ extends FlexParentProps, GapProps, LayoutProps {
269
+ /** Element to render */
270
+ as?: T;
271
+ /** CSS **display** property */
272
+ display?: Responsive<DisplayFlex>;
273
+ }
775
274
 
776
275
  /** @public */
777
- export declare const DEFAULT_SWITCH_ELEMENT = 'input'
276
+ export declare type FlexWrap = (typeof FLEX_WRAP)[number];
778
277
 
779
- /** @public */
780
- export declare const DEFAULT_TAB_ELEMENT = 'button'
278
+ declare const FONT_WEIGHT: readonly ["regular", "medium", "semibold", "bold"];
781
279
 
782
280
  /** @public */
783
- export declare const DEFAULT_TAB_LIST_ELEMENT = 'div'
281
+ export declare type FontWeight = (typeof FONT_WEIGHT)[number];
784
282
 
785
283
  /** @public */
786
- export declare const DEFAULT_TAB_PANEL_ELEMENT = 'div'
284
+ export declare type GapProps = {
285
+ /** CSS **gap** property */
286
+ gap?: Responsive<SpaceInherit>;
287
+ /** CSS **row-gap** property */
288
+ rowGap?: Responsive<SpaceInherit>;
289
+ /** CSS **column-gap** property */
290
+ columnGap?: Responsive<SpaceInherit>;
291
+ };
787
292
 
788
293
  /** @public */
789
- export declare const DEFAULT_TEXT_AREA_ELEMENT = 'textarea'
294
+ export declare function Grid<T extends ElementType = "div">({
295
+ display,
296
+ ...props
297
+ }: GridProps<T> &
298
+ Omit<ComponentPropsWithRef<T>, keyof GridProps<T>>): JSX.Element;
790
299
 
791
- /** @public */
792
- export declare const DEFAULT_TEXT_ELEMENT = 'div'
300
+ declare const GRID_AUTO_FLOW: readonly [
301
+ "row",
302
+ "column",
303
+ "row dense",
304
+ "column dense",
305
+ "dense",
306
+ ];
793
307
 
794
308
  /** @public */
795
- export declare const DEFAULT_TEXT_INPUT_ELEMENT = 'input'
796
-
797
- /** @beta */
798
- export declare const DEFAULT_TEXT_SKELETON_ELEMENT = 'div'
309
+ export declare type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
799
310
 
800
- /** @internal */
801
- export declare const DEFAULT_TOAST_ELEMENT = 'li'
311
+ declare type GridChildProps = {
312
+ /** CSS **grid-column** property */
313
+ gridColumn?: Responsive<string>;
314
+ /** CSS **grid-column-start** property */
315
+ gridColumnStart?: Responsive<string>;
316
+ /** CSS **grid-column-end** property */
317
+ gridColumnEnd?: Responsive<string>;
318
+ /** CSS **grid-row** property */
319
+ gridRow?: Responsive<string>;
320
+ /** CSS **grid-row-start** property */
321
+ gridRowStart?: Responsive<string>;
322
+ /** CSS **grid-row-end** property */
323
+ gridRowEnd?: Responsive<string>;
324
+ };
802
325
 
803
326
  /** @public */
804
- export declare const DEFAULT_TOOLTIP_ELEMENT = 'div'
805
-
806
- /** @beta */
807
- export declare const DEFAULT_TREE_ELEMENT = 'div'
808
-
809
- /** @beta */
810
- export declare const DEFAULT_TREE_ITEM_ELEMENT = 'a'
811
-
812
- /** @beta */
813
- export declare const DEFAULT_VIRTUAL_LIST_ELEMENT = 'div'
814
-
815
- /** @public */
816
- export declare type Delay =
817
- | number
818
- | Partial<{
819
- open: number
820
- close: number
821
- }>
822
-
823
- /**
824
- * The Dialog component.
825
- *
826
- * @public
827
- */
828
- export declare function Dialog<E extends DialogElementType = typeof DEFAULT_DIALOG_ELEMENT>(
829
- props: DialogProps<E>,
830
- ): React.JSX.Element
831
-
832
- /**
833
- * @internal
834
- */
835
- export declare const DialogContext: Context<DialogContextValue>
836
-
837
- /**
838
- * This API might change. DO NOT USE IN PRODUCTION.
839
- * @beta
840
- */
841
- export declare interface DialogContextValue {
842
- version: 0.0
843
- position?: ResponsiveProp<DialogPosition>
844
- zOffset?: ResponsiveProp<number>
845
- }
327
+ export declare type GridParentProps = {
328
+ /** CSS **grid-auto-flow** property */
329
+ gridAutoFlow?: Responsive<GridAutoFlow>;
330
+ /** CSS **grid-auto-columns** property */
331
+ gridAutoColumns?: Responsive<string>;
332
+ /** CSS **grid-auto-row** property */
333
+ gridAutoRows?: Responsive<string>;
334
+ /** CSS **grid-template-columns** property */
335
+ gridTemplateColumns?: Responsive<string>;
336
+ /** CSS **grid-template-rows** property */
337
+ gridTemplateRows?: Responsive<string>;
338
+ };
846
339
 
847
340
  /** @public */
848
- export declare type DialogElementType = 'div' | 'span' | ComponentType
849
-
850
- /** @public */
851
- export declare type DialogOwnProps = ContainerStyleProps &
852
- Omit<LayerOwnProps, 'width'> & {
853
- /**
854
- * @beta
855
- */
856
- __unstable_autoFocus?: boolean
857
- /**
858
- * @beta
859
- */
860
- __unstable_hideCloseButton?: boolean
861
- /**
862
- * Whether the dialog should animate in on mount.
863
- *
864
- * @beta
865
- * @defaultValue false
866
- */
867
- animate?: boolean
868
- cardRadius?: ResponsiveProp<Radius>
869
- contentRef?: ForwardedRef<HTMLDivElement>
870
- footer?: ReactNode
871
- header?: ReactNode
872
- id: string
873
- /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
874
- onActivate?: LayerProps['onActivate']
875
- onClickOutside?: () => void
876
- onClose?: () => void
877
- open?: boolean
878
- portal?: string
879
- position?: ResponsiveProp<DialogPosition>
880
- scheme?: ColorScheme
881
- tone?: CardTone | 'inherit'
882
- zOffset?: number | number[]
883
- }
884
-
885
- /** @public */
886
- export declare type DialogPosition = 'absolute' | 'fixed'
887
-
888
- /** @public */
889
- export declare type DialogProps<E extends DialogElementType = DialogElementType> = Props<
890
- DialogOwnProps,
891
- E
892
- >
893
-
894
- /**
895
- * This API might change. DO NOT USE IN PRODUCTION.
896
- * @beta
897
- */
898
- export declare function DialogProvider(props: DialogProviderProps): React.JSX.Element
899
-
900
- /**
901
- * This API might change. DO NOT USE IN PRODUCTION.
902
- * @beta
903
- */
904
- export declare interface DialogProviderProps {
905
- children?: ReactNode
906
- position?: ResponsiveProp<DialogPosition>
907
- zOffset?: ResponsiveProp<number>
908
- }
909
-
910
- /**
911
- * DO NOT USE IN PRODUCTION.
912
- * @beta
913
- */
914
- export declare function ElementQuery<
915
- E extends ElementQueryElementType = typeof DEFAULT_ELEMENT_QUERY_ELEMENT,
916
- >(props: ElementQueryProps<E>): React.JSX.Element
917
-
918
- /** @beta */
919
- export declare type ElementQueryElementType = 'div' | ComponentType
920
-
921
- /**
922
- * DO NOT USE IN PRODUCTION.
923
- * @beta
924
- */
925
- export declare type ElementQueryOwnProps = {
926
- media?: number[]
927
- }
928
-
929
- /**
930
- * DO NOT USE IN PRODUCTION.
931
- * @beta
932
- */
933
- export declare type ElementQueryProps<E extends ElementQueryElementType = ElementQueryElementType> =
934
- Props<ElementQueryOwnProps, E>
935
-
936
- /**
937
- * @beta
938
- */
939
- export declare interface ElementRectValue {
940
- width: number
941
- height: number
942
- }
943
-
944
- /**
945
- * @beta
946
- */
947
- export declare interface ElementSize {
948
- content: ElementRectValue
949
- border: ElementRectValue
950
- /** @deprecated INTERNAL ONLY */
951
- _contentRect: DOMRectReadOnly
341
+ export declare interface GridProps<T extends React.ElementType = "div">
342
+ extends GridParentProps, GapProps, LayoutProps {
343
+ /** Element to render */
344
+ as?: T;
345
+ /** CSS **display** property */
346
+ display?: Responsive<DisplayGrid>;
952
347
  }
953
348
 
954
- /**
955
- * @internal
956
- */
957
- export declare interface _ElementSizeListener {
958
- subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
959
- }
960
-
961
- /**
962
- * @internal
963
- */
964
- export declare interface _ElementSizeObserver {
965
- subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
966
- }
967
-
968
- /**
969
- * @internal
970
- */
971
- export declare const _elementSizeObserver: _ElementSizeObserver
972
-
973
- /**
974
- * @internal
975
- */
976
- export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
977
-
978
349
  /** @public */
979
- export declare type ElementType<P> = TagType | ComponentType<P>
350
+ export declare function Heading<T extends ElementType = "h2">({
351
+ size,
352
+ weight,
353
+ ...props
354
+ }: HeadingProps &
355
+ Omit<ComponentPropsWithRef<T>, keyof HeadingProps>): JSX.Element;
980
356
 
981
- /** @public */
982
- export declare type EmptyProps = {}
983
-
984
- /**
985
- * DO NOT USE IN PRODUCTION
986
- * @beta
987
- */
988
- export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
989
- state: ErrorBoundaryState
990
- static displayName: string
991
- static getDerivedStateFromError(error: Error): ErrorBoundaryState
992
- componentDidCatch(error: Error, info: ErrorInfo): void
993
- render(): ReactNode
994
- }
995
-
996
- /**
997
- * DO NOT USE IN PRODUCTION
998
- * @beta
999
- */
1000
- export declare type ErrorBoundaryProps = PropsWithChildren<{
1001
- onCatch: (params: {error: Error; info: ErrorInfo}) => void
1002
- }>
1003
-
1004
- /**
1005
- * DO NOT USE IN PRODUCTION
1006
- * @beta
1007
- */
1008
- export declare interface ErrorBoundaryState {
1009
- error: Error | null
1010
- }
1011
-
1012
- /**
1013
- * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
1014
- *
1015
- * @public
1016
- */
1017
- export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
1018
- props: FlexProps<E>,
1019
- ): React.JSX.Element
357
+ declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
1020
358
 
1021
- /** @public */
1022
- export declare type FlexElementType = BoxElementType
359
+ declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
1023
360
 
1024
361
  /** @public */
1025
- export declare type FlexOwnProps = Omit<
1026
- BoxOwnProps,
1027
- 'align' | 'display' | 'flexDirection' | 'flexWrap'
1028
- > & {
1029
- align?: ResponsiveProp<AlignItems>
1030
- direction?: ResponsiveProp<FlexDirection>
1031
- justify?: ResponsiveProp<JustifyContent>
1032
- wrap?: ResponsiveProp<FlexWrap>
362
+ export declare interface HeadingProps extends TypographyProps {
363
+ /** Element to render */
364
+ as?: HeadingTag;
365
+ /** CSS **font-size** property */
366
+ size?: Responsive<HeadingSize>;
1033
367
  }
1034
368
 
1035
369
  /** @public */
1036
- export declare type FlexProps<E extends FlexElementType = FlexElementType> = Props<FlexOwnProps, E>
1037
-
1038
- /**
1039
- * @internal
1040
- */
1041
- export declare function focusFirstDescendant(element: HTMLElement): boolean
1042
-
1043
- /**
1044
- * @internal
1045
- */
1046
- export declare function focusLastDescendant(element: HTMLElement): boolean
370
+ export declare type HeadingSize = (typeof HEADING_SIZE)[number];
1047
371
 
1048
- /**
1049
- * @internal
1050
- */
1051
- export declare function _getArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
372
+ declare type HeadingTag = (typeof HEADING_TAG)[number];
1052
373
 
1053
- /**
1054
- * @internal
1055
- */
1056
- export declare function _getResponsiveProp<T>(
1057
- val: ResponsiveProp<T> | undefined,
1058
- defaultVal?: Partial<Record<Breakpoint, T>>,
1059
- ): Partial<Record<Breakpoint, T>>
1060
-
1061
- /**
1062
- * The `Grid` component is for building 2-dimensional layers (based on CSS grid).
1063
- *
1064
- * @public
1065
- */
1066
- export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
1067
- props: GridProps<E>,
1068
- ): React.JSX.Element
374
+ declare type HeightProps = {
375
+ /** CSS **height** property */
376
+ height?: Responsive<string>;
377
+ /** CSS **min-height** property */
378
+ minHeight?: Responsive<string>;
379
+ /** CSS **max-height** property */
380
+ maxHeight?: Responsive<string>;
381
+ };
1069
382
 
1070
383
  /** @public */
1071
- export declare type GridElementType = BoxElementType
384
+ export declare function HStack<T extends ElementType = "div">(
385
+ props: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>,
386
+ ): JSX.Element;
1072
387
 
1073
388
  /** @public */
1074
- export declare type GridOwnProps = Omit<BoxOwnProps, 'display'>
389
+ export declare interface HStackProps<
390
+ T extends React.ElementType = "div",
391
+ > extends Pick<GapProps, "gap"> {
392
+ /** Element to render */
393
+ as?: T;
394
+ }
1075
395
 
1076
396
  /** @public */
1077
- export declare type GridProps<E extends GridElementType = GridElementType> = Props<GridOwnProps, E>
1078
-
1079
- /**
1080
- * @internal
1081
- */
1082
- export declare function _hasFocus(element: HTMLElement): boolean
397
+ export declare function Icon({ size, ...props }: IconProps): JSX.Element;
1083
398
 
1084
- /**
1085
- * Typographic headings.
1086
- *
1087
- * @public
1088
- */
1089
- export declare function Heading<E extends HeadingElementType = typeof DEFAULT_HEADING_ELEMENT>(
1090
- props: HeadingProps<E>,
1091
- ): React.JSX.Element
399
+ declare const ICON_SIZE: readonly [0, 1, 2, 3, 4];
1092
400
 
1093
401
  /** @public */
1094
- export declare type HeadingElementType =
1095
- | 'div'
1096
- | 'h1'
1097
- | 'h2'
1098
- | 'h3'
1099
- | 'h4'
1100
- | 'h5'
1101
- | 'h6'
1102
- | 'label'
1103
- | 'span'
1104
- | ComponentType
402
+ export declare function IconButton<T extends ElementType = "button">(
403
+ props: IconButtonProps<T> &
404
+ Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>,
405
+ ): JSX.Element;
1105
406
 
1106
407
  /** @public */
1107
- export declare type HeadingOwnProps = HeadingStyleProps & TextOverflowStyleProps
1108
-
1109
- /** @public */
1110
- export declare type HeadingProps<E extends HeadingElementType = HeadingElementType> = Props<
1111
- HeadingOwnProps,
1112
- E
1113
- >
1114
-
1115
- /**
1116
- * This API might change. DO NOT USE IN PRODUCTION.
1117
- * @beta
1118
- */
1119
- export declare function HeadingSkeleton<
1120
- E extends HeadingSkeletonElementType = typeof DEFAULT_HEADING_SKELETON_ELEMENT,
1121
- >(props: HeadingSkeletonProps<E>): React.JSX.Element
1122
-
1123
- /** @beta */
1124
- export declare type HeadingSkeletonElementType = SkeletonElementType
1125
-
1126
- /** @beta */
1127
- export declare type HeadingSkeletonOwnProps = SkeletonOwnProps & {
1128
- size?: ResponsiveProp<FontHeadingSize>
408
+ export declare interface IconButtonProps<
409
+ T extends React_2.ElementType = "button",
410
+ > extends Pick<
411
+ ButtonProps<T>,
412
+ "as" | "density" | "level" | "loading" | "tone"
413
+ > {
414
+ /** Button label */
415
+ "aria-label": string;
416
+ /** Icon */
417
+ icon: React_2.ComponentType<SVGProps<SVGSVGElement>>;
1129
418
  }
1130
419
 
1131
- /**
1132
- * This API might change. DO NOT USE IN PRODUCTION.
1133
- * @beta
1134
- */
1135
- export declare type HeadingSkeletonProps<
1136
- E extends HeadingSkeletonElementType = HeadingSkeletonElementType,
1137
- > = Props<HeadingSkeletonOwnProps, E>
1138
-
1139
- /**
1140
- * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
1141
- *
1142
- * @public
1143
- */
1144
- export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
1145
- props: HotkeysProps<E>,
1146
- ): React.JSX.Element | undefined
1147
-
1148
420
  /** @public */
1149
- export declare type HotkeysElementType = 'kbd' | ComponentType
1150
-
1151
- /** @public */
1152
- export declare interface HotkeysOwnProps extends GapStyleProps, RadiusStyleProps {
1153
- fontSize?: ResponsiveProp<FontTextSize>
1154
- padding?: ResponsiveProp<Space>
1155
- keys?: string[]
421
+ export declare interface IconProps
422
+ extends
423
+ ComponentProps<"svg">,
424
+ Pick<TypographyProps, "muted">,
425
+ MarginProps,
426
+ ToneProps {
427
+ /** Icon to render */
428
+ icon: React.ComponentType<SVGProps<SVGSVGElement>>;
429
+ /** CSS **font-size** property */
430
+ size?: Responsive<IconSize>;
1156
431
  }
1157
432
 
1158
433
  /** @public */
1159
- export declare type HotkeysProps<E extends HotkeysElementType = HotkeysElementType> = Props<
1160
- HotkeysOwnProps,
1161
- E
1162
- >
1163
-
1164
- /**
1165
- * The `Inline` component is a layout utility for aligning and spacing items horizontally.
1166
- *
1167
- * @public
1168
- */
1169
- export declare function Inline<E extends InlineElementType = typeof DEFAULT_INLINE_ELEMENT>(
1170
- props: InlineProps<E>,
1171
- ): React.JSX.Element
1172
-
1173
- /** @public */
1174
- export declare type InlineElementType = BoxElementType
1175
-
1176
- /** @public */
1177
- export declare type InlineOwnProps = Omit<
1178
- BoxOwnProps,
1179
- | 'alignItems'
1180
- | 'flexDirection'
1181
- | 'flexWrap'
1182
- | 'justifyContent'
1183
- | 'gridAutoColumns'
1184
- | 'gridAutoFlow'
1185
- | 'gridAutoRows'
1186
- | 'gridColumnEnd'
1187
- | 'gridColumnStart'
1188
- | 'gridColumn'
1189
- | 'gridRowEnd'
1190
- | 'gridRowStart'
1191
- | 'gridRow'
1192
- | 'gridTemplateColumns'
1193
- | 'gridTemplateRows'
1194
- >
1195
-
1196
- /** @public */
1197
- export declare type InlineProps<E extends InlineElementType = InlineElementType> = Props<
1198
- InlineOwnProps,
1199
- E
1200
- >
1201
-
1202
- /**
1203
- * @internal
1204
- */
1205
- export declare function _isEnterToClickElement(element: HTMLElement): boolean
1206
-
1207
- /**
1208
- * @internal
1209
- */
1210
- export declare function isFocusable(element: HTMLElement): boolean
1211
-
1212
- /**
1213
- * @internal
1214
- */
1215
- export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement
1216
-
1217
- /**
1218
- * @internal
1219
- */
1220
- export declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement
1221
-
1222
- /**
1223
- * @internal
1224
- */
1225
- export declare function isHTMLElement(node: unknown): node is HTMLElement
1226
-
1227
- /**
1228
- * @internal
1229
- */
1230
- export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement
1231
-
1232
- /**
1233
- * @internal
1234
- */
1235
- export declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement
1236
-
1237
- /**
1238
- * @internal
1239
- */
1240
- export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement
1241
-
1242
- /**
1243
- * @internal
1244
- */
1245
- export declare function _isScrollable(el: Node): boolean
1246
-
1247
- /**
1248
- * Used to define some text as keyboard input.
1249
- *
1250
- * @public
1251
- */
1252
- export declare function KBD<E extends KBDElementType = typeof DEFAULT_KBD_ELEMENT>(
1253
- props: KBDProps<E>,
1254
- ): React.JSX.Element
1255
-
1256
- /** @public */
1257
- export declare type KBDElementType = 'kbd' | ComponentType
1258
-
1259
- /** @public */
1260
- export declare type KBDOwnProps = BoxOwnProps &
1261
- RadiusStyleProps & {
1262
- fontSize?: ResponsiveProp<FontTextSize>
1263
- }
1264
-
1265
- /** @public */
1266
- export declare type KBDProps<E extends KBDElementType = KBDElementType> = Props<KBDOwnProps, E>
1267
-
1268
- /**
1269
- * Typographic labels.
1270
- *
1271
- * @public
1272
- */
1273
- export declare function Label<E extends LabelElementType = typeof DEFAULT_LABEL_ELEMENT>(
1274
- props: LabelProps<E>,
1275
- ): React.JSX.Element
1276
-
1277
- /** @public */
1278
- export declare type LabelElementType =
1279
- | 'div'
1280
- | 'h1'
1281
- | 'h2'
1282
- | 'h3'
1283
- | 'h4'
1284
- | 'h5'
1285
- | 'h6'
1286
- | 'label'
1287
- | 'li'
1288
- | 'p'
1289
- | 'span'
1290
- | ComponentType
1291
-
1292
- /** @public */
1293
- export declare type LabelOwnProps = LabelStyleProps & TextOverflowStyleProps
1294
-
1295
- /** @public */
1296
- export declare type LabelProps<E extends LabelElementType = LabelElementType> = Props<
1297
- LabelOwnProps,
1298
- E
1299
- >
1300
-
1301
- /**
1302
- * This API might change. DO NOT USE IN PRODUCTION.
1303
- * @beta
1304
- */
1305
- export declare function LabelSkeleton<
1306
- E extends LabelSkeletonElementType = typeof DEFAULT_LABEL_SKELETON_ELEMENT,
1307
- >(props: LabelSkeletonProps<E>): React.JSX.Element
434
+ export declare type IconSize = (typeof ICON_SIZE)[number];
1308
435
 
1309
436
  /** @beta */
1310
- export declare type LabelSkeletonElementType = SkeletonElementType
437
+ export declare function Indicator<T extends ElementType = "span">({
438
+ tone,
439
+ ...props
440
+ }: IndicatorProps<T> &
441
+ Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>): JSX.Element;
1311
442
 
1312
443
  /** @beta */
1313
- export declare type LabelSkeletonOwnProps = SkeletonOwnProps & {
1314
- size?: ResponsiveProp<FontLabelSize>
1315
- }
1316
-
1317
- /**
1318
- * This API might change. DO NOT USE IN PRODUCTION.
1319
- * @beta
1320
- */
1321
- export declare type LabelSkeletonProps<
1322
- E extends LabelSkeletonElementType = LabelSkeletonElementType,
1323
- > = Props<LabelSkeletonOwnProps, E>
1324
-
1325
- /** @public */
1326
- export declare function Layer<E extends LayerElementType = typeof DEFAULT_LAYER_ELEMENT>(
1327
- props: LayerProps<E>,
1328
- ): React.JSX.Element
1329
-
1330
- /** @public */
1331
- export declare interface LayerContextValue {
1332
- version: 0.0
1333
- isTopLayer: boolean
1334
- level?: number
1335
- registerChild: (childLevel?: number) => () => void
1336
- size: number
1337
- zIndex: number
444
+ export declare interface IndicatorProps<
445
+ T extends React.ElementType = "span",
446
+ > extends ToneProps {
447
+ /** Element to render */
448
+ as?: T;
449
+ /** Label for aria-label attribute */
450
+ label?: string;
1338
451
  }
1339
452
 
1340
453
  /** @public */
1341
- export declare type LayerElementType = CardElementType
454
+ export declare function IndicatorStack<T extends ElementType = "div">(
455
+ props: IndicatorStackProps<T> &
456
+ Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>,
457
+ ): JSX.Element;
1342
458
 
1343
459
  /** @public */
1344
- export declare type LayerOwnProps = CardOwnProps & {
1345
- /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
1346
- onActivate?: (props: {activeElement: HTMLElement | null}) => void
1347
- zOffset?: ResponsiveProp<number>
460
+ export declare interface IndicatorStackProps<
461
+ T extends React.ElementType = "div",
462
+ > {
463
+ /** Element to render */
464
+ as?: T;
1348
465
  }
1349
466
 
467
+ /** @deprecated Use HStack component instead */
1350
468
  /** @public */
1351
- export declare type LayerProps<E extends LayerElementType = LayerElementType> = Props<
1352
- LayerOwnProps,
1353
- E
1354
- >
1355
-
1356
- /** @public */
1357
- export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element
1358
-
1359
- /** @public */
1360
- export declare interface LayerProviderProps {
1361
- children?: ReactNode
1362
- zOffset?: ResponsiveProp<number>
1363
- }
1364
-
1365
- /**
1366
- * @internal
1367
- */
1368
- export declare interface _MediaStore {
1369
- subscribe: (onStoreChange: () => void) => () => void
1370
- getSnapshot: () => Breakpoint
1371
- }
1372
-
1373
- /**
1374
- * The `Menu` component is a building block for application menus.
1375
- *
1376
- * @public
1377
- */
1378
- export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
1379
- props: MenuProps<E>,
1380
- ): React.JSX.Element
1381
-
1382
- /**
1383
- * The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
1384
- *
1385
- * @public
1386
- */
1387
- export declare function MenuButton(props: MenuButtonProps): React.JSX.Element
469
+ export declare function Inline<T extends ElementType = "div">(
470
+ props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>,
471
+ ): JSX.Element;
1388
472
 
473
+ /** @deprecated Use HStack component instead */
1389
474
  /** @public */
1390
- export declare type MenuButtonProps = {
1391
- /**
1392
- * @beta Do not use in production.
1393
- */
1394
- __unstable_disableRestoreFocusOnClose?: boolean
1395
- button: ReactElement<ButtonProps>
1396
- id: string
1397
- menu?: ReactElement
1398
- onClose?: () => void
1399
- onOpen?: () => void
1400
- popover?: Omit<PopoverProps, 'content' | 'open'>
1401
- ref?: ForwardedRef<HTMLButtonElement | null>
475
+ export declare interface InlineProps<
476
+ T extends React.ElementType = "div",
477
+ > extends PaddingProps {
478
+ /** Element to render */
479
+ as?: T;
480
+ /** CSS **gap** property */
481
+ gap?: Responsive<SpaceInherit>;
1402
482
  }
1403
483
 
1404
- /** @public */
1405
- export declare function MenuDivider<
1406
- E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
1407
- >(props: MenuDividerProps<E>): React.JSX.Element
484
+ declare const INTERACTIVE_TAG: readonly ["button", "a"];
1408
485
 
1409
- /** @public */
1410
- export declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
486
+ declare type InteractiveAs<T extends React.ElementType> =
487
+ T extends InteractiveTag ? T : T extends string ? never : T;
1411
488
 
1412
- /** @public */
1413
- export declare type MenuDividerOwnProps = {}
489
+ declare type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
1414
490
 
1415
- /** @public */
1416
- export declare type MenuDividerProps<E extends MenuDividerElementType = MenuDividerElementType> =
1417
- Props<MenuDividerOwnProps, E>
1418
-
1419
- /** @public */
1420
- export declare type MenuElementType = 'div' | 'span' | ComponentType
491
+ declare const JUSTIFY_CONTENT: readonly [
492
+ "flex-start",
493
+ "flex-end",
494
+ "center",
495
+ "space-between",
496
+ "space-around",
497
+ "space-evenly",
498
+ ];
1421
499
 
1422
500
  /** @public */
1423
- export declare function MenuGroup<
1424
- E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
1425
- >(props: MenuGroupProps<E>): React.JSX.Element
501
+ export declare type JustifyContent = (typeof JUSTIFY_CONTENT)[number];
1426
502
 
1427
- /** @public */
1428
- export declare type MenuGroupElementType = 'button' | ComponentType
503
+ /** @beta */
504
+ export declare function Label(props: LabelProps): JSX.Element;
1429
505
 
1430
- /** @public */
1431
- export declare type MenuGroupOwnProps = RadiusStyleProps & {
1432
- disabled?: boolean
1433
- fontSize?: ResponsiveProp<FontTextSize>
1434
- gap?: ResponsiveProp<Space>
1435
- icon?: ElementType_2 | ReactNode
1436
- menu?: Omit<
1437
- MenuProps<typeof DEFAULT_MENU_ELEMENT>,
1438
- | 'onClickOutside'
1439
- | 'onEscape'
1440
- | 'onItemClick'
1441
- | 'onKeyDown'
1442
- | 'onMouseEnter'
1443
- | 'registerElement'
1444
- | 'shouldFocus'
1445
- | 'onBlurCapture'
1446
- >
1447
- padding?: ResponsiveProp<Space>
1448
- popover?: Omit<PopoverProps, 'content' | 'open'>
1449
- text?: ReactNode
1450
- tone?: ElementTone
506
+ /** @beta */
507
+ export declare interface LabelProps
508
+ extends React.ComponentProps<"label">, MarginProps {
509
+ /** Element to render */
510
+ disabled?: boolean;
511
+ error?: boolean;
1451
512
  }
1452
513
 
1453
514
  /** @public */
1454
- export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
1455
- MenuGroupOwnProps,
1456
- E
1457
- >
1458
-
1459
- /** @public */
1460
- export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
1461
- props: MenuItemProps<E>,
1462
- ): React.JSX.Element
1463
-
1464
- /** @public */
1465
- export declare type MenuItemElementType = 'button' | 'a' | ComponentType
1466
-
1467
- /** @public */
1468
- export declare type MenuItemOwnProps = GapStyleProps &
1469
- PaddingStyleProps &
1470
- RadiusStyleProps & {
1471
- disabled?: boolean
1472
- fontSize?: ResponsiveProp<FontTextSize>
1473
- hotkeys?: string[]
1474
- icon?: ElementType_2 | ReactNode
1475
- iconRight?: ElementType_2 | ReactNode
1476
- pressed?: boolean
1477
- selected?: boolean
1478
- text?: ReactNode
1479
- tone?: ElementTone
1480
- }
1481
-
1482
- /** @public */
1483
- export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Props<
1484
- MenuItemOwnProps,
1485
- E
1486
- >
515
+ export declare interface LayoutProps
516
+ extends
517
+ ToneProps,
518
+ WidthProps,
519
+ HeightProps,
520
+ MarginProps,
521
+ BorderProps,
522
+ PaddingProps,
523
+ PositionProps,
524
+ OverflowProps,
525
+ FlexChildProps,
526
+ GridChildProps,
527
+ ZIndexProps,
528
+ ShadowProps {}
1487
529
 
1488
- /** @public */
1489
- export declare type MenuOwnProps = PaddingStyleProps & {
1490
- 'gap'?: ResponsiveProp<Space>
1491
- 'onClickOutside'?: (event: MouseEvent) => void
1492
- 'onEscape'?: () => void
1493
- 'onItemClick'?: () => void
1494
- 'onItemSelect'?: (index: number) => void
1495
- 'originElement'?: HTMLElement | null
1496
- 'registerElement'?: (el: HTMLElement) => () => void
1497
- 'shouldFocus'?: 'first' | 'last' | null
1498
- 'aria-labelledby'?: string
1499
- }
530
+ /** @beta */
531
+ export declare function Link({ underlined, ...props }: LinkProps): JSX.Element;
1500
532
 
1501
- /** @public */
1502
- export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
1503
-
1504
- /**
1505
- * Placement of floating UI elements.
1506
- *
1507
- * @public
1508
- */
1509
- export declare type Placement =
1510
- | 'top'
1511
- | 'top-start'
1512
- | 'top-end'
1513
- | 'right'
1514
- | 'right-start'
1515
- | 'right-end'
1516
- | 'bottom'
1517
- | 'bottom-start'
1518
- | 'bottom-end'
1519
- | 'left'
1520
- | 'left-start'
1521
- | 'left-end'
1522
-
1523
- /**
1524
- * The `Popover` component is used to display some content on top of another.
1525
- *
1526
- * @public
1527
- */
1528
- export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
1529
- props: PopoverProps<E>,
1530
- ): React.JSX.Element
1531
-
1532
- /** @public */
1533
- export declare type PopoverElementType = 'div' | ComponentType
1534
-
1535
- /**
1536
- * @beta
1537
- */
1538
- export declare type PopoverMargins = [number, number, number, number]
1539
-
1540
- /** @public */
1541
- export declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
1542
- /** @beta */
1543
- __unstable_margins?: PopoverMargins
1544
- /**
1545
- * Whether the popover should animate in and out.
1546
- *
1547
- * @beta
1548
- * @defaultValue false
1549
- */
1550
- animate?: boolean
1551
- arrow?: boolean
1552
- children?: ReactElement<{
1553
- ref: ForwardedRef<HTMLElement>
1554
- }>
1555
- /**
1556
- * When `true`, prevent overflow within the current boundary:
1557
- * - by flipping on its side axis
1558
- * - by resizing
1559
- *
1560
- * Note that:
1561
- * - setting `preventOverflow` to `true` also prevents overflow on its side axis
1562
- * - setting `matchReferenceWidth` to `true` also causes the popover to resize
1563
- *
1564
- * @defaultValue false
1565
- */
1566
- constrainSize?: boolean
1567
- content?: ReactNode
1568
- disabled?: boolean
1569
- fallbackPlacements?: Placement[]
1570
- floatingBoundary?: HTMLElement | null
1571
- /**
1572
- * When `true`, set the maximum width to match the reference element, and also prevent overflow within
1573
- * the current boundary by resizing.
1574
- *
1575
- * Note that setting `constrainSize` to `true` also causes the popover to resize
1576
- *
1577
- * @defaultValue false
1578
- */
1579
- matchReferenceWidth?: boolean
1580
- /**
1581
- * When true, blocks all pointer interaction with elements beneath the popover until closed.
1582
- *
1583
- * @beta
1584
- * @defaultValue false
1585
- */
1586
- modal?: boolean
1587
- open?: boolean
1588
- placement?: Placement
533
+ /** @beta */
534
+ export declare interface LinkProps extends React.ComponentProps<"a"> {
535
+ /** If true, sets `target="_blank"` and `rel="noopener noreferrer"` */
536
+ openInNewTab?: boolean;
1589
537
  /**
1590
- * When 'flip' (default), the placement is determined from the initial placement and the
1591
- * fallback placements in order. Whichever fits in the viewport first.
1592
- *
1593
- * When 'autoPlacement', the initial placement and all fallback placements are evaluated
1594
- * and the placement with the most viewport space available.
538
+ * If true, sets `text-decoration: underline`
1595
539
  *
1596
- * Option is only relevant if either `constrainSize` or `preventOverflow` is `true`
1597
- */
1598
- placementStrategy?: 'flip' | 'autoPlacement'
1599
- /** Whether or not to render the popover in a portal element. */
1600
- portal?: boolean | string
1601
- preventOverflow?: boolean
1602
- referenceBoundary?: HTMLElement | null
1603
- /**
1604
- * When defined, the popover will be positioned relative to this element.
1605
- * The children of the popover won't be rendered.
540
+ * @defaultValue true
1606
541
  */
1607
- referenceElement?: HTMLElement | null
1608
- /** @beta */
1609
- updateRef?: Ref<PopoverUpdateCallback | undefined>
1610
- width?: ResponsiveProp<MaxWidth>
542
+ underlined?: boolean;
1611
543
  }
1612
544
 
1613
- /** @public */
1614
- export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
1615
- PopoverOwnProps,
1616
- E
1617
- >
1618
-
1619
545
  /** @beta */
1620
- export declare type PopoverUpdateCallback = () => void
546
+ export declare const List: typeof ListRoot;
1621
547
 
1622
- /** @public */
1623
- export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
548
+ declare const LIST_TAG: readonly ["ol", "ul"];
1624
549
 
1625
- /** @public */
1626
- export declare function Portal(props: PortalProps): ReactPortal | null
550
+ declare function ListButtonItem<T extends ElementType = "button">({
551
+ density,
552
+ ...props
553
+ }: ListButtonItemProps<T> &
554
+ Omit<ComponentPropsWithRef<T>, keyof ListButtonItemProps<T>>): JSX.Element;
1627
555
 
1628
- /** @public */
1629
- export declare interface PortalContextValue {
1630
- version: 0.0
1631
- boundaryElement: HTMLElement | null
1632
- element: HTMLElement | null
1633
- elements?: Record<string, HTMLElement | null | undefined>
1634
- }
1635
-
1636
- /** @public */
1637
- export declare interface PortalProps {
1638
- children: ReactNode
1639
- /**
1640
- * @beta This API might change. DO NOT USE IN PRODUCTION.
1641
- */
1642
- __unstable_name?: string
1643
- }
1644
-
1645
- /** @public */
1646
- export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element
1647
-
1648
- /** @public */
1649
- export declare interface PortalProviderProps {
1650
- children: ReactNode
1651
- element?: HTMLElement | null
1652
- /**
1653
- * @beta
1654
- */
1655
- __unstable_elements?: Record<string, HTMLElement | null | undefined>
556
+ /** @beta */
557
+ export declare interface ListButtonItemProps<
558
+ T extends React_2.ElementType = "button",
559
+ > extends ListItemProps {
560
+ /** Element to render */
561
+ as?: InteractiveAs<T>;
562
+ /** Selected state */
563
+ selected?: boolean;
1656
564
  }
1657
565
 
1658
- /** @public */
1659
- export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
1660
- E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
1661
- P & {
1662
- as?: E
1663
- }
1664
- >
1665
-
1666
- /**
1667
- * The `Radio` component allows the user to select one option from a set.
1668
- *
1669
- * @public
1670
- */
1671
- export declare function Radio<E extends RadioElementType = typeof DEFAULT_RADIO_ELEMENT>(
1672
- props: RadioProps<E>,
1673
- ): React.JSX.Element
566
+ declare function ListItem({ density, ...props }: ListItemProps): JSX.Element;
1674
567
 
1675
- /** @public */
1676
- export declare type RadioElementType = 'input' | ComponentType
568
+ declare function ListItemImage(props: ComponentProps<"img">): JSX.Element;
1677
569
 
1678
- /** @public */
1679
- export declare type RadioOwnProps = {
1680
- customValidity?: string
570
+ /** @beta */
571
+ export declare interface ListItemProps extends React_2.ComponentProps<"li"> {
572
+ /** Composite prop for setting padding and gap */
573
+ density?: Responsive<Density>;
574
+ /** Starting slot */
575
+ start?: React_2.ReactNode;
576
+ /** Ending slot */
577
+ end?: React_2.ReactNode;
1681
578
  }
1682
579
 
1683
- /** @public */
1684
- export declare type RadioProps<E extends RadioElementType = RadioElementType> = Props<
1685
- RadioOwnProps,
1686
- E
1687
- >
1688
-
1689
- /**
1690
- * @internal
1691
- */
1692
- export declare function _raf(fn: () => void): () => void
1693
-
1694
- /**
1695
- * @internal
1696
- */
1697
- export declare function _raf2(fn: () => void): () => void
1698
-
1699
- /**
1700
- * @internal
1701
- */
1702
- export declare const _ResizeObserver: typeof ResizeObserver
1703
-
1704
- /**
1705
- * @internal
1706
- */
1707
- export declare interface ResponsiveWidthStyleProps {
1708
- $width: (number | 'auto')[]
580
+ declare function ListItemText<T extends ElementType = "div">(
581
+ props: ListItemTextProps<T> &
582
+ Omit<ComponentPropsWithRef<T>, keyof ListItemTextProps<T>>,
583
+ ): JSX.Element;
584
+
585
+ /** @beta */
586
+ export declare interface ListItemTextProps<
587
+ T extends React_2.ElementType = "div",
588
+ > {
589
+ /** Element to render */
590
+ as?: T;
591
+ /** Title text */
592
+ title?: React_2.ReactNode;
593
+ /** Subtitle text */
594
+ subtitle?: React_2.ReactNode;
1709
595
  }
1710
596
 
1711
- /**
1712
- * The `Root` component.
1713
- *
1714
- * @public
1715
- */
1716
- export declare function Root<E extends RootElementType = typeof DEFAULT_ROOT_ELEMENT>(
1717
- props: RootProps<E>,
1718
- ): React.JSX.Element
1719
-
1720
- /** @public */
1721
- export declare type RootElementType = 'html' | 'body' | 'div'
1722
-
1723
- /** @public */
1724
- export declare interface RootOwnProps extends BoxOwnProps, RootStyleProps {}
597
+ /** @beta */
598
+ export declare interface ListProps<T extends ListTag = "ul"> extends Pick<
599
+ GapProps,
600
+ "gap"
601
+ > {
602
+ /** Element to render */
603
+ as?: T;
604
+ }
605
+
606
+ declare function ListRoot<T extends ListTag = "ul">(
607
+ props: ListProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListProps<T>>,
608
+ ): JSX.Element;
609
+
610
+ declare namespace ListRoot {
611
+ var displayName: string;
612
+ var Item: typeof ListItem;
613
+ var ButtonItem: typeof ListButtonItem;
614
+ var ItemText: typeof ListItemText;
615
+ var ItemImage: typeof ListItemImage;
616
+ }
617
+
618
+ declare type ListTag = (typeof LIST_TAG)[number];
619
+
620
+ /** @public */
621
+ export declare type MarginProps = {
622
+ /** CSS **margin** property */
623
+ margin?: Responsive<SpaceAutoNegative>;
624
+ /** CSS **margin-left** and **margin-right** properties */
625
+ marginX?: Responsive<SpaceAutoNegative>;
626
+ /** CSS **margin-top** and **margin-bottom** properties */
627
+ marginY?: Responsive<SpaceAutoNegative>;
628
+ /** CSS **margin-top** property */
629
+ marginTop?: Responsive<SpaceAutoNegative>;
630
+ /** CSS **margin-right** property */
631
+ marginRight?: Responsive<SpaceAutoNegative>;
632
+ /** CSS **margin-bottom** property */
633
+ marginBottom?: Responsive<SpaceAutoNegative>;
634
+ /** CSS **margin-left** property */
635
+ marginLeft?: Responsive<SpaceAutoNegative>;
636
+ };
637
+
638
+ declare const OVERFLOW: readonly [
639
+ "visible",
640
+ "hidden",
641
+ "auto",
642
+ "scroll",
643
+ "clip",
644
+ ];
645
+
646
+ /** @public */
647
+ export declare type Overflow = (typeof OVERFLOW)[number];
648
+
649
+ declare type OverflowProps = {
650
+ /** CSS **overflow** property */
651
+ overflow?: Responsive<Overflow>;
652
+ /** CSS **overflow-x** property */
653
+ overflowX?: Responsive<Overflow>;
654
+ /** CSS **overflow-y** property */
655
+ overflowY?: Responsive<Overflow>;
656
+ };
1725
657
 
1726
658
  /** @public */
1727
- export declare type RootProps<E extends RootElementType = RootElementType> = Props<RootOwnProps, E>
659
+ export declare interface PaddingProps {
660
+ /** CSS **padding** property */
661
+ padding?: Responsive<Space>;
662
+ /** CSS **padding-left** and **padding-right** properties */
663
+ paddingX?: Responsive<Space>;
664
+ /** CSS **padding-top** and **padding-bottom** properties */
665
+ paddingY?: Responsive<Space>;
666
+ /** CSS **padding-top** property */
667
+ paddingTop?: Responsive<Space>;
668
+ /** CSS **padding-right** property */
669
+ paddingRight?: Responsive<Space>;
670
+ /** CSS **padding-bottom** property */
671
+ paddingBottom?: Responsive<Space>;
672
+ /** CSS **padding-left** property */
673
+ paddingLeft?: Responsive<Space>;
674
+ }
675
+
676
+ declare const PLACEMENT: readonly [
677
+ "top",
678
+ "top-start",
679
+ "top-end",
680
+ "right",
681
+ "right-start",
682
+ "right-end",
683
+ "bottom",
684
+ "bottom-start",
685
+ "bottom-end",
686
+ "left",
687
+ "left-start",
688
+ "left-end",
689
+ ];
690
+
691
+ /** @public */
692
+ export declare type Placement = (typeof PLACEMENT)[number];
693
+
694
+ /** @public */
695
+ export declare type PlacementProps = {
696
+ /** Placement relative to anchor */
697
+ placement?: Placement;
698
+ };
699
+
700
+ declare const POSITION: readonly [
701
+ "absolute",
702
+ "fixed",
703
+ "relative",
704
+ "static",
705
+ "sticky",
706
+ ];
707
+
708
+ /** @public */
709
+ export declare type Position = (typeof POSITION)[number];
710
+
711
+ declare type PositionProps = {
712
+ /** CSS **position** property */
713
+ position?: Responsive<Position>;
714
+ /** CSS **inset** property */
715
+ inset?: Responsive<SpaceAuto>;
716
+ /** CSS **top** property */
717
+ top?: Responsive<SpaceAuto>;
718
+ /** CSS **right** property */
719
+ right?: Responsive<SpaceAuto>;
720
+ /** CSS **bottom** property */
721
+ bottom?: Responsive<SpaceAuto>;
722
+ /** CSS **left** property */
723
+ left?: Responsive<SpaceAuto>;
724
+ };
725
+
726
+ /** @public */
727
+ export declare function PressArea<T extends ElementType = "button">(
728
+ props: PressAreaProps<T> &
729
+ Omit<ComponentPropsWithRef<T>, keyof PressAreaProps<T>>,
730
+ ): JSX.Element;
731
+
732
+ /** @public */
733
+ export declare interface PressAreaProps<
734
+ T extends React.ElementType = "button",
735
+ > {
736
+ /** Element to render */
737
+ as?: InteractiveAs<T>;
738
+ }
739
+
740
+ /** @beta */
741
+ export declare function Radio(props: RadioProps): JSX.Element;
1728
742
 
1729
- /** @public */
1730
- export declare function RootProvider(props: RootProviderProps): React.JSX.Element
743
+ /** @beta */
744
+ export declare interface RadioProps
745
+ extends React.ComponentProps<"input">, MarginProps {
746
+ /** Error state */
747
+ error?: boolean;
748
+ /** Input label */
749
+ label: React.ReactNode;
750
+ }
751
+
752
+ declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, "full"];
1731
753
 
1732
754
  /** @public */
1733
- export declare interface RootProviderProps {
1734
- boundaryElement?: HTMLElement | null
1735
- children?: ReactNode
1736
- portalElement?: HTMLElement | null
1737
- scheme?: ColorScheme
1738
- tone?: CardTone
1739
- }
1740
-
1741
- /**
1742
- * The `Select` component provides control of options.
1743
- *
1744
- * @public
1745
- */
1746
- export declare function Select<E extends SelectElementType = typeof DEFAULT_SELECT_ELEMENT>(
1747
- props: SelectProps<E>,
1748
- ): React.JSX.Element
1749
-
1750
- /** @internal */
1751
- export declare function Selectable<
1752
- E extends SelectableElementType = typeof DEFAULT_SELECTABLE_ELEMENT,
1753
- >(props: SelectableProps<E>): React.JSX.Element
1754
-
1755
- /** @internal */
1756
- export declare type SelectableElementType = 'button' | 'a' | ComponentType
1757
-
1758
- /** @internal */
1759
- export declare type SelectableOwnProps = BoxOwnProps &
1760
- SelectableStyleProps & {
1761
- disabled?: boolean
1762
- href?: string
1763
- selected?: boolean
1764
- tone?: ElementTone
1765
- type?: 'button'
1766
- }
1767
-
1768
- /** @internal */
1769
- export declare type SelectableProps<E extends SelectableElementType = SelectableElementType> =
1770
- Props<SelectableOwnProps, E>
755
+ export declare type Radius = (typeof RADIUS)[number];
1771
756
 
1772
757
  /** @public */
1773
- export declare type SelectElementType = 'select' | ComponentType
758
+ export declare type Responsive<T> =
759
+ | T
760
+ | []
761
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
762
+ length: 1;
763
+ })
764
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
765
+ length: 2;
766
+ })
767
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
768
+ length: 3;
769
+ })
770
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
771
+ length: 4;
772
+ })
773
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
774
+ length: 5;
775
+ })
776
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
777
+ length: 6;
778
+ });
1774
779
 
1775
- /** @public */
1776
- export declare type SelectOwnProps = SelectStyleProps & {
1777
- customValidity?: string
1778
- readOnly?: boolean
1779
- }
780
+ declare const SHADOW: readonly [0, 1, 2, 3, 4, 5];
1780
781
 
1781
782
  /** @public */
1782
- export declare type SelectProps<E extends SelectElementType = SelectElementType> = Props<
1783
- SelectOwnProps,
1784
- E
1785
- >
783
+ export declare type Shadow = (typeof SHADOW)[number];
1786
784
 
1787
- /**
1788
- * This API might change. DO NOT USE IN PRODUCTION.
1789
- * @beta
1790
- */
1791
- export declare function Skeleton<E extends SkeletonElementType = typeof DEFAULT_SKELETON_ELEMENT>(
1792
- props: SkeletonProps<E>,
1793
- ): React.JSX.Element
785
+ declare type ShadowProps = {
786
+ /** CSS **box-shadow** property */
787
+ shadow?: Shadow;
788
+ };
1794
789
 
1795
790
  /** @beta */
1796
- export declare type SkeletonElementType = 'div' | 'span' | ComponentType
1797
-
1798
- /**
1799
- * This API might change. DO NOT USE IN PRODUCTION.
1800
- * @beta
1801
- */
1802
- export declare type SkeletonOwnProps = SkeletonStyleProps & {
1803
- animated?: boolean
1804
- delay?: number
1805
- }
791
+ export declare function SkipToContent(props: SkipToContentProps): JSX.Element;
1806
792
 
1807
793
  /** @beta */
1808
- export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
1809
- SkeletonOwnProps,
1810
- E
1811
- >
1812
-
1813
- /**
1814
- * Indicate that something is loading for an indeterminate amount of time.
1815
- *
1816
- * @public
1817
- */
1818
- export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
1819
- props: SpinnerProps<E>,
1820
- ): React.JSX.Element
1821
-
1822
- /** @public */
1823
- export declare type SpinnerElementType = 'div' | 'span' | ComponentType
1824
-
1825
- /** @public */
1826
- export declare type SpinnerOwnProps = {
1827
- muted?: boolean
1828
- size?: ResponsiveProp<FontTextSize>
794
+ export declare interface SkipToContentProps extends React.ComponentProps<"a"> {
795
+ /**
796
+ * Anchor href. The target element should be focusable or have `tabindex="-1"`.
797
+ */
798
+ href: string;
799
+ /** Visible/announced label */
800
+ label: string;
801
+ /** Use label instead */
802
+ children?: never;
1829
803
  }
1830
804
 
1831
- /** @public */
1832
- export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
1833
- SpinnerOwnProps,
1834
- E
1835
- >
805
+ declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
1836
806
 
1837
807
  /** @public */
1838
- export declare function SrOnly<E extends SrOnlyElementType = typeof DEFAULT_SR_ONLY_ELEMENT>(
1839
- props: SrOnlyProps<E>,
1840
- ): React.JSX.Element
808
+ export declare type Space = (typeof SPACE)[number];
1841
809
 
1842
- /** @public */
1843
- export declare type SrOnlyElementType = 'span' | ComponentType
810
+ declare const SPACE_AUTO: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "auto"];
1844
811
 
1845
- /** @public */
1846
- export declare type SrOnlyOwnProps = {}
1847
-
1848
- /** @public */
1849
- export declare type SrOnlyProps<E extends SrOnlyElementType = SrOnlyElementType> = Props<
1850
- SrOnlyOwnProps,
1851
- E
1852
- >
812
+ declare const SPACE_AUTO_NEGATIVE: readonly [
813
+ -9,
814
+ -8,
815
+ -7,
816
+ -6,
817
+ -5,
818
+ -4,
819
+ -3,
820
+ -2,
821
+ -1,
822
+ 0,
823
+ 1,
824
+ 2,
825
+ 3,
826
+ 4,
827
+ 5,
828
+ 6,
829
+ 7,
830
+ 8,
831
+ 9,
832
+ "auto",
833
+ ];
1853
834
 
1854
- /**
1855
- * The `Stack` component is used to place elements on top of each other.
1856
- *
1857
- * @public
1858
- */
1859
- export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
1860
- props: StackProps<E>,
1861
- ): React.JSX.Element
835
+ declare const SPACE_INHERIT: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "inherit"];
1862
836
 
1863
837
  /** @public */
1864
- export declare type StackElementType = BoxElementType
838
+ export declare type SpaceAuto = (typeof SPACE_AUTO)[number];
1865
839
 
1866
840
  /** @public */
1867
- export declare type StackOwnProps = Omit<
1868
- BoxOwnProps,
1869
- | 'align'
1870
- | 'alignItems'
1871
- | 'columns'
1872
- | 'gridTemplateColumns'
1873
- | 'direction'
1874
- | 'display'
1875
- | 'flexDirection'
1876
- | 'flexWrap'
1877
- | 'gapX'
1878
- | 'gapY'
1879
- | 'justify'
1880
- | 'justifyContent'
1881
- | 'rows'
1882
- | 'gridTemplateRows'
1883
- >
841
+ export declare type SpaceAutoNegative = (typeof SPACE_AUTO_NEGATIVE)[number];
1884
842
 
1885
843
  /** @public */
1886
- export declare type StackProps<E extends StackElementType = StackElementType> = Props<
1887
- StackOwnProps,
1888
- E
1889
- >
1890
-
1891
- /**
1892
- * The `Switch` component allows the user to toggle a setting on and off.
1893
- *
1894
- * Extends all properties of an `<input type="checkbox" />` element, except type.
1895
- *
1896
- * @public
1897
- */
1898
- export declare function Switch<E extends SwitchElementType = typeof DEFAULT_SWITCH_ELEMENT>(
1899
- props: SwitchProps<E>,
1900
- ): React.JSX.Element
844
+ export declare type SpaceInherit = (typeof SPACE_INHERIT)[number];
1901
845
 
1902
846
  /** @public */
1903
- export declare type SwitchElementType = 'input' | ComponentType
847
+ export declare function Spinner({ size, ...props }: SpinnerProps): JSX.Element;
1904
848
 
1905
849
  /** @public */
1906
- export declare type SwitchOwnProps = {
1907
- indeterminate?: boolean
850
+ export declare interface SpinnerProps extends React.ComponentProps<"svg"> {
851
+ size?: Responsive<IconSize>;
1908
852
  }
1909
853
 
1910
- /** @public */
1911
- export declare type SwitchProps<E extends SwitchElementType = SwitchElementType> = Props<
1912
- SwitchOwnProps,
1913
- E
1914
- >
1915
-
1916
- /** @public */
1917
- export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
1918
- props: TabProps<E>,
1919
- ): React.JSX.Element
1920
-
1921
- /** @public */
1922
- export declare type TabElementType = 'button' | ComponentType
1923
-
1924
- /** @public */
1925
- export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
1926
- props: TabListProps<E>,
1927
- ): React.JSX.Element
1928
-
1929
- /** @public */
1930
- export declare type TabListChild =
1931
- | ReactElement<Props<TabProps, 'button'>>
1932
- | null
1933
- | undefined
1934
- | false
1935
-
1936
- /** @public */
1937
- export declare type TabListElementType = 'div' | 'span' | ComponentType
854
+ /** @beta */
855
+ export declare function Switch(props: SwitchProps): JSX.Element;
1938
856
 
1939
- /** @public */
1940
- export declare type TabListOwnProps = Omit<FlexOwnProps, 'as' | 'height'> & {
1941
- children: TabListChild[]
857
+ /** @beta */
858
+ export declare interface SwitchProps
859
+ extends React.ComponentProps<"input">, MarginProps {
860
+ /** Error state */
861
+ error?: boolean;
862
+ /** Input label */
863
+ label: React.ReactNode;
1942
864
  }
1943
865
 
1944
866
  /** @public */
1945
- export declare type TabListProps<E extends TabListElementType = TabListElementType> = Props<
1946
- TabListOwnProps,
1947
- E
1948
- >
867
+ declare function Text_2<T extends ElementType = "span">({
868
+ size,
869
+ ...props
870
+ }: TextProps<T> &
871
+ Omit<ComponentPropsWithRef<T>, keyof TextProps<T>>): JSX.Element;
872
+ export { Text_2 as Text };
1949
873
 
1950
- /** @public */
1951
- export declare type TabOwnProps = {
1952
- /**
1953
- * The `id` of the corresponding `TabPanel` component.
1954
- */
1955
- 'aria-controls': string
1956
- 'id': string
1957
- 'icon'?: ElementType_2 | ReactNode
1958
- 'focused'?: boolean
1959
- 'fontSize'?: ResponsiveProp<FontTextSize>
1960
- 'label'?: ReactNode
1961
- 'padding'?: ResponsiveProp<Space>
1962
- 'selected'?: boolean
1963
- 'tone'?: ElementTone
1964
- }
874
+ declare const TEXT_ALIGN: readonly ["left", "center", "right", "justify"];
1965
875
 
1966
- /** @public */
1967
- export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
1968
- props: TabPanelProps<E>,
1969
- ): React.JSX.Element
876
+ declare const TEXT_SIZE: readonly [0, 1, 2, 3, 4];
1970
877
 
1971
878
  /** @public */
1972
- export declare type TabPanelElementType = 'div' | 'span' | ComponentType
879
+ export declare type TextAlign = (typeof TEXT_ALIGN)[number];
1973
880
 
1974
881
  /** @public */
1975
- export declare type TabPanelOwnProps = BoxOwnProps & {
1976
- /**
1977
- * The `id` of the correlating `Tab` component.
1978
- */
1979
- 'aria-labelledby': string
1980
- 'id': string
882
+ export declare interface TextProps<
883
+ T extends React.ElementType = "span",
884
+ > extends TypographyProps {
885
+ /** Element to render */
886
+ as?: T;
887
+ /** CSS **font-size** property */
888
+ size?: Responsive<TextSize>;
1981
889
  }
1982
890
 
1983
891
  /** @public */
1984
- export declare type TabPanelProps<E extends TabPanelElementType = TabPanelElementType> = Props<
1985
- TabPanelOwnProps,
1986
- E
1987
- >
1988
-
1989
- /** @public */
1990
- export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
1991
-
1992
- /** @public */
1993
- export declare type TagType = keyof JSX.IntrinsicElements
1994
-
1995
- /**
1996
- * The `Text` component is an agile, themed typographic element.
1997
- *
1998
- * @public
1999
- */
2000
- declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
2001
- props: TextProps<E>,
2002
- ): React.JSX.Element
2003
- export {Text_2 as Text}
2004
-
2005
- /**
2006
- * A multiline text input.
2007
- *
2008
- * @public
2009
- */
2010
- export declare function TextArea<E extends TextAreaElementType = typeof DEFAULT_TEXT_AREA_ELEMENT>(
2011
- props: TextAreaProps<E>,
2012
- ): React.JSX.Element
2013
-
2014
- /** @public */
2015
- export declare type TextAreaElementType = 'textarea' | ComponentType
2016
-
2017
- /** @public */
2018
- export declare type TextAreaOwnProps = TextAreaStyleProps & {
2019
- /**
2020
- * @beta
2021
- */
2022
- __unstable_disableFocusRing?: boolean
2023
- customValidity?: string
2024
- }
892
+ export declare type TextSize = (typeof TEXT_SIZE)[number];
2025
893
 
2026
- /** @public */
2027
- export declare type TextAreaProps<E extends TextAreaElementType = TextAreaElementType> = Props<
2028
- TextAreaOwnProps,
2029
- E
2030
- >
894
+ declare const TONE: readonly [
895
+ "neutral",
896
+ "positive",
897
+ "suggest",
898
+ "caution",
899
+ "critical",
900
+ ];
2031
901
 
2032
902
  /** @public */
2033
- export declare type TextElementType =
2034
- | 'div'
2035
- | 'h1'
2036
- | 'h2'
2037
- | 'h3'
2038
- | 'h4'
2039
- | 'h5'
2040
- | 'h6'
2041
- | 'label'
2042
- | 'li'
2043
- | 'p'
2044
- | 'span'
2045
- | 'summary'
2046
- | 'time'
2047
- | ComponentType
903
+ export declare type Tone = (typeof TONE)[number];
2048
904
 
2049
- /**
2050
- * Single line text input.
2051
- *
2052
- * @public
2053
- */
2054
- export declare function TextInput<
2055
- E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
2056
- >(props: TextInputProps<E>): React.JSX.Element
905
+ declare type ToneProps = {
906
+ /** CSS **background-color** property */
907
+ tone?: Tone;
908
+ };
2057
909
 
2058
910
  /** @public */
2059
- export declare type TextInputClearButtonProps = Omit<
2060
- ButtonProps<'button'>,
2061
- 'as' | 'onClick' | 'onMouseDown'
2062
- >
911
+ export declare function Tooltip({ placement, ...props }: TooltipProps): any;
2063
912
 
2064
913
  /** @public */
2065
- export declare type TextInputElementType = 'input' | ComponentType
914
+ export declare function TooltipGroup<T extends ElementType = "div">(
915
+ props: TooltipGroupProps<T> &
916
+ Omit<ComponentPropsWithRef<T>, keyof TooltipGroupProps<T>>,
917
+ ): JSX.Element;
2066
918
 
2067
919
  /** @public */
2068
- export declare type TextInputOwnProps = InputStyleProps & {
2069
- /**
2070
- * @beta
2071
- */
2072
- __unstable_disableFocusRing?: boolean
2073
- /**
2074
- * @beta
2075
- */
2076
- clearButton?: boolean | TextInputClearButtonProps
2077
- customValidity?: string
2078
- icon?: ElementType_2 | ReactNode
2079
- iconRight?: ElementType_2 | ReactNode
2080
- /**
2081
- * @beta
2082
- */
2083
- onClear?: () => void
2084
- prefix?: ReactNode
2085
- suffix?: ReactNode
2086
- weight?: FontWeight
920
+ export declare interface TooltipGroupProps<
921
+ T extends React.ElementType = "div",
922
+ > {
923
+ /** Element to render */
924
+ as?: T;
2087
925
  }
2088
926
 
2089
927
  /** @public */
2090
- export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
2091
- TextInputOwnProps,
2092
- E
2093
- >
2094
-
2095
- /** @public */
2096
- export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
2097
-
2098
- /** @public */
2099
- export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
2100
-
2101
- /**
2102
- * This API might change. DO NOT USE IN PRODUCTION.
2103
- * @beta
2104
- */
2105
- export declare function TextSkeleton<
2106
- E extends TextSkeletonElementType = typeof DEFAULT_TEXT_SKELETON_ELEMENT,
2107
- >(props: TextSkeletonProps<E>): React.JSX.Element
2108
-
2109
- /** @beta */
2110
- export declare type TextSkeletonElementType = SkeletonElementType
2111
-
2112
- /** @beta */
2113
- export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
2114
- size?: ResponsiveProp<FontTextSize>
2115
- }
2116
-
2117
- /**
2118
- * This API might change. DO NOT USE IN PRODUCTION.
2119
- * @beta
2120
- */
2121
- export declare type TextSkeletonProps<E extends TextSkeletonElementType = TextSkeletonElementType> =
2122
- Props<TextSkeletonOwnProps, E>
2123
-
2124
- /**
2125
- * The `Toast` component gives feedback to users when an action has taken place.
2126
- *
2127
- * Toasts can be closed with a close button, or auto-dismiss when the duration expires.
2128
- *
2129
- * @internal
2130
- */
2131
- export declare function Toast<E extends ToastElementType = typeof DEFAULT_TOAST_ELEMENT>(
2132
- props: ToastProps<E>,
2133
- ): React.JSX.Element
2134
-
2135
- /** @public */
2136
- export declare interface ToastContextValue {
2137
- version: 0.0
2138
- /**
2139
- * Creates or updates a toast notification.
2140
- * If a toast with the same ID already exists, it will be updated.
2141
- * If an ID is not provided, a random one will be generated.
2142
- * The returned ID can be used to programatically update a toast.
2143
- */
2144
- push: (params: ToastParams) => string
2145
- }
2146
-
2147
- /** @internal */
2148
- export declare type ToastElementType = 'li' | ComponentType
2149
-
2150
- /** @internal */
2151
- declare type ToastLayerElementType = 'ul' | ComponentType
2152
-
2153
- /** @internal */
2154
- declare type ToastLayerOwnProps = GapStyleProps & PaddingStyleProps
2155
-
2156
- /** @internal */
2157
- declare type ToastLayerProps<E extends ToastLayerElementType = ToastLayerElementType> = Props<
2158
- ToastLayerOwnProps,
2159
- E
2160
- >
2161
-
2162
- /** @internal */
2163
- export declare type ToastOwnProps = RadiusStyleProps & {
2164
- closable?: boolean
2165
- description?: ReactNode
2166
- onClose?: () => void
2167
- title?: ReactNode
2168
- status?: 'error' | 'warning' | 'success' | 'info'
2169
- duration?: number
928
+ export declare interface TooltipProps
929
+ extends React.ComponentProps<"div">, PlacementProps {
930
+ /** Tooltip text */
931
+ text?: React.ReactNode;
932
+ /** Disabled state */
933
+ disabled?: boolean;
2170
934
  }
2171
935
 
2172
936
  /** @public */
2173
- export declare interface ToastParams {
2174
- closable?: boolean
2175
- description?: ReactNode
2176
- duration?: number
2177
- id?: string
2178
- onClose?: () => void
2179
- title?: ReactNode
2180
- status?: 'error' | 'warning' | 'success' | 'info'
937
+ export declare interface TypographyProps extends MarginProps, ToneProps {
938
+ /** CSS **text-align** property */
939
+ align?: Responsive<TextAlign>;
940
+ /** CSS **color** property */
941
+ muted?: boolean;
942
+ /** CSS **text-box-trim** property */
943
+ trim?: boolean;
944
+ /** Number of lines to truncate */
945
+ truncate?: Responsive<number>;
946
+ /** CSS **font-weight** property */
947
+ weight?: FontWeight;
2181
948
  }
2182
949
 
2183
- /** @internal */
2184
- export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
2185
- ToastOwnProps,
2186
- E
2187
- >
2188
-
2189
950
  /** @public */
2190
- export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
951
+ export declare function VisuallyHidden<T extends ElementType = "span">(
952
+ props: VisuallyHiddenProps<T> &
953
+ Omit<ComponentPropsWithRef<T>, keyof VisuallyHiddenProps<T>>,
954
+ ): JSX.Element;
2191
955
 
2192
956
  /** @public */
2193
- export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
2194
- children?: React.ReactNode
2195
- zOffset?: ResponsiveProp<number>
2196
- }
2197
-
2198
- /**
2199
- * Tooltips display information when hovering, focusing or tapping.
2200
- *
2201
- * @public
2202
- */
2203
- export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
2204
- props: TooltipProps<E>,
2205
- ): React.JSX.Element
2206
-
2207
- /**
2208
- * @beta
2209
- */
2210
- export declare const TooltipDelayGroupContext: Context<TooltipDelayGroupContextValue | null>
2211
-
2212
- /**
2213
- * @beta
2214
- */
2215
- export declare interface TooltipDelayGroupContextValue {
2216
- setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void
2217
- setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void
2218
- openDelay: number
2219
- closeDelay: number
2220
- openTooltipId: string | null
2221
- }
2222
-
2223
- /**
2224
- * @public
2225
- * Provides context for a group of tooltip elements that should share a delay
2226
- * which temporarily becomes 1 ms after the first floating element of the group opens.
2227
- */
2228
- export declare function TooltipDelayGroupProvider(
2229
- props: TooltipDelayGroupProviderProps,
2230
- ): React.JSX.Element
2231
-
2232
- /**
2233
- * @public
2234
- * */
2235
- export declare interface TooltipDelayGroupProviderProps {
2236
- children?: ReactNode
2237
- /**
2238
- * Handles the delays to open or close a tooltip inside a group
2239
- *
2240
- * If only a `number` is passed, it will be used for both opening and closing.
2241
- *
2242
- * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2243
- *
2244
- * @public
2245
- */
2246
- delay: Delay
957
+ export declare interface VisuallyHiddenProps<
958
+ T extends React.ElementType = "span",
959
+ > {
960
+ /** Element to render */
961
+ as?: T;
962
+ /** If true, element is visible on :focus-visible */
963
+ visibleOnFocus?: boolean;
2247
964
  }
2248
965
 
2249
966
  /** @public */
2250
- export declare type TooltipElementType = 'div' | 'span' | ComponentType
2251
-
2252
- /** @public */
2253
- export declare type TooltipOwnProps = LayerOwnProps &
2254
- RadiusStyleProps &
2255
- ShadowStyleProps & {
2256
- /**
2257
- * Whether the tooltip should animate in and out.
2258
- *
2259
- * @beta
2260
- * @defaultValue false
2261
- */
2262
- animate?: boolean
2263
- arrow?: boolean
2264
- boundaryElement?: HTMLElement | null
2265
- children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
2266
- content?: ReactNode
2267
- /**
2268
- * Adds a delay to open or close the tooltip.
2269
- *
2270
- * If only a `number` is passed, it will be used for both opening and closing.
2271
- *
2272
- * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2273
- *
2274
- * @public
2275
- * @defaultValue 0
2276
- */
2277
- delay?: Delay
2278
- disabled?: boolean
2279
- fallbackPlacements?: Placement[]
2280
- placement?: Placement
2281
- /** Whether or not to render the tooltip in a portal element. */
2282
- portal?: boolean | string
2283
- scheme?: ColorScheme
2284
- tone?: CardTone
2285
- }
2286
-
2287
- /** @public */
2288
- export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
2289
- TooltipOwnProps,
2290
- E
2291
- >
2292
-
2293
- /**
2294
- * This API might change. DO NOT USE IN PRODUCTION.
2295
- * @beta
2296
- */
2297
- export declare function Tree<E extends TreeElementType = typeof DEFAULT_TREE_ELEMENT>(
2298
- props: TreeProps<E>,
2299
- ): React.JSX.Element
2300
-
2301
- /**
2302
- * @beta
2303
- */
2304
- export declare interface TreeContextValue {
2305
- version: 0.0
2306
- focusedElement: HTMLElement | null
2307
- gap: ResponsiveProp<Space>
2308
- level: number
2309
- path: string[]
2310
- registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void
2311
- setExpanded: (path: string, expanded: boolean) => void
2312
- setFocusedElement: (focusedElement: HTMLElement | null) => void
2313
- state: TreeState
2314
- }
2315
-
2316
- /** @beta */
2317
- export declare type TreeElementType = 'div' | ComponentType
2318
-
2319
- /**
2320
- * This API might change. DO NOT USE IN PRODUCTION.
2321
- * @beta
2322
- */
2323
- export declare function TreeItem<E extends TreeItemElementType = typeof DEFAULT_TREE_ITEM_ELEMENT>(
2324
- props: TreeItemProps<E>,
2325
- ): React.JSX.Element
2326
-
2327
- /** @beta */
2328
- export declare type TreeItemElementType = 'a' | 'li' | ComponentType
2329
-
2330
- /** @beta */
2331
- export declare type TreeItemOwnProps = CardOwnProps & {
2332
- expanded?: boolean
2333
- fontSize?: ResponsiveProp<FontTextSize>
2334
- icon?: ElementType_2
2335
- /**
2336
- * Allows passing a custom element type to the link component
2337
- * @internal
2338
- */
2339
- linkAs?: SelectableElementType
2340
- onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
2341
- padding?: ResponsiveProp<Space>
2342
- space?: ResponsiveProp<Space>
2343
- text?: ReactNode
2344
- weight?: FontWeight
2345
- }
2346
-
2347
- /** @beta */
2348
- export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
2349
- TreeItemOwnProps,
2350
- E
2351
- >
2352
-
2353
- /**
2354
- * This API might change. DO NOT USE IN PRODUCTION.
2355
- * @beta
2356
- */
2357
- export declare type TreeOwnProps = {
2358
- gap?: ResponsiveProp<Space>
2359
- }
2360
-
2361
- /** @beta */
2362
- export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
2363
-
2364
- /**
2365
- * @beta
2366
- */
2367
- export declare interface TreeState {
2368
- [key: string]:
2369
- | {
2370
- element: HTMLElement
2371
- expanded: boolean
2372
- }
2373
- | undefined
2374
- }
967
+ export declare function VStack<T extends ElementType = "div">(
968
+ props: VStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof VStackProps<T>>,
969
+ ): JSX.Element;
2375
970
 
2376
971
  /** @public */
2377
- export declare function useBoundaryElement(): BoundaryElementContextValue
2378
-
2379
- /** @public */
2380
- export declare function useCard(): CardContextValue
2381
-
2382
- /** @public */
2383
- export declare function useClickOutsideEvent(
2384
- listener: ClickOutsideEventListener | false | undefined,
2385
- elementsArg?: () => ClickOutsideEventElements,
2386
- boundaryElement?: () => HTMLElement | null,
2387
- ): void
2388
-
2389
- /**
2390
- * @beta
2391
- */
2392
- export declare function useCustomValidity(
2393
- ref: {
2394
- current: null | {
2395
- setCustomValidity: (validity: string) => void
2396
- }
2397
- },
2398
- customValidity: string | undefined,
2399
- ): void
2400
-
2401
- /**
2402
- * This API might change. DO NOT USE IN PRODUCTION.
2403
- * @beta
2404
- */
2405
- export declare function useDialog(): DialogContextValue
2406
-
2407
- /**
2408
- * Subscribe to the size of a DOM element.
2409
- * @beta
2410
- */
2411
- export declare function useElementSize(element: HTMLElement | null): ElementSize | null
2412
-
2413
- /**
2414
- * @beta
2415
- */
2416
- export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
2417
-
2418
- /** @public */
2419
- export declare function useLayer(): LayerContextValue
2420
-
2421
- /**
2422
- * Efficiently subscribes to `window.matchMedia` queries
2423
- *
2424
- * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
2425
- *
2426
- * @public
2427
- */
2428
- export declare function useMatchMedia(
2429
- mediaQueryString: `(${string})`,
2430
- getServerSnapshot?: () => boolean,
2431
- ): boolean
2432
-
2433
- /**
2434
- * This API might change. DO NOT USE IN PRODUCTION.
2435
- * @beta
2436
- */
2437
- export declare function useMediaIndex(): Breakpoint
2438
-
2439
- /** @public */
2440
- export declare function usePortal(): PortalContextValue
2441
-
2442
- /**
2443
- * Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
2444
- *
2445
- * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
2446
- *
2447
- * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
2448
- * Chrome supports reading the `prefers-color-scheme` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme
2449
- * @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
2450
- *
2451
- * @public
2452
- */
2453
- export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean
2454
-
2455
- /**
2456
- * Returns true if motion should be reduced
2457
- *
2458
- * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
2459
- *
2460
- * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
2461
- * Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
2462
- * @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
2463
- *
2464
- * @public
2465
- */
2466
- export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
2467
-
2468
- /**
2469
- * This API might change. DO NOT USE IN PRODUCTION.
2470
- * @beta
2471
- */
2472
- export declare function useResponsiveProp<T>(
2473
- val: ResponsiveProp<T> | undefined,
2474
- defaultVal?: Partial<Record<Breakpoint, T>>,
2475
- ): Partial<Record<Breakpoint, T>>
2476
-
2477
- /** @public */
2478
- export declare function useToast(): ToastContextValue
2479
-
2480
- /**
2481
- * @beta
2482
- */
2483
- export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null
2484
-
2485
- /**
2486
- * @beta
2487
- */
2488
- export declare function useTree(): TreeContextValue
2489
-
2490
- /** @beta */
2491
- export declare function VirtualList<
2492
- E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
2493
- >(props: VirtualListProps<E>): React.JSX.Element
2494
-
2495
- /** @beta */
2496
- export declare interface VirtualListChangeOpts {
2497
- fromIndex: number
2498
- gap: number
2499
- itemHeight: number
2500
- scrollHeight: number
2501
- scrollTop: number
2502
- toIndex: number
972
+ export declare interface VStackProps<
973
+ T extends React.ElementType = "div",
974
+ > extends Pick<GapProps, "gap"> {
975
+ /** Element to render */
976
+ as?: T;
2503
977
  }
2504
978
 
2505
- /** @beta */
2506
- export declare type VirtualListElementType = 'div' | ComponentType
2507
-
2508
- /** @beta */
2509
- export declare type VirtualListOwnProps<Item = any> = {
2510
- gap?: Space
2511
- getItemKey?: (item: Item, itemIndex: number) => string
2512
- items?: Item[]
2513
- onChange?: (opts: VirtualListChangeOpts) => void
2514
- renderItem?: (item: Item) => ReactNode
2515
- }
979
+ declare type WidthProps = {
980
+ /** CSS **width** property */
981
+ width?: Responsive<string>;
982
+ /** CSS **min-width** property */
983
+ minWidth?: Responsive<string>;
984
+ /** CSS **max-width** property */
985
+ maxWidth?: Responsive<string>;
986
+ };
2516
987
 
2517
- /** @beta */
2518
- export declare type VirtualListProps<E extends VirtualListElementType = VirtualListElementType> =
2519
- Props<VirtualListOwnProps, E>
988
+ declare type ZIndexProps = {
989
+ /** CSS z-index property */
990
+ zIndex?: Responsive<number>;
991
+ };
2520
992
 
2521
- export {}
993
+ export {};