@sanity/ui 3.0.0-static.3 → 3.0.0-static.30

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 (1353) hide show
  1. package/README.md +7 -9
  2. package/dist/_chunks-cjs/_visual-editing.cjs +2358 -0
  3. package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -0
  4. package/dist/_chunks-cjs/refractor.cjs +26 -0
  5. package/dist/_chunks-cjs/refractor.cjs.map +1 -0
  6. package/dist/_chunks-es/_visual-editing.js +2371 -0
  7. package/dist/_chunks-es/_visual-editing.js.map +1 -0
  8. package/dist/_chunks-es/refractor.js +25 -0
  9. package/dist/_chunks-es/refractor.js.map +1 -0
  10. package/dist/_visual-editing.cjs +30 -0
  11. package/dist/_visual-editing.cjs.map +1 -0
  12. package/dist/_visual-editing.d.cts +894 -0
  13. package/dist/_visual-editing.d.ts +504 -418
  14. package/dist/_visual-editing.js +29 -30
  15. package/dist/_visual-editing.js.map +1 -1
  16. package/dist/css/index.cjs +617 -0
  17. package/dist/css/index.cjs.map +1 -0
  18. package/dist/css/index.css +1 -0
  19. package/dist/css/index.d.cts +14902 -0
  20. package/dist/css/index.d.ts +14902 -0
  21. package/dist/css/index.js +617 -0
  22. package/dist/css/index.js.map +1 -0
  23. package/dist/css/layers.css +4 -0
  24. package/dist/css/primitives/popover/popover.css +4 -0
  25. package/dist/index.cjs +2470 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/index.d.cts +3212 -0
  28. package/dist/index.d.ts +1325 -982
  29. package/dist/index.js +1614 -692
  30. package/dist/index.js.map +1 -1
  31. package/dist/theme.cjs +4791 -0
  32. package/dist/theme.cjs.map +1 -0
  33. package/dist/theme.d.cts +1903 -0
  34. package/dist/theme.d.ts +329 -309
  35. package/dist/theme.js +3188 -1384
  36. package/dist/theme.js.map +1 -1
  37. package/exports/_visual-editing.ts +26 -27
  38. package/exports/index.ts +1 -1
  39. package/package.json +67 -79
  40. package/src/core/_compat/helpers.ts +72 -0
  41. package/src/core/_compat/styles/_responsive.ts +19 -0
  42. package/src/core/_compat/theme/theme.test.tsx +72 -0
  43. package/src/core/_compat/theme/themeColorProvider.tsx +24 -0
  44. package/src/core/_compat/theme/themeContext.ts +10 -0
  45. package/src/core/_compat/theme/themeProvider.tsx +68 -0
  46. package/src/core/_compat/theme/types.ts +10 -0
  47. package/src/core/_compat/theme/useRootTheme.ts +15 -0
  48. package/src/core/_compat/theme/useTheme.ts +12 -0
  49. package/src/core/_compat/types.ts +191 -0
  50. package/src/core/components/autocomplete/__workshop__/async.tsx +156 -0
  51. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +131 -0
  52. package/src/core/components/autocomplete/__workshop__/custom.tsx +91 -0
  53. package/src/core/components/autocomplete/__workshop__/example.tsx +80 -0
  54. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +36 -0
  55. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +292 -0
  56. package/src/core/components/autocomplete/__workshop__/index.ts +39 -0
  57. package/src/core/components/autocomplete/autocomplete.tsx +690 -0
  58. package/src/core/components/autocomplete/autocompleteOption.tsx +45 -0
  59. package/src/core/components/autocomplete/autocompleteReducer.ts +47 -0
  60. package/src/core/components/autocomplete/constants.ts +28 -0
  61. package/src/core/components/autocomplete/types.ts +103 -0
  62. package/src/core/components/breadcrumbs/__workshop__/example.tsx +61 -0
  63. package/src/core/components/breadcrumbs/breadcrumbs.tsx +136 -0
  64. package/src/core/components/dialog/__workshop__/activate.tsx +141 -0
  65. package/src/core/components/dialog/__workshop__/autoFocus.tsx +29 -0
  66. package/src/core/components/dialog/__workshop__/onScroll.tsx +51 -0
  67. package/src/core/components/dialog/__workshop__/panes.tsx +89 -0
  68. package/src/core/components/dialog/__workshop__/position.tsx +30 -0
  69. package/src/core/components/dialog/__workshop__/props.tsx +77 -0
  70. package/src/core/components/dialog/__workshop__/wrapped.tsx +76 -0
  71. package/src/core/components/dialog/dialog.tsx +233 -0
  72. package/src/core/components/dialog/dialogCard.tsx +226 -0
  73. package/src/core/components/dialog/dialogContext.ts +22 -0
  74. package/src/core/components/dialog/dialogProvider.tsx +34 -0
  75. package/src/core/components/dialog/isTargetWithinScope.ts +14 -0
  76. package/src/core/components/dialog/types.ts +2 -0
  77. package/src/core/components/dialog/useDialog.ts +11 -0
  78. package/src/core/components/hotkeys/hotkeys.tsx +71 -0
  79. package/src/core/components/menu/__workshop__/asComponent.tsx +45 -0
  80. package/src/core/components/menu/__workshop__/avatarMenu.tsx +57 -0
  81. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +47 -0
  82. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +133 -0
  83. package/src/core/components/menu/__workshop__/customMenuItem.tsx +45 -0
  84. package/src/core/components/menu/__workshop__/customSelectedState.tsx +35 -0
  85. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +40 -0
  86. package/src/core/components/menu/__workshop__/groups.tsx +156 -0
  87. package/src/core/components/menu/__workshop__/menuButton.tsx +80 -0
  88. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +65 -0
  89. package/src/core/components/menu/__workshop__/nestedMenu.tsx +22 -0
  90. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +50 -0
  91. package/src/core/components/menu/__workshop__/selectedItem.tsx +69 -0
  92. package/src/core/components/menu/__workshop__/shouldFocus.tsx +42 -0
  93. package/src/core/components/menu/__workshop__/tones.tsx +25 -0
  94. package/src/core/components/menu/__workshop__/withoutArrow.tsx +32 -0
  95. package/src/core/components/menu/helpers.ts +82 -0
  96. package/src/core/components/menu/menu.test.tsx +127 -0
  97. package/src/core/components/menu/menu.tsx +194 -0
  98. package/src/core/components/menu/menuButton.tsx +271 -0
  99. package/src/core/components/menu/menuContext.ts +31 -0
  100. package/src/core/components/menu/menuDivider.tsx +32 -0
  101. package/src/core/components/menu/menuGroup.tsx +238 -0
  102. package/src/core/components/menu/menuItem.tsx +194 -0
  103. package/src/core/components/menu/useMenu.ts +21 -0
  104. package/src/core/components/menu/useMenuController.ts +241 -0
  105. package/src/core/components/tab/__workshop__/example.tsx +79 -0
  106. package/src/core/components/tab/tab.tsx +107 -0
  107. package/src/core/components/tab/tabList.tsx +95 -0
  108. package/src/core/components/tab/tabPanel.tsx +47 -0
  109. package/src/core/components/toast/__workshop__/hook.tsx +71 -0
  110. package/src/core/components/toast/__workshop__/toast.tsx +26 -0
  111. package/src/core/components/toast/toast.test.tsx +101 -0
  112. package/src/core/components/toast/toast.tsx +189 -0
  113. package/src/core/components/toast/toastContext.ts +7 -0
  114. package/src/core/components/toast/toastLayer.tsx +54 -0
  115. package/src/core/components/toast/toastProvider.tsx +112 -0
  116. package/src/core/components/toast/types.ts +24 -0
  117. package/src/core/components/toast/useToast.ts +23 -0
  118. package/src/core/components/tree/__workshop__/basic.perf.ts +19 -0
  119. package/src/core/components/tree/__workshop__/basic.tsx +105 -0
  120. package/src/core/components/tree/__workshop__/tabFromElement.tsx +84 -0
  121. package/src/core/components/tree/helpers.ts +105 -0
  122. package/src/core/components/tree/tree.tsx +249 -0
  123. package/src/core/components/tree/treeContext.ts +10 -0
  124. package/src/core/components/tree/treeGroup.tsx +48 -0
  125. package/src/core/components/tree/treeItem.tsx +237 -0
  126. package/src/core/components/tree/types.ts +24 -0
  127. package/src/core/components/tree/useTree.ts +17 -0
  128. package/src/core/components/virtualList/__workshop__/index.ts +29 -0
  129. package/src/core/components/virtualList/__workshop__/infiniteList.tsx +48 -0
  130. package/src/core/components/virtualList/virtualList.tsx +209 -0
  131. package/src/core/constants.ts +85 -0
  132. package/src/core/helpers/focus.ts +92 -0
  133. package/src/core/helpers/props.ts +28 -0
  134. package/src/core/hooks/useArrayProp.ts +26 -0
  135. package/src/core/hooks/useClickOutside.test.tsx +481 -0
  136. package/src/core/hooks/useClickOutside.ts +113 -0
  137. package/src/core/hooks/useClickOutsideEvent.test.tsx +114 -0
  138. package/src/core/hooks/useClickOutsideEvent.ts +67 -0
  139. package/src/core/hooks/useDelayed.test.ts +67 -0
  140. package/src/core/hooks/useDelayedState.ts +28 -0
  141. package/src/core/hooks/useElementRect/__workshop__/example.tsx +30 -0
  142. package/src/core/hooks/useElementSize.ts +19 -0
  143. package/src/core/hooks/useForwardedRef.ts +19 -0
  144. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +14 -0
  145. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +21 -0
  146. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +102 -0
  147. package/src/core/hooks/usePrefersDark.hydration.test.tsx +56 -0
  148. package/src/core/hooks/usePrefersDark.test.tsx +20 -0
  149. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +56 -0
  150. package/src/core/hooks/usePrefersReducedMotion.test.tsx +20 -0
  151. package/src/core/hooks/useResponsiveProp.ts +28 -0
  152. package/src/core/index.ts +136 -0
  153. package/src/core/lib/isArray.ts +3 -0
  154. package/src/core/middleware/origin.ts +47 -0
  155. package/src/core/observers/elementSize.ts +116 -0
  156. package/src/core/primitives/arrow/arrow.tsx +74 -0
  157. package/src/core/primitives/avatar/__workshop__/asButton.tsx +14 -0
  158. package/src/core/primitives/avatar/__workshop__/stack.tsx +25 -0
  159. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +55 -0
  160. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +72 -0
  161. package/src/core/primitives/avatar/avatar.tsx +154 -0
  162. package/src/core/primitives/avatar/avatarCounter.tsx +69 -0
  163. package/src/core/primitives/avatar/avatarStack.tsx +81 -0
  164. package/src/core/primitives/avatar/types.ts +34 -0
  165. package/src/core/primitives/badge/__workshop__/props.tsx +19 -0
  166. package/src/core/primitives/badge/__workshop__/tones.tsx +16 -0
  167. package/src/core/primitives/badge/badge.test.tsx +15 -0
  168. package/src/core/primitives/badge/badge.tsx +60 -0
  169. package/src/core/primitives/badge/types.ts +18 -0
  170. package/src/core/primitives/box/__workshop__/props.tsx +20 -0
  171. package/src/core/primitives/box/__workshop__/responsive.tsx +20 -0
  172. package/src/core/primitives/box/box.tsx +219 -0
  173. package/src/core/primitives/button/__workshop__/custom.tsx +27 -0
  174. package/src/core/primitives/button/__workshop__/customIcons.tsx +30 -0
  175. package/src/core/primitives/button/__workshop__/disabled.tsx +54 -0
  176. package/src/core/primitives/button/__workshop__/index.ts +64 -0
  177. package/src/core/primitives/button/__workshop__/props.tsx +55 -0
  178. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +36 -0
  179. package/src/core/primitives/button/__workshop__/stacked.tsx +58 -0
  180. package/src/core/primitives/button/__workshop__/textOverflow.tsx +13 -0
  181. package/src/core/primitives/button/__workshop__/uploadButton.tsx +29 -0
  182. package/src/core/primitives/button/button.test.tsx +29 -0
  183. package/src/core/primitives/button/button.tsx +196 -0
  184. package/src/core/primitives/button/types.ts +22 -0
  185. package/src/core/primitives/card/__workshop__/asButton.tsx +107 -0
  186. package/src/core/primitives/card/__workshop__/asComponent.tsx +27 -0
  187. package/src/core/primitives/card/__workshop__/checkered.tsx +26 -0
  188. package/src/core/primitives/card/__workshop__/index.ts +18 -0
  189. package/src/core/primitives/card/__workshop__/interactive.tsx +29 -0
  190. package/src/core/primitives/card/__workshop__/listNavigation.tsx +78 -0
  191. package/src/core/primitives/card/__workshop__/props.tsx +52 -0
  192. package/src/core/primitives/card/__workshop__/selected.tsx +62 -0
  193. package/src/core/primitives/card/__workshop__/tones.tsx +27 -0
  194. package/src/core/primitives/card/card.tsx +106 -0
  195. package/src/core/primitives/card/cardContext.ts +10 -0
  196. package/src/core/primitives/card/cardProvider.tsx +27 -0
  197. package/src/core/primitives/card/types.ts +31 -0
  198. package/src/core/primitives/card/useCard.ts +9 -0
  199. package/src/core/primitives/checkbox/__workshop__/props.tsx +35 -0
  200. package/src/core/primitives/checkbox/__workshop__/tones.tsx +27 -0
  201. package/src/core/primitives/checkbox/checkbox.tsx +80 -0
  202. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +23 -0
  203. package/src/core/primitives/code/__workshop__/props.tsx +18 -0
  204. package/src/core/primitives/code/code.tsx +46 -0
  205. package/src/core/primitives/code/refractor.tsx +18 -0
  206. package/src/core/primitives/container/__workshop__/example.tsx +20 -0
  207. package/src/core/primitives/container/container.tsx +37 -0
  208. package/src/core/primitives/flex/__workshop__/example.tsx +34 -0
  209. package/src/core/primitives/flex/flex.tsx +56 -0
  210. package/src/core/primitives/flex/types.ts +27 -0
  211. package/src/core/primitives/grid/grid.tsx +33 -0
  212. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +54 -0
  213. package/src/core/primitives/heading/__workshop__/plain.tsx +29 -0
  214. package/src/core/primitives/heading/heading.tsx +80 -0
  215. package/src/core/primitives/inline/__workshop__/plain.tsx +24 -0
  216. package/src/core/primitives/inline/inline.tsx +69 -0
  217. package/src/core/primitives/kbd/kbd.tsx +55 -0
  218. package/src/core/primitives/label/__workshop__/plain.tsx +28 -0
  219. package/src/core/primitives/label/label.tsx +77 -0
  220. package/src/core/primitives/layer/__workshop__/index.ts +24 -0
  221. package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +49 -0
  222. package/src/core/primitives/layer/__workshop__/nested.tsx +98 -0
  223. package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +17 -0
  224. package/src/core/primitives/layer/getLayerContext.test.ts +32 -0
  225. package/src/core/primitives/layer/getLayerContext.ts +21 -0
  226. package/src/core/primitives/layer/layer.test.tsx +108 -0
  227. package/src/core/primitives/layer/layer.tsx +42 -0
  228. package/src/core/primitives/layer/layerCard.tsx +90 -0
  229. package/src/core/primitives/layer/layerContext.ts +7 -0
  230. package/src/core/primitives/layer/layerProvider.tsx +114 -0
  231. package/src/core/primitives/layer/useLayer.ts +24 -0
  232. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +77 -0
  233. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +32 -0
  234. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +71 -0
  235. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +69 -0
  236. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +96 -0
  237. package/src/core/primitives/popover/__workshop__/TestStory.tsx +100 -0
  238. package/src/core/primitives/popover/constants.ts +22 -0
  239. package/src/core/primitives/popover/floating-ui/size.ts +83 -0
  240. package/src/core/primitives/popover/helpers.ts +32 -0
  241. package/src/core/primitives/popover/popover.tsx +453 -0
  242. package/src/core/primitives/popover/popoverLayer.tsx +149 -0
  243. package/src/core/primitives/popover/types.ts +12 -0
  244. package/src/core/primitives/radio/__workshop__/example.tsx +63 -0
  245. package/src/core/primitives/radio/__workshop__/plain.tsx +28 -0
  246. package/src/core/primitives/radio/radio.tsx +64 -0
  247. package/src/core/primitives/root/Root.tsx +84 -0
  248. package/src/core/primitives/root/RootProvider.tsx +40 -0
  249. package/src/core/primitives/root/__workshop__/boundary.tsx +5 -0
  250. package/src/core/primitives/root/__workshop__/index.ts +8 -0
  251. package/src/core/primitives/select/__workshop__/plain.tsx +39 -0
  252. package/src/core/primitives/select/__workshop__/readOnly.tsx +23 -0
  253. package/src/core/primitives/select/select.tsx +85 -0
  254. package/src/core/primitives/selectable/selectable.tsx +50 -0
  255. package/src/core/primitives/selectable/types.ts +7 -0
  256. package/src/core/primitives/skeleton/__workshop__/delay.tsx +70 -0
  257. package/src/core/primitives/skeleton/__workshop__/index.ts +11 -0
  258. package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +64 -0
  259. package/src/core/primitives/skeleton/codeSkeleton.tsx +49 -0
  260. package/src/core/primitives/skeleton/headingSkeleton.tsx +48 -0
  261. package/src/core/primitives/skeleton/labelSkeleton.tsx +47 -0
  262. package/src/core/primitives/skeleton/skeleton.tsx +71 -0
  263. package/src/core/primitives/skeleton/textSkeleton.tsx +49 -0
  264. package/src/core/primitives/spinner/__workshop__/Props.tsx +15 -0
  265. package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +14 -0
  266. package/src/core/primitives/spinner/spinner.tsx +45 -0
  267. package/src/core/primitives/srOnly/srOnly.tsx +33 -0
  268. package/src/core/primitives/stack/__workshop__/plain.tsx +32 -0
  269. package/src/core/primitives/stack/stack.tsx +65 -0
  270. package/src/core/primitives/switch/switch.tsx +84 -0
  271. package/src/core/primitives/text/__workshop__/colored.tsx +23 -0
  272. package/src/core/primitives/text/__workshop__/example.tsx +28 -0
  273. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +23 -0
  274. package/src/core/primitives/text/text.tsx +74 -0
  275. package/src/core/primitives/textArea/__workshop__/plain.tsx +61 -0
  276. package/src/core/primitives/textArea/textArea.tsx +96 -0
  277. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +17 -0
  278. package/src/core/primitives/textInput/__workshop__/plain.tsx +110 -0
  279. package/src/core/primitives/textInput/__workshop__/states.tsx +53 -0
  280. package/src/core/primitives/textInput/__workshop__/tones.tsx +277 -0
  281. package/src/core/primitives/textInput/__workshop__/typed.tsx +23 -0
  282. package/src/core/primitives/textInput/textInput.tsx +261 -0
  283. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +102 -0
  284. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +74 -0
  285. package/src/core/primitives/tooltip/__workshop__/props.tsx +112 -0
  286. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +86 -0
  287. package/src/core/primitives/tooltip/constants.ts +23 -0
  288. package/src/core/primitives/tooltip/tooltip.test.tsx +454 -0
  289. package/src/core/primitives/tooltip/tooltip.tsx +489 -0
  290. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +11 -0
  291. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +53 -0
  292. package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +13 -0
  293. package/src/core/primitives/tooltip/tooltipLayer.tsx +106 -0
  294. package/src/core/primitives/types.ts +153 -0
  295. package/src/core/types/props.ts +28 -0
  296. package/src/core/types/radius.ts +7 -0
  297. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +100 -0
  298. package/src/core/utils/boundaryElement/boundaryElementContext.ts +7 -0
  299. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +18 -0
  300. package/src/core/utils/boundaryElement/types.ts +5 -0
  301. package/src/core/utils/boundaryElement/useBoundaryElement.ts +24 -0
  302. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +41 -0
  303. package/src/core/utils/elementQuery/elementQuery.tsx +75 -0
  304. package/src/core/utils/errorBoundary.tsx +50 -0
  305. package/src/core/utils/getElementRef.ts +27 -0
  306. package/src/core/utils/portal/__workshop__/named.tsx +63 -0
  307. package/src/core/utils/portal/portal.test.tsx +103 -0
  308. package/src/core/utils/portal/portal.tsx +40 -0
  309. package/src/core/utils/portal/portalContext.ts +31 -0
  310. package/src/core/utils/portal/portalProvider.tsx +73 -0
  311. package/src/core/utils/portal/types.ts +7 -0
  312. package/src/core/utils/portal/usePortal.ts +23 -0
  313. package/src/css/_assign.ts +3 -0
  314. package/src/css/_composeClassNames.ts +12 -0
  315. package/src/css/_fromEntries.ts +3 -0
  316. package/src/css/_getClassNames.ts +9 -0
  317. package/src/css/_responsiveClassName.ts +45 -0
  318. package/src/css/_responsiveStyle.css.ts +34 -0
  319. package/src/css/_style.css.ts +9 -0
  320. package/src/css/components/breadcrumbs/breadcrumbs.css.ts +6 -0
  321. package/src/css/components/breadcrumbs/breadcrumbs.ts +5 -3
  322. package/src/css/components/dialog/dialog.css.ts +106 -0
  323. package/src/css/components/dialog/dialog.ts +42 -14
  324. package/src/css/components/menu/menu.css.ts +14 -0
  325. package/src/css/components/menu/menu.ts +8 -5
  326. package/src/css/components/skeleton/skeleton.css.ts +132 -0
  327. package/src/css/components/skeleton/skeleton.ts +16 -9
  328. package/src/css/components/skeleton/types.ts +16 -6
  329. package/src/css/components/toast/toast.css.ts +17 -0
  330. package/src/css/components/toast/toast.ts +5 -15
  331. package/src/css/components/tree/tree.css.ts +65 -0
  332. package/src/css/components/tree/tree.ts +5 -3
  333. package/src/css/constants.ts +10 -1
  334. package/src/css/defaultTheme.css.ts +521 -0
  335. package/src/css/index.ts +141 -39
  336. package/src/css/layers.css.ts +9 -0
  337. package/src/css/primitives/_arrow/_arrow.css.ts +68 -0
  338. package/src/css/primitives/_arrow/_arrow.ts +16 -4
  339. package/src/css/primitives/_input/_input.css.ts +261 -0
  340. package/src/css/primitives/_input/input.ts +16 -12
  341. package/src/css/primitives/_input/types.ts +4 -3
  342. package/src/css/primitives/_selectable/_selectable.css.ts +131 -0
  343. package/src/css/primitives/_selectable/selectable.ts +5 -5
  344. package/src/css/primitives/_selectable/types.ts +3 -2
  345. package/src/css/primitives/avatar/avatar.css.ts +198 -0
  346. package/src/css/primitives/avatar/avatar.ts +52 -11
  347. package/src/css/primitives/avatar/types.ts +5 -3
  348. package/src/css/primitives/badge/badge.css.ts +27 -0
  349. package/src/css/primitives/badge/badge.ts +4 -4
  350. package/src/css/primitives/badge/types.ts +4 -5
  351. package/src/css/primitives/box/box.css.ts +19 -0
  352. package/src/css/primitives/box/box.ts +63 -31
  353. package/src/css/primitives/box/types.ts +56 -30
  354. package/src/css/primitives/button/button.css.ts +289 -0
  355. package/src/css/primitives/button/button.ts +19 -34
  356. package/src/css/primitives/button/types.ts +12 -0
  357. package/src/css/primitives/card/__workshop__/color.tsx +75 -0
  358. package/src/css/primitives/card/__workshop__/index.ts +14 -0
  359. package/src/css/primitives/card/card.css.ts +370 -0
  360. package/src/css/primitives/card/card.ts +9 -10
  361. package/src/css/primitives/card/types.ts +4 -6
  362. package/src/css/primitives/checkbox/checkbox.css.ts +193 -0
  363. package/src/css/primitives/checkbox/checkbox.ts +13 -5
  364. package/src/css/primitives/code/code.css.ts +271 -0
  365. package/src/css/primitives/code/code.ts +15 -5
  366. package/src/css/primitives/code/types.ts +5 -3
  367. package/src/css/primitives/container/container.css.ts +4 -0
  368. package/src/css/primitives/container/container.ts +14 -4
  369. package/src/css/primitives/container/types.ts +4 -2
  370. package/src/css/primitives/heading/heading.css.ts +85 -0
  371. package/src/css/primitives/heading/heading.ts +16 -11
  372. package/src/css/primitives/heading/types.ts +8 -3
  373. package/src/css/primitives/kbd/kbd.css.ts +16 -0
  374. package/src/css/primitives/kbd/kbd.ts +6 -4
  375. package/src/css/primitives/kbd/types.ts +2 -3
  376. package/src/css/primitives/label/label.css.ts +86 -0
  377. package/src/css/primitives/label/label.ts +16 -10
  378. package/src/css/primitives/label/types.ts +15 -5
  379. package/src/css/primitives/popover/popover.css.ts +6 -0
  380. package/src/css/primitives/popover/popover.ts +10 -3
  381. package/src/css/primitives/radio/radio.css.ts +78 -0
  382. package/src/css/primitives/radio/radio.ts +15 -3
  383. package/src/css/primitives/root/root.css.ts +15 -0
  384. package/src/css/primitives/root/root.ts +17 -0
  385. package/src/css/primitives/root/types.ts +10 -0
  386. package/src/css/primitives/select/select.css.ts +24 -0
  387. package/src/css/primitives/select/select.ts +8 -6
  388. package/src/css/primitives/select/types.ts +1 -1
  389. package/src/css/primitives/spinner/spinner.css.ts +23 -0
  390. package/src/css/primitives/spinner/spinner.ts +9 -5
  391. package/src/css/primitives/spinner/types.ts +4 -0
  392. package/src/css/primitives/srOnly/srOnly.css.ts +10 -0
  393. package/src/css/primitives/srOnly/srOnly.ts +7 -0
  394. package/src/css/primitives/stack/stack.css.ts +6 -0
  395. package/src/css/primitives/stack/stack.ts +7 -0
  396. package/src/css/primitives/switch/switch.css.ts +98 -0
  397. package/src/css/primitives/switch/switch.ts +13 -7
  398. package/src/css/primitives/text/text.css.ts +85 -0
  399. package/src/css/primitives/text/text.ts +18 -11
  400. package/src/css/primitives/text/types.ts +12 -3
  401. package/src/css/primitives/textArea/textArea.css.ts +4 -0
  402. package/src/css/primitives/textArea/textArea.ts +6 -5
  403. package/src/css/primitives/textArea/types.ts +5 -3
  404. package/src/css/primitives/textInput/textInput.css.ts +41 -0
  405. package/src/css/primitives/textInput/textInput.ts +21 -5
  406. package/src/css/primitives/textInput/types.ts +3 -7
  407. package/src/css/primitives/tooltip/tooltip.css.ts +4 -0
  408. package/src/css/primitives/tooltip/tooltip.ts +6 -7
  409. package/src/css/primitives/tooltip/types.ts +4 -0
  410. package/src/css/props/alignItems/alignItems.css.ts +22 -0
  411. package/src/css/props/alignItems/alignItems.ts +8 -0
  412. package/src/css/props/alignItems/types.ts +9 -0
  413. package/src/css/props/border/border.css.ts +65 -0
  414. package/src/css/props/border/border.ts +36 -0
  415. package/src/css/props/border/types.ts +13 -0
  416. package/src/css/props/boxSizing/boxSizing.css.ts +11 -0
  417. package/src/css/props/boxSizing/boxSizing.ts +10 -0
  418. package/src/css/props/boxSizing/types.ts +7 -0
  419. package/src/css/props/display/display.css.ts +56 -0
  420. package/src/css/props/display/display.ts +17 -0
  421. package/src/css/props/display/types.ts +16 -0
  422. package/src/css/props/flex/flex.css.ts +52 -0
  423. package/src/css/props/flex/flex.ts +8 -0
  424. package/src/css/props/flex/types.ts +9 -0
  425. package/src/css/props/flexDirection/flexDirection.css.ts +19 -0
  426. package/src/css/props/flexDirection/flexDirection.ts +8 -0
  427. package/src/css/props/flexDirection/types.ts +9 -0
  428. package/src/css/props/flexWrap/flexWrap.css.ts +16 -0
  429. package/src/css/props/flexWrap/flexWrap.ts +8 -0
  430. package/src/css/props/flexWrap/types.ts +9 -0
  431. package/src/css/props/font/font.css.ts +93 -0
  432. package/src/css/props/font/font.ts +8 -0
  433. package/src/css/props/font/types.ts +6 -0
  434. package/src/css/props/gap/gap.css.ts +40 -0
  435. package/src/css/props/gap/gap.ts +13 -0
  436. package/src/css/props/gap/types.ts +10 -0
  437. package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +19 -0
  438. package/src/css/props/gridAutoColumns/gridAutoColumns.ts +8 -0
  439. package/src/css/props/gridAutoColumns/types.ts +19 -0
  440. package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +19 -0
  441. package/src/css/props/gridAutoFlow/gridAutoFlow.ts +8 -0
  442. package/src/css/props/gridAutoFlow/types.ts +13 -0
  443. package/src/css/props/gridAutoRows/gridAutoRows.css.ts +19 -0
  444. package/src/css/props/gridAutoRows/gridAutoRows.ts +8 -0
  445. package/src/css/props/gridAutoRows/types.ts +13 -0
  446. package/src/css/props/gridColumn/gridColumn.css.ts +49 -0
  447. package/src/css/props/gridColumn/gridColumn.ts +8 -0
  448. package/src/css/props/gridColumn/types.ts +19 -0
  449. package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +46 -0
  450. package/src/css/props/gridColumnEnd/gridColumnEnd.ts +8 -0
  451. package/src/css/props/gridColumnEnd/types.ts +19 -0
  452. package/src/css/props/gridColumnStart/gridColumnStart.css.ts +46 -0
  453. package/src/css/props/gridColumnStart/gridColumnStart.ts +11 -0
  454. package/src/css/props/gridColumnStart/types.ts +19 -0
  455. package/src/css/props/gridRow/gridRow.css.ts +49 -0
  456. package/src/css/props/gridRow/gridRow.ts +8 -0
  457. package/src/css/props/gridRow/types.ts +19 -0
  458. package/src/css/props/gridRowEnd/gridRowEnd.css.ts +46 -0
  459. package/src/css/props/gridRowEnd/gridRowEnd.ts +8 -0
  460. package/src/css/props/gridRowEnd/types.ts +19 -0
  461. package/src/css/props/gridRowStart/gridRowStart.css.ts +46 -0
  462. package/src/css/props/gridRowStart/gridRowStart.ts +8 -0
  463. package/src/css/props/gridRowStart/types.ts +19 -0
  464. package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +43 -0
  465. package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +8 -0
  466. package/src/css/props/gridTemplateColumns/types.ts +19 -0
  467. package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +43 -0
  468. package/src/css/props/gridTemplateRows/gridTemplateRows.ts +8 -0
  469. package/src/css/props/gridTemplateRows/types.ts +19 -0
  470. package/src/css/props/height/height.css.ts +25 -0
  471. package/src/css/props/height/height.ts +8 -0
  472. package/src/css/props/height/types.ts +15 -0
  473. package/src/css/props/inset/inset.css.ts +37 -0
  474. package/src/css/props/inset/inset.ts +21 -0
  475. package/src/css/props/inset/types.ts +13 -0
  476. package/src/css/props/justifyContent/justifyContent.css.ts +25 -0
  477. package/src/css/props/justifyContent/justifyContent.ts +8 -0
  478. package/src/css/props/justifyContent/types.ts +15 -0
  479. package/src/css/props/margin/margin.css.ts +117 -0
  480. package/src/css/props/margin/margin.ts +25 -0
  481. package/src/css/props/margin/types.ts +17 -0
  482. package/src/css/props/maxWidth/maxWidth.css.ts +32 -0
  483. package/src/css/props/maxWidth/maxWidth.ts +8 -0
  484. package/src/css/props/maxWidth/types.ts +11 -0
  485. package/src/css/props/minHeight/minHeight.css.ts +13 -0
  486. package/src/css/props/minHeight/minHeight.ts +8 -0
  487. package/src/css/props/minHeight/types.ts +9 -0
  488. package/src/css/props/minWidth/minWidth.css.ts +25 -0
  489. package/src/css/props/minWidth/minWidth.ts +8 -0
  490. package/src/css/props/minWidth/types.ts +9 -0
  491. package/src/css/props/outline/outline.css.ts +10 -0
  492. package/src/css/props/outline/outline.ts +8 -0
  493. package/src/css/props/outline/types.ts +7 -0
  494. package/src/css/props/overflow/overflow.css.ts +16 -0
  495. package/src/css/props/overflow/overflow.ts +8 -0
  496. package/src/css/props/overflow/types.ts +17 -0
  497. package/src/css/props/padding/padding.css.ts +87 -0
  498. package/src/css/props/padding/padding.ts +25 -0
  499. package/src/css/props/padding/types.ts +17 -0
  500. package/src/css/props/pointerEvents/pointerEvents.css.ts +13 -0
  501. package/src/css/props/pointerEvents/pointerEvents.ts +8 -0
  502. package/src/css/props/position/position.css.ts +22 -0
  503. package/src/css/props/position/position.ts +8 -0
  504. package/src/css/props/position/types.ts +9 -0
  505. package/src/css/props/radius/radius.css.ts +21 -0
  506. package/src/css/props/radius/radius.ts +8 -0
  507. package/src/css/props/radius/types.ts +8 -0
  508. package/src/css/props/shadow/shadow.css.ts +23 -0
  509. package/src/css/props/shadow/shadow.ts +8 -0
  510. package/src/css/props/shadow/types.ts +8 -0
  511. package/src/css/props/textAlign/textAlign.css.ts +22 -0
  512. package/src/css/props/textAlign/textAlign.ts +8 -0
  513. package/src/css/props/textAlign/types.ts +7 -0
  514. package/src/css/props/textOverflow/textOverflow.css.ts +19 -0
  515. package/src/css/props/textOverflow/textOverflow.ts +8 -0
  516. package/src/css/props/textOverflow/types.ts +12 -0
  517. package/src/css/props/width/types.ts +11 -0
  518. package/src/css/props/width/width.css.ts +31 -0
  519. package/src/css/props/width/width.ts +8 -0
  520. package/src/css/types.ts +221 -810
  521. package/src/css/util.ts +3 -8
  522. package/src/css/vars.css.ts +676 -0
  523. package/src/theme/getScopedTheme.ts +4 -4
  524. package/src/theme/index.ts +0 -5
  525. package/src/theme/types.ts +6 -10
  526. package/src/theme/v0/color/_generic.ts +1 -1
  527. package/src/theme/v0/color/button.ts +1 -1
  528. package/src/theme/v0/color/card.ts +1 -1
  529. package/src/theme/v0/color/color.ts +11 -11
  530. package/src/theme/v0/color/input.ts +1 -1
  531. package/src/theme/v0/color/muted.ts +1 -1
  532. package/src/theme/v0/color/selectable.ts +1 -1
  533. package/src/theme/v0/color/solid.ts +1 -1
  534. package/src/theme/v0/color/spot.ts +1 -1
  535. package/src/theme/v0/focusRing.ts +1 -3
  536. package/src/theme/v0/font.ts +6 -19
  537. package/src/theme/v0/layer.ts +1 -3
  538. package/src/theme/v0/shadow.ts +2 -6
  539. package/src/theme/v0/styles.ts +1 -1
  540. package/src/theme/v0/theme.ts +7 -7
  541. package/src/theme/v2/avatar.ts +2 -4
  542. package/src/theme/v2/build/_deprecated/color/_selectable/createSelectableTones.ts +76 -0
  543. package/src/theme/v2/build/_deprecated/color/_solid/createSolidTones.ts +54 -0
  544. package/src/theme/v2/build/_deprecated/color/button/createButtonModes.ts +22 -0
  545. package/src/theme/v2/build/_deprecated/color/button/createButtonTones.ts +55 -0
  546. package/src/theme/v2/build/_deprecated/color/card/createCardStates.ts +60 -0
  547. package/src/theme/v2/build/_deprecated/color/color.test.ts +63 -0
  548. package/src/theme/v2/build/_deprecated/color/defaults.ts +390 -0
  549. package/src/theme/v2/build/_deprecated/color/factory.ts +141 -0
  550. package/src/theme/v2/build/_deprecated/color/input/createInputModes.ts +86 -0
  551. package/src/theme/v2/build/_deprecated/color/muted/createMuted.ts +54 -0
  552. package/src/theme/v2/build/_deprecated/color/spot/createSpot.ts +20 -0
  553. package/src/theme/v2/build/buildColorTheme.test.ts +185 -0
  554. package/src/theme/v2/build/buildColorTheme.ts +494 -0
  555. package/src/theme/v2/build/buildTheme.test.ts +89 -0
  556. package/src/theme/v2/build/buildTheme.ts +37 -0
  557. package/src/theme/v2/build/colorToken/colorToken.ts +19 -0
  558. package/src/theme/v2/build/colorToken/compileColorToken.ts +21 -0
  559. package/src/theme/v2/build/colorToken/types.ts +6 -0
  560. package/src/theme/v2/build/lib/color-fns/blend/mix.ts +21 -0
  561. package/src/theme/v2/build/lib/color-fns/blend/multiply.ts +18 -0
  562. package/src/theme/v2/build/lib/color-fns/blend/screen.ts +18 -0
  563. package/src/theme/v2/build/lib/color-fns/color-fns.test.ts +68 -0
  564. package/src/theme/v2/build/lib/color-fns/contrastRatio.ts +34 -0
  565. package/src/theme/v2/build/lib/color-fns/convert.ts +150 -0
  566. package/src/theme/v2/build/lib/color-fns/parse.ts +60 -0
  567. package/src/theme/v2/build/mixThemeColor.test.ts +23 -0
  568. package/src/theme/v2/build/mixThemeColor.ts +53 -0
  569. package/src/theme/v2/build/renderColorTheme.ts +532 -0
  570. package/src/theme/v2/build/renderColorValue.ts +85 -0
  571. package/src/theme/v2/build/resolveColorTokens.ts +268 -0
  572. package/src/theme/v2/color/_helpers.ts +2 -2
  573. package/src/theme/v2/color/_system.ts +2 -4
  574. package/src/theme/v2/color/avatar.ts +3 -7
  575. package/src/theme/v2/color/badge.ts +3 -7
  576. package/src/theme/v2/color/button.ts +5 -11
  577. package/src/theme/v2/color/color.ts +10 -16
  578. package/src/theme/v2/color/input.ts +8 -10
  579. package/src/theme/v2/color/kbd.ts +1 -3
  580. package/src/theme/v2/color/selectable.ts +4 -8
  581. package/src/theme/v2/color/state.ts +5 -7
  582. package/src/theme/v2/color/syntax.ts +1 -3
  583. package/src/theme/v2/config/helpers.ts +48 -0
  584. package/src/theme/v2/config/system.ts +114 -0
  585. package/src/theme/v2/config/tokens/color/types.ts +137 -0
  586. package/src/theme/v2/config/tokens/index.ts +3 -0
  587. package/src/theme/v2/config/tokens/parseTokenValue.test.ts +44 -0
  588. package/src/theme/v2/config/tokens/parseTokenValue.ts +133 -0
  589. package/src/theme/v2/config/tokens/types.ts +53 -0
  590. package/src/theme/v2/config/types.ts +47 -0
  591. package/src/theme/v2/defaults/colorPalette.ts +5 -0
  592. package/src/theme/v2/defaults/colorTokens.ts +648 -0
  593. package/src/theme/v2/defaults/config.ts +84 -0
  594. package/src/theme/v2/defaults/fonts.ts +227 -0
  595. package/src/theme/v2/index.ts +2 -0
  596. package/src/theme/v2/input.ts +2 -4
  597. package/src/theme/v2/theme.ts +10 -14
  598. package/src/theme/v3/_constants.ts +29 -0
  599. package/src/theme/v3/_parseColorToken.ts +180 -0
  600. package/src/theme/v3/buildTheme_v3.ts +20 -11
  601. package/src/theme/v3/color/_constants.ts +15 -0
  602. package/src/theme/v3/color/avatar.ts +14 -0
  603. package/src/theme/v3/color/card.ts +58 -95
  604. package/src/theme/v3/color/color.ts +75 -71
  605. package/src/theme/v3/color/element.ts +8 -8
  606. package/src/theme/v3/color/index.ts +2 -2
  607. package/src/theme/v3/color/token.ts +19 -4
  608. package/src/theme/v3/color/tokens.ts +2 -2
  609. package/src/theme/v3/defaultFonts.ts +250 -0
  610. package/src/theme/v3/defaultTokens.ts +199 -0
  611. package/src/theme/v3/index.ts +4 -1
  612. package/src/theme/v3/palette/constants.ts +15 -0
  613. package/src/theme/v3/palette/types.ts +7 -0
  614. package/src/theme/v3/resolveTokens.ts +70 -65
  615. package/src/theme/v3/tokens.ts +2 -2
  616. package/src/theme/v3/types.ts +97 -12
  617. package/src/theme/versioning/getTheme_v2.ts +3 -3
  618. package/src/theme/versioning/is_v0.ts +2 -2
  619. package/src/theme/versioning/is_v2.ts +2 -2
  620. package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
  621. package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -1
  622. package/src/theme/versioning/themeColor_v3_v2.ts +229 -52
  623. package/src/theme/versioning/v0_v2.ts +3 -3
  624. package/src/theme/versioning/v2_v0.ts +4 -4
  625. package/src/theme/versioning/v3_v2.ts +62 -40
  626. package/bin/ui.js +0 -5
  627. package/dist/_chunks-cjs/_visual-editing.js +0 -3100
  628. package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
  629. package/dist/_chunks-cjs/buildCommand.js +0 -32
  630. package/dist/_chunks-cjs/buildCommand.js.map +0 -1
  631. package/dist/_chunks-cjs/refractor.js +0 -27
  632. package/dist/_chunks-cjs/refractor.js.map +0 -1
  633. package/dist/_chunks-cjs/v3_v2.js +0 -251
  634. package/dist/_chunks-cjs/v3_v2.js.map +0 -1
  635. package/dist/_chunks-es/_visual-editing.mjs +0 -3107
  636. package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
  637. package/dist/_chunks-es/refractor.mjs +0 -26
  638. package/dist/_chunks-es/refractor.mjs.map +0 -1
  639. package/dist/_chunks-es/v3_v2.mjs +0 -252
  640. package/dist/_chunks-es/v3_v2.mjs.map +0 -1
  641. package/dist/_visual-editing.d.mts +0 -808
  642. package/dist/_visual-editing.mjs +0 -31
  643. package/dist/_visual-editing.mjs.map +0 -1
  644. package/dist/cli.d.ts +0 -1
  645. package/dist/cli.js +0 -357
  646. package/dist/cli.js.map +0 -1
  647. package/dist/css.d.mts +0 -2197
  648. package/dist/css.d.ts +0 -2197
  649. package/dist/css.js +0 -4769
  650. package/dist/css.js.map +0 -1
  651. package/dist/css.mjs +0 -4770
  652. package/dist/css.mjs.map +0 -1
  653. package/dist/index.d.mts +0 -2869
  654. package/dist/index.mjs +0 -1545
  655. package/dist/index.mjs.map +0 -1
  656. package/dist/sanity-palette.css +0 -9
  657. package/dist/sanity-theme.css +0 -1
  658. package/dist/system.css +0 -22813
  659. package/dist/theme.d.mts +0 -1883
  660. package/dist/theme.mjs +0 -2989
  661. package/dist/theme.mjs.map +0 -1
  662. package/src/cli/buildCommand.ts +0 -48
  663. package/src/cli/index.ts +0 -38
  664. package/src/css/_comp.test.ts +0 -7
  665. package/src/css/_comp.ts +0 -10
  666. package/src/css/_mergeStyles.ts +0 -31
  667. package/src/css/_resp.ts +0 -38
  668. package/src/css/_responsiveRule.ts +0 -38
  669. package/src/css/aspects/border/border.style.ts +0 -13
  670. package/src/css/aspects/border/border.ts +0 -14
  671. package/src/css/aspects/border/index.ts +0 -2
  672. package/src/css/aspects/border/types.ts +0 -10
  673. package/src/css/aspects/display/display.style.ts +0 -34
  674. package/src/css/aspects/display/display.ts +0 -7
  675. package/src/css/aspects/display/index.ts +0 -2
  676. package/src/css/aspects/display/types.ts +0 -17
  677. package/src/css/aspects/flex/flex.style.ts +0 -30
  678. package/src/css/aspects/flex/flex.ts +0 -13
  679. package/src/css/aspects/flex/flexAlign.style.ts +0 -12
  680. package/src/css/aspects/flex/flexDirection.style.ts +0 -11
  681. package/src/css/aspects/flex/flexJustify.style.ts +0 -13
  682. package/src/css/aspects/flex/flexWrap.style.ts +0 -10
  683. package/src/css/aspects/flex/index.ts +0 -2
  684. package/src/css/aspects/flex/types.ts +0 -35
  685. package/src/css/aspects/flexItem/flex.style.ts +0 -22
  686. package/src/css/aspects/flexItem/flexItem.ts +0 -8
  687. package/src/css/aspects/flexItem/index.ts +0 -2
  688. package/src/css/aspects/flexItem/types.ts +0 -27
  689. package/src/css/aspects/font/font.style.ts +0 -151
  690. package/src/css/aspects/font/font.ts +0 -12
  691. package/src/css/aspects/font/index.ts +0 -2
  692. package/src/css/aspects/font/types.ts +0 -12
  693. package/src/css/aspects/gap/gap.style.ts +0 -21
  694. package/src/css/aspects/gap/gap.ts +0 -8
  695. package/src/css/aspects/gap/index.ts +0 -2
  696. package/src/css/aspects/gap/types.ts +0 -10
  697. package/src/css/aspects/grid/grid.ts +0 -13
  698. package/src/css/aspects/grid/gridAutoColumns.style.ts +0 -11
  699. package/src/css/aspects/grid/gridAutoFlow.style.ts +0 -11
  700. package/src/css/aspects/grid/gridAutoRows.style.ts +0 -11
  701. package/src/css/aspects/grid/gridColumns.style.ts +0 -18
  702. package/src/css/aspects/grid/gridRows.style.ts +0 -18
  703. package/src/css/aspects/grid/index.ts +0 -2
  704. package/src/css/aspects/grid/types.ts +0 -29
  705. package/src/css/aspects/gridItem/gridColumn.style.ts +0 -20
  706. package/src/css/aspects/gridItem/gridColumnEnd.style.ts +0 -20
  707. package/src/css/aspects/gridItem/gridColumnStart.style.ts +0 -20
  708. package/src/css/aspects/gridItem/gridItem.ts +0 -15
  709. package/src/css/aspects/gridItem/gridRow.style.ts +0 -20
  710. package/src/css/aspects/gridItem/gridRowEnd.style.ts +0 -20
  711. package/src/css/aspects/gridItem/gridRowStart.style.ts +0 -20
  712. package/src/css/aspects/gridItem/index.ts +0 -2
  713. package/src/css/aspects/gridItem/types.ts +0 -41
  714. package/src/css/aspects/height/height.style.ts +0 -9
  715. package/src/css/aspects/height/height.ts +0 -17
  716. package/src/css/aspects/height/index.ts +0 -1
  717. package/src/css/aspects/height/rules.ts +0 -7
  718. package/src/css/aspects/index.ts +0 -20
  719. package/src/css/aspects/inset/index.ts +0 -2
  720. package/src/css/aspects/inset/inset.style.ts +0 -12
  721. package/src/css/aspects/inset/inset.ts +0 -13
  722. package/src/css/aspects/inset/types.ts +0 -13
  723. package/src/css/aspects/margin/index.ts +0 -2
  724. package/src/css/aspects/margin/margin.style.ts +0 -46
  725. package/src/css/aspects/margin/margin.ts +0 -15
  726. package/src/css/aspects/margin/types.ts +0 -11
  727. package/src/css/aspects/maxWidth/index.ts +0 -2
  728. package/src/css/aspects/maxWidth/maxWidth.style.ts +0 -16
  729. package/src/css/aspects/maxWidth/maxWidth.ts +0 -6
  730. package/src/css/aspects/maxWidth/types.ts +0 -7
  731. package/src/css/aspects/outline/outline.style.ts +0 -9
  732. package/src/css/aspects/overflow/index.ts +0 -2
  733. package/src/css/aspects/overflow/overflow.style.ts +0 -11
  734. package/src/css/aspects/overflow/overflow.ts +0 -11
  735. package/src/css/aspects/overflow/types.ts +0 -11
  736. package/src/css/aspects/padding/index.ts +0 -2
  737. package/src/css/aspects/padding/padding.style.ts +0 -46
  738. package/src/css/aspects/padding/padding.ts +0 -15
  739. package/src/css/aspects/padding/types.ts +0 -14
  740. package/src/css/aspects/pointerEvents/index.ts +0 -2
  741. package/src/css/aspects/pointerEvents/pointerEvents.style.ts +0 -13
  742. package/src/css/aspects/pointerEvents/pointerEvents.ts +0 -6
  743. package/src/css/aspects/position/index.ts +0 -2
  744. package/src/css/aspects/position/position.style.ts +0 -12
  745. package/src/css/aspects/position/position.ts +0 -7
  746. package/src/css/aspects/position/types.ts +0 -9
  747. package/src/css/aspects/radius/index.ts +0 -2
  748. package/src/css/aspects/radius/radius.style.ts +0 -16
  749. package/src/css/aspects/radius/radius.ts +0 -8
  750. package/src/css/aspects/radius/types.ts +0 -8
  751. package/src/css/aspects/shadow/index.ts +0 -2
  752. package/src/css/aspects/shadow/shadow.style.ts +0 -49
  753. package/src/css/aspects/shadow/shadow.ts +0 -7
  754. package/src/css/aspects/shadow/types.ts +0 -8
  755. package/src/css/aspects/textOverflow/index.ts +0 -2
  756. package/src/css/aspects/textOverflow/textOverflow.style.ts +0 -21
  757. package/src/css/aspects/textOverflow/textOverflow.ts +0 -6
  758. package/src/css/aspects/textOverflow/types.ts +0 -8
  759. package/src/css/aspects/width/index.ts +0 -2
  760. package/src/css/aspects/width/rules.ts +0 -8
  761. package/src/css/aspects/width/types.ts +0 -9
  762. package/src/css/aspects/width/width.style.ts +0 -11
  763. package/src/css/aspects/width/width.ts +0 -6
  764. package/src/css/compile/compilePalette.ts +0 -60
  765. package/src/css/compile/compileRule.ts +0 -96
  766. package/src/css/compile/compileRules.test.ts +0 -36
  767. package/src/css/compile/compileRules.ts +0 -43
  768. package/src/css/compile/compileStyle.ts +0 -148
  769. package/src/css/compile/compileSystem.ts +0 -10
  770. package/src/css/compile/compileTheme.ts +0 -15
  771. package/src/css/compile/compileTheme_v3.ts +0 -410
  772. package/src/css/compile/types.ts +0 -6
  773. package/src/css/components/breadcrumbs/breadcrumbs.style.ts +0 -9
  774. package/src/css/components/breadcrumbs/index.ts +0 -1
  775. package/src/css/components/breadcrumbs/rules.ts +0 -25
  776. package/src/css/components/dialog/dialog.style.ts +0 -79
  777. package/src/css/components/dialog/index.ts +0 -1
  778. package/src/css/components/dialog/rules.ts +0 -78
  779. package/src/css/components/menu/index.ts +0 -1
  780. package/src/css/components/menu/menu.style.ts +0 -17
  781. package/src/css/components/menu/rules.ts +0 -15
  782. package/src/css/components/skeleton/index.ts +0 -2
  783. package/src/css/components/skeleton/rules.ts +0 -113
  784. package/src/css/components/skeleton/skeleton.style.ts +0 -96
  785. package/src/css/components/toast/index.ts +0 -1
  786. package/src/css/components/toast/rules.ts +0 -18
  787. package/src/css/components/toast/toast.style.ts +0 -20
  788. package/src/css/components/tree/index.ts +0 -1
  789. package/src/css/components/tree/rules.ts +0 -168
  790. package/src/css/components/tree/tree.style.ts +0 -55
  791. package/src/css/composeClassNames.ts +0 -17
  792. package/src/css/primitives/_arrow/_arrow.style.ts +0 -73
  793. package/src/css/primitives/_arrow/index.ts +0 -1
  794. package/src/css/primitives/_input/__workshop__/customInput.tsx +0 -16
  795. package/src/css/primitives/_input/__workshop__/index.ts +0 -14
  796. package/src/css/primitives/_input/_input.style.ts +0 -162
  797. package/src/css/primitives/_input/index.ts +0 -2
  798. package/src/css/primitives/_selectable/__style.ts +0 -117
  799. package/src/css/primitives/_selectable/_contants.ts +0 -11
  800. package/src/css/primitives/_selectable/_selectable.style.ts +0 -132
  801. package/src/css/primitives/_selectable/index.ts +0 -2
  802. package/src/css/primitives/avatar/avatar.style.ts +0 -175
  803. package/src/css/primitives/avatar/index.ts +0 -2
  804. package/src/css/primitives/avatar/rules.ts +0 -176
  805. package/src/css/primitives/badge/badge.style.ts +0 -22
  806. package/src/css/primitives/badge/index.ts +0 -2
  807. package/src/css/primitives/box/box.style.ts +0 -31
  808. package/src/css/primitives/box/index.ts +0 -2
  809. package/src/css/primitives/button/_constants.ts +0 -17
  810. package/src/css/primitives/button/button.style.ts +0 -182
  811. package/src/css/primitives/button/index.ts +0 -1
  812. package/src/css/primitives/button/rules.ts +0 -302
  813. package/src/css/primitives/card/_constants.ts +0 -13
  814. package/src/css/primitives/card/card.style.ts +0 -198
  815. package/src/css/primitives/card/index.ts +0 -2
  816. package/src/css/primitives/card/rules.ts +0 -473
  817. package/src/css/primitives/checkbox/__styles.ts +0 -129
  818. package/src/css/primitives/checkbox/checkbox.style.ts +0 -154
  819. package/src/css/primitives/checkbox/index.ts +0 -1
  820. package/src/css/primitives/checkbox/rules.ts +0 -152
  821. package/src/css/primitives/code/code.style.ts +0 -62
  822. package/src/css/primitives/code/index.ts +0 -2
  823. package/src/css/primitives/code/rules.ts +0 -96
  824. package/src/css/primitives/container/container.style.ts +0 -10
  825. package/src/css/primitives/container/index.ts +0 -2
  826. package/src/css/primitives/container/rules.ts +0 -8
  827. package/src/css/primitives/heading/heading.style.ts +0 -47
  828. package/src/css/primitives/heading/index.ts +0 -2
  829. package/src/css/primitives/heading/rules.ts +0 -155
  830. package/src/css/primitives/kbd/index.ts +0 -2
  831. package/src/css/primitives/kbd/kbd.style.ts +0 -22
  832. package/src/css/primitives/kbd/rules.ts +0 -20
  833. package/src/css/primitives/label/index.ts +0 -2
  834. package/src/css/primitives/label/label.style.ts +0 -48
  835. package/src/css/primitives/label/rules.ts +0 -137
  836. package/src/css/primitives/popover/index.ts +0 -1
  837. package/src/css/primitives/popover/popover.style.ts +0 -5
  838. package/src/css/primitives/popover/rules.ts +0 -5
  839. package/src/css/primitives/radio/index.ts +0 -1
  840. package/src/css/primitives/radio/radio.style.ts +0 -123
  841. package/src/css/primitives/radio/rules.ts +0 -121
  842. package/src/css/primitives/select/index.ts +0 -2
  843. package/src/css/primitives/select/rules.ts +0 -22
  844. package/src/css/primitives/select/select.style.ts +0 -24
  845. package/src/css/primitives/spinner/index.ts +0 -1
  846. package/src/css/primitives/spinner/rules.ts +0 -21
  847. package/src/css/primitives/spinner/spinner.style.ts +0 -22
  848. package/src/css/primitives/switch/index.ts +0 -1
  849. package/src/css/primitives/switch/rules.ts +0 -340
  850. package/src/css/primitives/switch/switch.style.ts +0 -169
  851. package/src/css/primitives/text/index.ts +0 -2
  852. package/src/css/primitives/text/rules.ts +0 -164
  853. package/src/css/primitives/text/text.style.ts +0 -56
  854. package/src/css/primitives/textArea/index.ts +0 -2
  855. package/src/css/primitives/textArea/rules.ts +0 -7
  856. package/src/css/primitives/textArea/textArea.style.ts +0 -9
  857. package/src/css/primitives/textInput/index.ts +0 -2
  858. package/src/css/primitives/textInput/rules.ts +0 -224
  859. package/src/css/primitives/textInput/textInput.style.ts +0 -167
  860. package/src/css/primitives/token/rules.ts +0 -45
  861. package/src/css/primitives/token/token.style.ts +0 -49
  862. package/src/css/primitives/tooltip/index.ts +0 -1
  863. package/src/css/primitives/tooltip/rules.ts +0 -19
  864. package/src/css/primitives/tooltip/tooltip.style.ts +0 -21
  865. package/src/css/responsiveRules.ts +0 -25
  866. package/src/css/scopeClassName.ts +0 -6
  867. package/src/css/system.style.ts +0 -154
  868. package/src/css/utils/srOnly/index.ts +0 -1
  869. package/src/css/utils/srOnly/srOnly.style.ts +0 -14
  870. package/src/css/utils/srOnly/srOnly.ts +0 -5
  871. package/src/css/varNames.ts +0 -486
  872. package/src/css/vars.ts +0 -456
  873. package/src/theme/_constants.ts +0 -26
  874. package/src/theme/_types.ts +0 -41
  875. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
  876. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
  877. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +0 -17
  878. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +0 -55
  879. package/src/theme/build/_deprecated/color/card/createCardStates.ts +0 -60
  880. package/src/theme/build/_deprecated/color/color.test.ts +0 -63
  881. package/src/theme/build/_deprecated/color/defaults.ts +0 -390
  882. package/src/theme/build/_deprecated/color/factory.ts +0 -141
  883. package/src/theme/build/_deprecated/color/input/createInputModes.ts +0 -81
  884. package/src/theme/build/_deprecated/color/muted/createMuted.ts +0 -54
  885. package/src/theme/build/_deprecated/color/spot/createSpot.ts +0 -20
  886. package/src/theme/build/buildColorTheme.test.ts +0 -183
  887. package/src/theme/build/buildColorTheme.ts +0 -494
  888. package/src/theme/build/buildTheme.test.ts +0 -87
  889. package/src/theme/build/buildTheme.ts +0 -12
  890. package/src/theme/build/colorToken/colorToken.ts +0 -19
  891. package/src/theme/build/colorToken/compileColorToken.ts +0 -21
  892. package/src/theme/build/colorToken/types.ts +0 -6
  893. package/src/theme/build/lib/color-fns/blend/mix.ts +0 -21
  894. package/src/theme/build/lib/color-fns/blend/multiply.ts +0 -18
  895. package/src/theme/build/lib/color-fns/blend/screen.ts +0 -18
  896. package/src/theme/build/lib/color-fns/color-fns.test.ts +0 -68
  897. package/src/theme/build/lib/color-fns/contrastRatio.ts +0 -31
  898. package/src/theme/build/lib/color-fns/convert.ts +0 -150
  899. package/src/theme/build/lib/color-fns/parse.ts +0 -60
  900. package/src/theme/build/mixThemeColor.test.ts +0 -21
  901. package/src/theme/build/mixThemeColor.ts +0 -53
  902. package/src/theme/build/renderColorTheme.ts +0 -532
  903. package/src/theme/build/renderColorValue.ts +0 -85
  904. package/src/theme/build/resolveColorTokens.ts +0 -268
  905. package/src/theme/build/theme.test.ts +0 -27
  906. package/src/theme/config/helpers.ts +0 -55
  907. package/src/theme/config/system.ts +0 -115
  908. package/src/theme/config/tokens/color/types.ts +0 -133
  909. package/src/theme/config/tokens/index.ts +0 -4
  910. package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
  911. package/src/theme/config/tokens/parseTokenKey.ts +0 -67
  912. package/src/theme/config/tokens/parseTokenValue.test.ts +0 -42
  913. package/src/theme/config/tokens/parseTokenValue.ts +0 -133
  914. package/src/theme/config/tokens/types.ts +0 -53
  915. package/src/theme/config/types.ts +0 -45
  916. package/src/theme/defaults/colorPalette.ts +0 -5
  917. package/src/theme/defaults/colorTokens.ts +0 -648
  918. package/src/theme/defaults/config.ts +0 -84
  919. package/src/theme/defaults/fonts.ts +0 -228
  920. package/src/theme/palette/constants.ts +0 -15
  921. package/src/theme/palette/types.ts +0 -16
  922. package/src/theme/v3/buildTheme_v3.test.ts +0 -40
  923. package/src/theme/v3/color/buildColor_v3.ts +0 -193
  924. package/src/theme/v3/color/parseColor.test.ts +0 -79
  925. package/src/theme/v3/color/parseColor.ts +0 -167
  926. package/src/theme/v3/color/renderColor.test.ts +0 -19
  927. package/src/theme/v3/color/renderColor.ts +0 -33
  928. package/src/theme/v3/defaults.ts +0 -205
  929. package/src/ui/StyleTags.tsx +0 -24
  930. package/src/ui/_compat/index.ts +0 -9
  931. package/src/ui/_compat/styles/_responsive.ts +0 -19
  932. package/src/ui/_compat/styles/index.ts +0 -1
  933. package/src/ui/_compat/theme/index.ts +0 -5
  934. package/src/ui/_compat/theme/theme.test.tsx +0 -73
  935. package/src/ui/_compat/theme/themeColorProvider.tsx +0 -30
  936. package/src/ui/_compat/theme/themeContext.ts +0 -10
  937. package/src/ui/_compat/theme/themeProvider.tsx +0 -74
  938. package/src/ui/_compat/theme/types.ts +0 -12
  939. package/src/ui/_compat/theme/useRootTheme.ts +0 -17
  940. package/src/ui/_compat/theme/useTheme.ts +0 -16
  941. package/src/ui/_compat/types.ts +0 -274
  942. package/src/ui/components/autocomplete/__workshop__/async.tsx +0 -157
  943. package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
  944. package/src/ui/components/autocomplete/__workshop__/custom.tsx +0 -90
  945. package/src/ui/components/autocomplete/__workshop__/example.tsx +0 -80
  946. package/src/ui/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
  947. package/src/ui/components/autocomplete/__workshop__/fullscreen.tsx +0 -293
  948. package/src/ui/components/autocomplete/__workshop__/index.ts +0 -39
  949. package/src/ui/components/autocomplete/autocomplete.tsx +0 -731
  950. package/src/ui/components/autocomplete/autocompleteOption.tsx +0 -45
  951. package/src/ui/components/autocomplete/autocompleteReducer.ts +0 -47
  952. package/src/ui/components/autocomplete/constants.ts +0 -28
  953. package/src/ui/components/autocomplete/index.ts +0 -2
  954. package/src/ui/components/autocomplete/types.ts +0 -108
  955. package/src/ui/components/breadcrumbs/__workshop__/example.tsx +0 -62
  956. package/src/ui/components/breadcrumbs/breadcrumbs.tsx +0 -127
  957. package/src/ui/components/breadcrumbs/index.ts +0 -1
  958. package/src/ui/components/dialog/__workshop__/activate.tsx +0 -134
  959. package/src/ui/components/dialog/__workshop__/autoFocus.tsx +0 -29
  960. package/src/ui/components/dialog/__workshop__/onScroll.tsx +0 -39
  961. package/src/ui/components/dialog/__workshop__/panes.tsx +0 -82
  962. package/src/ui/components/dialog/__workshop__/position.tsx +0 -30
  963. package/src/ui/components/dialog/__workshop__/props.tsx +0 -77
  964. package/src/ui/components/dialog/__workshop__/wrapped.tsx +0 -76
  965. package/src/ui/components/dialog/dialog.tsx +0 -433
  966. package/src/ui/components/dialog/dialogContext.ts +0 -20
  967. package/src/ui/components/dialog/dialogProvider.tsx +0 -35
  968. package/src/ui/components/dialog/index.ts +0 -4
  969. package/src/ui/components/dialog/useDialog.ts +0 -11
  970. package/src/ui/components/hotkeys/hotkeys.tsx +0 -54
  971. package/src/ui/components/hotkeys/index.ts +0 -1
  972. package/src/ui/components/index.ts +0 -9
  973. package/src/ui/components/menu/__workshop__/asComponent.tsx +0 -45
  974. package/src/ui/components/menu/__workshop__/avatarMenu.tsx +0 -51
  975. package/src/ui/components/menu/__workshop__/closableMenuButton.tsx +0 -46
  976. package/src/ui/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
  977. package/src/ui/components/menu/__workshop__/customMenuItem.tsx +0 -45
  978. package/src/ui/components/menu/__workshop__/customSelectedState.tsx +0 -39
  979. package/src/ui/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
  980. package/src/ui/components/menu/__workshop__/groups.tsx +0 -156
  981. package/src/ui/components/menu/__workshop__/menuButton.tsx +0 -80
  982. package/src/ui/components/menu/__workshop__/menuGroupRight.tsx +0 -65
  983. package/src/ui/components/menu/__workshop__/nestedMenu.tsx +0 -22
  984. package/src/ui/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
  985. package/src/ui/components/menu/__workshop__/selectedItem.tsx +0 -69
  986. package/src/ui/components/menu/__workshop__/shouldFocus.tsx +0 -47
  987. package/src/ui/components/menu/__workshop__/tones.tsx +0 -25
  988. package/src/ui/components/menu/__workshop__/withoutArrow.tsx +0 -32
  989. package/src/ui/components/menu/helpers.ts +0 -82
  990. package/src/ui/components/menu/index.ts +0 -5
  991. package/src/ui/components/menu/menu.test.tsx +0 -128
  992. package/src/ui/components/menu/menu.tsx +0 -200
  993. package/src/ui/components/menu/menuButton.tsx +0 -275
  994. package/src/ui/components/menu/menuContext.ts +0 -31
  995. package/src/ui/components/menu/menuDivider.tsx +0 -22
  996. package/src/ui/components/menu/menuGroup.tsx +0 -228
  997. package/src/ui/components/menu/menuItem.tsx +0 -180
  998. package/src/ui/components/menu/useMenu.ts +0 -21
  999. package/src/ui/components/menu/useMenuController.ts +0 -241
  1000. package/src/ui/components/skeleton/__workshop__/delay.tsx +0 -70
  1001. package/src/ui/components/skeleton/__workshop__/index.ts +0 -11
  1002. package/src/ui/components/skeleton/__workshop__/skeleton.tsx +0 -64
  1003. package/src/ui/components/skeleton/index.ts +0 -2
  1004. package/src/ui/components/skeleton/skeleton.tsx +0 -53
  1005. package/src/ui/components/skeleton/textSkeleton.tsx +0 -132
  1006. package/src/ui/components/tab/__workshop__/example.tsx +0 -79
  1007. package/src/ui/components/tab/index.ts +0 -3
  1008. package/src/ui/components/tab/tab.tsx +0 -105
  1009. package/src/ui/components/tab/tabList.tsx +0 -74
  1010. package/src/ui/components/tab/tabPanel.tsx +0 -40
  1011. package/src/ui/components/toast/__workshop__/hook.tsx +0 -71
  1012. package/src/ui/components/toast/__workshop__/toast.tsx +0 -26
  1013. package/src/ui/components/toast/index.ts +0 -4
  1014. package/src/ui/components/toast/toast.test.tsx +0 -101
  1015. package/src/ui/components/toast/toast.tsx +0 -211
  1016. package/src/ui/components/toast/toastContext.ts +0 -7
  1017. package/src/ui/components/toast/toastLayer.tsx +0 -38
  1018. package/src/ui/components/toast/toastProvider.tsx +0 -113
  1019. package/src/ui/components/toast/types.ts +0 -28
  1020. package/src/ui/components/toast/useToast.ts +0 -25
  1021. package/src/ui/components/tree/__workshop__/basic.perf.ts +0 -19
  1022. package/src/ui/components/tree/__workshop__/basic.tsx +0 -105
  1023. package/src/ui/components/tree/__workshop__/tabFromElement.tsx +0 -84
  1024. package/src/ui/components/tree/helpers.ts +0 -105
  1025. package/src/ui/components/tree/index.ts +0 -4
  1026. package/src/ui/components/tree/tree.tsx +0 -244
  1027. package/src/ui/components/tree/treeContext.ts +0 -10
  1028. package/src/ui/components/tree/treeGroup.tsx +0 -30
  1029. package/src/ui/components/tree/treeItem.tsx +0 -220
  1030. package/src/ui/components/tree/types.ts +0 -25
  1031. package/src/ui/components/tree/useTree.ts +0 -17
  1032. package/src/ui/constants.ts +0 -79
  1033. package/src/ui/helpers/focus.ts +0 -100
  1034. package/src/ui/helpers/index.ts +0 -5
  1035. package/src/ui/helpers/props.ts +0 -10
  1036. package/src/ui/hooks/index.ts +0 -12
  1037. package/src/ui/hooks/useArrayProp.ts +0 -29
  1038. package/src/ui/hooks/useClickOutside.test.tsx +0 -482
  1039. package/src/ui/hooks/useClickOutside.ts +0 -117
  1040. package/src/ui/hooks/useClickOutsideEvent.test.tsx +0 -115
  1041. package/src/ui/hooks/useClickOutsideEvent.ts +0 -73
  1042. package/src/ui/hooks/useDelayed.test.ts +0 -68
  1043. package/src/ui/hooks/useDelayedState.ts +0 -28
  1044. package/src/ui/hooks/useElementRect/__workshop__/example.tsx +0 -32
  1045. package/src/ui/hooks/useElementRect/index.ts +0 -1
  1046. package/src/ui/hooks/useElementSize.ts +0 -19
  1047. package/src/ui/hooks/useForwardedRef.ts +0 -19
  1048. package/src/ui/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
  1049. package/src/ui/hooks/useMediaIndex/index.ts +0 -1
  1050. package/src/ui/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -36
  1051. package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -104
  1052. package/src/ui/hooks/usePrefersDark.hydration.test.tsx +0 -56
  1053. package/src/ui/hooks/usePrefersDark.test.tsx +0 -19
  1054. package/src/ui/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
  1055. package/src/ui/hooks/usePrefersReducedMotion.test.tsx +0 -19
  1056. package/src/ui/index.ts +0 -9
  1057. package/src/ui/middleware/origin.ts +0 -47
  1058. package/src/ui/observers/elementSizeObserver.ts +0 -116
  1059. package/src/ui/observers/index.ts +0 -2
  1060. package/src/ui/primitives/_selectable/index.ts +0 -1
  1061. package/src/ui/primitives/_selectable/selectable.tsx +0 -31
  1062. package/src/ui/primitives/avatar/__workshop__/asButton.tsx +0 -14
  1063. package/src/ui/primitives/avatar/__workshop__/stack.tsx +0 -25
  1064. package/src/ui/primitives/avatar/__workshop__/withinButton.tsx +0 -63
  1065. package/src/ui/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
  1066. package/src/ui/primitives/avatar/avatar.tsx +0 -158
  1067. package/src/ui/primitives/avatar/avatarCounter.tsx +0 -62
  1068. package/src/ui/primitives/avatar/avatarStack.tsx +0 -82
  1069. package/src/ui/primitives/avatar/index.ts +0 -4
  1070. package/src/ui/primitives/avatar/types.ts +0 -17
  1071. package/src/ui/primitives/badge/__workshop__/props.tsx +0 -30
  1072. package/src/ui/primitives/badge/__workshop__/tones.tsx +0 -21
  1073. package/src/ui/primitives/badge/badge.test.tsx +0 -16
  1074. package/src/ui/primitives/badge/badge.tsx +0 -64
  1075. package/src/ui/primitives/badge/index.ts +0 -1
  1076. package/src/ui/primitives/badge/types.ts +0 -8
  1077. package/src/ui/primitives/box/__workshop__/props.tsx +0 -20
  1078. package/src/ui/primitives/box/__workshop__/responsive.tsx +0 -20
  1079. package/src/ui/primitives/box/box.tsx +0 -155
  1080. package/src/ui/primitives/box/index.ts +0 -1
  1081. package/src/ui/primitives/button/__workshop__/custom.tsx +0 -50
  1082. package/src/ui/primitives/button/__workshop__/customIcons.tsx +0 -30
  1083. package/src/ui/primitives/button/__workshop__/disabled.tsx +0 -74
  1084. package/src/ui/primitives/button/__workshop__/index.ts +0 -59
  1085. package/src/ui/primitives/button/__workshop__/props.tsx +0 -58
  1086. package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
  1087. package/src/ui/primitives/button/__workshop__/stacked.tsx +0 -59
  1088. package/src/ui/primitives/button/__workshop__/uploadButton.tsx +0 -28
  1089. package/src/ui/primitives/button/button.test.tsx +0 -44
  1090. package/src/ui/primitives/button/button.tsx +0 -206
  1091. package/src/ui/primitives/button/index.ts +0 -1
  1092. package/src/ui/primitives/card/__workshop__/allTones.tsx +0 -27
  1093. package/src/ui/primitives/card/__workshop__/asButton.tsx +0 -107
  1094. package/src/ui/primitives/card/__workshop__/asComponent.tsx +0 -27
  1095. package/src/ui/primitives/card/__workshop__/checkered.tsx +0 -26
  1096. package/src/ui/primitives/card/__workshop__/index.ts +0 -18
  1097. package/src/ui/primitives/card/__workshop__/interactive.tsx +0 -30
  1098. package/src/ui/primitives/card/__workshop__/listNavigation.tsx +0 -80
  1099. package/src/ui/primitives/card/__workshop__/props.tsx +0 -55
  1100. package/src/ui/primitives/card/__workshop__/selected.tsx +0 -93
  1101. package/src/ui/primitives/card/card.tsx +0 -119
  1102. package/src/ui/primitives/card/cardContext.ts +0 -10
  1103. package/src/ui/primitives/card/cardProvider.tsx +0 -19
  1104. package/src/ui/primitives/card/index.ts +0 -4
  1105. package/src/ui/primitives/card/types.ts +0 -27
  1106. package/src/ui/primitives/card/useCard.ts +0 -7
  1107. package/src/ui/primitives/checkbox/__workshop__/props.tsx +0 -33
  1108. package/src/ui/primitives/checkbox/__workshop__/tones.tsx +0 -28
  1109. package/src/ui/primitives/checkbox/checkbox.tsx +0 -74
  1110. package/src/ui/primitives/checkbox/index.ts +0 -1
  1111. package/src/ui/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
  1112. package/src/ui/primitives/code/__workshop__/props.tsx +0 -21
  1113. package/src/ui/primitives/code/code.tsx +0 -49
  1114. package/src/ui/primitives/code/index.ts +0 -1
  1115. package/src/ui/primitives/code/refractor.tsx +0 -20
  1116. package/src/ui/primitives/container/__workshop__/example.tsx +0 -20
  1117. package/src/ui/primitives/container/container.tsx +0 -35
  1118. package/src/ui/primitives/container/index.ts +0 -2
  1119. package/src/ui/primitives/flex/__workshop__/example.tsx +0 -34
  1120. package/src/ui/primitives/flex/flex.tsx +0 -29
  1121. package/src/ui/primitives/flex/index.ts +0 -1
  1122. package/src/ui/primitives/grid/grid.tsx +0 -30
  1123. package/src/ui/primitives/grid/index.ts +0 -1
  1124. package/src/ui/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
  1125. package/src/ui/primitives/heading/__workshop__/plain.tsx +0 -32
  1126. package/src/ui/primitives/heading/heading.tsx +0 -62
  1127. package/src/ui/primitives/heading/index.ts +0 -1
  1128. package/src/ui/primitives/index.ts +0 -27
  1129. package/src/ui/primitives/inline/__workshop__/plain.tsx +0 -27
  1130. package/src/ui/primitives/inline/index.ts +0 -1
  1131. package/src/ui/primitives/inline/inline.tsx +0 -50
  1132. package/src/ui/primitives/inline/types.ts +0 -6
  1133. package/src/ui/primitives/kbd/index.ts +0 -1
  1134. package/src/ui/primitives/kbd/kbd.tsx +0 -55
  1135. package/src/ui/primitives/label/__workshop__/plain.tsx +0 -37
  1136. package/src/ui/primitives/label/index.ts +0 -1
  1137. package/src/ui/primitives/label/label.tsx +0 -67
  1138. package/src/ui/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
  1139. package/src/ui/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  1140. package/src/ui/primitives/popover/__workshop__/PlainStory.tsx +0 -71
  1141. package/src/ui/primitives/popover/__workshop__/RecursiveStory.tsx +0 -70
  1142. package/src/ui/primitives/popover/__workshop__/SidePanelStory.tsx +0 -93
  1143. package/src/ui/primitives/popover/__workshop__/TestStory.tsx +0 -98
  1144. package/src/ui/primitives/popover/constants.ts +0 -22
  1145. package/src/ui/primitives/popover/floating-ui/size.ts +0 -83
  1146. package/src/ui/primitives/popover/helpers.ts +0 -32
  1147. package/src/ui/primitives/popover/index.ts +0 -2
  1148. package/src/ui/primitives/popover/popover.tsx +0 -492
  1149. package/src/ui/primitives/popover/popoverCard.tsx +0 -155
  1150. package/src/ui/primitives/popover/types.ts +0 -6
  1151. package/src/ui/primitives/radio/__workshop__/example.tsx +0 -63
  1152. package/src/ui/primitives/radio/__workshop__/plain.tsx +0 -28
  1153. package/src/ui/primitives/radio/index.ts +0 -1
  1154. package/src/ui/primitives/radio/radio.tsx +0 -49
  1155. package/src/ui/primitives/select/__workshop__/plain.tsx +0 -30
  1156. package/src/ui/primitives/select/__workshop__/readOnly.tsx +0 -23
  1157. package/src/ui/primitives/select/index.ts +0 -1
  1158. package/src/ui/primitives/select/select.tsx +0 -85
  1159. package/src/ui/primitives/spinner/__workshop__/Props.tsx +0 -16
  1160. package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +0 -16
  1161. package/src/ui/primitives/spinner/index.ts +0 -1
  1162. package/src/ui/primitives/spinner/spinner.tsx +0 -33
  1163. package/src/ui/primitives/stack/__workshop__/plain.tsx +0 -32
  1164. package/src/ui/primitives/stack/index.ts +0 -1
  1165. package/src/ui/primitives/stack/stack.tsx +0 -40
  1166. package/src/ui/primitives/switch/index.ts +0 -1
  1167. package/src/ui/primitives/switch/switch.tsx +0 -75
  1168. package/src/ui/primitives/text/__workshop__/colored.tsx +0 -23
  1169. package/src/ui/primitives/text/__workshop__/example.tsx +0 -39
  1170. package/src/ui/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
  1171. package/src/ui/primitives/text/index.ts +0 -1
  1172. package/src/ui/primitives/text/text.tsx +0 -64
  1173. package/src/ui/primitives/textArea/__workshop__/plain.tsx +0 -50
  1174. package/src/ui/primitives/textArea/index.ts +0 -1
  1175. package/src/ui/primitives/textArea/textArea.tsx +0 -71
  1176. package/src/ui/primitives/textInput/__workshop__/customValidity.tsx +0 -17
  1177. package/src/ui/primitives/textInput/__workshop__/plain.tsx +0 -104
  1178. package/src/ui/primitives/textInput/__workshop__/states.tsx +0 -53
  1179. package/src/ui/primitives/textInput/__workshop__/tones.tsx +0 -277
  1180. package/src/ui/primitives/textInput/__workshop__/typed.tsx +0 -23
  1181. package/src/ui/primitives/textInput/index.ts +0 -1
  1182. package/src/ui/primitives/textInput/textInput.tsx +0 -286
  1183. package/src/ui/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
  1184. package/src/ui/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
  1185. package/src/ui/primitives/tooltip/__workshop__/props.tsx +0 -111
  1186. package/src/ui/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
  1187. package/src/ui/primitives/tooltip/constants.ts +0 -23
  1188. package/src/ui/primitives/tooltip/index.ts +0 -2
  1189. package/src/ui/primitives/tooltip/tooltip.test.tsx +0 -453
  1190. package/src/ui/primitives/tooltip/tooltip.tsx +0 -467
  1191. package/src/ui/primitives/tooltip/tooltipCard.tsx +0 -115
  1192. package/src/ui/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -11
  1193. package/src/ui/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
  1194. package/src/ui/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
  1195. package/src/ui/primitives/types.ts +0 -166
  1196. package/src/ui/types/avatar.ts +0 -19
  1197. package/src/ui/types/badge.ts +0 -12
  1198. package/src/ui/types/button.ts +0 -24
  1199. package/src/ui/types/card.ts +0 -6
  1200. package/src/ui/types/dialog.ts +0 -4
  1201. package/src/ui/types/flex.ts +0 -27
  1202. package/src/ui/types/index.ts +0 -15
  1203. package/src/ui/types/popover.ts +0 -4
  1204. package/src/ui/types/props.ts +0 -18
  1205. package/src/ui/types/radius.ts +0 -7
  1206. package/src/ui/types/selectable.ts +0 -7
  1207. package/src/ui/utils/arrow/arrow.tsx +0 -59
  1208. package/src/ui/utils/arrow/index.ts +0 -1
  1209. package/src/ui/utils/boundaryElement/boundaryElement.test.tsx +0 -100
  1210. package/src/ui/utils/boundaryElement/boundaryElementContext.ts +0 -7
  1211. package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +0 -24
  1212. package/src/ui/utils/boundaryElement/index.ts +0 -3
  1213. package/src/ui/utils/boundaryElement/types.ts +0 -7
  1214. package/src/ui/utils/boundaryElement/useBoundaryElement.ts +0 -26
  1215. package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
  1216. package/src/ui/utils/conditionalWrapper/index.ts +0 -1
  1217. package/src/ui/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
  1218. package/src/ui/utils/elementQuery/elementQuery.tsx +0 -53
  1219. package/src/ui/utils/elementQuery/index.ts +0 -1
  1220. package/src/ui/utils/errorBoundary.tsx +0 -48
  1221. package/src/ui/utils/getElementRef.ts +0 -26
  1222. package/src/ui/utils/index.ts +0 -9
  1223. package/src/ui/utils/layer/__workshop__/index.ts +0 -24
  1224. package/src/ui/utils/layer/__workshop__/multipleRoots.tsx +0 -49
  1225. package/src/ui/utils/layer/__workshop__/nested.tsx +0 -98
  1226. package/src/ui/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
  1227. package/src/ui/utils/layer/getLayerContext.test.ts +0 -30
  1228. package/src/ui/utils/layer/getLayerContext.ts +0 -21
  1229. package/src/ui/utils/layer/index.ts +0 -4
  1230. package/src/ui/utils/layer/layer.test.tsx +0 -108
  1231. package/src/ui/utils/layer/layer.tsx +0 -112
  1232. package/src/ui/utils/layer/layerContext.ts +0 -7
  1233. package/src/ui/utils/layer/layerProvider.tsx +0 -110
  1234. package/src/ui/utils/layer/useLayer.ts +0 -26
  1235. package/src/ui/utils/portal/__workshop__/named.tsx +0 -63
  1236. package/src/ui/utils/portal/index.ts +0 -4
  1237. package/src/ui/utils/portal/portal.test.tsx +0 -103
  1238. package/src/ui/utils/portal/portal.ts +0 -46
  1239. package/src/ui/utils/portal/portalContext.ts +0 -31
  1240. package/src/ui/utils/portal/portalProvider.tsx +0 -79
  1241. package/src/ui/utils/portal/types.ts +0 -9
  1242. package/src/ui/utils/portal/usePortal.ts +0 -25
  1243. package/src/ui/utils/srOnly/index.ts +0 -1
  1244. package/src/ui/utils/srOnly/srOnly.tsx +0 -35
  1245. package/src/ui/utils/virtualList/__workshop__/index.ts +0 -29
  1246. package/src/ui/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
  1247. package/src/ui/utils/virtualList/index.ts +0 -1
  1248. package/src/ui/utils/virtualList/virtualList.tsx +0 -189
  1249. /package/src/{ui/global.ts → core/__DEV__.ts} +0 -0
  1250. /package/src/{ui/components/autocomplete/__mocks__ → core/components/autocomplete/__workshop__/mock}/apiStore.ts +0 -0
  1251. /package/src/{ui/components/autocomplete/__mocks__ → core/components/autocomplete/__workshop__/mock}/countries.ts +0 -0
  1252. /package/src/{ui → core}/components/autocomplete/__workshop__/types.ts +0 -0
  1253. /package/src/{ui → core}/components/breadcrumbs/__workshop__/index.ts +0 -0
  1254. /package/src/{ui → core}/components/dialog/__workshop__/index.ts +0 -0
  1255. /package/src/{ui → core}/components/dialog/__workshop__/layering.tsx +0 -0
  1256. /package/src/{ui → core}/components/dialog/__workshop__/nested.tsx +0 -0
  1257. /package/src/{ui → core}/components/dialog/__workshop__/provider.tsx +0 -0
  1258. /package/src/{ui → core}/components/hotkeys/__workshop__/index.ts +0 -0
  1259. /package/src/{ui → core}/components/hotkeys/__workshop__/plain.tsx +0 -0
  1260. /package/src/{ui → core}/components/menu/__workshop__/index.ts +0 -0
  1261. /package/src/{ui → core}/components/tab/__workshop__/index.ts +0 -0
  1262. /package/src/{ui → core}/components/toast/__workshop__/index.ts +0 -0
  1263. /package/src/{ui → core}/components/toast/toastState.ts +0 -0
  1264. /package/src/{ui → core}/components/tree/__workshop__/index.ts +0 -0
  1265. /package/src/{ui/utils → core/components}/virtualList/__workshop__/changingProps.tsx +0 -0
  1266. /package/src/{ui/utils → core/components}/virtualList/__workshop__/elementScroll.tsx +0 -0
  1267. /package/src/{ui/utils → core/components}/virtualList/__workshop__/windowScrolll.tsx +0 -0
  1268. /package/src/{ui → core}/helpers/animation.ts +0 -0
  1269. /package/src/{ui → core}/helpers/element.ts +0 -0
  1270. /package/src/{ui → core}/helpers/scroll.ts +0 -0
  1271. /package/src/{ui → core}/hooks/useCustomValidity.ts +0 -0
  1272. /package/src/{ui → core}/hooks/useElementRect/__workshop__/index.ts +0 -0
  1273. /package/src/{ui → core}/hooks/useElementRect/useElementRect.ts +0 -0
  1274. /package/src/{ui → core}/hooks/useGlobalKeyDown.ts +0 -0
  1275. /package/src/{ui → core}/hooks/useIsomorphicEffect.ts +0 -0
  1276. /package/src/{ui → core}/hooks/useMatchMedia.ts +0 -0
  1277. /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/index.ts +0 -0
  1278. /package/src/{ui → core}/hooks/useMounted.ts +0 -0
  1279. /package/src/{ui → core}/hooks/usePrefersDark.ts +0 -0
  1280. /package/src/{ui → core}/hooks/usePrefersReducedMotion.ts +0 -0
  1281. /package/src/{ui → core}/lib/createGlobalScopedContext.ts +0 -0
  1282. /package/src/{ui → core}/lib/globalScope.ts +0 -0
  1283. /package/src/{theme/build → core}/lib/isRecord.ts +0 -0
  1284. /package/src/{ui/observers/resizeObserver.ts → core/observers/resize.ts} +0 -0
  1285. /package/src/{ui/utils → core/primitives}/arrow/cmds.ts +0 -0
  1286. /package/src/{ui → core}/primitives/avatar/__workshop__/index.ts +0 -0
  1287. /package/src/{ui → core}/primitives/badge/__workshop__/index.ts +0 -0
  1288. /package/src/{ui → core}/primitives/box/__workshop__/index.ts +0 -0
  1289. /package/src/{ui/types/box.ts → core/primitives/box/types.ts} +0 -0
  1290. /package/src/{ui → core}/primitives/button/__workshop__/mixedChildren.tsx +0 -0
  1291. /package/src/{ui → core}/primitives/button/__workshop__/styled1.tsx +0 -0
  1292. /package/src/{ui → core}/primitives/button/__workshop__/styled2.tsx +0 -0
  1293. /package/src/{ui → core}/primitives/card/__workshop__/styled.tsx +0 -0
  1294. /package/src/{ui → core}/primitives/checkbox/__workshop__/example.tsx +0 -0
  1295. /package/src/{ui → core}/primitives/checkbox/__workshop__/index.ts +0 -0
  1296. /package/src/{ui → core}/primitives/checkbox/__workshop__/readOnly.tsx +0 -0
  1297. /package/src/{ui → core}/primitives/code/__workshop__/index.ts +0 -0
  1298. /package/src/{ui → core}/primitives/container/__workshop__/index.ts +0 -0
  1299. /package/src/{ui → core}/primitives/container/types.ts +0 -0
  1300. /package/src/{ui → core}/primitives/flex/__workshop__/gap.tsx +0 -0
  1301. /package/src/{ui → core}/primitives/flex/__workshop__/index.ts +0 -0
  1302. /package/src/{ui → core}/primitives/grid/__workshop__/index.ts +0 -0
  1303. /package/src/{ui → core}/primitives/grid/__workshop__/responsive.tsx +0 -0
  1304. /package/src/{ui/types/grid.ts → core/primitives/grid/types.ts} +0 -0
  1305. /package/src/{ui → core}/primitives/heading/__workshop__/index.ts +0 -0
  1306. /package/src/{ui → core}/primitives/inline/__workshop__/index.ts +0 -0
  1307. /package/src/{ui → core}/primitives/kbd/__workshop__/index.ts +0 -0
  1308. /package/src/{ui → core}/primitives/kbd/__workshop__/plain.tsx +0 -0
  1309. /package/src/{ui → core}/primitives/label/__workshop__/index.ts +0 -0
  1310. /package/src/{ui → core}/primitives/label/__workshop__/opticalAlignment.tsx +0 -0
  1311. /package/src/{ui/utils → core/primitives}/layer/__workshop__/_debug.tsx +0 -0
  1312. /package/src/{ui/utils → core/primitives}/layer/types.ts +0 -0
  1313. /package/src/{ui → core}/primitives/popover/__workshop__/MarginsStory.tsx +0 -0
  1314. /package/src/{ui → core}/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -0
  1315. /package/src/{ui → core}/primitives/popover/__workshop__/index.ts +0 -0
  1316. /package/src/{ui → core}/primitives/radio/__workshop__/index.ts +0 -0
  1317. /package/src/{ui → core}/primitives/select/__workshop__/index.ts +0 -0
  1318. /package/src/{ui → core}/primitives/spinner/__workshop__/index.ts +0 -0
  1319. /package/src/{ui → core}/primitives/stack/__workshop__/index.ts +0 -0
  1320. /package/src/{ui → core}/primitives/switch/__workshop__/example.tsx +0 -0
  1321. /package/src/{ui → core}/primitives/switch/__workshop__/index.ts +0 -0
  1322. /package/src/{ui → core}/primitives/switch/__workshop__/props.tsx +0 -0
  1323. /package/src/{ui → core}/primitives/text/__workshop__/index.ts +0 -0
  1324. /package/src/{ui → core}/primitives/textArea/__workshop__/index.ts +0 -0
  1325. /package/src/{ui → core}/primitives/textInput/__workshop__/clearButton.tsx +0 -0
  1326. /package/src/{ui → core}/primitives/textInput/__workshop__/index.ts +0 -0
  1327. /package/src/{ui → core}/primitives/textInput/__workshop__/readOnly.tsx +0 -0
  1328. /package/src/{ui → core}/primitives/tooltip/__workshop__/index.ts +0 -0
  1329. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/index.ts +0 -0
  1330. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/types.ts +0 -0
  1331. /package/src/{ui → core}/types/gridItem.ts +0 -0
  1332. /package/src/{ui → core}/types/placement.ts +0 -0
  1333. /package/src/{ui/types/text.ts → core/types/textAlign.ts} +0 -0
  1334. /package/src/{ui → core}/utils/boundaryElement/__workshop__/index.ts +0 -0
  1335. /package/src/{ui → core}/utils/boundaryElement/__workshop__/plain.tsx +0 -0
  1336. /package/src/{ui → core}/utils/elementQuery/__workshop__/index.ts +0 -0
  1337. /package/src/{ui → core}/utils/elementQuery/helpers.ts +0 -0
  1338. /package/src/{ui → core}/utils/portal/__workshop__/index.ts +0 -0
  1339. /package/src/{ui → core}/utils/spanWithTextOverflow.tsx +0 -0
  1340. /package/src/css/{aspects → props}/pointerEvents/types.ts +0 -0
  1341. /package/src/theme/{build → v2/build}/_deprecated/color/index.ts +0 -0
  1342. /package/src/theme/{build → v2/build}/colorToken/index.ts +0 -0
  1343. /package/src/theme/{build → v2/build}/index.ts +0 -0
  1344. /package/src/theme/{build → v2/build}/lib/color-fns/blend/index.ts +0 -0
  1345. /package/src/theme/{build → v2/build}/lib/color-fns/index.ts +0 -0
  1346. /package/src/theme/{build → v2/build}/lib/color-fns/rgba.ts +0 -0
  1347. /package/src/theme/{build → v2/build}/lib/color-fns/types.ts +0 -0
  1348. /package/src/{ui → theme/v2/build}/lib/isRecord.ts +0 -0
  1349. /package/src/theme/{build → v2/build}/lib/utils.ts +0 -0
  1350. /package/src/theme/{build → v2/build}/merge.ts +0 -0
  1351. /package/src/theme/{config → v2/config}/index.ts +0 -0
  1352. /package/src/theme/{config → v2/config}/tokens/color/index.ts +0 -0
  1353. /package/src/theme/{palette → v3/palette}/index.ts +0 -0
