@sanity/ui 3.0.0-static.1 → 3.0.0-static.2

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 (660) hide show
  1. package/LICENSE +1 -1
  2. package/bin/ui.js +0 -1
  3. package/dist/_chunks-cjs/_visual-editing.js +3059 -0
  4. package/dist/_chunks-cjs/_visual-editing.js.map +1 -0
  5. package/dist/_chunks-cjs/buildCommand.js +14 -3524
  6. package/dist/_chunks-cjs/buildCommand.js.map +1 -1
  7. package/dist/_chunks-cjs/refractor.js +27 -0
  8. package/dist/_chunks-cjs/refractor.js.map +1 -0
  9. package/dist/_chunks-cjs/v3_v2.js +251 -0
  10. package/dist/_chunks-cjs/v3_v2.js.map +1 -0
  11. package/dist/_chunks-es/_visual-editing.mjs +3066 -0
  12. package/dist/_chunks-es/_visual-editing.mjs.map +1 -0
  13. package/dist/_chunks-es/refractor.mjs +26 -0
  14. package/dist/_chunks-es/refractor.mjs.map +1 -0
  15. package/dist/_chunks-es/v3_v2.mjs +252 -0
  16. package/dist/_chunks-es/v3_v2.mjs.map +1 -0
  17. package/dist/_visual-editing.d.mts +806 -0
  18. package/dist/_visual-editing.d.ts +806 -0
  19. package/dist/_visual-editing.js +31 -0
  20. package/dist/_visual-editing.js.map +1 -0
  21. package/dist/_visual-editing.mjs +31 -0
  22. package/dist/_visual-editing.mjs.map +1 -0
  23. package/dist/cli.js +337 -5
  24. package/dist/cli.js.map +1 -1
  25. package/dist/css.d.mts +1446 -373
  26. package/dist/css.d.ts +1446 -373
  27. package/dist/css.js +2665 -1747
  28. package/dist/css.js.map +1 -1
  29. package/dist/css.mjs +2651 -1732
  30. package/dist/css.mjs.map +1 -1
  31. package/dist/index.d.mts +418 -520
  32. package/dist/index.d.ts +418 -520
  33. package/dist/index.js +737 -4617
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +633 -4522
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/sanity-palette.css +9 -0
  38. package/dist/sanity-theme.css +1 -25
  39. package/dist/system.css +596 -404
  40. package/dist/theme.d.mts +431 -110
  41. package/dist/theme.d.ts +431 -110
  42. package/dist/theme.js +1216 -2430
  43. package/dist/theme.js.map +1 -1
  44. package/dist/theme.mjs +1238 -2450
  45. package/dist/theme.mjs.map +1 -1
  46. package/exports/_visual-editing.ts +31 -0
  47. package/package.json +92 -81
  48. package/src/{css/cli → cli}/buildCommand.ts +21 -9
  49. package/src/{css/cli → cli}/index.ts +1 -1
  50. package/src/core/StyleTags.tsx +24 -0
  51. package/src/core/_compat/index.ts +8 -1
  52. package/src/core/_compat/styles/_responsive.ts +19 -0
  53. package/src/core/_compat/styles/index.ts +1 -5
  54. package/src/core/{theme → _compat/theme}/theme.test.tsx +2 -2
  55. package/src/core/{theme → _compat/theme}/themeColorProvider.tsx +4 -2
  56. package/src/core/{theme → _compat/theme}/themeContext.ts +1 -1
  57. package/src/core/{theme → _compat/theme}/themeProvider.tsx +10 -11
  58. package/src/core/{theme → _compat/theme}/useRootTheme.ts +1 -0
  59. package/src/core/{theme → _compat/theme}/useTheme.ts +2 -2
  60. package/src/core/_compat/types.ts +11 -11
  61. package/src/core/components/autocomplete/__mocks__/apiStore.ts +1 -1
  62. package/src/core/components/autocomplete/__workshop__/async.tsx +1 -0
  63. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +4 -2
  64. package/src/core/components/autocomplete/__workshop__/custom.tsx +3 -2
  65. package/src/core/components/autocomplete/__workshop__/example.tsx +3 -2
  66. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +1 -0
  67. package/src/core/components/autocomplete/autocomplete.tsx +54 -61
  68. package/src/core/components/autocomplete/autocompleteOption.tsx +5 -4
  69. package/src/core/components/autocomplete/types.ts +2 -2
  70. package/src/core/components/breadcrumbs/__workshop__/example.tsx +7 -0
  71. package/src/core/components/breadcrumbs/breadcrumbs.tsx +32 -16
  72. package/src/core/components/dialog/__workshop__/activate.tsx +2 -1
  73. package/src/core/components/dialog/__workshop__/nested.tsx +3 -3
  74. package/src/core/components/dialog/__workshop__/onScroll.tsx +2 -2
  75. package/src/core/components/dialog/__workshop__/panes.tsx +1 -0
  76. package/src/core/components/dialog/__workshop__/position.tsx +2 -1
  77. package/src/core/components/dialog/__workshop__/props.tsx +2 -1
  78. package/src/core/components/dialog/__workshop__/wrapped.tsx +1 -3
  79. package/src/core/components/dialog/dialog.tsx +50 -27
  80. package/src/core/components/dialog/dialogProvider.tsx +4 -3
  81. package/src/core/components/dialog/useDialog.ts +1 -0
  82. package/src/core/components/hotkeys/hotkeys.tsx +20 -14
  83. package/src/core/components/menu/__workshop__/asComponent.tsx +2 -1
  84. package/src/core/components/menu/__workshop__/avatarMenu.tsx +1 -0
  85. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +1 -0
  86. package/src/core/components/menu/__workshop__/customSelectedState.tsx +1 -0
  87. package/src/core/components/menu/__workshop__/menuButton.tsx +2 -1
  88. package/src/core/components/menu/__workshop__/shouldFocus.tsx +1 -0
  89. package/src/core/components/menu/__workshop__/tones.tsx +7 -7
  90. package/src/core/components/menu/menu.test.tsx +4 -5
  91. package/src/core/components/menu/menu.tsx +49 -22
  92. package/src/core/components/menu/menuButton.tsx +47 -61
  93. package/src/core/components/menu/menuContext.ts +6 -4
  94. package/src/core/components/menu/menuDivider.tsx +9 -3
  95. package/src/core/components/menu/menuGroup.tsx +50 -26
  96. package/src/core/components/menu/menuItem.tsx +31 -38
  97. package/src/core/components/menu/useMenu.ts +1 -0
  98. package/src/core/components/menu/useMenuController.ts +18 -7
  99. package/src/core/components/skeleton/__workshop__/delay.tsx +2 -1
  100. package/src/core/components/skeleton/__workshop__/skeleton.tsx +2 -1
  101. package/src/core/components/skeleton/skeleton.tsx +4 -3
  102. package/src/core/components/skeleton/textSkeleton.tsx +11 -25
  103. package/src/core/components/tab/tab.tsx +21 -14
  104. package/src/core/components/tab/tabList.tsx +24 -11
  105. package/src/core/components/tab/tabPanel.tsx +5 -4
  106. package/src/core/components/toast/__workshop__/hook.tsx +1 -1
  107. package/src/core/components/toast/__workshop__/toast.tsx +2 -1
  108. package/src/core/components/toast/toast.test.tsx +0 -1
  109. package/src/core/components/toast/toast.tsx +130 -40
  110. package/src/core/components/toast/toastLayer.tsx +38 -0
  111. package/src/core/components/toast/toastProvider.tsx +60 -140
  112. package/src/core/components/toast/toastState.ts +6 -0
  113. package/src/core/components/toast/types.ts +10 -2
  114. package/src/core/components/toast/useToast.ts +1 -0
  115. package/src/core/components/tree/__workshop__/basic.tsx +1 -0
  116. package/src/core/components/tree/__workshop__/tabFromElement.tsx +2 -1
  117. package/src/core/components/tree/tree.tsx +16 -13
  118. package/src/core/components/tree/treeGroup.tsx +5 -7
  119. package/src/core/components/tree/treeItem.tsx +41 -34
  120. package/src/core/components/tree/useTree.ts +1 -0
  121. package/src/core/constants.ts +45 -23
  122. package/src/core/helpers/focus.ts +3 -3
  123. package/src/core/helpers/index.ts +1 -0
  124. package/src/core/helpers/props.ts +10 -0
  125. package/src/core/hooks/useArrayProp.ts +19 -15
  126. package/src/core/hooks/useClickOutside.test.tsx +3 -4
  127. package/src/core/hooks/useClickOutside.ts +1 -0
  128. package/src/core/hooks/useClickOutsideEvent.test.tsx +0 -1
  129. package/src/core/hooks/useClickOutsideEvent.ts +2 -1
  130. package/src/core/hooks/useDelayed.test.ts +2 -1
  131. package/src/core/hooks/useDelayedState.ts +2 -3
  132. package/src/core/hooks/useElementRect/__workshop__/example.tsx +3 -2
  133. package/src/core/hooks/useElementSize.ts +2 -1
  134. package/src/core/hooks/useForwardedRef.ts +2 -2
  135. package/src/core/hooks/useGlobalKeyDown.ts +9 -4
  136. package/src/core/hooks/useMatchMedia.ts +1 -1
  137. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +3 -2
  138. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +2 -1
  139. package/src/core/hooks/usePrefersDark.hydration.test.tsx +0 -1
  140. package/src/core/hooks/usePrefersDark.test.tsx +2 -1
  141. package/src/core/hooks/usePrefersDark.ts +1 -1
  142. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -1
  143. package/src/core/hooks/usePrefersReducedMotion.test.tsx +2 -1
  144. package/src/core/hooks/usePrefersReducedMotion.ts +1 -1
  145. package/src/core/index.ts +2 -3
  146. package/src/core/lib/createGlobalScopedContext.ts +2 -1
  147. package/src/core/lib/globalScope.ts +0 -1
  148. package/src/core/primitives/_selectable/selectable.tsx +9 -5
  149. package/src/core/primitives/avatar/__workshop__/asButton.tsx +2 -1
  150. package/src/core/primitives/avatar/__workshop__/stack.tsx +2 -1
  151. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +4 -3
  152. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +26 -23
  153. package/src/core/primitives/avatar/avatar.tsx +42 -80
  154. package/src/core/primitives/avatar/avatarCounter.tsx +26 -57
  155. package/src/core/primitives/avatar/avatarStack.tsx +37 -55
  156. package/src/core/primitives/avatar/types.ts +1 -0
  157. package/src/core/primitives/badge/__workshop__/props.tsx +2 -1
  158. package/src/core/primitives/badge/__workshop__/tones.tsx +2 -1
  159. package/src/core/primitives/badge/badge.test.tsx +1 -0
  160. package/src/core/primitives/badge/badge.tsx +10 -5
  161. package/src/core/primitives/box/__workshop__/props.tsx +2 -1
  162. package/src/core/primitives/box/box.tsx +45 -12
  163. package/src/core/primitives/button/__workshop__/custom.tsx +7 -4
  164. package/src/core/primitives/button/__workshop__/disabled.tsx +1 -0
  165. package/src/core/primitives/button/__workshop__/props.tsx +7 -2
  166. package/src/core/primitives/button/__workshop__/stacked.tsx +2 -1
  167. package/src/core/primitives/button/button.test.tsx +1 -0
  168. package/src/core/primitives/button/button.tsx +137 -113
  169. package/src/core/primitives/card/__workshop__/allTones.tsx +21 -21
  170. package/src/core/primitives/card/__workshop__/asButton.tsx +44 -25
  171. package/src/core/primitives/card/__workshop__/asComponent.tsx +2 -2
  172. package/src/core/primitives/card/__workshop__/checkered.tsx +17 -7
  173. package/src/core/primitives/card/__workshop__/interactive.tsx +10 -3
  174. package/src/core/primitives/card/__workshop__/listNavigation.tsx +6 -3
  175. package/src/core/primitives/card/__workshop__/props.tsx +13 -7
  176. package/src/core/primitives/card/__workshop__/selected.tsx +11 -9
  177. package/src/core/primitives/card/card.tsx +47 -55
  178. package/src/core/primitives/card/types.ts +1 -0
  179. package/src/core/primitives/checkbox/__workshop__/tones.tsx +6 -0
  180. package/src/core/primitives/checkbox/checkbox.tsx +9 -5
  181. package/src/core/primitives/code/__workshop__/props.tsx +3 -2
  182. package/src/core/primitives/code/code.tsx +11 -11
  183. package/src/core/primitives/code/refractor.tsx +20 -0
  184. package/src/core/primitives/container/__workshop__/example.tsx +3 -2
  185. package/src/core/primitives/container/container.tsx +7 -4
  186. package/src/core/primitives/flex/__workshop__/example.tsx +5 -4
  187. package/src/core/primitives/flex/__workshop__/gap.tsx +6 -6
  188. package/src/core/primitives/flex/flex.tsx +9 -12
  189. package/src/core/primitives/grid/__workshop__/responsive.tsx +12 -12
  190. package/src/core/primitives/grid/grid.tsx +7 -11
  191. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +13 -25
  192. package/src/core/primitives/heading/__workshop__/plain.tsx +3 -2
  193. package/src/core/primitives/heading/heading.tsx +19 -39
  194. package/src/core/primitives/inline/__workshop__/plain.tsx +5 -4
  195. package/src/core/primitives/inline/inline.tsx +10 -7
  196. package/src/core/primitives/kbd/kbd.tsx +8 -6
  197. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +13 -7
  198. package/src/core/primitives/label/__workshop__/plain.tsx +22 -8
  199. package/src/core/primitives/label/label.tsx +26 -50
  200. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +3 -2
  201. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +5 -4
  202. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +1 -1
  203. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +3 -2
  204. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +5 -2
  205. package/src/core/primitives/popover/__workshop__/TestStory.tsx +5 -4
  206. package/src/core/primitives/popover/floating-ui/size.ts +2 -1
  207. package/src/core/primitives/popover/helpers.ts +4 -3
  208. package/src/core/primitives/popover/popover.tsx +51 -44
  209. package/src/core/primitives/popover/popoverCard.tsx +22 -27
  210. package/src/core/primitives/radio/__workshop__/plain.tsx +2 -2
  211. package/src/core/primitives/radio/radio.tsx +10 -11
  212. package/src/core/primitives/select/__workshop__/plain.tsx +5 -2
  213. package/src/core/primitives/select/__workshop__/readOnly.tsx +1 -1
  214. package/src/core/primitives/select/select.tsx +40 -41
  215. package/src/core/primitives/spinner/__workshop__/Props.tsx +2 -1
  216. package/src/core/primitives/spinner/spinner.tsx +5 -3
  217. package/src/core/primitives/stack/__workshop__/plain.tsx +2 -1
  218. package/src/core/primitives/stack/stack.tsx +10 -11
  219. package/src/core/primitives/switch/switch.tsx +22 -13
  220. package/src/core/primitives/text/__workshop__/colored.tsx +8 -14
  221. package/src/core/primitives/text/__workshop__/example.tsx +8 -7
  222. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +11 -21
  223. package/src/core/primitives/text/text.tsx +20 -38
  224. package/src/core/primitives/textArea/__workshop__/plain.tsx +4 -3
  225. package/src/core/primitives/textArea/textArea.tsx +28 -75
  226. package/src/core/primitives/textInput/__workshop__/index.ts +0 -5
  227. package/src/core/primitives/textInput/__workshop__/plain.tsx +8 -3
  228. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +6 -2
  229. package/src/core/primitives/textInput/__workshop__/tones.tsx +38 -0
  230. package/src/core/primitives/textInput/__workshop__/typed.tsx +2 -1
  231. package/src/core/primitives/textInput/textInput.tsx +133 -220
  232. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +2 -1
  233. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +2 -1
  234. package/src/core/primitives/tooltip/__workshop__/props.tsx +8 -3
  235. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +2 -1
  236. package/src/core/primitives/tooltip/tooltip.test.tsx +4 -2
  237. package/src/core/primitives/tooltip/tooltip.tsx +64 -61
  238. package/src/core/primitives/tooltip/tooltipCard.tsx +31 -26
  239. package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +1 -1
  240. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +4 -6
  241. package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +0 -1
  242. package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +1 -0
  243. package/src/core/primitives/types.ts +5 -5
  244. package/src/core/types/box.ts +0 -3
  245. package/src/core/types/button.ts +2 -0
  246. package/src/core/types/flex.ts +0 -4
  247. package/src/core/types/grid.ts +5 -7
  248. package/src/core/types/gridItem.ts +4 -9
  249. package/src/core/types/index.ts +1 -0
  250. package/src/core/types/props.ts +18 -0
  251. package/src/core/types/selectable.ts +1 -0
  252. package/src/core/utils/arrow/arrow.tsx +34 -97
  253. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +0 -1
  254. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +4 -3
  255. package/src/core/utils/boundaryElement/index.ts +1 -1
  256. package/src/core/utils/boundaryElement/useBoundaryElement.ts +1 -0
  257. package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +5 -3
  258. package/src/core/utils/elementQuery/elementQuery.tsx +21 -21
  259. package/src/core/utils/errorBoundary.tsx +5 -4
  260. package/src/core/utils/getElementRef.ts +26 -0
  261. package/src/core/utils/layer/__workshop__/multipleRoots.tsx +1 -0
  262. package/src/core/utils/layer/__workshop__/nested.tsx +1 -0
  263. package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +1 -0
  264. package/src/core/utils/layer/index.ts +1 -1
  265. package/src/core/utils/layer/layer.test.tsx +0 -1
  266. package/src/core/utils/layer/layer.tsx +15 -11
  267. package/src/core/utils/layer/layerProvider.tsx +6 -5
  268. package/src/core/utils/layer/useLayer.ts +1 -0
  269. package/src/core/utils/portal/portal.test.tsx +0 -1
  270. package/src/core/utils/portal/portal.ts +4 -2
  271. package/src/core/utils/portal/portalProvider.tsx +4 -3
  272. package/src/core/utils/portal/usePortal.ts +1 -0
  273. package/src/core/utils/spanWithTextOverflow.tsx +10 -0
  274. package/src/core/utils/srOnly/srOnly.tsx +17 -18
  275. package/src/core/utils/virtualList/virtualList.tsx +55 -37
  276. package/src/css/_resp.ts +4 -1
  277. package/src/css/compile/compilePalette.ts +60 -0
  278. package/src/css/compile/compileRule.ts +45 -13
  279. package/src/css/compile/compileRules.test.ts +35 -0
  280. package/src/css/compile/compileRules.ts +14 -30
  281. package/src/css/compile/compileTheme.ts +8 -505
  282. package/src/css/compile/compileTheme_v3.ts +410 -0
  283. package/src/css/compile/types.ts +6 -0
  284. package/src/css/components/breadcrumbs/breadcrumbs.ts +1 -1
  285. package/src/css/components/dialog/{classes.ts → dialog.ts} +7 -7
  286. package/src/css/components/dialog/index.ts +1 -1
  287. package/src/css/components/dialog/rules.ts +2 -1
  288. package/src/css/components/menu/menu.ts +5 -1
  289. package/src/css/components/menu/rules.ts +6 -1
  290. package/src/css/components/skeleton/rules.ts +28 -22
  291. package/src/css/components/skeleton/skeleton.ts +5 -5
  292. package/src/css/components/skeleton/types.ts +2 -0
  293. package/src/css/components/toast/index.ts +1 -0
  294. package/src/css/components/toast/rules.ts +17 -68
  295. package/src/css/components/toast/toast.ts +21 -0
  296. package/src/css/components/tree/rules.ts +3 -2
  297. package/src/css/components/tree/tree.ts +1 -1
  298. package/src/css/composeClassNames.ts +12 -2
  299. package/src/css/index.ts +12 -23
  300. package/src/css/primitives/_arrow/_arrow.ts +14 -0
  301. package/src/css/primitives/_arrow/index.ts +1 -0
  302. package/src/css/primitives/_arrow/rules.ts +71 -0
  303. package/src/css/primitives/_input/index.ts +2 -0
  304. package/src/css/primitives/_input/input.ts +25 -0
  305. package/src/css/primitives/_input/rules.ts +163 -0
  306. package/src/css/primitives/_input/types.ts +12 -0
  307. package/src/css/primitives/{selectable → _selectable}/__style.ts +1 -1
  308. package/src/css/primitives/_selectable/_contants.ts +11 -0
  309. package/src/css/primitives/_selectable/rules.ts +129 -0
  310. package/src/css/primitives/_selectable/selectable.ts +9 -0
  311. package/src/css/primitives/_selectable/types.ts +8 -0
  312. package/src/css/primitives/avatar/avatar.ts +10 -15
  313. package/src/css/primitives/avatar/rules.ts +85 -99
  314. package/src/css/primitives/avatar/types.ts +1 -2
  315. package/src/css/primitives/badge/badge.ts +2 -2
  316. package/src/css/primitives/badge/rules.ts +13 -16
  317. package/src/css/primitives/badge/types.ts +2 -2
  318. package/src/css/primitives/box/box.ts +24 -14
  319. package/src/css/primitives/box/rules.ts +5 -2
  320. package/src/css/primitives/box/types.ts +24 -19
  321. package/src/css/primitives/button/_constants.ts +17 -0
  322. package/src/css/primitives/button/button.ts +27 -12
  323. package/src/css/primitives/button/rules.ts +275 -40
  324. package/src/css/primitives/card/_constants.ts +13 -0
  325. package/src/css/primitives/card/card.ts +8 -13
  326. package/src/css/primitives/card/index.ts +1 -0
  327. package/src/css/primitives/card/rules.ts +353 -123
  328. package/src/css/primitives/card/types.ts +11 -0
  329. package/src/css/primitives/checkbox/checkbox.ts +2 -2
  330. package/src/css/primitives/checkbox/rules.ts +31 -15
  331. package/src/css/primitives/code/code.ts +2 -2
  332. package/src/css/primitives/code/rules.ts +27 -2
  333. package/src/css/primitives/code/types.ts +1 -1
  334. package/src/css/primitives/container/container.ts +2 -2
  335. package/src/css/primitives/container/types.ts +1 -0
  336. package/src/css/primitives/heading/heading.ts +3 -2
  337. package/src/css/primitives/heading/rules.ts +77 -6
  338. package/src/css/primitives/heading/types.ts +2 -2
  339. package/src/css/primitives/kbd/kbd.ts +2 -2
  340. package/src/css/primitives/kbd/rules.ts +5 -5
  341. package/src/css/primitives/kbd/types.ts +3 -1
  342. package/src/css/primitives/label/label.ts +2 -2
  343. package/src/css/primitives/label/rules.ts +54 -2
  344. package/src/css/primitives/label/types.ts +1 -1
  345. package/src/css/primitives/popover/popover.ts +1 -1
  346. package/src/css/primitives/radio/radio.ts +1 -1
  347. package/src/css/primitives/radio/rules.ts +117 -1
  348. package/src/css/primitives/select/index.ts +1 -0
  349. package/src/css/primitives/select/rules.ts +18 -1
  350. package/src/css/primitives/select/select.ts +8 -2
  351. package/src/css/primitives/select/types.ts +5 -0
  352. package/src/css/primitives/spinner/spinner.ts +2 -2
  353. package/src/css/primitives/switch/rules.ts +264 -56
  354. package/src/css/primitives/switch/switch.ts +17 -1
  355. package/src/css/primitives/text/rules.ts +93 -4
  356. package/src/css/primitives/text/text.ts +3 -2
  357. package/src/css/primitives/text/types.ts +2 -2
  358. package/src/css/primitives/textArea/index.ts +1 -0
  359. package/src/css/primitives/textArea/rules.ts +3 -1
  360. package/src/css/primitives/textArea/textArea.ts +4 -2
  361. package/src/css/primitives/textArea/types.ts +5 -0
  362. package/src/css/primitives/textInput/rules.ts +33 -130
  363. package/src/css/primitives/textInput/textInput.ts +4 -11
  364. package/src/css/primitives/textInput/types.ts +8 -5
  365. package/src/css/primitives/token/rules.ts +37 -37
  366. package/src/css/primitives/tooltip/rules.ts +2 -0
  367. package/src/css/primitives/tooltip/tooltip.ts +2 -2
  368. package/src/css/rules.ts +16 -2
  369. package/src/css/styles/border/border.ts +1 -1
  370. package/src/css/styles/display/display.ts +7 -0
  371. package/src/css/styles/display/index.ts +2 -0
  372. package/src/css/styles/display/rules.ts +2 -2
  373. package/src/css/styles/display/types.ts +17 -0
  374. package/src/css/styles/flex/flex.ts +1 -1
  375. package/src/css/styles/flexItem/flexItem.ts +1 -1
  376. package/src/css/styles/flexItem/rules.ts +1 -0
  377. package/src/css/styles/font/font.ts +1 -1
  378. package/src/css/styles/font/rules.ts +4 -4
  379. package/src/css/styles/gap/gap.ts +1 -1
  380. package/src/css/styles/gap/rules.ts +1 -0
  381. package/src/css/styles/gap/types.ts +1 -0
  382. package/src/css/styles/grid/grid.ts +1 -1
  383. package/src/css/styles/gridItem/gridItem.ts +1 -1
  384. package/src/css/styles/index.ts +19 -0
  385. package/src/css/styles/inset/index.ts +2 -0
  386. package/src/css/styles/inset/inset.ts +13 -0
  387. package/src/css/styles/inset/rules.ts +16 -0
  388. package/src/css/styles/inset/types.ts +13 -0
  389. package/src/css/styles/margin/margin.ts +1 -1
  390. package/src/css/styles/margin/rules.ts +1 -0
  391. package/src/css/styles/maxWidth/rules.ts +8 -31
  392. package/src/css/styles/maxWidth/types.ts +2 -1
  393. package/src/css/styles/overflow/overflow.ts +1 -1
  394. package/src/css/styles/padding/padding.ts +1 -1
  395. package/src/css/styles/padding/rules.ts +1 -0
  396. package/src/css/styles/padding/types.ts +9 -7
  397. package/src/css/styles/pointerEvents/pointerEvents.ts +1 -1
  398. package/src/css/styles/position/position.ts +2 -2
  399. package/src/css/styles/position/rules.ts +0 -7
  400. package/src/css/styles/position/types.ts +0 -4
  401. package/src/css/styles/radius/radius.ts +1 -1
  402. package/src/css/styles/radius/rules.ts +1 -1
  403. package/src/css/styles/radius/types.ts +1 -0
  404. package/src/css/styles/shadow/index.ts +2 -0
  405. package/src/css/styles/shadow/rules.ts +5 -5
  406. package/src/css/styles/shadow/shadow.ts +7 -0
  407. package/src/css/styles/shadow/types.ts +8 -0
  408. package/src/css/styles/textOverflow/index.ts +2 -0
  409. package/src/css/styles/textOverflow/rules.ts +17 -0
  410. package/src/css/styles/textOverflow/textOverflow.ts +6 -0
  411. package/src/css/styles/textOverflow/types.ts +8 -0
  412. package/src/css/styles/width/index.ts +1 -1
  413. package/src/css/styles/width/types.ts +3 -2
  414. package/src/css/types.ts +457 -289
  415. package/src/css/util.ts +27 -0
  416. package/src/css/utils/srOnly/index.ts +1 -0
  417. package/src/css/utils/srOnly/rules.ts +11 -0
  418. package/src/css/utils/srOnly/srOnly.ts +5 -0
  419. package/src/css/varNames.ts +352 -260
  420. package/src/css/vars.ts +330 -286
  421. package/src/theme/{system/_constants.ts → _constants.ts} +5 -4
  422. package/src/theme/{system/_types.ts → _types.ts} +1 -1
  423. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +1 -1
  424. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +1 -1
  425. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +1 -6
  426. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +2 -2
  427. package/src/theme/build/_deprecated/color/card/createCardStates.ts +2 -2
  428. package/src/theme/build/_deprecated/color/factory.ts +8 -9
  429. package/src/theme/build/_deprecated/color/input/createInputModes.ts +1 -1
  430. package/src/theme/build/_deprecated/color/muted/createMuted.ts +2 -2
  431. package/src/theme/build/_deprecated/color/spot/createSpot.ts +1 -1
  432. package/src/theme/build/buildColorTheme.ts +62 -52
  433. package/src/theme/build/buildTheme.ts +8 -32
  434. package/src/theme/build/colorToken/colorToken.ts +1 -1
  435. package/src/theme/build/lib/color-fns/rgba.ts +4 -0
  436. package/src/theme/build/merge.ts +0 -2
  437. package/src/theme/build/mixThemeColor.ts +1 -1
  438. package/src/theme/build/renderColorTheme.ts +34 -37
  439. package/src/theme/build/renderColorValue.ts +4 -3
  440. package/src/theme/build/resolveColorTokens.ts +57 -120
  441. package/src/theme/config/helpers.ts +2 -2
  442. package/src/theme/config/system.ts +3 -2
  443. package/src/theme/config/tokens/color/types.ts +5 -18
  444. package/src/theme/config/tokens/parseTokenKey.ts +1 -1
  445. package/src/theme/config/tokens/parseTokenValue.ts +1 -1
  446. package/src/theme/config/tokens/types.ts +3 -2
  447. package/src/theme/config/types.ts +4 -4
  448. package/src/theme/defaults/colorTokens.ts +6 -4
  449. package/src/theme/defaults/config.ts +2 -2
  450. package/src/theme/defaults/fonts.ts +18 -17
  451. package/src/theme/getScopedTheme.ts +10 -4
  452. package/src/theme/index.ts +7 -1
  453. package/src/theme/palette/constants.ts +15 -0
  454. package/src/theme/palette/index.ts +2 -0
  455. package/src/theme/palette/types.ts +16 -0
  456. package/src/theme/types.ts +32 -0
  457. package/src/theme/{system/v0 → v0}/color/_generic.ts +1 -1
  458. package/src/theme/v0/color/_system.ts +17 -0
  459. package/src/theme/{system/v0 → v0}/color/color.ts +3 -2
  460. package/src/theme/{system/v0 → v0}/color/input.ts +1 -1
  461. package/src/theme/{system/v0 → v0}/color/spot.ts +1 -1
  462. package/src/theme/{system → v0}/css.ts +1 -2
  463. package/src/theme/{system → v0}/font.ts +1 -0
  464. package/src/theme/{system → v0}/index.ts +0 -4
  465. package/src/theme/v0/theme.ts +72 -0
  466. package/src/theme/{system → v2}/avatar.ts +1 -1
  467. package/src/theme/{system → v2}/color/_constants.ts +6 -2
  468. package/src/theme/{system → v2}/color/_helpers.ts +1 -0
  469. package/src/theme/v2/color/badge.ts +16 -0
  470. package/src/theme/{system → v2}/color/color.ts +1 -1
  471. package/src/theme/{system/v0 → v2}/index.ts +2 -1
  472. package/src/theme/{system → v2}/input.ts +1 -1
  473. package/src/theme/v2/theme.ts +49 -0
  474. package/src/theme/v3/buildTheme_v3.test.ts +40 -0
  475. package/src/theme/v3/buildTheme_v3.ts +30 -0
  476. package/src/theme/v3/color/buildColor_v3.ts +193 -0
  477. package/src/theme/v3/color/card.ts +116 -0
  478. package/src/theme/v3/color/color.ts +94 -0
  479. package/src/theme/v3/color/element.ts +19 -0
  480. package/src/theme/v3/color/index.ts +7 -0
  481. package/src/theme/v3/color/parseColor.test.ts +79 -0
  482. package/src/theme/v3/color/parseColor.ts +167 -0
  483. package/src/theme/v3/color/renderColor.test.ts +19 -0
  484. package/src/theme/v3/color/renderColor.ts +33 -0
  485. package/src/theme/v3/color/token.ts +17 -0
  486. package/src/theme/v3/color/tokens.ts +5 -0
  487. package/src/theme/v3/defaults.ts +205 -0
  488. package/src/theme/v3/index.ts +6 -0
  489. package/src/theme/v3/merge.ts +22 -0
  490. package/src/theme/v3/resolveTokens.ts +199 -0
  491. package/src/theme/v3/tokens.ts +16 -0
  492. package/src/theme/v3/types.ts +48 -0
  493. package/src/theme/versioning/getTheme_v2.ts +2 -1
  494. package/src/theme/versioning/index.ts +0 -4
  495. package/src/theme/versioning/is_v0.ts +2 -1
  496. package/src/theme/versioning/is_v2.ts +2 -1
  497. package/src/theme/versioning/themeColor_v0_v2.ts +33 -5
  498. package/src/theme/versioning/themeColor_v2_v2_9.ts +49 -0
  499. package/src/theme/versioning/themeColor_v3_v2.ts +206 -0
  500. package/src/theme/versioning/v0_v2.ts +6 -1
  501. package/src/theme/versioning/v2_v0.ts +6 -6
  502. package/src/theme/versioning/v3_v2.ts +108 -0
  503. package/dist/css.esm.js +0 -3794
  504. package/dist/css.esm.js.map +0 -1
  505. package/dist/index.esm.js +0 -5431
  506. package/dist/index.esm.js.map +0 -1
  507. package/dist/theme.esm.js +0 -4201
  508. package/dist/theme.esm.js.map +0 -1
  509. package/src/core/__workshop__/constants.ts +0 -305
  510. package/src/core/__workshop__/fontsPlugin.tsx +0 -76
  511. package/src/core/_compat/styles/border/borderStyle.ts +0 -61
  512. package/src/core/_compat/styles/border/index.ts +0 -2
  513. package/src/core/_compat/styles/border/types.ts +0 -11
  514. package/src/core/_compat/styles/box/boxStyle.ts +0 -74
  515. package/src/core/_compat/styles/box/index.ts +0 -2
  516. package/src/core/_compat/styles/box/types.ts +0 -11
  517. package/src/core/_compat/styles/card/_cardColorStyle.ts +0 -101
  518. package/src/core/_compat/styles/card/index.ts +0 -1
  519. package/src/core/_compat/styles/flex/flexItemStyle.ts +0 -26
  520. package/src/core/_compat/styles/flex/flexStyle.ts +0 -69
  521. package/src/core/_compat/styles/flex/index.ts +0 -3
  522. package/src/core/_compat/styles/flex/types.ts +0 -24
  523. package/src/core/_compat/styles/focusRing/index.ts +0 -25
  524. package/src/core/_compat/styles/font/codeFontStyle.ts +0 -12
  525. package/src/core/_compat/styles/font/headingFontStyle.ts +0 -12
  526. package/src/core/_compat/styles/font/index.ts +0 -6
  527. package/src/core/_compat/styles/font/labelFontStyle.ts +0 -12
  528. package/src/core/_compat/styles/font/responsiveFont.ts +0 -101
  529. package/src/core/_compat/styles/font/textAlignStyle.ts +0 -18
  530. package/src/core/_compat/styles/font/textFontStyle.ts +0 -12
  531. package/src/core/_compat/styles/font/types.ts +0 -34
  532. package/src/core/_compat/styles/grid/gridItemStyle.ts +0 -81
  533. package/src/core/_compat/styles/grid/gridStyle.ts +0 -97
  534. package/src/core/_compat/styles/grid/index.ts +0 -3
  535. package/src/core/_compat/styles/grid/types.ts +0 -37
  536. package/src/core/_compat/styles/helpers.ts +0 -81
  537. package/src/core/_compat/styles/input/index.ts +0 -2
  538. package/src/core/_compat/styles/input/responsiveInputPaddingStyle.ts +0 -77
  539. package/src/core/_compat/styles/input/textInputStyle.ts +0 -263
  540. package/src/core/_compat/styles/internal.ts +0 -12
  541. package/src/core/_compat/styles/margin/index.ts +0 -2
  542. package/src/core/_compat/styles/margin/marginStyle.ts +0 -20
  543. package/src/core/_compat/styles/margin/marginsStyle.test.ts +0 -32
  544. package/src/core/_compat/styles/margin/types.ts +0 -9
  545. package/src/core/_compat/styles/padding/index.ts +0 -2
  546. package/src/core/_compat/styles/padding/paddingStyle.test.ts +0 -32
  547. package/src/core/_compat/styles/padding/paddingStyle.ts +0 -20
  548. package/src/core/_compat/styles/padding/types.ts +0 -12
  549. package/src/core/_compat/styles/radius/index.ts +0 -2
  550. package/src/core/_compat/styles/radius/radiusStyle.ts +0 -22
  551. package/src/core/_compat/styles/radius/types.ts +0 -8
  552. package/src/core/_compat/styles/shadow/index.ts +0 -2
  553. package/src/core/_compat/styles/shadow/shadowStyle.ts +0 -29
  554. package/src/core/_compat/styles/shadow/types.ts +0 -6
  555. package/src/core/_compat/styles/types.ts +0 -8
  556. package/src/core/components/autocomplete/__workshop__/.eslintrc +0 -5
  557. package/src/core/components/breadcrumbs/__workshop__/.eslintrc +0 -5
  558. package/src/core/components/dialog/__workshop__/.eslintrc +0 -5
  559. package/src/core/components/hotkeys/__workshop__/.eslintrc +0 -5
  560. package/src/core/components/menu/__workshop__/.eslintrc +0 -5
  561. package/src/core/components/skeleton/__workshop__/.eslintrc +0 -5
  562. package/src/core/components/tab/__workshop__/.eslintrc +0 -5
  563. package/src/core/components/toast/__workshop__/.eslintrc +0 -5
  564. package/src/core/components/tree/__workshop__/.eslintrc +0 -5
  565. package/src/core/hooks/useElementRect/__workshop__/.eslintrc +0 -5
  566. package/src/core/hooks/useMediaIndex/__workshop__/.eslintrc +0 -5
  567. package/src/core/lib/styled/elements.ts +0 -135
  568. package/src/core/lib/styled/index.ts +0 -2
  569. package/src/core/lib/styled/members.ts +0 -15
  570. package/src/core/lib/styled/styled.ts +0 -79
  571. package/src/core/primitives/avatar/__workshop__/.eslintrc +0 -5
  572. package/src/core/primitives/avatar/styles.ts +0 -166
  573. package/src/core/primitives/badge/__workshop__/.eslintrc +0 -5
  574. package/src/core/primitives/badge/styles.ts +0 -19
  575. package/src/core/primitives/box/__workshop__/.eslintrc +0 -5
  576. package/src/core/primitives/button/__workshop__/.eslintrc +0 -5
  577. package/src/core/primitives/button/styles.ts +0 -116
  578. package/src/core/primitives/card/RootCardContext.ts +0 -3
  579. package/src/core/primitives/card/__workshop__/.eslintrc +0 -5
  580. package/src/core/primitives/checkbox/__workshop__/.eslintrc +0 -5
  581. package/src/core/primitives/code/__workshop__/.eslintrc +0 -5
  582. package/src/core/primitives/code/styles.ts +0 -77
  583. package/src/core/primitives/container/__workshop__/.eslintrc +0 -5
  584. package/src/core/primitives/container/styles.ts +0 -22
  585. package/src/core/primitives/flex/__workshop__/.eslintrc +0 -5
  586. package/src/core/primitives/grid/__workshop__/.eslintrc +0 -5
  587. package/src/core/primitives/heading/__workshop__/.eslintrc +0 -5
  588. package/src/core/primitives/heading/styles.ts +0 -63
  589. package/src/core/primitives/heading/types.ts +0 -7
  590. package/src/core/primitives/inline/__workshop__/.eslintrc +0 -5
  591. package/src/core/primitives/inline/styles.ts +0 -31
  592. package/src/core/primitives/kbd/__workshop__/.eslintrc +0 -5
  593. package/src/core/primitives/label/__workshop__/.eslintrc +0 -5
  594. package/src/core/primitives/label/styles.ts +0 -44
  595. package/src/core/primitives/popover/__workshop__/.eslintrc +0 -5
  596. package/src/core/primitives/radio/__workshop__/.eslintrc +0 -5
  597. package/src/core/primitives/radio/styles.ts +0 -116
  598. package/src/core/primitives/select/__workshop__/.eslintrc +0 -5
  599. package/src/core/primitives/select/styles.ts +0 -166
  600. package/src/core/primitives/spinner/__workshop__/.eslintrc +0 -5
  601. package/src/core/primitives/stack/__workshop__/.eslintrc +0 -5
  602. package/src/core/primitives/stack/styles.ts +0 -31
  603. package/src/core/primitives/switch/__workshop__/.eslintrc +0 -5
  604. package/src/core/primitives/switch/styles.ts +0 -172
  605. package/src/core/primitives/text/__workshop__/.eslintrc +0 -5
  606. package/src/core/primitives/text/styles.ts +0 -73
  607. package/src/core/primitives/textArea/__workshop__/.eslintrc +0 -5
  608. package/src/core/primitives/textInput/__workshop__/.eslintrc +0 -5
  609. package/src/core/primitives/textInput/__workshop__/multipleTones.tsx +0 -20
  610. package/src/core/primitives/tooltip/__workshop__/.eslintrc +0 -5
  611. package/src/core/theme/__workshop__/.eslintrc +0 -5
  612. package/src/core/theme/__workshop__/build/Root.tsx +0 -367
  613. package/src/core/theme/__workshop__/build/helpers.ts +0 -46
  614. package/src/core/theme/__workshop__/build/story.tsx +0 -457
  615. package/src/core/theme/__workshop__/canvas.tsx +0 -350
  616. package/src/core/theme/__workshop__/color.tsx +0 -62
  617. package/src/core/theme/__workshop__/debug/story.tsx +0 -401
  618. package/src/core/theme/__workshop__/index.ts +0 -39
  619. package/src/core/theme/__workshop__/layer.tsx +0 -78
  620. package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
  621. package/src/core/utils/boundaryElement/__workshop__/.eslintrc +0 -5
  622. package/src/core/utils/elementQuery/__workshop__/.eslintrc +0 -5
  623. package/src/core/utils/layer/__workshop__/.eslintrc +0 -5
  624. package/src/core/utils/portal/__workshop__/.eslintrc +0 -5
  625. package/src/core/utils/virtualList/__workshop__/.eslintrc +0 -5
  626. package/src/css/primitives/selectable/rules.ts +0 -27
  627. package/src/css/primitives/selectable/selectable.ts +0 -9
  628. package/src/css/primitives/selectable/types.ts +0 -6
  629. package/src/theme/system/color/badge.ts +0 -20
  630. package/src/theme/system/theme.ts +0 -138
  631. package/src/theme/system/v0/color/_system.ts +0 -13
  632. package/theme.js +0 -2
  633. package/src/core/{theme → _compat/theme}/index.ts +1 -1
  634. package/src/core/{theme → _compat/theme}/types.ts +0 -0
  635. package/src/core/components/autocomplete/{__fixtures__ → __mocks__}/countries.ts +0 -0
  636. package/src/core/primitives/kbd/{index.tsx → index.ts} +0 -0
  637. package/src/css/primitives/{selectable → _selectable}/index.ts +0 -0
  638. package/src/theme/{system/v0 → v0}/avatar.ts +0 -0
  639. package/src/theme/{system/v0 → v0}/color/base.ts +0 -0
  640. package/src/theme/{system/v0 → v0}/color/button.ts +0 -0
  641. package/src/theme/{system/v0 → v0}/color/card.ts +0 -0
  642. package/src/theme/{system/v0 → v0}/color/index.ts +1 -1
  643. package/src/theme/{system/v0 → v0}/color/muted.ts +0 -0
  644. package/src/theme/{system/v0 → v0}/color/selectable.ts +0 -0
  645. package/src/theme/{system/v0 → v0}/color/solid.ts +0 -0
  646. package/src/theme/{system → v0}/focusRing.ts +0 -0
  647. package/src/theme/{system/v0 → v0}/input.ts +0 -0
  648. package/src/theme/{system → v0}/layer.ts +0 -0
  649. package/src/theme/{system → v0}/shadow.ts +0 -0
  650. package/src/theme/{system → v0}/styles.ts +0 -0
  651. package/src/theme/{system → v2}/color/_system.ts +1 -1
  652. /package/src/theme/{system → v2}/color/avatar.ts +0 -0
  653. /package/src/theme/{system → v2}/color/button.ts +0 -0
  654. /package/src/theme/{system → v2}/color/index.ts +0 -0
  655. /package/src/theme/{system → v2}/color/input.ts +0 -0
  656. /package/src/theme/{system → v2}/color/kbd.ts +0 -0
  657. /package/src/theme/{system → v2}/color/selectable.ts +0 -0
  658. /package/src/theme/{system → v2}/color/shadow.ts +0 -0
  659. /package/src/theme/{system → v2}/color/state.ts +0 -0
  660. /package/src/theme/{system → v2}/color/syntax.ts +0 -0
