@sanity/ui 3.3.1 → 3.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/dist/_visual-editing.d.mts +2 -1126
  2. package/dist/_visual-editing.d.ts +2 -1126
  3. package/dist/_visual-editing.js +3 -31
  4. package/dist/_visual-editing.mjs +2 -31
  5. package/dist/index.d.mts +555 -2769
  6. package/dist/index.d.mts.map +1 -0
  7. package/dist/index.d.ts +555 -2769
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +2982 -1934
  10. package/dist/index.mjs +2950 -1903
  11. package/dist/index.mjs.map +1 -1
  12. package/dist/refractor.js +16 -0
  13. package/dist/refractor.mjs +21 -0
  14. package/dist/refractor.mjs.map +1 -0
  15. package/dist/tabList.js +3804 -0
  16. package/dist/tabList.mjs +3355 -0
  17. package/dist/tabList.mjs.map +1 -0
  18. package/dist/theme.d.mts +927 -1227
  19. package/dist/theme.d.mts.map +1 -0
  20. package/dist/theme.d.ts +927 -1227
  21. package/dist/theme.d.ts.map +1 -0
  22. package/dist/theme.js +3 -4127
  23. package/dist/theme.mjs +2 -4127
  24. package/dist/theme2.d.mts +2 -0
  25. package/dist/theme2.d.ts +2 -0
  26. package/dist/theme2.js +4104 -0
  27. package/dist/theme2.mjs +3851 -0
  28. package/dist/theme2.mjs.map +1 -0
  29. package/dist/useTheme.d.mts +1451 -0
  30. package/dist/useTheme.d.mts.map +1 -0
  31. package/dist/useTheme.d.ts +1451 -0
  32. package/dist/useTheme.d.ts.map +1 -0
  33. package/exports/_visual-editing.ts +1 -0
  34. package/package.json +49 -102
  35. package/src/core/_compat.ts +30 -0
  36. package/src/core/components/autocomplete/autocomplete.tsx +8 -0
  37. package/src/core/components/autocomplete/autocompleteOption.tsx +1 -0
  38. package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +8 -5
  39. package/src/core/components/breadcrumbs/breadcrumbs.tsx +3 -0
  40. package/src/core/components/dialog/dialog.tsx +5 -2
  41. package/src/core/components/hotkeys/hotkeys.test.tsx +10 -5
  42. package/src/core/components/hotkeys/hotkeys.tsx +2 -0
  43. package/src/core/components/menu/menu.spacing.test.tsx +12 -7
  44. package/src/core/components/menu/menu.test.tsx +9 -6
  45. package/src/core/components/menu/menu.tsx +4 -2
  46. package/src/core/components/menu/menuButton.tsx +8 -0
  47. package/src/core/components/menu/menuDivider.ts +1 -0
  48. package/src/core/components/menu/menuGroup.spacing.test.tsx +9 -6
  49. package/src/core/components/menu/menuGroup.tsx +6 -2
  50. package/src/core/components/menu/menuItem.spacing.test.tsx +8 -5
  51. package/src/core/components/menu/menuItem.tsx +4 -0
  52. package/src/core/components/menu/useMenuController.ts +2 -0
  53. package/src/core/components/skeleton/skeleton.tsx +1 -0
  54. package/src/core/components/tab/tab.tsx +1 -0
  55. package/src/core/components/tab/tabList.test.tsx +7 -5
  56. package/src/core/components/tab/tabList.tsx +1 -0
  57. package/src/core/components/toast/toast.test.tsx +9 -4
  58. package/src/core/components/toast/toast.tsx +1 -0
  59. package/src/core/components/toast/toastLayer.tsx +1 -0
  60. package/src/core/components/tree/tree.test.tsx +10 -5
  61. package/src/core/components/tree/tree.tsx +2 -0
  62. package/src/core/components/tree/treeGroup.tsx +1 -0
  63. package/src/core/components/tree/treeItem.test.tsx +10 -5
  64. package/src/core/components/tree/treeItem.tsx +1 -0
  65. package/src/core/hooks/index.ts +1 -0
  66. package/src/core/hooks/useClickOutside.test.tsx +43 -15
  67. package/src/core/hooks/useClickOutside.ts +1 -1
  68. package/src/core/hooks/useClickOutsideEvent.test.tsx +8 -4
  69. package/src/core/hooks/useDelayed.test.ts +9 -8
  70. package/src/core/hooks/useElementRect/useElementRect.ts +1 -0
  71. package/src/core/hooks/useForwardedRef.ts +1 -0
  72. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +2 -1
  73. package/src/core/hooks/usePrefersDark.hydration.test.tsx +7 -5
  74. package/src/core/hooks/usePrefersDark.test.tsx +3 -1
  75. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +7 -5
  76. package/src/core/hooks/usePrefersReducedMotion.test.tsx +3 -1
  77. package/src/core/lib/createGlobalScopedContext.ts +1 -0
  78. package/src/core/lib/globalScope.ts +1 -0
  79. package/src/core/observers/elementSizeObserver.ts +1 -0
  80. package/src/core/primitives/avatar/avatar.tsx +2 -2
  81. package/src/core/primitives/avatar/avatarStack.tsx +1 -0
  82. package/src/core/primitives/badge/badge.test.tsx +3 -2
  83. package/src/core/primitives/badge/badge.tsx +3 -1
  84. package/src/core/primitives/box/box.test.tsx +18 -5
  85. package/src/core/primitives/box/box.tsx +9 -1
  86. package/src/core/primitives/button/button.test.tsx +10 -6
  87. package/src/core/primitives/button/button.tsx +4 -0
  88. package/src/core/primitives/button/styles.ts +1 -0
  89. package/src/core/primitives/card/card.tsx +2 -5
  90. package/src/core/primitives/card/types.ts +1 -0
  91. package/src/core/primitives/code/code.tsx +1 -0
  92. package/src/core/primitives/code/refractor.tsx +2 -0
  93. package/src/core/primitives/container/container.tsx +1 -0
  94. package/src/core/primitives/flex/flex.tsx +2 -3
  95. package/src/core/primitives/grid/grid.test.tsx +11 -5
  96. package/src/core/primitives/grid/grid.tsx +3 -0
  97. package/src/core/primitives/heading/heading.tsx +1 -0
  98. package/src/core/primitives/inline/inline.test.tsx +9 -5
  99. package/src/core/primitives/inline/inline.tsx +3 -0
  100. package/src/core/primitives/kbd/kbd.tsx +5 -1
  101. package/src/core/primitives/label/label.tsx +1 -0
  102. package/src/core/primitives/popover/popover.tsx +5 -4
  103. package/src/core/primitives/popover/popoverCard.tsx +1 -0
  104. package/src/core/primitives/popover/types.ts +0 -1
  105. package/src/core/primitives/select/select.test.tsx +9 -5
  106. package/src/core/primitives/select/select.tsx +1 -0
  107. package/src/core/primitives/stack/stack.test.tsx +9 -5
  108. package/src/core/primitives/stack/stack.tsx +2 -0
  109. package/src/core/primitives/stack/styles.ts +1 -0
  110. package/src/core/primitives/text/text.tsx +1 -0
  111. package/src/core/primitives/textInput/textInput.test.tsx +9 -5
  112. package/src/core/primitives/textInput/textInput.tsx +3 -0
  113. package/src/core/primitives/tooltip/tooltip.test.tsx +82 -49
  114. package/src/core/primitives/tooltip/tooltip.tsx +3 -1
  115. package/src/core/primitives/tooltip/tooltipCard.tsx +1 -0
  116. package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +2 -0
  117. package/src/core/styles/flex/types.ts +0 -1
  118. package/src/core/styles/font/responsiveFont.ts +0 -3
  119. package/src/core/styles/font/types.ts +1 -3
  120. package/src/core/styles/grid/gridStyle.ts +1 -0
  121. package/src/core/styles/margin/marginStyle.ts +1 -0
  122. package/src/core/styles/margin/marginsStyle.test.ts +2 -1
  123. package/src/core/styles/padding/paddingStyle.test.ts +2 -1
  124. package/src/core/styles/padding/paddingStyle.ts +1 -0
  125. package/src/core/theme/theme.test.tsx +7 -3
  126. package/src/core/theme/useRootTheme.ts +1 -0
  127. package/src/core/theme/useTheme.ts +2 -0
  128. package/src/core/utils/arrow/arrow.tsx +1 -0
  129. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +9 -4
  130. package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +1 -0
  131. package/src/core/utils/getElementRef.ts +5 -0
  132. package/src/core/utils/layer/getLayerContext.test.ts +2 -0
  133. package/src/core/utils/layer/layer.test.tsx +9 -4
  134. package/src/core/utils/layer/layer.tsx +1 -0
  135. package/src/core/utils/layer/useLayer.ts +2 -0
  136. package/src/core/utils/portal/portal.test.tsx +9 -4
  137. package/src/core/utils/portal/portalProvider.tsx +1 -0
  138. package/src/core/utils/virtualList/virtualList.tsx +2 -1
  139. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +10 -0
  140. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +4 -0
  141. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +5 -0
  142. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +5 -0
  143. package/src/theme/build/_deprecated/color/card/createCardStates.ts +6 -0
  144. package/src/theme/build/_deprecated/color/color.test.ts +5 -1
  145. package/src/theme/build/_deprecated/color/defaults.ts +1 -0
  146. package/src/theme/build/_deprecated/color/factory.ts +36 -0
  147. package/src/theme/build/_deprecated/color/input/createInputModes.ts +5 -0
  148. package/src/theme/build/_deprecated/color/muted/createMuted.ts +4 -0
  149. package/src/theme/build/_deprecated/color/spot/createSpot.ts +3 -0
  150. package/src/theme/build/buildColorTheme.test.ts +2 -0
  151. package/src/theme/build/buildColorTheme.ts +8 -0
  152. package/src/theme/build/buildTheme.test.ts +2 -0
  153. package/src/theme/build/lib/color-fns/color-fns.test.ts +3 -1
  154. package/src/theme/build/merge.ts +5 -0
  155. package/src/theme/build/mixThemeColor.test.ts +2 -0
  156. package/src/theme/build/renderColorTheme.ts +6 -0
  157. package/src/theme/build/renderColorValue.ts +0 -2
  158. package/src/theme/build/resolveColorTokens.ts +6 -0
  159. package/src/theme/build/theme.test.ts +2 -0
  160. package/src/theme/config/helpers.ts +5 -0
  161. package/src/theme/config/system.ts +2 -0
  162. package/src/theme/config/tokens/color/types.ts +6 -4
  163. package/src/theme/config/tokens/parseTokenKey.test.ts +2 -0
  164. package/src/theme/config/tokens/parseTokenValue.test.ts +2 -0
  165. package/src/theme/config/tokens/parseTokenValue.ts +1 -0
  166. package/src/theme/getScopedTheme.ts +6 -1
  167. package/src/theme/system/color/_helpers.ts +4 -0
  168. package/src/theme/system/theme.ts +4 -0
  169. package/src/theme/system/v0/color/_system.ts +1 -0
  170. package/src/theme/system/v0/color/button.ts +14 -0
  171. package/src/theme/system/v0/color/card.ts +6 -0
  172. package/src/theme/system/v0/color/color.ts +11 -0
  173. package/src/theme/system/v0/color/input.ts +6 -0
  174. package/src/theme/system/v0/color/muted.ts +11 -0
  175. package/src/theme/system/v0/color/selectable.ts +11 -0
  176. package/src/theme/system/v0/color/solid.ts +11 -0
  177. package/src/theme/system/v0/color/spot.ts +1 -0
  178. package/src/theme/versioning/getTheme_v2.ts +15 -0
  179. package/src/theme/versioning/themeColor_v0_v2.ts +7 -0
  180. package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -0
  181. package/src/theme/versioning/v0_v2.ts +13 -1
  182. package/src/theme/versioning/v2_v0.ts +18 -0
  183. package/dist/_chunks-cjs/_visual-editing.js +0 -5899
  184. package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
  185. package/dist/_chunks-cjs/refractor.js +0 -23
  186. package/dist/_chunks-cjs/refractor.js.map +0 -1
  187. package/dist/_chunks-es/_visual-editing.mjs +0 -5905
  188. package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
  189. package/dist/_chunks-es/refractor.mjs +0 -26
  190. package/dist/_chunks-es/refractor.mjs.map +0 -1
  191. package/dist/_visual-editing.js.map +0 -1
  192. package/dist/_visual-editing.mjs.map +0 -1
  193. package/dist/index.js.map +0 -1
  194. package/dist/theme.js.map +0 -1
  195. package/dist/theme.mjs.map +0 -1
  196. package/src/core/__workshop__/constants.ts +0 -293
  197. package/src/core/components/autocomplete/__mocks__/apiStore.ts +0 -49
  198. package/src/core/components/autocomplete/__mocks__/countries.ts +0 -245
  199. package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
  200. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -137
  201. package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -89
  202. package/src/core/components/autocomplete/__workshop__/example.tsx +0 -79
  203. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
  204. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -294
  205. package/src/core/components/autocomplete/__workshop__/index.ts +0 -39
  206. package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
  207. package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -62
  208. package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -14
  209. package/src/core/components/dialog/__workshop__/activate.tsx +0 -134
  210. package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
  211. package/src/core/components/dialog/__workshop__/index.ts +0 -19
  212. package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
  213. package/src/core/components/dialog/__workshop__/nested.tsx +0 -72
  214. package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -39
  215. package/src/core/components/dialog/__workshop__/panes.tsx +0 -82
  216. package/src/core/components/dialog/__workshop__/position.tsx +0 -30
  217. package/src/core/components/dialog/__workshop__/props.tsx +0 -75
  218. package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
  219. package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
  220. package/src/core/components/hotkeys/__workshop__/index.ts +0 -14
  221. package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
  222. package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
  223. package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -51
  224. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -46
  225. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
  226. package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
  227. package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -39
  228. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
  229. package/src/core/components/menu/__workshop__/groups.tsx +0 -156
  230. package/src/core/components/menu/__workshop__/index.ts +0 -89
  231. package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
  232. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -65
  233. package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
  234. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
  235. package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
  236. package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -47
  237. package/src/core/components/menu/__workshop__/tones.tsx +0 -25
  238. package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
  239. package/src/core/components/skeleton/__workshop__/delay.tsx +0 -70
  240. package/src/core/components/skeleton/__workshop__/index.ts +0 -11
  241. package/src/core/components/skeleton/__workshop__/skeleton.tsx +0 -64
  242. package/src/core/components/tab/__workshop__/example.tsx +0 -79
  243. package/src/core/components/tab/__workshop__/index.ts +0 -14
  244. package/src/core/components/toast/__workshop__/hook.tsx +0 -71
  245. package/src/core/components/toast/__workshop__/index.ts +0 -19
  246. package/src/core/components/toast/__workshop__/toast.tsx +0 -26
  247. package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
  248. package/src/core/components/tree/__workshop__/basic.tsx +0 -105
  249. package/src/core/components/tree/__workshop__/index.ts +0 -21
  250. package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
  251. package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -32
  252. package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
  253. package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -14
  254. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
  255. package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
  256. package/src/core/primitives/avatar/__workshop__/index.ts +0 -29
  257. package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
  258. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -63
  259. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -70
  260. package/src/core/primitives/badge/__workshop__/index.ts +0 -19
  261. package/src/core/primitives/badge/__workshop__/props.tsx +0 -30
  262. package/src/core/primitives/badge/__workshop__/tones.tsx +0 -21
  263. package/src/core/primitives/box/__workshop__/asComponent.tsx +0 -31
  264. package/src/core/primitives/box/__workshop__/index.ts +0 -24
  265. package/src/core/primitives/box/__workshop__/props.tsx +0 -20
  266. package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
  267. package/src/core/primitives/button/__workshop__/custom.tsx +0 -51
  268. package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
  269. package/src/core/primitives/button/__workshop__/disabled.tsx +0 -74
  270. package/src/core/primitives/button/__workshop__/index.ts +0 -59
  271. package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
  272. package/src/core/primitives/button/__workshop__/props.tsx +0 -55
  273. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
  274. package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
  275. package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
  276. package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
  277. package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -28
  278. package/src/core/primitives/card/__workshop__/allTones.tsx +0 -25
  279. package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
  280. package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
  281. package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
  282. package/src/core/primitives/card/__workshop__/index.ts +0 -18
  283. package/src/core/primitives/card/__workshop__/interactive.tsx +0 -30
  284. package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -80
  285. package/src/core/primitives/card/__workshop__/props.tsx +0 -53
  286. package/src/core/primitives/card/__workshop__/selected.tsx +0 -94
  287. package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
  288. package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
  289. package/src/core/primitives/checkbox/__workshop__/index.ts +0 -13
  290. package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -33
  291. package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
  292. package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -28
  293. package/src/core/primitives/code/__workshop__/index.ts +0 -19
  294. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
  295. package/src/core/primitives/code/__workshop__/props.tsx +0 -21
  296. package/src/core/primitives/container/__workshop__/example.tsx +0 -20
  297. package/src/core/primitives/container/__workshop__/index.ts +0 -8
  298. package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
  299. package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
  300. package/src/core/primitives/flex/__workshop__/index.ts +0 -11
  301. package/src/core/primitives/grid/__workshop__/index.ts +0 -10
  302. package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
  303. package/src/core/primitives/heading/__workshop__/index.ts +0 -19
  304. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
  305. package/src/core/primitives/heading/__workshop__/plain.tsx +0 -32
  306. package/src/core/primitives/inline/__workshop__/index.ts +0 -8
  307. package/src/core/primitives/inline/__workshop__/plain.tsx +0 -27
  308. package/src/core/primitives/kbd/__workshop__/index.ts +0 -8
  309. package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
  310. package/src/core/primitives/label/__workshop__/index.ts +0 -19
  311. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -48
  312. package/src/core/primitives/label/__workshop__/plain.tsx +0 -24
  313. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
  314. package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
  315. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  316. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
  317. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
  318. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -71
  319. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -89
  320. package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -97
  321. package/src/core/primitives/popover/__workshop__/index.ts +0 -49
  322. package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
  323. package/src/core/primitives/radio/__workshop__/index.ts +0 -11
  324. package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
  325. package/src/core/primitives/select/__workshop__/index.ts +0 -11
  326. package/src/core/primitives/select/__workshop__/plain.tsx +0 -27
  327. package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
  328. package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
  329. package/src/core/primitives/spinner/__workshop__/index.ts +0 -14
  330. package/src/core/primitives/stack/__workshop__/index.ts +0 -14
  331. package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
  332. package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
  333. package/src/core/primitives/switch/__workshop__/index.ts +0 -11
  334. package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
  335. package/src/core/primitives/text/__workshop__/colored.tsx +0 -30
  336. package/src/core/primitives/text/__workshop__/example.tsx +0 -39
  337. package/src/core/primitives/text/__workshop__/index.ts +0 -24
  338. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
  339. package/src/core/primitives/textArea/__workshop__/index.ts +0 -14
  340. package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -50
  341. package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
  342. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
  343. package/src/core/primitives/textInput/__workshop__/index.ts +0 -44
  344. package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -98
  345. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
  346. package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
  347. package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
  348. package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
  349. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
  350. package/src/core/primitives/tooltip/__workshop__/index.ts +0 -29
  351. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
  352. package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -107
  353. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
  354. package/src/core/theme/__workshop__/build/Root.tsx +0 -367
  355. package/src/core/theme/__workshop__/build/helpers.ts +0 -46
  356. package/src/core/theme/__workshop__/build/story.tsx +0 -465
  357. package/src/core/theme/__workshop__/canvas.tsx +0 -352
  358. package/src/core/theme/__workshop__/color.tsx +0 -62
  359. package/src/core/theme/__workshop__/debug/story.tsx +0 -408
  360. package/src/core/theme/__workshop__/index.ts +0 -39
  361. package/src/core/theme/__workshop__/layer.tsx +0 -78
  362. package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
  363. package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -14
  364. package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
  365. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
  366. package/src/core/utils/elementQuery/__workshop__/index.ts +0 -14
  367. package/src/core/utils/layer/__workshop__/_debug.tsx +0 -17
  368. package/src/core/utils/layer/__workshop__/index.ts +0 -24
  369. package/src/core/utils/layer/__workshop__/multipleRoots.tsx +0 -49
  370. package/src/core/utils/layer/__workshop__/nested.tsx +0 -98
  371. package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
  372. package/src/core/utils/portal/__workshop__/index.ts +0 -14
  373. package/src/core/utils/portal/__workshop__/named.tsx +0 -63
  374. package/src/core/utils/virtualList/__workshop__/changingProps.tsx +0 -36
  375. package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +0 -24
  376. package/src/core/utils/virtualList/__workshop__/index.ts +0 -29
  377. package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
  378. package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +0 -22