package/dist/index.d.ts CHANGED
@@ -1,37 +1,39 @@
1
+ import type {AvatarColor} from '@sanity/ui/theme'
1
2
  import {AvatarSize} from '@sanity/ui/theme'
2
3
  import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
3
4
  import {Display as BoxDisplay} from '@sanity/ui/css'
4
5
  import {BoxHeight} from '@sanity/ui/css'
5
6
  import {BoxOverflow} from '@sanity/ui/css'
6
7
  import {BoxSizing} from '@sanity/ui/css'
7
- import {BoxStyleProps} from '@sanity/ui/css'
8
- import {ButtonStyleProps} from '@sanity/ui/css'
9
- import {CardContextValue as CardContextValue_2} from './types'
8
+ import type {BoxStyleProps} from '@sanity/ui/css'
9
+ import {Breakpoint} from '@sanity/ui/css'
10
+ import type {ButtonStyleProps} from '@sanity/ui/css'
10
11
  import {CardStyleProps as CardStyleProps_2} from '@sanity/ui/css'
12
+ import {CodeStyleProps} from '@sanity/ui/css'
11
13
  import {Component} from 'react'
14
+ import type {ComponentClass} from 'react'
12
15
  import type {ComponentProps} from 'react'
13
- import {ComponentType} from 'react'
16
+ import type {ComponentType as ComponentType_2} from 'react'
14
17
  import {ContainerStyleProps} from '@sanity/ui/css'