package/dist/index.d.ts CHANGED
@@ -5,16 +5,22 @@ import {BoxHeight} from '@sanity/ui/css'
5
5
  import {BoxOverflow} from '@sanity/ui/css'
6
6
  import {BoxSizing} from '@sanity/ui/css'
7
7
  import {BoxStyleProps} from '@sanity/ui/css'
8
+ import {ButtonStyleProps} from '@sanity/ui/css'
8
9
  import {CardStyleProps as CardStyleProps_2} from '@sanity/ui/css'
9
10
  import {Component} from 'react'
11
+ import type {ComponentProps} from 'react'
10
12
  import {ContainerStyleProps} from '@sanity/ui/css'
11
13
  import {Context} from 'react'
12
14
  import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
13
15
  import {CSSObject} from '@sanity/ui/theme'
16
+ import {DisplayStyleProps} from '@sanity/ui/css'
17
+ import {ElementProps as ElementProps_2} from '../..'
14
18
  import {ElementType} from 'react'
19
+ import {ErrorInfo} from 'react'
15
20
  import {FlexAlign} from '@sanity/ui/css'
16
21
  import {FlexDirection} from '@sanity/ui/css'
17
22
  import {FlexJustify} from '@sanity/ui/css'
23
+ import {FlexStyleProps} from '@sanity/ui/css'
18
24
  import {FlexValue} from '@sanity/ui/css'