package/dist/index.d.mts CHANGED
@@ -1,2646 +1,497 @@
1
- import {BaseTheme as BaseTheme_2} from '@sanity/ui/theme'
2
- import {Component} from 'react'
3
- import {Context} from 'react'
4
- import {createColorTheme as createColorTheme_2} from '@sanity/ui/theme'
5
- import {CSSObject} from '@sanity/ui/theme'
6
- import {ElementType as ElementType_2} from 'react'
7
- import {ForwardRefExoticComponent} from 'react'
8
- import {hexToRgb as hexToRgb_2} from '@sanity/ui/theme'
9
- import {HSL as HSL_2} from '@sanity/ui/theme'
10
- import {hslToRgb as hslToRgb_2} from '@sanity/ui/theme'
11
- import {HTMLProps} from 'react'
12
- import {multiply as multiply_2} from '@sanity/ui/theme'
13
- import {parseColor as parseColor_2} from '@sanity/ui/theme'
14
- import {PartialThemeColorBuilderOpts} from '@sanity/ui/theme'
15
- import {PropsWithChildren} from 'react'
16
- import {ReactNode} from 'react'
17
- import {Ref} from 'react'
18
- import {RefAttributes} from 'react'
19
- import {RGB as RGB_2} from '@sanity/ui/theme'
20
- import {rgba as rgba_2} from '@sanity/ui/theme'
21
- import {rgbToHex as rgbToHex_2} from '@sanity/ui/theme'
22
- import {rgbToHsl as rgbToHsl_2} from '@sanity/ui/theme'
23
- import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
24
- import {screen as screen_3} from '@sanity/ui/theme'
25
- import {Theme as Theme_2} from '@sanity/ui/theme'
26
- import {Theme_v2} from '@sanity/ui/theme'
27
- import {ThemeAvatar} from '@sanity/ui/theme'
28
- import {ThemeBoxShadow} from '@sanity/ui/theme'
29
- import {ThemeColor} from '@sanity/ui/theme'
30
- import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
31
- import {ThemeColorBase} from '@sanity/ui/theme'
32
- import {ThemeColorBuilderOpts} from '@sanity/ui/theme'
33
- import {ThemeColorButton} from '@sanity/ui/theme'
34
- import {ThemeColorButtonModeKey as ThemeColorButtonModeKey_2} from '@sanity/ui/theme'
35
- import {ThemeColorButtonState} from '@sanity/ui/theme'
36
- import {ThemeColorButtonStates} from '@sanity/ui/theme'
37
- import {ThemeColorButtonTones} from '@sanity/ui/theme'
38
- import {ThemeColorCard} from '@sanity/ui/theme'
39
- import {ThemeColorCardState} from '@sanity/ui/theme'
40
- import {ThemeColorCardToneKey} from '@sanity/ui/theme'
41
- import {ThemeColorGenericState} from '@sanity/ui/theme'
42
- import {ThemeColorInput} from '@sanity/ui/theme'
43
- import {ThemeColorInputState} from '@sanity/ui/theme'
44
- import {ThemeColorInputStates} from '@sanity/ui/theme'
45
- import {ThemeColorMuted} from '@sanity/ui/theme'
46
- import {ThemeColorMutedTone} from '@sanity/ui/theme'
47
- import {ThemeColorName} from '@sanity/ui/theme'
48
- import {ThemeColorScheme} from '@sanity/ui/theme'
49
- import {ThemeColorSchemeKey as ThemeColorSchemeKey_2} from '@sanity/ui/theme'
50
- import {ThemeColorSchemes} from '@sanity/ui/theme'
51
- import {ThemeColorSelectable} from '@sanity/ui/theme'
52
- import {ThemeColorSelectableState} from '@sanity/ui/theme'
53
- import {ThemeColorSelectableStates} from '@sanity/ui/theme'
54
- import {ThemeColorSolid} from '@sanity/ui/theme'
55
- import {ThemeColorSolidTone} from '@sanity/ui/theme'
56
- import {ThemeColorSpot} from '@sanity/ui/theme'
57
- import {ThemeColorSpotKey} from '@sanity/ui/theme'
58
- import {ThemeColorStateToneKey} from '@sanity/ui/theme'
59
- import {ThemeColorSyntax as ThemeColorSyntax_2} from '@sanity/ui/theme'
60
- import {ThemeColorToneKey} from '@sanity/ui/theme'
61
- import {ThemeFont as ThemeFont_2} from '@sanity/ui/theme'
62
- import {ThemeFontKey as ThemeFontKey_2} from '@sanity/ui/theme'
63
- import {ThemeFonts as ThemeFonts_2} from '@sanity/ui/theme'
64
- import {ThemeFontSize as ThemeFontSize_2} from '@sanity/ui/theme'
65
- import {ThemeFontWeight as ThemeFontWeight_2} from '@sanity/ui/theme'
66
- import {ThemeFontWeightKey as ThemeFontWeightKey_2} from '@sanity/ui/theme'
67
- import {ThemeInput} from '@sanity/ui/theme'
68
- import {ThemeLayer as ThemeLayer_2} from '@sanity/ui/theme'
69
- import {ThemeShadow as ThemeShadow_2} from '@sanity/ui/theme'
70
- import {ThemeStyles} from '@sanity/ui/theme'
71
-
72
- /** @beta */
73
- export declare type ArrayPropPrimitive = string | number | boolean | undefined | null
74
-
75
- /** @internal */
76
- export declare const Arrow: ForwardRefExoticComponent<
77
- Omit<
78
- {
79
- width: number
80
- height: number
81
- radius?: number
82
- } & Omit<HTMLProps<HTMLDivElement>, 'height' | 'width'>,
83
- 'ref'
84
- > &
85
- RefAttributes<HTMLDivElement>
86
- >
87
-
88
- /**
89
- * Assign properties from `U` to `T`, excluding properties that already exist in `T`.
90
- *
91
- * @public
92
- */
93
- export declare type Assign<T extends object, U extends object> = Omit<T, keyof U> & U
94
-
1
+ import { $t as ThemeColorGenericState, At as ThemeColorScheme, Bt as ThemeColorMutedTone, Et as Theme$1, Ft as ThemeColorSolidTone, Gt as ThemeColorCardState, Hn as ThemeColorSchemeKey$1, Ht as ThemeColorInputState, It as ThemeColorSelectable, Jt as ThemeColorButtonStates, Kt as ThemeColorButton, Lt as ThemeColorSelectableState, Mt as ThemeColorSpot, Nt as ThemeColorSpotKey, Ot as ThemeInput, Pt as ThemeColorSolid, Qt as ThemeColorToneKey, Rt as ThemeColorSelectableStates, Ut as ThemeColorInputStates, Vt as ThemeColorInput, Wt as ThemeColorCard, Xt as ThemeColorBase, Yt as ThemeColorButtonTones, Zt as ThemeColorName, bt as PartialThemeColorBuilderOpts, en as ThemeAvatar, fn as CSSObject, jt as ThemeColorSchemes, kt as ThemeColor, qt as ThemeColorButtonState, un as ThemeFontWeightKey$1, wt as RootTheme$1, xt as ThemeColorBuilderOpts, zn as ThemeColorCardToneKey, zt as ThemeColorMuted } from "./theme.mjs";
2
+ import { $ as VirtualListProps, $n as ButtonWidth, $t as AvatarStackProps, A as TooltipProps, An as GridItemColumnStart, Ar as multiply, At as ResponsiveWidthStyleProps, B as Stack, Bn as FlexValue, Bt as CardProps, C as MenuGroupProps, Cn as TextAlign, Cr as ThemeFontWeightKey, Ct as HeadingProps, D as TooltipDelayGroupContext, Dn as Placement, Dr as createColorTheme, Dt as Flex, E as TooltipDelayGroupProviderProps, En as PopoverMargins, Er as ThemeShadow, Et as GridProps, F as TextArea, Fn as GridAutoFlow, Fr as screen, Ft as CodeOwnProps, G as Select, Gn as ElementType, Gt as BadgeOwnProps, H as StackProps, Hn as DialogPosition, Ht as ButtonOwnProps, I as TextAreaProps, In as GridAutoRows, Ir as studioTheme, It as CodeProps, J as PopoverProps, Jn as TagType, Jt as BoxOwnProps, K as SelectProps, Kn as EmptyProps, Kt as BadgeProps, L as Text, Ln as FlexAlign, Lt as CardStyleProps, M as TextInputClearButtonProps, Mn as GridItemRowEnd, Mr as rgbToHex, Mt as ContainerOwnProps, N as TextInputProps, Nn as GridItemRowStart, Nr as rgbToHsl, Nt as ContainerProps, O as TooltipDelayGroupContextValue, On as GridItemColumn, Or as hexToRgb, Ot as FlexOwnProps, P as TextInputType, Pn as GridAutoCols, Pr as rgba, Pt as Code, Q as VirtualListChangeOpts, Qn as ButtonTone, Qt as AvatarStack, R as TextOwnProps, Rn as FlexDirection, Rt as Card, S as MenuGroupOwnProps, Sn as HotkeysProps, Sr as ThemeFontWeight, St as HeadingOwnProps, T as TooltipDelayGroupProvider, Tn as Radius, Tr as ThemeLayer, Tt as GridOwnProps, U as Spinner, Un as Assign, Ut as ButtonProps, V as StackOwnProps, Vn as FlexWrap, Vt as Button, W as SpinnerProps, Wn as ComponentType, Wt as Badge, X as PopoverWidth, Xn as ButtonMode, Xt as AvatarRootStyleProps, Y as PopoverUpdateCallback, Yn as CardTone, Yt as BoxProps, Z as VirtualList, Zn as ButtonTextAlign, Zt as ResponsiveAvatarSizeStyleProps, _ as TabProps, _n as ResponsivePaddingProps, _r as ThemeColorSchemeKey, _t as KBDProps, a as usePrefersDark, an as MenuDivider, ar as BadgeTone, at as LayerProviderProps, b as MenuItemProps, bn as ResponsiveWidthProps, br as ThemeFontKey, bt as InlineProps, c as isHTMLAnchorElement, cn as MenuProps, cr as AvatarStatus, ct as ErrorBoundary, d as isHTMLInputElement, dn as ResponsiveBoxProps, dr as HSL, dt as Arrow, en as AvatarCounter, er as BoxDisplay, et as PortalProvider, f as isHTMLSelectElement, fn as ResponsiveFlexItemProps, fr as RGB, ft as Label, g as Tab, gn as ResponsiveMarginProps, gr as ThemeColorButtonModeKey, gt as KBDOwnProps, h as TabListProps, hn as ResponsiveGridProps, hr as Theme, ht as KBD, i as ThemeProviderProps, in as AvatarProps, ir as BadgeMode, it as LayerProvider, j as TextInput, jn as GridItemRow, jr as parseColor, jt as Container, k as Tooltip, kn as GridItemColumnEnd, kr as hslToRgb, kt as FlexProps, l as isHTMLButtonElement, ln as Delay, lr as BaseTheme, lt as ErrorBoundaryProps, m as TabList, mn as ResponsiveGridItemProps, mr as Styles, mt as LabelProps, n as useTheme_v2, nn as Avatar, nr as BoxOverflow, nt as Portal, o as _isEnterToClickElement, on as MenuDividerProps, or as AvatarPosition, ot as Layer, p as isHTMLTextAreaElement, pn as ResponsiveFlexProps, pr as RootTheme, pt as LabelOwnProps, q as Popover, qn as Props, qt as Box, r as ThemeProvider, rn as AvatarOwnProps, rr as BoxSizing, rt as PortalProps, s as containsOrEqualsElement, sn as Menu, sr as AvatarSize, st as LayerProps, t as useTheme, tn as AvatarCounterProps, tr as BoxHeight, tt as PortalProviderProps, u as isHTMLElement, un as ResponsiveBorderProps, ur as BoxShadow, ut as ErrorBoundaryState, v as MenuItem, vn as ResponsiveRadiusProps, vr as ThemeColorSyntax, vt as Inline, w as useTooltipDelayGroup, wn as SelectableTone, wr as ThemeFonts, wt as Grid, x as MenuGroup, xn as Hotkeys, xr as ThemeFontSize, xt as Heading, y as MenuItemOwnProps, yn as ResponsiveShadowProps, yr as ThemeFont, yt as InlineOwnProps, z as TextProps, zn as FlexJustify, zt as CardOwnProps } from "./useTheme.mjs";
3
+ import { ElementType as ElementType$1, HTMLProps, ReactNode, Ref } from "react";
95
4
  /**
96
- * @internal
97
- */
98
- export declare function attemptFocus(element: HTMLElement): boolean
99
-
100
- /**
101
- * The Autocomplete component is typically used for search components.
102
- * It consists of a text input for writing a query, and properties for rendering suggestions.
103
- *
104
5
  * @public
105
6
  */