18
+ import type {ContainerWidth} from '@sanity/ui/theme'
15
19
  import {Context} from 'react'
16
20
  import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
17
- import {CSSObject} from '@sanity/ui/theme'
18
- import {DisplayStyleProps} from '@sanity/ui/css'
19
- import {ElementProps as ElementProps_2} from '../..'
20
- import {ElementType} from 'react'
21
+ import type {CSSObject} from '@sanity/ui/theme'
22
+ import type {DisplayStyleProps} from '@sanity/ui/css'
23
+ import {ElementType as ElementType_2} from 'react'
21
24
  import {ErrorInfo} from 'react'
22
- import {FlexAlign} from '@sanity/ui/css'
25
+ import type {ExoticComponent} from 'react'
26
+ import {AlignItems as FlexAlign} from '@sanity/ui/css'
23
27
  import {FlexDirection} from '@sanity/ui/css'
24
- import {FlexJustify} from '@sanity/ui/css'
25
- import {FlexStyleProps} from '@sanity/ui/css'
26
- import {FlexValue} from '@sanity/ui/css'
28
+ import {JustifyContent as FlexJustify} from '@sanity/ui/css'
29
+ import {Flex as FlexValue} from '@sanity/ui/css'
27
30
  import {FlexWrap} from '@sanity/ui/css'