19
25
  import {FlexWrap} from '@sanity/ui/css'
20
26
  import {FontCodeSize} from '@sanity/ui/theme'
@@ -22,6 +28,7 @@ import {FontHeadingSize} from '@sanity/ui/theme'
22
28
  import {FontLabelSize} from '@sanity/ui/theme'
23
29
  import {FontStyleProps} from '@sanity/ui/css'
24
30
  import {FontTextSize} from '@sanity/ui/theme'
31
+ import {ForwardedRef} from 'react'
25
32
  import {ForwardRefExoticComponent} from 'react'
26
33
  import {GapStyleProps} from '@sanity/ui/css'
27
34
  import {GridAutoCols} from '@sanity/ui/css'
@@ -33,26 +40,31 @@ import {GridItemColumnStart} from '@sanity/ui/css'
33
40
  import {GridItemRow} from '@sanity/ui/css'
34
41
  import {GridItemRowEnd} from '@sanity/ui/css'
35
42
  import {GridItemRowStart} from '@sanity/ui/css'
43
+ import {HeadingStyleProps} from '@sanity/ui/css'
36
44
  import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
37
45
  import {HSL as HSL_2} from '@sanity/ui/theme'
38
46
  import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
39
- import {HTMLProps} from 'react'
40
- import {MemoExoticComponent} from 'react'
47
+ import {InputStyleProps} from '@sanity/ui/css'
48
+ import {InsetStyleProps} from '@sanity/ui/css'
49
+ import {LabelSize} from '@sanity/ui/css'
41
50
  import {multiply as multiply_2} from '@sanity/ui/theme'
42
51
  import {MutableRefObject} from 'react'
43
52
  import {NamedExoticComponent} from 'react'
44
53
  import {PaddingStyleProps} from '@sanity/ui/css'
45
54
  import {parseColor as parseColor_2} from '@sanity/ui/theme'
46
55
  import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
56
+ import {PolymorphicProps as PolymorphicProps_2} from '../..'
47
57
  import {PositionStyleProps} from '@sanity/ui/css'
48
58
  import {PropsWithChildren} from 'react'
59
+ import {px} from '@sanity/ui/css'
49
60
  import {Radius} from '@sanity/ui/theme'
50
61
  import {RadiusStyleProps} from '@sanity/ui/css'
51
62
  import {ReactElement} from 'react'
52
63
  import {ReactNode} from 'react'
53
- import {Ref} from 'react'
64
+ import {ReactPortal} from 'react'
54
65
  import {RefAttributes} from 'react'
55
66
  import {RefCallback} from 'react'
67
+ import {rem} from '@sanity/ui/css'
56
68
  import {ResponsiveProp} from '@sanity/ui/css'
57
69
  import {RGB as RGB_2} from '@sanity/ui/theme'
58
70
  import {rgba as rgba_2} from '@sanity/ui/theme'
@@ -60,12 +72,17 @@ import {rgbToHex as rgbToHex_2} from '@sanity/ui/theme'
60
72
  import {rgbToHsl as rgbToHsl_2} from '@sanity/ui/theme'
61
73
  import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
62
74
  import {screen as screen_3} from '@sanity/ui/theme'
75
+ import {SelectStyleProps} from '@sanity/ui/css'
76
+ import {ShadowStyleProps} from '@sanity/ui/css'
63
77
  import {SkeletonStyleProps} from '@sanity/ui/css'
64
78
  import {Space} from '@sanity/ui/theme'
