@sanity/ui 4.2.0 → 5.0.0-alpha.10

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 (339) hide show
  1. package/README.md +194 -28
  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 +79 -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 +1203 -1469
  20. package/dist/index.js +2123 -1989
  21. package/dist/index.js.map +1 -1
  22. package/dist/polyfills.d.ts +1 -0
  23. package/dist/polyfills.js +5 -0
  24. package/dist/polyfills.js.map +1 -0
  25. package/dist/styles.css +1 -547
  26. package/package.json +57 -58
  27. package/src/cli/checks.test.ts +38 -0
  28. package/src/cli/checks.ts +200 -0
  29. package/src/cli/config.ts +44 -0
  30. package/src/cli/detect.test.ts +191 -0
  31. package/src/cli/detect.ts +205 -0
  32. package/src/cli/doctor.test.ts +52 -0
  33. package/src/cli/doctor.ts +65 -0
  34. package/src/cli/index.ts +77 -0
  35. package/src/cli/init.ts +225 -0
  36. package/src/cli/install.test.ts +52 -0
  37. package/src/cli/install.ts +108 -0
  38. package/src/cli/log.ts +79 -0
  39. package/src/cli/selfPackage.ts +14 -0
  40. package/src/cli/styles.test.ts +130 -0
  41. package/src/cli/styles.ts +205 -0
  42. package/src/cli/test-utils.ts +10 -0
  43. package/src/cli/tsconfig.test.ts +174 -0
  44. package/src/cli/tsconfig.ts +282 -0
  45. package/src/cli/types.ts +77 -0
  46. package/src/cli/versions.test.ts +35 -0
  47. package/src/cli/versions.ts +41 -0
  48. package/src/components/badge/Badge.tsx +53 -0
  49. package/src/components/badge/badge.css +6 -0
  50. package/src/components/badge/badge.props.ts +31 -0
  51. package/src/components/box/Box.tsx +30 -0
  52. package/src/components/box/box.css +4 -0
  53. package/src/components/box/box.props.ts +29 -0
  54. package/src/components/button/Button.tsx +78 -0
  55. package/src/components/button/button.css +72 -0
  56. package/src/components/button/button.props.ts +122 -0
  57. package/src/components/card/Card.tsx +31 -0
  58. package/src/components/card/card.css +4 -0
  59. package/src/components/card/card.props.ts +58 -0
  60. package/src/components/checkbox/Checkbox.tsx +64 -0
  61. package/src/components/checkbox/checkbox.css +100 -0
  62. package/src/components/checkbox/checkbox.props.ts +33 -0
  63. package/src/components/code/Code.tsx +38 -0
  64. package/src/components/code/LazyRefractor.tsx +9 -0
  65. package/src/components/code/code.css +40 -0
  66. package/src/components/code/code.props.ts +44 -0
  67. package/src/components/container/Container.tsx +30 -0
  68. package/src/components/container/container.css +4 -0
  69. package/src/components/container/container.props.ts +28 -0
  70. package/src/components/dialog/Dialog.tsx +139 -0
  71. package/src/components/dialog/dialog.css +49 -0
  72. package/src/components/dialog/dialog.props.ts +45 -0
  73. package/src/components/divider/Divider.tsx +23 -0
  74. package/src/components/divider/divider.props.ts +9 -0
  75. package/src/components/eyebrow/Eyebrow.tsx +54 -0
  76. package/src/components/eyebrow/eyebrow.css +11 -0
  77. package/src/components/eyebrow/eyebrow.props.ts +28 -0
  78. package/src/components/flex/Flex.tsx +30 -0
  79. package/src/components/flex/flex.css +4 -0
  80. package/src/components/flex/flex.props.ts +33 -0
  81. package/src/components/grid/Grid.tsx +30 -0
  82. package/src/components/grid/grid.css +4 -0
  83. package/src/components/grid/grid.props.ts +33 -0
  84. package/src/components/h-stack/HStack.tsx +34 -0
  85. package/src/components/h-stack/hStack.props.ts +17 -0
  86. package/src/components/heading/Heading.tsx +54 -0
  87. package/src/components/heading/heading.css +9 -0
  88. package/src/components/heading/heading.props.ts +31 -0
  89. package/src/components/icon/Icon.tsx +24 -0
  90. package/src/components/icon/icon.css +17 -0
  91. package/src/components/icon/icon.props.ts +35 -0
  92. package/src/components/icon-button/IconButton.tsx +32 -0
  93. package/src/components/icon-button/iconButton.props.ts +31 -0
  94. package/src/components/index.css +28 -0
  95. package/src/components/indicator/Indicator.tsx +42 -0
  96. package/src/components/indicator/indicator.css +4 -0
  97. package/src/components/indicator/indicator.props.ts +24 -0
  98. package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
  99. package/src/components/indicator-stack/indicator-stack.css +7 -0
  100. package/src/components/indicator-stack/indicatorStack.props.ts +15 -0
  101. package/src/components/inline/Inline.tsx +38 -0
  102. package/src/components/inline/inline.css +4 -0
  103. package/src/components/inline/inline.props.ts +100 -0
  104. package/src/components/label/Label.tsx +34 -0
  105. package/src/components/label/label.css +3 -0
  106. package/src/components/label/label.props.ts +25 -0
  107. package/src/components/link/Link.tsx +29 -0
  108. package/src/components/link/link.css +12 -0
  109. package/src/components/link/link.props.ts +23 -0
  110. package/src/components/list/List.tsx +167 -0
  111. package/src/components/list/list.css +25 -0
  112. package/src/components/list/list.props.ts +130 -0
  113. package/src/components/popover/Popover.tsx +85 -0
  114. package/src/components/popover/popover.css +21 -0
  115. package/src/components/popover/popover.props.ts +38 -0
  116. package/src/components/press-area/PressArea.tsx +29 -0
  117. package/src/components/press-area/press-area.css +22 -0
  118. package/src/components/press-area/pressArea.props.ts +16 -0
  119. package/src/components/radio/Radio.tsx +48 -0
  120. package/src/components/radio/radio.css +97 -0
  121. package/src/components/radio/radio.props.ts +25 -0
  122. package/src/components/skip-to-content/SkipToContent.tsx +35 -0
  123. package/src/components/skip-to-content/skip-to-content.css +9 -0
  124. package/src/components/skip-to-content/skipToContent.props.ts +25 -0
  125. package/src/components/spinner/Spinner.tsx +28 -0
  126. package/src/components/spinner/spinner.css +10 -0
  127. package/src/components/spinner/spinner.props.ts +19 -0
  128. package/src/components/switch/Switch.tsx +48 -0
  129. package/src/components/switch/switch.css +119 -0
  130. package/src/components/switch/switch.props.ts +25 -0
  131. package/src/components/text/Text.tsx +53 -0
  132. package/src/components/text/text.css +9 -0
  133. package/src/components/text/text.props.ts +28 -0
  134. package/src/components/tooltip/Tooltip.tsx +97 -0
  135. package/src/components/tooltip/tooltip.css +31 -0
  136. package/src/components/tooltip/tooltip.props.ts +36 -0
  137. package/src/components/tooltip-group/TooltipGroup.tsx +64 -0
  138. package/src/components/tooltip-group/tooltipGroup.props.ts +15 -0
  139. package/src/components/v-stack/VStack.tsx +32 -0
  140. package/src/components/v-stack/vStack.props.ts +17 -0
  141. package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
  142. package/src/components/visually-hidden/visually-hidden.css +9 -0
  143. package/src/components/visually-hidden/visuallyHidden.props.ts +23 -0
  144. package/src/css/classes/dynamic/flex-child.css +5 -0
  145. package/src/css/classes/dynamic/grid-child.css +8 -0
  146. package/src/css/classes/dynamic/grid-parent.css +6 -0
  147. package/src/css/classes/dynamic/height.css +5 -0
  148. package/src/css/classes/dynamic/index.css +7 -0
  149. package/src/css/classes/dynamic/line-clamp.css +5 -0
  150. package/src/css/classes/dynamic/readme.md +3 -0
  151. package/src/css/classes/dynamic/width.css +7 -0
  152. package/src/css/classes/dynamic/z-index.css +3 -0
  153. package/src/css/classes/generic/display.css +10 -0
  154. package/src/css/classes/generic/flex.css +24 -0
  155. package/src/css/classes/generic/grid.css +7 -0
  156. package/src/css/classes/generic/index.css +7 -0
  157. package/src/css/classes/generic/overflow.css +19 -0
  158. package/src/css/classes/generic/placement.css +202 -0
  159. package/src/css/classes/generic/position.css +7 -0
  160. package/src/css/classes/generic/readme.md +3 -0
  161. package/src/css/classes/generic/text-align.css +5 -0
  162. package/src/css/classes/index.css +4 -0
  163. package/src/css/classes/local/animation.css +4 -0
  164. package/src/css/classes/local/border.css +20 -0
  165. package/src/css/classes/local/index.css +6 -0
  166. package/src/css/classes/local/readme.md +3 -0
  167. package/src/css/classes/local/text-overflow.css +5 -0
  168. package/src/css/classes/local/text-trim.css +45 -0
  169. package/src/css/classes/local/tone.css +75 -0
  170. package/src/css/classes/local/top-anchor.css +4 -0
  171. package/src/css/classes/system/color.css +223 -0
  172. package/src/css/classes/system/container.css +8 -0
  173. package/src/css/classes/system/font-family.css +2 -0
  174. package/src/css/classes/system/font-weight.css +4 -0
  175. package/src/css/classes/system/gap.css +37 -0
  176. package/src/css/classes/system/index.css +10 -0
  177. package/src/css/classes/system/inset.css +56 -0
  178. package/src/css/classes/system/margin.css +148 -0
  179. package/src/css/classes/system/padding.css +78 -0
  180. package/src/css/classes/system/radius.css +10 -0
  181. package/src/css/classes/system/readme.md +3 -0
  182. package/src/css/classes/system/shadow.css +6 -0
  183. package/src/css/classes/system/typography.css +31 -0
  184. package/src/css/global/font-face.css +20 -0
  185. package/src/css/global/index.css +2 -0
  186. package/src/css/global/reset.css +76 -0
  187. package/src/css/tokens/index.css +3 -0
  188. package/src/css/tokens/opacity.css +6 -0
  189. package/src/css/tokens/semantic.css +25 -0
  190. package/src/css/tokens/surface.css +27 -0
  191. package/src/hooks/useIsClient.ts +10 -0
  192. package/src/index.css +18 -0
  193. package/src/index.ts +65 -0
  194. package/src/polyfills.ts +15 -0
  195. package/src/props/border.ts +51 -0
  196. package/src/props/flexChild.ts +29 -0
  197. package/src/props/flexParent.ts +47 -0
  198. package/src/props/gap.ts +31 -0
  199. package/src/props/gridChild.ts +50 -0
  200. package/src/props/gridParent.ts +45 -0
  201. package/src/props/height.ts +29 -0
  202. package/src/props/layout.ts +44 -0
  203. package/src/props/margin.ts +59 -0
  204. package/src/props/overflow.ts +30 -0
  205. package/src/props/padding.ts +59 -0
  206. package/src/props/placement.ts +16 -0
  207. package/src/props/position.ts +52 -0
  208. package/src/props/shadow.ts +15 -0
  209. package/src/props/tone.ts +15 -0
  210. package/src/props/typography.ts +62 -0
  211. package/src/props/width.ts +29 -0
  212. package/src/props/zIndex.ts +15 -0
  213. package/src/styles.css.d.ts +1 -0
  214. package/src/styles.css.node.js +2 -0
  215. package/src/styles.css.test.ts +24 -0
  216. package/src/types/Button.ts +8 -0
  217. package/src/types/Code.ts +6 -0
  218. package/src/types/Container.ts +3 -0
  219. package/src/types/Density.ts +3 -0
  220. package/src/types/Display.ts +11 -0
  221. package/src/types/Eyebrow.ts +3 -0
  222. package/src/types/Flex.ts +22 -0
  223. package/src/types/FontWeight.ts +3 -0
  224. package/src/types/Grid.ts +3 -0
  225. package/src/types/Heading.ts +6 -0
  226. package/src/types/Icon.ts +3 -0
  227. package/src/types/Interactive.ts +8 -0
  228. package/src/types/List.ts +2 -0
  229. package/src/types/Overflow.ts +3 -0
  230. package/src/types/Placement.ts +16 -0
  231. package/src/types/Position.ts +3 -0
  232. package/src/types/PropDef.ts +73 -0
  233. package/src/types/Radius.ts +3 -0
  234. package/src/types/Responsive.ts +10 -0
  235. package/src/types/Shadow.ts +3 -0
  236. package/src/types/Space.ts +15 -0
  237. package/src/types/Text.ts +3 -0
  238. package/src/types/TextAlign.ts +3 -0
  239. package/src/types/Tone.ts +3 -0
  240. package/src/utils/getProps.test.ts +156 -0
  241. package/src/utils/getProps.ts +156 -0
  242. package/src/utils/mergeTriggerProps.ts +66 -0
  243. package/src/utils/renderPortal.tsx +14 -0
  244. package/src/utils/suffixClassName.ts +5 -0
  245. package/src/version.ts +3 -0
  246. package/LICENSE +0 -21
  247. package/dist/_system-CTe2lb5l.d.ts +0 -40
  248. package/dist/_system-CTe2lb5l.d.ts.map +0 -1
  249. package/dist/arrow-BmX6qbAS.js +0 -170
  250. package/dist/arrow-BmX6qbAS.js.map +0 -1
  251. package/dist/autocomplete.d.ts +0 -140
  252. package/dist/autocomplete.d.ts.map +0 -1
  253. package/dist/autocomplete.js +0 -470
  254. package/dist/autocomplete.js.map +0 -1
  255. package/dist/breadcrumbs.d.ts +0 -18
  256. package/dist/breadcrumbs.d.ts.map +0 -1
  257. package/dist/breadcrumbs.js +0 -119
  258. package/dist/breadcrumbs.js.map +0 -1
  259. package/dist/button-BNyKSDyA.js +0 -180
  260. package/dist/button-BNyKSDyA.js.map +0 -1
  261. package/dist/button-dnqMFkWg.d.ts +0 -76
  262. package/dist/button-dnqMFkWg.d.ts.map +0 -1
  263. package/dist/card-C0a0wQTc.d.ts +0 -7
  264. package/dist/card-C0a0wQTc.d.ts.map +0 -1
  265. package/dist/code.d.ts +0 -20
  266. package/dist/code.d.ts.map +0 -1
  267. package/dist/code.js +0 -90
  268. package/dist/code.js.map +0 -1
  269. package/dist/codeFontStyle-84SMhFtI.js +0 -11
  270. package/dist/codeFontStyle-84SMhFtI.js.map +0 -1
  271. package/dist/component-DVlwaWB-.d.ts +0 -25
  272. package/dist/component-DVlwaWB-.d.ts.map +0 -1
  273. package/dist/element-BYgCE_iK.js +0 -51
  274. package/dist/element-BYgCE_iK.js.map +0 -1
  275. package/dist/factory-BzXTX8_Q.js +0 -3056
  276. package/dist/factory-BzXTX8_Q.js.map +0 -1
  277. package/dist/flex-DmbDG2ks.js +0 -76
  278. package/dist/flex-DmbDG2ks.js.map +0 -1
  279. package/dist/font-EtfxKPUz.d.ts +0 -49
  280. package/dist/font-EtfxKPUz.d.ts.map +0 -1
  281. package/dist/getElementRef-Jw7gY0eV.js +0 -102
  282. package/dist/getElementRef-Jw7gY0eV.js.map +0 -1
  283. package/dist/getScopedTheme-C-sZsyAz.js +0 -267
  284. package/dist/getScopedTheme-C-sZsyAz.js.map +0 -1
  285. package/dist/getTheme_v2-y09KqtEb.js +0 -487
  286. package/dist/getTheme_v2-y09KqtEb.js.map +0 -1
  287. package/dist/grid-6JSgMj1O.js +0 -115
  288. package/dist/grid-6JSgMj1O.js.map +0 -1
  289. package/dist/helpers-C8xxXAQC.js +0 -63
  290. package/dist/helpers-C8xxXAQC.js.map +0 -1
  291. package/dist/hotkeys-CaHsQlsO.js +0 -168
  292. package/dist/hotkeys-CaHsQlsO.js.map +0 -1
  293. package/dist/index.d.ts.map +0 -1
  294. package/dist/layer-Bl5R3uNR.js +0 -61
  295. package/dist/layer-Bl5R3uNR.js.map +0 -1
  296. package/dist/layer-ChlP9Ik6.d.ts +0 -242
  297. package/dist/layer-ChlP9Ik6.d.ts.map +0 -1
  298. package/dist/menu.d.ts +0 -146
  299. package/dist/menu.d.ts.map +0 -1
  300. package/dist/menu.js +0 -626
  301. package/dist/menu.js.map +0 -1
  302. package/dist/popover-B7-28L8y.js +0 -408
  303. package/dist/popover-B7-28L8y.js.map +0 -1
  304. package/dist/popover-CMlQeKn0.d.ts +0 -96
  305. package/dist/popover-CMlQeKn0.d.ts.map +0 -1
  306. package/dist/popover.d.ts +0 -2
  307. package/dist/popover.js +0 -3
  308. package/dist/refractor-CC48DwHi.js +0 -20
  309. package/dist/refractor-CC48DwHi.js.map +0 -1
  310. package/dist/responsiveFont-CilwaORG.js +0 -55
  311. package/dist/responsiveFont-CilwaORG.js.map +0 -1
  312. package/dist/rgba-BSYaEUW6.d.ts +0 -846
  313. package/dist/rgba-BSYaEUW6.d.ts.map +0 -1
  314. package/dist/selectable-B0GUIL74.d.ts +0 -7
  315. package/dist/selectable-B0GUIL74.d.ts.map +0 -1
  316. package/dist/stack-rsNFPq2-.js +0 -112
  317. package/dist/stack-rsNFPq2-.js.map +0 -1
  318. package/dist/styles-css.d.ts +0 -2
  319. package/dist/styles-css.js +0 -4
  320. package/dist/textInput-pSfQjkmx.js +0 -313
  321. package/dist/textInput-pSfQjkmx.js.map +0 -1
  322. package/dist/theme.d.ts +0 -280
  323. package/dist/theme.d.ts.map +0 -1
  324. package/dist/theme.js +0 -55
  325. package/dist/theme.js.map +0 -1
  326. package/dist/toast.d.ts +0 -73
  327. package/dist/toast.d.ts.map +0 -1
  328. package/dist/toast.js +0 -302
  329. package/dist/toast.js.map +0 -1
  330. package/dist/tooltip.d.ts +0 -88
  331. package/dist/tooltip.d.ts.map +0 -1
  332. package/dist/tooltip.js +0 -435
  333. package/dist/tooltip.js.map +0 -1
  334. package/dist/useClickOutsideEvent-wGLGWBZN.js +0 -36
  335. package/dist/useClickOutsideEvent-wGLGWBZN.js.map +0 -1
  336. package/dist/useElementSize-BJvbGHq8.js +0 -51
  337. package/dist/useElementSize-BJvbGHq8.js.map +0 -1
  338. package/dist/useLayer-D1usxIE0.js +0 -712
  339. package/dist/useLayer-D1usxIE0.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,1545 +1,1279 @@