28
- import {FontCodeSize} from '@sanity/ui/theme'
29
- import {FontHeadingSize} from '@sanity/ui/theme'
30
- import {FontLabelSize} from '@sanity/ui/theme'
31
- import {FontStyleProps} from '@sanity/ui/css'
32
- import {FontTextSize} from '@sanity/ui/theme'
31
+ import type {FontCodeSize} from '@sanity/ui/theme'
32
+ import type {FontHeadingSize} from '@sanity/ui/theme'
33
+ import type {FontLabelSize} from '@sanity/ui/theme'
34
+ import type {FontTextSize} from '@sanity/ui/theme'
33
35
  import {ForwardedRef} from 'react'
34
- import {ForwardRefExoticComponent} from 'react'
36
+ import type {FunctionComponent} from 'react'
35
37
  import {GapStyleProps} from '@sanity/ui/css'
36
38
  import {GridAutoCols} from '@sanity/ui/css'
37
39
  import {GridAutoFlow} from '@sanity/ui/css'
@@ -46,50 +48,52 @@ import {HeadingStyleProps} from '@sanity/ui/css'
46
48
  import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
47
49
  import {HSL as HSL_2} from '@sanity/ui/theme'
48
50
  import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
51
+ import {HTMLAttributes} from 'react'
49
52
  import {InputStyleProps} from '@sanity/ui/css'
50
- import {InsetStyleProps} from '@sanity/ui/css'
53
+ import type {InsetStyleProps} from '@sanity/ui/css'
51
54
  import {JSX} from 'react'
52
- import {LabelSize} from '@sanity/ui/css'
55
+ import {LabelStyleProps} from '@sanity/ui/css'
56
+ import {MaxWidth} from '@sanity/ui/css'
57
+ import {MouseEventHandler} from 'react'
53
58
  import {multiply as multiply_2} from '@sanity/ui/theme'
54
59
  import {MutableRefObject} from 'react'
55
- import {NamedExoticComponent} from 'react'
56
60
  import {PaddingStyleProps} from '@sanity/ui/css'
57
61
  import {parseColor as parseColor_2} from '@sanity/ui/theme'
58
62
  import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
59
- import {PolymorphicProps as PolymorphicProps_2} from '../..'
60
- import {PositionStyleProps} from '@sanity/ui/css'
63
+ import type {PositionStyleProps} from '@sanity/ui/css'
61
64
  import {PropsWithChildren} from 'react'
62
65
  import {px} from '@sanity/ui/css'
63
66
  import {Radius} from '@sanity/ui/theme'
64
67
  import {RadiusStyleProps} from '@sanity/ui/css'
65
68
  import {ReactElement} from 'react'
66
69
  import {ReactNode} from 'react'
67
- import {ReactPortal} from 'react'
70
+ import type {ReactPortal} from 'react'
71
+ import {Ref} from 'react'
68
72
  import {RefAttributes} from 'react'
69
- import {RefCallback} from 'react'
70
73
  import {rem} from '@sanity/ui/css'
71
74
  import {ResponsiveProp} from '@sanity/ui/css'
72
75
  import {RGB as RGB_2} from '@sanity/ui/theme'
73
76
  import {rgba as rgba_2} from '@sanity/ui/theme'
74
77
  import {rgbToHex as rgbToHex_2} from '@sanity/ui/theme'
75
78
  import {rgbToHsl as rgbToHsl_2} from '@sanity/ui/theme'
79
+ import {RootStyleProps} from '@sanity/ui/css'
76
80
  import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
77
81
  import {screen as screen_3} from '@sanity/ui/theme'
82
+ import {SelectableStyleProps} from '@sanity/ui/css'
78
83
  import {SelectStyleProps} from '@sanity/ui/css'
79
84
  import {ShadowStyleProps} from '@sanity/ui/css'
80
85
  import {SkeletonStyleProps} from '@sanity/ui/css'
81
- import {Space} from '@sanity/ui/theme'
86
+ import type {Space} from '@sanity/ui/theme'
82
87
  import {TextAlign} from '@sanity/ui/css'
83
88
  import {TextAreaStyleProps} from '@sanity/ui/css'
84
89
  import {TextOverflowStyleProps} from '@sanity/ui/css'
85
90
  import {TextStyleProps} from '@sanity/ui/css'
86
91
  import {Theme as Theme_2} from '@sanity/ui/theme'
87
92
  import {Theme_v2} from '@sanity/ui/theme'
88
- import {Theme_v3} from '@sanity/ui/theme'
89
93
  import {ThemeAvatar} from '@sanity/ui/theme'
90
94
  import {ThemeBoxShadow} from '@sanity/ui/theme'
91
95
  import {ThemeColor} from '@sanity/ui/theme'
92
- import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
96
+ import type {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
93
97
  import {ThemeColorBase} from '@sanity/ui/theme'
94
98
  import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
95
99
  import {ThemeColorButton} from '@sanity/ui/theme'
@@ -117,7 +121,7 @@ import {ThemeColorSolid} from '@sanity/ui/theme'
117
121
  import {ThemeColorSolidTone} from '@sanity/ui/theme'
118
122
  import {ThemeColorSpot} from '@sanity/ui/theme'
119
123
  import {ThemeColorSpotKey} from '@sanity/ui/theme'
120
- import {ThemeColorStateToneKey} from '@sanity/ui/theme'
124
+ import type {ThemeColorStateToneKey} from '@sanity/ui/theme'
121
125
  import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
122
126
  import {ThemeColorToneKey} from '@sanity/ui/theme'
123
127
  import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
@@ -130,19 +134,35 @@ import {ThemeInput} from '@sanity/ui/theme'
130
134
  import {ThemeLayer as ThemeLayer_2} from '@sanity/ui/theme'
131
135
  import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
132
136
  import {ThemeStyles} from '@sanity/ui/theme'
133
- import {Width} from '@sanity/ui/css'
137
+ import type {Width} from '@sanity/ui/css'
134
138
 
135
139
  /** @internal */
136
- export declare const Arrow: ForwardRefExoticComponent<
137
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'radius' | 'height' | 'width'> & {
138
- width: number
139
- height: number
140
- radius?: number
141
- } & RefAttributes<HTMLDivElement>
140
+ export declare function Arrow<E extends ArrowElementType = typeof DEFAULT_ARROW_ELEMENT>(
141
+ props: ArrowProps<E>,
142
+ ): JSX.Element
143
+
144
+ /** @internal */
145
+ export declare type ArrowElementType = 'div' | 'span' | ComponentType
146
+
147
+ /** @internal */
148
+ export declare type ArrowOwnProps = {
149
+ width: number
150
+ height: number
151
+ radius?: number
152
+ }
153
+
154
+ /** @internal */
155
+ export declare type ArrowProps<E extends ArrowElementType = ArrowElementType> = Props<
156
+ ArrowOwnProps,
157
+ E
142
158
  >
143
159
 
144
- /** @public */
145
- export declare type Assign<T, U> = Omit<T, keyof U> & U
160
+ /**
161
+ * Assign properties from `U` to `T`, excluding properties that already exist in `T`.
162
+ *
163
+ * @public
164
+ */
165
+ export declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
146
166
 
147
167
  /**
148
168
  * @internal
@@ -155,22 +175,13 @@ export declare function attemptFocus(element: HTMLElement): boolean
155
175
  *
156
176
  * @public
157
177
  */
158
- export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
159
- props: Omit<
160
- Props<AutocompleteProps<Option>, 'input'>,
161
- | 'aria-activedescendant'
162
- | 'aria-autocomplete'
163
- | 'aria-expanded'
164
- | 'aria-owns'
165
- | 'autoCapitalize'
166
- | 'autoComplete'
167
- | 'autoCorrect'
168
- | 'inputMode'
169
- | 'role'
170
- | 'spellCheck'
171
- | 'type'
172
- >,
173
- ) => ReactElement
178
+ export declare function Autocomplete<
179
+ E extends AutocompleteElementType = typeof DEFAULT_AUTOCOMPLETE_ELEMENT,
180
+ O extends BaseAutocompleteOption = BaseAutocompleteOption,
181
+ >(props: AutocompleteProps<E, O>): JSX.Element
182
+
183
+ /** @public */
184
+ export declare type AutocompleteElementType = 'input' | ComponentType
174
185
 
175
186
  /**
176
187
  * @internal
@@ -201,26 +212,19 @@ export declare type AutocompleteMsg =
201
212
  | AutocompleteInputFoocusMsg
202
213
  | AutocompleteValueChangeMsg
203
214
 
204
- /**
205
- * @public
206
- */
207
- export declare type AutocompleteOpenButtonProps = Omit<Props<ButtonProps, 'button'>, 'as'>
215
+ /** @public */
216
+ export declare type AutocompleteOpenButtonProps = Omit<ButtonProps<'button'>, 'as'>
208
217
 