65
79
  import {TextAlign} from '@sanity/ui/css'
80
+ import {TextAreaStyleProps} from '@sanity/ui/css'
81
+ import {TextOverflowStyleProps} from '@sanity/ui/css'
66
82
  import {TextStyleProps} from '@sanity/ui/css'
67
83
  import {Theme as Theme_2} from '@sanity/ui/theme'
68
84
  import {Theme_v2} from '@sanity/ui/theme'
85
+ import {Theme_v3} from '@sanity/ui/theme'
69
86
  import {ThemeAvatar} from '@sanity/ui/theme'
70
87
  import {ThemeBoxShadow} from '@sanity/ui/theme'
71
88
  import {ThemeColor} from '@sanity/ui/theme'
@@ -112,22 +129,18 @@ import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
112
129
  import {ThemeStyles} from '@sanity/ui/theme'
113
130
  import {Width} from '@sanity/ui/css'
114
131
 
115
- /** @beta */
116
- export declare type ArrayPropPrimitive = string | number | boolean | undefined | null
117
-
118
132
  /** @internal */
119
133
  export declare const Arrow: ForwardRefExoticComponent<
120
- Omit<
121
- {
122
- width: number
123
- height: number
124
- radius?: number
125
- } & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width'>,
126
- 'ref'
127
- > &
128
- RefAttributes<HTMLDivElement>
134
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'radius' | 'height' | 'width'> & {
135
+ width: number
136
+ height: number
137
+ radius?: number
138
+ } & RefAttributes<HTMLDivElement>
129
139
  >
130
140
 
141
+ /** @public */
142
+ export declare type Assign<T, U> = Omit<T, keyof U> & U
143
+
131
144
  /**
132
145
  * @internal
133
146
  */
@@ -140,30 +153,20 @@ export declare function attemptFocus(element: HTMLElement): boolean
140
153
  * @public
141
154
  */
142
155
  export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
143
- props: AutocompleteProps<Option> &
144
- Omit<
145
- HTMLProps<HTMLInputElement>,
146
- | 'aria-activedescendant'
147
- | 'aria-autocomplete'
148
- | 'aria-expanded'
149
- | 'aria-owns'
150
- | 'as'
151
- | 'autoCapitalize'
152
- | 'autoComplete'
153
- | 'autoCorrect'
154
- | 'id'
155
- | 'inputMode'
156
- | 'onChange'
157
- | 'onSelect'
158
- | 'prefix'
159
- | 'ref'
160
- | 'role'
161
- | 'spellCheck'
162
- | 'type'
163
- | 'value'
164
- > & {
165
- ref?: Ref<HTMLInputElement>
166
- },
156
+ props: Omit<
157
+ Props<AutocompleteProps<Option>, 'input'>,
158
+ | 'aria-activedescendant'
159
+ | 'aria-autocomplete'
160
+ | 'aria-expanded'
161
+ | 'aria-owns'
162
+ | 'autoCapitalize'
163
+ | 'autoComplete'
164
+ | 'autoCorrect'
165
+ | 'inputMode'
166
+ | 'role'
167
+ | 'spellCheck'
168
+ | 'type'
169
+ >,
167
170
  ) => ReactElement
168
171
 
169
172
  /**
@@ -198,8 +201,7 @@ export declare type AutocompleteMsg =
198
201
  /**
199
202
  * @public
200
203
  */
201
- export declare type AutocompleteOpenButtonProps = Omit<ButtonProps, 'as'> &
202
- Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>
204
+ export declare type AutocompleteOpenButtonProps = Omit<Props<ButtonProps, 'button'>, 'as'>
203
205
 
204
206
  /**
205
207
  * @public
@@ -209,6 +211,7 @@ export declare interface AutocompleteProps<
209
211
  > {
210
212
  border?: boolean
211
213
  customValidity?: string
214
+ disabled?: boolean
212
215
  filterOption?: (query: string, option: Option) => boolean
213
216
  fontSize?: ResponsiveProp<FontTextSize>
214
217
  icon?: ElementType | ReactNode
@@ -226,24 +229,25 @@ export declare interface AutocompleteProps<
226
229
  /** The options to render. */
227
230
  options?: Option[]
228
231
  padding?: ResponsiveProp<Space>
229
- popover?: Omit<PopoverProps, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'> &
230
- Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'ref' | 'width'>
232
+ popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
231
233
  prefix?: ReactNode
232
234
  radius?: Radius | Radius[]
235
+ readOnly?: boolean
236
+ ref?: ForwardedRef<HTMLInputElement>
233
237
  /** @beta */
234
238
  relatedElements?: HTMLElement[]
235
239
  /** The callback function for rendering each option. */
236
- renderOption?: (option: Option) => ReactElement
240
+ renderOption?: (option: Option) => React.JSX.Element
237
241
  /** @beta */
238
242
  renderPopover?: (
239
243
  props: {
240
- content: ReactElement | null
244
+ content: React.JSX.Element | null
241
245
  hidden: boolean
242
246
  inputElement: HTMLInputElement | null
243
247
  onMouseEnter: () => void
244
248
  onMouseLeave: () => void
245
249
  },
246
- ref: Ref<HTMLDivElement>,
250
+ ref: ForwardedRef<HTMLDivElement>,
247
251
  ) => ReactNode
248
252
  renderValue?: (value: string, option?: Option) => string
249
253
  suffix?: ReactNode