106
- export declare const Autocomplete: <Option extends BaseAutocompleteOption>(
107
- props: AutocompleteProps<Option> &
108
- Omit<
109
- HTMLProps<HTMLInputElement>,
110
- | 'aria-activedescendant'
111
- | 'aria-autocomplete'
112
- | 'aria-expanded'
113
- | 'aria-owns'
114
- | 'as'
115
- | 'autoCapitalize'
116
- | 'autoComplete'
117
- | 'autoCorrect'
118
- | 'id'
119
- | 'inputMode'
120
- | 'onChange'
121
- | 'onSelect'
122
- | 'popover'
123
- | 'prefix'
124
- | 'ref'
125
- | 'role'
126
- | 'spellCheck'
127
- | 'type'
128
- | 'value'
129
- > & {
130
- ref?: Ref<HTMLInputElement>
131
- },
132
- ) => React.JSX.Element
133
-
134
- /**
135
- * @internal
136
- */
137
- export declare interface AutocompleteInputChangeMsg {
138
- type: 'input/change'
139
- query: string | null
140
- }
141
-
142
- /**
143
- * @internal
144
- */
145
- export declare interface AutocompleteInputFoocusMsg {
146
- type: 'input/focus'
7
+ interface CheckboxProps {
8
+ indeterminate?: boolean;
9
+ customValidity?: string;
147
10
  }
148
-
149
- /**
150
- * @internal
151
- */
152
- export declare type AutocompleteMsg =
153
- | AutocompleteRootBlurMsg
154
- | AutocompleteRootClearMsg
155
- | AutocompleteRootEscapeMsg
156
- | AutocompleteRootOpenMsg
157
- | AutocompleteRootSetActiveValueMsg
158
- | AutocompleteRootSetListFocusedMsg
159
- | AutocompleteInputChangeMsg
160
- | AutocompleteInputFoocusMsg
161
- | AutocompleteValueChangeMsg
162
-
163
11
  /**
12
+ * Checkboxes allow the user to select one or more items from a set.
13
+ *
164
14
  * @public
165
15
  */
166
- export declare type AutocompleteOpenButtonProps = ButtonOwnProps &
167
- Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>
168
-
16
+ declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
169
17
  /**
170
18
  * @public
171
19
  */
172
- export declare interface AutocompleteProps<
173
- Option extends BaseAutocompleteOption = BaseAutocompleteOption,
174
- > {
175
- border?: boolean
176
- customValidity?: string
177
- filterOption?: (query: string, option: Option) => boolean
178
- fontSize?: number | number[]
179
- icon?: ElementType_2 | ReactNode
180
- id: string
181
- /** @beta */
182
- listBox?: BoxProps
183
- loading?: boolean
184
- onChange?: (value: string) => void
185
- onQueryChange?: (query: string | null) => void
186
- onSelect?: (value: string) => void
187
- /** @beta */
188
- openButton?: boolean | AutocompleteOpenButtonProps
189
- /** @beta */
190
- openOnFocus?: boolean
191
- /** The options to render. */
192
- options?: Option[]
193
- padding?: number | number[]
194
- popover?: Omit<PopoverProps, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'> &
195
- Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'ref' | 'width'>
196
- prefix?: ReactNode
197
- radius?: Radius | Radius[]
198
- /** @beta */
199
- relatedElements?: HTMLElement[]
200
- /** The callback function for rendering each option. */
201
- renderOption?: (option: Option) => React.JSX.Element
202
- /** @beta */
203
- renderPopover?: (
204
- props: {
205
- content: React.JSX.Element | null
206
- hidden: boolean
207
- inputElement: HTMLInputElement | null
208
- onMouseEnter: () => void
209
- onMouseLeave: () => void
210
- },
211
- ref: Ref<HTMLDivElement>,
212
- ) => ReactNode
213
- renderValue?: (value: string, option?: Option) => string
214
- suffix?: ReactNode
215
- /** The current value. */
216
- value?: string
217
- }
218
-
219
- /**
220
- * @internal
221
- */
222
- export declare interface AutocompleteRootBlurMsg {
223
- type: 'root/blur'
224
- }
225
-
226
- /**
227
- * @internal
228
- */
229
- export declare interface AutocompleteRootClearMsg {
230
- type: 'root/clear'
20
+ interface BoundaryElementProviderProps {
21
+ children: React.ReactNode;
22
+ element: HTMLElement | null;
231
23
  }
232
-
233
24
  /**
234
- * @internal
25
+ * @public
235
26
  */
236
- export declare interface AutocompleteRootEscapeMsg {
237
- type: 'root/escape'
27
+ declare function BoundaryElementProvider(props: BoundaryElementProviderProps): React.JSX.Element;
28
+ declare namespace BoundaryElementProvider {
29
+ var displayName: string;
238
30
  }
239
-
240
31
  /**
241
- * @internal
32
+ * @public
242
33
  */
243
- export declare interface AutocompleteRootOpenMsg {
244
- type: 'root/open'
245
- query: string | null
34
+ interface BoundaryElementContextValue {
35
+ version: 0.0;
36
+ element: HTMLElement | null;
246
37
  }
247
-
248
38
  /**
249
- * @internal
39
+ * @public
250
40
  */
251
- export declare interface AutocompleteRootSetActiveValueMsg {
252
- type: 'root/setActiveValue'
253
- value: string
254
- listFocused?: boolean
255
- }
256
-
41
+ declare function useBoundaryElement(): BoundaryElementContextValue;
257
42
  /**
258
43
  * @internal
44
+ * @deprecated this component will be removed in the next major release
259
45
  */
260
- export declare interface AutocompleteRootSetListFocusedMsg {
261
- type: 'root/setListFocused'
262
- listFocused: boolean
46
+ declare function ConditionalWrapper({
47
+ children,
48
+ condition,
49
+ wrapper
50
+ }: {
51
+ children: React.ReactNode;
52
+ condition: boolean;
53
+ wrapper: (children: React.ReactNode) => React.ReactNode;
54
+ }): React.ReactNode;
55
+ declare namespace ConditionalWrapper {
56
+ var displayName: string;
263
57
  }
264
-
265
58
  /**
266
- * @internal
59
+ * DO NOT USE IN PRODUCTION.
60
+ * @beta
267
61
  */
268
- export declare interface AutocompleteState {
269
- activeValue: string | null
270
- focused: boolean
271
- listFocused: boolean
272
- query: string | null
273
- value: string | null
62
+ interface MediaQueryProps {
63
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements;
64
+ media?: number[];
274
65
  }
275
-
276
66
  /**
277
- * @internal
67
+ * DO NOT USE IN PRODUCTION.
68
+ * @beta
278
69
  */
279
- export declare interface AutocompleteValueChangeMsg {
280
- type: 'value/change'
281
- value: string | null
70
+ declare const ElementQuery: import("react").ForwardRefExoticComponent<Omit<MediaQueryProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "media">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
71
+ /** @public */
72
+ interface LayerContextValue {
73
+ version: 0.0;
74
+ isTopLayer: boolean;
75
+ level?: number;
76
+ registerChild: (childLevel?: number) => () => void;
77
+ size: number;
78
+ zIndex: number;
282
79
  }
283
-
284
80
  /**
285
- * Avatars are used to represent people and other agents (e.g. bots).
286
- *
287
81
  * @public
288
82
  */
289
- export declare const Avatar: <E extends ElementType = 'div'>(
290
- props: AvatarProps<E>,
291
- ) => React.JSX.Element
292
-
83
+ declare function useLayer(): LayerContextValue;
293
84
  /**
294
85
  * @public
295
86
  */
296
- export declare const AvatarCounter: ForwardRefExoticComponent<
297
- AvatarCounterProps & RefAttributes<HTMLDivElement>
298
- >
299
-
87
+ interface PortalContextValue {
88
+ version: 0.0;
89
+ boundaryElement: HTMLElement | null;
90
+ element: HTMLElement | null;
91
+ elements?: Record<string, HTMLElement | null | undefined>;
92
+ }
300
93
  /**
301
94
  * @public
302
95
  */
303
- export declare interface AvatarCounterProps {
304
- count: number
305
- size?: AvatarSize | AvatarSize[]
306
- /** @deprecated No longer supported. */
307
- tone?: 'navbar'
308
- }
309
-
96
+ declare function usePortal(): PortalContextValue;
310
97
  /**
311
98
  * @public
312
99
  */
313
- export declare interface AvatarOwnProps {
314
- /** @beta */
315
- __unstable_hideInnerStroke?: boolean
316
- animateArrowFrom?: AvatarPosition
317
- arrowPosition?: AvatarPosition
318
- color?: ThemeColorAvatarColorKey
319
- initials?: string
320
- onImageLoadError?: (event: Error) => void
321
- size?: AvatarSize | AvatarSize[]
322
- src?: string
323
- /**
324
- * The status of the entity this Avatar represents.
325
- * @alpha
326
- */
327
- status?: AvatarStatus
328
- title?: string
100
+ interface SrOnlyProps {
101
+ as?: React.ElementType | keyof React.JSX.IntrinsicElements;
102
+ children?: React.ReactNode;
329
103
  }
330
-
331
104
  /**
332
105
  * @public
333
106
  */
334
- export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
335
-
107
+ declare const SrOnly: import("react").ForwardRefExoticComponent<Omit<SrOnlyProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "aria-hidden">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
336
108
  /**
337
109
  * @public
338
110
  */
339
- export declare type AvatarProps<E extends ElementType = 'div'> = Props<AvatarOwnProps, E>
340
-
341
- /**
342
- * @internal
343
- */
344
- export declare interface AvatarRootStyleProps {
345
- $color: ThemeColorAvatarColorKey
111
+ interface RadioProps {
112
+ customValidity?: string;
346
113
  }
347
-
348
- /**
349
- * @public
350
- */
351
- export declare type AvatarSize = 0 | 1 | 2 | 3
352
-
353
114
  /**
115
+ * The `Radio` component allows the user to select one option from a set.
116
+ *
354
117
  * @public
355
118
  */
356
- export declare const AvatarStack: ForwardRefExoticComponent<
357
- AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'ref'> & RefAttributes<HTMLDivElement>
358
- >
359
-
119
+ declare const Radio: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & RadioProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
360
120
  /**
361
121
  * @public
362
122
  */
363
- export declare interface AvatarStackProps {
364
- children: React.ReactNode
365
- maxLength?: number
366
- size?: AvatarSize | AvatarSize[]
367
- /** @deprecated No longer supported. */
368
- tone?: 'navbar'
123
+ interface SwitchProps {
124
+ indeterminate?: boolean;
369
125
  }
370
-
371
- /**
372
- * @public
373
- */
374
- export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
375
-
376
126
  /**
377
- * Badges are used to tag resources.
127
+ * The `Switch` component allows the user to toggle a setting on and off.
128
+ *
129
+ * Extends all properties of an `<input type="checkbox" />` element, except type.
378
130
  *
379
131
  * @public
380
132
  */
381
- export declare const Badge: <E extends ElementType = 'div'>(
382
- props: BadgeProps<E>,
383
- ) => React.JSX.Element
384
-
133
+ declare const Switch: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").HTMLProps<HTMLInputElement>, "as" | "type"> & SwitchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
385
134
  /**
386
135
  * @public
387
- * @deprecated No longer used
388
136
  */
389
- export declare type BadgeMode = 'default' | 'outline'
390
-
137
+ type AutocompleteOpenButtonProps = ButtonOwnProps & Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>;
391
138
  /**
392
139
  * @public
393
140
  */
394
- export declare interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
395
- fontSize?: number | number[]
396
- /** @deprecated No longer used. */
397
- mode?: BadgeMode
398
- tone?: BadgeTone
141
+ interface BaseAutocompleteOption {
142
+ value: string;
399
143
  }
400
-
401
- /**
402
- * @public
403
- */
404
- export declare type BadgeProps<E extends ElementType = 'div'> = Props<BadgeOwnProps, E>
405
-
406
- /**
407
- * @public
408
- */
409
- export declare type BadgeTone = ThemeColorStateToneKey
410
-
411
144
  /**
412
- * @public
145
+ * @internal
413
146
  */
414
- export declare interface BaseAutocompleteOption {
415
- value: string
147
+ interface AutocompleteState {
148
+ activeValue: string | null;
149
+ focused: boolean;
150
+ listFocused: boolean;
151
+ query: string | null;
152
+ value: string | null;
416
153
  }
417
-
418
154
  /**
419
- * @public
420
- * @deprecated Use `BaseTheme` from `@sanity/ui/theme` instead.
155
+ * @internal
421
156
  */
422
- export declare type BaseTheme = BaseTheme_2
423
-
157
+ interface AutocompleteRootBlurMsg {
158
+ type: 'root/blur';
159
+ }
424
160
  /**
425
- * @public
161
+ * @internal
426
162
  */
427
- export declare interface BoundaryElementContextValue {
428
- version: 0.0
429
- element: HTMLElement | null
163
+ interface AutocompleteRootClearMsg {
164
+ type: 'root/clear';
430
165
  }
431
-
432
166
  /**
433
- * @public
167
+ * @internal
434
168
  */
435
- export declare function BoundaryElementProvider(
436
- props: BoundaryElementProviderProps,
437
- ): React.JSX.Element
438
-
439
- export declare namespace BoundaryElementProvider {
440
- var displayName: string
169
+ interface AutocompleteRootEscapeMsg {
170
+ type: 'root/escape';
441
171
  }
442
-
443
172
  /**
444
- * @public
173
+ * @internal
445
174
  */
446
- export declare interface BoundaryElementProviderProps {
447
- children: React.ReactNode
448
- element: HTMLElement | null
175
+ interface AutocompleteRootOpenMsg {
176
+ type: 'root/open';
177
+ query: string | null;
449
178
  }
450
-
451
179
  /**
452
- * The `Box` component is a basic layout wrapper component which provides utility properties
453
- * for flex, margins and padding.
454
- *
455
- * @public
180
+ * @internal
456
181
  */
457
- export declare const Box: <E extends ElementType = 'div'>(props: BoxProps<E>) => React.JSX.Element
458
-
182
+ interface AutocompleteRootSetActiveValueMsg {
183
+ type: 'root/setActiveValue';
184
+ value: string;
185
+ listFocused?: boolean;
186
+ }
459
187
  /**
460
- * @public
188
+ * @internal
461
189
  */
462
- export declare type BoxDisplay = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
463
-
190
+ interface AutocompleteRootSetListFocusedMsg {
191
+ type: 'root/setListFocused';
192
+ listFocused: boolean;
193
+ }
464
194
  /**
465
- * @public
195
+ * @internal
466
196
  */
467
- export declare type BoxHeight = 'stretch' | 'fill'
468
-
197
+ interface AutocompleteInputChangeMsg {
198
+ type: 'input/change';
199
+ query: string | null;
200
+ }
469
201
  /**
470
- * @public
202
+ * @internal
471
203
  */
472
- export declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
473
-
204
+ interface AutocompleteInputFoocusMsg {
205
+ type: 'input/focus';
206
+ }
474
207
  /**
475
- * The props that `Box` adds on top of the element it renders as.
476
- *
477
- * @public
208
+ * @internal
478
209
  */
479
- export declare interface BoxOwnProps
480
- extends ResponsiveFlexItemProps,
481
- ResponsiveBoxProps,
482
- ResponsiveGridItemProps,
483
- ResponsiveMarginProps,
484
- ResponsivePaddingProps {
485
- forwardedAs?: ElementType
210
+ interface AutocompleteValueChangeMsg {
211
+ type: 'value/change';
212
+ value: string | null;
486
213
  }
487
-
488
214
  /**
489
- * @public
215
+ * @internal
490
216
  */
491
- export declare type BoxProps<E extends ElementType = 'div'> = Props<BoxOwnProps, E>
492
-
217
+ type AutocompleteMsg = AutocompleteRootBlurMsg | AutocompleteRootClearMsg | AutocompleteRootEscapeMsg | AutocompleteRootOpenMsg | AutocompleteRootSetActiveValueMsg | AutocompleteRootSetListFocusedMsg | AutocompleteInputChangeMsg | AutocompleteInputFoocusMsg | AutocompleteValueChangeMsg;
493
218
  /**
494
219
  * @public
495
- * @deprecated Use `ThemeBoxShadow` from `@sanity/ui/theme` instead.
496
220
  */
497
- export declare type BoxShadow = ThemeBoxShadow
498
-
221
+ interface AutocompleteProps<Option extends BaseAutocompleteOption = BaseAutocompleteOption> {
222
+ border?: boolean;
223
+ customValidity?: string;
224
+ filterOption?: (query: string, option: Option) => boolean;
225
+ fontSize?: number | number[];
226
+ icon?: ElementType$1 | ReactNode;
227
+ id: string;
228
+ /** @beta */
229
+ listBox?: BoxProps;
230
+ loading?: boolean;
231
+ onChange?: (value: string) => void;
232
+ onQueryChange?: (query: string | null) => void;
233
+ onSelect?: (value: string) => void;
234
+ /** @beta */
235
+ openButton?: boolean | AutocompleteOpenButtonProps;
236
+ /** @beta */
237
+ openOnFocus?: boolean;
238
+ /** The options to render. */
239
+ options?: Option[];
240
+ padding?: number | number[];
241
+ popover?: Omit<PopoverProps, 'content' | 'onMouseEnter' | 'onMouseLeave' | 'open'> & Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'ref' | 'width'>;
242
+ prefix?: ReactNode;
243
+ radius?: Radius | Radius[];
244
+ /** @beta */
245
+ relatedElements?: HTMLElement[];
246
+ /** The callback function for rendering each option. */
247
+ renderOption?: (option: Option) => React.JSX.Element;
248
+ /** @beta */
249
+ renderPopover?: (props: {
250
+ content: React.JSX.Element | null;
251
+ hidden: boolean;
252
+ inputElement: HTMLInputElement | null;
253
+ onMouseEnter: () => void;
254
+ onMouseLeave: () => void;
255
+ }, ref: Ref<HTMLDivElement>) => ReactNode;
256
+ renderValue?: (value: string, option?: Option) => string;
257
+ suffix?: ReactNode;
258
+ /** The current value. */
259
+ value?: string;
260
+ }
499
261
  /**
262
+ * The Autocomplete component is typically used for search components.
263
+ * It consists of a text input for writing a query, and properties for rendering suggestions.
264
+ *
500
265
  * @public
501
266
  */
502
- export declare type BoxSizing = 'content' | 'border'
503
-
504
- /**
505
- * @beta
506
- */
507
- export declare const Breadcrumbs: ForwardRefExoticComponent<
508
- BreadcrumbsProps &
509
- Omit<HTMLProps<HTMLOListElement>, 'type' | 'as' | 'ref'> &
510
- RefAttributes<HTMLOListElement>
511
- >
512
-
267
+ declare const Autocomplete: <Option extends BaseAutocompleteOption>(props: AutocompleteProps<Option> & Omit<HTMLProps<HTMLInputElement>, "aria-activedescendant" | "aria-autocomplete" | "aria-expanded" | "aria-owns" | "as" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "id" | "inputMode" | "onChange" | "onSelect" | "popover" | "prefix" | "ref" | "role" | "spellCheck" | "type" | "value"> & {
268
+ ref?: Ref<HTMLInputElement>;
269
+ }) => React.JSX.Element;
513
270
  /**
514
271
  * @beta
515
272
  */
516
- export declare interface BreadcrumbsProps {
517
- maxLength?: number
518
- separator?: React.ReactNode
519
- gap?: number | number[]
273
+ interface BreadcrumbsProps {
274
+ maxLength?: number;
275
+ separator?: React.ReactNode;
276
+ gap?: number | number[];
520
277
  /**
521
278
  * @deprecated Use `gap` instead. `space` will be removed in v4.
522
279
  */
523
- space?: number | number[]
280
+ space?: number | number[];
524
281
  }
525
-
526
- /**
527
- * @public
528
- */
529
- export declare const Button: <E extends ElementType = 'button'>(
530
- props: ButtonProps<E>,
531
- ) => React.JSX.Element
532
-
533
282
  /**
534
- * @public
283
+ * @beta
535
284
  */
536
- export declare type ButtonMode = ThemeColorButtonModeKey_2
537
-
285
+ declare const Breadcrumbs: import("react").ForwardRefExoticComponent<BreadcrumbsProps & Omit<import("react").HTMLProps<HTMLOListElement>, "as" | "type" | "ref"> & import("react").RefAttributes<HTMLOListElement>>;
538
286
  /**
539
287
  * @public
540
288
  */
541
- export declare interface ButtonOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
542
- fontSize?: number | number[]
543
- mode?: ButtonMode
544
- icon?: React.ElementType | React.ReactNode
545
- iconRight?: React.ElementType | React.ReactNode
546
- justify?: FlexJustify | FlexJustify[]
547
- /**
548
- * @beta Do not use in production, as this might change.
549
- */
550
- loading?: boolean
551
- selected?: boolean
289
+ interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
552
290
  /**
553
- * @deprecated Use `gap` instead. `space` will be removed in v4.
291
+ * @beta
554
292
  */
555
- space?: number | number[]
556
- gap?: number | number[]
557
- muted?: boolean
558
- text?: React.ReactNode
559
- textAlign?: ButtonTextAlign
560
- textWeight?: ThemeFontWeightKey_2
561
- tone?: ButtonTone
562
- type?: 'button' | 'reset' | 'submit'
563
- width?: ButtonWidth
564
- }
565
-
566
- /**
567
- * @public
568
- */
569
- export declare type ButtonProps<E extends ElementType = 'button'> = Props<ButtonOwnProps, E>
570
-
571
- /**
572
- * @public
573
- */
574
- export declare type ButtonTextAlign = 'left' | 'right' | 'center'
575
-
576
- /**
577
- * @public
578
- */
579
- export declare type ButtonTone = ThemeColorStateToneKey
580
-
581
- /**
582
- * @public
583
- */
584
- export declare type ButtonWidth = 'fill'
585
-
586
- /**
587
- * The `Card` component acts much like a `Box`, but with a background and foreground color.
588
- * Components within a `Card` inherit its colors.
589
- *
590
- * @public
591
- */
592
- export declare const Card: <E extends ElementType = 'div'>(props: CardProps<E>) => React.JSX.Element
593
-
594
- /**
595
- * @public
596
- */
597
- export declare interface CardOwnProps
598
- extends BoxOwnProps,
599
- ResponsiveBorderProps,
600
- ResponsiveRadiusProps,
601
- ResponsiveShadowProps {
293
+ __unstable_autoFocus?: boolean;
602
294
  /**
603
- * Do not use in production.
604
295
  * @beta
605
296
  */
606
- __unstable_checkered?: boolean
297
+ __unstable_hideCloseButton?: boolean;
298
+ cardRadius?: Radius | Radius[];
299
+ cardShadow?: number | number[];
300
+ contentRef?: React.ForwardedRef<HTMLDivElement>;
301
+ footer?: React.ReactNode;
302
+ header?: React.ReactNode;
303
+ id: string;
304
+ /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
305
+ onActivate?: LayerProps['onActivate'];
306
+ onClickOutside?: () => void;
307
+ onClose?: () => void;
308
+ portal?: string;
309
+ position?: DialogPosition | DialogPosition[];
310
+ scheme?: ThemeColorSchemeKey$1;
311
+ zOffset?: number | number[];
607
312
  /**
608
- * Do not use in production.
313
+ * Whether the dialog should animate in on mount.
314
+ *
609
315
  * @beta
316
+ * @defaultValue false
610
317
  */
611
- __unstable_focusRing?: boolean
612
- disabled?: boolean
613
- muted?: boolean
614
- pressed?: boolean
615
- scheme?: ThemeColorSchemeKey_2
616
- selected?: boolean
617
- tone?: CardTone
618
- }
619
-
620
- /**
621
- * @public
622
- */
623
- export declare type CardProps<E extends ElementType = 'div'> = Props<CardOwnProps, E>
624
-
625
- /**
626
- * @internal
627
- */
628
- export declare interface CardStyleProps {
629
- $checkered: boolean
630
- $focusRing: boolean
631
- $muted: boolean
632
- $tone: ThemeColorToneKey
318
+ animate?: boolean;
633
319
  }
634
-
635
- /**
636
- * @public
637
- */
638
- export declare type CardTone = ThemeColorCardToneKey | 'inherit'
639
-
640
320
  /**
641
- * Checkboxes allow the user to select one or more items from a set.
321
+ * The Dialog component.
642
322
  *
643
323
  * @public
644
324
  */
645
- export declare const Checkbox: ForwardRefExoticComponent<
646
- Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & CheckboxProps, 'ref'> &
647
- RefAttributes<HTMLInputElement>
648
- >
649
-
650
- /**
651
- * @public
652
- */
653
- export declare interface CheckboxProps {
654
- indeterminate?: boolean
655
- customValidity?: string
656
- }
657
-
658
- /**
659
- * @public
660
- */
661
- export declare type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[]
662
-
663
- /**
664
- * @public
665
- */
666
- export declare type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[]
667
-
668
- /**
669
- * @public
670
- */
671
- export declare type ClickOutsideEventListener = (event: MouseEvent) => void
672
-
325
+ declare const Dialog: import("react").ForwardRefExoticComponent<Omit<DialogProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "width" | "id">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
673
326
  /**
674
- * @public
675
- */
676
- export declare type ClickOutsideListener = (event: MouseEvent) => void
677
-
678
- /**
679
- * @public
680
- */
681
- export declare const Code: <E extends ElementType = 'pre'>(props: CodeProps<E>) => React.JSX.Element
682
-
683
- /**
684
- * @public
327
+ * This API might change. DO NOT USE IN PRODUCTION.
328
+ * @beta
685
329
  */
686
- export declare interface CodeOwnProps {
687
- /** Define the language to use for syntax highlighting. */
688
- language?: string
689
- size?: number | number[]
690
- weight?: string
330
+ interface DialogContextValue {
331
+ version: 0.0;
332
+ position?: DialogPosition | DialogPosition[];
333
+ zOffset?: number | number[];
691
334
  }
692
-
693
335
  /**
694
- * @public
336
+ * @internal
695
337
  */
696
- export declare type CodeProps<E extends ElementType = 'pre'> = Props<CodeOwnProps, E>
697
-
338
+ declare const DialogContext: import("react").Context<DialogContextValue>;
698
339
  /**
699
340
  * This API might change. DO NOT USE IN PRODUCTION.
700
341
  * @beta
701
342
  */
702
- export declare const CodeSkeleton: ForwardRefExoticComponent<
703
- Omit<
704
- CodeSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
705
- 'ref'
706
- > &
707
- RefAttributes<HTMLDivElement>
708
- >
709
-
343
+ interface DialogProviderProps {
344
+ children?: React.ReactNode;
345
+ position?: DialogPosition | DialogPosition[];
346
+ zOffset?: number | number[];
347
+ }
710
348
  /**
711
349
  * This API might change. DO NOT USE IN PRODUCTION.
712
350
  * @beta
713
351
  */
714
- export declare interface CodeSkeletonProps extends SkeletonProps {
715
- size?: number | number[]
716
- }
717
-
718
- /** @public */
719
- export declare type ComponentType<P = any> =
720
- | React.FunctionComponent<P>
721
- | React.ComponentClass<P>
722
- | React.ExoticComponent<P>
723
-
724
- /**
725
- * @internal
726
- * @deprecated this component will be removed in the next major release
727
- */
728
- export declare function ConditionalWrapper({
729
- children,
730
- condition,
731
- wrapper,
732
- }: {
733
- children: React.ReactNode
734
- condition: boolean
735
- wrapper: (children: React.ReactNode) => React.ReactNode
736
- }): React.ReactNode
737
-
738
- export declare namespace ConditionalWrapper {
739
- var displayName: string
352
+ declare function DialogProvider(props: DialogProviderProps): React.JSX.Element;
353
+ declare namespace DialogProvider {
354
+ var displayName: string;
740
355
  }
741
-
742
- /**
743
- * The `Container` component wraps content layout in a defined set of widths.
744
- *
745
- * @public
746
- */
747
- export declare const Container: <E extends ElementType = 'div'>(
748
- props: ContainerProps<E>,
749
- ) => React.JSX.Element
750
-
751
- /**
752
- * @public
753
- */
754
- export declare interface ContainerOwnProps extends BoxOwnProps, ResponsiveWidthProps {}
755
-
756
- /**
757
- * @public
758
- */
759
- export declare type ContainerProps<E extends ElementType = 'div'> = Props<ContainerOwnProps, E>
760
-
761
- /**
762
- * @internal
763
- */
764
- export declare function containsOrEqualsElement(element: HTMLElement, node: Node): boolean
765
-
766
- /**
767
- * @public
768
- * @deprecated Use `createColorTheme` from `@sanity/ui/theme` instead.
769
- */
770
- export declare const createColorTheme: typeof createColorTheme_2
771
-
772
- /**
773
- * @public
774
- */
775
- export declare type Delay =
776
- | number
777
- | Partial<{
778
- open: number
779
- close: number
780
- }>
781
-
782
- /**
783
- * The Dialog component.
784
- *
785
- * @public
786
- */
787
- export declare const Dialog: ForwardRefExoticComponent<
788
- Omit<DialogProps & Omit<HTMLProps<HTMLDivElement>, 'width' | 'id' | 'as'>, 'ref'> &
789
- RefAttributes<HTMLDivElement>
790
- >
791
-
792
- /**
793
- * @internal
794
- */
795
- export declare const DialogContext: Context<DialogContextValue>
796
-
797
356
  /**
798
357
  * This API might change. DO NOT USE IN PRODUCTION.
799
358
  * @beta
800
359
  */
801
- export declare interface DialogContextValue {
802
- version: 0.0
803
- position?: DialogPosition | DialogPosition[]
804
- zOffset?: number | number[]
805
- }
806
-
807
- /**
808
- * @public
809
- */
810
- export declare type DialogPosition = 'absolute' | 'fixed'
811
-
360
+ declare function useDialog(): DialogContextValue;
812
361
  /**
813
362
  * @public
814
363
  */
815
- export declare interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
364
+ interface MenuButtonProps {
816
365
  /**
817
- * @beta
366
+ * @beta Do not use in production.
818
367
  */
819
- __unstable_autoFocus?: boolean
368
+ __unstable_disableRestoreFocusOnClose?: boolean;
820
369
  /**
821
- * @beta
370
+ * @deprecated Use `popover={{boundaryElement: element}}` instead.
822
371
  */
823
- __unstable_hideCloseButton?: boolean
824
- cardRadius?: Radius | Radius[]
825
- cardShadow?: number | number[]
826
- contentRef?: React.ForwardedRef<HTMLDivElement>
827
- footer?: React.ReactNode
828
- header?: React.ReactNode
829
- id: string
830
- /** A callback that fires when the dialog becomes the top layer when it was not the top layer before. */
831
- onActivate?: LayerProps['onActivate']
832
- onClickOutside?: () => void
833
- onClose?: () => void
834
- portal?: string
835
- position?: DialogPosition | DialogPosition[]
836
- scheme?: ThemeColorSchemeKey_2
837
- zOffset?: number | number[]
372
+ boundaryElement?: HTMLElement;
373
+ button: React.JSX.Element;
374
+ id: string;
375
+ menu?: React.JSX.Element;
376
+ onClose?: () => void;
377
+ onOpen?: () => void;
838
378
  /**
839
- * Whether the dialog should animate in on mount.
840
- *
841
- * @beta
842
- * @defaultValue false
379
+ * @deprecated Use `popover={{placement: 'top'}}` instead.
843
380
  */
844
- animate?: boolean
845
- }
846
-
847
- /**
848
- * This API might change. DO NOT USE IN PRODUCTION.
849
- * @beta
850
- */
851
- export declare function DialogProvider(props: DialogProviderProps): React.JSX.Element
852
-
853
- export declare namespace DialogProvider {
854
- var displayName: string
855
- }
856
-
857
- /**
858
- * This API might change. DO NOT USE IN PRODUCTION.
859
- * @beta
860
- */
861
- export declare interface DialogProviderProps {
862
- children?: React.ReactNode
863
- position?: DialogPosition | DialogPosition[]
864
- zOffset?: number | number[]
865
- }
866
-
867
- /**
868
- * DO NOT USE IN PRODUCTION.
869
- * @beta
870
- */
871
- export declare const ElementQuery: ForwardRefExoticComponent<
872
- Omit<MediaQueryProps & Omit<HTMLProps<HTMLDivElement>, 'media' | 'as'>, 'ref'> &
873
- RefAttributes<HTMLDivElement>
874
- >
875
-
876
- /**
877
- * @beta
878
- */
879
- export declare interface ElementRectValue {
880
- width: number
881
- height: number
882
- }
883
-
884
- /**
885
- * @beta
886
- */
887
- export declare interface ElementSize {
888
- content: ElementRectValue
889
- border: ElementRectValue
890
- /** @deprecated INTERNAL ONLY */
891
- _contentRect: DOMRectReadOnly
892
- }
893
-
894
- /**
895
- * @internal
896
- */
897
- export declare interface _ElementSizeListener {
898
- subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
899
- }
900
-
901
- /**
902
- * @internal
903
- */
904
- export declare interface _ElementSizeObserver {
905
- subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void
906
- }
907
-
908
- /**
909
- * @internal
910
- */
911
- export declare const _elementSizeObserver: _ElementSizeObserver
912
-
913
- /**
914
- * @internal
915
- */
916
- export declare type _ElementSizeSubscriber = (elementRect: ElementSize) => void
917
-
918
- /** @public */
919
- export declare type ElementType<P = any> = TagType | ComponentType<P>
920
-
921
- /** @public */
922
- export declare type EmptyProps = object
923
-
924
- /**
925
- * DO NOT USE IN PRODUCTION
926
- * @beta
927
- */
928
- export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
929
- state: ErrorBoundaryState
930
- static getDerivedStateFromError(error: Error): ErrorBoundaryState
931
- componentDidCatch(error: Error, info: React.ErrorInfo): void
932
- render(): React.ReactNode
933
- }
934
-
935
- /**
936
- * DO NOT USE IN PRODUCTION
937
- * @beta
938
- */
939
- export declare type ErrorBoundaryProps = PropsWithChildren<{
940
- onCatch: (params: {error: Error; info: React.ErrorInfo}) => void
941
- }>
942
-
943
- /**
944
- * DO NOT USE IN PRODUCTION
945
- * @beta
946
- */
947
- export declare interface ErrorBoundaryState {
948
- error: Error | null
949
- }
950
-
951
- /**
952
- * @internal
953
- */
954
- export declare function _fillCSSObject(
955
- keys: string[],
956
- value: string | number | CSSObject,
957
- ): CSSObject
958
-
959
- /**
960
- * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
961
- *
962
- * @public
963
- */
964
- export declare const Flex: <E extends ElementType = 'div'>(props: FlexProps<E>) => React.JSX.Element
965
-
966
- /**
967
- * @public
968
- */
969
- export declare type FlexAlign = 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'stretch'
970
-
971
- /**
972
- * @public
973
- */
974
- export declare type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse'
975
-
976
- /**
977
- * @public
978
- */
979
- export declare type FlexJustify =
980
- | 'flex-start'
981
- | 'flex-end'
982
- | 'center'
983
- | 'space-between'
984
- | 'space-around'
985
- | 'space-evenly'
986
-
987
- /**
988
- * @public
989
- */
990
- export declare interface FlexOwnProps
991
- extends Omit<BoxOwnProps, 'display'>,
992
- ResponsiveFlexProps,
993
- ResponsiveFlexItemProps {
994
- gap?: number | number[]
995
- }
996
-
997
- /**
998
- * @public
999
- */
1000
- export declare type FlexProps<E extends ElementType = 'div'> = Props<FlexOwnProps, E>
1001
-
1002
- /**
1003
- * @public
1004
- */
1005
- export declare type FlexValue = number | 'none' | 'auto' | 'initial'
1006
-
1007
- /**
1008
- * @public
1009
- */
1010
- export declare type FlexWrap = 'wrap' | 'wrap-reverse' | 'nowrap'
1011
-
1012
- /**
1013
- * @internal
1014
- */
1015
- export declare function focusFirstDescendant(element: HTMLElement): boolean
1016
-
1017
- /**
1018
- * @internal
1019
- */
1020
- export declare function focusLastDescendant(element: HTMLElement): boolean
1021
-
1022
- /**
1023
- * @internal
1024
- */
1025
- export declare interface FontWeightStyleProps {
1026
- $weight?: ThemeFontWeightKey_2
1027
- }
1028
-
1029
- /**
1030
- * @internal
1031
- */
1032
- export declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[]
1033
-
1034
- /**
1035
- * @internal
1036
- */
1037
- export declare function _getResponsiveSpace(
1038
- theme: Theme_2,
1039
- props: string[],
1040
- spaceIndexes?: number[],
1041
- ): CSSObject[] | null
1042
-
1043
- /**
1044
- * The `Grid` component is for building 2-dimensional layers (based on CSS grid).
1045
- *
1046
- * @public
1047
- */
1048
- export declare const Grid: <E extends ElementType = 'div'>(props: GridProps<E>) => React.JSX.Element
1049
-
1050
- /**
1051
- * @public
1052
- */
1053
- export declare type GridAutoCols = 'auto' | 'min' | 'max' | 'fr'
1054
-
1055
- /**
1056
- * @public
1057
- */
1058
- export declare type GridAutoFlow = 'row' | 'column' | 'row dense' | 'column dense'
1059
-
1060
- /**
1061
- * @public
1062
- */
1063
- export declare type GridAutoRows = 'auto' | 'min' | 'max' | 'fr'
1064
-
1065
- /**
1066
- * @public
1067
- */
1068
- export declare type GridItemColumn = 'auto' | 'full' | number
1069
-
1070
- /**
1071
- * @public
1072
- */
1073
- export declare type GridItemColumnEnd = 'auto' | number
1074
-
1075
- /**
1076
- * @public
1077
- */
1078
- export declare type GridItemColumnStart = 'auto' | number
1079
-
1080
- /**
1081
- * @public
1082
- */
1083
- export declare type GridItemRow = 'auto' | 'full' | number
1084
-
1085
- /**
1086
- * @public
1087
- */
1088
- export declare type GridItemRowEnd = 'auto' | number
1089
-
1090
- /**
1091
- * @public
1092
- */
1093
- export declare type GridItemRowStart = 'auto' | number
1094
-
1095
- /**
1096
- * @public
1097
- */
1098
- export declare interface GridOwnProps extends Omit<BoxOwnProps, 'display'>, ResponsiveGridProps {}
1099
-
1100
- /**
1101
- * @public
1102
- */
1103
- export declare type GridProps<E extends ElementType = 'div'> = Props<GridOwnProps, E>
1104
-
1105
- /**
1106
- * @internal
1107
- */
1108
- export declare function _hasFocus(element: HTMLElement): boolean
1109
-
1110
- /**
1111
- * Typographic headings.
1112
- *
1113
- * @public
1114
- */
1115
- export declare const Heading: <E extends ElementType = 'div'>(
1116
- props: HeadingProps<E>,
1117
- ) => React.JSX.Element
1118
-
1119
- /**
1120
- * @public
1121
- */
1122
- export declare interface HeadingOwnProps {
1123
- accent?: boolean
1124
- align?: TextAlign | TextAlign[]
1125
- muted?: boolean
1126
- size?: number | number[]
1127
- /**
1128
- * Controls how overflowing text is treated.
1129
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
1130
- * @beta
1131
- */
1132
- textOverflow?: 'ellipsis'
1133
- weight?: ThemeFontWeightKey_2
1134
- }
1135
-
1136
- /**
1137
- * @public
1138
- */
1139
- export declare type HeadingProps<E extends ElementType = 'div'> = Props<HeadingOwnProps, E>
1140
-
1141
- /**
1142
- * This API might change. DO NOT USE IN PRODUCTION.
1143
- * @beta
1144
- */
1145
- export declare const HeadingSkeleton: ForwardRefExoticComponent<
1146
- Omit<
1147
- HeadingSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
1148
- 'ref'
1149
- > &
1150
- RefAttributes<HTMLDivElement>
1151
- >
1152
-
1153
- /**
1154
- * This API might change. DO NOT USE IN PRODUCTION.
1155
- * @beta
1156
- */
1157
- export declare interface HeadingSkeletonProps extends SkeletonProps {
1158
- size?: number | number[]
1159
- }
1160
-
1161
- /**
1162
- * @public
1163
- * @deprecated Use `hexToRgb` from `@sanity/ui/theme` instead.
1164
- */
1165
- export declare const hexToRgb: typeof hexToRgb_2
1166
-
1167
- /**
1168
- * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
1169
- *
1170
- * @public
1171
- */
1172
- export declare const Hotkeys: ForwardRefExoticComponent<
1173
- HotkeysProps & Omit<HTMLProps<HTMLElement>, 'size' | 'as' | 'ref'> & RefAttributes<HTMLElement>
1174
- >
1175
-
1176
- /**
1177
- * @public
1178
- */
1179
- export declare interface HotkeysProps {
1180
- fontSize?: number | number[]
1181
- gap?: number | number[]
1182
- padding?: number | number[]
1183
- radius?: Radius | Radius[]
1184
- /**
1185
- * @deprecated Use `gap` instead. `space` will be removed in v4.
1186
- */
1187
- space?: number | number[]
1188
- keys?: string[]
1189
- }
1190
-
1191
- /**
1192
- * @public
1193
- * @deprecated Use `HSL` from `@sanity/ui/theme` instead.
1194
- */
1195
- export declare type HSL = HSL_2
1196
-
1197
- /**
1198
- * @public
1199
- * @deprecated Use `hslToRgb` from `@sanity/ui/theme` instead.
1200
- */
1201
- export declare const hslToRgb: typeof hslToRgb_2
1202
-
1203
- /**
1204
- * The `Inline` component is a layout utility for aligning and spacing items horizontally.
1205
- *
1206
- * @public
1207
- */
1208
- export declare const Inline: <E extends ElementType = 'div'>(
1209
- props: InlineProps<E>,
1210
- ) => React.JSX.Element
1211
-
1212
- /**
1213
- * @public
1214
- */
1215
- export declare interface InlineOwnProps extends Omit<BoxOwnProps, 'display'> {
1216
- /**
1217
- * The spacing between children.
1218
- * @deprecated Use `gap` instead. `space` will be removed in v4.
1219
- */
1220
- space?: number | number[]
1221
- /** The spacing between children. */
1222
- gap?: number | number[]
1223
- }
1224
-
1225
- /**
1226
- * @public
1227
- */
1228
- export declare type InlineProps<E extends ElementType = 'div'> = Props<InlineOwnProps, E>
1229
-
1230
- /**
1231
- * @internal
1232
- */
1233
- export declare function _isEnterToClickElement(element: HTMLElement): boolean
1234
-
1235
- /**
1236
- * @internal
1237
- */
1238
- export declare function isFocusable(element: HTMLElement): boolean
1239
-
1240
- /**
1241
- * @internal
1242
- */
1243
- export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement
1244
-
1245
- /**
1246
- * @internal
1247
- */
1248
- export declare function isHTMLButtonElement(element: unknown): element is HTMLButtonElement
1249
-
1250
- /**
1251
- * @internal
1252
- */
1253
- export declare function isHTMLElement(node: unknown): node is HTMLElement
1254
-
1255
- /**
1256
- * @internal
1257
- */
1258
- export declare function isHTMLInputElement(element: unknown): element is HTMLInputElement
1259
-
1260
- /**
1261
- * @internal
1262
- */
1263
- export declare function isHTMLSelectElement(element: unknown): element is HTMLSelectElement
1264
-
1265
- /**
1266
- * @internal
1267
- */
1268
- export declare function isHTMLTextAreaElement(element: unknown): element is HTMLTextAreaElement
1269
-
1270
- /**
1271
- * @internal
1272
- */
1273
- export declare function _isScrollable(el: Node): boolean
1274
-
1275
- /**
1276
- * Used to define some text as keyboard input.
1277
- *
1278
- * @public
1279
- */
1280
- export declare const KBD: <E extends ElementType = 'kbd'>(props: KBDProps<E>) => React.JSX.Element
1281
-
1282
- /**
1283
- * @public
1284
- */
1285
- export declare interface KBDOwnProps {
1286
- fontSize?: number | number[]
1287
- padding?: number | number[]
1288
- radius?: Radius | Radius[]
1289
- }
1290
-
1291
- /**
1292
- * @public
1293
- */
1294
- export declare type KBDProps<E extends ElementType = 'kbd'> = Props<KBDOwnProps, E>
1295
-
1296
- /**
1297
- * Typographic labels.
1298
- *
1299
- * @public
1300
- */
1301
- export declare const Label: <E extends ElementType = 'div'>(
1302
- props: LabelProps<E>,
1303
- ) => React.JSX.Element
1304
-
1305
- /**
1306
- * @public
1307
- */
1308
- export declare interface LabelOwnProps {
1309
- accent?: boolean
1310
- align?: TextAlign | TextAlign[]
1311
- muted?: boolean
1312
- size?: number | number[]
1313
- /**
1314
- * Controls how overflowing text is treated.
1315
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
1316
- * @beta
1317
- */
1318
- textOverflow?: 'ellipsis'
1319
- weight?: ThemeFontWeightKey_2
1320
- }
1321
-
1322
- /**
1323
- * @public
1324
- */
1325
- export declare type LabelProps<E extends ElementType = 'div'> = Props<LabelOwnProps, E>
1326
-
1327
- /**
1328
- * This API might change. DO NOT USE IN PRODUCTION.
1329
- * @beta
1330
- */
1331
- export declare const LabelSkeleton: ForwardRefExoticComponent<
1332
- Omit<
1333
- LabelSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
1334
- 'ref'
1335
- > &
1336
- RefAttributes<HTMLDivElement>
1337
- >
1338
-
1339
- /**
1340
- * This API might change. DO NOT USE IN PRODUCTION.
1341
- * @beta
1342
- */
1343
- export declare interface LabelSkeletonProps extends SkeletonProps {
1344
- size?: number | number[]
1345
- }
1346
-
1347
- /**
1348
- * @public
1349
- */
1350
- export declare const Layer: ForwardRefExoticComponent<
1351
- Omit<LayerProps & Omit<HTMLProps<HTMLDivElement>, 'as'>, 'ref'> & RefAttributes<HTMLDivElement>
1352
- >
1353
-
1354
- /** @public */
1355
- export declare interface LayerContextValue {
1356
- version: 0.0
1357
- isTopLayer: boolean
1358
- level?: number
1359
- registerChild: (childLevel?: number) => () => void
1360
- size: number
1361
- zIndex: number
1362
- }
1363
-
1364
- /**
1365
- * @public
1366
- */
1367
- export declare interface LayerProps {
1368
- as?: React.ElementType | keyof React.JSX.IntrinsicElements
1369
- /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
1370
- onActivate?: (props: {activeElement: HTMLElement | null}) => void
1371
- zOffset?: number | number[]
1372
- }
1373
-
1374
- /**
1375
- * @public
1376
- */
1377
- export declare function LayerProvider(props: LayerProviderProps): React.JSX.Element
1378
-
1379
- export declare namespace LayerProvider {
1380
- var displayName: string
1381
- }
1382
-
1383
- /**
1384
- * @public
1385
- */
1386
- export declare interface LayerProviderProps {
1387
- children?: React.ReactNode
1388
- zOffset?: number | number[]
1389
- }
1390
-
1391
- /**
1392
- * DO NOT USE IN PRODUCTION.
1393
- * @beta
1394
- */
1395
- export declare interface MediaQueryProps {
1396
- as?: React.ElementType | keyof React.JSX.IntrinsicElements
1397
- media?: number[]
1398
- }
1399
-
1400
- /**
1401
- * @internal
1402
- */
1403
- export declare interface _MediaStore {
1404
- subscribe: (onStoreChange: () => void) => () => void
1405
- getSnapshot: () => number
1406
- }
1407
-
1408
- /**
1409
- * The `Menu` component is a building block for application menus.
1410
- *
1411
- * @public
1412
- */
1413
- export declare const Menu: ForwardRefExoticComponent<
1414
- Omit<MenuProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as' | 'tabIndex' | 'role'>, 'ref'> &
1415
- RefAttributes<HTMLDivElement>
1416
- >
1417
-
1418
- /**
1419
- * The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
1420
- *
1421
- * @public
1422
- */
1423
- export declare const MenuButton: ForwardRefExoticComponent<
1424
- MenuButtonProps & RefAttributes<HTMLButtonElement | null>
1425
- >
1426
-
1427
- /**
1428
- * @public
1429
- */
1430
- export declare interface MenuButtonProps {
1431
- /**
1432
- * @beta Do not use in production.
1433
- */
1434
- __unstable_disableRestoreFocusOnClose?: boolean
1435
- /**
1436
- * @deprecated Use `popover={{boundaryElement: element}}` instead.
1437
- */
1438
- boundaryElement?: HTMLElement
1439
- button: React.JSX.Element
1440
- id: string
1441
- menu?: React.JSX.Element
1442
- onClose?: () => void
1443
- onOpen?: () => void
1444
- /**
1445
- * @deprecated Use `popover={{placement: 'top'}}` instead.
1446
- */
1447
- placement?: Placement
1448
- popover?: Omit<PopoverProps, 'content' | 'open'>
1449
- /**
1450
- * @deprecated Use `popover={{scheme: 'dark'}}` instead.
1451
- */
1452
- popoverScheme?: ThemeColorSchemeKey_2
1453
- /**
1454
- * @deprecated Use `popover={{radius: 2}}` instead.
1455
- */
1456
- popoverRadius?: Radius | Radius[]
1457
- /**
1458
- * @beta Do not use in production.
1459
- * @deprecated Use `popover={{portal: true}}` instead.
1460
- */
1461
- portal?: boolean
1462
- /**
1463
- * @deprecated Use `popover={{preventOverflow: true}}` instead.
1464
- */
1465
- preventOverflow?: boolean
1466
- }
1467
-
1468
- /**
1469
- * @public
1470
- */
1471
- export declare const MenuDivider: <E extends ElementType = 'hr'>(
1472
- props: MenuDividerProps<E>,
1473
- ) => React.JSX.Element
1474
-
1475
- /**
1476
- * @public
1477
- */
1478
- export declare type MenuDividerProps<E extends ElementType = 'hr'> = Props<EmptyProps, E>
1479
-
1480
- /**
1481
- * @public
1482
- */
1483
- export declare const MenuGroup: <E extends ElementType = 'button'>(
1484
- props: MenuGroupProps<E>,
1485
- ) => React.JSX.Element
1486
-
1487
- /**
1488
- * @public
1489
- */
1490
- export declare interface MenuGroupOwnProps {
1491
- fontSize?: number | number[]
1492
- icon?: React.ElementType | React.ReactNode
1493
- menu?: Omit<
1494
- MenuProps,
1495
- | 'onClickOutside'
1496
- | 'onEscape'
1497
- | 'onItemClick'
1498
- | 'onKeyDown'
1499
- | 'onMouseEnter'
1500
- | 'registerElement'
1501
- | 'shouldFocus'
1502
- | 'onBlurCapture'
1503
- >
1504
- padding?: number | number[]
1505
- popover?: Omit<PopoverProps, 'content' | 'open'>
1506
- radius?: Radius | Radius[]
1507
- gap?: number | number[]
1508
- /**
1509
- * @deprecated Use `gap` instead. `space` will be removed in v4.
1510
- */
1511
- space?: number | number[]
1512
- text: React.ReactNode
1513
- tone?: SelectableTone
1514
- }
1515
-
1516
- /**
1517
- * @public
1518
- */
1519
- export declare type MenuGroupProps<E extends ElementType = 'button'> = Props<MenuGroupOwnProps, E>
1520
-
1521
- /**
1522
- * @public
1523
- */
1524
- export declare const MenuItem: <E extends ElementType = 'button'>(
1525
- props: MenuItemProps<E>,
1526
- ) => React.JSX.Element
1527
-
1528
- /**
1529
- * @public
1530
- */
1531
- export declare interface MenuItemOwnProps extends ResponsivePaddingProps, ResponsiveRadiusProps {
1532
- fontSize?: number | number[]
1533
- hotkeys?: string[]
1534
- icon?: React.ElementType | React.ReactNode
1535
- iconRight?: React.ElementType | React.ReactNode
1536
- pressed?: boolean
1537
- selected?: boolean
1538
- gap?: number | number[]
1539
- /**
1540
- * @deprecated Use `gap` instead. `space` will be removed in v4.
1541
- */
1542
- space?: number | number[]
1543
- text?: React.ReactNode
1544
- tone?: SelectableTone
1545
- }
1546
-
1547
- /**
1548
- * @public
1549
- */
1550
- export declare type MenuItemProps<E extends ElementType = 'button'> = Props<MenuItemOwnProps, E>
1551
-
1552
- /**
1553
- * @public
1554
- */
1555
- export declare interface MenuProps extends ResponsivePaddingProps {
1556
- /**
1557
- * @deprecated Use `shouldFocus="first"` instead.
1558
- */
1559
- 'focusFirst'?: boolean
1560
- /**
1561
- * @deprecated Use `shouldFocus="last"` instead.
1562
- */
1563
- 'focusLast'?: boolean
1564
- 'onClickOutside'?: (event: MouseEvent) => void
1565
- 'onEscape'?: () => void
1566
- 'onItemClick'?: () => void
1567
- 'onItemSelect'?: (index: number) => void
1568
- 'originElement'?: HTMLElement | null
1569
- 'registerElement'?: (el: HTMLElement) => () => void
1570
- 'shouldFocus'?: 'first' | 'last' | null
1571
- 'gap'?: number | number[]
1572
- /**
1573
- * @deprecated Use `gap` instead. `space` will be removed in v4.
1574
- */
1575
- 'space'?: number | number[]
1576
- 'aria-labelledby'?: string
1577
- 'onBlurCapture'?: (event: FocusEvent) => void
1578
- }
1579
-
1580
- /**
1581
- * @public
1582
- * @deprecated Use `multiply` from `@sanity/ui/theme` instead.
1583
- */
1584
- export declare const multiply: typeof multiply_2
1585
-
1586
- /**
1587
- * @public
1588
- * @deprecated Use `parseColor` from `@sanity/ui/theme` instead.
1589
- */
1590
- export declare const parseColor: typeof parseColor_2
1591
-
1592
- export {PartialThemeColorBuilderOpts}
1593
-
1594
- /**
1595
- * Placement of floating UI elements.
1596
- *
1597
- * @public
1598
- */
1599
- export declare type Placement =
1600
- | 'top'
1601
- | 'top-start'
1602
- | 'top-end'
1603
- | 'right'
1604
- | 'right-start'
1605
- | 'right-end'
1606
- | 'bottom'
1607
- | 'bottom-start'
1608
- | 'bottom-end'
1609
- | 'left'
1610
- | 'left-start'
1611
- | 'left-end'
1612
-
1613
- /**
1614
- * The `Popover` component is used to display some content on top of another.
1615
- *
1616
- * @public
1617
- */
1618
- export declare const Popover: ForwardRefExoticComponent<
1619
- Omit<
1620
- PopoverProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'width' | 'as' | 'children'>,
1621
- 'ref'
1622
- > &
1623
- RefAttributes<HTMLDivElement>
1624
- >
1625
-
1626
- /**
1627
- * @beta
1628
- */
1629
- export declare type PopoverMargins = [number, number, number, number]
1630
-
1631
- /** @public */
1632
- export declare interface PopoverProps
1633
- extends Omit<LayerProps, 'as'>,
1634
- ResponsiveRadiusProps,
1635
- ResponsiveShadowProps {
1636
- /** @beta */
1637
- __unstable_margins?: PopoverMargins
1638
- /**
1639
- * Whether the popover should animate in and out.
1640
- *
1641
- * @beta
1642
- * @defaultValue false
1643
- */
1644
- animate?: boolean
1645
- arrow?: boolean
1646
- /** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
1647
- boundaryElement?: HTMLElement | null
1648
- children?: React.JSX.Element
1649
- /**
1650
- * When `true`, prevent overflow within the current boundary:
1651
- * - by flipping on its side axis
1652
- * - by resizing
1653
- /*
1654
- * Note that:
1655
- * - setting `preventOverflow` to `true` also prevents overflow on its side axis
1656
- * - setting `matchReferenceWidth` to `true` also causes the popover to resize
1657
- *
1658
- * @defaultValue false
1659
- */
1660
- constrainSize?: boolean
1661
- content?: React.ReactNode
1662
- disabled?: boolean
1663
- fallbackPlacements?: Placement[]
1664
- floatingBoundary?: HTMLElement | null
1665
- /**
1666
- * When `true`, set the maximum width to match the reference element, and also prevent overflow within
1667
- * the current boundary by resizing.
1668
- *
1669
- * Note that setting `constrainSize` to `true` also causes the popover to resize
1670
- *
1671
- * @defaultValue false
1672
- */
1673
- matchReferenceWidth?: boolean
1674
- /**
1675
- * When true, blocks all pointer interaction with elements beneath the popover until closed.
1676
- *
1677
- * @beta
1678
- * @defaultValue false
1679
- */
1680
- modal?: boolean
1681
- open?: boolean
1682
- overflow?: BoxOverflow
1683
- padding?: number | number[]
1684
- placement?: Placement
1685
- /**
1686
- * When 'flip' (default), the placement is determined from the initial placement and the
1687
- * fallback placements in order. Whichever fits in the viewport first.
1688
- *
1689
- * When 'autoPlacement', the initial placement and all fallback placements are evaluated
1690
- * and the placement with the most viewport space available.
1691
- *
1692
- * Option is only relevant if either `constrainSize` or `preventOverflow` is `true`
1693
- */
1694
- placementStrategy?: 'flip' | 'autoPlacement'
1695
- /** Whether or not to render the popover in a portal element. */
1696
- portal?: boolean | string
1697
- preventOverflow?: boolean
1698
- referenceBoundary?: HTMLElement | null
1699
- /**
1700
- * When defined, the popover will be positioned relative to this element.
1701
- * The children of the popover won't be rendered.
1702
- */
1703
- referenceElement?: HTMLElement | null
1704
- scheme?: ThemeColorSchemeKey_2
1705
- tone?: CardTone
1706
- /** @beta */
1707
- updateRef?: Ref<PopoverUpdateCallback | undefined>
1708
- width?: PopoverWidth | PopoverWidth[]
1709
- }
1710
-
1711
- /** @beta */
1712
- export declare type PopoverUpdateCallback = () => void
1713
-
1714
- /** @public */
1715
- export declare type PopoverWidth = number | 'auto'
1716
-
1717
- /**
1718
- * @public
1719
- */
1720
- export declare function Portal(props: PortalProps): React.ReactPortal | null
1721
-
1722
- export declare namespace Portal {
1723
- var displayName: string
1724
- }
1725
-
1726
- /**
1727
- * @public
1728
- */
1729
- export declare interface PortalContextValue {
1730
- version: 0.0
1731
- boundaryElement: HTMLElement | null
1732
- element: HTMLElement | null
1733
- elements?: Record<string, HTMLElement | null | undefined>
1734
- }
1735
-
1736
- /**
1737
- * @public
1738
- */
1739
- export declare interface PortalProps {
1740
- children: React.ReactNode
1741
- /**
1742
- * @beta This API might change. DO NOT USE IN PRODUCTION.
1743
- */
1744
- __unstable_name?: string
1745
- }
1746
-
1747
- /**
1748
- * @public
1749
- */
1750
- export declare function PortalProvider(props: PortalProviderProps): React.JSX.Element
1751
-
1752
- export declare namespace PortalProvider {
1753
- var displayName: string
1754
- }
1755
-
1756
- /**
1757
- * @public
1758
- */
1759
- export declare interface PortalProviderProps {
1760
- /**
1761
- * @deprecated Use `<BoundaryElementProvider element={...} />` instead
1762
- */
1763
- boundaryElement?: HTMLElement | null
1764
- children: React.ReactNode
1765
- element?: HTMLElement | null
1766
- /**
1767
- * @beta
1768
- */
1769
- __unstable_elements?: Record<string, HTMLElement | null | undefined>
1770
- }
1771
-
1772
- /**
1773
- * Resolves the props of a polymorphic component: the props of the element/component passed to `as`
1774
- * (defaulting to the component's own element), with the component's own props assigned on top.
1775
- *
1776
- * @public
1777
- */
1778
- export declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
1779
- E extends TagType ? React.JSX.IntrinsicElements[E] : React.ComponentProps<E>,
1780
- P & {
1781
- as?: E
1782
- }
1783
- >
1784
-
1785
- /**
1786
- * The `Radio` component allows the user to select one option from a set.
1787
- *
1788
- * @public
1789
- */
1790
- export declare const Radio: ForwardRefExoticComponent<
1791
- Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & RadioProps, 'ref'> &
1792
- RefAttributes<HTMLInputElement>
1793
- >
1794
-
1795
- /**
1796
- * @public
1797
- */
1798
- export declare interface RadioProps {
1799
- customValidity?: string
1800
- }
1801
-
1802
- /**
1803
- * @public
1804
- */
1805
- export declare type Radius = number | 'full'
1806
-
1807
- /**
1808
- * @internal
1809
- */
1810
- export declare function _raf(fn: () => void): () => void
1811
-
1812
- /**
1813
- * @internal
1814
- */
1815
- export declare function _raf2(fn: () => void): () => void
1816
-
1817
- /**
1818
- * @public
1819
- */
1820
- export declare function rem(pixelValue: number): string | 0
1821
-
1822
- /**
1823
- * @internal
1824
- */
1825
- export declare const _ResizeObserver: typeof ResizeObserver
1826
-
1827
- /**
1828
- * @internal
1829
- */
1830
- export declare function _responsive<T>(
1831
- media: number[],
1832
- values: T[],
1833
- callback: (value: T, index: number, array: T[]) => CSSObject,
1834
- ): CSSObject[]
1835
-
1836
- /**
1837
- * @internal
1838
- */
1839
- export declare interface ResponsiveAvatarSizeStyleProps {
1840
- $size: AvatarSize[]
1841
- }
1842
-
1843
- /**
1844
- * @public
1845
- */
1846
- export declare interface ResponsiveBorderProps {
1847
- border?: boolean | boolean[]
1848
- borderTop?: boolean | boolean[]
1849
- borderRight?: boolean | boolean[]
1850
- borderBottom?: boolean | boolean[]
1851
- borderLeft?: boolean | boolean[]
1852
- }
1853
-
1854
- /**
1855
- * @public
1856
- */
1857
- export declare interface ResponsiveBoxProps {
1858
- display?: BoxDisplay | BoxDisplay[]
1859
- height?: BoxHeight | BoxHeight[]
1860
- overflow?: BoxOverflow | BoxOverflow[]
1861
- sizing?: BoxSizing | BoxSizing[]
1862
- }
1863
-
1864
- /**
1865
- * Get responsive CSS for the `code` font style.
1866
- * @internal
1867
- */
1868
- export declare function responsiveCodeFontStyle(
1869
- props: ResponsiveFontStyleProps & ThemeProps,
1870
- ): CSSObject[]
1871
-
1872
- /**
1873
- * @public
1874
- */
1875
- export declare interface ResponsiveFlexItemProps {
1876
- /** Sets the flex CSS attribute. The property is responsive. */
1877
- flex?: FlexValue | FlexValue[]
1878
- }
1879
-
1880
- /**
1881
- * @public
1882
- */
1883
- export declare interface ResponsiveFlexProps {
1884
- align?: FlexAlign | FlexAlign[]
1885
- direction?: FlexDirection | FlexDirection[]
1886
- justify?: FlexJustify | FlexJustify[]
1887
- wrap?: FlexWrap | FlexWrap[]
1888
- }
1889
-
1890
- /**
1891
- * @internal
1892
- */
1893
- export declare interface ResponsiveFontSizeStyleProps {
1894
- $size: number[]
1895
- }
1896
-
1897
- /**
1898
- * @internal
1899
- */
1900
- export declare interface ResponsiveFontStyleProps
1901
- extends FontWeightStyleProps,
1902
- ResponsiveFontSizeStyleProps,
1903
- ResponsiveTextAlignStyleProps {
1904
- $accent?: boolean
1905
- $muted?: boolean
1906
- }
1907
-
1908
- /**
1909
- * @public
1910
- */
1911
- export declare interface ResponsiveGridItemProps {
1912
- gridColumn?: GridItemColumn | GridItemColumn[]
1913
- /**
1914
- * @deprecated Use `gridColumn` instead. `column` will be removed in v4.
1915
- */
1916
- column?: GridItemColumn | GridItemColumn[]
1917
- gridColumnStart?: GridItemColumnStart | GridItemColumnStart[]
1918
- /**
1919
- * @deprecated Use `gridColumnStart` instead. `columnStart` will be removed in v4.
1920
- */
1921
- columnStart?: GridItemColumnStart | GridItemColumnStart[]
1922
- gridColumnEnd?: GridItemColumnEnd | GridItemColumnEnd[]
1923
- /**
1924
- * @deprecated Use `gridColumnEnd` instead. `columnEnd` will be removed in v4.
1925
- */
1926
- columnEnd?: GridItemColumnEnd | GridItemColumnEnd[]
1927
- gridRow?: GridItemRow | GridItemRow[]
1928
- /**
1929
- * @deprecated Use `gridRow` instead. `row` will be removed in v4.
1930
- */
1931
- row?: GridItemRow | GridItemRow[]
1932
- gridRowStart?: GridItemRowStart | GridItemRowStart[]
1933
- /**
1934
- * @deprecated Use `gridRowStart` instead. `rowStart` will be removed in v4.
1935
- */
1936
- rowStart?: GridItemRowStart | GridItemRowStart[]
1937
- gridRowEnd?: GridItemRowEnd | GridItemRowEnd[]
1938
- /**
1939
- * @deprecated Use `gridRowEnd` instead. `rowEnd` will be removed in v4.
1940
- */
1941
- rowEnd?: GridItemRowEnd | GridItemRowEnd[]
1942
- }
1943
-
1944
- /**
1945
- * @public
1946
- */
1947
- export declare interface ResponsiveGridProps {
1948
- autoRows?: GridAutoRows | GridAutoRows[]
1949
- autoCols?: GridAutoCols | GridAutoCols[]
1950
- autoFlow?: GridAutoFlow | GridAutoFlow[]
1951
- /**
1952
- * @deprecated Use `gridTemplateColumns` instead. `columns` will be removed in v4.
1953
- */
1954
- columns?: number | number[]
1955
- gridTemplateColumns?: number | number[]
1956
- gap?: number | number[]
1957
- gapX?: number | number[]
1958
- gapY?: number | number[]
1959
- /**
1960
- * @deprecated Use `gridTemplateRows` instead. `rows` will be removed in v4.
1961
- */
1962
- rows?: number | number[]
1963
- gridTemplateRows?: number | number[]
1964
- }
1965
-
1966
- /**
1967
- * Get responsive CSS for the `heading` font style.
1968
- * @internal
1969
- */
1970
- export declare function responsiveHeadingFont(
1971
- props: ResponsiveFontStyleProps & ThemeProps,
1972
- ): CSSObject[]
1973
-
1974
- /**
1975
- * Get responsive CSS for the `label` font style.
1976
- * @internal
1977
- */
1978
- export declare function responsiveLabelFont(
1979
- props: ResponsiveFontStyleProps & ThemeProps,
1980
- ): CSSObject[]
1981
-
1982
- /**
1983
- * @public
1984
- */
1985
- export declare interface ResponsiveMarginProps {
1986
- /** Applies margins to all sides. The property is responsive. */
1987
- margin?: number | number[]
1988
- /** Applies margins to the left and right sides. The property is responsive. */
1989
- marginX?: number | number[]
1990
- /** Applies margins to the top and bottom sides. The property is responsive. */
1991
- marginY?: number | number[]
1992
- marginTop?: number | number[]
1993
- marginRight?: number | number[]
1994
- marginBottom?: number | number[]
1995
- marginLeft?: number | number[]
1996
- }
1997
-
1998
- /**
1999
- * @public
2000
- */
2001
- export declare interface ResponsivePaddingProps {
2002
- padding?: number | number[]
2003
- paddingX?: number | number[]
2004
- paddingY?: number | number[]
2005
- paddingTop?: number | number[]
2006
- paddingRight?: number | number[]
2007
- paddingBottom?: number | number[]
2008
- paddingLeft?: number | number[]
2009
- }
2010
-
2011
- /**
2012
- * @public
2013
- */
2014
- export declare interface ResponsiveRadiusProps {
2015
- radius?: Radius | Radius[]
2016
- }
2017
-
2018
- /**
2019
- * @public
2020
- */
2021
- export declare interface ResponsiveShadowProps {
2022
- shadow?: number | number[]
2023
- }
2024
-
2025
- /**
2026
- * Get responsive text align styles.
2027
- * @internal
2028
- */
2029
- export declare function responsiveTextAlignStyle(
2030
- props: ResponsiveTextAlignStyleProps & ThemeProps,
2031
- ): CSSObject[]
2032
-
2033
- /**
2034
- * @internal
2035
- */
2036
- export declare interface ResponsiveTextAlignStyleProps {
2037
- $align: TextAlign[]
2038
- }
2039
-
2040
- /**
2041
- * Get responsive CSS for the `text` font style.
2042
- * @internal
2043
- */
2044
- export declare function responsiveTextFont(
2045
- props: ResponsiveFontStyleProps & ThemeProps,
2046
- ): CSSObject[]
2047
-
2048
- /**
2049
- * @public
2050
- */
2051
- export declare interface ResponsiveWidthProps {
2052
- width?: number | 'auto' | (number | 'auto')[]
2053
- }
2054
-
2055
- /**
2056
- * @internal
2057
- */
2058
- export declare interface ResponsiveWidthStyleProps {
2059
- $width: (number | 'auto')[]
2060
- }
2061
-
2062
- /**
2063
- * @public
2064
- * @deprecated Use `RGB` from `@sanity/ui/theme` instead.
2065
- */
2066
- export declare type RGB = RGB_2
2067
-
2068
- /**
2069
- * @public
2070
- * @deprecated Use `rgba` from `@sanity/ui/theme` instead.
2071
- */
2072
- export declare const rgba: typeof rgba_2
2073
-
2074
- /**
2075
- * @public
2076
- * @deprecated Use `rgbToHex` from `@sanity/ui/theme` instead.
2077
- */
2078
- export declare const rgbToHex: typeof rgbToHex_2
2079
-
2080
- /**
2081
- * @public
2082
- * @deprecated Use `rgbToHsl` from `@sanity/ui/theme` instead.
2083
- */
2084
- export declare const rgbToHsl: typeof rgbToHsl_2
2085
-
2086
- /**
2087
- * @public
2088
- * @deprecated Use `RootTheme` from `@sanity/ui/theme` instead.
2089
- */
2090
- export declare type RootTheme = RootTheme_2
2091
-
2092
- /**
2093
- * @public
2094
- * @deprecated Use `screen` from `@sanity/ui/theme` instead.
2095
- */
2096
- declare const screen_2: typeof screen_3
2097
- export {screen_2 as screen}
2098
-
2099
- /**
2100
- * The `Select` component provides control of options.
2101
- *
2102
- * @public
2103
- */
2104
- export declare const Select: ForwardRefExoticComponent<
2105
- Omit<SelectProps & Omit<HTMLProps<HTMLSelectElement>, 'as'>, 'ref'> &
2106
- RefAttributes<HTMLSelectElement>
2107
- >
2108
-
2109
- /**
2110
- * @public
2111
- */
2112
- export declare type SelectableTone = ThemeColorStateToneKey
2113
-
2114
- /**
2115
- * @public
2116
- */
2117
- export declare interface SelectProps {
2118
- fontSize?: number | number[]
2119
- gap?: number | number[]
2120
- padding?: number | number[]
2121
- radius?: Radius | Radius[]
2122
- /**
2123
- * @deprecated Use `gap` instead. `space` will be removed in v4.
2124
- */
2125
- space?: number | number[]
2126
- customValidity?: string
2127
- }
2128
-
2129
- /**
2130
- * This API might change. DO NOT USE IN PRODUCTION.
2131
- * @beta
2132
- */
2133
- export declare const Skeleton: ForwardRefExoticComponent<
2134
- Omit<SkeletonProps & HTMLProps<HTMLDivElement>, 'ref'> & RefAttributes<HTMLDivElement>
2135
- >
2136
-
2137
- /**
2138
- * This API might change. DO NOT USE IN PRODUCTION.
2139
- * @beta
2140
- */
2141
- export declare interface SkeletonProps
2142
- extends ResponsiveRadiusProps,
2143
- Omit<BoxOwnProps, 'children'> {
2144
- animated?: boolean
2145
- delay?: number
2146
- }
2147
-
2148
- /**
2149
- * Indicate that something is loading for an indeterminate amount of time.
2150
- *
2151
- * @public
2152
- */
2153
- export declare const Spinner: ForwardRefExoticComponent<
2154
- Omit<SpinnerProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'as'>, 'ref'> &
2155
- RefAttributes<HTMLDivElement>
2156
- >
2157
-
2158
- /**
2159
- * @public
2160
- */
2161
- export declare interface SpinnerProps {
2162
- muted?: boolean
2163
- size?: number | number[]
2164
- }
2165
-
2166
- /**
2167
- * @public
2168
- */
2169
- export declare const SrOnly: ForwardRefExoticComponent<
2170
- Omit<SrOnlyProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'aria-hidden'>, 'ref'> &
2171
- RefAttributes<HTMLDivElement>
2172
- >
2173
-
2174
- /**
2175
- * @public
2176
- */
2177
- export declare interface SrOnlyProps {
2178
- as?: React.ElementType | keyof React.JSX.IntrinsicElements
2179
- children?: React.ReactNode
2180
- }
2181
-
2182
- /**
2183
- * The `Stack` component is used to place elements on top of each other.
2184
- *
2185
- * @public
2186
- */
2187
- export declare const Stack: <E extends ElementType = 'div'>(
2188
- props: StackProps<E>,
2189
- ) => React.JSX.Element
2190
-
2191
- /**
2192
- * @public
2193
- */
2194
- export declare interface StackOwnProps extends BoxOwnProps {
2195
- gap?: number | number[]
2196
- /**
2197
- * @deprecated Use `gap` instead. `space` will be removed in v4.
2198
- */
2199
- space?: number | number[]
2200
- }
2201
-
2202
- /**
2203
- * @public
2204
- */
2205
- export declare type StackProps<E extends ElementType = 'div'> = Props<StackOwnProps, E>
2206
-
2207
- /**
2208
- * @public
2209
- * @deprecated Use `buildTheme` from `@sanity/ui/theme` instead.
2210
- */
2211
- export declare const studioTheme: BaseTheme_2
2212
-
2213
- /**
2214
- * @public
2215
- * @deprecated Use `ThemeStyles` from `@sanity/ui/theme` instead.
2216
- */
2217
- export declare type Styles = ThemeStyles
2218
-
2219
- /**
2220
- * The `Switch` component allows the user to toggle a setting on and off.
2221
- *
2222
- * Extends all properties of an `<input type="checkbox" />` element, except type.
2223
- *
2224
- * @public
2225
- */
2226
- export declare const Switch: ForwardRefExoticComponent<
2227
- Omit<Omit<HTMLProps<HTMLInputElement>, 'type' | 'as'> & SwitchProps, 'ref'> &
2228
- RefAttributes<HTMLInputElement>
2229
- >
2230
-
2231
- /**
2232
- * @public
2233
- */
2234
- export declare interface SwitchProps {
2235
- indeterminate?: boolean
2236
- }
2237
-
2238
- /**
2239
- * @public
2240
- */
2241
- export declare const Tab: ForwardRefExoticComponent<
2242
- Omit<
2243
- TabProps &
2244
- Omit<
2245
- HTMLProps<HTMLButtonElement>,
2246
- 'width' | 'label' | 'id' | 'type' | 'as' | 'aria-controls'
2247
- >,
2248
- 'ref'
2249
- > &
2250
- RefAttributes<HTMLButtonElement>
2251
- >
2252
-
2253
- /**
2254
- * @public
2255
- */
2256
- export declare const TabList: ForwardRefExoticComponent<
2257
- Omit<TabListProps & Omit<HTMLProps<HTMLDivElement>, 'height' | 'as'>, 'ref'> &
2258
- RefAttributes<unknown>
2259
- >
2260
-
2261
- /**
2262
- * @public
2263
- */
2264
- export declare interface TabListProps extends Omit<InlineOwnProps, 'height'> {
2265
- children: Array<React.JSX.Element | null | undefined | false>
2266
- }
2267
-
2268
- /**
2269
- * @public
2270
- */
2271
- export declare const TabPanel: ForwardRefExoticComponent<
2272
- Omit<
2273
- TabPanelProps & Omit<HTMLProps<HTMLDivElement>, 'id' | 'as' | 'role' | 'aria-labelledby'>,
2274
- 'ref'
2275
- > &
2276
- RefAttributes<HTMLDivElement>
2277
- >
2278
-
2279
- /**
2280
- * @public
2281
- */
2282
- export declare interface TabPanelProps extends BoxOwnProps {
2283
- /**
2284
- * The `id` of the correlating `Tab` component.
2285
- */
2286
- 'aria-labelledby': string
2287
- 'id': string
2288
- }
2289
-
2290
- /**
2291
- * @public
2292
- */
2293
- export declare interface TabProps {
2294
- /**
2295
- * The `id` of the correlating `TabPanel` component.
2296
- */
2297
- 'aria-controls': string
2298
- 'id': string
2299
- 'icon'?: React.ElementType | React.ReactNode
2300
- 'focused'?: boolean
2301
- 'fontSize'?: number | number[]
2302
- 'label'?: React.ReactNode
2303
- 'padding'?: number | number[]
2304
- 'selected'?: boolean
2305
- 'tone'?: ButtonTone
2306
- }
2307
-
2308
- /** @public */
2309
- export declare type TagType = keyof React.JSX.IntrinsicElements
2310
-
2311
- /**
2312
- * The `Text` component is an agile, themed typographic element.
2313
- *
2314
- * @public
2315
- */
2316
- declare const Text_2: <E extends ElementType = 'div'>(props: TextProps<E>) => React.JSX.Element
2317
- export {Text_2 as Text}
2318
-
2319
- /**
2320
- * @public
2321
- */
2322
- export declare type TextAlign = 'left' | 'right' | 'center' | 'justify' | 'initial'
2323
-
2324
- /**
2325
- * A multiline text input.
2326
- *
2327
-
2328
- * @public
2329
- */
2330
- export declare const TextArea: ForwardRefExoticComponent<
2331
- Omit<TextAreaProps & Omit<HTMLProps<HTMLTextAreaElement>, 'as'>, 'ref'> &
2332
- RefAttributes<HTMLTextAreaElement>
2333
- >
2334
-
2335
- /**
2336
- * @public
2337
- */
2338
- export declare interface TextAreaProps extends ResponsiveRadiusProps {
381
+ placement?: Placement;
382
+ popover?: Omit<PopoverProps, 'content' | 'open'>;
2339
383
  /**
2340
- * @beta
2341
- */
2342
- __unstable_disableFocusRing?: boolean
2343
- border?: boolean
2344
- customValidity?: string
2345
- fontSize?: number | number[]
2346
- padding?: number | number[]
2347
- weight?: ThemeFontWeightKey_2
2348
- }
2349
-
2350
- /**
2351
- * Single line text input.
2352
- *
2353
- * @public
2354
- */
2355
- export declare const TextInput: ForwardRefExoticComponent<
2356
- Omit<TextInputProps & Omit<HTMLProps<HTMLInputElement>, 'type' | 'as' | 'prefix'>, 'ref'> &
2357
- RefAttributes<HTMLInputElement>
2358
- >
2359
-
2360
- /**
2361
- * @public
2362
- */
2363
- export declare type TextInputClearButtonProps = ButtonOwnProps &
2364
- Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'onClick' | 'onMouseDown' | 'ref'>
2365
-
2366
- /**
2367
- * @public
2368
- */
2369
- export declare interface TextInputProps {
2370
- /**
2371
- * @beta
384
+ * @deprecated Use `popover={{scheme: 'dark'}}` instead.
2372
385
  */
2373
- __unstable_disableFocusRing?: boolean
2374
- border?: boolean
386
+ popoverScheme?: ThemeColorSchemeKey$1;
2375
387
  /**
2376
- * @beta
388
+ * @deprecated Use `popover={{radius: 2}}` instead.
2377
389
  */
2378
- clearButton?: boolean | TextInputClearButtonProps
2379
- customValidity?: string
2380
- fontSize?: number | number[]
2381
- icon?: React.ElementType | React.ReactNode
2382
- iconRight?: React.ElementType | React.ReactNode
390
+ popoverRadius?: Radius | Radius[];
2383
391
  /**
2384
- * @beta
392
+ * @beta Do not use in production.
393
+ * @deprecated Use `popover={{portal: true}}` instead.
2385
394
  */
2386
- onClear?: () => void
2387
- padding?: number | number[]
2388
- prefix?: React.ReactNode
2389
- radius?: Radius | Radius[]
395
+ portal?: boolean;
2390
396
  /**
2391
- * @deprecated Use `gap` instead. `space` will be removed in v4.
397
+ * @deprecated Use `popover={{preventOverflow: true}}` instead.
2392
398
  */
2393
- space?: number | number[]
2394
- gap?: number | number[]
2395
- suffix?: React.ReactNode
2396
- type?: TextInputType
2397
- weight?: ThemeFontWeightKey_2
399
+ preventOverflow?: boolean;
2398
400
  }
2399
-
2400
401
  /**
402
+ * The `MenuButton` component follows the WAI-ARIA specification for menu buttons.
403
+ *
2401
404
  * @public
2402
405
  */
2403
- export declare type TextInputType =
2404
- | 'search'
2405
- | 'date'
2406
- | 'datetime-local'
2407
- | 'email'
2408
- | 'url'
2409
- | 'month'
2410
- | 'number'
2411
- | 'password'
2412
- | 'tel'
2413
- | 'time'
2414
- | 'text'
2415
- | 'week'
2416
- | 'color'
2417
-
406
+ declare const MenuButton: import("react").ForwardRefExoticComponent<MenuButtonProps & import("react").RefAttributes<HTMLButtonElement | null>>;
2418
407
  /**
2419
- * @public
408
+ * This API might change. DO NOT USE IN PRODUCTION.
409
+ * @beta
2420
410
  */
2421
- export declare interface TextOwnProps {
2422
- accent?: boolean
2423
- align?: TextAlign | TextAlign[]
2424
- /** When `true` the text color will be muted. */
2425
- muted?: boolean
2426
- size?: number | number[]
2427
- /**
2428
- * Controls how overflowing text is treated.
2429
- * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
2430
- * @beta
2431
- */
2432
- textOverflow?: 'ellipsis'
2433
- weight?: ThemeFontWeightKey_2
411
+ interface SkeletonProps extends ResponsiveRadiusProps, Omit<BoxOwnProps, 'children'> {
412
+ animated?: boolean;
413
+ delay?: number;
2434
414
  }
2435
-
2436
- /**
2437
- * @public
2438
- */
2439
- export declare type TextProps<E extends ElementType = 'div'> = Props<TextOwnProps, E>
2440
-
2441
415
  /**
2442
416
  * This API might change. DO NOT USE IN PRODUCTION.
2443
417
  * @beta
2444
418
  */
2445
- export declare const TextSkeleton: ForwardRefExoticComponent<
2446
- Omit<
2447
- TextSkeletonProps & Omit<HTMLProps<HTMLDivElement>, 'size' | 'height' | 'as' | 'children'>,
2448
- 'ref'
2449
- > &
2450
- RefAttributes<HTMLDivElement>
2451
- >
2452
-
419
+ declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<SkeletonProps & import("react").HTMLProps<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
2453
420
  /**
2454
421
  * This API might change. DO NOT USE IN PRODUCTION.
2455
422
  * @beta
2456
423
  */
2457
- export declare interface TextSkeletonProps extends SkeletonProps {
2458
- size?: number | number[]
424
+ interface TextSkeletonProps extends SkeletonProps {
425
+ size?: number | number[];
2459
426
  }
2460
-
2461
- /**
2462
- * @public
2463
- * @deprecated Use `Theme` from `@sanity/ui/theme` instead.
2464
- */
2465
- export declare type Theme = Theme_2
2466
-
2467
- export {ThemeAvatar}
2468
-
2469
- export {ThemeColor}
2470
-
2471
- export {ThemeColorBase}
2472
-
2473
- export {ThemeColorBuilderOpts}
2474
-
2475
- export {ThemeColorButton}
2476
-
2477
427
  /**
2478
- * @public
2479
- * @deprecated Use `ThemeColorButtonModeKey` from `@sanity/ui/theme` instead.
2480
- */
2481
- export declare type ThemeColorButtonModeKey = ThemeColorButtonModeKey_2
2482
-
2483
- export {ThemeColorButtonState}
2484
-
2485
- export {ThemeColorButtonStates}
2486
-
2487
- export {ThemeColorButtonTones}
2488
-
2489
- export {ThemeColorCard}
2490
-
2491
- export {ThemeColorCardState}
2492
-
2493
- export {ThemeColorGenericState}
2494
-
2495
- export {ThemeColorInput}
2496
-
2497
- export {ThemeColorInputState}
2498
-
2499
- export {ThemeColorInputStates}
2500
-
2501
- export {ThemeColorMuted}
2502
-
2503
- export {ThemeColorMutedTone}
2504
-
2505
- export {ThemeColorName}
2506
-
2507
- /**
2508
- * @public
428
+ * This API might change. DO NOT USE IN PRODUCTION.
429
+ * @beta
2509
430
  */
2510
- export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element
2511
-
2512
- export declare namespace ThemeColorProvider {
2513
- var displayName: string
431
+ interface LabelSkeletonProps extends SkeletonProps {
432
+ size?: number | number[];
2514
433
  }
2515
-
2516
434
  /**
2517
- * @public
435
+ * This API might change. DO NOT USE IN PRODUCTION.
436
+ * @beta
2518
437
  */
2519
- export declare interface ThemeColorProviderProps {
2520
- children?: React.ReactNode
2521
- scheme?: ThemeColorSchemeKey_2
2522
- tone?: ThemeColorCardToneKey
438
+ interface HeadingSkeletonProps extends SkeletonProps {
439
+ size?: number | number[];
2523
440
  }
2524
-
2525
- export {ThemeColorScheme}
2526
-
2527
- /**
2528
- * @public
2529
- * @deprecated Use `ThemeColorSchemeKey` from `@sanity/ui/theme` instead.
2530
- */
2531
- export declare type ThemeColorSchemeKey = ThemeColorSchemeKey_2
2532
-
2533
- export {ThemeColorSchemes}
2534
-
2535
- export {ThemeColorSelectable}
2536
-
2537
- export {ThemeColorSelectableState}
2538
-
2539
- export {ThemeColorSelectableStates}
2540
-
2541
- export {ThemeColorSolid}
2542
-
2543
- export {ThemeColorSolidTone}
2544
-
2545
- export {ThemeColorSpot}
2546
-
2547
- export {ThemeColorSpotKey}
2548
-
2549
- /**
2550
- * @public
2551
- * @deprecated Use `ThemeColorSyntax` from `@sanity/ui/theme` instead.
2552
- */
2553
- export declare type ThemeColorSyntax = ThemeColorSyntax_2
2554
-
2555
- export {ThemeColorToneKey}
2556
-
2557
441
  /**
2558
- * @public
442
+ * This API might change. DO NOT USE IN PRODUCTION.
443
+ * @beta
2559
444
  */
2560
- export declare interface ThemeContextValue {
2561
- /** @deprecated No longer used */
2562
- version: 0.0
2563
- scheme: ThemeColorSchemeKey_2
2564
- theme: RootTheme_2
2565
- tone: ThemeColorCardToneKey
445
+ interface CodeSkeletonProps extends SkeletonProps {
446
+ size?: number | number[];
2566
447
  }
2567
-
2568
- /**
2569
- * @public
2570
- * @deprecated Use `ThemeFont` from `@sanity/ui/theme` instead.
2571
- */
2572
- export declare type ThemeFont = ThemeFont_2
2573
-
2574
448
  /**
2575
- * @public
2576
- * @deprecated Use `ThemeFontKey` from `@sanity/ui/theme` instead.
2577
- */
2578
- export declare type ThemeFontKey = ThemeFontKey_2
2579
-
2580
- /**
2581
- * @public
2582
- * @deprecated Use `ThemeFonts` from `@sanity/ui/theme` instead.
449
+ * This API might change. DO NOT USE IN PRODUCTION.
450
+ * @beta
2583
451
  */
2584
- export declare type ThemeFonts = ThemeFonts_2
2585
-
452
+ declare const TextSkeleton: import("react").ForwardRefExoticComponent<Omit<TextSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "height" | "size" | "children">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
2586
453
  /**
2587
- * @public
2588
- * @deprecated Use `ThemeFontSize` from `@sanity/ui/theme` instead.
454
+ * This API might change. DO NOT USE IN PRODUCTION.
455
+ * @beta
2589
456
  */
2590
- export declare type ThemeFontSize = ThemeFontSize_2
2591
-
457
+ declare const LabelSkeleton: import("react").ForwardRefExoticComponent<Omit<LabelSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "height" | "size" | "children">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
2592
458
  /**
2593
- * @public
2594
- * @deprecated Use `ThemeFontWeight` from `@sanity/ui/theme` instead.
459
+ * This API might change. DO NOT USE IN PRODUCTION.
460
+ * @beta
2595
461
  */
2596
- export declare type ThemeFontWeight = ThemeFontWeight_2
2597
-
462
+ declare const HeadingSkeleton: import("react").ForwardRefExoticComponent<Omit<HeadingSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "height" | "size" | "children">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
2598
463
  /**
2599
- * @public
2600
- * @deprecated Use `ThemeFontWeightKey` from `@sanity/ui/theme` instead.
464
+ * This API might change. DO NOT USE IN PRODUCTION.
465
+ * @beta
2601
466
  */
2602
- export declare type ThemeFontWeightKey = ThemeFontWeightKey_2
2603
-
2604
- export {ThemeInput}
2605
-
467
+ declare const CodeSkeleton: import("react").ForwardRefExoticComponent<Omit<CodeSkeletonProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "height" | "size" | "children">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
2606
468
  /**
2607
469
  * @public
2608
- * @deprecated Use `ThemeLayer` from `@sanity/ui/theme` instead.
2609
- */
2610
- export declare type ThemeLayer = ThemeLayer_2
2611
-
2612
- /**
2613
- * @internal
2614
470
  */
2615
- export declare interface ThemeProps {
2616
- theme: Theme_2
471
+ interface TabPanelProps extends BoxOwnProps {
472
+ /**
473
+ * The `id` of the correlating `Tab` component.
474
+ */
475
+ 'aria-labelledby': string;
476
+ 'id': string;
2617
477
  }
2618
-
2619
478
  /**
2620
479
  * @public
2621
480
  */
2622
- export declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element
2623
-
2624
- export declare namespace ThemeProvider {
2625
- var displayName: string
2626
- }
2627
-
481
+ declare const TabPanel: import("react").ForwardRefExoticComponent<Omit<TabPanelProps & Omit<import("react").HTMLProps<HTMLDivElement>, "as" | "id" | "role" | "aria-labelledby">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
2628
482
  /**
2629
483
  * @public
2630
484
  */
2631
- export declare interface ThemeProviderProps {
2632
- children?: React.ReactNode
2633
- scheme?: ThemeColorSchemeKey_2
2634
- theme?: RootTheme_2
2635
- tone?: ThemeColorCardToneKey
485
+ interface ToastProps {
486
+ closable?: boolean;
487
+ description?: React.ReactNode;
488
+ onClose: () => void;
489
+ radius?: number | number[];
490
+ title?: React.ReactNode;
491
+ status?: 'error' | 'warning' | 'success' | 'info';
492
+ duration?: number;
493
+ updatedAt?: number;
2636
494
  }
2637
-
2638
- /**
2639
- * @public
2640
- * @deprecated Use `ThemeShadow` from `@sanity/ui/theme` instead.
2641
- */
2642
- export declare type ThemeShadow = ThemeShadow_2
2643
-
2644
495
  /**
2645
496
  * The `Toast` component gives feedback to users when an action has taken place.
2646
497
  *
@@ -2648,289 +499,185 @@ export declare type ThemeShadow = ThemeShadow_2
2648
499
  *
2649
500
  * @public
2650
501
  */
2651
- export declare function Toast(
2652
- props: ToastProps &
2653
- Omit<
2654
- React.HTMLProps<HTMLDivElement>,
2655
- | 'as'
2656
- | 'height'
2657
- | 'ref'
2658
- | 'title'
2659
- | 'onAnimationStart'
2660
- | 'onDragStart'
2661
- | 'onDragEnd'
2662
- | 'onDrag'
2663
- >,
2664
- ): React.JSX.Element
2665
-
2666
- export declare namespace Toast {
2667
- var displayName: string
2668
- }
2669
-
2670
- /**
2671
- * @public
2672
- */
2673
- export declare interface ToastContextValue {
2674
- version: 0.0
2675
- /**
2676
- * Creates or updates a toast notification.
2677
- * If a toast with the same ID already exists, it will be updated.
2678
- * If an ID is not provided, a random one will be generated.
2679
- * The returned ID can be used to programatically update a toast.
2680
- */
2681
- push: (params: ToastParams) => string
502
+ declare function Toast(props: ToastProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'ref' | 'title' | 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'>): React.JSX.Element;
503
+ declare namespace Toast {
504
+ var displayName: string;
2682
505
  }
2683
-
2684
506
  /**
2685
507
  * @public
2686
508
  */
2687
- declare interface ToastLayerProps {
2688
- children: React.ReactNode
2689
- padding?: number | number[]
2690
- paddingX?: number | number[]
2691
- paddingY?: number | number[]
2692
- gap?: number | number[]
509
+ interface ToastLayerProps {
510
+ children: React.ReactNode;
511
+ padding?: number | number[];
512
+ paddingX?: number | number[];
513
+ paddingY?: number | number[];
514
+ gap?: number | number[];
2693
515
  }
2694
-
2695
516
  /**
2696
517
  * @public
2697
518
  */
2698
- export declare interface ToastParams {
2699
- closable?: boolean
2700
- description?: React.ReactNode
2701
- duration?: number
2702
- id?: string
2703
- onClose?: () => void
2704
- title?: React.ReactNode
2705
- status?: 'error' | 'warning' | 'success' | 'info'
519
+ interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
520
+ children?: React.ReactNode;
521
+ zOffset?: number | number[];
2706
522
  }
2707
-
2708
523
  /**
2709
524
  * @public
2710
525
  */
2711
- export declare interface ToastProps {
2712
- closable?: boolean
2713
- description?: React.ReactNode
2714
- onClose: () => void
2715
- radius?: number | number[]
2716
- title?: React.ReactNode
2717
- status?: 'error' | 'warning' | 'success' | 'info'
2718
- duration?: number
2719
- updatedAt?: number
526
+ declare function ToastProvider(props: ToastProviderProps): React.JSX.Element;
527
+ declare namespace ToastProvider {
528
+ var displayName: string;
2720
529
  }
2721
-
2722
530
  /**
2723
531
  * @public
2724
532
  */
2725
- export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
2726
-
2727
- export declare namespace ToastProvider {
2728
- var displayName: string
533
+ interface ToastParams {
534
+ closable?: boolean;
535
+ description?: React.ReactNode;
536
+ duration?: number;
537
+ id?: string;
538
+ onClose?: () => void;
539
+ title?: React.ReactNode;
540
+ status?: 'error' | 'warning' | 'success' | 'info';
2729
541
  }
2730
-
2731
542
  /**
2732
543
  * @public
2733
544
  */
2734
- export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
2735
- children?: React.ReactNode
2736
- zOffset?: number | number[]
545
+ interface ToastContextValue {
546
+ version: 0.0;
547
+ /**
548
+ * Creates or updates a toast notification.
549
+ * If a toast with the same ID already exists, it will be updated.
550
+ * If an ID is not provided, a random one will be generated.
551
+ * The returned ID can be used to programatically update a toast.
552
+ */
553
+ push: (params: ToastParams) => string;
2737
554
  }
2738
-
2739
555
  /**
2740
- * Tooltips display information when hovering, focusing or tapping.
2741
- *
2742
556
  * @public
2743
557
  */
2744
- export declare const Tooltip: ForwardRefExoticComponent<
2745
- Omit<TooltipProps & Omit<HTMLProps<HTMLDivElement>, 'content' | 'as' | 'children'>, 'ref'> &
2746
- RefAttributes<HTMLDivElement>
2747
- >
2748
-
2749
- /**
2750
- * @beta
2751
- */
2752
- export declare const TooltipDelayGroupContext: Context<TooltipDelayGroupContextValue | null>
2753
-
558
+ declare function useToast(): ToastContextValue;
2754
559
  /**
560
+ * This API might change. DO NOT USE IN PRODUCTION.
2755
561
  * @beta
2756
562
  */
2757
- export declare interface TooltipDelayGroupContextValue {
2758
- setIsGroupActive: (nextState: React.SetStateAction<boolean>, delay?: number | undefined) => void
2759
- setOpenTooltipId: (nextId: string | null, delay?: number | undefined) => void
2760
- openDelay: number
2761
- closeDelay: number
2762
- openTooltipId: string | null
2763
- }
2764
-
2765
- /**
2766
- * @public
2767
- * Provides context for a group of tooltip elements that should share a delay
2768
- * which temporarily becomes 1 ms after the first floating element of the group opens.
2769
- */
2770
- export declare function TooltipDelayGroupProvider(
2771
- props: TooltipDelayGroupProviderProps,
2772
- ): React.JSX.Element
2773
-
2774
- export declare namespace TooltipDelayGroupProvider {
2775
- var displayName: string
2776
- }
2777
-
2778
- /**
2779
- * @public
2780
- * */
2781
- export declare interface TooltipDelayGroupProviderProps {
2782
- children?: React.ReactNode
2783
- /**
2784
- * Handles the delays to open or close a tooltip inside a group
2785
- *
2786
- * If only a `number` is passed, it will be used for both opening and closing.
2787
- *
2788
- * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2789
- *
2790
- * @public
2791
- */
2792
- delay: Delay
2793
- }
2794
-
2795
- /**
2796
- * @public
2797
- */
2798
- export declare interface TooltipProps extends Omit<LayerProps, 'as'> {
2799
- /** @deprecated Use `fallbackPlacements` instead. */
2800
- allowedAutoPlacements?: Placement[]
2801
- arrow?: boolean
2802
- boundaryElement?: HTMLElement | null
2803
- children?: React.JSX.Element
2804
- content?: React.ReactNode
2805
- disabled?: boolean
2806
- fallbackPlacements?: Placement[]
2807
- padding?: number | number[]
2808
- placement?: Placement
2809
- /** Whether or not to render the tooltip in a portal element. */
2810
- portal?: boolean | string
2811
- radius?: number | number[]
2812
- scheme?: ThemeColorSchemeKey_2
2813
- shadow?: number | number[]
2814
- /**
2815
- * Adds a delay to open or close the tooltip.
2816
- *
2817
- * If only a `number` is passed, it will be used for both opening and closing.
2818
- *
2819
- * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
2820
- *
2821
- * @public
2822
- * @defaultValue 0
2823
- */
2824
- delay?: Delay
563
+ interface TreeProps {
564
+ gap?: number | number[];
2825
565
  /**
2826
- * Whether the tooltip should animate in and out.
2827
- *
2828
- * @beta
2829
- * @defaultValue false
566
+ * @deprecated Use `gap` instead. `space` will be removed in v4.
2830
567
  */
2831
- animate?: boolean
568
+ space?: number | number[];
2832
569
  }
2833
-
2834
570
  /**
2835
571
  * This API might change. DO NOT USE IN PRODUCTION.
2836
572
  * @beta
2837
573
  */
2838
- export declare const Tree: ForwardRefExoticComponent<
2839
- TreeProps &
2840
- Omit<HTMLProps<HTMLUListElement>, 'wrap' | 'height' | 'as' | 'ref' | 'align' | 'role'> &
2841
- RefAttributes<HTMLUListElement>
2842
- >
2843
-
574
+ declare const Tree: import("react").ForwardRefExoticComponent<TreeProps & Omit<import("react").HTMLProps<HTMLUListElement>, "as" | "height" | "wrap" | "role" | "ref" | "align"> & import("react").RefAttributes<HTMLUListElement>>;
2844
575
  /**
2845
576
  * @beta
2846
577
  */
2847
- export declare interface TreeContextValue {
2848
- version: 0.0
2849
- focusedElement: HTMLElement | null
2850
- level: number
2851
- path: string[]
2852
- registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void
2853
- setExpanded: (path: string, expanded: boolean) => void
2854
- setFocusedElement: (focusedElement: HTMLElement | null) => void
2855
- gap: number | number[]
578
+ interface TreeItemProps {
579
+ expanded?: boolean;
580
+ fontSize?: number | number[];
581
+ icon?: React.ElementType;
582
+ /**
583
+ * Allows passing a custom element type to the link component
584
+ */
585
+ linkAs?: ElementType;
586
+ padding?: number | number[];
587
+ gap?: number | number[];
2856
588
  /**
2857
589
  * @deprecated Use `gap` instead. `space` will be removed in v4.
2858
590
  */
2859
- space: number | number[]
2860
- state: TreeState
591
+ space?: number | number[];
592
+ text?: React.ReactNode;
593
+ weight?: ThemeFontWeightKey$1;
2861
594
  }
2862
-
2863
595
  /**
2864
596
  * This API might change. DO NOT USE IN PRODUCTION.
2865
597
  * @beta
2866
598
  */
2867
- export declare function TreeItem(
2868
- props: TreeItemProps & Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'ref' | 'role'>,
2869
- ): React.JSX.Element
2870
-
2871
- export declare namespace TreeItem {
2872
- var displayName: string
599
+ declare function TreeItem(props: TreeItemProps & Omit<React.HTMLProps<HTMLLIElement>, 'as' | 'ref' | 'role'>): React.JSX.Element;
600
+ declare namespace TreeItem {
601
+ var displayName: string;
2873
602
  }
2874
-
2875
603
  /**
2876
604
  * @beta
2877
605
  */
2878
- export declare interface TreeItemProps {
2879
- expanded?: boolean
2880
- fontSize?: number | number[]
2881
- icon?: React.ElementType
2882
- /**
2883
- * Allows passing a custom element type to the link component
2884
- */
2885
- linkAs?: ElementType
2886
- padding?: number | number[]
2887
- gap?: number | number[]
2888
- /**
2889
- * @deprecated Use `gap` instead. `space` will be removed in v4.
2890
- */
2891
- space?: number | number[]
2892
- text?: React.ReactNode
2893
- weight?: ThemeFontWeightKey_2
606
+ interface TreeState {
607
+ [key: string]: {
608
+ element: HTMLElement;
609
+ expanded: boolean;
610
+ } | undefined;
2894
611
  }
2895
-
2896
612
  /**
2897
- * This API might change. DO NOT USE IN PRODUCTION.
2898
613
  * @beta
2899
614
  */
2900
- export declare interface TreeProps {
2901
- gap?: number | number[]
615
+ interface TreeContextValue {
616
+ version: 0.0;
617
+ focusedElement: HTMLElement | null;
618
+ level: number;
619
+ path: string[];
620
+ registerItem: (element: HTMLElement, path: string, expanded: boolean, selected: boolean) => void;
621
+ setExpanded: (path: string, expanded: boolean) => void;
622
+ setFocusedElement: (focusedElement: HTMLElement | null) => void;
623
+ gap: number | number[];
2902
624
  /**
2903
625
  * @deprecated Use `gap` instead. `space` will be removed in v4.
2904
626
  */
2905
- space?: number | number[]
627
+ space: number | number[];
628
+ state: TreeState;
2906
629
  }
2907
-
2908
630
  /**
2909
631
  * @beta
2910
632
  */
2911
- export declare interface TreeState {
2912
- [key: string]:
2913
- | {
2914
- element: HTMLElement
2915
- expanded: boolean
2916
- }
2917
- | undefined
2918
- }
2919
-
633
+ declare function useTree(): TreeContextValue;
634
+ /**
635
+ * @internal
636
+ */
637
+ declare function _raf(fn: () => void): () => void;
638
+ /**
639
+ * @internal
640
+ */
641
+ declare function _raf2(fn: () => void): () => void;
642
+ /**
643
+ * @internal
644
+ */
645
+ declare function _hasFocus(element: HTMLElement): boolean;
646
+ /**
647
+ * @internal
648
+ */
649
+ declare function isFocusable(element: HTMLElement): boolean;
650
+ /**
651
+ * @internal
652
+ */
653
+ declare function attemptFocus(element: HTMLElement): boolean;
654
+ /**
655
+ * @internal
656
+ */
657
+ declare function focusFirstDescendant(element: HTMLElement): boolean;
658
+ /**
659
+ * @internal
660
+ */
661
+ declare function focusLastDescendant(element: HTMLElement): boolean;
662
+ /**
663
+ * @internal
664
+ */
665
+ declare function _isScrollable(el: Node): boolean;
666
+ /** @beta */
667
+ type ArrayPropPrimitive = string | number | boolean | undefined | null;
2920
668
  /**
2921
669
  * @deprecated instead of `useArrayProp(width)` use `Array.isArray(width) ? width : [width]` instead
2922
670
  * @beta
2923
671
  */
2924
- export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
2925
- val: T | T[] | undefined,
2926
- defaultVal?: T[],
2927
- ): T[]
2928
-
672
+ declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(val: T | T[] | undefined, defaultVal?: T[]): T[];
673
+ /**
674
+ * @public
675
+ */
676
+ type ClickOutsideListener = (event: MouseEvent) => void;
2929
677
  /**
2930
678
  * @public
2931
679
  */
2932
- export declare function useBoundaryElement(): BoundaryElementContextValue
2933
-
680
+ type ClickOutsideElements = (HTMLElement | null | (HTMLElement | null)[])[];
2934
681
  /**
2935
682
  * @public
2936
683
  * @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
@@ -2946,53 +693,75 @@ export declare function useBoundaryElement(): BoundaryElementContextValue
2946
693
  * return <button ref={buttonRef} />
2947
694
  * ```
2948
695
  */
2949
- export declare function useClickOutside(
2950
- listener: ClickOutsideListener,
2951
- elementsArg?: ClickOutsideElements,
2952
- boundaryElement?: HTMLElement | null,
2953
- ): (el: HTMLElement | null) => void
2954
-
696
+ declare function useClickOutside(listener: ClickOutsideListener, elementsArg?: ClickOutsideElements, boundaryElement?: HTMLElement | null): (el: HTMLElement | null) => void;
2955
697
  /**
2956
698
  * @public
2957
699
  */
2958
- export declare function useClickOutsideEvent(
2959
- listener: ClickOutsideEventListener | false | undefined,
2960
- elementsArg?: () => ClickOutsideEventElements,
2961
- boundaryElement?: () => HTMLElement | null,
2962
- ): void
2963
-
700
+ type ClickOutsideEventListener = (event: MouseEvent) => void;
2964
701
  /**
2965
- * @beta
702
+ * @public
2966
703
  */
2967
- export declare function useCustomValidity(
2968
- ref: {
2969
- current: null | {
2970
- setCustomValidity: (validity: string) => void
2971
- }
2972
- },
2973
- customValidity: string | undefined,
2974
- ): void
2975
-
704
+ type ClickOutsideEventElements = (HTMLElement | null | (HTMLElement | null)[])[];
705
+ /**
706
+ * @public
707
+ */
708
+ declare function useClickOutsideEvent(listener: ClickOutsideEventListener | false | undefined, elementsArg?: () => ClickOutsideEventElements, boundaryElement?: () => HTMLElement | null): void;
2976
709
  /**
2977
- * This API might change. DO NOT USE IN PRODUCTION.
2978
710
  * @beta
2979
711
  */
2980
- export declare function useDialog(): DialogContextValue
2981
-
712
+ declare function useCustomValidity(ref: {
713
+ current: null | {
714
+ setCustomValidity: (validity: string) => void;
715
+ };
716
+ }, customValidity: string | undefined): void;
2982
717
  /**
2983
718
  * Subscribe to the rect of a DOM element.
2984
719
  * @beta
2985
720
  *
2986
721
  * @deprecated Use `useElementSize` instead
2987
722
  */
2988
- export declare function useElementRect(element: HTMLElement | null): DOMRectReadOnly | null
2989
-
723
+ declare function useElementRect(element: HTMLElement | null): DOMRectReadOnly | null;
724
+ /**
725
+ * @beta
726
+ */
727
+ interface ElementRectValue {
728
+ width: number;
729
+ height: number;
730
+ }
731
+ /**
732
+ * @beta
733
+ */
734
+ interface ElementSize {
735
+ content: ElementRectValue;
736
+ border: ElementRectValue;
737
+ /** @deprecated INTERNAL ONLY */
738
+ _contentRect: DOMRectReadOnly;
739
+ }
740
+ /**
741
+ * @internal
742
+ */
743
+ type _ElementSizeSubscriber = (elementRect: ElementSize) => void;
744
+ /**
745
+ * @internal
746
+ */
747
+ interface _ElementSizeObserver {
748
+ subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
749
+ }
750
+ /**
751
+ * @internal
752
+ */
753
+ interface _ElementSizeListener {
754
+ subscribe: (element: HTMLElement, subscriber: _ElementSizeSubscriber) => () => void;
755
+ }
756
+ /**
757
+ * @internal
758
+ */
759
+ declare const _elementSizeObserver: _ElementSizeObserver;
2990
760
  /**
2991
761
  * Subscribe to the size of a DOM element.
2992
762
  * @beta
2993
763
  */
2994
- export declare function useElementSize(element: HTMLElement | null): ElementSize | null
2995
-
764
+ declare function useElementSize(element: HTMLElement | null): ElementSize | null;
2996
765
  /**
2997
766
  * @beta
2998
767
  * @deprecated use `useImperativeHandle` instead
@@ -3003,10 +772,7 @@ export declare function useElementSize(element: HTMLElement | null): ElementSize
3003
772
  * +useImperativeHandle(forwardedRef, () => ref.current)
3004
773
  * ```
3005
774
  */
3006
- export declare function useForwardedRef<T>(
3007
- ref: React.ForwardedRef<T>,
3008
- ): React.MutableRefObject<T | null>
3009
-
775
+ declare function useForwardedRef<T>(ref: React.ForwardedRef<T>): React.MutableRefObject<T | null>;
3010
776
  /**
3011
777
  * Adds global keydown event listener to the window.
3012
778
  *
@@ -3014,16 +780,7 @@ export declare function useForwardedRef<T>(
3014
780
  * @param options - The options to pass to the addEventListener function (example, capture: true)
3015
781
  * @beta
3016
782
  */
3017
- export declare function useGlobalKeyDown(
3018
- onKeyDown: (event: KeyboardEvent) => void,
3019
- options?: AddEventListenerOptions,
3020
- ): void
3021
-
3022
- /**
3023
- * @public
3024
- */
3025
- export declare function useLayer(): LayerContextValue
3026
-
783
+ declare function useGlobalKeyDown(onKeyDown: (event: KeyboardEvent) => void, options?: AddEventListenerOptions): void;
3027
784
  /**
3028
785
  * Efficiently subscribes to `window.matchMedia` queries
3029
786
  *
@@ -3031,35 +788,19 @@ export declare function useLayer(): LayerContextValue
3031
788
  *
3032
789
  * @public
3033
790
  */
3034
- export declare function useMatchMedia(
3035
- mediaQueryString: `(${string})`,
3036
- getServerSnapshot?: () => boolean,
3037
- ): boolean
3038
-
3039
- /**
3040
- * This API might change. DO NOT USE IN PRODUCTION.
3041
- * @beta
3042
- */
3043
- export declare function useMediaIndex(): number
3044
-
791
+ declare function useMatchMedia(mediaQueryString: `(${string})`, getServerSnapshot?: () => boolean): boolean;
3045
792
  /**
3046
- * @public
793
+ * @internal
3047
794
  */
3048
- export declare function usePortal(): PortalContextValue
3049
-
795
+ interface _MediaStore {
796
+ subscribe: (onStoreChange: () => void) => () => void;
797
+ getSnapshot: () => number;
798
+ }
3050
799
  /**
3051
- * Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
3052
- *
3053
- * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
3054
- *
3055
- * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
3056
- * Chrome supports reading the `prefers-color-scheme` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Color-Scheme
3057
- * @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
3058
- *
3059
- * @public
800
+ * This API might change. DO NOT USE IN PRODUCTION.
801
+ * @beta
3060
802
  */
3061
- export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean
3062
-
803
+ declare function useMediaIndex(): number;
3063
804
  /**
3064
805
  * Returns true if motion should be reduced
3065
806
  *
@@ -3071,70 +812,115 @@ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boole
3071
812
  *
3072
813
  * @public
3073
814
  */
3074
- export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
3075
-
815
+ declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean;
3076
816
  /**
3077
- * @public
817
+ * @internal
3078
818
  */
3079
- export declare function useRootTheme(): ThemeContextValue
3080
-
819
+ declare const _ResizeObserver: typeof ResizeObserver;
3081
820
  /**
3082
- * @public
821
+ * @internal
3083
822
  */
3084
- export declare function useTheme(): Theme_2
3085
-
823
+ declare function _fillCSSObject(keys: string[], value: string | number | CSSObject): CSSObject;
3086
824
  /**
3087
825
  * @public
3088
826
  */
3089
- export declare function useTheme_v2(): Theme_v2
3090
-
827
+ declare function rem(pixelValue: number): string | 0;
3091
828
  /**
3092
- * @public
829
+ * @internal
3093
830
  */
3094
- export declare function useToast(): ToastContextValue
3095
-
831
+ declare function _responsive<T>(media: number[], values: T[], callback: (value: T, index: number, array: T[]) => CSSObject): CSSObject[];
3096
832
  /**
3097
- * @beta
833
+ * @internal
3098
834
  */
3099
- export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null
3100
-
835
+ declare function _getArrayProp<T = number>(val: T | T[] | undefined, defaultVal?: T[]): T[];
3101
836
  /**
3102
- * @beta
837
+ * @internal
3103
838
  */
3104
- export declare function useTree(): TreeContextValue
3105
-
839
+ declare function _getResponsiveSpace(theme: Theme$1, props: string[], spaceIndexes?: number[]): CSSObject[] | null;
3106
840
  /**
3107
- * @beta
841
+ * @internal
842
+ */
843
+ interface ThemeProps {
844
+ theme: Theme$1;
845
+ }
846
+ /**
847
+ * @internal
3108
848
  */
3109
- export declare const VirtualList: ForwardRefExoticComponent<
3110
- VirtualListProps<any> &
3111
- StackOwnProps &
3112
- Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'ref' | 'onChange'> &
3113
- RefAttributes<HTMLDivElement>
3114
- >
3115
-
849
+ interface ResponsiveFontSizeStyleProps {
850
+ $size: number[];
851
+ }
3116
852
  /**
3117
- * @beta
853
+ * @internal
3118
854
  */
3119
- export declare interface VirtualListChangeOpts {
3120
- fromIndex: number
3121
- gap: number
3122
- itemHeight: number
3123
- scrollHeight: number
3124
- scrollTop: number
3125
- toIndex: number
855
+ interface FontWeightStyleProps {
856
+ $weight?: ThemeFontWeightKey$1;
3126
857
  }
3127
-
3128
858
  /**
3129
- * @beta
859
+ * @internal
860
+ */
861
+ interface ResponsiveTextAlignStyleProps {
862
+ $align: TextAlign[];
863
+ }
864
+ /**
865
+ * @internal
866
+ */
867
+ interface ResponsiveFontStyleProps extends FontWeightStyleProps, ResponsiveFontSizeStyleProps, ResponsiveTextAlignStyleProps {
868
+ $accent?: boolean;
869
+ $muted?: boolean;
870
+ }
871
+ /**
872
+ * Get responsive CSS for the `code` font style.
873
+ * @internal
874
+ */
875
+ declare function responsiveCodeFontStyle(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
876
+ /**
877
+ * Get responsive CSS for the `heading` font style.
878
+ * @internal
879
+ */
880
+ declare function responsiveHeadingFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
881
+ /**
882
+ * Get responsive CSS for the `label` font style.
883
+ * @internal
884
+ */
885
+ declare function responsiveLabelFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
886
+ /**
887
+ * Get responsive text align styles.
888
+ * @internal
889
+ */
890
+ declare function responsiveTextAlignStyle(props: ResponsiveTextAlignStyleProps & ThemeProps): CSSObject[];
891
+ /**
892
+ * Get responsive CSS for the `text` font style.
893
+ * @internal
894
+ */
895
+ declare function responsiveTextFont(props: ResponsiveFontStyleProps & ThemeProps): CSSObject[];
896
+ /**
897
+ * @public
898
+ */
899
+ interface ThemeColorProviderProps {
900
+ children?: React.ReactNode;
901
+ scheme?: ThemeColorSchemeKey$1;
902
+ tone?: ThemeColorCardToneKey;
903
+ }
904
+ /**
905
+ * @public
3130
906
  */
3131
- export declare interface VirtualListProps<Item = any> {
3132
- as?: React.ElementType | keyof React.JSX.IntrinsicElements
3133
- gap?: number
3134
- getItemKey?: (item: Item, itemIndex: number) => string
3135
- items?: Item[]
3136
- onChange?: (opts: VirtualListChangeOpts) => void
3137
- renderItem?: (item: Item) => React.ReactNode
907
+ declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element;
908
+ declare namespace ThemeColorProvider {
909
+ var displayName: string;
3138
910
  }
3139
-
3140
- export {}
911
+ /**
912
+ * @public
913
+ */
914
+ interface ThemeContextValue {
915
+ /** @deprecated No longer used */
916
+ version: 0.0;
917
+ scheme: ThemeColorSchemeKey$1;
918
+ theme: RootTheme$1;
919
+ tone: ThemeColorCardToneKey;
920
+ }
921
+ /**
922
+ * @public
923
+ */
924
+ declare function useRootTheme(): ThemeContextValue;
925
+ export { type ArrayPropPrimitive, Arrow, Assign, Autocomplete, AutocompleteInputChangeMsg, AutocompleteInputFoocusMsg, AutocompleteMsg, AutocompleteOpenButtonProps, AutocompleteProps, AutocompleteRootBlurMsg, AutocompleteRootClearMsg, AutocompleteRootEscapeMsg, AutocompleteRootOpenMsg, AutocompleteRootSetActiveValueMsg, AutocompleteRootSetListFocusedMsg, AutocompleteState, AutocompleteValueChangeMsg, Avatar, AvatarCounter, AvatarCounterProps, AvatarOwnProps, AvatarPosition, AvatarProps, AvatarRootStyleProps, AvatarSize, AvatarStack, AvatarStackProps, AvatarStatus, Badge, BadgeMode, BadgeOwnProps, BadgeProps, BadgeTone, BaseAutocompleteOption, BaseTheme, BoundaryElementContextValue, BoundaryElementProvider, BoundaryElementProviderProps, Box, BoxDisplay, BoxHeight, BoxOverflow, BoxOwnProps, BoxProps, BoxShadow, BoxSizing, Breadcrumbs, BreadcrumbsProps, Button, ButtonMode, ButtonOwnProps, ButtonProps, ButtonTextAlign, ButtonTone, ButtonWidth, Card, CardOwnProps, CardProps, CardStyleProps, CardTone, Checkbox, CheckboxProps, ClickOutsideElements, ClickOutsideEventElements, ClickOutsideEventListener, ClickOutsideListener, Code, CodeOwnProps, CodeProps, CodeSkeleton, CodeSkeletonProps, ComponentType, ConditionalWrapper, Container, ContainerOwnProps, ContainerProps, Delay, Dialog, DialogContext, DialogContextValue, DialogPosition, DialogProps, DialogProvider, DialogProviderProps, ElementQuery, ElementRectValue, ElementSize, ElementType, EmptyProps, ErrorBoundary, ErrorBoundaryProps, ErrorBoundaryState, Flex, FlexAlign, FlexDirection, FlexJustify, FlexOwnProps, FlexProps, FlexValue, FlexWrap, FontWeightStyleProps, Grid, GridAutoCols, GridAutoFlow, GridAutoRows, GridItemColumn, GridItemColumnEnd, GridItemColumnStart, GridItemRow, GridItemRowEnd, GridItemRowStart, GridOwnProps, GridProps, HSL, Heading, HeadingOwnProps, HeadingProps, HeadingSkeleton, HeadingSkeletonProps, Hotkeys, HotkeysProps, Inline, InlineOwnProps, InlineProps, KBD, KBDOwnProps, KBDProps, Label, LabelOwnProps, LabelProps, LabelSkeleton, LabelSkeletonProps, Layer, LayerContextValue, LayerProps, LayerProvider, LayerProviderProps, MediaQueryProps, Menu, MenuButton, MenuButtonProps, MenuDivider, MenuDividerProps, MenuGroup, MenuGroupOwnProps, MenuGroupProps, MenuItem, MenuItemOwnProps, MenuItemProps, MenuProps, type PartialThemeColorBuilderOpts, Placement, Popover, PopoverMargins, PopoverProps, PopoverUpdateCallback, PopoverWidth, Portal, PortalContextValue, PortalProps, PortalProvider, PortalProviderProps, Props, RGB, Radio, RadioProps, Radius, ResponsiveAvatarSizeStyleProps, ResponsiveBorderProps, ResponsiveBoxProps, ResponsiveFlexItemProps, ResponsiveFlexProps, ResponsiveFontSizeStyleProps, ResponsiveFontStyleProps, ResponsiveGridItemProps, ResponsiveGridProps, ResponsiveMarginProps, ResponsivePaddingProps, ResponsiveRadiusProps, ResponsiveShadowProps, ResponsiveTextAlignStyleProps, ResponsiveWidthProps, ResponsiveWidthStyleProps, RootTheme, Select, SelectProps, SelectableTone, Skeleton, SkeletonProps, Spinner, SpinnerProps, SrOnly, SrOnlyProps, Stack, StackOwnProps, StackProps, Styles, Switch, SwitchProps, Tab, TabList, TabListProps, TabPanel, TabPanelProps, TabProps, TagType, Text, TextAlign, TextArea, TextAreaProps, TextInput, TextInputClearButtonProps, TextInputProps, TextInputType, TextOwnProps, TextProps, TextSkeleton, TextSkeletonProps, Theme, type ThemeAvatar, type ThemeColor, type ThemeColorBase, type ThemeColorBuilderOpts, type ThemeColorButton, ThemeColorButtonModeKey, type ThemeColorButtonState, type ThemeColorButtonStates, type ThemeColorButtonTones, type ThemeColorCard, type ThemeColorCardState, type ThemeColorGenericState, type ThemeColorInput, type ThemeColorInputState, type ThemeColorInputStates, type ThemeColorMuted, type ThemeColorMutedTone, type ThemeColorName, ThemeColorProvider, ThemeColorProviderProps, type ThemeColorScheme, ThemeColorSchemeKey, type ThemeColorSchemes, type ThemeColorSelectable, type ThemeColorSelectableState, type ThemeColorSelectableStates, type ThemeColorSolid, type ThemeColorSolidTone, type ThemeColorSpot, type ThemeColorSpotKey, ThemeColorSyntax, type ThemeColorToneKey, ThemeContextValue, ThemeFont, ThemeFontKey, ThemeFontSize, ThemeFontWeight, ThemeFontWeightKey, ThemeFonts, type ThemeInput, ThemeLayer, ThemeProps, ThemeProvider, ThemeProviderProps, ThemeShadow, Toast, ToastContextValue, ToastParams, ToastProps, ToastProvider, ToastProviderProps, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupContextValue, TooltipDelayGroupProvider, TooltipDelayGroupProviderProps, TooltipProps, Tree, TreeContextValue, TreeItem, TreeItemProps, TreeProps, TreeState, VirtualList, VirtualListChangeOpts, VirtualListProps, _ElementSizeListener, _ElementSizeObserver, _ElementSizeSubscriber, _MediaStore, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useClickOutsideEvent, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMatchMedia, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
926
+ //# sourceMappingURL=index.d.mts.map