209
- /**
210
- * @public
211
- */
212
- export declare interface AutocompleteProps<
213
- Option extends BaseAutocompleteOption = BaseAutocompleteOption,
214
- > {
218
+ /** @public */
219
+ export declare type AutocompleteOwnProps<
220
+ O extends BaseAutocompleteOption = BaseAutocompleteOption,
221
+ > = TextInputOwnProps & {
215
222
  border?: boolean
216
223
  customValidity?: string
217
- disabled?: boolean
218
- filterOption?: (query: string, option: Option) => boolean
219
- fontSize?: ResponsiveProp<FontTextSize>
220
- icon?: ElementType | ReactNode
221
- id: string
224
+ filterOption?: (query: string, option: O) => boolean
225
+ icon?: ElementType_2 | ReactNode
222
226
  /** @beta */
223
- listBox?: BoxProps
227
+ listBox?: BoxOwnProps
224
228
  loading?: boolean
225
229
  onChange?: (value: string) => void
226
230
  onQueryChange?: (query: string | null) => void
@@ -230,17 +234,15 @@ export declare interface AutocompleteProps<
230
234
  /** @beta */
231
235
  openOnFocus?: boolean
232
236
  /** The options to render. */
233
- options?: Option[]
237
+ options?: O[]
234
238
  padding?: ResponsiveProp<Space>
235
239
  popover?: Omit<Props<PopoverProps, 'div'>, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'>
236
240
  prefix?: ReactNode
237
241
  radius?: Radius | Radius[]
238
- readOnly?: boolean
239
- ref?: ForwardedRef<HTMLInputElement>
240
242
  /** @beta */
241
243
  relatedElements?: HTMLElement[]
242
244
  /** The callback function for rendering each option. */
243
- renderOption?: (option: Option) => React.JSX.Element
245
+ renderOption?: (option: O) => React.JSX.Element
244
246
  /** @beta */
245
247
  renderPopover?: (
246
248
  props: {
@@ -252,12 +254,17 @@ export declare interface AutocompleteProps<
252
254
  },
253
255
  ref: ForwardedRef<HTMLDivElement>,
254
256
  ) => ReactNode
255
- renderValue?: (value: string, option?: Option) => string
257
+ renderValue?: (value: string, option?: O) => string
256
258
  suffix?: ReactNode
257
- /** The current value. */
258
259
  value?: string
259
260
  }
260
261
 
262
+ /** @public */
263
+ export declare type AutocompleteProps<
264
+ E extends AutocompleteElementType = AutocompleteElementType,
265
+ O extends BaseAutocompleteOption = BaseAutocompleteOption,
266
+ > = Props<AutocompleteOwnProps<O>, E>
267
+
261
268
  /**
262
269
  * @internal
263
270
  */
@@ -328,60 +335,63 @@ export declare interface AutocompleteValueChangeMsg {
328
335
  *
329
336
  * @public
330
337
  */
331
- export declare const Avatar: ForwardRefExoticComponent<
332
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarProps> &
333
- AvatarProps &
334
- RefAttributes<HTMLDivElement>
335
- >
338
+ export declare function Avatar<E extends AvatarElementType = typeof DEFAULT_AVATAR_ELEMENT>(
339
+ props: AvatarProps<E>,
340
+ ): JSX.Element
336
341
 
337
- /**
338
- * @public
339
- */
340
- export declare const AvatarCounter: ForwardRefExoticComponent<
341
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarCounterProps> &
342
- AvatarCounterProps &
343
- RefAttributes<HTMLDivElement>
344
- >
342
+ /** @public */
343
+ export declare function AvatarCounter<
344
+ E extends AvatarCounterElementType = typeof DEFAULT_AVATAR_COUNTER_ELEMENT,
345
+ >(props: AvatarCounterProps<E>): JSX.Element
345
346
 
346
- /**
347
- * @public
348
- */
349
- export declare interface AvatarCounterProps
350
- extends Omit<BoxProps, 'align' | 'className' | 'display' | 'justify' | 'paddingX' | 'sizing'> {
347
+ /** @public */
348
+ export declare type AvatarCounterElementType = 'button' | 'div' | 'span' | ComponentType
349
+
350
+ /** @public */
351
+ export declare interface AvatarCounterOwnProps {
351
352
  count: number
352
353
  size?: ResponsiveProp<AvatarSize>
353
- /** @deprecated No longer supported. */
354
- tone?: 'navbar'
355
354
  }
356
355
 
357
- /**
358
- * @public
359
- */
360
- export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
356
+ /** @public */
357
+ export declare type AvatarCounterProps<
358
+ E extends AvatarCounterElementType = AvatarCounterElementType,
359
+ > = Props<AvatarCounterOwnProps, E>
361
360
 
362
- /**
363
- * @public
364
- */
365
- export declare interface AvatarProps {
361
+ /** @public */
362
+ export declare type AvatarElementType = 'a' | 'button' | 'div' | 'span' | ComponentType
363
+
364
+ /** @public */
365
+ export declare interface AvatarOwnProps {
366
366
  /** @beta */
367
367
  __unstable_hideInnerStroke?: boolean
368
368
  animateArrowFrom?: AvatarPosition
369
369
  arrowPosition?: AvatarPosition
370
- color?: ThemeColorAvatarColorKey
370
+ color?: AvatarColor
371
371
  initials?: string
372
372
  onImageLoadError?: (event: Error) => void
373
373
  size?: ResponsiveProp<AvatarSize>
374
374
  src?: string
375
375
  /**
376
376
  * The status of the entity this Avatar represents.
377
- * @alpha
377
+ * @deprecated Will be removed in next major version.
378
378
  */
379
379
  status?: AvatarStatus
380
380
  title?: string
381
381
  }
382
382
 
383
+ /** @public */
384
+ export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
385
+
386
+ /** @public */
387
+ export declare type AvatarProps<E extends AvatarElementType = AvatarElementType> = Props<
388
+ AvatarOwnProps,
389
+ E
390
+ >
391
+
383
392
  /**
384
393
  * @internal
394
+ * @deprecated This will be removed in next major version.
385
395
  */
386
396
  export declare interface AvatarRootStyleProps {
387
397
  $color: ThemeColorAvatarColorKey
@@ -389,29 +399,22 @@ export declare interface AvatarRootStyleProps {
389
399
 
390
400
  export {AvatarSize}
391
401
 
392
- /**
393
- * @public
394
- */
395
- export declare const AvatarStack: ForwardRefExoticComponent<
396
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof AvatarStackProps> &
397
- AvatarStackProps &
398
- RefAttributes<HTMLDivElement>
399
- >
402
+ /** @public */
403
+ export declare function AvatarStack<
404
+ E extends AvatarStackElementType = typeof DEFAULT_AVATAR_STACK_ELEMENT,
405
+ >(props: AvatarStackProps<E>): JSX.Element
400
406
 
401
- /**
402
- * @public
403
- */
404
- export declare type AvatarStackChild =
405
- | ReactElement<Props<AvatarProps, 'div'>>
406
- | null
407
- | undefined
408
- | false
407
+ /** @public */
408
+ export declare type AvatarStackChild = ReactElement<AvatarProps<'div'>> | null | undefined | false
409
409
 
410
- /**
411
- * @public
412
- */
413
- export declare interface AvatarStackProps
414
- extends Omit<BoxProps, 'align' | 'className' | 'display'> {
410
+ /** @public */
411
+ export declare type AvatarStackElementType = 'div' | 'span' | ComponentType
412
+
413
+ /** @public */
414
+ export declare type AvatarStackOwnProps = Omit<
415
+ BoxOwnProps,
416
+ 'align' | 'alignItems' | 'display' | 'justify' | 'justifyContent'
417
+ > & {
415
418
  children: AvatarStackChild | AvatarStackChild[]
416
419
  maxLength?: number
417
420
  size?: ResponsiveProp<AvatarSize>
@@ -419,11 +422,14 @@ export declare interface AvatarStackProps
419
422
  tone?: 'navbar'
420
423
  }
421
424
 
425
+ /** @public */
426
+ export declare type AvatarStackProps<E extends AvatarStackElementType = AvatarStackElementType> =
427
+ Props<AvatarStackOwnProps, E>
428
+
429
+ /** @public */
422
430
  /**
423
431
  * @public
424
- */
425
- /**
426
- * @public
432
+ * @deprecated Will be removed in next major version.
427
433
  */
428
434
  export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
429
435
 
@@ -432,37 +438,30 @@ export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
432
438
  *
433
439
  * @public
434
440
  */
435
- export declare const Badge: ForwardRefExoticComponent<
436
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BadgeProps> &
437
- BadgeProps &
438
- RefAttributes<HTMLDivElement>
439
- >
441
+ export declare function Badge<E extends BadgeElementType = typeof DEFAULT_BADGE_ELEMENT>(
442
+ props: BadgeProps<E>,
443
+ ): JSX.Element
440
444
 
441
- /**
442
- * @public
443
- * @deprecated No longer used
444
- */
445
- export declare type BadgeMode = 'default' | 'outline'
445
+ /** @public */
446
+ export declare type BadgeElementType = 'div' | 'span' | ComponentType
446
447
 
447
- /**
448
- * @public
449
- */
450
- export declare interface BadgeProps extends BoxProps, RadiusStyleProps {
451
- fontSize?: number | number[]
452
- /** @deprecated No longer used. */
453
- mode?: BadgeMode
454
- textAlign?: TextProps['align']
455
- tone?: BadgeTone
456
- }
448
+ /** @public */
449
+ export declare type BadgeOwnProps = PaddingStyleProps &
450
+ RadiusStyleProps & {
451
+ fontSize?: ResponsiveProp<FontTextSize>
452
+ tone?: BadgeTone
453
+ }
457
454
 
458
- /**
459
- * @public
460
- */
461
- export declare type BadgeTone = ThemeColorStateToneKey
455
+ /** @public */
456
+ export declare type BadgeProps<E extends BadgeElementType = BadgeElementType> = Props<
457
+ BadgeOwnProps,
458
+ E
459
+ >
462
460
 
463
- /**
464
- * @public
465
- */
461
+ /** @public */
462
+ declare type BadgeTone = ThemeColorStateToneKey
463
+
464
+ /** @public */
466
465
  export declare interface BaseAutocompleteOption {
467
466
  value: string
468
467
  }
@@ -473,26 +472,16 @@ export declare interface BaseAutocompleteOption {
473
472
  */
474
473
  export declare type BaseTheme = BaseTheme_2
475
474
 
476
- /**
477
- * @public
478
- */
475
+ /** @public */
479
476
  export declare interface BoundaryElementContextValue {
480
477
  version: 0.0
481
478
  element: HTMLElement | null
482
479
  }
483
480
 
484
- /**
485
- * @public
486
- */
481
+ /** @public */
487
482
  export declare function BoundaryElementProvider(props: BoundaryElementProviderProps): ReactElement
488
483
 
489
- export declare namespace BoundaryElementProvider {
490
- var displayName: string
491
- }
492
-
493
- /**
494
- * @public
495
- */
484
+ /** @public */
496
485
  export declare interface BoundaryElementProviderProps {
497
486
  children: ReactNode
498
487
  element: HTMLElement | null
@@ -504,26 +493,56 @@ export declare interface BoundaryElementProviderProps {
504
493
  *
505
494
  * @public
506
495
  */
507
- export declare const Box: ForwardRefExoticComponent<
508
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BoxProps> &
509
- BoxProps &
510
- RefAttributes<HTMLDivElement>
511
- >
496
+ export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
497
+ props: BoxProps<E>,
498
+ ): JSX.Element
512
499
 
513
500
  export {BoxDisplay}
514
501
 
502
+ /** @public */
503
+ export declare type BoxElementType =
504
+ | 'a'
505
+ | 'article'
506
+ | 'aside'
507
+ | 'blockquote'
508
+ | 'body'
509
+ | 'button'
510
+ | 'details'
511
+ | 'div'
512
+ | 'header'
513
+ | 'fieldset'
514
+ | 'figure'
515
+ | 'figcaption'
516
+ | 'footer'
517
+ | 'form'
518
+ | 'html'
519
+ | 'iframe'
520
+ | 'kbd'
521
+ | 'label'
522
+ | 'legend'
523
+ | 'li'
524
+ | 'main'
525
+ | 'nav'
526
+ | 'ol'
527
+ | 'pre'
528
+ | 'section'
529
+ | 'span'
530
+ | 'summary'
531
+ | 'ul'
532
+ | ComponentType
533
+
515
534
  export {BoxHeight}
516
535
 
517
536
  export {BoxOverflow}
518
537
 
519
- /**
520
- * @public
521
- */
522
- export declare interface BoxProps
523
- extends BoxStyleProps,
524
- GapStyleProps,
525
- InsetStyleProps,
526
- PositionStyleProps {}
538
+ /** @public */
539
+ export declare type BoxOwnProps = BoxStyleProps &
540
+ GapStyleProps &
541
+ InsetStyleProps &
542
+ PositionStyleProps
543
+
544
+ /** @public */
545
+ export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
527
546
 
528
547
  /**
529
548
  * @public
@@ -533,34 +552,34 @@ export declare type BoxShadow = ThemeBoxShadow
533
552
 
534
553
  export {BoxSizing}
535
554
 
536
- /**
537
- * @beta
538
- */
539
- export declare const Breadcrumbs: ForwardRefExoticComponent<
540
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof BreadcrumbsProps> &
541
- BreadcrumbsProps &
542
- RefAttributes<HTMLDivElement>
543
- >
555
+ /** @beta */
556
+ export declare function Breadcrumbs<
557
+ E extends BreadcrumbsElementType = typeof DEFAULT_BREADCRUMBS_ELEMENT,
558
+ >(props: BreadcrumbsProps<E>): JSX.Element
544
559
 
545
- /**
546
- * @beta
547
- */
548
- export declare interface BreadcrumbsProps extends GapStyleProps {
549
- expandButton?: Omit<ButtonProps, 'onClick' | 'selected'>
560
+ /** @beta */
561
+ export declare type BreadcrumbsElementType = 'div' | 'nav' | ComponentType
562
+
563
+ /** @beta */
564
+ export declare type BreadcrumbsOwnProps = GapStyleProps & {
565
+ expandButton?: Omit<ButtonProps<'button'>, 'as' | 'onClick' | 'selected'>
550
566
  maxLength?: number
551
567
  separator?: ReactNode
552
568
  /** @deprecated - Use `gap`, `gapX`, `gapY` instead */
553
569
  space?: number | number[]
554
570
  }
555
571
 
556
- /**
557
- * @public
558
- */
559
- export declare const Button: ForwardRefExoticComponent<
560
- Omit<ElementProps_2<'button'> & PolymorphicProps_2, keyof ButtonProps> &
561
- ButtonProps &
562
- RefAttributes<HTMLButtonElement>
563
- >
572
+ /** @beta */
573
+ export declare type BreadcrumbsProps<E extends BreadcrumbsElementType = BreadcrumbsElementType> =
574
+ Props<BreadcrumbsOwnProps, E>
575
+
576
+ /** @public */
577
+ export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
578
+ props: ButtonProps<E>,
579
+ ): JSX.Element
580
+
581
+ /** @public */
582
+ export declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
564
583
 
565
584
  /**
566
585
  * @public
@@ -568,40 +587,39 @@ export declare const Button: ForwardRefExoticComponent<
568
587
  */
569
588
  export declare type ButtonMode = ThemeColorButtonModeKey_2
570
589
 
571
- /**
572
- * @public
573
- */
574
- export declare interface ButtonProps
575
- extends ButtonStyleProps,
576
- DisplayStyleProps,
577
- FlexStyleProps,
578
- GapStyleProps,
579
- PaddingStyleProps {
580
- 'data-ui'?: string
581
- 'fontSize'?: ResponsiveProp<FontTextSize>
582
- 'href'?: string
583
- 'mode'?: ButtonMode
584
- 'icon'?: ElementType | ReactNode
585
- 'iconRight'?: ElementType | ReactNode
586
- /** @beta Do not use in production, as this might change.*/
587
- 'loading'?: boolean
588
- 'selected'?: boolean
589
- /** @deprecated Use `gap` instead. */
590
- 'space'?: ResponsiveProp<Space>
591
- 'textAlign'?: ButtonTextAlign
592
- 'muted'?: boolean
593
- 'target'?: string
594
- 'text'?: ReactNode
595
- 'textOverflow'?: TextProps['textOverflow']
596
- 'textWeight'?: TextProps['weight']
597
- 'tone'?: ButtonTone
598
- 'type'?: 'button' | 'reset' | 'submit'
599
- 'width'?: ResponsiveProp<Width>
600
- }
590
+ /** @public */
591
+ export declare type ButtonOwnProps = ButtonStyleProps &
592
+ DisplayStyleProps &
593
+ GapStyleProps &
594
+ PaddingStyleProps & {
595
+ 'align'?: BoxStyleProps['alignItems']
596
+ 'data-ui'?: string
597
+ 'disabled'?: boolean
598
+ 'fontSize'?: ResponsiveProp<FontTextSize>
599
+ 'icon'?: ElementType_2 | ReactNode
600
+ 'iconRight'?: ElementType_2 | ReactNode
601
+ 'justify'?: BoxStyleProps['justifyContent']
602
+ /** @beta Do not use in production, as this might change.*/
603
+ 'loading'?: boolean
604
+ 'selected'?: boolean
605
+ /** @deprecated Use `gap` instead. */
606
+ 'space'?: ResponsiveProp<Space>
607
+ 'textAlign'?: ButtonTextAlign
608
+ 'muted'?: boolean
609
+ 'target'?: string
610
+ 'text'?: ReactNode
611
+ 'textOverflow'?: TextOwnProps['textOverflow']
612
+ 'textWeight'?: TextOwnProps['weight']
613
+ 'width'?: ResponsiveProp<Width>
614
+ }
601
615
 
602
- /**
603
- * @public
604
- */
616
+ /** @public */
617
+ export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
618
+ ButtonOwnProps,
619
+ E
620
+ >
621
+
622
+ /** @public */
605
623
  export declare type ButtonTextAlign = 'left' | 'right' | 'center'
606
624
 
607
625
  /**
@@ -622,30 +640,30 @@ export declare type ButtonWidth = 'fill'
622
640
  *
623
641
  * @public
624
642
  */
625
- export declare const Card: ForwardRefExoticComponent<
626
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof CardProps> &
627
- CardProps &
628
- RefAttributes<HTMLDivElement>
629
- >
643
+ export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
644
+ props: CardProps<E>,
645
+ ): JSX.Element
630
646
 
631
- export declare type CardCompatProviderComponent = ComponentType<{
647
+ /** @internal */
648
+ export declare type _CardCompatProviderComponent = ComponentType_2<{
632
649
  children?: ReactNode
633
650
  tone: ThemeColorCardToneKey
634
651
  scheme: ThemeColorSchemeKey_2
635
652
  }>
636
653
 
637
- /** @internal */
654
+ /** @public */
638
655
  export declare interface CardContextValue {
639
- compat_provider?: CardCompatProviderComponent
640
- rendered: boolean
641
656
  tone: ThemeColorCardToneKey
642
657
  scheme: ThemeColorSchemeKey_2
658
+ /** @internal */
659
+ unstable_CompatProvider?: _CardCompatProviderComponent
643
660
  }
644
661
 
645
- /**
646
- * @public
647
- */
648
- export declare interface CardProps extends BoxProps, CardStyleProps_2 {
662
+ /** @public */
663
+ export declare type CardElementType = BoxElementType
664
+
665
+ /** @public */
666
+ export declare interface CardOwnProps extends BoxOwnProps, CardStyleProps_2 {
649
667
  /**
650
668
  * Do not use in production.
651
669
  * @beta
@@ -657,18 +675,21 @@ export declare interface CardProps extends BoxProps, CardStyleProps_2 {
657
675
  */
658
676
  __unstable_focusRing?: boolean
659
677
  disabled?: boolean
660
- href?: string
661
678
  pressed?: boolean
662
679
  selected?: boolean
663
680
  target?: string
664
681
  }
665
682
 
683
+ /** @public */
684
+ export declare type CardProps<E extends CardElementType = CardElementType> = Props<CardOwnProps, E>
685
+
686
+ /** @public */
666
687
  export declare function CardProvider(props: {
667
- compat_provider?: CardCompatProviderComponent
668
688
  children?: ReactNode
669
- rendered?: boolean
670
689
  tone: ThemeColorCardToneKey
671
690
  scheme: ThemeColorSchemeKey_2
691
+ /** @internal */
692
+ unstable_CompatProvider?: _CardCompatProviderComponent
672
693
  }): JSX.Element
673
694
 
674
695
  /**
@@ -682,9 +703,7 @@ export declare interface CardStyleProps {
682
703
  $tone: ThemeColorCardToneKey
683
704
  }
684
705
 
685
- /**
686
- * @public
687
- */
706
+ /** @public */
688
707
  export declare type CardTone = ThemeColorCardToneKey | 'inherit'
689
708
 
690
709
  /**
@@ -692,109 +711,104 @@ export declare type CardTone = ThemeColorCardToneKey | 'inherit'
692
711
  *
693
712
  * @public
694
713
  */
695
- export declare const Checkbox: ForwardRefExoticComponent<
696
- Omit<ElementProps_2<'input'> & PolymorphicProps_2, keyof CheckboxProps> &
697
- CheckboxProps &
698
- RefAttributes<HTMLInputElement>
699
- >
714
+ export declare function Checkbox<E extends CheckboxElementType = typeof DEFAULT_CHECKBOX_ELEMENT>(
715
+ props: CheckboxProps<E>,
716
+ ): JSX.Element
700
717
 
701
- /**
702
- * @public
703
- */
704
- export declare interface CheckboxProps {
718
+ /** @public */
719
+ export declare type CheckboxElementType = 'input' | ComponentType
720
+
721
+ /** @public */
722
+ export declare type CheckboxOwnProps = {
705
723
  indeterminate?: boolean
706
724
  customValidity?: string
707
725
  }
708
726
 
709
- /**
710
- * @public
711
- */
727
+ /** @public */
728
+ export declare type CheckboxProps<E extends CheckboxElementType = CheckboxElementType> = Props<
729
+ CheckboxOwnProps,
730
+ E
731
+ >
732
+
733
+ /** @public */
712
734
  export declare type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[]
713
735
 
714
- /**
715
- * @public
716
- */
736
+ /** @public */
717
737
  export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
718
738
 
719
- /**
720
- * @public
721
- */
739
+ /** @public */
722
740
  export declare type ClickOutsideEventListener = (event: MouseEvent) => void
723
741
 
724
- /**
725
- * @public
726
- */
742
+ /** @public */
727
743
  export declare type ClickOutsideListener = (event: MouseEvent) => void
728
744
 
729
- /**
730
- * @public
731
- */
732
- export declare const Code: ForwardRefExoticComponent<
733
- Omit<ElementProps_2<'pre'> & PolymorphicProps_2, keyof CodeProps> &
734
- CodeProps &
735
- RefAttributes<HTMLPreElement>
736
- >
745
+ /** @public */
746
+ export declare function Code<E extends CodeElementType = typeof DEFAULT_CODE_ELEMENT>(
747
+ props: CodeProps<E>,
748
+ ): JSX.Element
737
749
 
738
- /**
739
- * @public
740
- */
741
- export declare interface CodeProps extends Omit<FontStyleProps, 'align'> {
750
+ /** @public */
751
+ export declare type CodeElementType = 'div' | 'pre' | ComponentType
752
+
753
+ /** @public */
754
+ export declare type CodeOwnProps = CodeStyleProps & {
742
755
  /** Define the language to use for syntax highlighting. */
743
756
  language?: string
744
- size?: number | number[]
757
+ size?: ResponsiveProp<FontCodeSize>
745
758
  }
746
759
 
747
- /**
748
- * This API might change. DO NOT USE IN PRODUCTION.
749
- * @beta
750
- */
751
- export declare const CodeSkeleton: ForwardRefExoticComponent<
752
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof CodeSkeletonProps> &
753
- CodeSkeletonProps &
754
- RefAttributes<HTMLDivElement>
755
- >
760
+ /** @public */
761
+ export declare type CodeProps<E extends CodeElementType = CodeElementType> = Props<CodeOwnProps, E>
756
762
 
757
763
  /**
758
764
  * This API might change. DO NOT USE IN PRODUCTION.
759
765
  * @beta
760
766
  */
761
- export declare interface CodeSkeletonProps extends SkeletonProps {
767
+ export declare function CodeSkeleton<
768
+ E extends CodeSkeletonElementType = typeof DEFAULT_CODE_SKELETON_ELEMENT,
769
+ >(props: CodeSkeletonProps<E>): JSX.Element
770
+
771
+ /** @beta */
772
+ export declare type CodeSkeletonElementType = SkeletonElementType
773
+
774
+ /** @beta */
775
+ export declare type CodeSkeletonOwnProps = SkeletonOwnProps & {
762
776
  size?: ResponsiveProp<FontCodeSize>
763
777
  }
764
778
 
765
779
  /**
766
- * @internal
767
- * @deprecated this component will be removed in the next major release
780
+ * This API might change. DO NOT USE IN PRODUCTION.
781
+ * @beta
768
782
  */
769
- export declare function ConditionalWrapper({
770
- children,
771
- condition,
772
- wrapper,
773
- }: {
774
- children: ReactNode
775
- condition: boolean
776
- wrapper: (children: ReactNode) => ReactNode
777
- }): ReactNode
783
+ export declare type CodeSkeletonProps<E extends CodeSkeletonElementType = CodeSkeletonElementType> =
784
+ Props<CodeSkeletonOwnProps, E>
778
785
 
779
- export declare namespace ConditionalWrapper {
780
- var displayName: string
781
- }
786
+ /** @public */
787
+ export declare type ComponentType<P = any> =
788
+ | FunctionComponent<P>
789
+ | ComponentClass<P>
790
+ | ExoticComponent<P>
782
791
 
783
792
  /**
784
793
  * The `Container` component wraps content layout in a defined set of widths.
785
794
  *
786
795
  * @public
787
796
  */
788
- export declare const Container: ForwardRefExoticComponent<
789
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof ContainerProps> &
790
- ContainerProps &
791
- RefAttributes<HTMLDivElement>
792
- >
797
+ export declare function Container<
798
+ E extends ContainerElementType = typeof DEFAULT_CONTAINER_ELEMENT,
799
+ >(props: ContainerProps<E>): JSX.Element
793
800
 
794
- /**
795
- * @public
796
- */
797
- export declare interface ContainerProps extends Omit<BoxProps, 'width'>, ContainerStyleProps {}
801
+ /** @public */
802
+ export declare type ContainerElementType = BoxElementType
803
+
804
+ /** @public */
805
+ export declare type ContainerOwnProps = Omit<BoxOwnProps, 'width'> & ContainerStyleProps
806
+
807
+ /** @public */
808
+ export declare type ContainerProps<E extends ContainerElementType = ContainerElementType> = Props<
809
+ ContainerOwnProps,
810
+ E
811
+ >
798
812
 
799
813
  /**
800
814
  * @internal
@@ -807,26 +821,178 @@ export declare function containsOrEqualsElement(element: HTMLElement, node: Node
807
821
  */
808
822
  export declare const createColorTheme: typeof createColorTheme_2
809
823
 
810
- /**
811
- * @public
812
- */
813
- export declare type Delay =
814
- | number
815
- | Partial<{
816
- open: number
817
- close: number
818
- }>
824
+ /** @internal */
825
+ export declare const DEFAULT_ARROW_ELEMENT = 'div'
826
+
827
+ /** @public */
828
+ export declare const DEFAULT_AUTOCOMPLETE_ELEMENT = 'input'
829
+
830
+ /** @public */
831
+ export declare const DEFAULT_AVATAR_COUNTER_ELEMENT = 'span'
832
+
833
+ /** @public */
834
+ export declare const DEFAULT_AVATAR_ELEMENT = 'span'
835
+
836
+ /** @public */
837
+ export declare const DEFAULT_AVATAR_STACK_ELEMENT = 'span'
838
+
839
+ /** @public */
840
+ export declare const DEFAULT_BADGE_ELEMENT = 'span'
841
+
842
+ /** @public */
843
+ export declare const DEFAULT_BOX_ELEMENT = 'div'
844
+
845
+ /** @beta */
846
+ export declare const DEFAULT_BREADCRUMBS_ELEMENT = 'nav'
847
+
848
+ /** @public */
849
+ export declare const DEFAULT_BUTTON_ELEMENT = 'button'
850
+
851
+ /** @public */
852
+ export declare const DEFAULT_CARD_ELEMENT = 'div'
853
+
854
+ /** @public */
855
+ export declare const DEFAULT_CHECKBOX_ELEMENT = 'input'
856
+
857
+ /** @public */
858
+ export declare const DEFAULT_CODE_ELEMENT = 'pre'
859
+
860
+ /** @beta */
861
+ export declare const DEFAULT_CODE_SKELETON_ELEMENT = 'div'
862
+
863
+ /** @public */
864
+ export declare const DEFAULT_CONTAINER_ELEMENT = 'div'
865
+
866
+ /** @public */
867
+ export declare const DEFAULT_DIALOG_ELEMENT = 'div'
868
+
869
+ /** @beta */
870
+ export declare const DEFAULT_ELEMENT_QUERY_ELEMENT = 'div'
871
+
872
+ /** @public */
873
+ export declare const DEFAULT_FLEX_ELEMENT = 'div'
874
+
875
+ /** @public */
876
+ export declare const DEFAULT_GRID_ELEMENT = 'div'
877
+
878
+ /** @public */
879
+ export declare const DEFAULT_HEADING_ELEMENT = 'div'
880
+
881
+ /** @beta */
882
+ export declare const DEFAULT_HEADING_SKELETON_ELEMENT = 'div'
883
+
884
+ /** @public */
885
+ export declare const DEFAULT_HOTKEYS_ELEMENT = 'kbd'
886
+
887
+ /** @public */
888
+ export declare const DEFAULT_INLINE_ELEMENT = 'div'
889
+
890
+ /** @public */
891
+ export declare const DEFAULT_KBD_ELEMENT = 'kbd'
892
+
893
+ /** @public */
894
+ export declare const DEFAULT_LABEL_ELEMENT = 'div'
895
+
896
+ /** @beta */
897
+ export declare const DEFAULT_LABEL_SKELETON_ELEMENT = 'div'
898
+
899
+ /** @public */
900
+ export declare const DEFAULT_LAYER_ELEMENT = 'div'
901
+
902
+ /** @public */
903
+ export declare const DEFAULT_MENU_DIVIDER_ELEMENT = 'hr'
904
+
905
+ /** @public */
906
+ export declare const DEFAULT_MENU_ELEMENT = 'div'
907
+
908
+ /** @public */
909
+ export declare const DEFAULT_MENU_GROUP_ELEMENT = 'button'
910
+
911
+ /** @public */
912
+ export declare const DEFAULT_MENU_ITEM_ELEMENT = 'button'
913
+
914
+ /** @public */
915
+ export declare const DEFAULT_POPOVER_ELEMENT = 'div'
916
+
917
+ /** @public */
918
+ export declare const DEFAULT_RADIO_ELEMENT = 'input'
919
+
920
+ /** @public */
921
+ export declare const DEFAULT_ROOT_ELEMENT = 'html'
922
+
923
+ /** @public */
924
+ export declare const DEFAULT_SELECT_ELEMENT = 'select'
925
+
926
+ /** @internal */
927
+ export declare const DEFAULT_SELECTABLE_ELEMENT = 'button'
928
+
929
+ /** @beta */
930
+ export declare const DEFAULT_SKELETON_ELEMENT = 'div'
931
+
932
+ /** @public */
933
+ export declare const DEFAULT_SPINNER_ELEMENT = 'div'
934
+
935
+ /** @public */
936
+ export declare const DEFAULT_SR_ONLY_ELEMENT = 'span'
937
+
938
+ /** @public */
939
+ export declare const DEFAULT_STACK_ELEMENT = 'div'
940
+
941
+ /** @public */
942
+ export declare const DEFAULT_SWITCH_ELEMENT = 'input'
943
+
944
+ /** @public */
945
+ export declare const DEFAULT_TAB_ELEMENT = 'button'
946
+
947
+ /** @public */
948
+ export declare const DEFAULT_TAB_LIST_ELEMENT = 'div'
949
+
950
+ /** @public */
951
+ export declare const DEFAULT_TAB_PANEL_ELEMENT = 'div'
952
+
953
+ /** @public */
954
+ export declare const DEFAULT_TEXT_AREA_ELEMENT = 'textarea'
955
+
956
+ /** @public */
957
+ export declare const DEFAULT_TEXT_ELEMENT = 'div'
958
+
959
+ /** @public */
960
+ export declare const DEFAULT_TEXT_INPUT_ELEMENT = 'input'
961
+
962
+ /** @beta */
963
+ export declare const DEFAULT_TEXT_SKELETON_ELEMENT = 'div'
964
+
965
+ /** @internal */
966
+ export declare const DEFAULT_TOAST_ELEMENT = 'li'
967
+
968
+ /** @public */
969
+ export declare const DEFAULT_TOOLTIP_ELEMENT = 'div'
970
+
971
+ /** @beta */
972
+ export declare const DEFAULT_TREE_ELEMENT = 'div'
973
+
974
+ /** @beta */
975
+ export declare const DEFAULT_TREE_ITEM_ELEMENT = 'a'
976
+
977
+ /** @beta */
978
+ export declare const DEFAULT_VIRTUAL_LIST_ELEMENT = 'div'
979
+
980
+ /** @public */
981
+ export declare type Delay =
982
+ | number
983
+ | Partial<{
984
+ open: number
985
+ close: number
986
+ }>
819
987
 
820
988
  /**
821
989
  * The Dialog component.
822
990
  *
823
991
  * @public
824
992
  */
825
- export declare const Dialog: ForwardRefExoticComponent<
826
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof DialogProps> &
827
- DialogProps &
828
- RefAttributes<HTMLDivElement>
829
- >
993
+ export declare function Dialog<E extends DialogElementType = typeof DEFAULT_DIALOG_ELEMENT>(
994
+ props: DialogProps<E>,
995
+ ): JSX.Element
830
996
 
831
997
  /**
832
998
  * @internal
@@ -839,53 +1005,56 @@ export declare const DialogContext: Context<DialogContextValue>
839
1005
  */
840
1006
  export declare interface DialogContextValue {
841
1007
  version: 0.0
842
- position?: DialogPosition | DialogPosition[]
843
- zOffset?: number | number[]
1008
+ position?: ResponsiveProp<DialogPosition>
1009
+ zOffset?: ResponsiveProp<number>
844
1010
  }
845
1011
 
846
- /**
847
- * @public
848
- */
1012
+ /** @public */
1013
+ export declare type DialogElementType = 'div' | 'span' | ComponentType
1014
+
1015
+ /** @public */
1016
+ export declare type DialogOwnProps = ContainerStyleProps &
1017
+ Omit<LayerOwnProps, 'width'> & {
1018
+ /**
1019
+ * @beta
1020
+ */
1021
+ __unstable_autoFocus?: boolean
1022
+ /**
1023
+ * @beta
1024
+ */
1025
+ __unstable_hideCloseButton?: boolean
1026
+ /**
1027
+ * Whether the dialog should animate in on mount.
1028
+ *
1029
+ * @beta
1030
+ * @defaultValue false
1031
+ */
1032
+ animate?: boolean
1033
+ cardRadius?: ResponsiveProp<Radius>
1034
+ contentRef?: ForwardedRef<HTMLDivElement>
1035
+ footer?: ReactNode
1036
+ header?: ReactNode
1037
+ id: string
1038
+ /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
1039
+ onActivate?: LayerProps['onActivate']
1040
+ onClickOutside?: () => void
1041
+ onClose?: () => void
1042
+ open?: boolean
1043
+ portal?: string
1044
+ position?: ResponsiveProp<DialogPosition>
1045
+ scheme?: ThemeColorSchemeKey_2
1046
+ tone?: CardTone
1047
+ zOffset?: number | number[]
1048
+ }
1049
+
1050
+ /** @public */
849
1051
  export declare type DialogPosition = 'absolute' | 'fixed'
850
1052
 
851
- /**
852
- * @public
853
- */
854
- export declare interface DialogProps
855
- extends ContainerStyleProps,
856
- PaddingStyleProps,
857
- ShadowStyleProps {
858
- /**
859
- * @beta
860
- */
861
- __unstable_autoFocus?: boolean
862
- /**
863
- * @beta
864
- */
865
- __unstable_hideCloseButton?: boolean
866
- /**
867
- * Whether the dialog should animate in on mount.
868
- *
869
- * @beta
870
- * @defaultValue false
871
- */
872
- animate?: boolean
873
- cardRadius?: ResponsiveProp<Radius>
874
- contentRef?: ForwardedRef<HTMLDivElement>
875
- footer?: ReactNode
876
- header?: ReactNode
877
- id: string
878
- /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
879
- onActivate?: LayerProps['onActivate']
880
- onClickOutside?: () => void
881
- onClose?: () => void
882
- open?: boolean
883
- portal?: string
884
- position?: DialogPosition | DialogPosition[]
885
- scheme?: ThemeColorSchemeKey_2
886
- tone?: CardTone
887
- zOffset?: number | number[]
888
- }
1053
+ /** @public */
1054
+ export declare type DialogProps<E extends DialogElementType = DialogElementType> = Props<
1055
+ DialogOwnProps,
1056
+ E
1057
+ >
889
1058
 
890
1059
  /**
891
1060
  * This API might change. DO NOT USE IN PRODUCTION.
@@ -893,32 +1062,41 @@ export declare interface DialogProps
893
1062
  */
894
1063
  export declare function DialogProvider(props: DialogProviderProps): ReactElement
895
1064
 
896
- export declare namespace DialogProvider {
897
- var displayName: string
898
- }
899
-
900
1065
  /**
901
1066
  * This API might change. DO NOT USE IN PRODUCTION.
902
1067
  * @beta
903
1068
  */
904
1069
  export declare interface DialogProviderProps {
905
1070
  children?: ReactNode
906
- position?: DialogPosition | DialogPosition[]
907
- zOffset?: number | number[]
1071
+ position?: ResponsiveProp<DialogPosition>
1072
+ zOffset?: ResponsiveProp<number>
908
1073
  }
909
1074
 
910
- /** @public */
911
- export declare type ElementProps<E extends ElementType> = Omit<ComponentProps<E>, 'as' | 'ref'>
1075
+ /**
1076
+ * DO NOT USE IN PRODUCTION.
1077
+ * @beta
1078
+ */
1079
+ export declare function ElementQuery<
1080
+ E extends ElementQueryElementType = typeof DEFAULT_ELEMENT_QUERY_ELEMENT,
1081
+ >(props: ElementQueryProps<E>): JSX.Element
1082
+
1083
+ /** @beta */
1084
+ export declare type ElementQueryElementType = 'div' | ComponentType
912
1085
 
913
1086
  /**
914
1087
  * DO NOT USE IN PRODUCTION.
915
1088
  * @beta
916
1089
  */
917
- export declare const ElementQuery: ForwardRefExoticComponent<
918
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'media'> &
919
- MediaQueryProps &
920
- RefAttributes<HTMLDivElement>
921
- >
1090
+ export declare type ElementQueryOwnProps = {
1091
+ media?: number[]
1092
+ }
1093
+
1094
+ /**
1095
+ * DO NOT USE IN PRODUCTION.
1096
+ * @beta
1097
+ */
1098
+ export declare type ElementQueryProps<E extends ElementQueryElementType = ElementQueryElementType> =
1099
+ Props<ElementQueryOwnProps, E>
922
1100
 
923
1101
  /**
924
1102
  * @beta
@@ -962,12 +1140,19 @@ export declare const _elementSizeObserver: _ElementSizeObserver
962
1140
  */
963
1141
  export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
964
1142
 
1143
+ /** @public */
1144
+ export declare type ElementType<P> = TagType | ComponentType<P>
1145
+
1146
+ /** @public */
1147
+ export declare type EmptyProps = {}
1148
+
965
1149
  /**
966
1150
  * DO NOT USE IN PRODUCTION
967
1151
  * @beta
968
1152
  */
969
1153
  export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
970
1154
  state: ErrorBoundaryState
1155
+ static displayName: string
971
1156
  static getDerivedStateFromError(error: Error): ErrorBoundaryState
972
1157
  componentDidCatch(error: Error, info: ErrorInfo): void
973
1158
  render(): ReactNode
@@ -994,25 +1179,33 @@ export declare interface ErrorBoundaryState {
994
1179
  *
995
1180
  * @public
996
1181
  */
997
- export declare const Flex: ForwardRefExoticComponent<
998
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof FlexProps> &
999
- FlexProps &
1000
- RefAttributes<HTMLDivElement>
1001
- >
1182
+ export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
1183
+ props: FlexProps<E>,
1184
+ ): JSX.Element
1002
1185
 
1003
1186
  export {FlexAlign}
1004
1187
 
1005
1188
  export {FlexDirection}
1006
1189
 
1190
+ /** @public */
1191
+ export declare type FlexElementType = BoxElementType
1192
+
1007
1193
  export {FlexJustify}
1008
1194
 
1009
- /**
1010
- * @public
1011
- */
1012
- export declare interface FlexProps extends Omit<BoxProps, 'display'> {
1013
- htmlFor?: string
1195
+ /** @public */
1196
+ export declare type FlexOwnProps = Omit<
1197
+ BoxOwnProps,
1198
+ 'align' | 'display' | 'flexDirection' | 'flexWrap'
1199
+ > & {
1200
+ align?: ResponsiveProp<FlexAlign>
1201
+ direction?: ResponsiveProp<FlexDirection>
1202
+ justify?: ResponsiveProp<FlexJustify>
1203
+ wrap?: ResponsiveProp<FlexWrap>
1014
1204
  }
1015
1205
 
1206
+ /** @public */
1207
+ export declare type FlexProps<E extends FlexElementType = FlexElementType> = Props<FlexOwnProps, E>
1208
+
1016
1209
  export {FlexValue}
1017
1210
 
1018
1211
  export {FlexWrap}
@@ -1032,16 +1225,22 @@ export declare function focusLastDescendant(element: HTMLElement): boolean
1032
1225
  */
1033
1226
  export declare function _getArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
1034
1227
 
1228
+ /**
1229
+ * @internal
1230
+ */
1231
+ export declare function _getResponsiveProp<T>(
1232
+ val: ResponsiveProp<T> | undefined,
1233
+ defaultVal?: Partial<Record<Breakpoint, T>>,
1234
+ ): Partial<Record<Breakpoint, T>>
1235
+
1035
1236
  /**
1036
1237
  * The `Grid` component is for building 2-dimensional layers (based on CSS grid).
1037
1238
  *
1038
1239
  * @public
1039
1240
  */
1040
- export declare const Grid: ForwardRefExoticComponent<
1041
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof GridProps> &
1042
- GridProps &
1043
- RefAttributes<HTMLDivElement>
1044
- >
1241
+ export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
1242
+ props: GridProps<E>,
1243
+ ): JSX.Element
1045
1244
 
1046
1245
  export {GridAutoCols}
1047
1246
 
@@ -1049,6 +1248,9 @@ export {GridAutoFlow}
1049
1248
 
1050
1249
  export {GridAutoRows}
1051
1250
 
1251
+ /** @public */
1252
+ export declare type GridElementType = BoxElementType
1253
+
1052
1254
  export {GridItemColumn}
1053
1255
 
1054
1256
  export {GridItemColumnEnd}
@@ -1061,10 +1263,11 @@ export {GridItemRowEnd}
1061
1263
 
1062
1264
  export {GridItemRowStart}
1063
1265
 
1064
- /**
1065
- * @public
1066
- */
1067
- export declare interface GridProps extends Omit<BoxProps, 'display'> {}
1266
+ /** @public */
1267
+ export declare type GridOwnProps = Omit<BoxOwnProps, 'display'>
1268
+
1269
+ /** @public */
1270
+ export declare type GridProps<E extends GridElementType = GridElementType> = Props<GridOwnProps, E>
1068
1271
 
1069
1272
  /**
1070
1273
  * @internal
@@ -1076,34 +1279,55 @@ export declare function _hasFocus(element: HTMLElement): boolean
1076
1279
  *
1077
1280
  * @public
1078
1281
  */
1079
- export declare const Heading: ForwardRefExoticComponent<
1080
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof HeadingProps> &
1081
- HeadingProps &
1082
- RefAttributes<HTMLElement>
1083
- >
1282
+ export declare function Heading<E extends HeadingElementType = typeof DEFAULT_HEADING_ELEMENT>(
1283
+ props: HeadingProps<E>,
1284
+ ): JSX.Element
1084
1285
 
1085
- /**
1086
- * @public
1087
- */
1088
- export declare interface HeadingProps extends HeadingStyleProps, TextOverflowStyleProps {}
1286
+ /** @public */
1287
+ export declare type HeadingElementType =
1288
+ | 'div'
1289
+ | 'h1'
1290
+ | 'h2'
1291
+ | 'h3'
1292
+ | 'h4'
1293
+ | 'h5'
1294
+ | 'h6'
1295
+ | 'label'
1296
+ | 'span'
1297
+ | ComponentType
1298
+
1299
+ /** @public */
1300
+ export declare type HeadingOwnProps = HeadingStyleProps & TextOverflowStyleProps
1301
+
1302
+ /** @public */
1303
+ export declare type HeadingProps<E extends HeadingElementType = HeadingElementType> = Props<
1304
+ HeadingOwnProps,
1305
+ E
1306
+ >
1089
1307
 
1090
1308
  /**
1091
1309
  * This API might change. DO NOT USE IN PRODUCTION.
1092
1310
  * @beta
1093
1311
  */
1094
- export declare const HeadingSkeleton: ForwardRefExoticComponent<
1095
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof HeadingSkeletonProps> &
1096
- HeadingSkeletonProps &
1097
- RefAttributes<HTMLDivElement>
1098
- >
1312
+ export declare function HeadingSkeleton<
1313
+ E extends HeadingSkeletonElementType = typeof DEFAULT_HEADING_SKELETON_ELEMENT,
1314
+ >(props: HeadingSkeletonProps<E>): JSX.Element
1315
+
1316
+ /** @beta */
1317
+ export declare type HeadingSkeletonElementType = SkeletonElementType
1318
+
1319
+ /** @beta */
1320
+ export declare type HeadingSkeletonOwnProps = SkeletonOwnProps & {
1321
+ size?: ResponsiveProp<FontHeadingSize>
1322
+ }
1099
1323
 
1100
1324
  /**
1101
1325
  * This API might change. DO NOT USE IN PRODUCTION.
1102
1326
  * @beta
1103
1327
  */
1104
- export declare interface HeadingSkeletonProps extends SkeletonProps {
1105
- size?: ResponsiveProp<FontHeadingSize>
1106
- }
1328
+ export declare type HeadingSkeletonProps<
1329
+ E extends HeadingSkeletonElementType = HeadingSkeletonElementType,
1330
+ > = Props<HeadingSkeletonOwnProps, E>
1107
1331
 
1108
1332
  /**
1109
1333
  * @public
@@ -1116,16 +1340,15 @@ export declare const hexToRgb: typeof hexToRgb_2
1116
1340
  *
1117
1341
  * @public
1118
1342
  */
1119
- export declare const Hotkeys: ForwardRefExoticComponent<
1120
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof HotkeysProps> &
1121
- HotkeysProps &
1122
- RefAttributes<HTMLDivElement>
1123
- >
1343
+ export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
1344
+ props: HotkeysProps<E>,
1345
+ ): JSX.Element | undefined
1124
1346
 
1125
- /**
1126
- * @public
1127
- */
1128
- export declare interface HotkeysProps extends GapStyleProps, RadiusStyleProps {
1347
+ /** @public */
1348
+ export declare type HotkeysElementType = 'kbd' | ComponentType
1349
+
1350
+ /** @public */
1351
+ export declare interface HotkeysOwnProps extends GapStyleProps, RadiusStyleProps {
1129
1352
  fontSize?: ResponsiveProp<FontTextSize>
1130
1353
  padding?: ResponsiveProp<Space>
1131
1354
  /** @deprecated Use `gap` instead. */
@@ -1133,6 +1356,12 @@ export declare interface HotkeysProps extends GapStyleProps, RadiusStyleProps {
1133
1356
  keys?: string[]
1134
1357
  }
1135
1358
 
1359
+ /** @public */
1360
+ export declare type HotkeysProps<E extends HotkeysElementType = HotkeysElementType> = Props<
1361
+ HotkeysOwnProps,
1362
+ E
1363
+ >
1364
+
1136
1365
  /**
1137
1366
  * @public
1138
1367
  * @deprecated Use `HSL` from `@sanity/ui/theme` instead.
@@ -1150,20 +1379,42 @@ export declare const hslToRgb: typeof hslToRgb_2
1150
1379
  *
1151
1380
  * @public
1152
1381
  */
1153
- export declare const Inline: ForwardRefExoticComponent<
1154
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof InlineProps> &
1155
- InlineProps &
1156
- RefAttributes<HTMLDivElement>
1157
- >
1382
+ export declare function Inline<E extends InlineElementType = typeof DEFAULT_INLINE_ELEMENT>(
1383
+ props: InlineProps<E>,
1384
+ ): JSX.Element
1158
1385
 
1159
- /**
1160
- * @public
1161
- */
1162
- export declare interface InlineProps extends Omit<BoxProps, 'align' | 'display' | 'justify'> {
1386
+ /** @public */
1387
+ export declare type InlineElementType = BoxElementType
1388
+
1389
+ /** @public */
1390
+ export declare type InlineOwnProps = Omit<
1391
+ BoxOwnProps,
1392
+ | 'alignItems'
1393
+ | 'flexDirection'
1394
+ | 'flexWrap'
1395
+ | 'justifyContent'
1396
+ | 'gridAutoColumns'
1397
+ | 'gridAutoFlow'
1398
+ | 'gridAutoRows'
1399
+ | 'gridColumnEnd'
1400
+ | 'gridColumnStart'
1401
+ | 'gridColumn'
1402
+ | 'gridRowEnd'
1403
+ | 'gridRowStart'
1404
+ | 'gridRow'
1405
+ | 'gridTemplateColumns'
1406
+ | 'gridTemplateRows'
1407
+ > & {
1163
1408
  /** @deprecated Use `gap` instead. */
1164
1409
  space?: ResponsiveProp<Space>
1165
1410
  }
1166
1411
 
1412
+ /** @public */
1413
+ export declare type InlineProps<E extends InlineElementType = InlineElementType> = Props<
1414
+ InlineOwnProps,
1415
+ E
1416
+ >
1417
+
1167
1418
  /**
1168
1419
  * @internal
1169
1420
  */
@@ -1214,67 +1465,83 @@ export declare function _isScrollable(el: Node): boolean
1214
1465
  *
1215
1466
  * @public
1216
1467
  */
1217
- export declare const KBD: ForwardRefExoticComponent<
1218
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof KBDProps> &
1219
- KBDProps &
1220
- RefAttributes<HTMLDivElement>
1221
- >
1468
+ export declare function KBD<E extends KBDElementType = typeof DEFAULT_KBD_ELEMENT>(
1469
+ props: KBDProps<E>,
1470
+ ): JSX.Element
1222
1471
 
1223
- /**
1224
- * @public
1225
- */
1226
- export declare interface KBDProps extends BoxProps, RadiusStyleProps {
1227
- fontSize?: ResponsiveProp<FontTextSize>
1228
- padding?: ResponsiveProp<Space>
1229
- }
1472
+ /** @public */
1473
+ export declare type KBDElementType = 'kbd' | ComponentType
1474
+
1475
+ /** @public */
1476
+ export declare type KBDOwnProps = BoxOwnProps &
1477
+ RadiusStyleProps & {
1478
+ fontSize?: ResponsiveProp<FontTextSize>
1479
+ }
1480
+
1481
+ /** @public */
1482
+ export declare type KBDProps<E extends KBDElementType = KBDElementType> = Props<KBDOwnProps, E>
1230
1483
 
1231
1484
  /**
1232
1485
  * Typographic labels.
1233
1486
  *
1234
1487
  * @public
1235
1488
  */
1236
- export declare const Label: ForwardRefExoticComponent<
1237
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof LabelProps> &
1238
- LabelProps &
1239
- RefAttributes<HTMLDivElement>
1240
- >
1489
+ export declare function Label<E extends LabelElementType = typeof DEFAULT_LABEL_ELEMENT>(
1490
+ props: LabelProps<E>,
1491
+ ): JSX.Element
1241
1492
 
1242
- /**
1243
- * @public
1244
- */
1245
- export declare interface LabelProps extends FontStyleProps, TextOverflowStyleProps {
1246
- accent?: boolean
1247
- htmlFor?: string
1248
- muted?: boolean
1249
- size?: ResponsiveProp<LabelSize>
1250
- }
1493
+ /** @public */
1494
+ export declare type LabelElementType =
1495
+ | 'div'
1496
+ | 'h1'
1497
+ | 'h2'
1498
+ | 'h3'
1499
+ | 'h4'
1500
+ | 'h5'
1501
+ | 'h6'
1502
+ | 'label'
1503
+ | 'li'
1504
+ | 'p'
1505
+ | 'span'
1506
+ | ComponentType
1251
1507
 
1252
- /**
1253
- * This API might change. DO NOT USE IN PRODUCTION.
1254
- * @beta
1255
- */
1256
- export declare const LabelSkeleton: ForwardRefExoticComponent<
1257
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof LabelSkeletonProps> &
1258
- LabelSkeletonProps &
1259
- RefAttributes<HTMLDivElement>
1508
+ /** @public */
1509
+ export declare type LabelOwnProps = LabelStyleProps & TextOverflowStyleProps
1510
+
1511
+ /** @public */
1512
+ export declare type LabelProps<E extends LabelElementType = LabelElementType> = Props<
1513
+ LabelOwnProps,
1514
+ E
1260
1515
  >
1261
1516
 
1262
1517
  /**
1263
1518
  * This API might change. DO NOT USE IN PRODUCTION.
1264
1519
  * @beta
1265
1520
  */
1266
- export declare interface LabelSkeletonProps extends SkeletonProps {
1521
+ export declare function LabelSkeleton<
1522
+ E extends LabelSkeletonElementType = typeof DEFAULT_LABEL_SKELETON_ELEMENT,
1523
+ >(props: LabelSkeletonProps<E>): JSX.Element
1524
+
1525
+ /** @beta */
1526
+ export declare type LabelSkeletonElementType = SkeletonElementType
1527
+
1528
+ /** @beta */
1529
+ export declare type LabelSkeletonOwnProps = SkeletonOwnProps & {
1267
1530
  size?: ResponsiveProp<FontLabelSize>
1268
1531
  }
1269
1532
 
1270
1533
  /**
1271
- * @public
1534
+ * This API might change. DO NOT USE IN PRODUCTION.
1535
+ * @beta
1272
1536
  */
1273
- export declare const Layer: ForwardRefExoticComponent<
1274
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof LayerProps> &
1275
- LayerProps &
1276
- RefAttributes<HTMLDivElement>
1277
- >
1537
+ export declare type LabelSkeletonProps<
1538
+ E extends LabelSkeletonElementType = LabelSkeletonElementType,
1539
+ > = Props<LabelSkeletonOwnProps, E>
1540
+
1541
+ /** @public */
1542
+ export declare function Layer<E extends LayerElementType = typeof DEFAULT_LAYER_ELEMENT>(
1543
+ props: LayerProps<E>,
1544
+ ): JSX.Element
1278
1545
 
1279
1546
  /** @public */
1280
1547
  export declare interface LayerContextValue {
@@ -1286,38 +1553,29 @@ export declare interface LayerContextValue {
1286
1553
  zIndex: number
1287
1554
  }
1288
1555
 
1289
- /**
1290
- * @public
1291
- */
1292
- export declare interface LayerProps extends BoxProps {
1556
+ /** @public */
1557
+ export declare type LayerElementType = CardElementType
1558
+
1559
+ /** @public */
1560
+ export declare type LayerOwnProps = CardOwnProps & {
1293
1561
  /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
1294
1562
  onActivate?: (props: {activeElement: HTMLElement | null}) => void
1295
- zOffset?: number | number[]
1563
+ zOffset?: ResponsiveProp<number>
1296
1564
  }
1297
1565
 
1298
- /**
1299
- * @public
1300
- */
1301
- export declare function LayerProvider(props: LayerProviderProps): ReactElement
1566
+ /** @public */
1567
+ export declare type LayerProps<E extends LayerElementType = LayerElementType> = Props<
1568
+ LayerOwnProps,
1569
+ E
1570
+ >
1302
1571
 
1303
- export declare namespace LayerProvider {
1304
- var displayName: string
1305
- }
1572
+ /** @public */
1573
+ export declare function LayerProvider(props: LayerProviderProps): ReactElement
1306
1574
 
1307
- /**
1308
- * @public
1309
- */
1575
+ /** @public */
1310
1576
  export declare interface LayerProviderProps {
1311
1577
  children?: ReactNode
1312
- zOffset?: number | number[]
1313
- }
1314
-
1315
- /**
1316
- * DO NOT USE IN PRODUCTION.
1317
- * @beta
1318
- */
1319
- export declare interface MediaQueryProps {
1320
- media?: number[]
1578
+ zOffset?: ResponsiveProp<number>
1321
1579
  }
1322
1580
 
1323
1581
  /**
@@ -1325,7 +1583,7 @@ export declare interface MediaQueryProps {
1325
1583
  */
1326
1584
  export declare interface _MediaStore {
1327
1585
  subscribe: (onStoreChange: () => void) => () => void
1328
- getSnapshot: () => number
1586
+ getSnapshot: () => Breakpoint
1329
1587
  }
1330
1588
 
1331
1589
  /**
@@ -1333,25 +1591,19 @@ export declare interface _MediaStore {
1333
1591
  *
1334
1592
  * @public
1335
1593
  */
1336
- export declare const Menu: ForwardRefExoticComponent<
1337
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof MenuProps> &
1338
- MenuProps &
1339
- RefAttributes<HTMLDivElement>
1340
- >
1594
+ export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
1595
+ props: MenuProps<E>,
1596
+ ): JSX.Element
1341
1597
 
1342
1598
  /**
1343
1599
  * The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
1344
1600
  *
1345
1601
  * @public
1346
1602
  */
1347
- export declare const MenuButton: ForwardRefExoticComponent<
1348
- MenuButtonProps & RefAttributes<HTMLButtonElement | null>
1349
- >
1603
+ export declare function MenuButton(props: MenuButtonProps): JSX.Element
1350
1604
 
1351
- /**
1352
- * @public
1353
- */
1354
- export declare interface MenuButtonProps {
1605
+ /** @public */
1606
+ export declare type MenuButtonProps = {
1355
1607
  /**
1356
1608
  * @beta Do not use in production.
1357
1609
  */
@@ -1360,7 +1612,7 @@ export declare interface MenuButtonProps {
1360
1612
  * @deprecated Use `popover={{boundaryElement: element}}` instead.
1361
1613
  */
1362
1614
  boundaryElement?: HTMLElement
1363
- button: ReactElement<Props<ButtonProps, 'button'>>
1615
+ button: ReactElement<ButtonProps>
1364
1616
  id: string
1365
1617
  menu?: ReactElement
1366
1618
  onClose?: () => void
@@ -1387,38 +1639,43 @@ export declare interface MenuButtonProps {
1387
1639
  * @deprecated Use `popover={{preventOverflow: true}}` instead.
1388
1640
  */
1389
1641
  preventOverflow?: boolean
1642
+ ref?: ForwardedRef<HTMLButtonElement | null>
1390
1643
  }
1391
1644
 
1392
- /**
1393
- * @public
1394
- */
1395
- export declare const MenuDivider: ForwardRefExoticComponent<
1396
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, never> &
1397
- MenuDividerProps &
1398
- RefAttributes<HTMLHRElement>
1399
- >
1645
+ /** @public */
1646
+ export declare function MenuDivider<
1647
+ E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
1648
+ >(props: MenuDividerProps<E>): JSX.Element
1400
1649
 
1401
1650
  /** @public */
1402
- export declare interface MenuDividerProps {}
1651
+ export declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
1403
1652
 
1404
- /**
1405
- * @public
1406
- */
1407
- export declare function MenuGroup(props: Props<MenuGroupProps, 'div'>): ReactElement
1653
+ /** @public */
1654
+ export declare type MenuDividerOwnProps = {}
1408
1655
 
1409
- export declare namespace MenuGroup {
1410
- var displayName: string
1411
- }
1656
+ /** @public */
1657
+ export declare type MenuDividerProps<E extends MenuDividerElementType = MenuDividerElementType> =
1658
+ Props<MenuDividerOwnProps, E>
1412
1659
 
1413
- /**
1414
- * @public
1415
- */
1416
- export declare interface MenuGroupProps extends GapStyleProps {
1660
+ /** @public */
1661
+ export declare type MenuElementType = 'div' | 'span' | ComponentType
1662
+
1663
+ /** @public */
1664
+ export declare function MenuGroup<
1665
+ E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
1666
+ >(props: MenuGroupProps<E>): JSX.Element
1667
+
1668
+ /** @public */
1669
+ export declare type MenuGroupElementType = 'button' | ComponentType
1670
+
1671
+ /** @public */
1672
+ export declare type MenuGroupOwnProps = RadiusStyleProps & {
1417
1673
  disabled?: boolean
1418
1674
  fontSize?: ResponsiveProp<FontTextSize>
1419
- icon?: ElementType | ReactNode
1675
+ gap?: ResponsiveProp<Space>
1676
+ icon?: ElementType_2 | ReactNode
1420
1677
  menu?: Omit<
1421
- MenuProps,
1678
+ MenuProps<typeof DEFAULT_MENU_ELEMENT>,
1422
1679
  | 'onClickOutside'
1423
1680
  | 'onEscape'
1424
1681
  | 'onItemClick'
@@ -1430,43 +1687,51 @@ export declare interface MenuGroupProps extends GapStyleProps {
1430
1687
  >
1431
1688
  padding?: ResponsiveProp<Space>
1432
1689
  popover?: Omit<PopoverProps, 'content' | 'open'>
1433
- radius?: Radius | Radius[]
1434
1690
  /** @deprecated Use `gap` instead. */
1435
1691
  space?: ResponsiveProp<Space>
1436
- text: ReactNode
1437
- tone?: SelectableTone
1692
+ text?: ReactNode
1693
+ tone?: ThemeColorStateToneKey
1438
1694
  }
1439
1695
 
1440
- /**
1441
- * @public
1442
- */
1443
- export declare const MenuItem: ForwardRefExoticComponent<
1444
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof MenuItemProps> &
1445
- MenuItemProps &
1446
- RefAttributes<HTMLDivElement>
1696
+ /** @public */
1697
+ export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
1698
+ MenuGroupOwnProps,
1699
+ E
1447
1700
  >
1448
1701
 
1449
- /**
1450
- * @public
1451
- */
1452
- export declare interface MenuItemProps extends GapStyleProps, PaddingStyleProps, RadiusStyleProps {
1453
- disabled?: boolean
1454
- fontSize?: number | number[]
1455
- hotkeys?: string[]
1456
- icon?: ElementType | ReactNode
1457
- iconRight?: ElementType | ReactNode
1458
- pressed?: boolean
1459
- selected?: boolean
1460
- /** @deprecated Use `gap` instead. */
1461
- space?: ResponsiveProp<Space>
1462
- text?: ReactNode
1463
- tone?: SelectableTone
1464
- }
1702
+ /** @public */
1703
+ export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
1704
+ props: MenuItemProps<E>,
1705
+ ): JSX.Element
1465
1706
 
1466
- /**
1467
- * @public
1468
- */
1469
- export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps, 'gap'> {
1707
+ /** @public */
1708
+ export declare type MenuItemElementType = 'button' | 'a' | ComponentType
1709
+
1710
+ /** @public */
1711
+ export declare type MenuItemOwnProps = GapStyleProps &
1712
+ PaddingStyleProps &
1713
+ RadiusStyleProps & {
1714
+ disabled?: boolean
1715
+ fontSize?: ResponsiveProp<FontTextSize>
1716
+ hotkeys?: string[]
1717
+ icon?: ElementType_2 | ReactNode
1718
+ iconRight?: ElementType_2 | ReactNode
1719
+ pressed?: boolean
1720
+ selected?: boolean
1721
+ /** @deprecated Use `gap` instead. */
1722
+ space?: ResponsiveProp<Space>
1723
+ text?: ReactNode
1724
+ tone?: ThemeColorStateToneKey
1725
+ }
1726
+
1727
+ /** @public */
1728
+ export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Omit<
1729
+ Props<MenuItemOwnProps, E>,
1730
+ 'role'
1731
+ >
1732
+
1733
+ /** @public */
1734
+ export declare type MenuOwnProps = PaddingStyleProps & {
1470
1735
  /**
1471
1736
  * @deprecated Use `shouldFocus="first"` instead.
1472
1737
  */
@@ -1475,6 +1740,7 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
1475
1740
  * @deprecated Use `shouldFocus="last"` instead.
1476
1741
  */
1477
1742
  'focusLast'?: boolean
1743
+ 'gap'?: ResponsiveProp<Space>
1478
1744
  'onClickOutside'?: (event: MouseEvent) => void
1479
1745
  'onEscape'?: () => void
1480
1746
  'onItemClick'?: () => void
@@ -1487,6 +1753,9 @@ export declare interface MenuProps extends PaddingStyleProps, Pick<GapStyleProps
1487
1753
  'aria-labelledby'?: string
1488
1754
  }
1489
1755
 
1756
+ /** @public */
1757
+ export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
1758
+
1490
1759
  /**
1491
1760
  * @public
1492
1761
  * @deprecated Use `multiply` from `@sanity/ui/theme` instead.
@@ -1520,20 +1789,17 @@ export declare type Placement =
1520
1789
  | 'left-start'
1521
1790
  | 'left-end'
1522
1791
 
1523
- export declare interface PolymorphicProps {
1524
- as?: ElementType
1525
- }
1526
-
1527
1792
  /**
1528
1793
  * The `Popover` component is used to display some content on top of another.
1529
1794
  *
1530
1795
  * @public
1531
1796
  */
1532
- export declare const Popover: NamedExoticComponent<
1533
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof PopoverProps> &
1534
- PopoverProps &
1535
- RefAttributes<HTMLDivElement>
1536
- >
1797
+ export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
1798
+ props: PopoverProps<E>,
1799
+ ): JSX.Element
1800
+
1801
+ /** @public */
1802
+ export declare type PopoverElementType = 'div' | ComponentType
1537
1803
 
1538
1804
  /**
1539
1805
  * @beta
@@ -1541,7 +1807,7 @@ export declare const Popover: NamedExoticComponent<
1541
1807
  export declare type PopoverMargins = [number, number, number, number]
1542
1808
 
1543
1809
  /** @public */
1544
- export declare interface PopoverProps extends CardProps, LayerProps {
1810
+ export declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
1545
1811
  /** @beta */
1546
1812
  __unstable_margins?: PopoverMargins
1547
1813
  /**
@@ -1558,16 +1824,16 @@ export declare interface PopoverProps extends CardProps, LayerProps {
1558
1824
  ref: ForwardedRef<HTMLElement>
1559
1825
  }>
1560
1826
  /**
1561
- * When `true`, prevent overflow within the current boundary:
1562
- * - by flipping on its side axis
1563
- * - by resizing
1564
- /*
1565
- * Note that:
1566
- * - setting `preventOverflow` to `true` also prevents overflow on its side axis
1567
- * - setting `matchReferenceWidth` to `true` also causes the popover to resize
1568
- *
1569
- * @defaultValue false
1570
- */
1827
+ * When `true`, prevent overflow within the current boundary:
1828
+ * - by flipping on its side axis
1829
+ * - by resizing
1830
+ *
1831
+ * Note that:
1832
+ * - setting `preventOverflow` to `true` also prevents overflow on its side axis
1833
+ * - setting `matchReferenceWidth` to `true` also causes the popover to resize
1834
+ *
1835
+ * @defaultValue false
1836
+ */
1571
1837
  constrainSize?: boolean
1572
1838
  content?: ReactNode
1573
1839
  disabled?: boolean
@@ -1601,29 +1867,26 @@ export declare interface PopoverProps extends CardProps, LayerProps {
1601
1867
  */
1602
1868
  referenceElement?: HTMLElement | null
1603
1869
  /** @beta */
1604
- updateRef?:
1605
- | MutableRefObject<PopoverUpdateCallback | undefined>
1606
- | RefCallback<PopoverUpdateCallback | undefined>
1870
+ updateRef?: Ref<PopoverUpdateCallback | undefined>
1871
+ width?: ResponsiveProp<MaxWidth>
1607
1872
  }
1608
1873
 
1874
+ /** @public */
1875
+ export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
1876
+ PopoverOwnProps,
1877
+ E
1878
+ >
1879
+
1609
1880
  /** @beta */
1610
1881
  export declare type PopoverUpdateCallback = () => void
1611
1882
 
1612
1883
  /** @public */
1613
- export declare type PopoverWidth = number | 'auto'
1884
+ export declare type PopoverWidth = Exclude<ContainerWidth, 'auto'>
1614
1885
 
1615
- /**
1616
- * @public
1617
- */
1886
+ /** @public */
1618
1887
  export declare function Portal(props: PortalProps): ReactPortal | null
1619
1888
 
1620
- export declare namespace Portal {
1621
- var displayName: string
1622
- }
1623
-
1624
- /**
1625
- * @public
1626
- */
1889
+ /** @public */
1627
1890
  export declare interface PortalContextValue {
1628
1891
  version: 0.0
1629
1892
  boundaryElement: HTMLElement | null
@@ -1631,9 +1894,7 @@ export declare interface PortalContextValue {
1631
1894
  elements?: Record<string, HTMLElement | null | undefined>
1632
1895
  }
1633
1896
 
1634
- /**
1635
- * @public
1636
- */
1897
+ /** @public */
1637
1898
  export declare interface PortalProps {
1638
1899
  children: ReactNode
1639
1900
  /**
@@ -1642,18 +1903,10 @@ export declare interface PortalProps {
1642
1903
  __unstable_name?: string
1643
1904
  }
1644
1905
 
1645
- /**
1646
- * @public
1647
- */
1906
+ /** @public */
1648
1907
  export declare function PortalProvider(props: PortalProviderProps): ReactElement
1649
1908
 
1650
- export declare namespace PortalProvider {
1651
- var displayName: string
1652
- }
1653
-
1654
- /**
1655
- * @public
1656
- */
1909
+ /** @public */
1657
1910
  export declare interface PortalProviderProps {
1658
1911
  /**
1659
1912
  * @deprecated Use `<BoundaryElementProvider element={...} />` instead
@@ -1668,9 +1921,11 @@ export declare interface PortalProviderProps {
1668
1921
  }
1669
1922
 
1670
1923
  /** @public */
1671
- export declare type Props<P extends {} = {}, E extends ElementType = ElementType> = Assign<
1672
- ElementProps<E> & PolymorphicProps,
1673
- P
1924
+ export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
1925
+ E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
1926
+ P & {
1927
+ as?: E
1928
+ }
1674
1929
  >
1675
1930
 
1676
1931
  export {px}
@@ -1680,19 +1935,24 @@ export {px}
1680
1935
  *
1681
1936
  * @public
1682
1937
  */
1683
- export declare const Radio: ForwardRefExoticComponent<
1684
- Omit<ElementProps_2<'input'> & PolymorphicProps_2, 'customValidity'> &
1685
- RadioProps &
1686
- RefAttributes<HTMLInputElement>
1687
- >
1938
+ export declare function Radio<E extends RadioElementType = typeof DEFAULT_RADIO_ELEMENT>(
1939
+ props: RadioProps<E>,
1940
+ ): JSX.Element
1688
1941
 
1689
- /**
1690
- * @public
1691
- */
1692
- export declare interface RadioProps {
1942
+ /** @public */
1943
+ export declare type RadioElementType = 'input' | ComponentType
1944
+
1945
+ /** @public */
1946
+ export declare type RadioOwnProps = {
1693
1947
  customValidity?: string
1694
1948
  }
1695
1949
 
1950
+ /** @public */
1951
+ export declare type RadioProps<E extends RadioElementType = RadioElementType> = Props<
1952
+ RadioOwnProps,
1953
+ E
1954
+ >
1955
+
1696
1956
  export {Radius}
1697
1957
 
1698
1958
  /**
@@ -1724,6 +1984,7 @@ export declare function _responsive<T>(
1724
1984
 
1725
1985
  /**
1726
1986
  * @internal
1987
+ * @deprecated This will be removed in next major version.
1727
1988
  */
1728
1989
  export declare interface ResponsiveAvatarSizeStyleProps {
1729
1990
  $size: AvatarSize[]
@@ -1883,6 +2144,36 @@ export declare const rgbToHex: typeof rgbToHex_2
1883
2144
  */
1884
2145
  export declare const rgbToHsl: typeof rgbToHsl_2
1885
2146
 
2147
+ /**
2148
+ * The `Root` component.
2149
+ *
2150
+ * @public
2151
+ */
2152
+ export declare function Root<E extends RootElementType = typeof DEFAULT_ROOT_ELEMENT>(
2153
+ props: RootProps<E>,
2154
+ ): JSX.Element
2155
+
2156
+ /** @public */
2157
+ export declare type RootElementType = 'html' | 'body' | 'div'
2158
+
2159
+ /** @public */
2160
+ export declare interface RootOwnProps extends BoxOwnProps, RootStyleProps {}
2161
+
2162
+ /** @public */
2163
+ export declare type RootProps<E extends RootElementType = RootElementType> = Props<RootOwnProps, E>
2164
+
2165
+ /** @public */
2166
+ export declare function RootProvider(props: RootProviderProps): JSX.Element
2167
+
2168
+ /** @public */
2169
+ export declare interface RootProviderProps {
2170
+ boundaryElement?: HTMLElement | null
2171
+ children?: ReactNode
2172
+ portalElement?: HTMLElement | null
2173
+ scheme?: ThemeColorSchemeKey_2
2174
+ tone?: ThemeColorCardToneKey
2175
+ }
2176
+
1886
2177
  /**
1887
2178
  * @public
1888
2179
  * @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
@@ -1901,109 +2192,161 @@ export {screen_2 as screen}
1901
2192
  *
1902
2193
  * @public
1903
2194
  */
1904
- export declare const Select: ForwardRefExoticComponent<
1905
- Omit<ElementProps_2<'select'> & PolymorphicProps_2, keyof SelectProps> &
1906
- SelectProps &
1907
- RefAttributes<HTMLSelectElement>
1908
- >
2195
+ export declare function Select<E extends SelectElementType = typeof DEFAULT_SELECT_ELEMENT>(
2196
+ props: SelectProps<E>,
2197
+ ): JSX.Element
2198
+
2199
+ /** @internal */
2200
+ export declare function Selectable<
2201
+ E extends SelectableElementType = typeof DEFAULT_SELECTABLE_ELEMENT,
2202
+ >(props: SelectableProps<E>): JSX.Element
2203
+
2204
+ /** @internal */
2205
+ export declare type SelectableElementType = 'button' | 'a' | ComponentType
2206
+
2207
+ /** @internal */
2208
+ export declare type SelectableOwnProps = BoxOwnProps &
2209
+ SelectableStyleProps & {
2210
+ disabled?: boolean
2211
+ href?: string
2212
+ selected?: boolean
2213
+ tone?: ThemeColorStateToneKey
2214
+ type?: 'button'
2215
+ }
2216
+
2217
+ /** @internal */
2218
+ export declare type SelectableProps<E extends SelectableElementType = SelectableElementType> =
2219
+ Props<SelectableOwnProps, E>
1909
2220
 
1910
2221
  /**
1911
- * @public
2222
+ * @internal
1912
2223
  * @deprecated Use `ThemeColorStateToneKey` instead
1913
2224
  */
1914
2225
  export declare type SelectableTone = ThemeColorStateToneKey
1915
2226
 
1916
- /**
1917
- * @public
1918
- */
1919
- export declare interface SelectProps extends SelectStyleProps {
2227
+ /** @public */
2228
+ export declare type SelectElementType = 'select' | ComponentType
2229
+
2230
+ /** @public */
2231
+ export declare type SelectOwnProps = SelectStyleProps & {
1920
2232
  customValidity?: string
1921
2233
  readOnly?: boolean
1922
2234
  /** @deprecated Use `gap` instead. */
1923
2235
  space?: ResponsiveProp<Space>
1924
2236
  }
1925
2237
 
2238
+ /** @public */
2239
+ export declare type SelectProps<E extends SelectElementType = SelectElementType> = Props<
2240
+ SelectOwnProps,
2241
+ E
2242
+ >
2243
+
1926
2244
  /**
1927
2245
  * This API might change. DO NOT USE IN PRODUCTION.
1928
2246
  * @beta
1929
2247
  */
1930
- export declare const Skeleton: ForwardRefExoticComponent<
1931
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof SkeletonProps> &
1932
- SkeletonProps &
1933
- RefAttributes<HTMLDivElement>
1934
- >
2248
+ export declare function Skeleton<E extends SkeletonElementType = typeof DEFAULT_SKELETON_ELEMENT>(
2249
+ props: SkeletonProps<E>,
2250
+ ): JSX.Element
2251
+
2252
+ /** @beta */
2253
+ export declare type SkeletonElementType = 'div' | 'span' | ComponentType
1935
2254
 
1936
2255
  /**
1937
2256
  * This API might change. DO NOT USE IN PRODUCTION.
1938
2257
  * @beta
1939
2258
  */
1940
- export declare interface SkeletonProps extends SkeletonStyleProps, Omit<BoxProps, 'children'> {
2259
+ export declare type SkeletonOwnProps = SkeletonStyleProps & {
1941
2260
  animated?: boolean
1942
2261
  delay?: number
1943
2262
  }
1944
2263
 
2264
+ /** @beta */
2265
+ export declare type SkeletonProps<E extends SkeletonElementType = SkeletonElementType> = Props<
2266
+ SkeletonOwnProps,
2267
+ E
2268
+ >
2269
+
1945
2270
  /**
1946
2271
  * Indicate that something is loading for an indeterminate amount of time.
1947
2272
  *
1948
2273
  * @public
1949
2274
  */
1950
- export declare const Spinner: ForwardRefExoticComponent<
1951
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof SpinnerProps> &
1952
- SpinnerProps &
1953
- RefAttributes<HTMLDivElement>
1954
- >
2275
+ export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
2276
+ props: SpinnerProps<E>,
2277
+ ): JSX.Element
1955
2278
 
1956
- /**
1957
- * @public
1958
- */
1959
- export declare interface SpinnerProps {
2279
+ /** @public */
2280
+ export declare type SpinnerElementType = 'div' | 'span' | ComponentType
2281
+
2282
+ /** @public */
2283
+ export declare type SpinnerOwnProps = {
1960
2284
  muted?: boolean
1961
2285
  size?: ResponsiveProp<FontTextSize>
1962
2286
  }
1963
2287
 
1964
- /**
1965
- * @public
1966
- */
1967
- export declare const SrOnly: ForwardRefExoticComponent<
1968
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, 'children'> &
1969
- SrOnlyProps &
1970
- RefAttributes<HTMLDivElement>
2288
+ /** @public */
2289
+ export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
2290
+ SpinnerOwnProps,
2291
+ E
1971
2292
  >
1972
2293
 
1973
- /**
1974
- * @public
1975
- */
1976
- export declare interface SrOnlyProps {
1977
- children?: ReactNode
1978
- }
2294
+ /** @public */
2295
+ export declare function SrOnly<E extends SrOnlyElementType = typeof DEFAULT_SR_ONLY_ELEMENT>(
2296
+ props: SrOnlyProps<E>,
2297
+ ): JSX.Element
2298
+
2299
+ /** @public */
2300
+ export declare type SrOnlyElementType = 'span' | ComponentType
2301
+
2302
+ /** @public */
2303
+ export declare type SrOnlyOwnProps = {}
2304
+
2305
+ /** @public */
2306
+ export declare type SrOnlyProps<E extends SrOnlyElementType = SrOnlyElementType> = Props<
2307
+ SrOnlyOwnProps,
2308
+ E
2309
+ >
1979
2310
 
1980
2311
  /**
1981
2312
  * The `Stack` component is used to place elements on top of each other.
1982
2313
  *
1983
2314
  * @public
1984
2315
  */
1985
- export declare const Stack: ForwardRefExoticComponent<
1986
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof StackProps> &
1987
- StackProps &
1988
- RefAttributes<HTMLDivElement>
1989
- >
2316
+ export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
2317
+ props: StackProps<E>,
2318
+ ): JSX.Element
1990
2319
 
1991
- /**
1992
- * @public
1993
- */
1994
- export declare interface StackProps
1995
- extends Omit<BoxProps, 'direction' | 'display' | 'gapX' | 'gapY'> {
2320
+ /** @public */
2321
+ export declare type StackElementType = BoxElementType
2322
+
2323
+ /** @public */
2324
+ export declare type StackOwnProps = Omit<
2325
+ BoxOwnProps,
2326
+ | 'align'
2327
+ | 'alignItems'
2328
+ | 'columns'
2329
+ | 'gridTemplateColumns'
2330
+ | 'direction'
2331
+ | 'display'
2332
+ | 'flexDirection'
2333
+ | 'flexWrap'
2334
+ | 'gapX'
2335
+ | 'gapY'
2336
+ | 'justify'
2337
+ | 'justifyContent'
2338
+ | 'rows'
2339
+ | 'gridTemplateRows'
2340
+ > & {
1996
2341
  /** @deprecated Use `gap` instead. */
1997
2342
  space?: ResponsiveProp<Space>
1998
2343
  }
1999
2344
 
2000
- /**
2001
- * @public
2002
- * @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
2003
- */
2004
- export declare const studioTheme: {
2005
- readonly value: RootTheme_2
2006
- }
2345
+ /** @public */
2346
+ export declare type StackProps<E extends StackElementType = StackElementType> = Props<
2347
+ StackOwnProps,
2348
+ E
2349
+ >
2007
2350
 
2008
2351
  /**
2009
2352
  * @public
@@ -2011,8 +2354,6 @@ export declare const studioTheme: {
2011
2354
  */
2012
2355
  export declare type Styles = ThemeStyles
2013
2356
 
2014
- export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
2015
-
2016
2357
  /**
2017
2358
  * The `Switch` component allows the user to toggle a setting on and off.
2018
2359
  *
@@ -2020,101 +2361,113 @@ export declare function StyleTags(props: {theme?: Theme_v3}): ReactNode
2020
2361
  *
2021
2362
  * @public
2022
2363
  */
2023
- export declare const Switch: ForwardRefExoticComponent<
2024
- Omit<ElementProps_2<'input'> & PolymorphicProps_2, 'indeterminate'> &
2025
- SwitchProps &
2026
- RefAttributes<HTMLInputElement>
2027
- >
2364
+ export declare function Switch<E extends SwitchElementType = typeof DEFAULT_SWITCH_ELEMENT>(
2365
+ props: SwitchProps<E>,
2366
+ ): JSX.Element
2028
2367
 
2029
- /**
2030
- * @public
2031
- */
2032
- export declare interface SwitchProps {
2368
+ /** @public */
2369
+ export declare type SwitchElementType = 'input' | ComponentType
2370
+
2371
+ /** @public */
2372
+ export declare type SwitchOwnProps = {
2033
2373
  indeterminate?: boolean
2034
2374
  }
2035
2375
 
2036
- /**
2037
- * @public
2038
- */
2039
- export declare const Tab: ForwardRefExoticComponent<
2040
- Omit<ElementProps_2<'button'> & PolymorphicProps_2, keyof TabProps> &
2041
- TabProps &
2042
- RefAttributes<HTMLButtonElement>
2376
+ /** @public */
2377
+ export declare type SwitchProps<E extends SwitchElementType = SwitchElementType> = Props<
2378
+ SwitchOwnProps,
2379
+ E
2043
2380
  >
2044
2381
 
2045
- /**
2046
- * @public
2047
- */
2048
- export declare const TabList: ForwardRefExoticComponent<
2049
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabListProps> &
2050
- TabListProps &
2051
- RefAttributes<HTMLDivElement>
2052
- >
2382
+ /** @public */
2383
+ export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
2384
+ props: TabProps<E>,
2385
+ ): JSX.Element
2053
2386
 
2054
- /**
2055
- * @public
2056
- */
2387
+ /** @public */
2388
+ export declare type TabElementType = 'button' | ComponentType
2389
+
2390
+ /** @public */
2391
+ export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
2392
+ props: TabListProps<E>,
2393
+ ): JSX.Element
2394
+
2395
+ /** @public */
2057
2396
  export declare type TabListChild =
2058
2397
  | ReactElement<Props<TabProps, 'button'>>
2059
2398
  | null
2060
2399
  | undefined
2061
2400
  | false
2062
2401
 
2063
- /**
2064
- * @public
2065
- */
2066
- export declare interface TabListProps extends Omit<InlineProps, 'as' | 'height'> {
2067
- children: TabListChild[]
2068
- }
2069
-
2070
- /**
2071
- * @public
2072
- */
2073
- export declare const TabPanel: ForwardRefExoticComponent<
2074
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TabPanelProps> &
2075
- TabPanelProps &
2076
- RefAttributes<HTMLDivElement>
2077
- >
2402
+ /** @public */
2403
+ export declare type TabListElementType = 'div' | 'span' | ComponentType
2078
2404
 
2079
- /**
2080
- * @public
2081
- */
2082
- export declare interface TabPanelProps extends BoxProps {
2083
- /**
2084
- * The `id` of the correlating `Tab` component.
2085
- */
2086
- 'aria-labelledby': string
2087
- 'id': string
2405
+ /** @public */
2406
+ export declare type TabListOwnProps = Omit<FlexOwnProps, 'as' | 'height'> & {
2407
+ children: TabListChild[]
2408
+ /** @deprecated Use `gap` instead */
2409
+ space?: ResponsiveProp<Space>
2088
2410
  }
2089
2411
 
2090
- /**
2091
- * @public
2092
- */
2093
- export declare interface TabProps {
2412
+ /** @public */
2413
+ export declare type TabListProps<E extends TabListElementType = TabListElementType> = Props<
2414
+ TabListOwnProps,
2415
+ E
2416
+ >
2417
+
2418
+ /** @public */
2419
+ export declare type TabOwnProps = {
2094
2420
  /**
2095
2421
  * The `id` of the corresponding `TabPanel` component.
2096
2422
  */
2097
2423
  'aria-controls': string
2098
2424
  'id': string
2099
- 'icon'?: ElementType | ReactNode
2425
+ 'icon'?: ElementType_2 | ReactNode
2100
2426
  'focused'?: boolean
2101
2427
  'fontSize'?: ResponsiveProp<FontTextSize>
2102
2428
  'label'?: ReactNode
2103
2429
  'padding'?: ResponsiveProp<Space>
2104
2430
  'selected'?: boolean
2105
- 'tone'?: ButtonTone
2431
+ 'tone'?: ThemeColorStateToneKey
2432
+ }
2433
+
2434
+ /** @public */
2435
+ export declare function TabPanel<E extends TabPanelElementType = typeof DEFAULT_TAB_PANEL_ELEMENT>(
2436
+ props: TabPanelProps<E>,
2437
+ ): JSX.Element
2438
+
2439
+ /** @public */
2440
+ export declare type TabPanelElementType = 'div' | 'span' | ComponentType
2441
+
2442
+ /** @public */
2443
+ export declare type TabPanelOwnProps = BoxOwnProps & {
2444
+ /**
2445
+ * The `id` of the correlating `Tab` component.
2446
+ */
2447
+ 'aria-labelledby': string
2448
+ 'id': string
2106
2449
  }
2107
2450
 
2451
+ /** @public */
2452
+ export declare type TabPanelProps<E extends TabPanelElementType = TabPanelElementType> = Props<
2453
+ TabPanelOwnProps,
2454
+ E
2455
+ >
2456
+
2457
+ /** @public */
2458
+ export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
2459
+
2460
+ /** @public */
2461
+ export declare type TagType = keyof JSX.IntrinsicElements
2462
+
2108
2463
  /**
2109
2464
  * The `Text` component is an agile, themed typographic element.
2110
2465
  *
2111
2466
  * @public
2112
2467
  */
2113
- declare const Text_2: ForwardRefExoticComponent<
2114
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TextProps> &
2115
- TextProps &
2116
- RefAttributes<HTMLDivElement>
2117
- >
2468
+ declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
2469
+ props: TextProps<E>,
2470
+ ): JSX.Element
2118
2471
  export {Text_2 as Text}
2119
2472
 
2120
2473
  export {TextAlign}
@@ -2124,16 +2477,15 @@ export {TextAlign}
2124
2477
  *
2125
2478
  * @public
2126
2479
  */
2127
- export declare const TextArea: ForwardRefExoticComponent<
2128
- Omit<ElementProps_2<'textarea'> & PolymorphicProps_2, keyof TextAreaProps> &
2129
- TextAreaProps &
2130
- RefAttributes<HTMLTextAreaElement>
2131
- >
2480
+ export declare function TextArea<E extends TextAreaElementType = typeof DEFAULT_TEXT_AREA_ELEMENT>(
2481
+ props: TextAreaProps<E>,
2482
+ ): JSX.Element
2132
2483
 
2133
- /**
2134
- * @public
2135
- */
2136
- export declare interface TextAreaProps extends TextAreaStyleProps {
2484
+ /** @public */
2485
+ export declare type TextAreaElementType = 'textarea' | ComponentType
2486
+
2487
+ /** @public */
2488
+ export declare type TextAreaOwnProps = TextAreaStyleProps & {
2137
2489
  /**
2138
2490
  * @beta
2139
2491
  */
@@ -2141,32 +2493,49 @@ export declare interface TextAreaProps extends TextAreaStyleProps {
2141
2493
  customValidity?: string
2142
2494
  /** @deprecated Use `gap` instead. */
2143
2495
  space?: ResponsiveProp<Space>
2144
- weight?: ThemeFontWeightKey_2
2145
2496
  }
2146
2497
 
2498
+ /** @public */
2499
+ export declare type TextAreaProps<E extends TextAreaElementType = TextAreaElementType> = Props<
2500
+ TextAreaOwnProps,
2501
+ E
2502
+ >
2503
+
2504
+ /** @public */
2505
+ export declare type TextElementType =
2506
+ | 'div'
2507
+ | 'h1'
2508
+ | 'h2'
2509
+ | 'h3'
2510
+ | 'h4'
2511
+ | 'h5'
2512
+ | 'h6'
2513
+ | 'label'
2514
+ | 'li'
2515
+ | 'p'
2516
+ | 'span'
2517
+ | ComponentType
2518
+
2147
2519
  /**
2148
2520
  * Single line text input.
2149
2521
  *
2150
2522
  * @public
2151
2523
  */
2152
- export declare const TextInput: ForwardRefExoticComponent<
2153
- Omit<ElementProps_2<'input'> & PolymorphicProps_2, keyof TextInputProps> &
2154
- TextInputProps &
2155
- RefAttributes<HTMLInputElement>
2156
- >
2524
+ export declare function TextInput<
2525
+ E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
2526
+ >(props: TextInputProps<E>): JSX.Element
2157
2527
 
2158
- /**
2159
- * @public
2160
- */
2528
+ /** @public */
2161
2529
  export declare type TextInputClearButtonProps = Omit<
2162
- Props<ButtonProps, 'button'>,
2530
+ ButtonProps<'button'>,
2163
2531
  'as' | 'onClick' | 'onMouseDown'
2164
2532
  >
2165
2533
 
2166
- /**
2167
- * @public
2168
- */
2169
- export declare interface TextInputProps extends InputStyleProps {
2534
+ /** @public */
2535
+ export declare type TextInputElementType = 'input' | ComponentType
2536
+
2537
+ /** @public */
2538
+ export declare type TextInputOwnProps = InputStyleProps & {
2170
2539
  /**
2171
2540
  * @beta
2172
2541
  */
@@ -2176,8 +2545,8 @@ export declare interface TextInputProps extends InputStyleProps {
2176
2545
  */
2177
2546
  clearButton?: boolean | TextInputClearButtonProps
2178
2547
  customValidity?: string
2179
- icon?: ElementType | ReactNode
2180
- iconRight?: ElementType | ReactNode
2548
+ icon?: ElementType_2 | ReactNode
2549
+ iconRight?: ElementType_2 | ReactNode
2181
2550
  /**
2182
2551
  * @beta
2183
2552
  */
@@ -2186,52 +2555,43 @@ export declare interface TextInputProps extends InputStyleProps {
2186
2555
  /** @deprecated Use `gap` instead. */
2187
2556
  space?: ResponsiveProp<Space>
2188
2557
  suffix?: ReactNode
2189
- type?: TextInputType
2190
2558
  weight?: ThemeFontWeightKey_2
2191
2559
  }
2192
2560
 
2193
- /**
2194
- * @public
2195
- */
2196
- export declare type TextInputType =
2197
- | 'search'
2198
- | 'date'
2199
- | 'datetime-local'
2200
- | 'email'
2201
- | 'url'
2202
- | 'month'
2203
- | 'number'
2204
- | 'password'
2205
- | 'tel'
2206
- | 'time'
2207
- | 'text'
2208
- | 'week'
2209
- | 'color'
2561
+ /** @public */
2562
+ export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
2563
+ TextInputOwnProps,
2564
+ E
2565
+ >
2210
2566
 
2211
- /**
2212
- * @public
2213
- */
2214
- export declare interface TextProps extends TextStyleProps, TextOverflowStyleProps {
2215
- htmlFor?: string
2216
- }
2567
+ /** @public */
2568
+ export declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
2569
+
2570
+ /** @public */
2571
+ export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
2217
2572
 
2218
2573
  /**
2219
2574
  * This API might change. DO NOT USE IN PRODUCTION.
2220
2575
  * @beta
2221
2576
  */
2222
- export declare const TextSkeleton: ForwardRefExoticComponent<
2223
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TextSkeletonProps> &
2224
- TextSkeletonProps &
2225
- RefAttributes<HTMLDivElement>
2226
- >
2577
+ export declare function TextSkeleton<
2578
+ E extends TextSkeletonElementType = typeof DEFAULT_TEXT_SKELETON_ELEMENT,
2579
+ >(props: TextSkeletonProps<E>): JSX.Element
2580
+
2581
+ /** @beta */
2582
+ export declare type TextSkeletonElementType = SkeletonElementType
2583
+
2584
+ /** @beta */
2585
+ export declare type TextSkeletonOwnProps = SkeletonOwnProps & {
2586
+ size?: ResponsiveProp<FontTextSize>
2587
+ }
2227
2588
 
2228
2589
  /**
2229
2590
  * This API might change. DO NOT USE IN PRODUCTION.
2230
2591
  * @beta
2231
2592
  */
2232
- export declare interface TextSkeletonProps extends SkeletonProps {
2233
- size?: ResponsiveProp<FontTextSize>
2234
- }
2593
+ export declare type TextSkeletonProps<E extends TextSkeletonElementType = TextSkeletonElementType> =
2594
+ Props<TextSkeletonOwnProps, E>
2235
2595
 
2236
2596
  /**
2237
2597
  * @public
@@ -2279,18 +2639,10 @@ export {ThemeColorMutedTone}
2279
2639
 
2280
2640
  export {ThemeColorName}
2281
2641
 
2282
- /**
2283
- * @public
2284
- */
2642
+ /** @public */
2285
2643
  export declare function ThemeColorProvider(props: ThemeColorProviderProps): ReactElement
2286
2644
 
2287
- export declare namespace ThemeColorProvider {
2288
- var displayName: string
2289
- }
2290
-
2291
- /**
2292
- * @public
2293
- */
2645
+ /** @public */
2294
2646
  export declare interface ThemeColorProviderProps {
2295
2647
  children?: ReactNode
2296
2648
  scheme?: ThemeColorSchemeKey_2
@@ -2329,9 +2681,7 @@ export declare type ThemeColorSyntax = ThemeColorSyntax_2
2329
2681
 
2330
2682
  export {ThemeColorToneKey}
2331
2683
 
2332
- /**
2333
- * @public
2334
- */
2684
+ /** @public */
2335
2685
  export declare interface ThemeContextValue {
2336
2686
  /** @deprecated No longer used */
2337
2687
  version: 0.0
@@ -2384,18 +2734,10 @@ export {ThemeInput}
2384
2734
  */
2385
2735
  export declare type ThemeLayer = ThemeLayer_2
2386
2736
 
2387
- /**
2388
- * @public
2389
- */
2737
+ /** @public */
2390
2738
  export declare function ThemeProvider(props: ThemeProviderProps): ReactElement
2391
2739
 
2392
- export declare namespace ThemeProvider {
2393
- var displayName: string
2394
- }
2395
-
2396
- /**
2397
- * @public
2398
- */
2740
+ /** @public */
2399
2741
  export declare interface ThemeProviderProps {
2400
2742
  children?: ReactNode
2401
2743
  scheme?: ThemeColorSchemeKey_2
@@ -2412,24 +2754,15 @@ export declare type ThemeShadow = ThemeShadow_2
2412
2754
  /**
2413
2755
  * The `Toast` component gives feedback to users when an action has taken place.
2414
2756
  *
2415
- * Toasts can be closed with a close button, or auto-dismiss after a certain timeout.
2757
+ * Toasts can be closed with a close button, or auto-dismiss when the duration expires.
2416
2758
  *
2417
- * @public
2759
+ * @internal
2418
2760
  */
2419
- export declare function Toast(
2420
- props: Omit<
2421
- Props<ToastProps, 'div'>,
2422
- 'onDrag' | 'onDragEnd' | 'onDragStart' | 'onAnimationStart'
2423
- >,
2424
- ): ReactElement
2425
-
2426
- export declare namespace Toast {
2427
- var displayName: string
2428
- }
2761
+ export declare function Toast<E extends ToastElementType = typeof DEFAULT_TOAST_ELEMENT>(
2762
+ props: ToastProps<E>,
2763
+ ): JSX.Element
2429
2764
 
2430
- /**
2431
- * @public
2432
- */
2765
+ /** @public */
2433
2766
  export declare interface ToastContextValue {
2434
2767
  version: 0.0
2435
2768
  /**
@@ -2441,54 +2774,55 @@ export declare interface ToastContextValue {
2441
2774
  push: (params: ToastParams) => string
2442
2775
  }
2443
2776
 
2444
- /**
2445
- * @public
2446
- */
2447
- declare interface ToastLayerProps extends GapStyleProps, PaddingStyleProps {
2448
- children: ReactNode
2449
- }
2777
+ /** @internal */
2778
+ export declare type ToastElementType = 'li' | ComponentType
2450
2779
 
2451
- /**
2452
- * @public
2453
- */
2454
- export declare interface ToastParams {
2780
+ /** @internal */
2781
+ declare type ToastLayerElementType = 'ul' | ComponentType
2782
+
2783
+ /** @internal */
2784
+ declare type ToastLayerOwnProps = GapStyleProps & PaddingStyleProps
2785
+
2786
+ /** @internal */
2787
+ declare type ToastLayerProps<E extends ToastLayerElementType = ToastLayerElementType> = Props<
2788
+ ToastLayerOwnProps,
2789
+ E
2790
+ >
2791
+
2792
+ /** @internal */
2793
+ export declare type ToastOwnProps = RadiusStyleProps & {
2455
2794
  closable?: boolean
2456
2795
  description?: ReactNode
2457
- duration?: number
2458
- id?: string
2459
2796
  onClose?: () => void
2460
2797
  title?: ReactNode
2461
2798
  status?: 'error' | 'warning' | 'success' | 'info'
2799
+ duration?: number
2462
2800
  }
2463
2801
 
2464
- /**
2465
- * @public
2466
- */
2467
- export declare interface ToastProps extends RadiusStyleProps {
2802
+ /** @public */
2803
+ export declare interface ToastParams {
2468
2804
  closable?: boolean
2469
2805
  description?: ReactNode
2806
+ duration?: number
2807
+ id?: string
2470
2808
  onClose?: () => void
2471
2809
  title?: ReactNode
2472
2810
  status?: 'error' | 'warning' | 'success' | 'info'
2473
- duration?: number
2474
- updatedAt?: number
2475
2811
  }
2476
2812
 
2477
- /**
2478
- * @public
2479
- */
2480
- export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
2813
+ /** @internal */
2814
+ export declare type ToastProps<E extends ToastElementType = ToastElementType> = Props<
2815
+ ToastOwnProps,
2816
+ E
2817
+ >
2481
2818
 
2482
- export declare namespace ToastProvider {
2483
- var displayName: string
2484
- }
2819
+ /** @public */
2820
+ export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
2485
2821
 
2486
- /**
2487
- * @public
2488
- */
2822
+ /** @public */
2489
2823
  export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
2490
2824
  children?: React.ReactNode
2491
- zOffset?: number | number[]
2825
+ zOffset?: ResponsiveProp<number>
2492
2826
  }
2493
2827
 
2494
2828
  /**
@@ -2496,11 +2830,9 @@ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'child
2496
2830
  *
2497
2831
  * @public
2498
2832
  */
2499
- export declare const Tooltip: ForwardRefExoticComponent<
2500
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TooltipProps> &
2501
- TooltipProps &
2502
- RefAttributes<HTMLDivElement>
2503
- >
2833
+ export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
2834
+ props: TooltipProps<E>,
2835
+ ): JSX.Element
2504
2836
 
2505
2837
  /**
2506
2838
  * @beta
@@ -2527,10 +2859,6 @@ export declare function TooltipDelayGroupProvider(
2527
2859
  props: TooltipDelayGroupProviderProps,
2528
2860
  ): ReactElement
2529
2861
 
2530
- export declare namespace TooltipDelayGroupProvider {
2531
- var displayName: string
2532
- }
2533
-
2534
2862
  /**
2535
2863
  * @public
2536
2864
  * */
@@ -2548,55 +2876,59 @@ export declare interface TooltipDelayGroupProviderProps {
2548
2876
  delay: Delay
2549
2877
  }
2550
2878
 
2551
- /**
2552
- * @public
2553
- */
2554
- export declare interface TooltipProps
2555
- extends Omit<LayerProps, 'as'>,
2556
- RadiusStyleProps,
2557
- ShadowStyleProps {
2558
- /** @deprecated Use `fallbackPlacements` instead. */
2559
- allowedAutoPlacements?: Placement[]
2560
- /**
2561
- * Whether the tooltip should animate in and out.
2562
- *
2563
- * @beta
2564
- * @defaultValue false
2565
- */
2566
- animate?: boolean
2567
- arrow?: boolean
2568
- boundaryElement?: HTMLElement | null
2569
- children?: ReactElement<Props>
2570
- content?: ReactNode
2571
- /**
2572
- * Adds a delay to open or close the tooltip.
2573
- *
2574
- * If only a `number` is passed, it will be used for both opening and closing.
2575
- *
2576
- * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2577
- *
2578
- * @public
2579
- * @defaultValue 0
2580
- */
2581
- delay?: Delay
2582
- disabled?: boolean
2583
- fallbackPlacements?: Placement[]
2584
- placement?: Placement
2585
- /** Whether or not to render the tooltip in a portal element. */
2586
- portal?: boolean | string
2587
- scheme?: ThemeColorSchemeKey_2
2588
- tone?: ThemeColorCardToneKey
2589
- }
2879
+ /** @public */
2880
+ export declare type TooltipElementType = 'div' | 'span' | ComponentType
2881
+
2882
+ /** @public */
2883
+ export declare type TooltipOwnProps = LayerOwnProps &
2884
+ RadiusStyleProps &
2885
+ ShadowStyleProps & {
2886
+ /** @deprecated Use `fallbackPlacements` instead. */
2887
+ allowedAutoPlacements?: Placement[]
2888
+ /**
2889
+ * Whether the tooltip should animate in and out.
2890
+ *
2891
+ * @beta
2892
+ * @defaultValue false
2893
+ */
2894
+ animate?: boolean
2895
+ arrow?: boolean
2896
+ boundaryElement?: HTMLElement | null
2897
+ children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
2898
+ content?: ReactNode
2899
+ /**
2900
+ * Adds a delay to open or close the tooltip.
2901
+ *
2902
+ * If only a `number` is passed, it will be used for both opening and closing.
2903
+ *
2904
+ * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2905
+ *
2906
+ * @public
2907
+ * @defaultValue 0
2908
+ */
2909
+ delay?: Delay
2910
+ disabled?: boolean
2911
+ fallbackPlacements?: Placement[]
2912
+ placement?: Placement
2913
+ /** Whether or not to render the tooltip in a portal element. */
2914
+ portal?: boolean | string
2915
+ scheme?: ThemeColorSchemeKey_2
2916
+ tone?: ThemeColorCardToneKey
2917
+ }
2918
+
2919
+ /** @public */
2920
+ export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
2921
+ TooltipOwnProps,
2922
+ E
2923
+ >
2590
2924
 
2591
2925
  /**
2592
2926
  * This API might change. DO NOT USE IN PRODUCTION.
2593
2927
  * @beta
2594
2928
  */
2595
- export declare const Tree: NamedExoticComponent<
2596
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof TreeProps> &
2597
- TreeProps &
2598
- RefAttributes<HTMLDivElement>
2599
- >
2929
+ export declare function Tree<E extends TreeElementType = typeof DEFAULT_TREE_ELEMENT>(
2930
+ props: TreeProps<E>,
2931
+ ): JSX.Element
2600
2932
 
2601
2933
  /**
2602
2934
  * @beta
@@ -2613,38 +2945,56 @@ export declare interface TreeContextValue {
2613
2945
  state: TreeState
2614
2946
  }
2615
2947
 
2948
+ /** @beta */
2949
+ export declare type TreeElementType = 'div' | ComponentType
2950
+
2616
2951
  /**
2617
2952
  * This API might change. DO NOT USE IN PRODUCTION.
2618
2953
  * @beta
2619
2954
  */
2620
- export declare const TreeItem: NamedExoticComponent<Omit<Props<TreeItemProps, 'div'>, 'as'>>
2955
+ export declare function TreeItem<E extends TreeItemElementType = typeof DEFAULT_TREE_ITEM_ELEMENT>(
2956
+ props: TreeItemProps<E>,
2957
+ ): JSX.Element
2621
2958
 
2622
- /**
2623
- * @beta
2624
- */
2625
- export declare interface TreeItemProps extends CardProps {
2959
+ /** @beta */
2960
+ export declare type TreeItemElementType = 'a' | 'li' | ComponentType
2961
+
2962
+ /** @beta */
2963
+ export declare type TreeItemOwnProps = CardOwnProps & {
2626
2964
  expanded?: boolean
2627
2965
  fontSize?: ResponsiveProp<FontTextSize>
2628
- icon?: ElementType
2966
+ icon?: ElementType_2
2629
2967
  /**
2630
2968
  * Allows passing a custom element type to the link component
2969
+ * @internal
2631
2970
  */
2632
- linkAs?: ElementType
2971
+ linkAs?: SelectableElementType
2972
+ onClick?: MouseEventHandler<HTMLAnchorElement | HTMLLIElement>
2633
2973
  padding?: ResponsiveProp<Space>
2634
2974
  space?: ResponsiveProp<Space>
2635
2975
  text?: ReactNode
2636
2976
  weight?: ThemeFontWeightKey_2
2637
2977
  }
2638
2978
 
2979
+ /** @beta */
2980
+ export declare type TreeItemProps<E extends TreeItemElementType = TreeItemElementType> = Props<
2981
+ TreeItemOwnProps,
2982
+ E
2983
+ >
2984
+
2639
2985
  /**
2640
2986
  * This API might change. DO NOT USE IN PRODUCTION.
2641
2987
  * @beta
2642
2988
  */
2643
- export declare interface TreeProps extends Pick<GapStyleProps, 'gap'> {
2989
+ export declare type TreeOwnProps = {
2990
+ gap?: ResponsiveProp<Space>
2644
2991
  /** @deprecated Use `gap` instead. */
2645
2992
  space?: ResponsiveProp<Space>
2646
2993
  }
2647
2994
 
2995
+ /** @beta */
2996
+ export declare type TreeProps<E extends TreeElementType = TreeElementType> = Props<TreeOwnProps, E>
2997
+
2648
2998
  /**
2649
2999
  * @beta
2650
3000
  */
@@ -2657,19 +3007,18 @@ export declare interface TreeState {
2657
3007
  | undefined
2658
3008
  }
2659
3009
 
2660
- /** @beta */
2661
3010
  /**
2662
3011
  * This API might change. DO NOT USE IN PRODUCTION.
2663
3012
  * @beta
3013
+ * @deprecated Use `useResponsiveProp` instead.
2664
3014
  */
2665
3015
  export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T[]): T[]
2666
3016
 
2667
- /**
2668
- * @public
2669
- */
3017
+ /** @public */
2670
3018
  export declare function useBoundaryElement(): BoundaryElementContextValue
2671
3019
 
2672
- export declare function useCard(): CardContextValue_2 | null
3020
+ /** @public */
3021
+ export declare function useCard(): CardContextValue | null
2673
3022
 
2674
3023
  /**
2675
3024
  * @public
@@ -2692,9 +3041,7 @@ export declare function useClickOutside(
2692
3041
  boundaryElement?: HTMLElement | null,
2693
3042
  ): (el: HTMLElement | null) => void
2694
3043
 
2695
- /**
2696
- * @public
2697
- */
3044
+ /** @public */
2698
3045
  export declare function useClickOutsideEvent(
2699
3046
  listener: ClickOutsideEventListener | false | undefined,
2700
3047
  elementsArg?: () => ClickOutsideEventElements,
@@ -2750,9 +3097,7 @@ export declare function useForwardedRef<T>(ref: ForwardedRef<T>): MutableRefObje
2750
3097
  */
2751
3098
  export declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void): void
2752
3099
 
2753
- /**
2754
- * @public
2755
- */
3100
+ /** @public */
2756
3101
  export declare function useLayer(): LayerContextValue
2757
3102
 
2758
3103
  /**
@@ -2771,11 +3116,9 @@ export declare function useMatchMedia(
2771
3116
  * This API might change. DO NOT USE IN PRODUCTION.
2772
3117
  * @beta
2773
3118
  */
2774
- export declare function useMediaIndex(): number
3119
+ export declare function useMediaIndex(): Breakpoint
2775
3120
 
2776
- /**
2777
- * @public
2778
- */
3121
+ /** @public */
2779
3122
  export declare function usePortal(): PortalContextValue
2780
3123
 
2781
3124
  /**
@@ -2805,23 +3148,24 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
2805
3148
  export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
2806
3149
 
2807
3150
  /**
2808
- * @public
3151
+ * This API might change. DO NOT USE IN PRODUCTION.
3152
+ * @beta
2809
3153
  */
3154
+ export declare function useResponsiveProp<T>(
3155
+ val: ResponsiveProp<T> | undefined,
3156
+ defaultVal?: Partial<Record<Breakpoint, T>>,
3157
+ ): Partial<Record<Breakpoint, T>>
3158
+
3159
+ /** @public */
2810
3160
  export declare function useRootTheme(): ThemeContextValue
2811
3161
 
2812
- /**
2813
- * @public
2814
- */
3162
+ /** @public */
2815
3163
  export declare function useTheme(): Theme_2
2816
3164
 
2817
- /**
2818
- * @public
2819
- */
3165
+ /** @public */
2820
3166
  export declare function useTheme_v2(): Theme_v2
2821
3167
 
2822
- /**
2823
- * @public
2824
- */
3168
+ /** @public */
2825
3169
  export declare function useToast(): ToastContextValue
2826
3170
 
2827
3171
  /**
@@ -2834,18 +3178,12 @@ export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue |
2834
3178
  */
2835
3179
  export declare function useTree(): TreeContextValue
2836
3180
 
2837
- /**
2838
- * @beta
2839
- */
2840
- export declare const VirtualList: ForwardRefExoticComponent<
2841
- Omit<ElementProps_2<'div'> & PolymorphicProps_2, keyof VirtualListProps<any>> &
2842
- VirtualListProps<any> &
2843
- RefAttributes<HTMLDivElement>
2844
- >
3181
+ /** @beta */
3182
+ export declare function VirtualList<
3183
+ E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
3184
+ >(props: VirtualListProps<E>): JSX.Element
2845
3185
 
2846
- /**
2847
- * @beta
2848
- */
3186
+ /** @beta */
2849
3187
  export declare interface VirtualListChangeOpts {
2850
3188
  fromIndex: number
2851
3189
  gap: number
@@ -2855,15 +3193,20 @@ export declare interface VirtualListChangeOpts {
2855
3193
  toIndex: number
2856
3194
  }
2857
3195
 
2858
- /**
2859
- * @beta
2860
- */
2861
- export declare interface VirtualListProps<Item = any> extends Omit<StackProps, 'gap'> {
2862
- gap?: number
3196
+ /** @beta */
3197
+ export declare type VirtualListElementType = 'div' | ComponentType
3198
+
3199
+ /** @beta */
3200
+ export declare type VirtualListOwnProps<Item = any> = {
3201
+ gap?: Space
2863
3202
  getItemKey?: (item: Item, itemIndex: number) => string
2864
3203
  items?: Item[]
2865
3204
  onChange?: (opts: VirtualListChangeOpts) => void
2866
3205
  renderItem?: (item: Item) => ReactNode
2867
3206
  }
2868
3207
 
3208
+ /** @beta */
3209
+ export declare type VirtualListProps<E extends VirtualListElementType = VirtualListElementType> =
3210
+ Props<VirtualListOwnProps, E>
3211
+
2869
3212
  export {}