@@ -322,22 +326,27 @@ export declare interface AutocompleteValueChangeMsg {
322
326
  * @public
323
327
  */
324
328
  export declare const Avatar: ForwardRefExoticComponent<
325
- AvatarProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
329
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarProps> &
330
+ AvatarProps &
331
+ RefAttributes<HTMLDivElement>
326
332
  >
327
333
 
328
334
  /**
329
335
  * @public
330
336
  */
331
337
  export declare const AvatarCounter: ForwardRefExoticComponent<
332
- AvatarCounterProps & RefAttributes<HTMLDivElement>
338
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarCounterProps> &
339
+ AvatarCounterProps &
340
+ RefAttributes<HTMLDivElement>
333
341
  >
334
342
 
335
343
  /**
336
344
  * @public
337
345
  */
338
- export declare interface AvatarCounterProps {
346
+ export declare interface AvatarCounterProps
347
+ extends Omit<BoxProps, 'align' | 'className' | 'display' | 'justify' | 'paddingX' | 'sizing'> {
339
348
  count: number
340
- size?: AvatarSize | AvatarSize[]
349
+ size?: ResponsiveProp<AvatarSize>
341
350
  /** @deprecated No longer supported. */
342
351
  tone?: 'navbar'
343
352
  }
@@ -355,11 +364,10 @@ export declare interface AvatarProps {
355
364
  __unstable_hideInnerStroke?: boolean
356
365
  animateArrowFrom?: AvatarPosition
357
366
  arrowPosition?: AvatarPosition
358
- as?: React.ElementType | keyof JSX.IntrinsicElements
359
367
  color?: ThemeColorAvatarColorKey
360
368
  initials?: string
361
369
  onImageLoadError?: (event: Error) => void
362
- size?: AvatarSize | AvatarSize[]
370
+ size?: ResponsiveProp<AvatarSize>
363
371
  src?: string
364
372
  /**
365
373
  * The status of the entity this Avatar represents.
@@ -382,16 +390,28 @@ export {AvatarSize}
382
390
  * @public
383
391
  */
384
392
  export declare const AvatarStack: ForwardRefExoticComponent<
385
- AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, 'ref' | 'as'> & RefAttributes<HTMLDivElement>
393
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarStackProps> &
394
+ AvatarStackProps &
395
+ RefAttributes<HTMLDivElement>
386
396
  >
387
397
 
388
398
  /**
389
399
  * @public
390
400
  */
391
- export declare interface AvatarStackProps {
392
- children: React.ReactNode
401
+ export declare type AvatarStackChild =
402
+ | ReactElement<Props<AvatarProps, 'div'>>
403
+ | null
404
+ | undefined
405
+ | false
406
+
407
+ /**
408
+ * @public
409
+ */
410
+ export declare interface AvatarStackProps
411
+ extends Omit<BoxProps, 'align' | 'className' | 'display'> {
412
+ children: AvatarStackChild | AvatarStackChild[]
393
413
  maxLength?: number
394
- size?: AvatarSize | AvatarSize[]
414
+ size?: ResponsiveProp<AvatarSize>
395
415
  /** @deprecated No longer supported. */
396
416
  tone?: 'navbar'
397
417
  }
@@ -410,7 +430,9 @@ export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
410
430
  * @public
411
431
  */
412
432
  export declare const Badge: ForwardRefExoticComponent<
413
- Omit<BadgeProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<HTMLDivElement>
433
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BadgeProps> &
434
+ BadgeProps &
435
+ RefAttributes<HTMLDivElement>
414
436
  >
415
437
 
416
438
  /**
@@ -423,10 +445,10 @@ export declare type BadgeMode = 'default' | 'outline'
423
445
  * @public
424
446
  */
425
447
  export declare interface BadgeProps extends BoxProps, RadiusStyleProps {
426
- as?: React.ElementType | keyof JSX.IntrinsicElements
427
448
  fontSize?: number | number[]
428
449
  /** @deprecated No longer used. */
429
450
  mode?: BadgeMode
451
+ textAlign?: TextProps['align']
430
452
  tone?: BadgeTone
431
453
  }
432
454
 
@@ -459,9 +481,7 @@ export declare interface BoundaryElementContextValue {
459
481
  /**
460
482
  * @public
461
483
  */
462
- export declare function BoundaryElementProvider(
463
- props: BoundaryElementProviderProps,
464
- ): React.ReactElement
484
+ export declare function BoundaryElementProvider(props: BoundaryElementProviderProps): ReactElement
465
485
 
466
486
  export declare namespace BoundaryElementProvider {
467
487
  var displayName: string
@@ -471,7 +491,7 @@ export declare namespace BoundaryElementProvider {
471
491
  * @public
472
492
  */
473
493
  export declare interface BoundaryElementProviderProps {
474
- children: React.ReactNode
494
+ children: ReactNode
475
495
  element: HTMLElement | null
476
496
  }
477
497
 
@@ -482,10 +502,8 @@ export declare interface BoundaryElementProviderProps {
482
502
  * @public
483
503
  */
484
504
  export declare const Box: ForwardRefExoticComponent<
485
- Omit<
486
- BoxProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width' | 'wrap' | 'as' | 'rows'>,
487
- 'ref'
488
- > &
505
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BoxProps> &
506
+ BoxProps &
489
507
  RefAttributes<HTMLDivElement>
490
508
  >
491
509
 
@@ -498,10 +516,11 @@ export {BoxOverflow}
498
516
  /**
499
517
  * @public
500
518
  */
501
- export declare interface BoxProps extends BoxStyleProps, GapStyleProps, PositionStyleProps {
502
- as?: React.ElementType | keyof JSX.IntrinsicElements
503
- forwardedAs?: React.ElementType | keyof JSX.IntrinsicElements
504
- }
519
+ export declare interface BoxProps
520
+ extends BoxStyleProps,
521
+ GapStyleProps,
522
+ InsetStyleProps,
523
+ PositionStyleProps {}
505
524
 
506
525
  /**
507
526
  * @public
@@ -515,9 +534,9 @@ export {BoxSizing}
515
534
  * @beta
516
535
  */
517
536
  export declare const Breadcrumbs: ForwardRefExoticComponent<
518
- BreadcrumbsProps &
519
- Omit<HTMLProps<HTMLOListElement>, 'type' | 'ref' | 'as'> &
520
- RefAttributes<HTMLOListElement>
537
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BreadcrumbsProps> &
538
+ BreadcrumbsProps &
539
+ RefAttributes<HTMLDivElement>
521
540
  >
522
541
 
523
542
  /**
@@ -526,7 +545,7 @@ export declare const Breadcrumbs: ForwardRefExoticComponent<
526
545
  export declare interface BreadcrumbsProps extends GapStyleProps {
527
546
  expandButton?: Omit<ButtonProps, 'onClick' | 'selected'>
528
547
  maxLength?: number
529
- separator?: React.ReactNode
548
+ separator?: ReactNode
530
549
  /** @deprecated - Use `gap`, `gapX`, `gapY` instead */
531
550
  space?: number | number[]
532
551
  }
@@ -535,42 +554,46 @@ export declare interface BreadcrumbsProps extends GapStyleProps {
535
554
  * @public
536
555
  */
537
556
  export declare const Button: ForwardRefExoticComponent<
538
- Omit<
539
- ButtonProps & Omit<HTMLProps<HTMLButtonElement>, 'height' | 'width' | 'wrap' | 'as'>,
540
- 'ref'
541
- > &
557
+ Omit<ElementProps_2<'button'> & PolymorphicProps_2, keyof ButtonProps> &
558
+ ButtonProps &
542
559
  RefAttributes<HTMLButtonElement>
543
560
  >
544
561
 
545
562
  /**
546
563
  * @public
564
+ * @deprecated Use `ThemeColorButtonModeKey` instead
547
565
  */
548
566
  export declare type ButtonMode = ThemeColorButtonModeKey_2
549
567
 
550
568
  /**
551
569
  * @public
552
570
  */
553
- export declare interface ButtonProps extends PaddingStyleProps, RadiusStyleProps {
554
- as?: React.ElementType | keyof JSX.IntrinsicElements
555
- fontSize?: ResponsiveProp<FontTextSize>
556
- mode?: ButtonMode
557
- icon?: React.ElementType | React.ReactNode
558
- iconRight?: React.ElementType | React.ReactNode
559
- justify?: ResponsiveProp<FlexJustify>
560
- /**
561
- * @beta Do not use in production, as this might change.
562
- */
563
- loading?: boolean
564
- selected?: boolean
565
- space?: ResponsiveProp<Space>
566
- textAlign?: ButtonTextAlign
567
- muted?: boolean
568
- text?: React.ReactNode
569
- textOverflow?: TextProps['textOverflow']
570
- textWeight?: TextProps['weight']
571
- tone?: ButtonTone
572
- type?: 'button' | 'reset' | 'submit'
573
- width?: ResponsiveProp<Width>
571
+ export declare interface ButtonProps
572
+ extends ButtonStyleProps,
573
+ DisplayStyleProps,
574
+ FlexStyleProps,
575
+ GapStyleProps,
576
+ PaddingStyleProps {
577
+ 'data-ui'?: string
578
+ 'fontSize'?: ResponsiveProp<FontTextSize>
579
+ 'href'?: string
580
+ 'mode'?: ButtonMode
581
+ 'icon'?: ElementType | ReactNode
582
+ 'iconRight'?: ElementType | ReactNode
583
+ /** @beta Do not use in production, as this might change.*/
584
+ 'loading'?: boolean
585
+ 'selected'?: boolean
586
+ /** @deprecated Use `gap` instead. */
587
+ 'space'?: ResponsiveProp<Space>
588
+ 'textAlign'?: ButtonTextAlign
589
+ 'muted'?: boolean
590
+ 'target'?: string
591
+ 'text'?: ReactNode
592
+ 'textOverflow'?: TextProps['textOverflow']
593
+ 'textWeight'?: TextProps['weight']
594
+ 'tone'?: ButtonTone
595
+ 'type'?: 'button' | 'reset' | 'submit'
596
+ 'width'?: ResponsiveProp<Width>
574
597
  }
575
598
 
576
599
  /**
@@ -580,6 +603,7 @@ export declare type ButtonTextAlign = 'left' | 'right' | 'center'
580
603
 
581
604
  /**
582
605
  * @public
606
+ * @deprecated Use `ThemeColorStateToneKey` instead
583
607
  */
584
608
  export declare type ButtonTone = ThemeColorStateToneKey
585
609
 
@@ -596,7 +620,8 @@ export declare type ButtonWidth = 'fill'
596
620
  * @public
597
621
  */
598
622
  export declare const Card: ForwardRefExoticComponent<
599
- Omit<CardProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width' | 'wrap' | 'as'>, 'ref'> &
623
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof CardProps> &
624
+ CardProps &
600
625
  RefAttributes<HTMLDivElement>
601
626
  >
602
627
 
@@ -614,14 +639,16 @@ export declare interface CardProps extends BoxProps, CardStyleProps_2 {
614
639
  * @beta
615
640
  */
616
641
  __unstable_focusRing?: boolean
617
- muted?: boolean
642
+ disabled?: boolean
643
+ href?: string
618
644
  pressed?: boolean
619
- scheme?: ThemeColorSchemeKey_2
620
- tone?: CardTone
645
+ selected?: boolean
646
+ target?: string
621
647
  }
622
648
 
623
649
  /**
624
650
  * @internal
651
+ * @deprecated
625
652
  */
626
653
  export declare interface CardStyleProps {
627
654
  $checkered: boolean
@@ -641,7 +668,8 @@ export declare type CardTone = ThemeColorCardToneKey | 'inherit'
641
668
  * @public
642
669
  */
643
670
  export declare const Checkbox: ForwardRefExoticComponent<
644
- Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & CheckboxProps, 'ref'> &
671
+ Omit<ElementProps_2<'input'> & PolymorphicProps_2, keyof CheckboxProps> &
672
+ CheckboxProps &
645
673
  RefAttributes<HTMLInputElement>
646
674
  >
647
675
 
@@ -677,7 +705,8 @@ export declare type ClickOutsideListener = (event: MouseEvent) => void
677
705
  * @public
678
706
  */
679
707
  export declare const Code: ForwardRefExoticComponent<
680
- Omit<CodeProps & Omit<HTMLProps<HTMLPreElement>, 'size' | 'as'>, 'ref'> &
708
+ Omit<ElementProps_2<'pre'> & PolymorphicProps_2, keyof CodeProps> &
709
+ CodeProps &
681
710
  RefAttributes<HTMLPreElement>
682
711
  >
683
712
 
@@ -685,7 +714,6 @@ export declare const Code: ForwardRefExoticComponent<
685
714
  * @public
686
715
  */
687
716
  export declare interface CodeProps extends Omit<FontStyleProps, 'align'> {
688
- as?: React.ElementType | keyof JSX.IntrinsicElements
689
717
  /** Define the language to use for syntax highlighting. */
690
718
  language?: string
691
719
  size?: number | number[]
@@ -696,14 +724,8 @@ export declare interface CodeProps extends Omit<FontStyleProps, 'align'> {
696
724
  * @beta
697
725
  */
698
726
  export declare const CodeSkeleton: ForwardRefExoticComponent<
699
- Omit<
727
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof CodeSkeletonProps> &
700
728
  CodeSkeletonProps &
701
- Omit<
702
- HTMLProps<HTMLDivElement>,
703
- 'height' | 'width' | 'size' | 'wrap' | 'children' | 'as' | 'rows'
704
- >,
705
- 'ref'
706
- > &
707
729
  RefAttributes<HTMLDivElement>
708
730
  >
709
731
 
@@ -724,10 +746,10 @@ export declare function ConditionalWrapper({
724
746
  condition,
725
747
  wrapper,
726
748
  }: {
727
- children: React.ReactNode
749
+ children: ReactNode
728
750
  condition: boolean
729
- wrapper: (children: React.ReactNode) => React.ReactNode
730
- }): React.ReactNode
751
+ wrapper: (children: ReactNode) => ReactNode
752
+ }): ReactNode
731
753
 
732
754
  export declare namespace ConditionalWrapper {
733
755
  var displayName: string
@@ -739,7 +761,8 @@ export declare namespace ConditionalWrapper {
739
761
  * @public
740
762
  */
741
763
  export declare const Container: ForwardRefExoticComponent<
742
- Omit<ContainerProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width' | 'as'>, 'ref'> &
764
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof ContainerProps> &
765
+ ContainerProps &
743
766
  RefAttributes<HTMLDivElement>
744
767
  >
745
768
 
@@ -775,11 +798,8 @@ export declare type Delay =
775
798
  * @public
776
799
  */
777
800
  export declare const Dialog: ForwardRefExoticComponent<
778
- Omit<
801
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof DialogProps> &
779
802
  DialogProps &
780
- Omit<HTMLProps<HTMLDivElement>, 'id' | 'height' | 'width' | 'wrap' | 'as' | 'rows'>,
781
- 'ref'
782
- > &
783
803
  RefAttributes<HTMLDivElement>
784
804
  >
785
805
 
@@ -806,7 +826,10 @@ export declare type DialogPosition = 'absolute' | 'fixed'
806
826
  /**
807
827
  * @public
808
828
  */
809
- export declare interface DialogProps extends PaddingStyleProps, ContainerStyleProps {
829
+ export declare interface DialogProps
830
+ extends ContainerStyleProps,
831
+ PaddingStyleProps,
832
+ ShadowStyleProps {
810
833
  /**
811
834
  * @beta
812
835
  */
@@ -822,19 +845,20 @@ export declare interface DialogProps extends PaddingStyleProps, ContainerStylePr
822
845
  * @defaultValue false
823
846
  */
824
847
  animate?: boolean
825
- cardRadius?: Radius | Radius[]
826
- cardShadow?: number | number[]
827
- contentRef?: React.ForwardedRef<HTMLDivElement>
828
- footer?: React.ReactNode
829
- header?: React.ReactNode
848
+ cardRadius?: ResponsiveProp<Radius>
849
+ contentRef?: ForwardedRef<HTMLDivElement>
850
+ footer?: ReactNode
851
+ header?: ReactNode
830
852
  id: string
831
853
  /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
832
854
  onActivate?: LayerProps['onActivate']
833
855
  onClickOutside?: () => void
834
856
  onClose?: () => void
857
+ open?: boolean
835
858
  portal?: string
836
859
  position?: DialogPosition | DialogPosition[]
837
860
  scheme?: ThemeColorSchemeKey_2
861
+ tone?: CardTone
838
862
  zOffset?: number | number[]
839
863
  }
840
864
 
@@ -842,7 +866,7 @@ export declare interface DialogProps extends PaddingStyleProps, ContainerStylePr
842
866
  * This API might change. DO NOT USE IN PRODUCTION.
843
867
  * @beta
844
868
  */
845
- export declare function DialogProvider(props: DialogProviderProps): React.ReactElement
869
+ export declare function DialogProvider(props: DialogProviderProps): ReactElement
846
870
 
847
871
  export declare namespace DialogProvider {
848
872
  var displayName: string
@@ -853,17 +877,21 @@ export declare namespace DialogProvider {
853
877
  * @beta
854
878
  */
855
879
  export declare interface DialogProviderProps {
856
- children?: React.ReactNode
880
+ children?: ReactNode
857
881
  position?: DialogPosition | DialogPosition[]
858
882
  zOffset?: number | number[]
859
883
  }
860
884
 
885
+ /** @public */
886
+ export declare type ElementProps<E extends ElementType> = Omit<ComponentProps<E>, 'as' | 'ref'>
887
+
861
888
  /**
862
889
  * DO NOT USE IN PRODUCTION.
863
890
  * @beta
864
891
  */
865
892
  export declare const ElementQuery: ForwardRefExoticComponent<
866
- Omit<MediaQueryProps & Omit<HTMLProps<HTMLDivElement>, 'media' | 'as'>, 'ref'> &
893
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'media'> &
894
+ MediaQueryProps &
867
895
  RefAttributes<HTMLDivElement>
868
896
  >
869
897
 
@@ -916,8 +944,8 @@ export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
916
944
  export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
917
945
  state: ErrorBoundaryState
918
946
  static getDerivedStateFromError(error: Error): ErrorBoundaryState
919
- componentDidCatch(error: Error, info: React.ErrorInfo): void
920
- render(): React.ReactNode
947
+ componentDidCatch(error: Error, info: ErrorInfo): void
948
+ render(): ReactNode
921
949
  }
922
950
 
923
951
  /**
@@ -925,7 +953,7 @@ export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBo
925
953
  * @beta
926
954
  */
927
955
  export declare type ErrorBoundaryProps = PropsWithChildren<{
928
- onCatch: (params: {error: Error; info: React.ErrorInfo}) => void
956
+ onCatch: (params: {error: Error; info: ErrorInfo}) => void
929
957
  }>
930
958
 
931
959
  /**
@@ -936,21 +964,14 @@ export declare interface ErrorBoundaryState {
936
964
  error: Error | null
937
965
  }
938
966
 
939
- /**
940
- * @internal
941
- */
942
- export declare function _fillCSSObject(
943
- keys: string[],
944
- value: string | number | CSSObject,
945
- ): CSSObject
946
-
947
967
  /**
948
968
  * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
949
969
  *
950
970
  * @public
951
971
  */
952
972
  export declare const Flex: ForwardRefExoticComponent<
953
- Omit<FlexProps & Omit<HTMLProps<HTMLDivElement>, 'wrap' | 'as'>, 'ref'> &
973
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof FlexProps> &
974
+ FlexProps &
954
975
  RefAttributes<HTMLDivElement>
955
976
  >
956
977
 
@@ -963,7 +984,9 @@ export {FlexJustify}
963
984
  /**
964
985
  * @public
965
986
  */
966
- export declare interface FlexProps extends Omit<BoxProps, 'display'> {}
987
+ export declare interface FlexProps extends Omit<BoxProps, 'display'> {
988
+ htmlFor?: string
989
+ }
967
990
 
968
991
  export {FlexValue}
969
992
 
@@ -982,23 +1005,7 @@ export declare function focusLastDescendant(element: HTMLElement): boolean
982
1005
  /**
983
1006
  * @internal
984
1007
  */
985
- export declare interface FontWeightStyleProps {
986
- $weight?: ThemeFontWeightKey_2
987
- }
988
-
989
- /**
990
- * @internal
991
- */
992
- export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[]
993
-
994
- /**
995
- * @internal
996
- */
997
- export declare function _getResponsiveSpace(
998
- theme: Theme_2,
999
- props: string[],
1000
- spaceIndexes?: number[],
1001
- ): CSSObject[] | null
1008
+ export declare function _getArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
1002
1009
 
1003
1010
  /**
1004
1011
  * The `Grid` component is for building 2-dimensional layers (based on CSS grid).
@@ -1006,7 +1013,8 @@ export declare function _getResponsiveSpace(
1006
1013
  * @public
1007
1014
  */
1008
1015
  export declare const Grid: ForwardRefExoticComponent<
1009
- Omit<GridProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'rows'>, 'ref'> &
1016
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof GridProps> &
1017
+ GridProps &
1010
1018
  RefAttributes<HTMLDivElement>
1011
1019
  >
1012
1020
 
@@ -1044,39 +1052,23 @@ export declare function _hasFocus(element: HTMLElement): boolean
1044
1052
  * @public
1045
1053
  */
1046
1054
  export declare const Heading: ForwardRefExoticComponent<
1047
- Omit<HeadingProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as'>, 'ref'> &
1055
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof HeadingProps> &
1056
+ HeadingProps &
1048
1057
  RefAttributes<HTMLElement>
1049
1058
  >
1050
1059
 
1051
1060
  /**
1052
1061
  * @public
1053
1062
  */
1054
- export declare interface HeadingProps extends FontStyleProps {
1055
- accent?: boolean
1056
- as?: React.ElementType | keyof JSX.IntrinsicElements
1057
- muted?: boolean
1058
- size?: ResponsiveProp<FontHeadingSize>
1059
- /**
1060
- * Controls how overflowing text is treated.
1061
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
1062
- * @beta
1063
- */
1064
- textOverflow?: 'ellipsis'
1065
- }
1063
+ export declare interface HeadingProps extends HeadingStyleProps, TextOverflowStyleProps {}
1066
1064
 
1067
1065
  /**
1068
1066
  * This API might change. DO NOT USE IN PRODUCTION.
1069
1067
  * @beta
1070
1068
  */
1071
1069
  export declare const HeadingSkeleton: ForwardRefExoticComponent<
1072
- Omit<
1070
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof HeadingSkeletonProps> &
1073
1071
  HeadingSkeletonProps &
1074
- Omit<
1075
- HTMLProps<HTMLDivElement>,
1076
- 'height' | 'width' | 'size' | 'wrap' | 'children' | 'as' | 'rows'
1077
- >,
1078
- 'ref'
1079
- > &
1080
1072
  RefAttributes<HTMLDivElement>
1081
1073
  >
1082
1074
 
@@ -1100,20 +1092,18 @@ export declare const hexToRgb: typeof hexToRgb_2
1100
1092
  * @public
1101
1093
  */
1102
1094
  export declare const Hotkeys: ForwardRefExoticComponent<
1103
- HotkeysProps &
1104
- Omit<
1105
- HTMLProps<HTMLDivElement>,
1106
- 'display' | 'height' | 'width' | 'size' | 'wrap' | 'ref' | 'as' | 'rows'
1107
- > &
1095
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof HotkeysProps> &
1096
+ HotkeysProps &
1108
1097
  RefAttributes<HTMLDivElement>
1109
1098
  >
1110
1099
 
1111
1100
  /**
1112
1101
  * @public
1113
1102
  */
1114
- export declare interface HotkeysProps extends RadiusStyleProps {
1103
+ export declare interface HotkeysProps extends GapStyleProps, RadiusStyleProps {
1115
1104
  fontSize?: ResponsiveProp<FontTextSize>
1116
1105
  padding?: ResponsiveProp<Space>
1106
+ /** @deprecated Use `gap` instead. */
1117
1107
  space?: ResponsiveProp<Space>
1118
1108
  keys?: string[]
1119
1109
  }
@@ -1136,15 +1126,16 @@ export declare const hslToRgb: typeof hslToRgb_2
1136
1126
  * @public
1137
1127
  */
1138
1128
  export declare const Inline: ForwardRefExoticComponent<
1139
- Omit<InlineProps & Omit<HTMLProps<HTMLDivElement>, 'wrap'>, 'ref'> & RefAttributes<HTMLDivElement>
1129
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof InlineProps> &
1130
+ InlineProps &
1131
+ RefAttributes<HTMLDivElement>
1140
1132
  >
1141
1133
 
1142
1134
  /**
1143
1135
  * @public
1144
1136
  */
1145
- export declare interface InlineProps
1146
- extends Omit<BoxProps, 'align' | 'display' | 'gap' | 'gapX' | 'gapY' | 'justify'> {
1147
- /** The spacing between children. */
1137
+ export declare interface InlineProps extends Omit<BoxProps, 'align' | 'display' | 'justify'> {
1138
+ /** @deprecated Use `gap` instead. */
1148
1139
  space?: ResponsiveProp<Space>
1149
1140
  }
1150
1141
 
@@ -1199,14 +1190,15 @@ export declare function _isScrollable(el: Node): boolean
1199
1190
  * @public
1200
1191
  */
1201
1192
  export declare const KBD: ForwardRefExoticComponent<
1202
- KBDProps & Omit<HTMLProps<HTMLElement>, 'size' | 'ref' | 'as'> & RefAttributes<HTMLDivElement>
1193
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof KBDProps> &
1194
+ KBDProps &
1195
+ RefAttributes<HTMLDivElement>
1203
1196
  >
1204
1197
 
1205
1198
  /**
1206
1199
  * @public
1207
1200
  */
1208
1201
  export declare interface KBDProps extends BoxProps, RadiusStyleProps {
1209
- as?: React.ElementType | keyof JSX.IntrinsicElements
1210
1202
  fontSize?: ResponsiveProp<FontTextSize>
1211
1203
  padding?: ResponsiveProp<Space>
1212
1204
  }
@@ -1217,25 +1209,19 @@ export declare interface KBDProps extends BoxProps, RadiusStyleProps {
1217
1209
  * @public
1218
1210
  */
1219
1211
  export declare const Label: ForwardRefExoticComponent<
1220
- Omit<LabelProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
1212
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof LabelProps> &
1213
+ LabelProps &
1221
1214
  RefAttributes<HTMLDivElement>
1222
1215
  >
1223
1216
 
1224
1217
  /**
1225
1218
  * @public
1226
1219
  */
1227
- export declare interface LabelProps extends FontStyleProps {
1220
+ export declare interface LabelProps extends FontStyleProps, TextOverflowStyleProps {
1228
1221
  accent?: boolean
1229
- as?: React.ElementType | keyof JSX.IntrinsicElements
1222
+ htmlFor?: string
1230
1223
  muted?: boolean
1231
- size?: number | number[]
1232
- /**
1233
- * Controls how overflowing text is treated.
1234
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
1235
- * @beta
1236
- */
1237
- textOverflow?: 'ellipsis'
1238
- weight?: ThemeFontWeightKey_2
1224
+ size?: ResponsiveProp<LabelSize>
1239
1225
  }
1240
1226
 
1241
1227
  /**
@@ -1243,14 +1229,8 @@ export declare interface LabelProps extends FontStyleProps {
1243
1229
  * @beta
1244
1230
  */
1245
1231
  export declare const LabelSkeleton: ForwardRefExoticComponent<
1246
- Omit<
1232
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof LabelSkeletonProps> &
1247
1233
  LabelSkeletonProps &
1248
- Omit<
1249
- HTMLProps<HTMLDivElement>,
1250
- 'height' | 'width' | 'size' | 'wrap' | 'children' | 'as' | 'rows'
1251
- >,
1252
- 'ref'
1253
- > &
1254
1234
  RefAttributes<HTMLDivElement>
1255
1235
  >
1256
1236
 
@@ -1266,7 +1246,8 @@ export declare interface LabelSkeletonProps extends SkeletonProps {
1266
1246
  * @public
1267
1247
  */
1268
1248
  export declare const Layer: ForwardRefExoticComponent<
1269
- Omit<LayerProps & Omit<HTMLProps<HTMLDivElement>, 'width' | 'wrap' | 'as' | 'rows'>, 'ref'> &
1249
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof LayerProps> &
1250
+ LayerProps &
1270
1251
  RefAttributes<HTMLDivElement>
1271
1252
  >
1272
1253
 
@@ -1292,7 +1273,7 @@ export declare interface LayerProps extends BoxProps {
1292
1273
  /**
1293
1274
  * @public
1294
1275
  */
1295
- export declare function LayerProvider(props: LayerProviderProps): React.ReactElement
1276
+ export declare function LayerProvider(props: LayerProviderProps): ReactElement
1296
1277
 
1297
1278
  export declare namespace LayerProvider {
1298
1279
  var displayName: string
@@ -1302,7 +1283,7 @@ export declare namespace LayerProvider {
1302
1283
  * @public
1303
1284
  */
1304
1285
  export declare interface LayerProviderProps {
1305
- children?: React.ReactNode
1286
+ children?: ReactNode
1306
1287
  zOffset?: number | number[]
1307
1288
  }
1308
1289
 
@@ -1311,7 +1292,6 @@ export declare interface LayerProviderProps {
1311
1292
  * @beta
1312
1293
  */
1313
1294
  export declare interface MediaQueryProps {
1314
- as?: React.ElementType | keyof JSX.IntrinsicElements
1315
1295
  media?: number[]
1316
1296
  }
1317
1297
 
@@ -1329,14 +1309,8 @@ export declare interface _MediaStore {
1329
1309
  * @public
1330
1310
  */
1331
1311
  export declare const Menu: ForwardRefExoticComponent<
1332
- Omit<
1312
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof MenuProps> &
1333
1313
  MenuProps &
1334
- Omit<
1335
- HTMLProps<HTMLDivElement>,
1336
- 'height' | 'width' | 'wrap' | 'role' | 'tabIndex' | 'as' | 'rows'
1337
- >,
1338
- 'ref'
1339
- > &
1340
1314
  RefAttributes<HTMLDivElement>
1341
1315
  >
1342
1316
 
@@ -1361,9 +1335,9 @@ export declare interface MenuButtonProps {
1361
1335
  * @deprecated Use `popover={{boundaryElement: element}}` instead.
1362
1336
  */
1363
1337
  boundaryElement?: HTMLElement
1364
- button: React.ReactElement
1338
+ button: ReactElement<Props<ButtonProps, 'button'>>
1365
1339
  id: string
1366
- menu?: React.ReactElement
1340
+ menu?: ReactElement
1367
1341
  onClose?: () => void
1368
1342
  onOpen?: () => void
1369
1343
  /**
@@ -1394,19 +1368,18 @@ export declare interface MenuButtonProps {
1394
1368
  * @public
1395
1369
  */
1396
1370
  export declare const MenuDivider: ForwardRefExoticComponent<
1397
- Omit<HTMLProps<HTMLHRElement>, 'ref'> & RefAttributes<HTMLHRElement>
1371
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, never> &
1372
+ MenuDividerProps &
1373
+ RefAttributes<HTMLHRElement>
1398
1374
  >
1399
1375
 
1376
+ /** @public */
1377
+ export declare interface MenuDividerProps {}
1378
+
1400
1379
  /**
1401
1380
  * @public
1402
1381
  */
1403
- export declare function MenuGroup(
1404
- props: Omit<
1405
- React.HTMLProps<HTMLDivElement>,
1406
- 'as' | 'height' | 'popover' | 'ref' | 'rows' | 'tabIndex' | 'width' | 'wrap'
1407
- > &
1408
- MenuGroupProps,
1409
- ): React.ReactElement
1382
+ export declare function MenuGroup(props: Props<MenuGroupProps, 'div'>): ReactElement
1410
1383
 
1411
1384
  export declare namespace MenuGroup {
1412
1385
  var displayName: string
@@ -1415,15 +1388,27 @@ export declare namespace MenuGroup {
1415
1388
  /**
1416
1389
  * @public
1417
1390
  */
1418
- export declare interface MenuGroupProps {
1419
- as?: React.ElementType | keyof JSX.IntrinsicElements
1420
- fontSize?: number | number[]
1421
- icon?: React.ElementType | React.ReactNode
1422
- padding?: number | number[]
1391
+ export declare interface MenuGroupProps extends GapStyleProps {
1392
+ disabled?: boolean
1393
+ fontSize?: ResponsiveProp<FontTextSize>
1394
+ icon?: ElementType | ReactNode
1395
+ menu?: Omit<
1396
+ MenuProps,
1397
+ | 'onClickOutside'
1398
+ | 'onEscape'
1399
+ | 'onItemClick'
1400
+ | 'onKeyDown'
1401
+ | 'onMouseEnter'
1402
+ | 'registerElement'
1403
+ | 'shouldFocus'
1404
+ | 'onBlurCapture'
1405
+ >
1406
+ padding?: ResponsiveProp<Space>
1423
1407
  popover?: Omit<PopoverProps, 'content' | 'open'>
1424
1408
  radius?: Radius | Radius[]
1409
+ /** @deprecated Use `gap` instead. */
1425
1410
  space?: ResponsiveProp<Space>
1426
- text: React.ReactNode
1411
+ text: ReactNode
1427
1412
  tone?: SelectableTone
1428
1413
  }
1429
1414
 
@@ -1431,50 +1416,50 @@ export declare interface MenuGroupProps {
1431
1416
  * @public
1432
1417
  */
1433
1418
  export declare const MenuItem: ForwardRefExoticComponent<
1434
- MenuItemProps &
1435
- Omit<
1436
- HTMLProps<HTMLDivElement>,
1437
- 'selected' | 'height' | 'width' | 'wrap' | 'tabIndex' | 'ref' | 'as' | 'rows'
1438
- > &
1419
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof MenuItemProps> &
1420
+ MenuItemProps &
1439
1421
  RefAttributes<HTMLDivElement>
1440
1422
  >
1441
1423
 
1442
1424
  /**
1443
1425
  * @public
1444
1426
  */
1445
- export declare interface MenuItemProps extends PaddingStyleProps, RadiusStyleProps {
1446
- as?: React.ElementType | keyof JSX.IntrinsicElements
1427
+ export declare interface MenuItemProps extends GapStyleProps, PaddingStyleProps, RadiusStyleProps {
1428
+ disabled?: boolean
1447
1429
  fontSize?: number | number[]
1448
1430
  hotkeys?: string[]
1449
- icon?: React.ElementType | React.ReactNode
1450
- iconRight?: React.ElementType | React.ReactNode
1431
+ icon?: ElementType | ReactNode
1432
+ iconRight?: ElementType | ReactNode
1451
1433
  pressed?: boolean
1452
1434
  selected?: boolean
1435
+ /** @deprecated Use `gap` instead. */
1453
1436
  space?: ResponsiveProp<Space>
1454
- text?: React.ReactNode
1437
+ text?: ReactNode
1455
1438
  tone?: SelectableTone
1456
1439
  }
1457
1440
 
1458
1441
  /**
1459
1442
  * @public
1460
1443
  */
1461
- export declare interface MenuProps extends PaddingStyleProps {
1444
+ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps, 'gap'> {
1462
1445
  /**
1463
1446
  * @deprecated Use `shouldFocus="first"` instead.
1464
1447
  */
1465
- focusFirst?: boolean
1448
+ 'focusFirst'?: boolean
1466
1449
  /**
1467
1450
  * @deprecated Use `shouldFocus="last"` instead.
1468
1451
  */
1469
- focusLast?: boolean
1470
- onClickOutside?: (event: MouseEvent) => void
1471
- onEscape?: () => void
1472
- onItemClick?: () => void
1473
- onItemSelect?: (index: number) => void
1474
- originElement?: HTMLElement | null
1475
- registerElement?: (el: HTMLElement) => () => void
1476
- shouldFocus?: 'first' | 'last' | null
1477
- space?: ResponsiveProp<Space>
1452
+ 'focusLast'?: boolean
1453
+ 'onClickOutside'?: (event: MouseEvent) => void
1454
+ 'onEscape'?: () => void
1455
+ 'onItemClick'?: () => void
1456
+ 'onItemSelect'?: (index: number) => void
1457
+ 'originElement'?: HTMLElement | null
1458
+ 'registerElement'?: (el: HTMLElement) => () => void
1459
+ 'shouldFocus'?: 'first' | 'last' | null
1460
+ /** @deprecated Use `gap` property instead. */
1461
+ 'space'?: ResponsiveProp<Space>
1462
+ 'aria-labelledby'?: string
1478
1463
  }
1479
1464
 
1480
1465
  /**
@@ -1510,23 +1495,19 @@ export declare type Placement =
1510
1495
  | 'left-start'
1511
1496
  | 'left-end'
1512
1497
 
1498
+ export declare interface PolymorphicProps {
1499
+ as?: ElementType
1500
+ }
1501
+
1513
1502
  /**
1514
1503
  * The `Popover` component is used to display some content on top of another.
1515
1504
  *
1516
1505
  * @public
1517
1506
  */
1518
- export declare const Popover: MemoExoticComponent<
1519
- ForwardRefExoticComponent<
1520
- Omit<
1521
- PopoverProps &
1522
- Omit<
1523
- HTMLProps<HTMLDivElement>,
1524
- 'content' | 'height' | 'width' | 'wrap' | 'children' | 'as' | 'rows'
1525
- >,
1526
- 'ref'
1527
- > &
1528
- RefAttributes<HTMLDivElement>
1529
- >
1507
+ export declare const Popover: NamedExoticComponent<
1508
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof PopoverProps> &
1509
+ PopoverProps &
1510
+ RefAttributes<HTMLDivElement>
1530
1511
  >
1531
1512
 
1532
1513
  /**
@@ -1535,10 +1516,7 @@ export declare const Popover: MemoExoticComponent<
1535
1516
  export declare type PopoverMargins = [number, number, number, number]
1536
1517
 
1537
1518
  /** @public */
1538
- export declare interface PopoverProps
1539
- extends Omit<LayerProps, 'width'>,
1540
- RadiusStyleProps,
1541
- ResponsiveShadowProps {
1519
+ export declare interface PopoverProps extends CardProps, LayerProps {
1542
1520
  /** @beta */
1543
1521
  __unstable_margins?: PopoverMargins
1544
1522
  /**
@@ -1551,7 +1529,9 @@ export declare interface PopoverProps
1551
1529
  arrow?: boolean
1552
1530
  /** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
1553
1531
  boundaryElement?: HTMLElement | null
1554
- children?: React.ReactElement
1532
+ children?: ReactElement<{
1533
+ ref: ForwardedRef<HTMLElement>
1534
+ }>
1555
1535
  /**
1556
1536
  * When `true`, prevent overflow within the current boundary:
1557
1537
  * - by flipping on its side axis
@@ -1564,7 +1544,7 @@ export declare interface PopoverProps
1564
1544
  * @defaultValue false
1565
1545
  */
1566
1546
  constrainSize?: boolean
1567
- content?: React.ReactNode
1547
+ content?: ReactNode
1568
1548
  disabled?: boolean
1569
1549
  fallbackPlacements?: Placement[]
1570
1550
  floatingBoundary?: HTMLElement | null
@@ -1577,9 +1557,14 @@ export declare interface PopoverProps
1577
1557
  * @defaultValue false
1578
1558
  */
1579
1559
  matchReferenceWidth?: boolean
1560
+ /**
1561
+ * When true, blocks all pointer interaction with elements beneath the popover until closed.
1562
+ *
1563
+ * @beta
1564
+ * @defaultValue false
1565
+ */
1566
+ modal?: boolean
1580
1567
  open?: boolean
1581
- overflow?: BoxOverflow
1582
- padding?: number | number[]
1583
1568
  placement?: Placement
1584
1569
  /** Whether or not to render the popover in a portal element. */
1585
1570
  portal?: boolean | string
@@ -1590,13 +1575,10 @@ export declare interface PopoverProps
1590
1575
  * The children of the popover won't be rendered.
1591
1576
  */
1592
1577
  referenceElement?: HTMLElement | null
1593
- scheme?: ThemeColorSchemeKey_2
1594
- tone?: CardTone
1595
1578
  /** @beta */
1596
1579
  updateRef?:
1597
1580
  | MutableRefObject<PopoverUpdateCallback | undefined>
1598
1581
  | RefCallback<PopoverUpdateCallback | undefined>
1599
- width?: PopoverWidth | PopoverWidth[]
1600
1582
  }
1601
1583
 
1602
1584
  /** @beta */
@@ -1608,7 +1590,7 @@ export declare type PopoverWidth = number | 'auto'
1608
1590
  /**
1609
1591
  * @public
1610
1592
  */
1611
- export declare function Portal(props: PortalProps): React.ReactPortal | null
1593
+ export declare function Portal(props: PortalProps): ReactPortal | null
1612
1594
 
1613
1595
  export declare namespace Portal {
1614
1596
  var displayName: string
@@ -1628,7 +1610,7 @@ export declare interface PortalContextValue {
1628
1610
  * @public
1629
1611
  */
1630
1612
  export declare interface PortalProps {
1631
- children: React.ReactNode
1613
+ children: ReactNode
1632
1614
  /**
1633
1615
  * @beta This API might change. DO NOT USE IN PRODUCTION.
1634
1616
  */
@@ -1638,7 +1620,7 @@ export declare interface PortalProps {
1638
1620
  /**
1639
1621
  * @public
1640
1622
  */
1641
- export declare function PortalProvider(props: PortalProviderProps): React.ReactElement
1623
+ export declare function PortalProvider(props: PortalProviderProps): ReactElement
1642
1624
 
1643
1625
  export declare namespace PortalProvider {
1644
1626
  var displayName: string
@@ -1652,7 +1634,7 @@ export declare interface PortalProviderProps {
1652
1634
  * @deprecated Use `<BoundaryElementProvider element={...} />` instead
1653
1635
  */
1654
1636
  boundaryElement?: HTMLElement | null
1655
- children: React.ReactNode
1637
+ children: ReactNode
1656
1638
  element?: HTMLElement | null
1657
1639
  /**
1658
1640
  * @beta
@@ -1660,10 +1642,13 @@ export declare interface PortalProviderProps {
1660
1642
  __unstable_elements?: Record<string, HTMLElement | null | undefined>
1661
1643
  }
1662
1644
 
1663
- /**
1664
- * @public
1665
- */
1666
- export declare function px(pixelValue: number): string | 0
1645
+ /** @public */
1646
+ export declare type Props<P extends {} = {}, E extends ElementType = ElementType> = Assign<
1647
+ ElementProps<E> & PolymorphicProps,
1648
+ P
1649
+ >
1650
+
1651
+ export {px}
1667
1652
 
1668
1653
  /**
1669
1654
  * The `Radio` component allows the user to select one option from a set.
@@ -1671,7 +1656,8 @@ export declare function px(pixelValue: number): string | 0
1671
1656
  * @public
1672
1657
  */
1673
1658
  export declare const Radio: ForwardRefExoticComponent<
1674
- Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & RadioProps, 'ref'> &
1659
+ Omit<ElementProps_2<'input'> & PolymorphicProps_2, 'customValidity'> &
1660
+ RadioProps &
1675
1661
  RefAttributes<HTMLInputElement>
1676
1662
  >
1677
1663
 
@@ -1694,10 +1680,7 @@ export declare function _raf(fn: () => void): () => void
1694
1680
  */
1695
1681
  export declare function _raf2(fn: () => void): () => void
1696
1682
 
1697
- /**
1698
- * @public
1699
- */
1700
- export declare function rem(pixelValue: number): string | 0
1683
+ export {rem}
1701
1684
 
1702
1685
  /**
1703
1686
  * @internal
@@ -1706,6 +1689,7 @@ export declare const _ResizeObserver: typeof ResizeObserver
1706
1689
 
1707
1690
  /**
1708
1691
  * @internal
1692
+ * @deprecated do not use
1709
1693
  */
1710
1694
  export declare function _responsive<T>(
1711
1695
  media: number[],
@@ -1743,14 +1727,6 @@ export declare interface ResponsiveBoxProps {
1743
1727
  sizing?: BoxSizing | BoxSizing[]
1744
1728
  }
1745
1729
 
1746
- /**
1747
- * Get responsive CSS for the `code` font style.
1748
- * @internal
1749
- */
1750
- export declare function responsiveCodeFontStyle(
1751
- props: ResponsiveFontStyleProps & ThemeProps,
1752
- ): CSSObject[]
1753
-
1754
1730
  /**
1755
1731
  * @public
1756
1732
  * @deprecated
@@ -1771,24 +1747,6 @@ export declare interface ResponsiveFlexProps {
1771
1747
  wrap?: FlexWrap | FlexWrap[]
1772
1748
  }
1773
1749
 
1774
- /**
1775
- * @internal
1776
- */
1777
- export declare interface ResponsiveFontSizeStyleProps {
1778
- $size: number[]
1779
- }
1780
-
1781
- /**
1782
- * @internal
1783
- */
1784
- export declare interface ResponsiveFontStyleProps
1785
- extends FontWeightStyleProps,
1786
- ResponsiveFontSizeStyleProps,
1787
- ResponsiveTextAlignStyleProps {
1788
- $accent?: boolean
1789
- $muted?: boolean
1790
- }
1791
-
1792
1750
  /**
1793
1751
  * @public
1794
1752
  * @deprecated
@@ -1814,22 +1772,6 @@ export declare interface ResponsiveGridProps {
1814
1772
  rows?: number | number[]
1815
1773
  }
1816
1774
 
1817
- /**
1818
- * Get responsive CSS for the `heading` font style.
1819
- * @internal
1820
- */
1821
- export declare function responsiveHeadingFont(
1822
- props: ResponsiveFontStyleProps & ThemeProps,
1823
- ): CSSObject[]
1824
-
1825
- /**
1826
- * Get responsive CSS for the `label` font style.
1827
- * @internal
1828
- */
1829
- export declare function responsiveLabelFont(
1830
- props: ResponsiveFontStyleProps & ThemeProps,
1831
- ): CSSObject[]
1832
-
1833
1775
  /**
1834
1776
  * @public
1835
1777
  * @deprecated
@@ -1877,29 +1819,6 @@ export declare interface ResponsiveShadowProps {
1877
1819
  shadow?: number | number[]
1878
1820
  }
1879
1821
 
1880
- /**
1881
- * Get responsive text align styles.
1882
- * @internal
1883
- */
1884
- export declare function responsiveTextAlignStyle(
1885
- props: ResponsiveTextAlignStyleProps & ThemeProps,
1886
- ): CSSObject[]
1887
-
1888
- /**
1889
- * @internal
1890
- */
1891
- export declare interface ResponsiveTextAlignStyleProps {
1892
- $align: TextAlign[]
1893
- }
1894
-
1895
- /**
1896
- * Get responsive CSS for the `text` font style.
1897
- * @internal
1898
- */
1899
- export declare function responsiveTextFont(
1900
- props: ResponsiveFontStyleProps & ThemeProps,
1901
- ): CSSObject[]
1902
-
1903
1822
  /**
1904
1823
  * @public
1905
1824
  * @deprecated
@@ -1958,24 +1877,25 @@ export {screen_2 as screen}
1958
1877
  * @public
1959
1878
  */
1960
1879
  export declare const Select: ForwardRefExoticComponent<
1961
- Omit<SelectProps & Omit<HTMLProps<HTMLSelectElement>, 'as'>, 'ref'> &
1880
+ Omit<ElementProps_2<'select'> & PolymorphicProps_2, keyof SelectProps> &
1881
+ SelectProps &
1962
1882
  RefAttributes<HTMLSelectElement>
1963
1883
  >
1964
1884
 
1965
1885
  /**
1966
1886
  * @public
1887
+ * @deprecated Use `ThemeColorStateToneKey` instead
1967
1888
  */
1968
1889
  export declare type SelectableTone = ThemeColorStateToneKey
1969
1890
 
1970
1891
  /**
1971
1892
  * @public
1972
1893
  */
1973
- export declare interface SelectProps {
1974
- fontSize?: number | number[]
1975
- padding?: number | number[]
1976
- radius?: Radius | Radius[]
1977
- space?: number | number[]
1894
+ export declare interface SelectProps extends SelectStyleProps {
1978
1895
  customValidity?: string
1896
+ readOnly?: boolean
1897
+ /** @deprecated Use `gap` instead. */
1898
+ space?: ResponsiveProp<Space>
1979
1899
  }
1980
1900
 
1981
1901
  /**
@@ -1983,10 +1903,8 @@ export declare interface SelectProps {
1983
1903
  * @beta
1984
1904
  */
1985
1905
  export declare const Skeleton: ForwardRefExoticComponent<
1986
- Omit<
1987
- SkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width' | 'wrap' | 'as' | 'rows'>,
1988
- 'ref'
1989
- > &
1906
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof SkeletonProps> &
1907
+ SkeletonProps &
1990
1908
  RefAttributes<HTMLDivElement>
1991
1909
  >
1992
1910
 
@@ -2005,7 +1923,8 @@ export declare interface SkeletonProps extends SkeletonStyleProps, Omit<BoxProps
2005
1923
  * @public
2006
1924
  */
2007
1925
  export declare const Spinner: ForwardRefExoticComponent<
2008
- Omit<SpinnerProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
1926
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof SpinnerProps> &
1927
+ SpinnerProps &
2009
1928
  RefAttributes<HTMLDivElement>
2010
1929
  >
2011
1930
 
@@ -2021,7 +1940,8 @@ export declare interface SpinnerProps {
2021
1940
  * @public
2022
1941
  */
2023
1942
  export declare const SrOnly: ForwardRefExoticComponent<
2024
- Omit<SrOnlyProps & Omit<HTMLProps<HTMLDivElement>, 'aria-hidden' | 'as'>, 'ref'> &
1943
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'children'> &
1944
+ SrOnlyProps &
2025
1945
  RefAttributes<HTMLDivElement>
2026
1946
  >
2027
1947
 
@@ -2029,8 +1949,7 @@ export declare const SrOnly: ForwardRefExoticComponent<
2029
1949
  * @public
2030
1950
  */
2031
1951
  export declare interface SrOnlyProps {
2032
- as?: React.ElementType | keyof JSX.IntrinsicElements
2033
- children?: React.ReactNode
1952
+ children?: ReactNode
2034
1953
  }
2035
1954
 
2036
1955
  /**
@@ -2039,8 +1958,8 @@ export declare interface SrOnlyProps {
2039
1958
  * @public
2040
1959
  */
2041
1960
  export declare const Stack: ForwardRefExoticComponent<
2042
- StackProps &
2043
- Omit<HTMLProps<HTMLDivElement>, 'width' | 'ref' | 'as'> &
1961
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof StackProps> &
1962
+ StackProps &
2044
1963
  RefAttributes<HTMLDivElement>
2045
1964
  >
2046
1965
 
@@ -2048,8 +1967,8 @@ export declare const Stack: ForwardRefExoticComponent<
2048
1967
  * @public
2049
1968
  */
2050
1969
  export declare interface StackProps
2051
- extends Omit<BoxProps, 'direction' | 'display' | 'gap' | 'gapX' | 'gapY'> {
2052
- as?: React.ElementType | keyof JSX.IntrinsicElements
1970
+ extends Omit<BoxProps, 'direction' | 'display' | 'gapX' | 'gapY'> {
1971
+ /** @deprecated Use `gap` instead. */
2053
1972
  space?: ResponsiveProp<Space>
2054
1973
  }
2055
1974
 
@@ -2057,7 +1976,7 @@ export declare interface StackProps
2057
1976
  * @public
2058
1977
  * @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
2059
1978
  */
2060
- export declare const studioTheme: BaseTheme_2
1979
+ export declare const studioTheme: RootTheme_2
2061
1980
 
2062
1981
  /**
2063
1982
  * @public
@@ -2065,6 +1984,8 @@ export declare const studioTheme: BaseTheme_2
2065
1984
  */
2066
1985
  export declare type Styles = ThemeStyles
2067
1986
 
1987
+ export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
1988
+
2068
1989
  /**
2069
1990
  * The `Switch` component allows the user to toggle a setting on and off.
2070
1991
  *
@@ -2073,7 +1994,8 @@ export declare type Styles = ThemeStyles
2073
1994
  * @public
2074
1995
  */
2075
1996
  export declare const Switch: ForwardRefExoticComponent<
2076
- Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & SwitchProps, 'ref'> &
1997
+ Omit<ElementProps_2<'input'> & PolymorphicProps_2, 'indeterminate'> &
1998
+ SwitchProps &
2077
1999
  RefAttributes<HTMLInputElement>
2078
2000
  >
2079
2001
 
@@ -2088,14 +2010,8 @@ export declare interface SwitchProps {
2088
2010
  * @public
2089
2011
  */
2090
2012
  export declare const Tab: ForwardRefExoticComponent<
2091
- Omit<
2013
+ Omit<ElementProps_2<'button'> & PolymorphicProps_2, keyof TabProps> &
2092
2014
  TabProps &
2093
- Omit<
2094
- HTMLProps<HTMLButtonElement>,
2095
- 'label' | 'id' | 'type' | 'width' | 'aria-controls' | 'as'
2096
- >,
2097
- 'ref'
2098
- > &
2099
2015
  RefAttributes<HTMLButtonElement>
2100
2016
  >
2101
2017
 
@@ -2103,25 +2019,33 @@ export declare const Tab: ForwardRefExoticComponent<
2103
2019
  * @public
2104
2020
  */
2105
2021
  export declare const TabList: ForwardRefExoticComponent<
2106
- Omit<TabListProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
2022
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabListProps> &
2023
+ TabListProps &
2107
2024
  RefAttributes<HTMLDivElement>
2108
2025
  >
2109
2026
 
2027
+ /**
2028
+ * @public
2029
+ */
2030
+ export declare type TabListChild =
2031
+ | ReactElement<Props<TabProps, 'button'>>
2032
+ | null
2033
+ | undefined
2034
+ | false
2035
+
2110
2036
  /**
2111
2037
  * @public
2112
2038
  */
2113
2039
  export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'> {
2114
- children: Array<React.ReactElement | null | undefined | false>
2040
+ children: TabListChild[]
2115
2041
  }
2116
2042
 
2117
2043
  /**
2118
2044
  * @public
2119
2045
  */
2120
2046
  export declare const TabPanel: ForwardRefExoticComponent<
2121
- Omit<
2122
- TabPanelProps & Omit<HTMLProps<HTMLDivElement>, 'id' | 'role' | 'aria-labelledby' | 'as'>,
2123
- 'ref'
2124
- > &
2047
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabPanelProps> &
2048
+ TabPanelProps &
2125
2049
  RefAttributes<HTMLDivElement>
2126
2050
  >
2127
2051
 
@@ -2141,15 +2065,15 @@ export declare interface TabPanelProps extends BoxProps {
2141
2065
  */
2142
2066
  export declare interface TabProps {
2143
2067
  /**
2144
- * The `id` of the correlating `TabPanel` component.
2068
+ * The `id` of the corresponding `TabPanel` component.
2145
2069
  */
2146
2070
  'aria-controls': string
2147
2071
  'id': string
2148
- 'icon'?: React.ElementType | React.ReactNode
2072
+ 'icon'?: ElementType | ReactNode
2149
2073
  'focused'?: boolean
2150
2074
  'fontSize'?: ResponsiveProp<FontTextSize>
2151
- 'label'?: React.ReactNode
2152
- 'padding'?: number | number[]
2075
+ 'label'?: ReactNode
2076
+ 'padding'?: ResponsiveProp<Space>
2153
2077
  'selected'?: boolean
2154
2078
  'tone'?: ButtonTone
2155
2079
  }
@@ -2160,7 +2084,8 @@ export declare interface TabProps {
2160
2084
  * @public
2161
2085
  */
2162
2086
  declare const Text_2: ForwardRefExoticComponent<
2163
- Omit<TextProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
2087
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TextProps> &
2088
+ TextProps &
2164
2089
  RefAttributes<HTMLDivElement>
2165
2090
  >
2166
2091
  export {Text_2 as Text}
@@ -2170,26 +2095,25 @@ export {TextAlign}
2170
2095
  /**
2171
2096
  * A multiline text input.
2172
2097
  *
2173
-
2174
2098
  * @public
2175
2099
  */
2176
2100
  export declare const TextArea: ForwardRefExoticComponent<
2177
- Omit<TextAreaProps & Omit<HTMLProps<HTMLTextAreaElement>, 'as'>, 'ref'> &
2101
+ Omit<ElementProps_2<'textarea'> & PolymorphicProps_2, keyof TextAreaProps> &
2102
+ TextAreaProps &
2178
2103
  RefAttributes<HTMLTextAreaElement>
2179
2104
  >
2180
2105
 
2181
2106
  /**
2182
2107
  * @public
2183
2108
  */
2184
- export declare interface TextAreaProps extends ResponsiveRadiusProps {
2109
+ export declare interface TextAreaProps extends TextAreaStyleProps {
2185
2110
  /**
2186
2111
  * @beta
2187
2112
  */
2188
2113
  __unstable_disableFocusRing?: boolean
2189
- border?: boolean
2190
2114
  customValidity?: string
2191
- fontSize?: number | number[]
2192
- padding?: number | number[]
2115
+ /** @deprecated Use `gap` instead. */
2116
+ space?: ResponsiveProp<Space>
2193
2117
  weight?: ThemeFontWeightKey_2
2194
2118
  }
2195
2119
 
@@ -2199,41 +2123,42 @@ export declare interface TextAreaProps extends ResponsiveRadiusProps {
2199
2123
  * @public
2200
2124
  */
2201
2125
  export declare const TextInput: ForwardRefExoticComponent<
2202
- Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | 'as' | 'prefix'>, 'ref'> &
2126
+ Omit<ElementProps_2<'input'> & PolymorphicProps_2, keyof TextInputProps> &
2127
+ TextInputProps &
2203
2128
  RefAttributes<HTMLInputElement>
2204
2129
  >
2205
2130
 
2206
2131
  /**
2207
2132
  * @public
2208
2133
  */
2209
- export declare type TextInputClearButtonProps = Omit<ButtonProps, 'as'> &
2210
- Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>
2134
+ export declare type TextInputClearButtonProps = Omit<
2135
+ Props<ButtonProps, 'button'>,
2136
+ 'as' | 'onClick' | 'onMouseDown'
2137
+ >
2211
2138
 
2212
2139
  /**
2213
2140
  * @public
2214
2141
  */
2215
- export declare interface TextInputProps extends RadiusStyleProps {
2142
+ export declare interface TextInputProps extends InputStyleProps {
2216
2143
  /**
2217
2144
  * @beta
2218
2145
  */
2219
2146
  __unstable_disableFocusRing?: boolean
2220
- border?: boolean
2221
2147
  /**
2222
2148
  * @beta
2223
2149
  */
2224
2150
  clearButton?: boolean | TextInputClearButtonProps
2225
2151
  customValidity?: string
2226
- fontSize?: ResponsiveProp<FontTextSize>
2227
- icon?: React.ElementType | React.ReactNode
2228
- iconRight?: React.ElementType | React.ReactNode
2152
+ icon?: ElementType | ReactNode
2153
+ iconRight?: ElementType | ReactNode
2229
2154
  /**
2230
2155
  * @beta
2231
2156
  */
2232
2157
  onClear?: () => void
2233
- padding?: ResponsiveProp<Space>
2234
- prefix?: React.ReactNode
2158
+ prefix?: ReactNode
2159
+ /** @deprecated Use `gap` instead. */
2235
2160
  space?: ResponsiveProp<Space>
2236
- suffix?: React.ReactNode
2161
+ suffix?: ReactNode
2237
2162
  type?: TextInputType
2238
2163
  weight?: ThemeFontWeightKey_2
2239
2164
  }
@@ -2242,6 +2167,7 @@ export declare interface TextInputProps extends RadiusStyleProps {
2242
2167
  * @public
2243
2168
  */
2244
2169
  export declare type TextInputType =
2170
+ | 'search'
2245
2171
  | 'date'
2246
2172
  | 'datetime-local'
2247
2173
  | 'email'
@@ -2258,18 +2184,8 @@ export declare type TextInputType =
2258
2184
  /**
2259
2185
  * @public
2260
2186
  */
2261
- export declare interface TextProps extends TextStyleProps {
2262
- accent?: boolean
2263
- as?: React.ElementType | keyof JSX.IntrinsicElements
2264
- /** When `true` the text color will be muted. */
2265
- muted?: boolean
2266
- /**
2267
- * Controls how overflowing text is treated.
2268
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
2269
- * @beta
2270
- */
2271
- textOverflow?: 'ellipsis' | 'none'
2272
- weight?: ThemeFontWeightKey_2
2187
+ export declare interface TextProps extends TextStyleProps, TextOverflowStyleProps {
2188
+ htmlFor?: string
2273
2189
  }
2274
2190
 
2275
2191
  /**
@@ -2277,14 +2193,8 @@ export declare interface TextProps extends TextStyleProps {
2277
2193
  * @beta
2278
2194
  */
2279
2195
  export declare const TextSkeleton: ForwardRefExoticComponent<
2280
- Omit<
2196
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TextSkeletonProps> &
2281
2197
  TextSkeletonProps &
2282
- Omit<
2283
- HTMLProps<HTMLDivElement>,
2284
- 'height' | 'width' | 'size' | 'wrap' | 'children' | 'as' | 'rows'
2285
- >,
2286
- 'ref'
2287
- > &
2288
2198
  RefAttributes<HTMLDivElement>
2289
2199
  >
2290
2200
 
@@ -2345,7 +2255,7 @@ export {ThemeColorName}
2345
2255
  /**
2346
2256
  * @public
2347
2257
  */
2348
- export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.ReactElement
2258
+ export declare function ThemeColorProvider(props: ThemeColorProviderProps): ReactElement
2349
2259
 
2350
2260
  export declare namespace ThemeColorProvider {
2351
2261
  var displayName: string
@@ -2355,7 +2265,7 @@ export declare namespace ThemeColorProvider {
2355
2265
  * @public
2356
2266
  */
2357
2267
  export declare interface ThemeColorProviderProps {
2358
- children?: React.ReactNode
2268
+ children?: ReactNode
2359
2269
  scheme?: ThemeColorSchemeKey_2
2360
2270
  tone?: ThemeColorCardToneKey
2361
2271
  }
@@ -2447,17 +2357,10 @@ export {ThemeInput}
2447
2357
  */
2448
2358
  export declare type ThemeLayer = ThemeLayer_2
2449
2359
 
2450
- /**
2451
- * @internal
2452
- */
2453
- export declare interface ThemeProps {
2454
- theme: Theme_2
2455
- }
2456
-
2457
2360
  /**
2458
2361
  * @public
2459
2362
  */
2460
- export declare function ThemeProvider(props: ThemeProviderProps): React.ReactElement
2363
+ export declare function ThemeProvider(props: ThemeProviderProps): ReactElement
2461
2364
 
2462
2365
  export declare namespace ThemeProvider {
2463
2366
  var displayName: string
@@ -2467,7 +2370,7 @@ export declare namespace ThemeProvider {
2467
2370
  * @public
2468
2371
  */
2469
2372
  export declare interface ThemeProviderProps {
2470
- children?: React.ReactNode
2373
+ children?: ReactNode
2471
2374
  scheme?: ThemeColorSchemeKey_2
2472
2375
  theme?: RootTheme_2
2473
2376
  tone?: ThemeColorCardToneKey
@@ -2487,12 +2390,11 @@ export declare type ThemeShadow = ThemeShadow_2
2487
2390
  * @public
2488
2391
  */
2489
2392
  export declare function Toast(
2490
- props: ToastProps &
2491
- Omit<
2492
- React.HTMLProps<HTMLDivElement>,
2493
- 'as' | 'height' | 'ref' | 'rows' | 'title' | 'width' | 'wrap'
2494
- >,
2495
- ): React.ReactElement
2393
+ props: Omit<
2394
+ Props<ToastProps, 'div'>,
2395
+ 'onDrag' | 'onDragEnd' | 'onDragStart' | 'onAnimationStart'
2396
+ >,
2397
+ ): ReactElement
2496
2398
 
2497
2399
  export declare namespace Toast {
2498
2400
  var displayName: string
@@ -2503,19 +2405,32 @@ export declare namespace Toast {
2503
2405
  */
2504
2406
  export declare interface ToastContextValue {
2505
2407
  version: 0.0
2408
+ /**
2409
+ * Creates or updates a toast notification.
2410
+ * If a toast with the same ID already exists, it will be updated.
2411
+ * If an ID is not provided, a random one will be generated.
2412
+ * The returned ID can be used to programatically update a toast.
2413
+ */
2506
2414
  push: (params: ToastParams) => string
2507
2415
  }
2508
2416
 
2417
+ /**
2418
+ * @public
2419
+ */
2420
+ declare interface ToastLayerProps extends GapStyleProps, PaddingStyleProps {
2421
+ children: ReactNode
2422
+ }
2423
+
2509
2424
  /**
2510
2425
  * @public
2511
2426
  */
2512
2427
  export declare interface ToastParams {
2513
2428
  closable?: boolean
2514
- description?: React.ReactNode
2429
+ description?: ReactNode
2515
2430
  duration?: number
2516
2431
  id?: string
2517
2432
  onClose?: () => void
2518
- title?: React.ReactNode
2433
+ title?: ReactNode
2519
2434
  status?: 'error' | 'warning' | 'success' | 'info'
2520
2435
  }
2521
2436
 
@@ -2524,17 +2439,18 @@ export declare interface ToastParams {
2524
2439
  */
2525
2440
  export declare interface ToastProps extends RadiusStyleProps {
2526
2441
  closable?: boolean
2527
- description?: React.ReactNode
2442
+ description?: ReactNode
2528
2443
  onClose?: () => void
2529
- title?: React.ReactNode
2444
+ title?: ReactNode
2530
2445
  status?: 'error' | 'warning' | 'success' | 'info'
2531
2446
  duration?: number
2447
+ updatedAt?: number
2532
2448
  }
2533
2449
 
2534
2450
  /**
2535
2451
  * @public
2536
2452
  */
2537
- export declare function ToastProvider(props: ToastProviderProps): React.ReactElement
2453
+ export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
2538
2454
 
2539
2455
  export declare namespace ToastProvider {
2540
2456
  var displayName: string
@@ -2543,11 +2459,8 @@ export declare namespace ToastProvider {
2543
2459
  /**
2544
2460
  * @public
2545
2461
  */
2546
- export declare interface ToastProviderProps {
2462
+ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
2547
2463
  children?: React.ReactNode
2548
- padding?: number | number[]
2549
- paddingX?: number | number[]
2550
- paddingY?: number | number[]
2551
2464
  zOffset?: number | number[]
2552
2465
  }
2553
2466
 
@@ -2557,11 +2470,8 @@ export declare interface ToastProviderProps {
2557
2470
  * @public
2558
2471
  */
2559
2472
  export declare const Tooltip: ForwardRefExoticComponent<
2560
- Omit<
2473
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TooltipProps> &
2561
2474
  TooltipProps &
2562
- Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'wrap' | 'children' | 'as'>,
2563
- 'ref'
2564
- > &
2565
2475
  RefAttributes<HTMLDivElement>
2566
2476
  >
2567
2477
 
@@ -2574,7 +2484,6 @@ export declare const TooltipDelayGroupContext: Context<TooltipDelayGroupContextV
2574
2484
  * @beta
2575
2485
  */
2576
2486
  export declare interface TooltipDelayGroupContextValue {
2577
- isGroupActive: boolean
2578
2487
  setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void
2579
2488
  setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void
2580
2489
  openDelay: number
@@ -2589,7 +2498,7 @@ export declare interface TooltipDelayGroupContextValue {
2589
2498
  */
2590
2499
  export declare function TooltipDelayGroupProvider(
2591
2500
  props: TooltipDelayGroupProviderProps,
2592
- ): React.ReactElement
2501
+ ): ReactElement
2593
2502
 
2594
2503
  export declare namespace TooltipDelayGroupProvider {
2595
2504
  var displayName: string
@@ -2599,7 +2508,7 @@ export declare namespace TooltipDelayGroupProvider {
2599
2508
  * @public
2600
2509
  * */
2601
2510
  export declare interface TooltipDelayGroupProviderProps {
2602
- children?: React.ReactNode
2511
+ children?: ReactNode
2603
2512
  /**
2604
2513
  * Handles the delays to open or close a tooltip inside a group
2605
2514
  *
@@ -2615,21 +2524,23 @@ export declare interface TooltipDelayGroupProviderProps {
2615
2524
  /**
2616
2525
  * @public
2617
2526
  */
2618
- export declare interface TooltipProps extends Omit<LayerProps, 'as'>, RadiusStyleProps {
2527
+ export declare interface TooltipProps
2528
+ extends Omit<LayerProps, 'as'>,
2529
+ RadiusStyleProps,
2530
+ ShadowStyleProps {
2619
2531
  /** @deprecated Use `fallbackPlacements` instead. */
2620
2532
  allowedAutoPlacements?: Placement[]
2533
+ /**
2534
+ * Whether the tooltip should animate in and out.
2535
+ *
2536
+ * @beta
2537
+ * @defaultValue false
2538
+ */
2539
+ animate?: boolean
2621
2540
  arrow?: boolean
2622
2541
  boundaryElement?: HTMLElement | null
2623
- children?: React.ReactElement
2624
- content?: React.ReactNode
2625
- disabled?: boolean
2626
- fallbackPlacements?: Placement[]
2627
- padding?: number | number[]
2628
- placement?: Placement
2629
- /** Whether or not to render the tooltip in a portal element. */
2630
- portal?: boolean | string
2631
- scheme?: ThemeColorSchemeKey_2
2632
- shadow?: number | number[]
2542
+ children?: ReactElement<Props>
2543
+ content?: ReactNode
2633
2544
  /**
2634
2545
  * Adds a delay to open or close the tooltip.
2635
2546
  *
@@ -2641,28 +2552,23 @@ export declare interface TooltipProps extends Omit<LayerProps, 'as'>, RadiusStyl
2641
2552
  * @defaultValue 0
2642
2553
  */
2643
2554
  delay?: Delay
2644
- /**
2645
- * Whether the tooltip should animate in and out.
2646
- *
2647
- * @beta
2648
- * @defaultValue false
2649
- */
2650
- animate?: boolean
2555
+ disabled?: boolean
2556
+ fallbackPlacements?: Placement[]
2557
+ placement?: Placement
2558
+ /** Whether or not to render the tooltip in a portal element. */
2559
+ portal?: boolean | string
2560
+ scheme?: ThemeColorSchemeKey_2
2561
+ tone?: ThemeColorCardToneKey
2651
2562
  }
2652
2563
 
2653
2564
  /**
2654
2565
  * This API might change. DO NOT USE IN PRODUCTION.
2655
2566
  * @beta
2656
2567
  */
2657
- export declare const Tree: MemoExoticComponent<
2658
- ForwardRefExoticComponent<
2568
+ export declare const Tree: NamedExoticComponent<
2569
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TreeProps> &
2659
2570
  TreeProps &
2660
- Omit<
2661
- HTMLProps<HTMLDivElement>,
2662
- 'height' | 'width' | 'wrap' | 'role' | 'ref' | 'as' | 'rows' | 'align'
2663
- > &
2664
- RefAttributes<HTMLDivElement>
2665
- >
2571
+ RefAttributes<HTMLDivElement>
2666
2572
  >
2667
2573
 
2668
2574
  /**
@@ -2684,25 +2590,22 @@ export declare interface TreeContextValue {
2684
2590
  * This API might change. DO NOT USE IN PRODUCTION.
2685
2591
  * @beta
2686
2592
  */
2687
- export declare const TreeItem: NamedExoticComponent<
2688
- TreeItemProps &
2689
- Omit<HTMLProps<HTMLDivElement>, 'height' | 'width' | 'wrap' | 'role' | 'ref' | 'as' | 'rows'>
2690
- >
2593
+ export declare const TreeItem: NamedExoticComponent<Omit<Props<TreeItemProps, 'div'>, 'as'>>
2691
2594
 
2692
2595
  /**
2693
2596
  * @beta
2694
2597
  */
2695
- export declare interface TreeItemProps {
2598
+ export declare interface TreeItemProps extends CardProps {
2696
2599
  expanded?: boolean
2697
- fontSize?: number | number[]
2698
- icon?: React.ElementType
2600
+ fontSize?: ResponsiveProp<FontTextSize>
2601
+ icon?: ElementType
2699
2602
  /**
2700
2603
  * Allows passing a custom element type to the link component
2701
2604
  */
2702
- linkAs?: BoxProps['as']
2703
- padding?: number | number[]
2605
+ linkAs?: ElementType
2606
+ padding?: ResponsiveProp<Space>
2704
2607
  space?: ResponsiveProp<Space>
2705
- text?: React.ReactNode
2608
+ text?: ReactNode
2706
2609
  weight?: ThemeFontWeightKey_2
2707
2610
  }
2708
2611
 
@@ -2710,7 +2613,8 @@ export declare interface TreeItemProps {
2710
2613
  * This API might change. DO NOT USE IN PRODUCTION.
2711
2614
  * @beta
2712
2615
  */
2713
- export declare interface TreeProps {
2616
+ export declare interface TreeProps extends Pick<GapStyleProps, 'gap'> {
2617
+ /** @deprecated Use `gap` instead. */
2714
2618
  space?: ResponsiveProp<Space>
2715
2619
  }
2716
2620
 
@@ -2726,14 +2630,12 @@ export declare interface TreeState {
2726
2630
  | undefined
2727
2631
  }
2728
2632
 
2633
+ /** @beta */
2729
2634
  /**
2730
2635
  * This API might change. DO NOT USE IN PRODUCTION.
2731
2636
  * @beta
2732
2637
  */
2733
- export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
2734
- val: T | T[] | undefined,
2735
- defaultVal?: T[],
2736
- ): T[]
2638
+ export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
2737
2639
 
2738
2640
  /**
2739
2641
  * @public
@@ -2812,9 +2714,7 @@ export declare function useElementSize(element: HTMLElement | null): ElementSize
2812
2714
  * +useImperativeHandle(forwardedRef, () => ref.current)
2813
2715
  * ```
2814
2716
  */
2815
- export declare function useForwardedRef<T>(
2816
- ref: React.ForwardedRef<T>,
2817
- ): React.MutableRefObject<T | null>
2717
+ export declare function useForwardedRef<T>(ref: ForwardedRef<T>): MutableRefObject<T | null>
2818
2718
 
2819
2719
  /**
2820
2720
  * @beta
@@ -2829,7 +2729,7 @@ export declare function useLayer(): LayerContextValue
2829
2729
  /**
2830
2730
  * Efficiently subscribes to `window.matchMedia` queries
2831
2731
  *
2832
- * @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)
2732
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
2833
2733
  *
2834
2734
  * @public
2835
2735
  */
@@ -2852,7 +2752,7 @@ export declare function usePortal(): PortalContextValue
2852
2752
  /**
2853
2753
  * Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
2854
2754
  *
2855
- * @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)
2755
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
2856
2756
  *
2857
2757
  * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
2858
2758
  * 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
@@ -2865,7 +2765,7 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
2865
2765
  /**
2866
2766
  * Returns true if motion should be reduced
2867
2767
  *
2868
- * @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)
2768
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
2869
2769
  *
2870
2770
  * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
2871
2771
  * 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
@@ -2909,9 +2809,8 @@ export declare function useTree(): TreeContextValue
2909
2809
  * @beta
2910
2810
  */
2911
2811
  export declare const VirtualList: ForwardRefExoticComponent<
2912
- VirtualListProps<any> &
2913
- StackProps &
2914
- Omit<HTMLProps<HTMLDivElement>, 'children' | 'onChange' | 'ref' | 'as'> &
2812
+ Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof VirtualListProps<any>> &
2813
+ VirtualListProps<any> &
2915
2814
  RefAttributes<HTMLDivElement>
2916
2815
  >
2917
2816
 
@@ -2930,13 +2829,12 @@ export declare interface VirtualListChangeOpts {
2930
2829
  /**
2931
2830
  * @beta
2932
2831
  */
2933
- export declare interface VirtualListProps<Item = any> {
2934
- as?: React.ElementType | keyof JSX.IntrinsicElements
2832
+ export declare interface VirtualListProps<Item = any> extends Omit<StackProps, 'gap'> {
2935
2833
  gap?: number
2936
2834
  getItemKey?: (item: Item, itemIndex: number) => string
2937
2835
  items?: Item[]
2938
2836
  onChange?: (opts: VirtualListChangeOpts) => void
2939
- renderItem?: (item: Item) => React.ReactNode
2837
+ renderItem?: (item: Item) => ReactNode
2940
2838
  }
2941
2839
 
2942
2840
  export {}