@sanity/ui 3.0.0-static.33 → 3.0.0-static.34

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 (580) hide show
  1. package/README.md +1 -1
  2. package/dist/_chunks-cjs/_visual-editing.cjs +263 -375
  3. package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
  4. package/dist/_chunks-cjs/refractor.cjs.map +1 -1
  5. package/dist/_chunks-es/_visual-editing.js +263 -377
  6. package/dist/_chunks-es/_visual-editing.js.map +1 -1
  7. package/dist/_chunks-es/refractor.js.map +1 -1
  8. package/dist/_visual-editing.cjs +0 -2
  9. package/dist/_visual-editing.cjs.map +1 -1
  10. package/dist/_visual-editing.d.cts +2 -904
  11. package/dist/_visual-editing.d.ts +2 -904
  12. package/dist/_visual-editing.js +2 -4
  13. package/dist/css/index.cjs +12 -12
  14. package/dist/css/index.cjs.map +1 -1
  15. package/dist/css/index.css +1 -1
  16. package/dist/css/index.d.cts +805 -14697
  17. package/dist/css/index.d.ts +805 -14697
  18. package/dist/css/index.js +12 -12
  19. package/dist/css/index.js.map +1 -1
  20. package/dist/index.cjs +241 -366
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +990 -3095
  23. package/dist/index.d.ts +990 -3095
  24. package/dist/index.js +243 -360
  25. package/dist/index.js.map +1 -1
  26. package/dist/portalProvider-DgNIVviV.d.ts +575 -0
  27. package/dist/theme.cjs +367 -4288
  28. package/dist/theme.cjs.map +1 -1
  29. package/dist/theme.d.cts +272 -1806
  30. package/dist/theme.d.ts +272 -1806
  31. package/dist/theme.js +371 -4292
  32. package/dist/theme.js.map +1 -1
  33. package/exports/_visual-editing.ts +0 -2
  34. package/package.json +3 -4
  35. package/src/core/Root.tsx +4 -2
  36. package/src/core/RootProvider.tsx +4 -4
  37. package/src/core/__workshop__/boundary.tsx +1 -1
  38. package/src/core/__workshop__/index.ts +5 -3
  39. package/src/core/components/autocomplete/__workshop__/async.tsx +1 -1
  40. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
  41. package/src/core/components/autocomplete/__workshop__/custom.tsx +2 -2
  42. package/src/core/components/autocomplete/__workshop__/example.tsx +2 -2
  43. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +1 -1
  44. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +1 -1
  45. package/src/core/components/autocomplete/__workshop__/index.ts +5 -3
  46. package/src/core/components/autocomplete/__workshop__/mock/apiStore.ts +1 -1
  47. package/src/core/components/autocomplete/__workshop__/mock/countries.ts +1 -1
  48. package/src/core/components/autocomplete/autocomplete.tsx +2 -2
  49. package/src/core/components/autocomplete/autocompleteOption.tsx +2 -2
  50. package/src/core/components/autocomplete/constants.ts +2 -2
  51. package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -1
  52. package/src/core/components/breadcrumbs/__workshop__/index.ts +5 -3
  53. package/src/core/components/breadcrumbs/breadcrumbs.tsx +6 -11
  54. package/src/core/components/dialog/__workshop__/activate.tsx +1 -1
  55. package/src/core/components/dialog/__workshop__/autoFocus.tsx +1 -1
  56. package/src/core/components/dialog/__workshop__/index.ts +5 -3
  57. package/src/core/components/dialog/__workshop__/layering.tsx +1 -1
  58. package/src/core/components/dialog/__workshop__/nested.tsx +2 -3
  59. package/src/core/components/dialog/__workshop__/onScroll.tsx +1 -1
  60. package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
  61. package/src/core/components/dialog/__workshop__/position.tsx +1 -1
  62. package/src/core/components/dialog/__workshop__/props.tsx +1 -1
  63. package/src/core/components/dialog/__workshop__/provider.tsx +1 -1
  64. package/src/core/components/dialog/__workshop__/wrapped.tsx +1 -1
  65. package/src/core/components/dialog/dialog.tsx +5 -6
  66. package/src/core/components/dialog/dialogCard.tsx +2 -2
  67. package/src/core/components/dialog/dialogContext.ts +3 -4
  68. package/src/core/components/dialog/dialogProvider.tsx +2 -2
  69. package/src/core/components/hotkeys/__workshop__/index.ts +5 -3
  70. package/src/core/components/hotkeys/__workshop__/plain.tsx +1 -1
  71. package/src/core/components/hotkeys/hotkeys.tsx +4 -15
  72. package/src/core/components/menu/__workshop__/asComponent.tsx +1 -1
  73. package/src/core/components/menu/__workshop__/avatarMenu.tsx +1 -1
  74. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +1 -1
  75. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +3 -3
  76. package/src/core/components/menu/__workshop__/customMenuItem.tsx +1 -1
  77. package/src/core/components/menu/__workshop__/customSelectedState.tsx +1 -1
  78. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +1 -1
  79. package/src/core/components/menu/__workshop__/groups.tsx +1 -1
  80. package/src/core/components/menu/__workshop__/index.ts +5 -3
  81. package/src/core/components/menu/__workshop__/menuButton.tsx +2 -2
  82. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +1 -1
  83. package/src/core/components/menu/__workshop__/nestedMenu.tsx +1 -1
  84. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +1 -1
  85. package/src/core/components/menu/__workshop__/selectedItem.tsx +1 -1
  86. package/src/core/components/menu/__workshop__/shouldFocus.tsx +1 -1
  87. package/src/core/components/menu/__workshop__/tones.tsx +3 -3
  88. package/src/core/components/menu/__workshop__/withoutArrow.tsx +1 -1
  89. package/src/core/components/menu/menu.test.tsx +2 -1
  90. package/src/core/components/menu/menu.tsx +7 -22
  91. package/src/core/components/menu/menuButton.tsx +4 -50
  92. package/src/core/components/menu/menuContext.ts +3 -15
  93. package/src/core/components/menu/menuDivider.tsx +2 -2
  94. package/src/core/components/menu/menuGroup.tsx +10 -15
  95. package/src/core/components/menu/menuItem.tsx +7 -18
  96. package/src/core/components/tab/__workshop__/example.tsx +1 -1
  97. package/src/core/components/tab/__workshop__/index.ts +5 -3
  98. package/src/core/components/tab/tab.tsx +6 -4
  99. package/src/core/components/tab/tabList.tsx +3 -8
  100. package/src/core/components/tab/tabPanel.tsx +2 -2
  101. package/src/core/components/toast/__workshop__/hook.tsx +1 -1
  102. package/src/core/components/toast/__workshop__/index.ts +5 -3
  103. package/src/core/components/toast/__workshop__/toast.tsx +1 -1
  104. package/src/core/components/toast/toast.test.tsx +2 -1
  105. package/src/core/components/toast/toast.tsx +2 -2
  106. package/src/core/components/toast/toastContext.ts +4 -4
  107. package/src/core/components/toast/toastLayer.tsx +3 -3
  108. package/src/core/components/tree/__workshop__/basic.perf.ts +1 -1
  109. package/src/core/components/tree/__workshop__/basic.tsx +1 -1
  110. package/src/core/components/tree/__workshop__/index.ts +5 -3
  111. package/src/core/components/tree/__workshop__/tabFromElement.tsx +1 -1
  112. package/src/core/components/tree/tree.tsx +8 -9
  113. package/src/core/components/tree/treeContext.ts +4 -4
  114. package/src/core/components/tree/treeGroup.tsx +6 -8
  115. package/src/core/components/tree/treeItem.tsx +4 -4
  116. package/src/core/components/tree/types.ts +1 -1
  117. package/src/core/components/virtualList/__workshop__/changingProps.tsx +1 -1
  118. package/src/core/components/virtualList/__workshop__/elementScroll.tsx +1 -1
  119. package/src/core/components/virtualList/__workshop__/index.ts +5 -3
  120. package/src/core/components/virtualList/__workshop__/infiniteList.tsx +1 -1
  121. package/src/core/components/virtualList/__workshop__/windowScrolll.tsx +1 -1
  122. package/src/core/components/virtualList/virtualList.tsx +2 -2
  123. package/src/core/constants.ts +0 -18
  124. package/src/core/hooks/useMediaIndex/__workshop__/index.ts +5 -3
  125. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +1 -1
  126. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +6 -1
  127. package/src/core/index.ts +1 -24
  128. package/src/core/lib/createGlobalScopedContext.ts +1 -1
  129. package/src/core/lib/globalScope.ts +1 -1
  130. package/src/core/observers/elementSize.ts +1 -1
  131. package/src/core/primitives/arrow/arrow.tsx +2 -2
  132. package/src/core/primitives/avatar/__workshop__/asButton.tsx +1 -1
  133. package/src/core/primitives/avatar/__workshop__/index.ts +5 -3
  134. package/src/core/primitives/avatar/__workshop__/stack.tsx +1 -1
  135. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +1 -1
  136. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +1 -1
  137. package/src/core/primitives/avatar/avatar.tsx +3 -10
  138. package/src/core/primitives/avatar/avatarCounter.tsx +2 -2
  139. package/src/core/primitives/avatar/avatarStack.tsx +2 -4
  140. package/src/core/primitives/avatar/types.ts +0 -32
  141. package/src/core/primitives/badge/__workshop__/index.ts +5 -3
  142. package/src/core/primitives/badge/__workshop__/props.tsx +1 -1
  143. package/src/core/primitives/badge/__workshop__/tones.tsx +3 -3
  144. package/src/core/primitives/badge/badge.test.tsx +2 -1
  145. package/src/core/primitives/badge/badge.tsx +12 -11
  146. package/src/core/primitives/box/__workshop__/index.ts +5 -3
  147. package/src/core/primitives/box/__workshop__/props.tsx +1 -1
  148. package/src/core/primitives/box/__workshop__/responsive.tsx +1 -1
  149. package/src/core/primitives/box/box.tsx +28 -32
  150. package/src/core/primitives/button/__workshop__/custom.tsx +5 -5
  151. package/src/core/primitives/button/__workshop__/customIcons.tsx +1 -1
  152. package/src/core/primitives/button/__workshop__/disabled.tsx +3 -3
  153. package/src/core/primitives/button/__workshop__/index.ts +5 -3
  154. package/src/core/primitives/button/__workshop__/mixedChildren.tsx +1 -1
  155. package/src/core/primitives/button/__workshop__/props.tsx +1 -1
  156. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
  157. package/src/core/primitives/button/__workshop__/stacked.tsx +1 -1
  158. package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
  159. package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
  160. package/src/core/primitives/button/__workshop__/textOverflow.tsx +1 -1
  161. package/src/core/primitives/button/__workshop__/uploadButton.tsx +1 -1
  162. package/src/core/primitives/button/button.test.tsx +2 -1
  163. package/src/core/primitives/button/button.tsx +4 -7
  164. package/src/core/primitives/button/types.ts +0 -20
  165. package/src/core/primitives/card/__workshop__/asButton.tsx +2 -2
  166. package/src/core/primitives/card/__workshop__/asComponent.tsx +1 -1
  167. package/src/core/primitives/card/__workshop__/checkered.tsx +3 -3
  168. package/src/core/primitives/card/__workshop__/index.ts +5 -3
  169. package/src/core/primitives/card/__workshop__/interactive.tsx +1 -1
  170. package/src/core/primitives/card/__workshop__/listNavigation.tsx +1 -1
  171. package/src/core/primitives/card/__workshop__/props.tsx +1 -1
  172. package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
  173. package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
  174. package/src/core/primitives/card/__workshop__/tones.tsx +3 -3
  175. package/src/core/primitives/card/card.tsx +4 -2
  176. package/src/core/primitives/card/cardContext.ts +1 -1
  177. package/src/core/primitives/card/cardProvider.tsx +4 -4
  178. package/src/core/primitives/card/types.ts +5 -19
  179. package/src/core/primitives/checkbox/__workshop__/example.tsx +1 -1
  180. package/src/core/primitives/checkbox/__workshop__/index.ts +5 -3
  181. package/src/core/primitives/checkbox/__workshop__/props.tsx +1 -1
  182. package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +1 -1
  183. package/src/core/primitives/checkbox/__workshop__/tones.tsx +3 -3
  184. package/src/core/primitives/checkbox/checkbox.tsx +2 -2
  185. package/src/core/primitives/code/__workshop__/index.ts +5 -3
  186. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +1 -1
  187. package/src/core/primitives/code/__workshop__/props.tsx +1 -1
  188. package/src/core/primitives/code/code.tsx +4 -2
  189. package/src/core/primitives/code/refractor.tsx +1 -1
  190. package/src/core/primitives/container/__workshop__/example.tsx +1 -1
  191. package/src/core/primitives/container/__workshop__/index.ts +5 -3
  192. package/src/core/primitives/container/container.tsx +2 -2
  193. package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
  194. package/src/core/primitives/flex/__workshop__/gap.tsx +1 -1
  195. package/src/core/primitives/flex/__workshop__/index.ts +5 -3
  196. package/src/core/primitives/flex/flex.tsx +4 -2
  197. package/src/core/primitives/grid/__workshop__/index.ts +5 -3
  198. package/src/core/primitives/grid/__workshop__/responsive.tsx +3 -3
  199. package/src/core/primitives/grid/grid.tsx +4 -2
  200. package/src/core/primitives/heading/__workshop__/index.ts +5 -3
  201. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +1 -1
  202. package/src/core/primitives/heading/__workshop__/plain.tsx +1 -1
  203. package/src/core/primitives/heading/heading.tsx +2 -4
  204. package/src/core/primitives/inline/__workshop__/index.ts +5 -3
  205. package/src/core/primitives/inline/__workshop__/plain.tsx +1 -1
  206. package/src/core/primitives/inline/inline.tsx +4 -11
  207. package/src/core/primitives/kbd/__workshop__/index.ts +5 -3
  208. package/src/core/primitives/kbd/__workshop__/plain.tsx +1 -1
  209. package/src/core/primitives/kbd/kbd.tsx +4 -2
  210. package/src/core/primitives/label/__workshop__/index.ts +5 -3
  211. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +1 -1
  212. package/src/core/primitives/label/__workshop__/plain.tsx +1 -1
  213. package/src/core/primitives/label/label.tsx +2 -4
  214. package/src/core/primitives/layer/__workshop__/_debug.tsx +1 -1
  215. package/src/core/primitives/layer/__workshop__/index.ts +5 -3
  216. package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +1 -1
  217. package/src/core/primitives/layer/__workshop__/nested.tsx +1 -1
  218. package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +1 -1
  219. package/src/core/primitives/layer/layer.test.tsx +2 -1
  220. package/src/core/primitives/layer/layer.tsx +2 -2
  221. package/src/core/primitives/layer/layerCard.tsx +2 -2
  222. package/src/core/primitives/layer/layerContext.ts +4 -4
  223. package/src/core/primitives/layer/layerProvider.tsx +2 -10
  224. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +2 -2
  225. package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +1 -1
  226. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +1 -1
  227. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +1 -1
  228. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +2 -2
  229. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +3 -3
  230. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +3 -3
  231. package/src/core/primitives/popover/__workshop__/index.ts +5 -3
  232. package/src/core/primitives/popover/popover.tsx +4 -9
  233. package/src/core/primitives/popover/popoverLayer.tsx +2 -2
  234. package/src/core/primitives/radio/__workshop__/example.tsx +1 -1
  235. package/src/core/primitives/radio/__workshop__/index.ts +5 -3
  236. package/src/core/primitives/radio/__workshop__/plain.tsx +1 -1
  237. package/src/core/primitives/radio/radio.tsx +2 -2
  238. package/src/core/primitives/select/__workshop__/index.ts +5 -3
  239. package/src/core/primitives/select/__workshop__/plain.tsx +1 -1
  240. package/src/core/primitives/select/__workshop__/readOnly.tsx +1 -1
  241. package/src/core/primitives/select/select.tsx +5 -15
  242. package/src/core/primitives/selectable/selectable.tsx +4 -4
  243. package/src/core/primitives/skeleton/__workshop__/delay.tsx +1 -1
  244. package/src/core/primitives/skeleton/__workshop__/index.ts +5 -3
  245. package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +2 -2
  246. package/src/core/primitives/skeleton/codeSkeleton.tsx +2 -2
  247. package/src/core/primitives/skeleton/headingSkeleton.tsx +2 -2
  248. package/src/core/primitives/skeleton/labelSkeleton.tsx +2 -2
  249. package/src/core/primitives/skeleton/skeleton.tsx +2 -2
  250. package/src/core/primitives/skeleton/textSkeleton.tsx +2 -2
  251. package/src/core/primitives/spinner/__workshop__/Props.tsx +1 -1
  252. package/src/core/primitives/spinner/__workshop__/index.ts +5 -3
  253. package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +2 -2
  254. package/src/core/primitives/spinner/spinner.tsx +2 -2
  255. package/src/core/primitives/srOnly/srOnly.tsx +2 -2
  256. package/src/core/primitives/stack/__workshop__/index.ts +5 -3
  257. package/src/core/primitives/stack/__workshop__/plain.tsx +1 -1
  258. package/src/core/primitives/stack/stack.tsx +5 -10
  259. package/src/core/primitives/switch/__workshop__/example.tsx +1 -1
  260. package/src/core/primitives/switch/__workshop__/index.ts +5 -3
  261. package/src/core/primitives/switch/__workshop__/props.tsx +1 -1
  262. package/src/core/primitives/switch/switch.tsx +2 -2
  263. package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
  264. package/src/core/primitives/text/__workshop__/example.tsx +1 -1
  265. package/src/core/primitives/text/__workshop__/index.ts +5 -3
  266. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +1 -1
  267. package/src/core/primitives/text/text.tsx +4 -4
  268. package/src/core/primitives/textArea/__workshop__/index.ts +5 -3
  269. package/src/core/primitives/textArea/__workshop__/plain.tsx +1 -1
  270. package/src/core/primitives/textArea/textArea.tsx +5 -15
  271. package/src/core/primitives/textInput/__workshop__/clearButton.tsx +1 -1
  272. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +1 -1
  273. package/src/core/primitives/textInput/__workshop__/index.ts +5 -3
  274. package/src/core/primitives/textInput/__workshop__/plain.tsx +1 -1
  275. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +1 -1
  276. package/src/core/primitives/textInput/__workshop__/states.tsx +1 -1
  277. package/src/core/primitives/textInput/__workshop__/tones.tsx +1 -1
  278. package/src/core/primitives/textInput/__workshop__/typed.tsx +1 -1
  279. package/src/core/primitives/textInput/textInput.tsx +6 -9
  280. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +1 -1
  281. package/src/core/primitives/tooltip/__workshop__/index.ts +5 -3
  282. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +1 -1
  283. package/src/core/primitives/tooltip/__workshop__/props.tsx +1 -1
  284. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +1 -1
  285. package/src/core/primitives/tooltip/constants.ts +1 -1
  286. package/src/core/primitives/tooltip/tooltip.test.tsx +2 -4
  287. package/src/core/primitives/tooltip/tooltip.tsx +5 -9
  288. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +4 -2
  289. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +5 -3
  290. package/src/core/primitives/tooltip/tooltipLayer.tsx +2 -2
  291. package/src/core/{types/props.ts → types.ts} +27 -0
  292. package/src/core/utils/boundaryElement/__workshop__/index.ts +5 -3
  293. package/src/core/utils/boundaryElement/__workshop__/plain.tsx +1 -1
  294. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +2 -1
  295. package/src/core/utils/boundaryElement/boundaryElementContext.ts +7 -4
  296. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +2 -2
  297. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
  298. package/src/core/utils/elementQuery/__workshop__/index.ts +5 -3
  299. package/src/core/utils/elementQuery/elementQuery.tsx +2 -2
  300. package/src/core/utils/getElementRef.ts +1 -1
  301. package/src/core/utils/portal/__workshop__/index.ts +5 -3
  302. package/src/core/utils/portal/__workshop__/named.tsx +1 -1
  303. package/src/core/utils/portal/portal.test.tsx +2 -1
  304. package/src/core/utils/portal/portalContext.ts +5 -2
  305. package/src/core/utils/portal/portalProvider.tsx +5 -9
  306. package/src/css/_responsiveClassName.ts +2 -2
  307. package/src/css/_style.css.ts +1 -1
  308. package/src/css/components/breadcrumbs/breadcrumbs.css.ts +1 -1
  309. package/src/css/components/dialog/dialog.css.ts +9 -17
  310. package/src/css/components/menu/menu.css.ts +2 -2
  311. package/src/css/components/menu/menu.ts +2 -2
  312. package/src/css/components/skeleton/skeleton.css.ts +2 -6
  313. package/src/css/components/toast/toast.css.ts +2 -2
  314. package/src/css/components/toast/toast.ts +2 -2
  315. package/src/css/components/tree/tree.css.ts +1 -1
  316. package/src/css/components/tree/tree.ts +1 -1
  317. package/src/css/defaultTheme.css.ts +59 -60
  318. package/src/css/layers.css.ts +4 -1
  319. package/src/css/primitives/_arrow/_arrow.css.ts +5 -5
  320. package/src/css/primitives/_input/_input.css.ts +4 -4
  321. package/src/css/primitives/_selectable/_selectable.css.ts +4 -4
  322. package/src/css/primitives/_selectable/types.ts +2 -2
  323. package/src/css/primitives/avatar/avatar.css.ts +10 -10
  324. package/src/css/primitives/badge/badge.css.ts +4 -4
  325. package/src/css/primitives/badge/types.ts +8 -2
  326. package/src/css/primitives/box/box.css.ts +2 -2
  327. package/src/css/primitives/button/button.css.ts +6 -6
  328. package/src/css/primitives/button/button.ts +2 -2
  329. package/src/css/primitives/button/types.ts +3 -3
  330. package/src/css/primitives/card/__workshop__/color.tsx +9 -9
  331. package/src/css/primitives/card/__workshop__/index.ts +5 -3
  332. package/src/css/primitives/card/card.css.ts +12 -18
  333. package/src/css/primitives/card/types.ts +3 -3
  334. package/src/css/primitives/checkbox/checkbox.css.ts +3 -3
  335. package/src/css/primitives/checkbox/checkbox.ts +3 -3
  336. package/src/css/primitives/code/code.css.ts +4 -3
  337. package/src/css/primitives/code/types.ts +3 -4
  338. package/src/css/primitives/container/container.css.ts +1 -1
  339. package/src/css/primitives/heading/heading.css.ts +5 -4
  340. package/src/css/primitives/heading/types.ts +3 -6
  341. package/src/css/primitives/kbd/kbd.css.ts +1 -1
  342. package/src/css/primitives/label/label.css.ts +5 -4
  343. package/src/css/primitives/label/types.ts +0 -8
  344. package/src/css/primitives/popover/popover.css.ts +2 -2
  345. package/src/css/primitives/popover/popover.ts +2 -2
  346. package/src/css/primitives/radio/radio.css.ts +3 -3
  347. package/src/css/primitives/radio/radio.ts +3 -3
  348. package/src/css/primitives/root/root.css.ts +1 -1
  349. package/src/css/primitives/root/root.ts +1 -1
  350. package/src/css/primitives/root/types.ts +3 -3
  351. package/src/css/primitives/select/select.css.ts +3 -3
  352. package/src/css/primitives/spinner/spinner.css.ts +2 -6
  353. package/src/css/primitives/spinner/spinner.ts +2 -2
  354. package/src/css/primitives/srOnly/srOnly.css.ts +1 -1
  355. package/src/css/primitives/srOnly/srOnly.ts +1 -1
  356. package/src/css/primitives/stack/stack.css.ts +1 -1
  357. package/src/css/primitives/stack/stack.ts +1 -1
  358. package/src/css/primitives/switch/switch.css.ts +5 -5
  359. package/src/css/primitives/text/text.css.ts +5 -4
  360. package/src/css/primitives/text/types.ts +3 -5
  361. package/src/css/primitives/textArea/textArea.css.ts +1 -1
  362. package/src/css/primitives/textInput/textInput.css.ts +4 -4
  363. package/src/css/primitives/tooltip/tooltip.css.ts +1 -1
  364. package/src/css/props/alignItems/alignItems.ts +1 -1
  365. package/src/css/props/border/border.ts +1 -16
  366. package/src/css/props/boxSizing/boxSizing.css.ts +2 -1
  367. package/src/css/props/boxSizing/boxSizing.ts +0 -3
  368. package/src/css/props/display/display.ts +1 -10
  369. package/src/css/props/flex/flex.ts +1 -1
  370. package/src/css/props/flexDirection/flexDirection.ts +1 -1
  371. package/src/css/props/flexWrap/flexWrap.ts +1 -1
  372. package/src/css/props/font/font.css.ts +3 -2
  373. package/src/css/props/font/font.ts +1 -1
  374. package/src/css/props/gap/gap.ts +1 -1
  375. package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +2 -2
  376. package/src/css/props/gridAutoColumns/gridAutoColumns.ts +2 -2
  377. package/src/css/props/gridAutoColumns/types.ts +0 -10
  378. package/src/css/props/gridAutoFlow/gridAutoFlow.ts +2 -2
  379. package/src/css/props/gridAutoFlow/types.ts +0 -4
  380. package/src/css/props/gridAutoRows/gridAutoRows.ts +2 -2
  381. package/src/css/props/gridAutoRows/types.ts +0 -4
  382. package/src/css/props/gridColumn/gridColumn.ts +3 -3
  383. package/src/css/props/gridColumn/types.ts +0 -10
  384. package/src/css/props/gridColumnEnd/gridColumnEnd.ts +3 -3
  385. package/src/css/props/gridColumnEnd/types.ts +0 -10
  386. package/src/css/props/gridColumnStart/gridColumnStart.ts +3 -6
  387. package/src/css/props/gridColumnStart/types.ts +0 -10
  388. package/src/css/props/gridRow/gridRow.ts +3 -3
  389. package/src/css/props/gridRow/types.ts +0 -10
  390. package/src/css/props/gridRowEnd/gridRowEnd.ts +3 -3
  391. package/src/css/props/gridRowEnd/types.ts +0 -10
  392. package/src/css/props/gridRowStart/gridRowStart.ts +3 -3
  393. package/src/css/props/gridRowStart/types.ts +0 -10
  394. package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +2 -2
  395. package/src/css/props/gridTemplateColumns/types.ts +0 -10
  396. package/src/css/props/gridTemplateRows/gridTemplateRows.ts +2 -2
  397. package/src/css/props/gridTemplateRows/types.ts +0 -10
  398. package/src/css/props/height/height.ts +1 -1
  399. package/src/css/props/height/types.ts +0 -6
  400. package/src/css/props/inset/inset.ts +1 -1
  401. package/src/css/props/justifyContent/justifyContent.ts +1 -1
  402. package/src/css/props/margin/margin.ts +1 -1
  403. package/src/css/props/maxWidth/maxWidth.ts +1 -1
  404. package/src/css/props/minHeight/minHeight.ts +1 -1
  405. package/src/css/props/minWidth/minWidth.ts +1 -1
  406. package/src/css/props/outline/outline.ts +1 -1
  407. package/src/css/props/overflow/overflow.ts +1 -1
  408. package/src/css/props/overflow/types.ts +0 -6
  409. package/src/css/props/padding/padding.ts +1 -1
  410. package/src/css/props/pointerEvents/pointerEvents.ts +1 -1
  411. package/src/css/props/position/position.ts +1 -1
  412. package/src/css/props/radius/radius.ts +1 -1
  413. package/src/css/props/shadow/shadow.ts +1 -1
  414. package/src/css/props/textAlign/textAlign.ts +1 -1
  415. package/src/css/props/textOverflow/textOverflow.ts +1 -1
  416. package/src/css/props/width/width.ts +1 -1
  417. package/src/css/types.ts +225 -53
  418. package/src/css/util.ts +2 -2
  419. package/src/css/vars.css.ts +33 -36
  420. package/src/theme/{v3/_parseColorToken.ts → _parseColorToken.ts} +2 -2
  421. package/src/theme/buildTheme.ts +33 -0
  422. package/src/theme/constants.ts +90 -0
  423. package/src/theme/defaults/color.ts +197 -0
  424. package/src/theme/{v2/defaults/config.ts → defaults/common.ts} +3 -16
  425. package/src/theme/{v3/defaultFonts.ts → defaults/fonts.ts} +2 -2
  426. package/src/theme/index.ts +4 -5
  427. package/src/theme/{v3/resolveTokens.ts → resolveTokens.ts} +15 -15
  428. package/src/theme/types.ts +355 -15
  429. package/src/core/__DEV__.ts +0 -5
  430. package/src/core/_compat/helpers.ts +0 -72
  431. package/src/core/_compat/styles/_responsive.ts +0 -19
  432. package/src/core/_compat/theme/theme.test.tsx +0 -73
  433. package/src/core/_compat/theme/themeColorProvider.tsx +0 -24
  434. package/src/core/_compat/theme/themeContext.ts +0 -10
  435. package/src/core/_compat/theme/themeProvider.tsx +0 -68
  436. package/src/core/_compat/theme/types.ts +0 -10
  437. package/src/core/_compat/theme/useRootTheme.ts +0 -15
  438. package/src/core/_compat/theme/useTheme.ts +0 -12
  439. package/src/core/_compat/types.ts +0 -191
  440. package/src/core/hooks/useArrayProp.ts +0 -26
  441. package/src/core/hooks/useClickOutside.test.tsx +0 -481
  442. package/src/core/hooks/useClickOutside.ts +0 -113
  443. package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -30
  444. package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
  445. package/src/core/hooks/useElementRect/useElementRect.ts +0 -13
  446. package/src/core/hooks/useForwardedRef.ts +0 -19
  447. package/src/core/hooks/useIsomorphicEffect.ts +0 -7
  448. package/src/core/primitives/badge/types.ts +0 -18
  449. package/src/core/primitives/box/types.ts +0 -22
  450. package/src/core/primitives/flex/types.ts +0 -27
  451. package/src/core/primitives/grid/types.ts +0 -17
  452. package/src/core/primitives/selectable/types.ts +0 -7
  453. package/src/core/primitives/types.ts +0 -153
  454. package/src/core/types/gridItem.ts +0 -32
  455. package/src/core/types/placement.ts +0 -18
  456. package/src/core/types/radius.ts +0 -7
  457. package/src/core/types/textAlign.ts +0 -7
  458. package/src/core/utils/spanWithTextOverflow.tsx +0 -10
  459. package/src/theme/getScopedTheme.ts +0 -88
  460. package/src/theme/v0/avatar.ts +0 -10
  461. package/src/theme/v0/color/_generic.ts +0 -35
  462. package/src/theme/v0/color/_system.ts +0 -17
  463. package/src/theme/v0/color/base.ts +0 -21
  464. package/src/theme/v0/color/button.ts +0 -42
  465. package/src/theme/v0/color/card.ts +0 -19
  466. package/src/theme/v0/color/color.ts +0 -40
  467. package/src/theme/v0/color/index.ts +0 -11
  468. package/src/theme/v0/color/input.ts +0 -34
  469. package/src/theme/v0/color/muted.ts +0 -26
  470. package/src/theme/v0/color/selectable.ts +0 -31
  471. package/src/theme/v0/color/solid.ts +0 -26
  472. package/src/theme/v0/color/spot.ts +0 -13
  473. package/src/theme/v0/css.ts +0 -10
  474. package/src/theme/v0/focusRing.ts +0 -5
  475. package/src/theme/v0/font.ts +0 -40
  476. package/src/theme/v0/index.ts +0 -10
  477. package/src/theme/v0/input.ts +0 -23
  478. package/src/theme/v0/layer.ts +0 -6
  479. package/src/theme/v0/shadow.ts +0 -15
  480. package/src/theme/v0/styles.ts +0 -13
  481. package/src/theme/v0/theme.ts +0 -72
  482. package/src/theme/v2/avatar.ts +0 -12
  483. package/src/theme/v2/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
  484. package/src/theme/v2/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
  485. package/src/theme/v2/build/_deprecated/color/button/createButtonModes.ts +0 -22
  486. package/src/theme/v2/build/_deprecated/color/button/createButtonTones.ts +0 -55
  487. package/src/theme/v2/build/_deprecated/color/card/createCardStates.ts +0 -60
  488. package/src/theme/v2/build/_deprecated/color/color.test.ts +0 -63
  489. package/src/theme/v2/build/_deprecated/color/defaults.ts +0 -390
  490. package/src/theme/v2/build/_deprecated/color/factory.ts +0 -141
  491. package/src/theme/v2/build/_deprecated/color/index.ts +0 -1
  492. package/src/theme/v2/build/_deprecated/color/input/createInputModes.ts +0 -86
  493. package/src/theme/v2/build/_deprecated/color/muted/createMuted.ts +0 -54
  494. package/src/theme/v2/build/_deprecated/color/spot/createSpot.ts +0 -20
  495. package/src/theme/v2/build/buildColorTheme.test.ts +0 -185
  496. package/src/theme/v2/build/buildColorTheme.ts +0 -494
  497. package/src/theme/v2/build/buildTheme.test.ts +0 -89
  498. package/src/theme/v2/build/buildTheme.ts +0 -37
  499. package/src/theme/v2/build/colorToken/colorToken.ts +0 -19
  500. package/src/theme/v2/build/colorToken/compileColorToken.ts +0 -21
  501. package/src/theme/v2/build/colorToken/index.ts +0 -2
  502. package/src/theme/v2/build/colorToken/types.ts +0 -6
  503. package/src/theme/v2/build/index.ts +0 -3
  504. package/src/theme/v2/build/lib/color-fns/blend/index.ts +0 -3
  505. package/src/theme/v2/build/lib/color-fns/blend/mix.ts +0 -21
  506. package/src/theme/v2/build/lib/color-fns/blend/multiply.ts +0 -18
  507. package/src/theme/v2/build/lib/color-fns/blend/screen.ts +0 -18
  508. package/src/theme/v2/build/lib/color-fns/color-fns.test.ts +0 -68
  509. package/src/theme/v2/build/lib/color-fns/contrastRatio.ts +0 -34
  510. package/src/theme/v2/build/lib/color-fns/convert.ts +0 -150
  511. package/src/theme/v2/build/lib/color-fns/index.ts +0 -6
  512. package/src/theme/v2/build/lib/color-fns/parse.ts +0 -60
  513. package/src/theme/v2/build/lib/color-fns/rgba.ts +0 -14
  514. package/src/theme/v2/build/lib/color-fns/types.ts +0 -28
  515. package/src/theme/v2/build/lib/isRecord.ts +0 -3
  516. package/src/theme/v2/build/lib/utils.ts +0 -19
  517. package/src/theme/v2/build/merge.ts +0 -28
  518. package/src/theme/v2/build/mixThemeColor.test.ts +0 -23
  519. package/src/theme/v2/build/mixThemeColor.ts +0 -53
  520. package/src/theme/v2/build/renderColorTheme.ts +0 -532
  521. package/src/theme/v2/build/renderColorValue.ts +0 -85
  522. package/src/theme/v2/build/resolveColorTokens.ts +0 -268
  523. package/src/theme/v2/color/_constants.ts +0 -45
  524. package/src/theme/v2/color/_helpers.ts +0 -24
  525. package/src/theme/v2/color/_system.ts +0 -38
  526. package/src/theme/v2/color/avatar.ts +0 -11
  527. package/src/theme/v2/color/badge.ts +0 -12
  528. package/src/theme/v2/color/button.ts +0 -11
  529. package/src/theme/v2/color/color.ts +0 -28
  530. package/src/theme/v2/color/index.ts +0 -13
  531. package/src/theme/v2/color/input.ts +0 -23
  532. package/src/theme/v2/color/kbd.ts +0 -6
  533. package/src/theme/v2/color/selectable.ts +0 -8
  534. package/src/theme/v2/color/shadow.ts +0 -7
  535. package/src/theme/v2/color/state.ts +0 -41
  536. package/src/theme/v2/color/syntax.ts +0 -39
  537. package/src/theme/v2/config/helpers.ts +0 -48
  538. package/src/theme/v2/config/index.ts +0 -4
  539. package/src/theme/v2/config/system.ts +0 -114
  540. package/src/theme/v2/config/tokens/color/index.ts +0 -1
  541. package/src/theme/v2/config/tokens/color/types.ts +0 -137
  542. package/src/theme/v2/config/tokens/index.ts +0 -3
  543. package/src/theme/v2/config/tokens/parseTokenValue.test.ts +0 -44
  544. package/src/theme/v2/config/tokens/parseTokenValue.ts +0 -133
  545. package/src/theme/v2/config/tokens/types.ts +0 -53
  546. package/src/theme/v2/config/types.ts +0 -47
  547. package/src/theme/v2/defaults/colorPalette.ts +0 -5
  548. package/src/theme/v2/defaults/colorTokens.ts +0 -648
  549. package/src/theme/v2/defaults/fonts.ts +0 -227
  550. package/src/theme/v2/index.ts +0 -6
  551. package/src/theme/v2/input.ts +0 -31
  552. package/src/theme/v2/theme.ts +0 -45
  553. package/src/theme/v3/_constants.ts +0 -29
  554. package/src/theme/v3/buildTheme_v3.ts +0 -39
  555. package/src/theme/v3/color/_constants.ts +0 -15
  556. package/src/theme/v3/color/avatar.ts +0 -14
  557. package/src/theme/v3/color/card.ts +0 -79
  558. package/src/theme/v3/color/color.ts +0 -98
  559. package/src/theme/v3/color/element.ts +0 -19
  560. package/src/theme/v3/color/index.ts +0 -7
  561. package/src/theme/v3/color/token.ts +0 -32
  562. package/src/theme/v3/color/tokens.ts +0 -5
  563. package/src/theme/v3/defaultTokens.ts +0 -199
  564. package/src/theme/v3/index.ts +0 -9
  565. package/src/theme/v3/palette/constants.ts +0 -15
  566. package/src/theme/v3/palette/index.ts +0 -2
  567. package/src/theme/v3/palette/types.ts +0 -7
  568. package/src/theme/v3/tokens.ts +0 -16
  569. package/src/theme/v3/types.ts +0 -133
  570. package/src/theme/versioning/getTheme_v2.ts +0 -58
  571. package/src/theme/versioning/index.ts +0 -1
  572. package/src/theme/versioning/is_v0.ts +0 -7
  573. package/src/theme/versioning/is_v2.ts +0 -7
  574. package/src/theme/versioning/themeColor_v0_v2.ts +0 -245
  575. package/src/theme/versioning/themeColor_v2_v2_9.ts +0 -49
  576. package/src/theme/versioning/themeColor_v3_v2.ts +0 -383
  577. package/src/theme/versioning/v0_v2.ts +0 -95
  578. package/src/theme/versioning/v2_v0.ts +0 -127
  579. package/src/theme/versioning/v3_v2.ts +0 -130
  580. /package/src/theme/{v3/merge.ts → merge.ts} +0 -0