1
- import { a as Props, i as EmptyProps, n as ComponentType, o as TagType, r as ElementType, t as Assign } from "./component-DVlwaWB-.js";
2
- import { A as FlexWrap, C as GridAutoCols, D as FlexDirection, E as FlexAlign, M as BoxHeight, N as BoxOverflow, O as FlexJustify, P as BoxSizing, S as GridItemRowStart, T as GridAutoRows, _ as GridItemColumn, a as ResponsiveBorderProps, b as GridItemRow, c as ResponsiveFlexProps, d as ResponsiveMarginProps, f as ResponsivePaddingProps, g as Radius, h as ResponsiveWidthProps, i as Delay, j as BoxDisplay, k as FlexValue, l as ResponsiveGridItemProps, m as ResponsiveShadowProps, n as LayerProps, o as ResponsiveBoxProps, p as ResponsiveRadiusProps, r as Placement, s as ResponsiveFlexItemProps, t as Layer, u as ResponsiveGridProps, v as GridItemColumnEnd, w as GridAutoFlow, x as GridItemRowEnd, y as GridItemColumnStart } from "./layer-ChlP9Ik6.js";
3
- import { a as ButtonTextAlign, c as Box, i as ButtonMode, l as BoxOwnProps, n as ButtonOwnProps, o as ButtonTone, r as ButtonProps, s as ButtonWidth, t as Button, u as BoxProps } from "./button-dnqMFkWg.js";
4
- import { i as ThemeColorCardToneKey, l as ThemeColorStateToneKey, r as ThemeColorButtonModeKey$1, s as ThemeColorSchemeKey$1, t as ThemeColorAvatarColorKey } from "./_system-CTe2lb5l.js";
5
- import { t as CardTone } from "./card-C0a0wQTc.js";
6
- import { a as ThemeFontWeightKey$1, i as ThemeFontWeight$1, n as ThemeFontKey$1, o as ThemeFonts$1, r as ThemeFontSize$1, t as ThemeFont$1 } from "./font-EtfxKPUz.js";
7
- import { A as ThemeColorMutedTone, B as ThemeColorBase, C as ThemeColorSpotKey, D as ThemeColorSelectableState, E as ThemeColorSelectable, F as ThemeColorCardState, H as ThemeColorToneKey, I as ThemeColorButton, L as ThemeColorButtonState, M as ThemeColorInputState, N as ThemeColorInputStates, O as ThemeColorSelectableStates, P as ThemeColorCard, R as ThemeColorButtonStates, S as ThemeColorSpot, T as ThemeColorSolidTone, U as ThemeColorGenericState, V as ThemeColorName, W as ThemeAvatar, _ as Theme_v2, _t as ThemeColorSyntax$1, a as rgbToHex$1, b as ThemeColorScheme, c as screen$1, d as ThemeColorBuilderOpts, f as createColorTheme$1, ft as ThemeStyles, g as Theme$1, gt as ThemeLayer$1, ht as ThemeShadow$1, i as hslToRgb$1, j as ThemeColorInput, k as ThemeColorMuted, l as multiply$1, m as RootTheme$1, mt as ThemeBoxShadow, n as parseColor$1, o as rgbToHsl$1, p as BaseTheme$1, pt as CSSObject, r as hexToRgb$1, t as rgba$1, u as PartialThemeColorBuilderOpts, v as ThemeInput, vt as HSL$1, w as ThemeColorSolid, x as ThemeColorSchemes, y as ThemeColor, yt as RGB$1, z as ThemeColorButtonTones } from "./rgba-BSYaEUW6.js";
8
- import { t as SelectableTone } from "./selectable-B0GUIL74.js";
9
- import { Component, HTMLProps, PropsWithChildren } from "react";
10
- /**
11
- * @public
12
- * @deprecated Use `BaseTheme` from `@sanity/ui/theme` instead.
13
- */
14
- type BaseTheme = BaseTheme$1;
15
- /**
16
- * @public
17
- * @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
18
- */
19
- type BoxShadow = ThemeBoxShadow;
20
- /**
21
- * @public
22
- * @deprecated Use `HSL` from `@sanity/ui/theme` instead.
23
- */
24
- type HSL = HSL$1;
25
- /**
26
- * @public
27
- * @deprecated Use `RGB` from `@sanity/ui/theme` instead.
28
- */
29
- type RGB = RGB$1;
30
- /**
31
- * @public
32
- * @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
33
- */
34
- type RootTheme = RootTheme$1;
35
- /**
36
- * @public
37
- * @deprecated Use `ThemeStyles` from `@sanity/ui/theme` instead.
38
- */
39
- type Styles = ThemeStyles;
40
- /**
41
- * @public
42
- * @deprecated Use `Theme` from `@sanity/ui/theme` instead.
43
- */
44
- type Theme = Theme$1;
45
- /**
46
- * @public
47
- * @deprecated Use `ThemeColorButtonModeKey` from `@sanity/ui/theme` instead.
48
- */
49
- type ThemeColorButtonModeKey = ThemeColorButtonModeKey$1;
50
- /**
51
- * @public
52
- * @deprecated Use `ThemeColorSchemeKey` from `@sanity/ui/theme` instead.
53
- */
54
- type ThemeColorSchemeKey = ThemeColorSchemeKey$1;
55
- /**
56
- * @public
57
- * @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
58
- */
59
- type ThemeColorSyntax = ThemeColorSyntax$1;
60
- /**
61
- * @public
62
- * @deprecated Use `ThemeFont` from `@sanity/ui/theme` instead.
63
- */
64
- type ThemeFont = ThemeFont$1;
65
- /**
66
- * @public
67
- * @deprecated Use `ThemeFontKey` from `@sanity/ui/theme` instead.
68
- */
69
- type ThemeFontKey = ThemeFontKey$1;
70
- /**
71
- * @public
72
- * @deprecated Use `ThemeFontSize` from `@sanity/ui/theme` instead.
73
- */
74
- type ThemeFontSize = ThemeFontSize$1;
75
- /**
76
- * @public
77
- * @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
78
- */
79
- type ThemeFontWeight = ThemeFontWeight$1;
80
- /**
81
- * @public
82
- * @deprecated Use `ThemeFontWeightKey` from `@sanity/ui/theme` instead.
83
- */
84
- type ThemeFontWeightKey = ThemeFontWeightKey$1;
85
- /**
86
- * @public
87
- * @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
88
- */
89
- type ThemeFonts = ThemeFonts$1;
90
- /**
91
- * @public
92
- * @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
93
- */
94
- type ThemeLayer = ThemeLayer$1;
95
- /**
96
- * @public
97
- * @deprecated Use `ThemeShadow` from `@sanity/ui/theme` instead.
98
- */
99
- type ThemeShadow = ThemeShadow$1;
100
- /**
101
- * @public
102
- * @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
103
- */
104
- export declare const createColorTheme: typeof createColorTheme$1;
105
- /**
106
- * @public
107
- * @deprecated Use `hexToRgb` from `@sanity/ui/theme` instead.
108
- */
109
- export declare const hexToRgb: typeof hexToRgb$1;
110
- /**
111
- * @public
112
- * @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
113
- */
114
- export declare const hslToRgb: typeof hslToRgb$1;
115
- /**
116
- * @public
117
- * @deprecated Use `multiply` from `@sanity/ui/theme` instead.
118
- */
119
- export declare const multiply: typeof multiply$1;
120
- /**
121
- * @public
122
- * @deprecated Use `parseColor` from `@sanity/ui/theme` instead.
123
- */
124
- export declare const parseColor: typeof parseColor$1;
125
- /**
126
- * @public
127
- * @deprecated Use `rgbToHex` from `@sanity/ui/theme` instead.
128
- */
129
- export declare const rgbToHex: typeof rgbToHex$1;
130
- /**
131
- * @public
132
- * @deprecated Use `rgbToHsl` from `@sanity/ui/theme` instead.
133
- */
134
- export declare const rgbToHsl: typeof rgbToHsl$1;
135
- /**
136
- * @public
137
- * @deprecated Use `rgba` from `@sanity/ui/theme` instead.
138
- */
139
- export declare const rgba: typeof rgba$1;
140
- /**
141
- * @public
142
- * @deprecated Use `screen` from `@sanity/ui/theme` instead.
143
- */
144
- export declare const screen: typeof screen$1;
145
- /**
146
- * @public
147
- * @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
148
- */
149
- export declare const studioTheme: BaseTheme$1;
150
- /**
151
- * @public
152
- */
153
- type DialogPosition = 'absolute' | 'fixed';
154
- /**
155
- * @public
156
- */
157
- interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
158
- /**
159
- * @beta
160
- */
161
- __unstable_autoFocus?: boolean;
162
- /**
163
- * @beta
164
- */
165
- __unstable_hideCloseButton?: boolean;
166
- cardRadius?: Radius | Radius[];
167
- cardShadow?: number | number[];
168
- contentRef?: React.ForwardedRef<HTMLDivElement>;
169
- footer?: React.ReactNode;
170
- header?: React.ReactNode;
171
- id: string;
172
- /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
173
- onActivate?: LayerProps['onActivate'];
174
- onClickOutside?: () => void;
175
- onClose?: () => void;
176
- portal?: string;
177
- position?: DialogPosition | DialogPosition[];
178
- scheme?: ThemeColorSchemeKey$1;
179
- zOffset?: number | number[];
180
- /**
181
- * Whether the dialog should animate in on mount.
182
- *
183
- * @beta
184
- * @defaultValue false
185
- */
186
- animate?: boolean;
187
- }
188
- /**
189
- * The Dialog component.
190
- *
191
- * @public
192
- */
193
- export declare function Dialog(props: DialogProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'id' | 'width'>): import("react").JSX.Element;
194
- /**
195
- * This API might change. DO NOT USE IN PRODUCTION.
196
- * @beta
197
- */
198
- interface DialogContextValue {
199
- version: 0.0;
200
- position?: DialogPosition | DialogPosition[];
201
- zOffset?: number | number[];
202
- }
203
- /**
204
- * @internal
205
- */
206
- export declare const DialogContext: import("react").Context<DialogContextValue>;
207
- /**
208
- * This API might change. DO NOT USE IN PRODUCTION.
209
- * @beta
210
- */
211
- interface DialogProviderProps {
212
- children?: React.ReactNode;
213
- position?: DialogPosition | DialogPosition[];
214
- zOffset?: number | number[];
215
- }
216
- /**
217
- * This API might change. DO NOT USE IN PRODUCTION.
218
- * @beta
219
- */
220
- export declare function DialogProvider(props: DialogProviderProps): React.JSX.Element;
221
- /**
222
- * This API might change. DO NOT USE IN PRODUCTION.
223
- * @beta
224
- */
225
- export declare function useDialog(): DialogContextValue;
226
- /**
227
- * @public
228
- */
229
- interface HotkeysProps {
230
- fontSize?: number | number[];
231
- gap?: number | number[];
232
- padding?: number | number[];
233
- radius?: Radius | Radius[];
1
+ import { 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
+ ];
15
+
16
+ /** @public */
17
+ export declare type AlignItems = (typeof ALIGN_ITEMS)[number];
18
+
19
+ /** @public */
20
+ export declare function Badge<T extends ElementType = "span">({
21
+ tone,
22
+ ...props
23
+ }: BadgeProps<T> &
24
+ Omit<ComponentPropsWithRef<T>, keyof BadgeProps<T>>): JSX.Element;
25
+
26
+ /** @public */
27
+ export declare interface BadgeProps<
28
+ T extends React.ElementType = "span",
29
+ > extends ToneProps {
234
30
  /**
235
- * @deprecated Use `gap` instead.
31
+ * HTML element to render.
236
32
  */
237
- space?: never;
238
- keys?: string[];
239
- }
240
- /**
241
- * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
242
- *
243
- * @public
244
- */
245
- export declare function Hotkeys(props: HotkeysProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'size'>): import("react").JSX.Element;
246
- /**
247
- * This API might change. DO NOT USE IN PRODUCTION.
248
- * @beta
249
- */
250
- interface SkeletonProps extends ResponsiveRadiusProps, Omit<BoxOwnProps, 'children'> {
251
- animated?: boolean;
252
- delay?: number;
253
- }
254
- /**
255
- * This API might change. DO NOT USE IN PRODUCTION.
256
- * @beta
257
- */
258
- export declare function Skeleton(props: SkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'height'>): import("react").JSX.Element;
259
- /**
260
- * This API might change. DO NOT USE IN PRODUCTION.
261
- * @beta
262
- */
263
- interface TextSkeletonProps extends SkeletonProps {
264
- size?: number | number[];
265
- }
266
- /**
267
- * This API might change. DO NOT USE IN PRODUCTION.
268
- * @beta
269
- */
270
- interface LabelSkeletonProps extends SkeletonProps {
271
- size?: number | number[];
272
- }
273
- /**
274
- * This API might change. DO NOT USE IN PRODUCTION.
275
- * @beta
276
- */
277
- interface HeadingSkeletonProps extends SkeletonProps {
278
- size?: number | number[];
279
- }
280
- /**
281
- * This API might change. DO NOT USE IN PRODUCTION.
282
- * @beta
283
- */
284
- interface CodeSkeletonProps extends SkeletonProps {
285
- size?: number | number[];
286
- }
287
- /**
288
- * This API might change. DO NOT USE IN PRODUCTION.
289
- * @beta
290
- */
291
- export declare function TextSkeleton(props: TextSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
292
- /**
293
- * This API might change. DO NOT USE IN PRODUCTION.
294
- * @beta
295
- */
296
- export declare function LabelSkeleton(props: LabelSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
297
- /**
298
- * This API might change. DO NOT USE IN PRODUCTION.
299
- * @beta
300
- */
301
- export declare function HeadingSkeleton(props: HeadingSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
302
- /**
303
- * This API might change. DO NOT USE IN PRODUCTION.
304
- * @beta
305
- */
306
- export declare function CodeSkeleton(props: CodeSkeletonProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'height' | 'size'>): import("react").JSX.Element;
307
- /**
308
- * @public
309
- */
310
- interface TabProps {
311
- /**
312
- * The `id` of the correlating `TabPanel` component.
313
- */
314
- 'aria-controls': string;
315
- 'id': string;
316
- 'icon'?: React.ElementType | React.ReactNode;
317
- 'focused'?: boolean;
318
- 'fontSize'?: number | number[];
319
- 'label'?: React.ReactNode;
320
- 'padding'?: number | number[];
321
- 'selected'?: boolean;
322
- 'tone'?: ButtonTone;
323
- }
324
- /**
325
- * @public
326
- */
327
- export declare function Tab(props: TabProps & Omit<React.HTMLProps<HTMLButtonElement>, 'aria-controls' | 'as' | 'id' | 'label' | 'type' | 'width'>): import("react").JSX.Element;
328
- /**
329
- * @public
330
- */
331
- interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {
33
+ as?: T;
332
34
  /**
333
- * @deprecated Use `gap` instead.
35
+ * Shows an icon in the start position (left side in left-to-right languages).
334
36
  */
335
- space?: never;
336
- /** The spacing between children. */
337
- gap?: number | number[];
338
- }
339
- /**
340
- * @public
341
- */
342
- type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>;
343
- /**
344
- * The `Inline` component is a layout utility for aligning and spacing items horizontally.
345
- *
346
- * @public
347
- */
348
- export declare const Inline: <E extends ElementType = 'div'>(props: InlineProps<E>) => React.JSX.Element;
349
- /**
350
- * @public
351
- */
352
- interface TabListProps extends Omit<InlineOwnProps, 'height'> {
353
- children: Array<React.JSX.Element | null | undefined | false>;
354
- }
355
- /**
356
- * @public
357
- */
358
- export declare function TabList(props: TabListProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height'>): import("react").JSX.Element;
359
- /**
360
- * @public
361
- */
362
- interface TabPanelProps extends BoxOwnProps {
37
+ iconStart?: React.ElementType | React.ReactNode;
363
38
  /**
364
- * The `id` of the correlating `Tab` component.
39
+ * Sets Badge's text label. Use instead of children unless you have a special use case.
365
40
  */
366
- 'aria-labelledby': string;
367
- 'id': string;
368
- }
369
- /**
370
- * @public
371
- */
372
- export declare function TabPanel(props: TabPanelProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'aria-labelledby' | 'id' | 'role'>): import("react").JSX.Element;
373
- /**
374
- * This API might change. DO NOT USE IN PRODUCTION.
375
- * @beta
376
- */
377
- interface TreeProps {
378
- gap?: number | number[];
41
+ text?: string;
42
+ }
43
+
44
+ declare type BorderProps = {
45
+ /** CSS **border** property */
46
+ border?: Responsive<boolean>;
47
+ /** CSS **border-top** property */
48
+ borderTop?: Responsive<boolean>;
49
+ /** CSS **border-right** property */
50
+ borderRight?: Responsive<boolean>;
51
+ /** CSS **border-bottom** property */
52
+ borderBottom?: Responsive<boolean>;
53
+ /** CSS **border-left** property */
54
+ borderLeft?: Responsive<boolean>;
55
+ /** CSS **border-radius** property */
56
+ radius?: Responsive<Radius>;
57
+ };
58
+
59
+ /** @public */
60
+ export declare function Box<T extends ElementType = "div">({
61
+ display,
62
+ minHeight,
63
+ minWidth,
64
+ ...props
65
+ }: BoxProps<T> &
66
+ Omit<ComponentPropsWithRef<T>, keyof BoxProps<T>>): JSX.Element;
67
+
68
+ /** @public */
69
+ export declare interface BoxProps<
70
+ T extends React.ElementType = "div",
71
+ > extends LayoutProps {
379
72
  /**
380
- * @deprecated Use `gap` instead.
73
+ * HTML element or component to render.
381
74
  */
382
- space?: never;
75
+ as?: T;
76
+ /**
77
+ * CSS `display` property.
78
+ * @remarks Does not include `'flex'` or `'grid'`. Use the Flex or Grid components for those.
79
+ */
80
+ display?: Responsive<DisplayBlock>;
383
81
  }
384
- /**
385
- * This API might change. DO NOT USE IN PRODUCTION.
386
- * @beta
387
- */
388
- export declare function Tree(props: TreeProps & Omit<React.HTMLProps<HTMLUListElement>, 'align' | 'as' | 'height' | 'role' | 'wrap'>): React.JSX.Element;
389
- /**
390
- * @beta
391
- */
392
- interface TreeItemProps {
393
- expanded?: boolean;
394
- fontSize?: number | number[];
395
- icon?: React.ElementType;
82
+
83
+ /** @public */
84
+ export declare function Button<T extends ElementType = "button">({
85
+ density,
86
+ level,
87
+ tone,
88
+ ...props
89
+ }: ButtonProps<T> &
90
+ Omit<ComponentPropsWithRef<T>, keyof ButtonProps<T>>): JSX.Element;
91
+
92
+ declare const BUTTON_DENSITY: readonly ["regular", "loose"];
93
+
94
+ declare const BUTTON_LEVEL: readonly ["primary", "secondary", "tertiary"];
95
+
96
+ declare const BUTTON_TONE: readonly ["neutral", "critical"];
97
+
98
+ declare type ButtonDensity = (typeof BUTTON_DENSITY)[number];
99
+
100
+ declare type ButtonLevel = (typeof BUTTON_LEVEL)[number];
101
+
102
+ /** @public */
103
+ export declare interface ButtonProps<T extends React.ElementType = "button"> {
396
104
  /**
397
- * Allows passing a custom element type to the link component
105
+ * HTML element to render.
398
106
  */
399
- linkAs?: ElementType;
107
+ as?: InteractiveAs<T>;
400
108
  /**
401
- * Additional props for the link element that is rendered when `href` is set — e.g. `next/link`'s
402
- * `prefetch` together with `linkAs={Link}`. Props controlled by `TreeItem` itself (`href`,
403
- * `role`, `tabIndex`, `aria-expanded` and the ref) take precedence.
109
+ * Sets padding and gap together to specify size.
404
110
  */
405
- linkProps?: React.HTMLProps<HTMLAnchorElement> & Record<string, unknown>;
406
- padding?: number | number[];
407
- gap?: number | number[];
111
+ density?: ButtonDensity;
408
112
  /**
409
- * @deprecated Use `gap` instead.
113
+ * Sets Button to fill the width of its container.
410
114
  */
411
- space?: never;
412
- text?: React.ReactNode;
413
- weight?: ThemeFontWeightKey$1;
414
- }
415
- /**
416
- * This API might change. DO NOT USE IN PRODUCTION.
417
- * @beta
418
- */
419
- export declare function TreeItem(props: TreeItemProps & Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'ref' | 'role'>): React.JSX.Element;
420
- /**
421
- * @beta
422
- */
423
- interface TreeState {
424
- [key: string]: {
425
- element: HTMLElement;
426
- expanded: boolean;
427
- } | undefined;
115
+ fullWidth?: Responsive<boolean>;
116
+ /**
117
+ * Shows an icon in the start position (left side in left-to-right languages).
118
+ */
119
+ iconStart?: React.ElementType | React.ReactNode;
120
+ /**
121
+ * Shows an icon in the end position (right side in left-to-right languages).
122
+ */
123
+ iconEnd?: React.ElementType | React.ReactNode;
124
+ /**
125
+ * Sets the importance of Button's action.
126
+ */
127
+ level?: ButtonLevel;
128
+ /**
129
+ * Places Button into a loading state.
130
+ */
131
+ loading?: boolean;
132
+ /**
133
+ * Sets Button's text label.
134
+ */
135
+ text?: string;
136
+ /**
137
+ * Sets Button's semantic meaning and related color.
138
+ */
139
+ tone?: ButtonTone;
428
140
  }
429
- /**
430
- * @beta
431
- */
432
- interface TreeContextValue {
433
- version: 0.0;
434
- focusedElement: HTMLElement | null;
435
- level: number;
436
- path: string[];
437
- registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void;
438
- setExpanded: (path: string, expanded: boolean) => void;
439
- setFocusedElement: (focusedElement: HTMLElement | null) => void;
440
- gap: number | number[];
441
- /**
442
- * @deprecated Use `gap` instead.
443
- */
444
- space?: never;
445
- state: TreeState;
141
+
142
+ declare type ButtonTone = (typeof BUTTON_TONE)[number];
143
+
144
+ /** @public */
145
+ export declare function Card<T extends ElementType = "div">({
146
+ density,
147
+ tone,
148
+ ...props
149
+ }: CardProps<T> &
150
+ Omit<ComponentPropsWithRef<T>, keyof CardProps<T>>): JSX.Element;
151
+
152
+ /** @public */
153
+ export declare interface CardProps<T extends React.ElementType = "div">
154
+ extends MarginProps, ToneProps {
155
+ /**
156
+ * HTML element or component to render.
157
+ */
158
+ as?: T;
159
+ /**
160
+ * Sets padding, gap, and border-radius together to specify size. This prop is used in place of separate `padding`, `gap`, and `border-radius` props.
161
+ */
162
+ density?: Responsive<Density>;
446
163
  }
447
- /**
448
- * @beta
449
- */
450
- export declare function useTree(): TreeContextValue;
451
- /**
452
- * @internal
453
- */
454
- export declare function _raf(fn: () => void): () => void;
455
- /**
456
- * @internal
457
- */
458
- export declare function _raf2(fn: () => void): () => void;
459
- /**
460
- * @internal
461
- */
462
- export declare function _isEnterToClickElement(element: HTMLElement): boolean;
463
- /**
464
- * @internal
465
- */
466
- export declare function isHTMLElement(node: unknown): node is HTMLElement;
467
- /**
468
- * @internal
469
- */
470
- export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement;
471
- /**
472
- * @internal
473
- */
474
- export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement;
475
- /**
476
- * @internal
477
- */
478
- export declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement;
479
- /**
480
- * @internal
481
- */
482
- export declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement;
483
- /**
484
- * @internal
485
- */
486
- export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement;
487
- /**
488
- * @internal
489
- */
490
- export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean;
491
- /**
492
- * @internal
493
- */
494
- export declare function _hasFocus(element: HTMLElement): boolean;
495
- /**
496
- * @internal
497
- */
498
- export declare function isFocusable(element: HTMLElement): boolean;
499
- /**
500
- * @internal
501
- */
502
- export declare function attemptFocus(element: HTMLElement): boolean;
503
- /**
504
- * @internal
505
- */
506
- export declare function focusFirstDescendant(element: HTMLElement): boolean;
507
- /**
508
- * @internal
509
- */
510
- export declare function focusLastDescendant(element: HTMLElement): boolean;
511
- /**
512
- * @internal
513
- */
514
- export declare function _isScrollable(el: Node): boolean;
164
+
515
165
  /** @beta */
516
- type ArrayPropPrimitive = string | number | boolean | undefined | null;
517
- /**
518
- * @deprecated instead of `useArrayProp(width)` use `Array.isArray(width) ? width : [width]` instead
519
- * @beta
520
- */
521
- export declare function useArrayProp(_val?: never, _defaultVal?: never): never;
522
- /**
523
- * @public
524
- */
525
- type ClickOutsideListener = (event: MouseEvent) => void;
526
- /**
527
- * @public
528
- */
529
- type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[];
530
- /**
531
- * @public
532
- * @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
533
- * ```tsx
534
- * const [button, setButtonElement] = useState(null)
535
- * useClickOutside((event) => {}, [button])
536
- * return <button ref={setButtonElement} />
537
- * ```
538
- * do:
539
- * ```tsx
540
- * const buttonRef = useRef()
541
- * useClickOutsideEvent((event) => {}, () => [buttonRef.current])
542
- * return <button ref={buttonRef} />
543
- * ```
544
- */
545
- export declare function useClickOutside(_listener?: never, _elementsArg?: never, _boundaryElement?: never): never;
546
- /**
547
- * @public
548
- */
549
- type ClickOutsideEventListener = (event: MouseEvent) => void;
550
- /**
551
- * @public
552
- */
553
- type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[];
554
- /**
555
- * @public
556
- */
557
- export declare function useClickOutsideEvent(listener: ClickOutsideEventListener | false | undefined, elementsArg?: () => ClickOutsideEventElements, boundaryElement?: () => HTMLElement | null): void;
558
- /**
559
- * @beta
560
- */
561
- export declare function useCustomValidity(ref: {
562
- current: null | {
563
- setCustomValidity: (validity: string) => void;
564
- };
565
- }, customValidity: string | undefined): void;
566
- /**
567
- * Subscribe to the rect of a DOM element.
568
- * @beta
569
- *
570
- * @deprecated Use `useElementSize` instead
571
- */
572
- export declare function useElementRect(_element?: never): never;
573
- /**
574
- * @beta
575
- */
576
- interface ElementRectValue {
577
- width: number;
578
- height: number;
579
- }
580
- /**
581
- * @beta
582
- */
583
- interface ElementSize {
584
- content: ElementRectValue;
585
- border: ElementRectValue;
586
- /** @deprecated INTERNAL ONLY */
587
- _contentRect: DOMRectReadOnly;
588
- }
589
- /**
590
- * @internal
591
- */
592
- type _ElementSizeSubscriber = (elementRect: ElementSize) => void;
593
- /**
594
- * @internal
595
- */
596
- interface _ElementSizeObserver {
597
- subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
166
+ export declare function Checkbox(props: CheckboxProps): JSX.Element;
167
+
168
+ /** @beta */
169
+ export declare interface CheckboxProps
170
+ extends React.ComponentProps<"input">, MarginProps {
171
+ /**
172
+ * Applies error styling to the checkbox mark.
173
+ * @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
174
+ */
175
+ error?: boolean;
176
+ /**
177
+ * Renders the "mixed state" mark (a horizontal line).
178
+ * @remarks Use when the checkbox controls a group with some-but-not-all children checked.
179
+ */
180
+ indeterminate?: boolean;
181
+ /**
182
+ * Visible label next to the checkbox.
183
+ */
184
+ label: React.ReactNode;
598
185
  }
599
- /**
600
- * @internal
601
- */
602
- interface _ElementSizeListener {
603
- subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
186
+
187
+ /** @public */
188
+ export declare function Code<T extends CodeTag = "pre">({
189
+ size,
190
+ ...props
191
+ }: CodeProps<T> &
192
+ Omit<ComponentPropsWithRef<T>, keyof CodeProps<T>>): JSX.Element;
193
+
194
+ declare const CODE_SIZE: readonly [0, 1, 2, 3, 4];
195
+
196
+ declare const CODE_TAG: readonly ["pre", "span"];
197
+
198
+ /** @public */
199
+ export declare interface CodeProps<T extends CodeTag = "pre"> extends Omit<
200
+ TypographyProps,
201
+ "align" | "truncate" | "tone"
202
+ > {
203
+ /**
204
+ * HTML element or component to render.
205
+ * @remarks The defined element wraps an inner `<code>` tag.
206
+ */
207
+ as?: T;
208
+ /**
209
+ * Refractor language for syntax highlighting.
210
+ */
211
+ language?: string;
212
+ /**
213
+ * Sets font size.
214
+ */
215
+ size?: Responsive<CodeSize>;
604
216
  }
605
- /**
606
- * @internal
607
- */
608
- export declare const _elementSizeObserver: _ElementSizeObserver;
609
- /**
610
- * Subscribe to the size of a DOM element.
611
- * @beta
612
- */
613
- export declare function useElementSize(element: HTMLElement | null): ElementSize | null;
614
- /**
615
- * @beta
616
- * @deprecated use `useImperativeHandle` instead
617
- * @example
618
- * ```diff
619
- * -const ref = useForwardedRef(forwardedRef)
620
- * +const ref = useRef(null)
621
- * +useImperativeHandle(forwardedRef, () => ref.current)
622
- * ```
623
- */
624
- export declare function useForwardedRef(_ref?: never): never;
625
- /**
626
- * Adds global keydown event listener to the window.
627
- *
628
- * @param onKeyDown - The function to call when a keydown event is triggered.
629
- * @param options - The options to pass to the addEventListener function (example, capture: true)
630
- * @beta
631
- */
632
- export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void, options?: AddEventListenerOptions): void;
633
- /**
634
- * Efficiently subscribes to `window.matchMedia` queries
635
- *
636
- * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
637
- *
638
- * @public
639
- */
640
- export declare function useMatchMedia(mediaQueryString: `(${string})`, getServerSnapshot?: () => boolean): boolean;
641
- /**
642
- * @internal
643
- */
644
- interface _MediaStore {
645
- subscribe: (onStoreChange: () => void) => () => void;
646
- getSnapshot: () => number;
217
+
218
+ /** @public */
219
+ export declare type CodeSize = (typeof CODE_SIZE)[number];
220
+
221
+ declare type CodeTag = (typeof CODE_TAG)[number];
222
+
223
+ /** @public */
224
+ export declare function Container<T extends ElementType = "div">({
225
+ marginX,
226
+ ...props
227
+ }: ContainerProps<T> &
228
+ Omit<ComponentPropsWithRef<T>, keyof ContainerProps<T>>): JSX.Element;
229
+
230
+ declare const CONTAINER_SIZE: readonly [0, 1, 2, 3, 4, 5];
231
+
232
+ /** @public */
233
+ export declare interface ContainerProps<
234
+ T extends React.ElementType = "div",
235
+ > extends LayoutProps {
236
+ /**
237
+ * HTML element or component to render.
238
+ */
239
+ as?: T;
240
+ /**
241
+ * Maximum width of the container.
242
+ */
243
+ size?: Responsive<ContainerSize>;
647
244
  }
245
+
246
+ /** @public */
247
+ export declare type ContainerSize = (typeof CONTAINER_SIZE)[number];
248
+
249
+ declare const DENSITY: readonly ["compact", "regular", "loose"];
250
+
251
+ /** @public */
252
+ export declare type Density = (typeof DENSITY)[number];
253
+
648
254
  /**
649
- * This API might change. DO NOT USE IN PRODUCTION.
650
255
  * @beta
651
- */
652
- export declare function useMediaIndex(): number;
653
- /**
654
- * Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
655
- *
656
- * @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://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
657
- *
658
- * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
659
- * 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
660
- * @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
661
- *
662
- * @public
663
- */
664
- export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean;
665
- /**
666
- * Returns true if motion should be reduced
667
256
  *
668
- * @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://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
257
+ * Renders a modal dialog element — should not be used for nonmodal dialogs.
258
+ * Modal dialogs make their containing documents inert, and render on the topmost
259
+ * layer within that containing document; they must be dimissed before the containing
260
+ * document and its contents become unblocked. They also trap focus within the bounds
261
+ * of the dialog element and its descendants.
669
262
  *
670
- * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
671
- * 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
672
- * @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
673
- *
674
- * @public
675
- */
676
- export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean;
677
- /**
678
- * @public
679
- */
680
- type AvatarPosition = 'top' | 'bottom' | 'inside';
681
- /**
682
- * @public
683
- */
684
- type AvatarSize = 0 | 1 | 2 | 3;
685
- /**
686
- * @public
687
- */
688
- type AvatarStatus = 'online' | 'editing' | 'inactive';
689
- /**
690
- * @public
691
- */
692
- interface AvatarOwnProps {
693
- /** @beta */
694
- __unstable_hideInnerStroke?: boolean;
695
- animateArrowFrom?: AvatarPosition;
696
- arrowPosition?: AvatarPosition;
697
- color?: ThemeColorAvatarColorKey;
698
- initials?: string;
699
- onImageLoadError?: (event: Error) => void;
700
- size?: AvatarSize | AvatarSize[];
701
- src?: string;
702
- /**
703
- * The status of the entity this Avatar represents.
704
- * @alpha
705
- */
706
- status?: AvatarStatus;
707
- title?: string;
708
- }
709
- /**
710
- * @public
711
- */
712
- type AvatarProps<E extends ElementType = 'div'> = Props<AvatarOwnProps, E>;
713
- /**
714
- * Avatars are used to represent people and other agents (e.g. bots).
715
- *
716
- * @public
717
- */
718
- export declare const Avatar: <E extends ElementType = 'div'>(props: AvatarProps<E>) => React.JSX.Element;
719
- /**
720
- * @public
721
- */
722
- interface AvatarCounterProps {
723
- count: number;
724
- size?: AvatarSize | AvatarSize[];
725
- /** @deprecated No longer supported. */
726
- tone?: never;
727
- }
728
- /**
729
- * @public
730
- */
731
- export declare function AvatarCounter(props: AvatarCounterProps & {
732
- ref?: React.Ref<HTMLDivElement>;
733
- }): import("react").JSX.Element;
734
- /**
735
- * @public
736
- */
737
- interface AvatarStackProps {
738
- children: React.ReactNode;
739
- maxLength?: number;
740
- size?: AvatarSize | AvatarSize[];
741
- /** @deprecated No longer supported. */
742
- tone?: never;
743
- }
744
- /**
745
- * @public
746
- */
747
- export declare function AvatarStack(props: AvatarStackProps & Omit<React.HTMLProps<HTMLDivElement>, 'as'>): import("react").JSX.Element;
748
- /**
749
- * @internal
750
- */
751
- interface AvatarRootStyleProps {
752
- $color: ThemeColorAvatarColorKey;
753
- }
754
- /**
755
- * @internal
756
- */
757
- interface ResponsiveAvatarSizeStyleProps {
758
- $size: AvatarSize[];
759
- }
760
- /**
761
- * @public
762
- * @deprecated No longer used
763
- */
764
- type BadgeMode = never;
765
- /**
766
- * @public
767
- */
768
- type BadgeTone = ThemeColorStateToneKey;
769
- /**
770
- * @public
771
- */
772
- interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
773
- fontSize?: number | number[];
774
- /** @deprecated No longer used. */
775
- mode?: never;
776
- tone?: BadgeTone;
263
+ * For more on dialogs and modality, refer to the HTML specification for the dialog element:
264
+ * https://html.spec.whatwg.org/dev/interactive-elements.html#the-dialog-element
265
+ */
266
+ export declare const Dialog: typeof DialogRoot;
267
+
268
+ declare function DialogContent(props: ComponentProps<"div">): JSX.Element;
269
+
270
+ declare function DialogFooter(props: ComponentProps<"div">): JSX.Element;
271
+
272
+ /** @beta */
273
+ export declare interface DialogProps extends Omit<
274
+ React.ComponentProps<"dialog">,
275
+ "open"
276
+ > {
277
+ /**
278
+ * Text for the dialog heading.
279
+ * @remarks Recommended for accessibility. The component sets `aria-labelledby` to the heading when you give this prop.
280
+ */
281
+ header?: string;
282
+ /**
283
+ * A function to call alongside the native `close` event.
284
+ * @remarks Use it to set `open` back to `false`. It runs for every close cause: the Escape key, a backdrop click, the close button, or a programmatic close.
285
+ */
286
+ onClose: React.ReactEventHandler<HTMLDialogElement>;
287
+ /**
288
+ * Toggles the dialog's open state.
289
+ * @remarks `true` calls `showModal()` on the element. `false` calls `close()`.
290
+ */
291
+ open?: boolean;
292
+ /** Sets the max width of the dialog */
293
+ size?: Responsive<ContainerSize>;
294
+ /** CSS length value used to set the Dialog’s distance from the top of the viewport; Dialog is centered if not provided */
295
+ topAnchor?: string;
296
+ }
297
+
298
+ declare function DialogRoot({ open, size, ...props }: DialogProps): JSX.Element;
299
+
300
+ declare namespace DialogRoot {
301
+ var displayName: string;
302
+ var Content: typeof DialogContent;
303
+ var Footer: typeof DialogFooter;
304
+ }
305
+
306
+ declare const DISPLAY_BLOCK: readonly ["block", "inline-block", "none"];
307
+
308
+ declare const DISPLAY_FLEX: readonly ["flex", "inline-flex", "none"];
309
+
310
+ declare const DISPLAY_GRID: readonly ["grid", "inline-grid", "none"];
311
+
312
+ /** @public */
313
+ export declare type DisplayBlock = (typeof DISPLAY_BLOCK)[number];
314
+
315
+ /** @public */
316
+ export declare type DisplayFlex = (typeof DISPLAY_FLEX)[number];
317
+
318
+ /** @public */
319
+ export declare type DisplayGrid = (typeof DISPLAY_GRID)[number];
320
+
321
+ /** @public */
322
+ export declare function Divider(props: DividerProps): JSX.Element;
323
+
324
+ /** @public */
325
+ export declare interface DividerProps
326
+ extends React.ComponentProps<"hr">, MarginProps {}
327
+
328
+ /** @public */
329
+ export declare function Eyebrow<T extends ElementType = "span">({
330
+ size,
331
+ weight,
332
+ ...props
333
+ }: EyebrowProps<T> &
334
+ Omit<ComponentPropsWithRef<T>, keyof EyebrowProps<T>>): JSX.Element;
335
+
336
+ declare const EYEBROW_SIZE: readonly [0, 1, 2, 3, 4];
337
+
338
+ /** @public */
339
+ export declare interface EyebrowProps<
340
+ T extends React.ElementType = "span",
341
+ > extends TypographyProps {
342
+ /**
343
+ * HTML element to render.
344
+ */
345
+ as?: T;
346
+ /**
347
+ * Sets font size. Uses the same scale as Label.
348
+ */
349
+ size?: Responsive<EyebrowSize>;
777
350
  }
778
- /**
779
- * @public
780
- */
781
- type BadgeProps<E extends ElementType = 'div'> = Props<BadgeOwnProps, E>;
782
- /**
783
- * Badges are used to tag resources.
784
- *
785
- * @public
786
- */
787
- export declare const Badge: <E extends ElementType = 'div'>(props: BadgeProps<E>) => React.JSX.Element;
788
- /**
789
- * @public
790
- */
791
- interface CardOwnProps extends BoxOwnProps, ResponsiveBorderProps, ResponsiveRadiusProps, ResponsiveShadowProps {
351
+
352
+ /** @public */
353
+ export declare type EyebrowSize = (typeof EYEBROW_SIZE)[number];
354
+
355
+ /** @public */
356
+ export declare function Flex<T extends ElementType = "div">({
357
+ display,
358
+ minHeight,
359
+ minWidth,
360
+ ...props
361
+ }: FlexProps<T> &
362
+ Omit<ComponentPropsWithRef<T>, keyof FlexProps<T>>): JSX.Element;
363
+
364
+ declare const FLEX_DIRECTION: readonly [
365
+ "row",
366
+ "row-reverse",
367
+ "column",
368
+ "column-reverse",
369
+ ];
370
+
371
+ declare const FLEX_WRAP: readonly ["wrap", "wrap-reverse", "nowrap"];
372
+
373
+ declare type FlexChildProps = {
374
+ /** CSS **flex-basis** property */
375
+ flexBasis?: Responsive<string>;
376
+ /** CSS **flex-grow** property */
377
+ flexGrow?: Responsive<number>;
378
+ /** CSS **flex-shrink** property */
379
+ flexShrink?: Responsive<number>;
380
+ };
381
+
382
+ /** @public */
383
+ export declare type FlexDirection = (typeof FLEX_DIRECTION)[number];
384
+
385
+ /** @public */
386
+ export declare type FlexParentProps = {
387
+ /** CSS **align-items** property */
388
+ alignItems?: Responsive<AlignItems>;
389
+ /** CSS **justify-content** property */
390
+ justifyContent?: Responsive<JustifyContent>;
391
+ /** CSS **flex-direction** property */
392
+ flexDirection?: Responsive<FlexDirection>;
393
+ /** CSS **flex-wrap** property */
394
+ flexWrap?: Responsive<FlexWrap>;
395
+ };
396
+
397
+ /** @public */
398
+ export declare interface FlexProps<T extends React.ElementType = "div">
399
+ extends FlexParentProps, GapProps, LayoutProps {
792
400
  /**
793
- * Do not use in production.
794
- * @beta
401
+ * HTML element or component to render.
795
402
  */
796
- __unstable_checkered?: boolean;
403
+ as?: T;
797
404
  /**
798
- * Do not use in production.
799
- * @beta
405
+ * CSS `display` property.
800
406
  */
801
- __unstable_focusRing?: boolean;
802
- disabled?: boolean;
803
- muted?: boolean;
804
- pressed?: boolean;
805
- scheme?: ThemeColorSchemeKey$1;
806
- selected?: boolean;
807
- tone?: CardTone;
407
+ display?: Responsive<DisplayFlex>;
808
408
  }
809
- /**
810
- * @public
811
- */
812
- type CardProps<E extends ElementType = 'div'> = Props<CardOwnProps, E>;
813
- /**
814
- * The `Card` component acts much like a `Box`, but with a background and foreground color.
815
- * Components within a `Card` inherit its colors.
816
- *
817
- * @public
818
- */
819
- export declare const Card: <E extends ElementType = 'div'>(props: CardProps<E>) => React.JSX.Element;
820
- /**
821
- * @internal
822
- */
823
- interface CardStyleProps {
824
- $checkered: boolean;
825
- $focusRing: boolean;
826
- $muted: boolean;
827
- $tone: ThemeColorCardToneKey;
409
+
410
+ /** @public */
411
+ export declare type FlexWrap = (typeof FLEX_WRAP)[number];
412
+
413
+ declare const FONT_WEIGHT: readonly ["regular", "medium", "semibold", "bold"];
414
+
415
+ /** @public */
416
+ export declare type FontWeight = (typeof FONT_WEIGHT)[number];
417
+
418
+ /** @public */
419
+ export declare type GapProps = {
420
+ /** CSS **gap** property */
421
+ gap?: Responsive<SpaceInherit>;
422
+ /** CSS **row-gap** property */
423
+ rowGap?: Responsive<SpaceInherit>;
424
+ /** CSS **column-gap** property */
425
+ columnGap?: Responsive<SpaceInherit>;
426
+ };
427
+
428
+ /** @public */
429
+ export declare function Grid<T extends ElementType = "div">({
430
+ display,
431
+ minHeight,
432
+ minWidth,
433
+ ...props
434
+ }: GridProps<T> &
435
+ Omit<ComponentPropsWithRef<T>, keyof GridProps<T>>): JSX.Element;
436
+
437
+ declare const GRID_AUTO_FLOW: readonly [
438
+ "row",
439
+ "column",
440
+ "row dense",
441
+ "column dense",
442
+ "dense",
443
+ ];
444
+
445
+ /** @public */
446
+ export declare type GridAutoFlow = (typeof GRID_AUTO_FLOW)[number];
447
+
448
+ declare type GridChildProps = {
449
+ /** CSS **grid-column** property */
450
+ gridColumn?: Responsive<string>;
451
+ /** CSS **grid-column-start** property */
452
+ gridColumnStart?: Responsive<string>;
453
+ /** CSS **grid-column-end** property */
454
+ gridColumnEnd?: Responsive<string>;
455
+ /** CSS **grid-row** property */
456
+ gridRow?: Responsive<string>;
457
+ /** CSS **grid-row-start** property */
458
+ gridRowStart?: Responsive<string>;
459
+ /** CSS **grid-row-end** property */
460
+ gridRowEnd?: Responsive<string>;
461
+ };
462
+
463
+ /** @public */
464
+ export declare type GridParentProps = {
465
+ /** CSS **grid-auto-flow** property */
466
+ gridAutoFlow?: Responsive<GridAutoFlow>;
467
+ /** CSS **grid-auto-columns** property */
468
+ gridAutoColumns?: Responsive<string>;
469
+ /** CSS **grid-auto-row** property */
470
+ gridAutoRows?: Responsive<string>;
471
+ /** CSS **grid-template-columns** property */
472
+ gridTemplateColumns?: Responsive<string>;
473
+ /** CSS **grid-template-rows** property */
474
+ gridTemplateRows?: Responsive<string>;
475
+ };
476
+
477
+ /** @public */
478
+ export declare interface GridProps<T extends React.ElementType = "div">
479
+ extends GridParentProps, GapProps, LayoutProps {
480
+ /**
481
+ * HTML element or component to render.
482
+ */
483
+ as?: T;
484
+ /**
485
+ * CSS `display` property.
486
+ */
487
+ display?: Responsive<DisplayGrid>;
828
488
  }
829
- /**
830
- * @public
831
- */
832
- interface CheckboxProps {
833
- indeterminate?: boolean;
834
- customValidity?: string;
489
+
490
+ /** @public */
491
+ export declare function Heading<T extends ElementType = "h2">({
492
+ size,
493
+ weight,
494
+ ...props
495
+ }: HeadingProps &
496
+ Omit<ComponentPropsWithRef<T>, keyof HeadingProps>): JSX.Element;
497
+
498
+ declare const HEADING_SIZE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
499
+
500
+ declare const HEADING_TAG: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
501
+
502
+ /** @public */
503
+ export declare interface HeadingProps extends TypographyProps {
504
+ /**
505
+ * Semantic heading element to render.
506
+ * @remarks Always set this explicitly.
507
+ */
508
+ as?: HeadingTag;
509
+ /**
510
+ * Sets font size.
511
+ * @remarks Independent of `as`.
512
+ */
513
+ size?: Responsive<HeadingSize>;
835
514
  }
836
- /**
837
- * Checkboxes allow the user to select one or more items from a set.
838
- *
839
- * @public
840
- */
841
- export declare function Checkbox(props: Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'type'> & CheckboxProps): import("react").JSX.Element;
842
- /**
843
- * @public
844
- */
845
- interface ContainerOwnProps extends BoxOwnProps, ResponsiveWidthProps {}
846
- /**
847
- * @public
848
- */
849
- type ContainerProps<E extends ElementType = 'div'> = Props<ContainerOwnProps, E>;
850
- /**
851
- * The `Container` component wraps content layout in a defined set of widths.
852
- *
853
- * @public
854
- */
855
- export declare const Container: <E extends ElementType = 'div'>(props: ContainerProps<E>) => React.JSX.Element;
856
- /**
857
- * @internal
858
- */
859
- interface ResponsiveWidthStyleProps {
860
- $width: (number | 'auto')[];
515
+
516
+ /** @public */
517
+ export declare type HeadingSize = (typeof HEADING_SIZE)[number];
518
+
519
+ declare type HeadingTag = (typeof HEADING_TAG)[number];
520
+
521
+ declare type HeightProps = {
522
+ /** CSS **height** property */
523
+ height?: Responsive<string>;
524
+ /** CSS **min-height** property */
525
+ minHeight?: Responsive<string>;
526
+ /** CSS **max-height** property */
527
+ maxHeight?: Responsive<string>;
528
+ };
529
+
530
+ /** @public */
531
+ export declare function HStack<T extends ElementType = "div">(
532
+ props: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>,
533
+ ): JSX.Element;
534
+
535
+ /** @public */
536
+ export declare interface HStackProps<
537
+ T extends React.ElementType = "div",
538
+ > extends Pick<GapProps, "gap"> {
539
+ /**
540
+ * HTML element or component to render.
541
+ */
542
+ as?: T;
861
543
  }
862
- /**
863
- * @public
864
- */
865
- interface FlexOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveFlexProps, ResponsiveFlexItemProps {
866
- gap?: number | number[];
544
+
545
+ /** @public */
546
+ export declare function Icon({ size, ...props }: IconProps): JSX.Element;
547
+
548
+ declare const ICON_SIZE: readonly [0, 1, 2, 3, 4];
549
+
550
+ /** @public */
551
+ export declare function IconButton<T extends ElementType = "button">(
552
+ props: IconButtonProps<T> &
553
+ Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>,
554
+ ): JSX.Element;
555
+
556
+ /** @public */
557
+ export declare interface IconButtonProps<
558
+ T extends React_2.ElementType = "button",
559
+ > extends Pick<
560
+ ButtonProps<T>,
561
+ "as" | "density" | "level" | "loading" | "tone"
562
+ > {
563
+ /**
564
+ * Accessible name for the button.
565
+ * @remarks Because IconButtons have no visible text, this is required.
566
+ */
567
+ "aria-label": string;
568
+ /**
569
+ * Icon to render.
570
+ */
571
+ icon: React_2.ComponentType<SVGProps<SVGSVGElement>>;
867
572
  }
868
- /**
869
- * @public
870
- */
871
- type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>;
872
- /**
873
- * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
874
- *
875
- * @public
876
- */
877
- export declare const Flex: <E extends ElementType = 'div'>(props: FlexProps<E>) => React.JSX.Element;
878
- /**
879
- * @public
880
- */
881
- interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}
882
- /**
883
- * @public
884
- */
885
- type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>;
886
- /**
887
- * The `Grid` component is for building 2-dimensional layers (based on CSS grid).
888
- *
889
- * @public
890
- */
891
- export declare const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element;
892
- /**
893
- * @public
894
- */
895
- type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial';
896
- /**
897
- * @public
898
- */
899
- interface HeadingOwnProps {
900
- accent?: boolean;
901
- align?: TextAlign | TextAlign[];
902
- muted?: boolean;
903
- size?: number | number[];
573
+
574
+ /** @public */
575
+ export declare interface IconProps
576
+ extends
577
+ ComponentProps<"svg">,
578
+ Pick<TypographyProps, "muted">,
579
+ MarginProps,
580
+ ToneProps {
581
+ /**
582
+ * The icon component to render.
583
+ */
584
+ icon: React.ComponentType<SVGProps<SVGSVGElement>>;
904
585
  /**
905
- * Controls how overflowing text is treated.
906
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
907
- * @beta
586
+ * Sets icon size.
908
587
  */
909
- textOverflow?: 'ellipsis';
910
- weight?: ThemeFontWeightKey$1;
588
+ size?: Responsive<IconSize>;
911
589
  }
912
- /**
913
- * @public
914
- */
915
- type HeadingProps<E extends ElementType = 'div'> = Props<HeadingOwnProps, E>;
916
- /**
917
- * Typographic headings.
918
- *
919
- * @public
920
- */
921
- export declare const Heading: <E extends ElementType = 'div'>(props: HeadingProps<E>) => React.JSX.Element;
922
- /**
923
- * @public
924
- */
925
- interface KBDOwnProps {
926
- fontSize?: number | number[];
927
- padding?: number | number[];
928
- radius?: Radius | Radius[];
590
+
591
+ /** @public */
592
+ export declare type IconSize = (typeof ICON_SIZE)[number];
593
+
594
+ /** @beta */
595
+ export declare function Indicator<T extends ElementType = "span">({
596
+ tone,
597
+ ...props
598
+ }: IndicatorProps<T> &
599
+ Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>): JSX.Element;
600
+
601
+ /** @beta */
602
+ export declare interface IndicatorProps<
603
+ T extends React.ElementType = "span",
604
+ > extends ToneProps {
605
+ /**
606
+ * HTML element to render.
607
+ */
608
+ as?: T;
609
+ /**
610
+ * Accessible label.
611
+ */
612
+ label?: string;
929
613
  }
930
- /**
931
- * @public
932
- */
933
- type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>;
934
- /**
935
- * Used to define some text as keyboard input.
936
- *
937
- * @public
938
- */
939
- export declare const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element;
940
- /**
941
- * @public
942
- */
943
- interface LabelOwnProps {
944
- accent?: boolean;
945
- align?: TextAlign | TextAlign[];
946
- muted?: boolean;
947
- size?: number | number[];
614
+
615
+ /** @public */
616
+ export declare function IndicatorStack<T extends ElementType = "div">(
617
+ props: IndicatorStackProps<T> &
618
+ Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>,
619
+ ): JSX.Element;
620
+
621
+ /** @public */
622
+ export declare interface IndicatorStackProps<
623
+ T extends React.ElementType = "div",
624
+ > {
948
625
  /**
949
- * Controls how overflowing text is treated.
950
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
951
- * @beta
626
+ * HTML element to render.
952
627
  */
953
- textOverflow?: 'ellipsis';
954
- weight?: ThemeFontWeightKey$1;
628
+ as?: T;
955
629
  }
956
- /**
957
- * @public
958
- */
959
- type LabelProps<E extends ElementType = 'div'> = Props<LabelOwnProps, E>;
960
- /**
961
- * Typographic labels.
962
- *
963
- * @public
964
- */
965
- export declare const Label: <E extends ElementType = 'div'>(props: LabelProps<E>) => React.JSX.Element;
966
- /**
967
- * @public
968
- */
969
- interface RadioProps {
970
- customValidity?: string;
630
+
631
+ /** @deprecated Use HStack component instead */
632
+ /** @public */
633
+ export declare function Inline<T extends ElementType = "div">(
634
+ props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>,
635
+ ): JSX.Element;
636
+
637
+ /** @deprecated Use HStack component instead */
638
+ /** @public */
639
+ export declare interface InlineProps<
640
+ T extends React.ElementType = "div",
641
+ > extends PaddingProps {
642
+ /**
643
+ * HTML element or component to render.
644
+ */
645
+ as?: T;
646
+ /**
647
+ * Space between children.
648
+ */
649
+ gap?: Responsive<SpaceInherit>;
650
+ }
651
+
652
+ declare const INTERACTIVE_TAG: readonly ["button", "a"];
653
+
654
+ declare type InteractiveAs<T extends React.ElementType> =
655
+ T extends InteractiveTag ? T : T extends string ? never : T;
656
+
657
+ declare type InteractiveTag = (typeof INTERACTIVE_TAG)[number];
658
+
659
+ declare const JUSTIFY_CONTENT: readonly [
660
+ "flex-start",
661
+ "flex-end",
662
+ "center",
663
+ "space-between",
664
+ "space-around",
665
+ "space-evenly",
666
+ ];
667
+
668
+ /** @public */
669
+ export declare type JustifyContent = (typeof JUSTIFY_CONTENT)[number];
670
+
671
+ /** @beta */
672
+ export declare function Label(props: LabelProps): JSX.Element;
673
+
674
+ /** @beta */
675
+ export declare interface LabelProps
676
+ extends React.ComponentProps<"label">, MarginProps {
677
+ /**
678
+ * Renders the label in a muted color.
679
+ */
680
+ disabled?: boolean;
681
+ /**
682
+ * Renders the label in the error color.
683
+ * @remarks Use when the linked input has a validation error.
684
+ */
685
+ error?: boolean;
971
686
  }
972
- /**
973
- * The `Radio` component allows the user to select one option from a set.
974
- *
975
- * @public
976
- */
977
- export declare function Radio(props: Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'type'> & RadioProps): import("react").JSX.Element;
978
- /**
979
- * @public
980
- */
981
- interface SelectProps {
982
- fontSize?: number | number[];
983
- gap?: number | number[];
984
- padding?: number | number[];
985
- radius?: Radius | Radius[];
687
+
688
+ /** @public */
689
+ export declare interface LayoutProps
690
+ extends
691
+ ToneProps,
692
+ WidthProps,
693
+ HeightProps,
694
+ MarginProps,
695
+ BorderProps,
696
+ PaddingProps,
697
+ PositionProps,
698
+ OverflowProps,
699
+ FlexChildProps,
700
+ GridChildProps,
701
+ ZIndexProps,
702
+ ShadowProps {}
703
+
704
+ /** @beta */
705
+ export declare function Link({ underlined, ...props }: LinkProps): JSX.Element;
706
+
707
+ /** @beta */
708
+ export declare interface LinkProps extends React.ComponentProps<"a"> {
709
+ /**
710
+ * Sets the link to `target="_blank"` and `rel="noopener noreferrer"`.
711
+ */
712
+ openInNewTab?: boolean;
986
713
  /**
987
- * @deprecated Use `gap` instead.
714
+ * Underlines the link.
988
715
  */
989
- space?: never;
990
- customValidity?: string;
991
- }
992
- /**
993
- * The `Select` component provides control of options.
994
- *
995
- * @public
996
- */
997
- export declare function Select(props: SelectProps & Omit<React.HTMLProps<HTMLSelectElement>, 'as'>): import("react").JSX.Element;
998
- /**
999
- * @public
1000
- */
1001
- interface SpinnerProps {
1002
- muted?: boolean;
1003
- size?: number | number[];
716
+ underlined?: boolean;
1004
717
  }
1005
- /**
1006
- * Indicate that something is loading for an indeterminate amount of time.
1007
- *
1008
- * @public
1009
- */
1010
- export declare function Spinner(props: SpinnerProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'size'>): import("react").JSX.Element;
1011
- /**
1012
- * @public
1013
- */
1014
- interface StackOwnProps extends BoxOwnProps {
1015
- gap?: number | number[];
718
+
719
+ /** @beta */
720
+ export declare const List: typeof ListRoot;
721
+
722
+ declare const LIST_TAG: readonly ["ol", "ul"];
723
+
724
+ declare function ListButtonItem<T extends ElementType = "button">({
725
+ density,
726
+ ...props
727
+ }: ListButtonItemProps<T> &
728
+ Omit<ComponentPropsWithRef<T>, keyof ListButtonItemProps<T>>): JSX.Element;
729
+
730
+ /** @beta */
731
+ export declare interface ListButtonItemProps<
732
+ T extends React_2.ElementType = "button",
733
+ > extends ListItemProps {
1016
734
  /**
1017
- * @deprecated Use `gap` instead.
735
+ * Element or component to render for the press target.
1018
736
  */
1019
- space?: never;
1020
- }
1021
- /**
1022
- * @public
1023
- */
1024
- type StackProps<E extends ElementType = 'div'> = Props<StackOwnProps, E>;
1025
- /**
1026
- * The `Stack` component is used to place elements on top of each other.
1027
- *
1028
- * @public
1029
- */
1030
- export declare const Stack: <E extends ElementType = 'div'>(props: StackProps<E>) => React.JSX.Element;
1031
- /**
1032
- * @public
1033
- */
1034
- interface SwitchProps {
1035
- indeterminate?: boolean;
1036
- }
1037
- /**
1038
- * The `Switch` component allows the user to toggle a setting on and off.
1039
- *
1040
- * Extends all properties of an `<input type="checkbox" />` element, except type.
1041
- *
1042
- * @public
1043
- */
1044
- export declare function Switch(props: Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'type'> & SwitchProps): import("react").JSX.Element;
1045
- /**
1046
- * @public
1047
- */
1048
- interface TextOwnProps {
1049
- accent?: boolean;
1050
- align?: TextAlign | TextAlign[];
1051
- /** When `true` the text color will be muted. */
1052
- muted?: boolean;
1053
- size?: number | number[];
737
+ as?: InteractiveAs<T>;
1054
738
  /**
1055
- * Controls how overflowing text is treated.
1056
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
1057
- * @beta
739
+ * Marks the row as the current selection.
1058
740
  */
1059
- textOverflow?: 'ellipsis';
1060
- weight?: ThemeFontWeightKey$1;
741
+ selected?: boolean;
1061
742
  }
1062
- /**
1063
- * @public
1064
- */
1065
- type TextProps<E extends ElementType = 'div'> = Props<TextOwnProps, E>;
1066
- /**
1067
- * The `Text` component is an agile, themed typographic element.
1068
- *
1069
- * @public
1070
- */
1071
- export declare const Text: <E extends ElementType = 'div'>(props: TextProps<E>) => React.JSX.Element;
1072
- /**
1073
- * @public
1074
- */
1075
- interface TextAreaProps extends ResponsiveRadiusProps {
743
+
744
+ declare function ListItem({ density, ...props }: ListItemProps): JSX.Element;
745
+
746
+ declare function ListItemImage(props: ComponentProps<"img">): JSX.Element;
747
+
748
+ /** @beta */
749
+ export declare interface ListItemProps extends React_2.ComponentProps<"li"> {
1076
750
  /**
1077
- * @beta
751
+ * Sets horizontal padding, gap, and minimum row height together.
1078
752
  */
1079
- __unstable_disableFocusRing?: boolean;
1080
- border?: boolean;
1081
- customValidity?: string;
1082
- fontSize?: number | number[];
1083
- padding?: number | number[];
1084
- weight?: ThemeFontWeightKey$1;
1085
- }
1086
- /**
1087
- * A multiline text input.
1088
- *
1089
- * @public
1090
- */
1091
- export declare function TextArea(props: TextAreaProps & Omit<React.HTMLProps<HTMLTextAreaElement>, 'as'>): import("react").JSX.Element;
1092
- /**
1093
- * @public
1094
- */
1095
- type TextInputClearButtonProps = ButtonOwnProps & Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>;
1096
- /**
1097
- * @public
1098
- */
1099
- type TextInputType = 'search' | 'date' | 'datetime-local' | 'email' | 'url' | 'month' | 'number' | 'password' | 'tel' | 'time' | 'text' | 'week' | 'color';
1100
- /**
1101
- * @public
1102
- */
1103
- interface TextInputProps {
753
+ density?: Responsive<Density>;
1104
754
  /**
1105
- * @beta
755
+ * Slot at the left edge of the row.
1106
756
  */
1107
- __unstable_disableFocusRing?: boolean;
1108
- border?: boolean;
757
+ start?: React_2.ReactNode;
1109
758
  /**
1110
- * @beta
759
+ * Slot at the right edge of the row.
1111
760
  */
1112
- clearButton?: boolean | TextInputClearButtonProps;
1113
- customValidity?: string;
1114
- fontSize?: number | number[];
1115
- icon?: React.ElementType | React.ReactNode;
1116
- iconRight?: React.ElementType | React.ReactNode;
761
+ end?: React_2.ReactNode;
762
+ }
763
+
764
+ declare function ListItemText<T extends ElementType = "div">(
765
+ props: ListItemTextProps<T> &
766
+ Omit<ComponentPropsWithRef<T>, keyof ListItemTextProps<T>>,
767
+ ): JSX.Element;
768
+
769
+ /** @beta */
770
+ export declare interface ListItemTextProps<
771
+ T extends React_2.ElementType = "div",
772
+ > {
1117
773
  /**
1118
- * @beta
774
+ * HTML element to render.
1119
775
  */
1120
- onClear?: () => void;
1121
- padding?: number | number[];
1122
- prefix?: React.ReactNode;
1123
- radius?: Radius | Radius[];
776
+ as?: T;
1124
777
  /**
1125
- * @deprecated Use `gap` instead.
778
+ * Main label.
1126
779
  */
1127
- space?: never;
1128
- gap?: number | number[];
1129
- suffix?: React.ReactNode;
1130
- type?: TextInputType;
1131
- weight?: ThemeFontWeightKey$1;
1132
- }
1133
- /**
1134
- * Single line text input.
1135
- *
1136
- * @public
1137
- */
1138
- export declare function TextInput(props: TextInputProps & Omit<React.HTMLProps<HTMLInputElement>, 'as' | 'prefix' | 'type'>): import("react").JSX.Element;
1139
- /**
1140
- * @internal
1141
- */
1142
- interface ThemeProps {
1143
- theme: Theme$1;
1144
- }
1145
- /**
1146
- * @internal
1147
- */
1148
- interface ResponsiveFontSizeStyleProps {
1149
- $size: number[];
1150
- }
1151
- /**
1152
- * @internal
1153
- */
1154
- interface FontWeightStyleProps {
1155
- $weight?: ThemeFontWeightKey$1;
1156
- }
1157
- /**
1158
- * @internal
1159
- */
1160
- interface ResponsiveTextAlignStyleProps {
1161
- $align: TextAlign[];
1162
- }
1163
- /**
1164
- * @internal
1165
- */
1166
- interface ResponsiveFontStyleProps extends FontWeightStyleProps, ResponsiveFontSizeStyleProps, ResponsiveTextAlignStyleProps {
1167
- $accent?: boolean;
1168
- $muted?: boolean;
1169
- }
1170
- /**
1171
- * Get responsive CSS for the `code` font style.
1172
- * @internal
1173
- */
1174
- export declare function responsiveCodeFontStyle(props: FontWeightStyleProps & ResponsiveFontSizeStyleProps & ThemeProps): CSSObject[];
1175
- /**
1176
- * Get responsive CSS for the `heading` font style.
1177
- * @internal
1178
- */
1179
- export declare function responsiveHeadingFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
1180
- /**
1181
- * Get responsive CSS for the `label` font style.
1182
- * @internal
1183
- */
1184
- export declare function responsiveLabelFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
1185
- /**
1186
- * Get responsive text align styles.
1187
- * @internal
1188
- */
1189
- export declare function responsiveTextAlignStyle(props: ResponsiveTextAlignStyleProps & ThemeProps): CSSObject[];
1190
- /**
1191
- * Get responsive CSS for the `text` font style.
1192
- * @internal
1193
- */
1194
- export declare function responsiveTextFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
1195
- /**
1196
- * @internal
1197
- */
1198
- export declare function _fillCSSObject(keys: string[], value: string | number | CSSObject): CSSObject;
1199
- /**
1200
- * @public
1201
- */
1202
- export declare function rem(pixelValue: number): string | 0;
1203
- /**
1204
- * @internal
1205
- */
1206
- export declare function _responsive<T>(media: number[], values: T[], callback: (value: T, index: number, array: T[]) => CSSObject): CSSObject[];
1207
- /**
1208
- * @internal
1209
- */
1210
- export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[];
1211
- /**
1212
- * @internal
1213
- */
1214
- export declare function _getResponsiveSpace(theme: Theme$1, props: string[], spaceIndexes?: number[]): CSSObject[] | null;
1215
- /**
1216
- * @public
1217
- */
1218
- interface ThemeColorProviderProps {
1219
- children?: React.ReactNode;
1220
- scheme?: ThemeColorSchemeKey$1;
1221
- tone?: ThemeColorCardToneKey;
1222
- }
1223
- /**
1224
- * @public
1225
- */
1226
- export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element;
1227
- /**
1228
- * @public
1229
- */
1230
- interface ThemeProviderProps {
1231
- children?: React.ReactNode;
1232
- scheme?: ThemeColorSchemeKey$1;
1233
- theme?: RootTheme$1;
1234
- tone?: ThemeColorCardToneKey;
1235
- }
1236
- /**
1237
- * @public
1238
- */
1239
- export declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element;
1240
- /**
1241
- * @public
1242
- */
1243
- interface ThemeContextValue {
1244
- /** @deprecated No longer used */
1245
- version: 0.0;
1246
- scheme: ThemeColorSchemeKey$1;
1247
- theme: RootTheme$1;
1248
- tone: ThemeColorCardToneKey;
1249
- }
1250
- /**
1251
- * @public
1252
- */
1253
- export declare function useRootTheme(): ThemeContextValue;
1254
- /**
1255
- * @public
1256
- */
1257
- export declare function useTheme(): Theme$1;
1258
- /**
1259
- * @public
1260
- */
1261
- export declare function useTheme_v2(): Theme_v2;
1262
- /** @internal */
1263
- export declare function Arrow(props: {
1264
- width: number;
1265
- height: number;
1266
- radius?: number;
1267
- } & Omit<HTMLProps<HTMLDivElement>, 'width' | 'height'>): React.JSX.Element;
1268
- /**
1269
- * @public
1270
- */
1271
- interface BoundaryElementProviderProps {
1272
- children: React.ReactNode;
1273
- element: HTMLElement | null;
1274
- }
1275
- /**
1276
- * @public
1277
- */
1278
- export declare function BoundaryElementProvider(props: BoundaryElementProviderProps): React.JSX.Element;
1279
- /**
1280
- * @public
1281
- */
1282
- interface BoundaryElementContextValue {
1283
- version: 0.0;
1284
- element: HTMLElement | null;
1285
- }
1286
- /**
1287
- * @public
1288
- */
1289
- export declare function useBoundaryElement(): BoundaryElementContextValue;
1290
- /**
1291
- * @internal
1292
- * @deprecated ConditionalWrapper was removed in @sanity/ui v4. Inline the conditional wrapping logic instead.
1293
- */
1294
- export declare function ConditionalWrapper(_props?: never): never;
1295
- /**
1296
- * DO NOT USE IN PRODUCTION.
1297
- * @beta
1298
- */
1299
- interface MediaQueryProps {
1300
- as?: React.ElementType | keyof React.JSX.IntrinsicElements;
1301
- media?: number[];
1302
- }
1303
- /**
1304
- * DO NOT USE IN PRODUCTION.
1305
- * @beta
1306
- */
1307
- export declare function ElementQuery(props: MediaQueryProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'media'>): import("react").JSX.Element;
1308
- /**
1309
- * DO NOT USE IN PRODUCTION
1310
- * @beta
1311
- */
1312
- type ErrorBoundaryProps = PropsWithChildren<{
1313
- onCatch: (params: {
1314
- error: Error;
1315
- info: React.ErrorInfo;
1316
- }) => void;
1317
- }>;
1318
- /**
1319
- * DO NOT USE IN PRODUCTION
1320
- * @beta
1321
- */
1322
- interface ErrorBoundaryState {
1323
- error: Error | null;
780
+ title?: React_2.ReactNode;
781
+ /**
782
+ * Text below the title.
783
+ */
784
+ subtitle?: React_2.ReactNode;
1324
785
  }
1325
- /**
1326
- * DO NOT USE IN PRODUCTION
1327
- * @beta
1328
- */
1329
- export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
1330
- state: ErrorBoundaryState;
1331
- static getDerivedStateFromError(error: Error): ErrorBoundaryState;
1332
- componentDidCatch(error: Error, info: React.ErrorInfo): void;
1333
- render(): React.ReactNode;
786
+
787
+ /** @beta */
788
+ export declare interface ListProps<T extends ListTag = "ul"> extends Pick<
789
+ GapProps,
790
+ "gap"
791
+ > {
792
+ /**
793
+ * HTML element to render.
794
+ */
795
+ as?: T;
796
+ }
797
+
798
+ declare function ListRoot<T extends ListTag = "ul">(
799
+ props: ListProps<T> & Omit<ComponentPropsWithRef<T>, keyof ListProps<T>>,
800
+ ): JSX.Element;
801
+
802
+ declare namespace ListRoot {
803
+ var displayName: string;
804
+ var Item: typeof ListItem;
805
+ var ButtonItem: typeof ListButtonItem;
806
+ var ItemText: typeof ListItemText;
807
+ var ItemImage: typeof ListItemImage;
808
+ }
809
+
810
+ declare type ListTag = (typeof LIST_TAG)[number];
811
+
812
+ /** @public */
813
+ export declare type MarginProps = {
814
+ /** CSS **margin** property */
815
+ margin?: Responsive<SpaceAutoNegative>;
816
+ /** CSS **margin-left** and **margin-right** properties */
817
+ marginX?: Responsive<SpaceAutoNegative>;
818
+ /** CSS **margin-top** and **margin-bottom** properties */
819
+ marginY?: Responsive<SpaceAutoNegative>;
820
+ /** CSS **margin-top** property */
821
+ marginTop?: Responsive<SpaceAutoNegative>;
822
+ /** CSS **margin-right** property */
823
+ marginRight?: Responsive<SpaceAutoNegative>;
824
+ /** CSS **margin-bottom** property */
825
+ marginBottom?: Responsive<SpaceAutoNegative>;
826
+ /** CSS **margin-left** property */
827
+ marginLeft?: Responsive<SpaceAutoNegative>;
828
+ };
829
+
830
+ declare const OVERFLOW: readonly [
831
+ "visible",
832
+ "hidden",
833
+ "auto",
834
+ "scroll",
835
+ "clip",
836
+ ];
837
+
838
+ /** @public */
839
+ export declare type Overflow = (typeof OVERFLOW)[number];
840
+
841
+ declare type OverflowProps = {
842
+ /** CSS **overflow** property */
843
+ overflow?: Responsive<Overflow>;
844
+ /** CSS **overflow-x** property */
845
+ overflowX?: Responsive<Overflow>;
846
+ /** CSS **overflow-y** property */
847
+ overflowY?: Responsive<Overflow>;
848
+ };
849
+
850
+ /** @public */
851
+ export declare interface PaddingProps {
852
+ /** CSS **padding** property */
853
+ padding?: Responsive<Space>;
854
+ /** CSS **padding-left** and **padding-right** properties */
855
+ paddingX?: Responsive<Space>;
856
+ /** CSS **padding-top** and **padding-bottom** properties */
857
+ paddingY?: Responsive<Space>;
858
+ /** CSS **padding-top** property */
859
+ paddingTop?: Responsive<Space>;
860
+ /** CSS **padding-right** property */
861
+ paddingRight?: Responsive<Space>;
862
+ /** CSS **padding-bottom** property */
863
+ paddingBottom?: Responsive<Space>;
864
+ /** CSS **padding-left** property */
865
+ paddingLeft?: Responsive<Space>;
866
+ }
867
+
868
+ declare const PLACEMENT: readonly [
869
+ "top",
870
+ "top-start",
871
+ "top-end",
872
+ "right",
873
+ "right-start",
874
+ "right-end",
875
+ "bottom",
876
+ "bottom-start",
877
+ "bottom-end",
878
+ "left",
879
+ "left-start",
880
+ "left-end",
881
+ ];
882
+
883
+ /** @public */
884
+ export declare type Placement = (typeof PLACEMENT)[number];
885
+
886
+ /** @public */
887
+ export declare type PlacementProps = {
888
+ /** Placement relative to anchor */
889
+ placement?: Placement;
890
+ };
891
+
892
+ /** @beta */
893
+ export declare const Popover: typeof PopoverRoot & {
894
+ forwardsTriggerProps: boolean;
895
+ };
896
+
897
+ /** @beta */
898
+ export declare interface PopoverProps
899
+ extends
900
+ Omit<React.ComponentProps<"div">, "children" | "content">,
901
+ PlacementProps {
902
+ /**
903
+ * Shared anchor identifier.
904
+ * @remarks Set the same value on a Tooltip and a Popover to point both at one trigger.
905
+ */
906
+ anchorName?: React.ReactNode;
907
+ /**
908
+ * The trigger element.
909
+ * @remarks Popover clones it and attaches the `popovertarget` attribute that opens the floating layer.
910
+ */
911
+ children: React.ReactElement<Record<string, unknown>>;
912
+ /**
913
+ * The floating content.
914
+ */
915
+ content?: React.ReactNode;
916
+ /**
917
+ * Renders the content into `document.body` through a React portal instead of inline.
918
+ */
919
+ portal?: boolean;
920
+ }
921
+
922
+ declare function PopoverRoot({
923
+ placement,
924
+ ...props
925
+ }: PopoverProps & {
926
+ triggerProps?: Record<string, unknown>;
927
+ }): JSX.Element;
928
+
929
+ declare const POSITION: readonly [
930
+ "absolute",
931
+ "fixed",
932
+ "relative",
933
+ "static",
934
+ "sticky",
935
+ ];
936
+
937
+ /** @public */
938
+ export declare type Position = (typeof POSITION)[number];
939
+
940
+ declare type PositionProps = {
941
+ /** CSS **position** property */
942
+ position?: Responsive<Position>;
943
+ /** CSS **inset** property */
944
+ inset?: Responsive<SpaceAuto>;
945
+ /** CSS **top** property */
946
+ top?: Responsive<SpaceAuto>;
947
+ /** CSS **right** property */
948
+ right?: Responsive<SpaceAuto>;
949
+ /** CSS **bottom** property */
950
+ bottom?: Responsive<SpaceAuto>;
951
+ /** CSS **left** property */
952
+ left?: Responsive<SpaceAuto>;
953
+ };
954
+
955
+ /** @public */
956
+ export declare function PressArea<T extends ElementType = "button">(
957
+ props: PressAreaProps<T> &
958
+ Omit<ComponentPropsWithRef<T>, keyof PressAreaProps<T>>,
959
+ ): JSX.Element;
960
+
961
+ /** @public */
962
+ export declare interface PressAreaProps<
963
+ T extends React.ElementType = "button",
964
+ > {
965
+ /**
966
+ * Element or component to render.
967
+ */
968
+ as?: InteractiveAs<T>;
1334
969
  }
1335
- /**
1336
- * @public
1337
- */
1338
- interface LayerProviderProps {
1339
- children?: React.ReactNode;
1340
- zOffset?: number | number[];
970
+
971
+ /** @beta */
972
+ export declare function Radio(props: RadioProps): JSX.Element;
973
+
974
+ /** @beta */
975
+ export declare interface RadioProps
976
+ extends React.ComponentProps<"input">, MarginProps {
977
+ /**
978
+ * Applies error styling to the radio mark.
979
+ * @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
980
+ */
981
+ error?: boolean;
982
+ /**
983
+ * Visible label next to the radio.
984
+ */
985
+ label: React.ReactNode;
1341
986
  }
1342
- /**
1343
- * @public
1344
- */
1345
- export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element;
1346
- /** @public */
1347
- interface LayerContextValue {
1348
- version: 0.0;
1349
- isTopLayer: boolean;
1350
- level?: number;
1351
- registerChild: (childLevel?: number) => () => void;
1352
- size: number;
1353
- zIndex: number;
987
+
988
+ declare const RADIUS: readonly [0, 1, 2, 3, 4, 5, 6, "full"];
989
+
990
+ /** @public */
991
+ export declare type Radius = (typeof RADIUS)[number];
992
+
993
+ /** @public */
994
+ export declare type Responsive<T> =
995
+ | T
996
+ | []
997
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
998
+ length: 1;
999
+ })
1000
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
1001
+ length: 2;
1002
+ })
1003
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
1004
+ length: 3;
1005
+ })
1006
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
1007
+ length: 4;
1008
+ })
1009
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
1010
+ length: 5;
1011
+ })
1012
+ | ([T | undefined | null, ...(T | undefined | null)[]] & {
1013
+ length: 6;
1014
+ });
1015
+
1016
+ declare const SHADOW: readonly [0, 1, 2, 3, 4, 5];
1017
+
1018
+ /** @public */
1019
+ export declare type Shadow = (typeof SHADOW)[number];
1020
+
1021
+ declare type ShadowProps = {
1022
+ /** CSS **box-shadow** property */
1023
+ shadow?: Shadow;
1024
+ };
1025
+
1026
+ /** @beta */
1027
+ export declare function SkipToContent(props: SkipToContentProps): JSX.Element;
1028
+
1029
+ /** @beta */
1030
+ export declare interface SkipToContentProps extends React.ComponentProps<"a"> {
1031
+ /**
1032
+ * Same-page fragment to jump to.
1033
+ * @remarks Note: The hash character # is required for proper linking.
1034
+ */
1035
+ href: string;
1036
+ /**
1037
+ * Visible and announced text.
1038
+ */
1039
+ label: string;
1040
+ /**
1041
+ * Not accepted.
1042
+ * @remarks Pass text via `label`.
1043
+ */
1044
+ children?: never;
1354
1045
  }
1355
- /**
1356
- * @public
1357
- */
1358
- export declare function useLayer(): LayerContextValue;
1359
- /**
1360
- * @public
1361
- */
1362
- interface PortalProps {
1363
- children: React.ReactNode;
1046
+
1047
+ declare const SPACE: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
1048
+
1049
+ /** @public */
1050
+ export declare type Space = (typeof SPACE)[number];
1051
+
1052
+ declare const SPACE_AUTO: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "auto"];
1053
+
1054
+ declare const SPACE_AUTO_NEGATIVE: readonly [
1055
+ -9,
1056
+ -8,
1057
+ -7,
1058
+ -6,
1059
+ -5,
1060
+ -4,
1061
+ -3,
1062
+ -2,
1063
+ -1,
1064
+ 0,
1065
+ 1,
1066
+ 2,
1067
+ 3,
1068
+ 4,
1069
+ 5,
1070
+ 6,
1071
+ 7,
1072
+ 8,
1073
+ 9,
1074
+ "auto",
1075
+ ];
1076
+
1077
+ declare const SPACE_INHERIT: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "inherit"];
1078
+
1079
+ /** @public */
1080
+ export declare type SpaceAuto = (typeof SPACE_AUTO)[number];
1081
+
1082
+ /** @public */
1083
+ export declare type SpaceAutoNegative = (typeof SPACE_AUTO_NEGATIVE)[number];
1084
+
1085
+ /** @public */
1086
+ export declare type SpaceInherit = (typeof SPACE_INHERIT)[number];
1087
+
1088
+ /** @public */
1089
+ export declare function Spinner({ size, ...props }: SpinnerProps): JSX.Element;
1090
+
1091
+ /** @public */
1092
+ export declare interface SpinnerProps extends React.ComponentProps<"svg"> {
1364
1093
  /**
1365
- * @beta This API might change. DO NOT USE IN PRODUCTION.
1094
+ * Size of the spinner icon.
1366
1095
  */
1367
- __unstable_name?: string;
1096
+ size?: Responsive<IconSize>;
1368
1097
  }
1369
- /**
1370
- * @public
1371
- */
1372
- export declare function Portal(props: PortalProps): React.ReactPortal | null;
1373
- /**
1374
- * @public
1375
- */
1376
- interface PortalProviderProps {
1098
+
1099
+ /** @beta */
1100
+ export declare function Switch(props: SwitchProps): JSX.Element;
1101
+
1102
+ /** @beta */
1103
+ export declare interface SwitchProps
1104
+ extends React.ComponentProps<"input">, MarginProps {
1377
1105
  /**
1378
- * @deprecated Use `<BoundaryElementProvider element={...} />` instead
1106
+ * Applies error styling to the switch track.
1107
+ * @remarks Use when form validation fails. Pair with a visible error message. The prop is visual only.
1379
1108
  */
1380
- boundaryElement?: HTMLElement | null;
1381
- children: React.ReactNode;
1382
- element?: HTMLElement | null;
1109
+ error?: boolean;
1383
1110
  /**
1384
- * @beta
1111
+ * Visible label next to the switch.
1385
1112
  */
1386
- __unstable_elements?: Record<string, HTMLElement | null | undefined>;
1113
+ label: React.ReactNode;
1387
1114
  }
1388
- /**
1389
- * @public
1390
- */
1391
- export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element;
1392
- /**
1393
- * @public
1394
- */
1395
- interface PortalContextValue {
1396
- version: 0.0;
1397
- boundaryElement: HTMLElement | null;
1398
- element: HTMLElement | null;
1399
- elements?: Record<string, HTMLElement | null | undefined>;
1400
- }
1401
- /**
1402
- * @public
1403
- */
1404
- export declare function usePortal(): PortalContextValue;
1405
- /**
1406
- * @public
1407
- */
1408
- interface SrOnlyProps {
1409
- as?: React.ElementType | keyof React.JSX.IntrinsicElements;
1410
- children?: React.ReactNode;
1115
+
1116
+ /** @public */
1117
+ declare function Text_2<T extends ElementType = "span">({
1118
+ size,
1119
+ ...props
1120
+ }: TextProps<T> &
1121
+ Omit<ComponentPropsWithRef<T>, keyof TextProps<T>>): JSX.Element;
1122
+ export { Text_2 as Text };
1123
+
1124
+ declare const TEXT_ALIGN: readonly ["left", "center", "right", "justify"];
1125
+
1126
+ declare const TEXT_SIZE: readonly [0, 1, 2, 3, 4];
1127
+
1128
+ /** @public */
1129
+ export declare type TextAlign = (typeof TEXT_ALIGN)[number];
1130
+
1131
+ /** @public */
1132
+ export declare interface TextProps<
1133
+ T extends React.ElementType = "span",
1134
+ > extends TypographyProps {
1135
+ /**
1136
+ * HTML element to render.
1137
+ */
1138
+ as?: T;
1139
+ /**
1140
+ * Sets font size.
1141
+ */
1142
+ size?: Responsive<TextSize>;
1411
1143
  }
1412
- /**
1413
- * @public
1414
- */
1415
- export declare function SrOnly(props: SrOnlyProps & Omit<React.HTMLProps<HTMLDivElement>, 'aria-hidden' | 'as'>): import("react").JSX.Element;
1416
- /**
1417
- * @beta
1418
- */
1419
- interface VirtualListChangeOpts {
1420
- fromIndex: number;
1421
- gap: number;
1422
- itemHeight: number;
1423
- scrollHeight: number;
1424
- scrollTop: number;
1425
- toIndex: number;
1144
+
1145
+ /** @public */
1146
+ export declare type TextSize = (typeof TEXT_SIZE)[number];
1147
+
1148
+ declare const TONE: readonly [
1149
+ "neutral",
1150
+ "positive",
1151
+ "suggest",
1152
+ "caution",
1153
+ "critical",
1154
+ ];
1155
+
1156
+ /** @public */
1157
+ export declare type Tone = (typeof TONE)[number];
1158
+
1159
+ declare type ToneProps = {
1160
+ /** CSS **background-color** property */
1161
+ tone?: Tone;
1162
+ };
1163
+
1164
+ /** @beta */
1165
+ export declare const Tooltip: typeof TooltipRoot;
1166
+
1167
+ /** @public */
1168
+ export declare function TooltipGroup<T extends ElementType = "div">(
1169
+ props: TooltipGroupProps<T> &
1170
+ Omit<ComponentPropsWithRef<T>, keyof TooltipGroupProps<T>>,
1171
+ ): JSX.Element;
1172
+
1173
+ /** @public */
1174
+ export declare interface TooltipGroupProps<
1175
+ T extends React.ElementType = "div",
1176
+ > {
1177
+ /**
1178
+ * HTML element to render.
1179
+ */
1180
+ as?: T;
1426
1181
  }
1427
- /**
1428
- * @beta
1429
- */
1430
- interface VirtualListProps<Item = any> {
1431
- as?: React.ElementType | keyof React.JSX.IntrinsicElements;
1432
- gap?: number;
1433
- getItemKey?: (item: Item, itemIndex: number) => string;
1434
- items?: Item[];
1435
- onChange?: (opts: VirtualListChangeOpts) => void;
1436
- renderItem?: (item: Item) => React.ReactNode;
1182
+
1183
+ /** @beta */
1184
+ export declare interface TooltipProps
1185
+ extends
1186
+ Omit<React.ComponentProps<"div">, "children" | "content">,
1187
+ PlacementProps {
1188
+ /**
1189
+ * Shared anchor identifier.
1190
+ */
1191
+ anchorName?: React.ReactNode;
1192
+ /**
1193
+ * The trigger element.
1194
+ */
1195
+ children: React.ReactElement<Record<string, unknown>>;
1196
+ /**
1197
+ * The tooltip label.
1198
+ */
1199
+ content?: React.ReactNode;
1200
+ /**
1201
+ * Renders the label into `document.body` through a React portal instead of inline.
1202
+ */
1203
+ portal?: boolean;
1204
+ }
1205
+
1206
+ declare function TooltipRoot({
1207
+ placement,
1208
+ ...props
1209
+ }: TooltipProps & {
1210
+ triggerProps?: Record<string, unknown>;
1211
+ }): JSX.Element;
1212
+
1213
+ /** @public */
1214
+ export declare interface TypographyProps extends MarginProps, ToneProps {
1215
+ /** CSS **text-align** property */
1216
+ align?: Responsive<TextAlign>;
1217
+ /** CSS **color** property */
1218
+ muted?: boolean;
1219
+ /** CSS **text-box-trim** property */
1220
+ trim?: boolean;
1221
+ /** Number of lines to truncate */
1222
+ truncate?: Responsive<number>;
1223
+ /** CSS **font-weight** property */
1224
+ weight?: FontWeight;
1225
+ }
1226
+
1227
+ /** @public */
1228
+ export declare function useIsClient(): boolean;
1229
+
1230
+ /** @public */
1231
+ export declare function VisuallyHidden<T extends ElementType = "span">(
1232
+ props: VisuallyHiddenProps<T> &
1233
+ Omit<ComponentPropsWithRef<T>, keyof VisuallyHiddenProps<T>>,
1234
+ ): JSX.Element;
1235
+
1236
+ /** @public */
1237
+ export declare interface VisuallyHiddenProps<
1238
+ T extends React.ElementType = "span",
1239
+ > {
1240
+ /**
1241
+ * HTML element to render.
1242
+ */
1243
+ as?: T;
1244
+ /**
1245
+ * If true, the element becomes visible on `:focus-visible`.
1246
+ */
1247
+ visibleOnFocus?: boolean;
1437
1248
  }
1438
- /**
1439
- * @beta
1440
- */
1441
- export declare function VirtualList(props: VirtualListProps & StackOwnProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'onChange'>): React.JSX.Element;
1442
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1443
- export declare const Autocomplete: never;
1444
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1445
- export type AutocompleteInputChangeMsg = never;
1446
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1447
- export type AutocompleteInputFoocusMsg = never;
1448
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1449
- export type AutocompleteMsg = never;
1450
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1451
- export type AutocompleteOpenButtonProps = never;
1452
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1453
- export type AutocompleteProps = never;
1454
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1455
- export type AutocompleteRootBlurMsg = never;
1456
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1457
- export type AutocompleteRootClearMsg = never;
1458
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1459
- export type AutocompleteRootEscapeMsg = never;
1460
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1461
- export type AutocompleteRootOpenMsg = never;
1462
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1463
- export type AutocompleteRootSetActiveValueMsg = never;
1464
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1465
- export type AutocompleteRootSetListFocusedMsg = never;
1466
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1467
- export type AutocompleteState = never;
1468
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1469
- export type AutocompleteValueChangeMsg = never;
1470
- /** @deprecated Moved to `@sanity/ui/autocomplete` */
1471
- export type BaseAutocompleteOption = never;
1472
- /** @deprecated Moved to `@sanity/ui/breadcrumbs` */
1473
- export declare const Breadcrumbs: never;
1474
- /** @deprecated Moved to `@sanity/ui/breadcrumbs` */
1475
- export type BreadcrumbsProps = never;
1476
- /** @deprecated Moved to `@sanity/ui/code` */
1477
- export declare const Code: never;
1478
- /** @deprecated Moved to `@sanity/ui/code` */
1479
- export type CodeOwnProps = never;
1480
- /** @deprecated Moved to `@sanity/ui/code` */
1481
- export type CodeProps = never;
1482
- /** @deprecated Moved to `@sanity/ui/menu` */
1483
- export declare const Menu: never;
1484
- /** @deprecated Moved to `@sanity/ui/menu` */
1485
- export declare const MenuButton: never;
1486
- /** @deprecated Moved to `@sanity/ui/menu` */
1487
- export type MenuButtonProps = never;
1488
- /** @deprecated Moved to `@sanity/ui/menu` */
1489
- export declare const MenuDivider: never;
1490
- /** @deprecated Moved to `@sanity/ui/menu` */
1491
- export type MenuDividerProps = never;
1492
- /** @deprecated Moved to `@sanity/ui/menu` */
1493
- export declare const MenuGroup: never;
1494
- /** @deprecated Moved to `@sanity/ui/menu` */
1495
- export type MenuGroupOwnProps = never;
1496
- /** @deprecated Moved to `@sanity/ui/menu` */
1497
- export type MenuGroupProps = never;
1498
- /** @deprecated Moved to `@sanity/ui/menu` */
1499
- export declare const MenuItem: never;
1500
- /** @deprecated Moved to `@sanity/ui/menu` */
1501
- export type MenuItemOwnProps = never;
1502
- /** @deprecated Moved to `@sanity/ui/menu` */
1503
- export type MenuItemProps = never;
1504
- /** @deprecated Moved to `@sanity/ui/menu` */
1505
- export type MenuProps = never;
1506
- /** @deprecated Moved to `@sanity/ui/popover` */
1507
- export declare const Popover: never;
1508
- /** @deprecated Moved to `@sanity/ui/popover` */
1509
- export type PopoverMargins = never;
1510
- /** @deprecated Moved to `@sanity/ui/popover` */
1511
- export type PopoverProps = never;
1512
- /** @deprecated Moved to `@sanity/ui/popover` */
1513
- export type PopoverUpdateCallback = never;
1514
- /** @deprecated Moved to `@sanity/ui/popover` */
1515
- export type PopoverWidth = never;
1516
- /** @deprecated Moved to `@sanity/ui/toast` */
1517
- export declare const Toast: never;
1518
- /** @deprecated Moved to `@sanity/ui/toast` */
1519
- export type ToastContextValue = never;
1520
- /** @deprecated Moved to `@sanity/ui/toast` */
1521
- export type ToastParams = never;
1522
- /** @deprecated Moved to `@sanity/ui/toast` */
1523
- export type ToastProps = never;
1524
- /** @deprecated Moved to `@sanity/ui/toast` */
1525
- export declare const ToastProvider: never;
1526
- /** @deprecated Moved to `@sanity/ui/toast` */
1527
- export type ToastProviderProps = never;
1528
- /** @deprecated Moved to `@sanity/ui/toast` */
1529
- export declare const useToast: never;
1530
- /** @deprecated Moved to `@sanity/ui/tooltip` */
1531
- export declare const Tooltip: never;
1532
- /** @deprecated Moved to `@sanity/ui/tooltip` */
1533
- export declare const TooltipDelayGroupContext: never;
1534
- /** @deprecated Moved to `@sanity/ui/tooltip` */
1535
- export type TooltipDelayGroupContextValue = never;
1536
- /** @deprecated Moved to `@sanity/ui/tooltip` */
1537
- export declare const TooltipDelayGroupProvider: never;
1538
- /** @deprecated Moved to `@sanity/ui/tooltip` */
1539
- export type TooltipDelayGroupProviderProps = never;
1540
- /** @deprecated Moved to `@sanity/ui/tooltip` */
1541
- export type TooltipProps = never;
1542
- /** @deprecated Moved to `@sanity/ui/tooltip` */
1543
- export declare const useTooltipDelayGroup: never;
1544
- export { type ArrayPropPrimitive, type Assign, type AvatarCounterProps, type AvatarOwnProps, type AvatarPosition, type AvatarProps, type AvatarRootStyleProps, type AvatarSize, type AvatarStackProps, type AvatarStatus, type BadgeMode, type BadgeOwnProps, type BadgeProps, type BadgeTone, type BaseTheme, type BoundaryElementContextValue, type BoundaryElementProviderProps, Box, type BoxDisplay, type BoxHeight, type BoxOverflow, type BoxOwnProps, type BoxProps, type BoxShadow, type BoxSizing, Button, type ButtonMode, type ButtonOwnProps, type ButtonProps, type ButtonTextAlign, type ButtonTone, type ButtonWidth, type CardOwnProps, type CardProps, type CardStyleProps, type CardTone, type CheckboxProps, type ClickOutsideElements, type ClickOutsideEventElements, type ClickOutsideEventListener, type ClickOutsideListener, type CodeSkeletonProps, type ComponentType, type ContainerOwnProps, type ContainerProps, type Delay, type DialogContextValue, type DialogPosition, type DialogProps, type DialogProviderProps, type ElementRectValue, type ElementSize, type ElementType, type EmptyProps, type ErrorBoundaryProps, type ErrorBoundaryState, type FlexAlign, type FlexDirection, type FlexJustify, type FlexOwnProps, type FlexProps, type FlexValue, type FlexWrap, type FontWeightStyleProps, type GridAutoCols, type GridAutoFlow, type GridAutoRows, type GridItemColumn, type GridItemColumnEnd, type GridItemColumnStart, type GridItemRow, type GridItemRowEnd, type GridItemRowStart, type GridOwnProps, type GridProps, type HSL, type HeadingOwnProps, type HeadingProps, type HeadingSkeletonProps, type HotkeysProps, type InlineOwnProps, type InlineProps, type KBDOwnProps, type KBDProps, type LabelOwnProps, type LabelProps, type LabelSkeletonProps, Layer, type LayerContextValue, type LayerProps, type LayerProviderProps, type MediaQueryProps, type PartialThemeColorBuilderOpts, type Placement, type PortalContextValue, type PortalProps, type PortalProviderProps, type Props, type RGB, type RadioProps, type Radius, type ResponsiveAvatarSizeStyleProps, type ResponsiveBorderProps, type ResponsiveBoxProps, type ResponsiveFlexItemProps, type ResponsiveFlexProps, type ResponsiveFontSizeStyleProps, type ResponsiveFontStyleProps, type ResponsiveGridItemProps, type ResponsiveGridProps, type ResponsiveMarginProps, type ResponsivePaddingProps, type ResponsiveRadiusProps, type ResponsiveShadowProps, type ResponsiveTextAlignStyleProps, type ResponsiveWidthProps, type ResponsiveWidthStyleProps, type RootTheme, type SelectProps, type SelectableTone, type SkeletonProps, type SpinnerProps, type SrOnlyProps, type StackOwnProps, type StackProps, type Styles, type SwitchProps, type TabListProps, type TabPanelProps, type TabProps, type TagType, type TextAlign, type TextAreaProps, type TextInputClearButtonProps, type TextInputProps, type TextInputType, type TextOwnProps, type TextProps, type TextSkeletonProps, type Theme, type ThemeAvatar, type ThemeColor, type ThemeColorBase, type ThemeColorBuilderOpts, type ThemeColorButton, type ThemeColorButtonModeKey, type ThemeColorButtonState, type ThemeColorButtonStates, type ThemeColorButtonTones, type ThemeColorCard, type ThemeColorCardState, type ThemeColorGenericState, type ThemeColorInput, type ThemeColorInputState, type ThemeColorInputStates, type ThemeColorMuted, type ThemeColorMutedTone, type ThemeColorName, type ThemeColorProviderProps, type ThemeColorScheme, type ThemeColorSchemeKey, type ThemeColorSchemes, type ThemeColorSelectable, type ThemeColorSelectableState, type ThemeColorSelectableStates, type ThemeColorSolid, type ThemeColorSolidTone, type ThemeColorSpot, type ThemeColorSpotKey, type ThemeColorSyntax, type ThemeColorToneKey, type ThemeContextValue, type ThemeFont, type ThemeFontKey, type ThemeFontSize, type ThemeFontWeight, type ThemeFontWeightKey, type ThemeFonts, type ThemeInput, type ThemeLayer, type ThemeProps, type ThemeProviderProps, type ThemeShadow, type TreeContextValue, type TreeItemProps, type TreeProps, type TreeState, type VirtualListChangeOpts, type VirtualListProps, type _ElementSizeListener, type _ElementSizeObserver, type _ElementSizeSubscriber, type _MediaStore };
1545
- //# sourceMappingURL=index.d.ts.map
1249
+
1250
+ /** @public */
1251
+ export declare function VStack<T extends ElementType = "div">(
1252
+ props: VStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof VStackProps<T>>,
1253
+ ): JSX.Element;
1254
+
1255
+ /** @public */
1256
+ export declare interface VStackProps<
1257
+ T extends React.ElementType = "div",
1258
+ > extends Pick<GapProps, "gap"> {
1259
+ /**
1260
+ * HTML element or component to render.
1261
+ */
1262
+ as?: T;
1263
+ }
1264
+
1265
+ declare type WidthProps = {
1266
+ /** CSS **width** property */
1267
+ width?: Responsive<string>;
1268
+ /** CSS **min-width** property */
1269
+ minWidth?: Responsive<string>;
1270
+ /** CSS **max-width** property */
1271
+ maxWidth?: Responsive<string>;
1272
+ };
1273
+
1274
+ declare type ZIndexProps = {
1275
+ /** CSS z-index property */
1276
+ zIndex?: Responsive<number>;
1277
+ };
1278
+
1279
+ export {};