@@ -1,904 +1,2 @@
1
- import type {AlignItems} from '@sanity/ui/css'
2
- import type {BoxStyleProps} from '@sanity/ui/css'
3
- import type {ButtonStyleProps} from '@sanity/ui/css'
4
- import {CardStyleProps} from '@sanity/ui/css'
5
- import type {ComponentClass} from 'react'
6
- import type {ComponentProps} from 'react'
7
- import type {DisplayStyleProps} from '@sanity/ui/css'
8
- import {ElementType as ElementType_2} from 'react'
9
- import type {ExoticComponent} from 'react'
10
- import type {FlexDirection} from '@sanity/ui/css'
11
- import type {FlexWrap} from '@sanity/ui/css'
12
- import type {FontTextSize} from '@sanity/ui/theme'
13
- import {ForwardedRef} from 'react'
14
- import type {FunctionComponent} from 'react'
15
- import type {GapStyleProps} from '@sanity/ui/css'
16
- import {HTMLAttributes} from 'react'
17
- import {InputStyleProps} from '@sanity/ui/css'
18
- import type {InsetStyleProps} from '@sanity/ui/css'
19
- import {JSX} from 'react'
20
- import type {JustifyContent} from '@sanity/ui/css'
21
- import {MaxWidth} from '@sanity/ui/css'
22
- import {PaddingStyleProps} from '@sanity/ui/css'
23
- import type {PositionStyleProps} from '@sanity/ui/css'
24
- import {RadiusStyleProps} from '@sanity/ui/css'
25
- import {ReactElement} from 'react'
26
- import {ReactNode} from 'react'
27
- import type {ReactPortal} from 'react'
28
- import {Ref} from 'react'
29
- import {RefAttributes} from 'react'
30
- import {ResponsiveProp} from '@sanity/ui/css'
31
- import {RootTheme} from '@sanity/ui/theme'
32
- import {ShadowStyleProps} from '@sanity/ui/css'
33
- import type {Space} from '@sanity/ui/theme'
34
- import {TextOverflowStyleProps} from '@sanity/ui/css'
35
- import {TextStyleProps} from '@sanity/ui/css'
36
- import {Theme_v2} from '@sanity/ui/theme'
37
- import {ThemeColorCardToneKey} from '@sanity/ui/theme'
38
- import {ThemeColorSchemeKey} from '@sanity/ui/theme'
39
- import type {ThemeColorStateToneKey} from '@sanity/ui/theme'
40
- import type {ThemeFontWeightKey} from '@sanity/ui/theme'
41
- import type {Width} from '@sanity/ui/css'
42
-
43
- /**
44
- * Assign properties from `U` to `T`, excluding properties that already exist in `T`.
45
- *
46
- * @public
47
- */
48
- declare type Assign<T extends {}, U extends {}> = Omit<T, keyof U> & U
49
-
50
- /**
51
- * The `Box` component is a basic layout wrapper component which provides utility properties
52
- * for flex, margins and padding.
53
- *
54
- * @public
55
- */
56
- export declare function Box<E extends BoxElementType = typeof DEFAULT_BOX_ELEMENT>(
57
- props: BoxProps<E>,
58
- ): JSX.Element
59
-
60
- /** @public */
61
- declare type BoxElementType =
62
- | 'a'
63
- | 'article'
64
- | 'aside'
65
- | 'blockquote'
66
- | 'body'
67
- | 'button'
68
- | 'details'
69
- | 'div'
70
- | 'header'
71
- | 'fieldset'
72
- | 'figure'
73
- | 'figcaption'
74
- | 'footer'
75
- | 'form'
76
- | 'html'
77
- | 'iframe'
78
- | 'kbd'
79
- | 'label'
80
- | 'legend'
81
- | 'li'
82
- | 'main'
83
- | 'nav'
84
- | 'ol'
85
- | 'pre'
86
- | 'section'
87
- | 'span'
88
- | 'summary'
89
- | 'ul'
90
- | ComponentType
91
-
92
- /** @public */
93
- declare type BoxOwnProps = BoxStyleProps & GapStyleProps & InsetStyleProps & PositionStyleProps
94
-
95
- /** @public */
96
- export declare type BoxProps<E extends BoxElementType = BoxElementType> = Props<BoxOwnProps, E>
97
-
98
- /** @public */
99
- export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
100
- props: ButtonProps<E>,
101
- ): JSX.Element
102
-
103
- /** @public */
104
- declare type ButtonElementType = 'a' | 'button' | 'label' | ComponentType
105
-
106
- /** @public */
107
- declare type ButtonOwnProps = ButtonStyleProps &
108
- DisplayStyleProps &
109
- GapStyleProps &
110
- PaddingStyleProps & {
111
- 'align'?: BoxStyleProps['alignItems']
112
- 'data-ui'?: string
113
- 'disabled'?: boolean
114
- 'fontSize'?: ResponsiveProp<FontTextSize>
115
- 'icon'?: ElementType_2 | ReactNode
116
- 'iconRight'?: ElementType_2 | ReactNode
117
- 'justify'?: BoxStyleProps['justifyContent']
118
- /** @beta Do not use in production, as this might change.*/
119
- 'loading'?: boolean
120
- 'selected'?: boolean
121
- /** @deprecated Use `gap` instead. */
122
- 'space'?: ResponsiveProp<Space>
123
- 'textAlign'?: ButtonTextAlign
124
- 'muted'?: boolean
125
- 'target'?: string
126
- 'text'?: ReactNode
127
- 'textOverflow'?: TextOwnProps['textOverflow']
128
- 'textWeight'?: TextOwnProps['weight']
129
- 'width'?: ResponsiveProp<Width>
130
- }
131
-
132
- /** @public */
133
- export declare type ButtonProps<E extends ButtonElementType = ButtonElementType> = Props<
134
- ButtonOwnProps,
135
- E
136
- >
137
-
138
- /** @public */
139
- declare type ButtonTextAlign = 'left' | 'right' | 'center'
140
-
141
- /**
142
- * The `Card` component acts much like a `Box`, but with a background and foreground color.
143
- * Components within a `Card` inherit its colors.
144
- *
145
- * @public
146
- */
147
- export declare function Card<E extends CardElementType = typeof DEFAULT_CARD_ELEMENT>(
148
- props: CardProps<E>,
149
- ): JSX.Element
150
-
151
- /** @public */
152
- declare type CardElementType = BoxElementType
153
-
154
- /** @public */
155
- declare interface CardOwnProps extends BoxOwnProps, CardStyleProps {
156
- /**
157
- * Do not use in production.
158
- * @beta
159
- */
160
- __unstable_checkered?: boolean
161
- /**
162
- * Do not use in production.
163
- * @beta
164
- */
165
- __unstable_focusRing?: boolean
166
- disabled?: boolean
167
- pressed?: boolean
168
- selected?: boolean
169
- target?: string
170
- }
171
-
172
- /** @public */
173
- export declare type CardProps<E extends CardElementType = CardElementType> = Props<CardOwnProps, E>
174
-
175
- /** @public */
176
- declare type ComponentType<P = any> = FunctionComponent<P> | ComponentClass<P> | ExoticComponent<P>
177
-
178
- /** @public */
179
- declare const DEFAULT_BOX_ELEMENT = 'div'
180
-
181
- /** @public */
182
- declare const DEFAULT_BUTTON_ELEMENT = 'button'
183
-
184
- /** @public */
185
- declare const DEFAULT_CARD_ELEMENT = 'div'
186
-
187
- /** @public */
188
- declare const DEFAULT_FLEX_ELEMENT = 'div'
189
-
190
- /** @public */
191
- declare const DEFAULT_GRID_ELEMENT = 'div'
192
-
193
- /** @public */
194
- declare const DEFAULT_HOTKEYS_ELEMENT = 'kbd'
195
-
196
- /** @public */
197
- declare const DEFAULT_MENU_DIVIDER_ELEMENT = 'hr'
198
-
199
- /** @public */
200
- declare const DEFAULT_MENU_ELEMENT = 'div'
201
-
202
- /** @public */
203
- declare const DEFAULT_MENU_GROUP_ELEMENT = 'button'
204
-
205
- /** @public */
206
- declare const DEFAULT_MENU_ITEM_ELEMENT = 'button'
207
-
208
- /** @public */
209
- declare const DEFAULT_POPOVER_ELEMENT = 'div'
210
-
211
- /** @public */
212
- declare const DEFAULT_SPINNER_ELEMENT = 'div'
213
-
214
- /** @public */
215
- declare const DEFAULT_STACK_ELEMENT = 'div'
216
-
217
- /** @public */
218
- declare const DEFAULT_TAB_ELEMENT = 'button'
219
-
220
- /** @public */
221
- declare const DEFAULT_TAB_LIST_ELEMENT = 'div'
222
-
223
- /** @public */
224
- declare const DEFAULT_TEXT_ELEMENT = 'div'
225
-
226
- /** @public */
227
- declare const DEFAULT_TEXT_INPUT_ELEMENT = 'input'
228
-
229
- /** @public */
230
- declare const DEFAULT_TOOLTIP_ELEMENT = 'div'
231
-
232
- /** @public */
233
- declare type Delay =
234
- | number
235
- | Partial<{
236
- open: number
237
- close: number
238
- }>
239
-
240
- /** @public */
241
- declare type ElementType<P> = TagType | ComponentType<P>
242
-
243
- /** @public */
244
- declare type EmptyProps = {}
245
-
246
- /**
247
- * The `Flex` component is a wrapper component for flexible elements (`Box`, `Card` and `Flex`).
248
- *
249
- * @public
250
- */
251
- export declare function Flex<E extends FlexElementType = typeof DEFAULT_FLEX_ELEMENT>(
252
- props: FlexProps<E>,
253
- ): JSX.Element
254
-
255
- /** @public */
256
- declare type FlexElementType = BoxElementType
257
-
258
- /** @public */
259
- declare type FlexOwnProps = Omit<
260
- BoxOwnProps,
261
- 'align' | 'display' | 'flexDirection' | 'flexWrap'
262
- > & {
263
- align?: ResponsiveProp<AlignItems>
264
- direction?: ResponsiveProp<FlexDirection>
265
- justify?: ResponsiveProp<JustifyContent>
266
- wrap?: ResponsiveProp<FlexWrap>
267
- }
268
-
269
- /** @public */
270
- export declare type FlexProps<E extends FlexElementType = FlexElementType> = Props<FlexOwnProps, E>
271
-
272
- /**
273
- * The `Grid` component is for building 2-dimensional layers (based on CSS grid).
274
- *
275
- * @public
276
- */
277
- export declare function Grid<E extends GridElementType = typeof DEFAULT_GRID_ELEMENT>(
278
- props: GridProps<E>,
279
- ): JSX.Element
280
-
281
- /** @public */
282
- declare type GridElementType = BoxElementType
283
-
284
- /** @public */
285
- declare type GridOwnProps = Omit<BoxOwnProps, 'display'>
286
-
287
- /** @public */
288
- export declare type GridProps<E extends GridElementType = GridElementType> = Props<GridOwnProps, E>
289
-
290
- /**
291
- * Represent hotkeys (a keyboard combination) with semantic `<kbd>` elements.
292
- *
293
- * @public
294
- */
295
- export declare function Hotkeys<E extends HotkeysElementType = typeof DEFAULT_HOTKEYS_ELEMENT>(
296
- props: HotkeysProps<E>,
297
- ): JSX.Element | undefined
298
-
299
- /** @public */
300
- declare type HotkeysElementType = 'kbd' | ComponentType
301
-
302
- /** @public */
303
- declare interface HotkeysOwnProps extends GapStyleProps, RadiusStyleProps {
304
- fontSize?: ResponsiveProp<FontTextSize>
305
- padding?: ResponsiveProp<Space>
306
- /** @deprecated Use `gap` instead. */
307
- space?: ResponsiveProp<Space>
308
- keys?: string[]
309
- }
310
-
311
- /** @public */
312
- export declare type HotkeysProps<E extends HotkeysElementType = HotkeysElementType> = Props<
313
- HotkeysOwnProps,
314
- E
315
- >
316
-
317
- /**
318
- * @internal
319
- */
320
- export declare function isHTMLAnchorElement(element: unknown): element is HTMLAnchorElement
321
-
322
- /**
323
- * @internal
324
- */
325
- export declare function isHTMLElement(node: unknown): node is HTMLElement
326
-
327
- /** @public */
328
- declare type LayerOwnProps = CardOwnProps & {
329
- /** A callback that fires when the layer becomes the top layer when it was not the top layer before. */
330
- onActivate?: (props: {activeElement: HTMLElement | null}) => void
331
- zOffset?: ResponsiveProp<number>
332
- }
333
-
334
- /** @public */
335
- export declare function LayerProvider(props: LayerProviderProps): ReactElement
336
-
337
- /** @public */
338
- declare interface LayerProviderProps {
339
- children?: ReactNode
340
- zOffset?: ResponsiveProp<number>
341
- }
342
-
343
- /**
344
- * The `Menu` component is a building block for application menus.
345
- *
346
- * @public
347
- */
348
- export declare function Menu<E extends MenuElementType = typeof DEFAULT_MENU_ELEMENT>(
349
- props: MenuProps<E>,
350
- ): JSX.Element
351
-
352
- /** @public */
353
- export declare function MenuDivider<
354
- E extends MenuDividerElementType = typeof DEFAULT_MENU_DIVIDER_ELEMENT,
355
- >(props: MenuDividerProps<E>): JSX.Element
356
-
357
- /** @public */
358
- declare type MenuDividerElementType = 'div' | 'hr' | 'span' | ComponentType
359
-
360
- /** @public */
361
- declare type MenuDividerOwnProps = {}
362
-
363
- /** @public */
364
- declare type MenuDividerProps<E extends MenuDividerElementType = MenuDividerElementType> = Props<
365
- MenuDividerOwnProps,
366
- E
367
- >
368
-
369
- /** @public */
370
- declare type MenuElementType = 'div' | 'span' | ComponentType
371
-
372
- /** @public */
373
- export declare function MenuGroup<
374
- E extends MenuGroupElementType = typeof DEFAULT_MENU_GROUP_ELEMENT,
375
- >(props: MenuGroupProps<E>): JSX.Element
376
-
377
- /** @public */
378
- declare type MenuGroupElementType = 'button' | ComponentType
379
-
380
- /** @public */
381
- declare type MenuGroupOwnProps = RadiusStyleProps & {
382
- disabled?: boolean
383
- fontSize?: ResponsiveProp<FontTextSize>
384
- gap?: ResponsiveProp<Space>
385
- icon?: ElementType_2 | ReactNode
386
- menu?: Omit<
387
- MenuProps<typeof DEFAULT_MENU_ELEMENT>,
388
- | 'onClickOutside'
389
- | 'onEscape'
390
- | 'onItemClick'
391
- | 'onKeyDown'
392
- | 'onMouseEnter'
393
- | 'registerElement'
394
- | 'shouldFocus'
395
- | 'onBlurCapture'
396
- >
397
- padding?: ResponsiveProp<Space>
398
- popover?: Omit<PopoverProps, 'content' | 'open'>
399
- /** @deprecated Use `gap` instead. */
400
- space?: ResponsiveProp<Space>
401
- text?: ReactNode
402
- tone?: ThemeColorStateToneKey
403
- }
404
-
405
- /** @public */
406
- export declare type MenuGroupProps<E extends MenuGroupElementType = MenuGroupElementType> = Props<
407
- MenuGroupOwnProps,
408
- E
409
- >
410
-
411
- /** @public */
412
- export declare function MenuItem<E extends MenuItemElementType = typeof DEFAULT_MENU_ITEM_ELEMENT>(
413
- props: MenuItemProps<E>,
414
- ): JSX.Element
415
-
416
- /** @public */
417
- declare type MenuItemElementType = 'button' | 'a' | ComponentType
418
-
419
- /** @public */
420
- declare type MenuItemOwnProps = GapStyleProps &
421
- PaddingStyleProps &
422
- RadiusStyleProps & {
423
- disabled?: boolean
424
- fontSize?: ResponsiveProp<FontTextSize>
425
- hotkeys?: string[]
426
- icon?: ElementType_2 | ReactNode
427
- iconRight?: ElementType_2 | ReactNode
428
- pressed?: boolean
429
- selected?: boolean
430
- /** @deprecated Use `gap` instead. */
431
- space?: ResponsiveProp<Space>
432
- text?: ReactNode
433
- tone?: ThemeColorStateToneKey
434
- }
435
-
436
- /** @public */
437
- export declare type MenuItemProps<E extends MenuItemElementType = MenuItemElementType> = Omit<
438
- Props<MenuItemOwnProps, E>,
439
- 'role'
440
- >
441
-
442
- /** @public */
443
- declare type MenuOwnProps = PaddingStyleProps & {
444
- /**
445
- * @deprecated Use `shouldFocus="first"` instead.
446
- */
447
- 'focusFirst'?: boolean
448
- /**
449
- * @deprecated Use `shouldFocus="last"` instead.
450
- */
451
- 'focusLast'?: boolean
452
- 'gap'?: ResponsiveProp<Space>
453
- 'onClickOutside'?: (event: MouseEvent) => void
454
- 'onEscape'?: () => void
455
- 'onItemClick'?: () => void
456
- 'onItemSelect'?: (index: number) => void
457
- 'originElement'?: HTMLElement | null
458
- 'registerElement'?: (el: HTMLElement) => () => void
459
- 'shouldFocus'?: 'first' | 'last' | null
460
- /** @deprecated Use `gap` property instead. */
461
- 'space'?: ResponsiveProp<Space>
462
- 'aria-labelledby'?: string
463
- }
464
-
465
- /** @public */
466
- export declare type MenuProps<E extends MenuElementType = MenuElementType> = Props<MenuOwnProps, E>
467
-
468
- /**
469
- * Placement of floating UI elements.
470
- *
471
- * @public
472
- */
473
- declare type Placement =
474
- | 'top'
475
- | 'top-start'
476
- | 'top-end'
477
- | 'right'
478
- | 'right-start'
479
- | 'right-end'
480
- | 'bottom'
481
- | 'bottom-start'
482
- | 'bottom-end'
483
- | 'left'
484
- | 'left-start'
485
- | 'left-end'
486
-
487
- /**
488
- * The `Popover` component is used to display some content on top of another.
489
- *
490
- * @public
491
- */
492
- export declare function Popover<E extends PopoverElementType = typeof DEFAULT_POPOVER_ELEMENT>(
493
- props: PopoverProps<E>,
494
- ): JSX.Element
495
-
496
- /** @public */
497
- declare type PopoverElementType = 'div' | ComponentType
498
-
499
- /**
500
- * @beta
501
- */
502
- export declare type PopoverMargins = [number, number, number, number]
503
-
504
- /** @public */
505
- declare type PopoverOwnProps = Omit<LayerOwnProps, 'maxWidth'> & {
506
- /** @beta */
507
- __unstable_margins?: PopoverMargins
508
- /**
509
- * Whether the popover should animate in and out.
510
- *
511
- * @beta
512
- * @defaultValue false
513
- */
514
- animate?: boolean
515
- arrow?: boolean
516
- /** @deprecated Use `floatingBoundary` and/or `referenceBoundary` instead */
517
- boundaryElement?: HTMLElement | null
518
- children?: ReactElement<{
519
- ref: ForwardedRef<HTMLElement>
520
- }>
521
- /**
522
- * When `true`, prevent overflow within the current boundary:
523
- * - by flipping on its side axis
524
- * - by resizing
525
- *
526
- * Note that:
527
- * - setting `preventOverflow` to `true` also prevents overflow on its side axis
528
- * - setting `matchReferenceWidth` to `true` also causes the popover to resize
529
- *
530
- * @defaultValue false
531
- */
532
- constrainSize?: boolean
533
- content?: ReactNode
534
- disabled?: boolean
535
- fallbackPlacements?: Placement[]
536
- floatingBoundary?: HTMLElement | null
537
- /**
538
- * When `true`, set the maximum width to match the reference element, and also prevent overflow within
539
- * the current boundary by resizing.
540
- *
541
- * Note that setting `constrainSize` to `true` also causes the popover to resize
542
- *
543
- * @defaultValue false
544
- */
545
- matchReferenceWidth?: boolean
546
- /**
547
- * When true, blocks all pointer interaction with elements beneath the popover until closed.
548
- *
549
- * @beta
550
- * @defaultValue false
551
- */
552
- modal?: boolean
553
- open?: boolean
554
- placement?: Placement
555
- /**
556
- * When 'flip' (default), the placement is determined from the initial placement and the
557
- * fallback placements in order. Whichever fits in the viewport first.
558
- *
559
- * When 'autoPlacement', the initial placement and all fallback placements are evaluated
560
- * and the placement with the most viewport space available.
561
- *
562
- * Option is only relevant if either `constrainSize` or `preventOverflow` is `true`
563
- */
564
- placementStrategy?: 'flip' | 'autoPlacement'
565
- /** Whether or not to render the popover in a portal element. */
566
- portal?: boolean | string
567
- preventOverflow?: boolean
568
- referenceBoundary?: HTMLElement | null
569
- /**
570
- * When defined, the popover will be positioned relative to this element.
571
- * The children of the popover won't be rendered.
572
- */
573
- referenceElement?: HTMLElement | null
574
- /** @beta */
575
- updateRef?: Ref<PopoverUpdateCallback | undefined>
576
- width?: ResponsiveProp<MaxWidth>
577
- }
578
-
579
- /** @public */
580
- export declare type PopoverProps<E extends PopoverElementType = PopoverElementType> = Props<
581
- PopoverOwnProps,
582
- E
583
- >
584
-
585
- /** @beta */
586
- declare type PopoverUpdateCallback = () => void
587
-
588
- /** @public */
589
- export declare function Portal(props: PortalProps): ReactPortal | null
590
-
591
- /** @public */
592
- export declare interface PortalProps {
593
- children: ReactNode
594
- /**
595
- * @beta This API might change. DO NOT USE IN PRODUCTION.
596
- */
597
- __unstable_name?: string
598
- }
599
-
600
- /** @public */
601
- export declare function PortalProvider(props: PortalProviderProps): ReactElement
602
-
603
- /** @public */
604
- export declare interface PortalProviderProps {
605
- /**
606
- * @deprecated Use `<BoundaryElementProvider element={...} />` instead
607
- */
608
- boundaryElement?: HTMLElement | null
609
- children: ReactNode
610
- element?: HTMLElement | null
611
- /**
612
- * @beta
613
- */
614
- __unstable_elements?: Record<string, HTMLElement | null | undefined>
615
- }
616
-
617
- /** @public */
618
- declare type Props<P extends EmptyProps, E extends ElementType<P>> = Assign<
619
- E extends TagType ? JSX.IntrinsicElements[E] : ComponentProps<E>,
620
- P & {
621
- as?: E
622
- }
623
- >
624
-
625
- /**
626
- * Indicate that something is loading for an indeterminate amount of time.
627
- *
628
- * @public
629
- */
630
- export declare function Spinner<E extends SpinnerElementType = typeof DEFAULT_SPINNER_ELEMENT>(
631
- props: SpinnerProps<E>,
632
- ): JSX.Element
633
-
634
- /** @public */
635
- declare type SpinnerElementType = 'div' | 'span' | ComponentType
636
-
637
- /** @public */
638
- declare type SpinnerOwnProps = {
639
- muted?: boolean
640
- size?: ResponsiveProp<FontTextSize>
641
- }
642
-
643
- /** @public */
644
- export declare type SpinnerProps<E extends SpinnerElementType = SpinnerElementType> = Props<
645
- SpinnerOwnProps,
646
- E
647
- >
648
-
649
- /**
650
- * The `Stack` component is used to place elements on top of each other.
651
- *
652
- * @public
653
- */
654
- export declare function Stack<E extends StackElementType = typeof DEFAULT_STACK_ELEMENT>(
655
- props: StackProps<E>,
656
- ): JSX.Element
657
-
658
- /** @public */
659
- declare type StackElementType = BoxElementType
660
-
661
- /** @public */
662
- declare type StackOwnProps = Omit<
663
- BoxOwnProps,
664
- | 'align'
665
- | 'alignItems'
666
- | 'columns'
667
- | 'gridTemplateColumns'
668
- | 'direction'
669
- | 'display'
670
- | 'flexDirection'
671
- | 'flexWrap'
672
- | 'gapX'
673
- | 'gapY'
674
- | 'justify'
675
- | 'justifyContent'
676
- | 'rows'
677
- | 'gridTemplateRows'
678
- > & {
679
- /** @deprecated Use `gap` instead. */
680
- space?: ResponsiveProp<Space>
681
- }
682
-
683
- /** @public */
684
- export declare type StackProps<E extends StackElementType = StackElementType> = Props<
685
- StackOwnProps,
686
- E
687
- >
688
-
689
- /** @public */
690
- export declare function Tab<E extends TabElementType = typeof DEFAULT_TAB_ELEMENT>(
691
- props: TabProps<E>,
692
- ): JSX.Element
693
-
694
- /** @public */
695
- declare type TabElementType = 'button' | ComponentType
696
-
697
- /** @public */
698
- export declare function TabList<E extends TabListElementType = typeof DEFAULT_TAB_LIST_ELEMENT>(
699
- props: TabListProps<E>,
700
- ): JSX.Element
701
-
702
- /** @public */
703
- declare type TabListChild = ReactElement<Props<TabProps, 'button'>> | null | undefined | false
704
-
705
- /** @public */
706
- declare type TabListElementType = 'div' | 'span' | ComponentType
707
-
708
- /** @public */
709
- declare type TabListOwnProps = Omit<FlexOwnProps, 'as' | 'height'> & {
710
- children: TabListChild[]
711
- /** @deprecated Use `gap` instead */
712
- space?: ResponsiveProp<Space>
713
- }
714
-
715
- /** @public */
716
- export declare type TabListProps<E extends TabListElementType = TabListElementType> = Props<
717
- TabListOwnProps,
718
- E
719
- >
720
-
721
- /** @public */
722
- declare type TabOwnProps = {
723
- /**
724
- * The `id` of the corresponding `TabPanel` component.
725
- */
726
- 'aria-controls': string
727
- 'id': string
728
- 'icon'?: ElementType_2 | ReactNode
729
- 'focused'?: boolean
730
- 'fontSize'?: ResponsiveProp<FontTextSize>
731
- 'label'?: ReactNode
732
- 'padding'?: ResponsiveProp<Space>
733
- 'selected'?: boolean
734
- 'tone'?: ThemeColorStateToneKey
735
- }
736
-
737
- /** @public */
738
- export declare type TabProps<E extends TabElementType = TabElementType> = Props<TabOwnProps, E>
739
-
740
- /** @public */
741
- declare type TagType = keyof JSX.IntrinsicElements
742
-
743
- /**
744
- * The `Text` component is an agile, themed typographic element.
745
- *
746
- * @public
747
- */
748
- declare function Text_2<E extends TextElementType = typeof DEFAULT_TEXT_ELEMENT>(
749
- props: TextProps<E>,
750
- ): JSX.Element
751
- export {Text_2 as Text}
752
-
753
- /** @public */
754
- declare type TextElementType =
755
- | 'div'
756
- | 'h1'
757
- | 'h2'
758
- | 'h3'
759
- | 'h4'
760
- | 'h5'
761
- | 'h6'
762
- | 'label'
763
- | 'li'
764
- | 'p'
765
- | 'span'
766
- | ComponentType
767
-
768
- /**
769
- * Single line text input.
770
- *
771
- * @public
772
- */
773
- export declare function TextInput<
774
- E extends TextInputElementType = typeof DEFAULT_TEXT_INPUT_ELEMENT,
775
- >(props: TextInputProps<E>): JSX.Element
776
-
777
- /** @public */
778
- declare type TextInputClearButtonProps = Omit<
779
- ButtonProps<'button'>,
780
- 'as' | 'onClick' | 'onMouseDown'
781
- >
782
-
783
- /** @public */
784
- declare type TextInputElementType = 'input' | ComponentType
785
-
786
- /** @public */
787
- declare type TextInputOwnProps = InputStyleProps & {
788
- /**
789
- * @beta
790
- */
791
- __unstable_disableFocusRing?: boolean
792
- /**
793
- * @beta
794
- */
795
- clearButton?: boolean | TextInputClearButtonProps
796
- customValidity?: string
797
- icon?: ElementType_2 | ReactNode
798
- iconRight?: ElementType_2 | ReactNode
799
- /**
800
- * @beta
801
- */
802
- onClear?: () => void
803
- prefix?: ReactNode
804
- /** @deprecated Use `gap` instead. */
805
- space?: ResponsiveProp<Space>
806
- suffix?: ReactNode
807
- weight?: ThemeFontWeightKey
808
- }
809
-
810
- /** @public */
811
- export declare type TextInputProps<E extends TextInputElementType = TextInputElementType> = Props<
812
- TextInputOwnProps,
813
- E
814
- >
815
-
816
- /** @public */
817
- declare type TextOwnProps = TextStyleProps & TextOverflowStyleProps
818
-
819
- /** @public */
820
- export declare type TextProps<E extends TextElementType = TextElementType> = Props<TextOwnProps, E>
821
-
822
- /** @public */
823
- export declare function ThemeProvider(props: ThemeProviderProps): ReactElement
824
-
825
- /** @public */
826
- export declare interface ThemeProviderProps {
827
- children?: ReactNode
828
- scheme?: ThemeColorSchemeKey
829
- theme?: RootTheme
830
- tone?: ThemeColorCardToneKey
831
- }
832
-
833
- /**
834
- * Tooltips display information when hovering, focusing or tapping.
835
- *
836
- * @public
837
- */
838
- export declare function Tooltip<E extends TooltipElementType = typeof DEFAULT_TOOLTIP_ELEMENT>(
839
- props: TooltipProps<E>,
840
- ): JSX.Element
841
-
842
- /** @public */
843
- declare type TooltipElementType = 'div' | 'span' | ComponentType
844
-
845
- /** @public */
846
- declare type TooltipOwnProps = LayerOwnProps &
847
- RadiusStyleProps &
848
- ShadowStyleProps & {
849
- /** @deprecated Use `fallbackPlacements` instead. */
850
- allowedAutoPlacements?: Placement[]
851
- /**
852
- * Whether the tooltip should animate in and out.
853
- *
854
- * @beta
855
- * @defaultValue false
856
- */
857
- animate?: boolean
858
- arrow?: boolean
859
- boundaryElement?: HTMLElement | null
860
- children?: ReactElement<HTMLAttributes<HTMLElement> & RefAttributes<HTMLElement>>
861
- content?: ReactNode
862
- /**
863
- * Adds a delay to open or close the tooltip.
864
- *
865
- * If only a `number` is passed, it will be used for both opening and closing.
866
- *
867
- * If an object `{open: number; close:number}` is passed, it can be used to set different delays for each action.
868
- *
869
- * @public
870
- * @defaultValue 0
871
- */
872
- delay?: Delay
873
- disabled?: boolean
874
- fallbackPlacements?: Placement[]
875
- placement?: Placement
876
- /** Whether or not to render the tooltip in a portal element. */
877
- portal?: boolean | string
878
- scheme?: ThemeColorSchemeKey
879
- tone?: ThemeColorCardToneKey
880
- }
881
-
882
- /** @public */
883
- export declare type TooltipProps<E extends TooltipElementType = TooltipElementType> = Props<
884
- TooltipOwnProps,
885
- E
886
- >
887
-
888
- /**
889
- * Returns true if a dark color scheme is preferred, false if a light color scheme is preferred or the preference is not known.
890
- *
891
- * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-color-scheme: light)` since it's the most common scheme (https://dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
892
- *
893
- * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
894
- * 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
895
- * @example https://gist.github.com/stipsan/13c0cccf8dfc34f4b44bb1b984baf7df
896
- *
897
- * @public
898
- */
899
- export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean
900
-
901
- /** @public */
902
- export declare function useTheme_v2(): Theme_v2
903
-
904
- export {}
1
+ import { Box, BoxProps, Button, ButtonProps, Card, CardProps, Flex, FlexProps, Grid, GridProps, Hotkeys, HotkeysProps, LayerProvider, Menu, MenuDivider, MenuGroup, MenuGroupProps, MenuItem, MenuItemProps, MenuProps, Popover, PopoverMargins, PopoverProps, Portal, PortalProps, PortalProvider, PortalProviderProps, Spinner, SpinnerProps, Stack, StackProps, Tab, TabList, TabListProps, TabProps, Text, TextInput, TextInputProps, TextProps, Tooltip, TooltipProps, isHTMLAnchorElement, isHTMLElement, usePrefersDark } from "./portalProvider-DgNIVviV.js";
2
+ export { Box, BoxProps, Button, ButtonProps, Card, CardProps, Flex, FlexProps, Grid, GridProps, Hotkeys, HotkeysProps, LayerProvider, Menu, MenuDivider, MenuGroup, MenuGroupProps, MenuItem, MenuItemProps, MenuProps, Popover, PopoverMargins, PopoverProps, Portal, PortalProps, PortalProvider, PortalProviderProps, Spinner, SpinnerProps, Stack, StackProps, Tab, TabList, TabListProps, TabProps, Text, TextInput, TextInputProps, TextProps, Tooltip, TooltipProps, isHTMLAnchorElement, isHTMLElement, usePrefersDark };