@bettercms-ai/kit 0.1.0

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 (630) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/dist/_chunks-cjs/_visual-editing.js +5898 -0
  4. package/dist/_chunks-cjs/refractor.js +22 -0
  5. package/dist/_chunks-es/_visual-editing.mjs +5904 -0
  6. package/dist/_chunks-es/refractor.mjs +25 -0
  7. package/dist/_color.d.mts +119 -0
  8. package/dist/_color.d.ts +119 -0
  9. package/dist/_color.js +1412 -0
  10. package/dist/_color.mjs +1411 -0
  11. package/dist/_visual-editing.d.mts +1126 -0
  12. package/dist/_visual-editing.d.ts +1126 -0
  13. package/dist/_visual-editing.js +30 -0
  14. package/dist/_visual-editing.mjs +30 -0
  15. package/dist/index.d.mts +3140 -0
  16. package/dist/index.d.ts +3140 -0
  17. package/dist/index.js +2036 -0
  18. package/dist/index.mjs +2044 -0
  19. package/dist/theme.d.mts +1506 -0
  20. package/dist/theme.d.ts +1506 -0
  21. package/dist/theme.js +4126 -0
  22. package/dist/theme.mjs +4126 -0
  23. package/exports/_visual-editing.ts +31 -0
  24. package/exports/index.ts +1 -0
  25. package/exports/theme.ts +1 -0
  26. package/package.json +78 -0
  27. package/src/color/index.d.mts +119 -0
  28. package/src/color/index.mjs +1411 -0
  29. package/src/core/__workshop__/constants.ts +293 -0
  30. package/src/core/_compat.ts +264 -0
  31. package/src/core/components/autocomplete/__mocks__/apiStore.ts +49 -0
  32. package/src/core/components/autocomplete/__mocks__/countries.ts +245 -0
  33. package/src/core/components/autocomplete/__workshop__/async.tsx +156 -0
  34. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +137 -0
  35. package/src/core/components/autocomplete/__workshop__/custom.tsx +89 -0
  36. package/src/core/components/autocomplete/__workshop__/example.tsx +79 -0
  37. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +36 -0
  38. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +294 -0
  39. package/src/core/components/autocomplete/__workshop__/index.ts +39 -0
  40. package/src/core/components/autocomplete/__workshop__/types.ts +4 -0
  41. package/src/core/components/autocomplete/autocomplete.styles.tsx +39 -0
  42. package/src/core/components/autocomplete/autocomplete.tsx +767 -0
  43. package/src/core/components/autocomplete/autocompleteOption.tsx +45 -0
  44. package/src/core/components/autocomplete/autocompleteReducer.ts +47 -0
  45. package/src/core/components/autocomplete/constants.ts +28 -0
  46. package/src/core/components/autocomplete/index.ts +2 -0
  47. package/src/core/components/autocomplete/types.ts +108 -0
  48. package/src/core/components/breadcrumbs/__workshop__/example.tsx +62 -0
  49. package/src/core/components/breadcrumbs/__workshop__/index.ts +14 -0
  50. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +18 -0
  51. package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +51 -0
  52. package/src/core/components/breadcrumbs/breadcrumbs.tsx +133 -0
  53. package/src/core/components/breadcrumbs/index.ts +1 -0
  54. package/src/core/components/dialog/__workshop__/activate.tsx +134 -0
  55. package/src/core/components/dialog/__workshop__/autoFocus.tsx +29 -0
  56. package/src/core/components/dialog/__workshop__/index.ts +19 -0
  57. package/src/core/components/dialog/__workshop__/layering.tsx +41 -0
  58. package/src/core/components/dialog/__workshop__/nested.tsx +72 -0
  59. package/src/core/components/dialog/__workshop__/onScroll.tsx +39 -0
  60. package/src/core/components/dialog/__workshop__/panes.tsx +82 -0
  61. package/src/core/components/dialog/__workshop__/position.tsx +30 -0
  62. package/src/core/components/dialog/__workshop__/props.tsx +75 -0
  63. package/src/core/components/dialog/__workshop__/provider.tsx +11 -0
  64. package/src/core/components/dialog/__workshop__/wrapped.tsx +76 -0
  65. package/src/core/components/dialog/dialog.tsx +430 -0
  66. package/src/core/components/dialog/dialogContext.ts +20 -0
  67. package/src/core/components/dialog/dialogProvider.tsx +35 -0
  68. package/src/core/components/dialog/index.ts +4 -0
  69. package/src/core/components/dialog/styles.ts +77 -0
  70. package/src/core/components/dialog/useDialog.ts +11 -0
  71. package/src/core/components/hotkeys/__workshop__/index.ts +14 -0
  72. package/src/core/components/hotkeys/__workshop__/plain.tsx +9 -0
  73. package/src/core/components/hotkeys/hotkeys.test.tsx +42 -0
  74. package/src/core/components/hotkeys/hotkeys.tsx +66 -0
  75. package/src/core/components/hotkeys/index.ts +1 -0
  76. package/src/core/components/index.ts +9 -0
  77. package/src/core/components/menu/__workshop__/asComponent.tsx +45 -0
  78. package/src/core/components/menu/__workshop__/avatarMenu.tsx +51 -0
  79. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +46 -0
  80. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +134 -0
  81. package/src/core/components/menu/__workshop__/customMenuItem.tsx +45 -0
  82. package/src/core/components/menu/__workshop__/customSelectedState.tsx +39 -0
  83. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +40 -0
  84. package/src/core/components/menu/__workshop__/groups.tsx +156 -0
  85. package/src/core/components/menu/__workshop__/index.ts +89 -0
  86. package/src/core/components/menu/__workshop__/menuButton.tsx +80 -0
  87. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +58 -0
  88. package/src/core/components/menu/__workshop__/nestedMenu.tsx +22 -0
  89. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +41 -0
  90. package/src/core/components/menu/__workshop__/selectedItem.tsx +69 -0
  91. package/src/core/components/menu/__workshop__/shouldFocus.tsx +47 -0
  92. package/src/core/components/menu/__workshop__/tones.tsx +25 -0
  93. package/src/core/components/menu/__workshop__/withoutArrow.tsx +32 -0
  94. package/src/core/components/menu/helpers.ts +82 -0
  95. package/src/core/components/menu/index.ts +5 -0
  96. package/src/core/components/menu/menu.spacing.test.tsx +63 -0
  97. package/src/core/components/menu/menu.test.tsx +125 -0
  98. package/src/core/components/menu/menu.tsx +178 -0
  99. package/src/core/components/menu/menuButton.tsx +268 -0
  100. package/src/core/components/menu/menuContext.ts +18 -0
  101. package/src/core/components/menu/menuDivider.ts +23 -0
  102. package/src/core/components/menu/menuGroup.spacing.test.tsx +63 -0
  103. package/src/core/components/menu/menuGroup.tsx +233 -0
  104. package/src/core/components/menu/menuItem.spacing.test.tsx +59 -0
  105. package/src/core/components/menu/menuItem.tsx +197 -0
  106. package/src/core/components/menu/useMenu.ts +21 -0
  107. package/src/core/components/menu/useMenuController.ts +231 -0
  108. package/src/core/components/skeleton/__workshop__/delay.tsx +70 -0
  109. package/src/core/components/skeleton/__workshop__/index.ts +11 -0
  110. package/src/core/components/skeleton/__workshop__/skeleton.tsx +64 -0
  111. package/src/core/components/skeleton/index.ts +2 -0
  112. package/src/core/components/skeleton/skeleton.tsx +57 -0
  113. package/src/core/components/skeleton/styles.ts +50 -0
  114. package/src/core/components/skeleton/textSkeleton.tsx +122 -0
  115. package/src/core/components/tab/__workshop__/example.tsx +79 -0
  116. package/src/core/components/tab/__workshop__/index.ts +14 -0
  117. package/src/core/components/tab/index.ts +3 -0
  118. package/src/core/components/tab/tab.tsx +101 -0
  119. package/src/core/components/tab/tabList.test.tsx +48 -0
  120. package/src/core/components/tab/tabList.tsx +70 -0
  121. package/src/core/components/tab/tabPanel.tsx +39 -0
  122. package/src/core/components/toast/__workshop__/hook.tsx +71 -0
  123. package/src/core/components/toast/__workshop__/index.ts +19 -0
  124. package/src/core/components/toast/__workshop__/toast.tsx +26 -0
  125. package/src/core/components/toast/index.ts +4 -0
  126. package/src/core/components/toast/styles.ts +77 -0
  127. package/src/core/components/toast/toast.test.tsx +101 -0
  128. package/src/core/components/toast/toast.tsx +198 -0
  129. package/src/core/components/toast/toastContext.ts +7 -0
  130. package/src/core/components/toast/toastLayer.tsx +51 -0
  131. package/src/core/components/toast/toastProvider.tsx +113 -0
  132. package/src/core/components/toast/toastState.ts +6 -0
  133. package/src/core/components/toast/types.ts +26 -0
  134. package/src/core/components/toast/useToast.ts +25 -0
  135. package/src/core/components/tree/__workshop__/basic.perf.ts +19 -0
  136. package/src/core/components/tree/__workshop__/basic.tsx +105 -0
  137. package/src/core/components/tree/__workshop__/index.ts +21 -0
  138. package/src/core/components/tree/__workshop__/tabFromElement.tsx +84 -0
  139. package/src/core/components/tree/helpers.ts +105 -0
  140. package/src/core/components/tree/index.ts +4 -0
  141. package/src/core/components/tree/style.ts +105 -0
  142. package/src/core/components/tree/tree.test.tsx +55 -0
  143. package/src/core/components/tree/tree.tsx +240 -0
  144. package/src/core/components/tree/treeContext.ts +10 -0
  145. package/src/core/components/tree/treeGroup.tsx +28 -0
  146. package/src/core/components/tree/treeItem.test.tsx +65 -0
  147. package/src/core/components/tree/treeItem.tsx +224 -0
  148. package/src/core/components/tree/types.ts +25 -0
  149. package/src/core/components/tree/useTree.ts +17 -0
  150. package/src/core/constants.ts +79 -0
  151. package/src/core/helpers/animation.ts +27 -0
  152. package/src/core/helpers/element.ts +55 -0
  153. package/src/core/helpers/focus.ts +100 -0
  154. package/src/core/helpers/index.ts +4 -0
  155. package/src/core/helpers/scroll.ts +15 -0
  156. package/src/core/hooks/index.ts +12 -0
  157. package/src/core/hooks/useArrayProp.ts +17 -0
  158. package/src/core/hooks/useClickOutside.test.tsx +482 -0
  159. package/src/core/hooks/useClickOutside.ts +118 -0
  160. package/src/core/hooks/useClickOutsideEvent.test.tsx +115 -0
  161. package/src/core/hooks/useClickOutsideEvent.ts +73 -0
  162. package/src/core/hooks/useCustomValidity.ts +13 -0
  163. package/src/core/hooks/useDelayed.test.ts +88 -0
  164. package/src/core/hooks/useDelayedState.ts +36 -0
  165. package/src/core/hooks/useElementRect/__workshop__/example.tsx +32 -0
  166. package/src/core/hooks/useElementRect/__workshop__/index.ts +14 -0
  167. package/src/core/hooks/useElementRect/index.ts +1 -0
  168. package/src/core/hooks/useElementRect/useElementRect.ts +13 -0
  169. package/src/core/hooks/useElementSize.ts +19 -0
  170. package/src/core/hooks/useForwardedRef.ts +19 -0
  171. package/src/core/hooks/useGlobalKeyDown.ts +24 -0
  172. package/src/core/hooks/useIsomorphicEffect.ts +7 -0
  173. package/src/core/hooks/useMatchMedia.ts +28 -0
  174. package/src/core/hooks/useMediaIndex/__workshop__/index.ts +14 -0
  175. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +14 -0
  176. package/src/core/hooks/useMediaIndex/index.ts +1 -0
  177. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +36 -0
  178. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +102 -0
  179. package/src/core/hooks/useMounted.ts +15 -0
  180. package/src/core/hooks/usePrefersDark.hydration.test.tsx +56 -0
  181. package/src/core/hooks/usePrefersDark.test.tsx +19 -0
  182. package/src/core/hooks/usePrefersDark.ts +16 -0
  183. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +56 -0
  184. package/src/core/hooks/usePrefersReducedMotion.test.tsx +19 -0
  185. package/src/core/hooks/usePrefersReducedMotion.ts +16 -0
  186. package/src/core/index.ts +10 -0
  187. package/src/core/lib/createGlobalScopedContext.ts +36 -0
  188. package/src/core/lib/globalScope.ts +19 -0
  189. package/src/core/lib/isRecord.ts +3 -0
  190. package/src/core/middleware/origin.ts +47 -0
  191. package/src/core/observers/elementSizeObserver.ts +116 -0
  192. package/src/core/observers/index.ts +2 -0
  193. package/src/core/observers/resizeObserver.ts +9 -0
  194. package/src/core/primitives/_selectable/index.ts +1 -0
  195. package/src/core/primitives/_selectable/selectable.tsx +15 -0
  196. package/src/core/primitives/_selectable/style.ts +115 -0
  197. package/src/core/primitives/avatar/__workshop__/asButton.tsx +14 -0
  198. package/src/core/primitives/avatar/__workshop__/index.ts +29 -0
  199. package/src/core/primitives/avatar/__workshop__/stack.tsx +25 -0
  200. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +63 -0
  201. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +70 -0
  202. package/src/core/primitives/avatar/avatar.tsx +200 -0
  203. package/src/core/primitives/avatar/avatarCounter.tsx +91 -0
  204. package/src/core/primitives/avatar/avatarStack.tsx +100 -0
  205. package/src/core/primitives/avatar/index.ts +4 -0
  206. package/src/core/primitives/avatar/styles.ts +167 -0
  207. package/src/core/primitives/avatar/types.ts +17 -0
  208. package/src/core/primitives/badge/__workshop__/index.ts +19 -0
  209. package/src/core/primitives/badge/__workshop__/props.tsx +30 -0
  210. package/src/core/primitives/badge/__workshop__/tones.tsx +21 -0
  211. package/src/core/primitives/badge/badge.test.tsx +16 -0
  212. package/src/core/primitives/badge/badge.tsx +70 -0
  213. package/src/core/primitives/badge/index.ts +1 -0
  214. package/src/core/primitives/badge/styles.ts +20 -0
  215. package/src/core/primitives/badge/types.ts +8 -0
  216. package/src/core/primitives/box/__workshop__/asComponent.tsx +31 -0
  217. package/src/core/primitives/box/__workshop__/index.ts +24 -0
  218. package/src/core/primitives/box/__workshop__/props.tsx +20 -0
  219. package/src/core/primitives/box/__workshop__/responsive.tsx +20 -0
  220. package/src/core/primitives/box/box.test.tsx +142 -0
  221. package/src/core/primitives/box/box.tsx +154 -0
  222. package/src/core/primitives/box/index.ts +1 -0
  223. package/src/core/primitives/button/__workshop__/custom.tsx +51 -0
  224. package/src/core/primitives/button/__workshop__/customIcons.tsx +30 -0
  225. package/src/core/primitives/button/__workshop__/disabled.tsx +74 -0
  226. package/src/core/primitives/button/__workshop__/index.ts +59 -0
  227. package/src/core/primitives/button/__workshop__/labelUploadButton.tsx +36 -0
  228. package/src/core/primitives/button/__workshop__/mixedChildren.tsx +12 -0
  229. package/src/core/primitives/button/__workshop__/props.tsx +55 -0
  230. package/src/core/primitives/button/__workshop__/stacked.tsx +58 -0
  231. package/src/core/primitives/button/__workshop__/styled1.tsx +17 -0
  232. package/src/core/primitives/button/__workshop__/styled2.tsx +19 -0
  233. package/src/core/primitives/button/__workshop__/uploadButton.tsx +28 -0
  234. package/src/core/primitives/button/button.test.tsx +82 -0
  235. package/src/core/primitives/button/button.tsx +210 -0
  236. package/src/core/primitives/button/index.ts +1 -0
  237. package/src/core/primitives/button/styles.ts +117 -0
  238. package/src/core/primitives/card/__workshop__/allTones.tsx +25 -0
  239. package/src/core/primitives/card/__workshop__/asButton.tsx +107 -0
  240. package/src/core/primitives/card/__workshop__/asComponent.tsx +27 -0
  241. package/src/core/primitives/card/__workshop__/checkered.tsx +26 -0
  242. package/src/core/primitives/card/__workshop__/index.ts +18 -0
  243. package/src/core/primitives/card/__workshop__/interactive.tsx +30 -0
  244. package/src/core/primitives/card/__workshop__/listNavigation.tsx +80 -0
  245. package/src/core/primitives/card/__workshop__/props.tsx +53 -0
  246. package/src/core/primitives/card/__workshop__/selected.tsx +94 -0
  247. package/src/core/primitives/card/__workshop__/styled.tsx +14 -0
  248. package/src/core/primitives/card/card.tsx +128 -0
  249. package/src/core/primitives/card/index.ts +2 -0
  250. package/src/core/primitives/card/styles.ts +147 -0
  251. package/src/core/primitives/card/types.ts +11 -0
  252. package/src/core/primitives/checkbox/__workshop__/example.tsx +25 -0
  253. package/src/core/primitives/checkbox/__workshop__/index.ts +13 -0
  254. package/src/core/primitives/checkbox/__workshop__/props.tsx +33 -0
  255. package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +16 -0
  256. package/src/core/primitives/checkbox/__workshop__/tones.tsx +28 -0
  257. package/src/core/primitives/checkbox/checkbox.tsx +73 -0
  258. package/src/core/primitives/checkbox/index.ts +1 -0
  259. package/src/core/primitives/checkbox/styles.ts +128 -0
  260. package/src/core/primitives/code/__workshop__/index.ts +19 -0
  261. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +48 -0
  262. package/src/core/primitives/code/__workshop__/props.tsx +21 -0
  263. package/src/core/primitives/code/code.tsx +55 -0
  264. package/src/core/primitives/code/index.ts +1 -0
  265. package/src/core/primitives/code/refractor.tsx +20 -0
  266. package/src/core/primitives/code/styles.ts +77 -0
  267. package/src/core/primitives/container/__workshop__/example.tsx +20 -0
  268. package/src/core/primitives/container/__workshop__/index.ts +8 -0
  269. package/src/core/primitives/container/container.tsx +54 -0
  270. package/src/core/primitives/container/index.ts +2 -0
  271. package/src/core/primitives/container/styles.ts +23 -0
  272. package/src/core/primitives/container/types.ts +6 -0
  273. package/src/core/primitives/flex/__workshop__/example.tsx +34 -0
  274. package/src/core/primitives/flex/__workshop__/gap.tsx +25 -0
  275. package/src/core/primitives/flex/__workshop__/index.ts +11 -0
  276. package/src/core/primitives/flex/flex.tsx +64 -0
  277. package/src/core/primitives/flex/index.ts +1 -0
  278. package/src/core/primitives/grid/__workshop__/index.ts +10 -0
  279. package/src/core/primitives/grid/__workshop__/responsive.tsx +54 -0
  280. package/src/core/primitives/grid/grid.test.tsx +80 -0
  281. package/src/core/primitives/grid/grid.tsx +74 -0
  282. package/src/core/primitives/grid/index.ts +1 -0
  283. package/src/core/primitives/heading/__workshop__/index.ts +19 -0
  284. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +54 -0
  285. package/src/core/primitives/heading/__workshop__/plain.tsx +32 -0
  286. package/src/core/primitives/heading/heading.tsx +88 -0
  287. package/src/core/primitives/heading/index.ts +1 -0
  288. package/src/core/primitives/heading/styles.ts +64 -0
  289. package/src/core/primitives/heading/types.ts +7 -0
  290. package/src/core/primitives/index.ts +27 -0
  291. package/src/core/primitives/inline/__workshop__/index.ts +8 -0
  292. package/src/core/primitives/inline/__workshop__/plain.tsx +27 -0
  293. package/src/core/primitives/inline/index.ts +1 -0
  294. package/src/core/primitives/inline/inline.test.tsx +51 -0
  295. package/src/core/primitives/inline/inline.tsx +63 -0
  296. package/src/core/primitives/inline/styles.ts +32 -0
  297. package/src/core/primitives/inline/types.ts +6 -0
  298. package/src/core/primitives/kbd/__workshop__/index.ts +8 -0
  299. package/src/core/primitives/kbd/__workshop__/plain.tsx +9 -0
  300. package/src/core/primitives/kbd/index.ts +1 -0
  301. package/src/core/primitives/kbd/kbd.tsx +69 -0
  302. package/src/core/primitives/label/__workshop__/index.ts +19 -0
  303. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +48 -0
  304. package/src/core/primitives/label/__workshop__/plain.tsx +24 -0
  305. package/src/core/primitives/label/index.ts +1 -0
  306. package/src/core/primitives/label/label.tsx +87 -0
  307. package/src/core/primitives/label/styles.ts +45 -0
  308. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +77 -0
  309. package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +31 -0
  310. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +32 -0
  311. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +11 -0
  312. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +71 -0
  313. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +71 -0
  314. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +89 -0
  315. package/src/core/primitives/popover/__workshop__/TestStory.tsx +97 -0
  316. package/src/core/primitives/popover/__workshop__/index.ts +49 -0
  317. package/src/core/primitives/popover/constants.ts +22 -0
  318. package/src/core/primitives/popover/floating-ui/size.ts +99 -0
  319. package/src/core/primitives/popover/helpers.ts +31 -0
  320. package/src/core/primitives/popover/index.ts +2 -0
  321. package/src/core/primitives/popover/popover.tsx +511 -0
  322. package/src/core/primitives/popover/popoverCard.tsx +166 -0
  323. package/src/core/primitives/popover/types.ts +7 -0
  324. package/src/core/primitives/radio/__workshop__/example.tsx +63 -0
  325. package/src/core/primitives/radio/__workshop__/index.ts +11 -0
  326. package/src/core/primitives/radio/__workshop__/plain.tsx +28 -0
  327. package/src/core/primitives/radio/index.ts +1 -0
  328. package/src/core/primitives/radio/radio.tsx +51 -0
  329. package/src/core/primitives/radio/styles.ts +117 -0
  330. package/src/core/primitives/select/__workshop__/index.ts +11 -0
  331. package/src/core/primitives/select/__workshop__/plain.tsx +27 -0
  332. package/src/core/primitives/select/__workshop__/readOnly.tsx +23 -0
  333. package/src/core/primitives/select/index.ts +1 -0
  334. package/src/core/primitives/select/select.test.tsx +52 -0
  335. package/src/core/primitives/select/select.tsx +94 -0
  336. package/src/core/primitives/select/styles.ts +166 -0
  337. package/src/core/primitives/spinner/__workshop__/Props.tsx +15 -0
  338. package/src/core/primitives/spinner/__workshop__/index.ts +14 -0
  339. package/src/core/primitives/spinner/index.ts +1 -0
  340. package/src/core/primitives/spinner/spinner.tsx +46 -0
  341. package/src/core/primitives/stack/__workshop__/index.ts +14 -0
  342. package/src/core/primitives/stack/__workshop__/plain.tsx +32 -0
  343. package/src/core/primitives/stack/index.ts +1 -0
  344. package/src/core/primitives/stack/stack.test.tsx +57 -0
  345. package/src/core/primitives/stack/stack.tsx +57 -0
  346. package/src/core/primitives/stack/styles.ts +32 -0
  347. package/src/core/primitives/switch/__workshop__/example.tsx +23 -0
  348. package/src/core/primitives/switch/__workshop__/index.ts +11 -0
  349. package/src/core/primitives/switch/__workshop__/props.tsx +21 -0
  350. package/src/core/primitives/switch/index.ts +1 -0
  351. package/src/core/primitives/switch/styles.ts +173 -0
  352. package/src/core/primitives/switch/switch.tsx +68 -0
  353. package/src/core/primitives/text/__workshop__/colored.tsx +30 -0
  354. package/src/core/primitives/text/__workshop__/example.tsx +39 -0
  355. package/src/core/primitives/text/__workshop__/index.ts +24 -0
  356. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +48 -0
  357. package/src/core/primitives/text/index.ts +1 -0
  358. package/src/core/primitives/text/styles.ts +74 -0
  359. package/src/core/primitives/text/text.tsx +89 -0
  360. package/src/core/primitives/textArea/__workshop__/index.ts +14 -0
  361. package/src/core/primitives/textArea/__workshop__/plain.tsx +50 -0
  362. package/src/core/primitives/textArea/index.ts +1 -0
  363. package/src/core/primitives/textArea/textArea.tsx +120 -0
  364. package/src/core/primitives/textInput/__workshop__/clearButton.tsx +30 -0
  365. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +17 -0
  366. package/src/core/primitives/textInput/__workshop__/index.ts +44 -0
  367. package/src/core/primitives/textInput/__workshop__/plain.tsx +98 -0
  368. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +9 -0
  369. package/src/core/primitives/textInput/__workshop__/states.tsx +53 -0
  370. package/src/core/primitives/textInput/__workshop__/tones.tsx +277 -0
  371. package/src/core/primitives/textInput/__workshop__/typed.tsx +23 -0
  372. package/src/core/primitives/textInput/index.ts +1 -0
  373. package/src/core/primitives/textInput/textInput.test.tsx +48 -0
  374. package/src/core/primitives/textInput/textInput.tsx +395 -0
  375. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +102 -0
  376. package/src/core/primitives/tooltip/__workshop__/index.ts +29 -0
  377. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +74 -0
  378. package/src/core/primitives/tooltip/__workshop__/props.tsx +107 -0
  379. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +86 -0
  380. package/src/core/primitives/tooltip/constants.ts +23 -0
  381. package/src/core/primitives/tooltip/index.ts +2 -0
  382. package/src/core/primitives/tooltip/tooltip.test.tsx +452 -0
  383. package/src/core/primitives/tooltip/tooltip.tsx +495 -0
  384. package/src/core/primitives/tooltip/tooltipCard.tsx +109 -0
  385. package/src/core/primitives/tooltip/tooltipDelayGroup/index.ts +4 -0
  386. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +11 -0
  387. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +57 -0
  388. package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +10 -0
  389. package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +13 -0
  390. package/src/core/primitives/types.ts +179 -0
  391. package/src/core/styles/border/borderStyle.ts +56 -0
  392. package/src/core/styles/border/index.ts +2 -0
  393. package/src/core/styles/border/types.ts +10 -0
  394. package/src/core/styles/box/boxStyle.ts +69 -0
  395. package/src/core/styles/box/index.ts +2 -0
  396. package/src/core/styles/box/types.ts +11 -0
  397. package/src/core/styles/card/_cardColorStyle.ts +108 -0
  398. package/src/core/styles/card/index.ts +1 -0
  399. package/src/core/styles/flex/flexItemStyle.ts +27 -0
  400. package/src/core/styles/flex/flexStyle.ts +70 -0
  401. package/src/core/styles/flex/index.ts +3 -0
  402. package/src/core/styles/flex/types.ts +25 -0
  403. package/src/core/styles/focusRing/index.ts +25 -0
  404. package/src/core/styles/font/codeFontStyle.ts +13 -0
  405. package/src/core/styles/font/headingFontStyle.ts +13 -0
  406. package/src/core/styles/font/index.ts +6 -0
  407. package/src/core/styles/font/labelFontStyle.ts +13 -0
  408. package/src/core/styles/font/responsiveFont.ts +103 -0
  409. package/src/core/styles/font/textAlignStyle.ts +19 -0
  410. package/src/core/styles/font/textFontStyle.ts +13 -0
  411. package/src/core/styles/font/types.ts +35 -0
  412. package/src/core/styles/grid/gridItemStyle.ts +82 -0
  413. package/src/core/styles/grid/gridStyle.ts +108 -0
  414. package/src/core/styles/grid/index.ts +3 -0
  415. package/src/core/styles/grid/types.ts +37 -0
  416. package/src/core/styles/helpers.ts +72 -0
  417. package/src/core/styles/index.ts +5 -0
  418. package/src/core/styles/input/index.ts +2 -0
  419. package/src/core/styles/input/responsiveInputPaddingStyle.ts +78 -0
  420. package/src/core/styles/input/textInputStyle.ts +263 -0
  421. package/src/core/styles/internal.ts +12 -0
  422. package/src/core/styles/margin/index.ts +2 -0
  423. package/src/core/styles/margin/marginStyle.ts +21 -0
  424. package/src/core/styles/margin/marginsStyle.test.ts +33 -0
  425. package/src/core/styles/margin/types.ts +9 -0
  426. package/src/core/styles/padding/index.ts +2 -0
  427. package/src/core/styles/padding/paddingStyle.test.ts +33 -0
  428. package/src/core/styles/padding/paddingStyle.ts +21 -0
  429. package/src/core/styles/padding/types.ts +12 -0
  430. package/src/core/styles/radius/index.ts +2 -0
  431. package/src/core/styles/radius/radiusStyle.ts +23 -0
  432. package/src/core/styles/radius/types.ts +8 -0
  433. package/src/core/styles/shadow/index.ts +2 -0
  434. package/src/core/styles/shadow/shadowStyle.ts +29 -0
  435. package/src/core/styles/shadow/types.ts +6 -0
  436. package/src/core/styles/types.ts +8 -0
  437. package/src/core/theme/__workshop__/build/Root.tsx +367 -0
  438. package/src/core/theme/__workshop__/build/helpers.ts +46 -0
  439. package/src/core/theme/__workshop__/build/story.tsx +465 -0
  440. package/src/core/theme/__workshop__/canvas.tsx +352 -0
  441. package/src/core/theme/__workshop__/color.tsx +62 -0
  442. package/src/core/theme/__workshop__/debug/story.tsx +408 -0
  443. package/src/core/theme/__workshop__/index.ts +39 -0
  444. package/src/core/theme/__workshop__/layer.tsx +78 -0
  445. package/src/core/theme/__workshop__/nestedProvider.tsx +15 -0
  446. package/src/core/theme/index.ts +5 -0
  447. package/src/core/theme/theme.test.tsx +73 -0
  448. package/src/core/theme/themeColorProvider.tsx +29 -0
  449. package/src/core/theme/themeContext.ts +10 -0
  450. package/src/core/theme/themeProvider.tsx +62 -0
  451. package/src/core/theme/types.ts +12 -0
  452. package/src/core/theme/useRootTheme.ts +17 -0
  453. package/src/core/theme/useTheme.ts +16 -0
  454. package/src/core/types/avatar.ts +14 -0
  455. package/src/core/types/badge.ts +12 -0
  456. package/src/core/types/box.ts +19 -0
  457. package/src/core/types/button.ts +21 -0
  458. package/src/core/types/card.ts +6 -0
  459. package/src/core/types/component.ts +32 -0
  460. package/src/core/types/dialog.ts +4 -0
  461. package/src/core/types/flex.ts +30 -0
  462. package/src/core/types/grid.ts +14 -0
  463. package/src/core/types/gridItem.ts +29 -0
  464. package/src/core/types/index.ts +15 -0
  465. package/src/core/types/placement.ts +18 -0
  466. package/src/core/types/popover.ts +4 -0
  467. package/src/core/types/radius.ts +4 -0
  468. package/src/core/types/selectable.ts +6 -0
  469. package/src/core/types/text.ts +4 -0
  470. package/src/core/utils/arrow/arrow.tsx +123 -0
  471. package/src/core/utils/arrow/cmds.ts +91 -0
  472. package/src/core/utils/arrow/index.ts +1 -0
  473. package/src/core/utils/boundaryElement/__workshop__/index.ts +14 -0
  474. package/src/core/utils/boundaryElement/__workshop__/plain.tsx +19 -0
  475. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +100 -0
  476. package/src/core/utils/boundaryElement/boundaryElementContext.ts +7 -0
  477. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +24 -0
  478. package/src/core/utils/boundaryElement/index.ts +3 -0
  479. package/src/core/utils/boundaryElement/types.ts +7 -0
  480. package/src/core/utils/boundaryElement/useBoundaryElement.ts +26 -0
  481. package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +21 -0
  482. package/src/core/utils/conditionalWrapper/index.ts +1 -0
  483. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +30 -0
  484. package/src/core/utils/elementQuery/__workshop__/index.ts +14 -0
  485. package/src/core/utils/elementQuery/elementQuery.tsx +53 -0
  486. package/src/core/utils/elementQuery/helpers.ts +27 -0
  487. package/src/core/utils/elementQuery/index.ts +1 -0
  488. package/src/core/utils/errorBoundary.tsx +48 -0
  489. package/src/core/utils/getElementRef.ts +26 -0
  490. package/src/core/utils/index.ts +9 -0
  491. package/src/core/utils/layer/__workshop__/_debug.tsx +17 -0
  492. package/src/core/utils/layer/__workshop__/index.ts +24 -0
  493. package/src/core/utils/layer/__workshop__/multipleRoots.tsx +49 -0
  494. package/src/core/utils/layer/__workshop__/nested.tsx +98 -0
  495. package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +13 -0
  496. package/src/core/utils/layer/getLayerContext.test.ts +30 -0
  497. package/src/core/utils/layer/getLayerContext.ts +21 -0
  498. package/src/core/utils/layer/index.ts +4 -0
  499. package/src/core/utils/layer/layer.test.tsx +108 -0
  500. package/src/core/utils/layer/layer.tsx +98 -0
  501. package/src/core/utils/layer/layerContext.ts +7 -0
  502. package/src/core/utils/layer/layerProvider.tsx +111 -0
  503. package/src/core/utils/layer/types.ts +9 -0
  504. package/src/core/utils/layer/useLayer.ts +26 -0
  505. package/src/core/utils/portal/__workshop__/index.ts +14 -0
  506. package/src/core/utils/portal/__workshop__/named.tsx +63 -0
  507. package/src/core/utils/portal/index.ts +4 -0
  508. package/src/core/utils/portal/portal.test.tsx +103 -0
  509. package/src/core/utils/portal/portal.ts +32 -0
  510. package/src/core/utils/portal/portalContext.ts +31 -0
  511. package/src/core/utils/portal/portalProvider.tsx +47 -0
  512. package/src/core/utils/portal/types.ts +9 -0
  513. package/src/core/utils/portal/usePortal.ts +25 -0
  514. package/src/core/utils/spanWithTextOverflow.tsx +10 -0
  515. package/src/core/utils/srOnly/index.ts +1 -0
  516. package/src/core/utils/srOnly/srOnly.tsx +36 -0
  517. package/src/core/utils/virtualList/__workshop__/changingProps.tsx +36 -0
  518. package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +24 -0
  519. package/src/core/utils/virtualList/__workshop__/index.ts +29 -0
  520. package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +48 -0
  521. package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +22 -0
  522. package/src/core/utils/virtualList/index.ts +1 -0
  523. package/src/core/utils/virtualList/virtualList.tsx +200 -0
  524. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +76 -0
  525. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +54 -0
  526. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +22 -0
  527. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +55 -0
  528. package/src/theme/build/_deprecated/color/card/createCardStates.ts +60 -0
  529. package/src/theme/build/_deprecated/color/color.test.ts +63 -0
  530. package/src/theme/build/_deprecated/color/defaults.ts +390 -0
  531. package/src/theme/build/_deprecated/color/factory.ts +142 -0
  532. package/src/theme/build/_deprecated/color/index.ts +1 -0
  533. package/src/theme/build/_deprecated/color/input/createInputModes.ts +81 -0
  534. package/src/theme/build/_deprecated/color/muted/createMuted.ts +54 -0
  535. package/src/theme/build/_deprecated/color/spot/createSpot.ts +20 -0
  536. package/src/theme/build/buildColorTheme.test.ts +183 -0
  537. package/src/theme/build/buildColorTheme.ts +499 -0
  538. package/src/theme/build/buildTheme.test.ts +87 -0
  539. package/src/theme/build/buildTheme.ts +36 -0
  540. package/src/theme/build/colorToken/colorToken.ts +19 -0
  541. package/src/theme/build/colorToken/compileColorToken.ts +21 -0
  542. package/src/theme/build/colorToken/index.ts +2 -0
  543. package/src/theme/build/colorToken/types.ts +6 -0
  544. package/src/theme/build/index.ts +3 -0
  545. package/src/theme/build/lib/color-fns/blend/index.ts +3 -0
  546. package/src/theme/build/lib/color-fns/blend/mix.ts +21 -0
  547. package/src/theme/build/lib/color-fns/blend/multiply.ts +18 -0
  548. package/src/theme/build/lib/color-fns/blend/screen.ts +18 -0
  549. package/src/theme/build/lib/color-fns/color-fns.test.ts +68 -0
  550. package/src/theme/build/lib/color-fns/contrastRatio.ts +31 -0
  551. package/src/theme/build/lib/color-fns/convert.ts +150 -0
  552. package/src/theme/build/lib/color-fns/index.ts +6 -0
  553. package/src/theme/build/lib/color-fns/parse.ts +60 -0
  554. package/src/theme/build/lib/color-fns/rgba.ts +10 -0
  555. package/src/theme/build/lib/color-fns/types.ts +28 -0
  556. package/src/theme/build/lib/isRecord.ts +3 -0
  557. package/src/theme/build/lib/lazy.ts +30 -0
  558. package/src/theme/build/lib/utils.ts +19 -0
  559. package/src/theme/build/merge.ts +26 -0
  560. package/src/theme/build/mixThemeColor.test.ts +21 -0
  561. package/src/theme/build/mixThemeColor.ts +53 -0
  562. package/src/theme/build/renderColorTheme.ts +532 -0
  563. package/src/theme/build/renderColorValue.ts +85 -0
  564. package/src/theme/build/resolveColorTokens.ts +268 -0
  565. package/src/theme/build/theme.test.ts +27 -0
  566. package/src/theme/config/helpers.ts +55 -0
  567. package/src/theme/config/index.ts +4 -0
  568. package/src/theme/config/system.ts +115 -0
  569. package/src/theme/config/tokens/color/index.ts +1 -0
  570. package/src/theme/config/tokens/color/types.ts +133 -0
  571. package/src/theme/config/tokens/index.ts +4 -0
  572. package/src/theme/config/tokens/parseTokenKey.test.ts +64 -0
  573. package/src/theme/config/tokens/parseTokenKey.ts +67 -0
  574. package/src/theme/config/tokens/parseTokenValue.test.ts +42 -0
  575. package/src/theme/config/tokens/parseTokenValue.ts +133 -0
  576. package/src/theme/config/tokens/types.ts +53 -0
  577. package/src/theme/config/types.ts +46 -0
  578. package/src/theme/defaults/colorPalette.ts +5 -0
  579. package/src/theme/defaults/colorTokens.ts +648 -0
  580. package/src/theme/defaults/config.ts +84 -0
  581. package/src/theme/defaults/fonts.ts +227 -0
  582. package/src/theme/getScopedTheme.ts +98 -0
  583. package/src/theme/index.ts +5 -0
  584. package/src/theme/system/avatar.ts +14 -0
  585. package/src/theme/system/color/_constants.ts +45 -0
  586. package/src/theme/system/color/_helpers.ts +24 -0
  587. package/src/theme/system/color/_system.ts +40 -0
  588. package/src/theme/system/color/avatar.ts +15 -0
  589. package/src/theme/system/color/badge.ts +16 -0
  590. package/src/theme/system/color/button.ts +17 -0
  591. package/src/theme/system/color/color.ts +34 -0
  592. package/src/theme/system/color/index.ts +13 -0
  593. package/src/theme/system/color/input.ts +25 -0
  594. package/src/theme/system/color/kbd.ts +8 -0
  595. package/src/theme/system/color/selectable.ts +12 -0
  596. package/src/theme/system/color/shadow.ts +7 -0
  597. package/src/theme/system/color/state.ts +43 -0
  598. package/src/theme/system/color/syntax.ts +41 -0
  599. package/src/theme/system/css.ts +14 -0
  600. package/src/theme/system/focusRing.ts +7 -0
  601. package/src/theme/system/font.ts +52 -0
  602. package/src/theme/system/index.ts +11 -0
  603. package/src/theme/system/input.ts +33 -0
  604. package/src/theme/system/layer.ts +8 -0
  605. package/src/theme/system/shadow.ts +19 -0
  606. package/src/theme/system/styles.ts +13 -0
  607. package/src/theme/system/theme.ts +138 -0
  608. package/src/theme/system/v0/avatar.ts +10 -0
  609. package/src/theme/system/v0/color/_generic.ts +35 -0
  610. package/src/theme/system/v0/color/_system.ts +17 -0
  611. package/src/theme/system/v0/color/base.ts +21 -0
  612. package/src/theme/system/v0/color/button.ts +42 -0
  613. package/src/theme/system/v0/color/card.ts +19 -0
  614. package/src/theme/system/v0/color/color.ts +40 -0
  615. package/src/theme/system/v0/color/index.ts +11 -0
  616. package/src/theme/system/v0/color/input.ts +34 -0
  617. package/src/theme/system/v0/color/muted.ts +26 -0
  618. package/src/theme/system/v0/color/selectable.ts +31 -0
  619. package/src/theme/system/v0/color/solid.ts +26 -0
  620. package/src/theme/system/v0/color/spot.ts +13 -0
  621. package/src/theme/system/v0/index.ts +3 -0
  622. package/src/theme/system/v0/input.ts +23 -0
  623. package/src/theme/versioning/getTheme_v2.ts +57 -0
  624. package/src/theme/versioning/index.ts +5 -0
  625. package/src/theme/versioning/is_v0.ts +6 -0
  626. package/src/theme/versioning/is_v2.ts +6 -0
  627. package/src/theme/versioning/themeColor_v0_v2.ts +243 -0
  628. package/src/theme/versioning/themeColor_v2_v2_9.ts +49 -0
  629. package/src/theme/versioning/v0_v2.ts +94 -0
  630. package/src/theme/versioning/v2_v0.ts +135 -0
@@ -0,0 +1,3140 @@
1
+ import {BaseTheme as BaseTheme_2} from '@bettercms-ai/kit/theme'
2
+ import {Component} from 'react'
3
+ import {Context} from 'react'
4
+ import {createColorTheme as createColorTheme_2} from '@bettercms-ai/kit/theme'
5
+ import {CSSObject} from '@bettercms-ai/kit/theme'
6
+ import {ElementType as ElementType_2} from 'react'
7
+ import {ForwardRefExoticComponent} from 'react'
8
+ import {hexToRgb as hexToRgb_2} from '@bettercms-ai/kit/theme'
9
+ import {HSL as HSL_2} from '@bettercms-ai/kit/theme'
10
+ import {hslToRgb as hslToRgb_2} from '@bettercms-ai/kit/theme'
11
+ import {HTMLProps} from 'react'
12
+ import {multiply as multiply_2} from '@bettercms-ai/kit/theme'
13
+ import {parseColor as parseColor_2} from '@bettercms-ai/kit/theme'
14
+ import {PartialThemeColorBuilderOpts} from '@bettercms-ai/kit/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 '@bettercms-ai/kit/theme'
20
+ import {rgba as rgba_2} from '@bettercms-ai/kit/theme'
21
+ import {rgbToHex as rgbToHex_2} from '@bettercms-ai/kit/theme'
22
+ import {rgbToHsl as rgbToHsl_2} from '@bettercms-ai/kit/theme'
23
+ import {RootTheme as RootTheme_2} from '@bettercms-ai/kit/theme'
24
+ import {screen as screen_3} from '@bettercms-ai/kit/theme'
25
+ import {Theme as Theme_2} from '@bettercms-ai/kit/theme'
26
+ import {Theme_v2} from '@bettercms-ai/kit/theme'
27
+ import {ThemeAvatar} from '@bettercms-ai/kit/theme'
28
+ import {ThemeBoxShadow} from '@bettercms-ai/kit/theme'
29
+ import {ThemeColor} from '@bettercms-ai/kit/theme'
30
+ import {ThemeColorAvatarColorKey} from '@bettercms-ai/kit/theme'
31
+ import {ThemeColorBase} from '@bettercms-ai/kit/theme'
32
+ import {ThemeColorBuilderOpts} from '@bettercms-ai/kit/theme'
33
+ import {ThemeColorButton} from '@bettercms-ai/kit/theme'
34
+ import {ThemeColorButtonModeKey as ThemeColorButtonModeKey_2} from '@bettercms-ai/kit/theme'
35
+ import {ThemeColorButtonState} from '@bettercms-ai/kit/theme'
36
+ import {ThemeColorButtonStates} from '@bettercms-ai/kit/theme'
37
+ import {ThemeColorButtonTones} from '@bettercms-ai/kit/theme'
38
+ import {ThemeColorCard} from '@bettercms-ai/kit/theme'
39
+ import {ThemeColorCardState} from '@bettercms-ai/kit/theme'
40
+ import {ThemeColorCardToneKey} from '@bettercms-ai/kit/theme'
41
+ import {ThemeColorGenericState} from '@bettercms-ai/kit/theme'
42
+ import {ThemeColorInput} from '@bettercms-ai/kit/theme'
43
+ import {ThemeColorInputState} from '@bettercms-ai/kit/theme'
44
+ import {ThemeColorInputStates} from '@bettercms-ai/kit/theme'
45
+ import {ThemeColorMuted} from '@bettercms-ai/kit/theme'
46
+ import {ThemeColorMutedTone} from '@bettercms-ai/kit/theme'
47
+ import {ThemeColorName} from '@bettercms-ai/kit/theme'
48
+ import {ThemeColorScheme} from '@bettercms-ai/kit/theme'
49
+ import {ThemeColorSchemeKey as ThemeColorSchemeKey_2} from '@bettercms-ai/kit/theme'
50
+ import {ThemeColorSchemes} from '@bettercms-ai/kit/theme'
51
+ import {ThemeColorSelectable} from '@bettercms-ai/kit/theme'
52
+ import {ThemeColorSelectableState} from '@bettercms-ai/kit/theme'
53
+ import {ThemeColorSelectableStates} from '@bettercms-ai/kit/theme'
54
+ import {ThemeColorSolid} from '@bettercms-ai/kit/theme'
55
+ import {ThemeColorSolidTone} from '@bettercms-ai/kit/theme'
56
+ import {ThemeColorSpot} from '@bettercms-ai/kit/theme'
57
+ import {ThemeColorSpotKey} from '@bettercms-ai/kit/theme'
58
+ import {ThemeColorStateToneKey} from '@bettercms-ai/kit/theme'
59
+ import {ThemeColorSyntax as ThemeColorSyntax_2} from '@bettercms-ai/kit/theme'
60
+ import {ThemeColorToneKey} from '@bettercms-ai/kit/theme'
61
+ import {ThemeFont as ThemeFont_2} from '@bettercms-ai/kit/theme'
62
+ import {ThemeFontKey as ThemeFontKey_2} from '@bettercms-ai/kit/theme'
63
+ import {ThemeFonts as ThemeFonts_2} from '@bettercms-ai/kit/theme'
64
+ import {ThemeFontSize as ThemeFontSize_2} from '@bettercms-ai/kit/theme'
65
+ import {ThemeFontWeight as ThemeFontWeight_2} from '@bettercms-ai/kit/theme'
66
+ import {ThemeFontWeightKey as ThemeFontWeightKey_2} from '@bettercms-ai/kit/theme'
67
+ import {ThemeInput} from '@bettercms-ai/kit/theme'
68
+ import {ThemeLayer as ThemeLayer_2} from '@bettercms-ai/kit/theme'
69
+ import {ThemeShadow as ThemeShadow_2} from '@bettercms-ai/kit/theme'
70
+ import {ThemeStyles} from '@bettercms-ai/kit/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
+
95
+ /**
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
+ * @public
105
+ */
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'
147
+ }
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
+ /**
164
+ * @public
165
+ */
166
+ export declare type AutocompleteOpenButtonProps = ButtonOwnProps &
167
+ Omit<React.HTMLProps<HTMLButtonElement>, 'as' | 'ref'>
168
+
169
+ /**
170
+ * @public
171
+ */
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'
231
+ }
232
+
233
+ /**
234
+ * @internal
235
+ */
236
+ export declare interface AutocompleteRootEscapeMsg {
237
+ type: 'root/escape'
238
+ }
239
+
240
+ /**
241
+ * @internal
242
+ */
243
+ export declare interface AutocompleteRootOpenMsg {
244
+ type: 'root/open'
245
+ query: string | null
246
+ }
247
+
248
+ /**
249
+ * @internal
250
+ */
251
+ export declare interface AutocompleteRootSetActiveValueMsg {
252
+ type: 'root/setActiveValue'
253
+ value: string
254
+ listFocused?: boolean
255
+ }
256
+
257
+ /**
258
+ * @internal
259
+ */
260
+ export declare interface AutocompleteRootSetListFocusedMsg {
261
+ type: 'root/setListFocused'
262
+ listFocused: boolean
263
+ }
264
+
265
+ /**
266
+ * @internal
267
+ */
268
+ export declare interface AutocompleteState {
269
+ activeValue: string | null
270
+ focused: boolean
271
+ listFocused: boolean
272
+ query: string | null
273
+ value: string | null
274
+ }
275
+
276
+ /**
277
+ * @internal
278
+ */
279
+ export declare interface AutocompleteValueChangeMsg {
280
+ type: 'value/change'
281
+ value: string | null
282
+ }
283
+
284
+ /**
285
+ * Avatars are used to represent people and other agents (e.g. bots).
286
+ *
287
+ * @public
288
+ */
289
+ export declare const Avatar: <E extends ElementType = 'div'>(
290
+ props: AvatarProps<E>,
291
+ ) => React.JSX.Element
292
+
293
+ /**
294
+ * @public
295
+ */
296
+ export declare const AvatarCounter: ForwardRefExoticComponent<
297
+ AvatarCounterProps & RefAttributes<HTMLDivElement>
298
+ >
299
+
300
+ /**
301
+ * @public
302
+ */
303
+ export declare interface AvatarCounterProps {
304
+ count: number
305
+ size?: AvatarSize | AvatarSize[]
306
+ /** @deprecated No longer supported. */
307
+ tone?: 'navbar'
308
+ }
309
+
310
+ /**
311
+ * @public
312
+ */
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
329
+ }
330
+
331
+ /**
332
+ * @public
333
+ */
334
+ export declare type AvatarPosition = 'top' | 'bottom' | 'inside'
335
+
336
+ /**
337
+ * @public
338
+ */
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
346
+ }
347
+
348
+ /**
349
+ * @public
350
+ */
351
+ export declare type AvatarSize = 0 | 1 | 2 | 3
352
+
353
+ /**
354
+ * @public
355
+ */
356
+ export declare const AvatarStack: ForwardRefExoticComponent<
357
+ AvatarStackProps & Omit<HTMLProps<HTMLDivElement>, 'as' | 'ref'> & RefAttributes<HTMLDivElement>
358
+ >
359
+
360
+ /**
361
+ * @public
362
+ */
363
+ export declare interface AvatarStackProps {
364
+ children: React.ReactNode
365
+ maxLength?: number
366
+ size?: AvatarSize | AvatarSize[]
367
+ /** @deprecated No longer supported. */
368
+ tone?: 'navbar'
369
+ }
370
+
371
+ /**
372
+ * @public
373
+ */
374
+ export declare type AvatarStatus = 'online' | 'editing' | 'inactive'
375
+
376
+ /**
377
+ * Badges are used to tag resources.
378
+ *
379
+ * @public
380
+ */
381
+ export declare const Badge: <E extends ElementType = 'div'>(
382
+ props: BadgeProps<E>,
383
+ ) => React.JSX.Element
384
+
385
+ /**
386
+ * @public
387
+ * @deprecated No longer used
388
+ */
389
+ export declare type BadgeMode = 'default' | 'outline'
390
+
391
+ /**
392
+ * @public
393
+ */
394
+ export declare interface BadgeOwnProps extends BoxOwnProps, ResponsiveRadiusProps {
395
+ fontSize?: number | number[]
396
+ /** @deprecated No longer used. */
397
+ mode?: BadgeMode
398
+ tone?: BadgeTone
399
+ }
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
+ /**
412
+ * @public
413
+ */
414
+ export declare interface BaseAutocompleteOption {
415
+ value: string
416
+ }
417
+
418
+ /**
419
+ * @public
420
+ * @deprecated Use `BaseTheme` from `@bettercms-ai/kit/theme` instead.
421
+ */
422
+ export declare type BaseTheme = BaseTheme_2
423
+
424
+ /**
425
+ * @public
426
+ */
427
+ export declare interface BoundaryElementContextValue {
428
+ version: 0.0
429
+ element: HTMLElement | null
430
+ }
431
+
432
+ /**
433
+ * @public
434
+ */
435
+ export declare function BoundaryElementProvider(
436
+ props: BoundaryElementProviderProps,
437
+ ): React.JSX.Element
438
+
439
+ export declare namespace BoundaryElementProvider {
440
+ var displayName: string
441
+ }
442
+
443
+ /**
444
+ * @public
445
+ */
446
+ export declare interface BoundaryElementProviderProps {
447
+ children: React.ReactNode
448
+ element: HTMLElement | null
449
+ }
450
+
451
+ /**
452
+ * The `Box` component is a basic layout wrapper component which provides utility properties
453
+ * for flex, margins and padding.
454
+ *
455
+ * @public
456
+ */
457
+ export declare const Box: <E extends ElementType = 'div'>(props: BoxProps<E>) => React.JSX.Element
458
+
459
+ /**
460
+ * @public
461
+ */
462
+ export declare type BoxDisplay = 'none' | 'block' | 'grid' | 'flex' | 'inline-block'
463
+
464
+ /**
465
+ * @public
466
+ */
467
+ export declare type BoxHeight = 'stretch' | 'fill'
468
+
469
+ /**
470
+ * @public
471
+ */
472
+ export declare type BoxOverflow = 'visible' | 'hidden' | 'auto'
473
+
474
+ /**
475
+ * The props that `Box` adds on top of the element it renders as.
476
+ *
477
+ * @public
478
+ */
479
+ export declare interface BoxOwnProps
480
+ extends ResponsiveFlexItemProps,
481
+ ResponsiveBoxProps,
482
+ ResponsiveGridItemProps,
483
+ ResponsiveMarginProps,
484
+ ResponsivePaddingProps {
485
+ forwardedAs?: ElementType
486
+ }
487
+
488
+ /**
489
+ * @public
490
+ */
491
+ export declare type BoxProps<E extends ElementType = 'div'> = Props<BoxOwnProps, E>
492
+
493
+ /**
494
+ * @public
495
+ * @deprecated Use `ThemeBoxShadow` from `@bettercms-ai/kit/theme` instead.
496
+ */
497
+ export declare type BoxShadow = ThemeBoxShadow
498
+
499
+ /**
500
+ * @public
501
+ */
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
+
513
+ /**
514
+ * @beta
515
+ */
516
+ export declare interface BreadcrumbsProps {
517
+ maxLength?: number
518
+ separator?: React.ReactNode
519
+ gap?: number | number[]
520
+ /**
521
+ * @deprecated Use `gap` instead. `space` will be removed in v4.
522
+ */
523
+ space?: number | number[]
524
+ }
525
+
526
+ /**
527
+ * @public
528
+ */
529
+ export declare const Button: <E extends ElementType = 'button'>(
530
+ props: ButtonProps<E>,
531
+ ) => React.JSX.Element
532
+
533
+ /**
534
+ * @public
535
+ */
536
+ export declare type ButtonMode = ThemeColorButtonModeKey_2
537
+
538
+ /**
539
+ * @public
540
+ */
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
552
+ /**
553
+ * @deprecated Use `gap` instead. `space` will be removed in v4.
554
+ */
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 {
602
+ /**
603
+ * Do not use in production.
604
+ * @beta
605
+ */
606
+ __unstable_checkered?: boolean
607
+ /**
608
+ * Do not use in production.
609
+ * @beta
610
+ */
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
633
+ }
634
+
635
+ /**
636
+ * @public
637
+ */
638
+ export declare type CardTone = ThemeColorCardToneKey | 'inherit'
639
+
640
+ /**
641
+ * Checkboxes allow the user to select one or more items from a set.
642
+ *
643
+ * @public
644
+ */
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
+
673
+ /**
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
685
+ */
686
+ export declare interface CodeOwnProps {
687
+ /** Define the language to use for syntax highlighting. */
688
+ language?: string
689
+ size?: number | number[]
690
+ weight?: string
691
+ }
692
+
693
+ /**
694
+ * @public
695
+ */
696
+ export declare type CodeProps<E extends ElementType = 'pre'> = Props<CodeOwnProps, E>
697
+
698
+ /**
699
+ * This API might change. DO NOT USE IN PRODUCTION.
700
+ * @beta
701
+ */
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
+
710
+ /**
711
+ * This API might change. DO NOT USE IN PRODUCTION.
712
+ * @beta
713
+ */
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
740
+ }
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 `@bettercms-ai/kit/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
+ /**
798
+ * This API might change. DO NOT USE IN PRODUCTION.
799
+ * @beta
800
+ */
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
+
812
+ /**
813
+ * @public
814
+ */
815
+ export declare interface DialogProps extends ResponsivePaddingProps, ResponsiveWidthProps {
816
+ /**
817
+ * @beta
818
+ */
819
+ __unstable_autoFocus?: boolean
820
+ /**
821
+ * @beta
822
+ */
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[]
838
+ /**
839
+ * Whether the dialog should animate in on mount.
840
+ *
841
+ * @beta
842
+ * @defaultValue false
843
+ */
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 `@bettercms-ai/kit/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 `@bettercms-ai/kit/theme` instead.
1194
+ */
1195
+ export declare type HSL = HSL_2
1196
+
1197
+ /**
1198
+ * @public
1199
+ * @deprecated Use `hslToRgb` from `@bettercms-ai/kit/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 `@bettercms-ai/kit/theme` instead.
1583
+ */
1584
+ export declare const multiply: typeof multiply_2
1585
+
1586
+ /**
1587
+ * @public
1588
+ * @deprecated Use `parseColor` from `@bettercms-ai/kit/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 `@bettercms-ai/kit/theme` instead.
2065
+ */
2066
+ export declare type RGB = RGB_2
2067
+
2068
+ /**
2069
+ * @public
2070
+ * @deprecated Use `rgba` from `@bettercms-ai/kit/theme` instead.
2071
+ */
2072
+ export declare const rgba: typeof rgba_2
2073
+
2074
+ /**
2075
+ * @public
2076
+ * @deprecated Use `rgbToHex` from `@bettercms-ai/kit/theme` instead.
2077
+ */
2078
+ export declare const rgbToHex: typeof rgbToHex_2
2079
+
2080
+ /**
2081
+ * @public
2082
+ * @deprecated Use `rgbToHsl` from `@bettercms-ai/kit/theme` instead.
2083
+ */
2084
+ export declare const rgbToHsl: typeof rgbToHsl_2
2085
+
2086
+ /**
2087
+ * @public
2088
+ * @deprecated Use `RootTheme` from `@bettercms-ai/kit/theme` instead.
2089
+ */
2090
+ export declare type RootTheme = RootTheme_2
2091
+
2092
+ /**
2093
+ * @public
2094
+ * @deprecated Use `screen` from `@bettercms-ai/kit/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 `@bettercms-ai/kit/theme` instead.
2210
+ */
2211
+ export declare const studioTheme: BaseTheme_2
2212
+
2213
+ /**
2214
+ * @public
2215
+ * @deprecated Use `ThemeStyles` from `@bettercms-ai/kit/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 {
2339
+ /**
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
2372
+ */
2373
+ __unstable_disableFocusRing?: boolean
2374
+ border?: boolean
2375
+ /**
2376
+ * @beta
2377
+ */
2378
+ clearButton?: boolean | TextInputClearButtonProps
2379
+ customValidity?: string
2380
+ fontSize?: number | number[]
2381
+ icon?: React.ElementType | React.ReactNode
2382
+ iconRight?: React.ElementType | React.ReactNode
2383
+ /**
2384
+ * @beta
2385
+ */
2386
+ onClear?: () => void
2387
+ padding?: number | number[]
2388
+ prefix?: React.ReactNode
2389
+ radius?: Radius | Radius[]
2390
+ /**
2391
+ * @deprecated Use `gap` instead. `space` will be removed in v4.
2392
+ */
2393
+ space?: number | number[]
2394
+ gap?: number | number[]
2395
+ suffix?: React.ReactNode
2396
+ type?: TextInputType
2397
+ weight?: ThemeFontWeightKey_2
2398
+ }
2399
+
2400
+ /**
2401
+ * @public
2402
+ */
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
+
2418
+ /**
2419
+ * @public
2420
+ */
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
2434
+ }
2435
+
2436
+ /**
2437
+ * @public
2438
+ */
2439
+ export declare type TextProps<E extends ElementType = 'div'> = Props<TextOwnProps, E>
2440
+
2441
+ /**
2442
+ * This API might change. DO NOT USE IN PRODUCTION.
2443
+ * @beta
2444
+ */
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
+
2453
+ /**
2454
+ * This API might change. DO NOT USE IN PRODUCTION.
2455
+ * @beta
2456
+ */
2457
+ export declare interface TextSkeletonProps extends SkeletonProps {
2458
+ size?: number | number[]
2459
+ }
2460
+
2461
+ /**
2462
+ * @public
2463
+ * @deprecated Use `Theme` from `@bettercms-ai/kit/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
+ /**
2478
+ * @public
2479
+ * @deprecated Use `ThemeColorButtonModeKey` from `@bettercms-ai/kit/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
2509
+ */
2510
+ export declare function ThemeColorProvider(props: ThemeColorProviderProps): React.JSX.Element
2511
+
2512
+ export declare namespace ThemeColorProvider {
2513
+ var displayName: string
2514
+ }
2515
+
2516
+ /**
2517
+ * @public
2518
+ */
2519
+ export declare interface ThemeColorProviderProps {
2520
+ children?: React.ReactNode
2521
+ scheme?: ThemeColorSchemeKey_2
2522
+ tone?: ThemeColorCardToneKey
2523
+ }
2524
+
2525
+ export {ThemeColorScheme}
2526
+
2527
+ /**
2528
+ * @public
2529
+ * @deprecated Use `ThemeColorSchemeKey` from `@bettercms-ai/kit/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 `@bettercms-ai/kit/theme` instead.
2552
+ */
2553
+ export declare type ThemeColorSyntax = ThemeColorSyntax_2
2554
+
2555
+ export {ThemeColorToneKey}
2556
+
2557
+ /**
2558
+ * @public
2559
+ */
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
2566
+ }
2567
+
2568
+ /**
2569
+ * @public
2570
+ * @deprecated Use `ThemeFont` from `@bettercms-ai/kit/theme` instead.
2571
+ */
2572
+ export declare type ThemeFont = ThemeFont_2
2573
+
2574
+ /**
2575
+ * @public
2576
+ * @deprecated Use `ThemeFontKey` from `@bettercms-ai/kit/theme` instead.
2577
+ */
2578
+ export declare type ThemeFontKey = ThemeFontKey_2
2579
+
2580
+ /**
2581
+ * @public
2582
+ * @deprecated Use `ThemeFonts` from `@bettercms-ai/kit/theme` instead.
2583
+ */
2584
+ export declare type ThemeFonts = ThemeFonts_2
2585
+
2586
+ /**
2587
+ * @public
2588
+ * @deprecated Use `ThemeFontSize` from `@bettercms-ai/kit/theme` instead.
2589
+ */
2590
+ export declare type ThemeFontSize = ThemeFontSize_2
2591
+
2592
+ /**
2593
+ * @public
2594
+ * @deprecated Use `ThemeFontWeight` from `@bettercms-ai/kit/theme` instead.
2595
+ */
2596
+ export declare type ThemeFontWeight = ThemeFontWeight_2
2597
+
2598
+ /**
2599
+ * @public
2600
+ * @deprecated Use `ThemeFontWeightKey` from `@bettercms-ai/kit/theme` instead.
2601
+ */
2602
+ export declare type ThemeFontWeightKey = ThemeFontWeightKey_2
2603
+
2604
+ export {ThemeInput}
2605
+
2606
+ /**
2607
+ * @public
2608
+ * @deprecated Use `ThemeLayer` from `@bettercms-ai/kit/theme` instead.
2609
+ */
2610
+ export declare type ThemeLayer = ThemeLayer_2
2611
+
2612
+ /**
2613
+ * @internal
2614
+ */
2615
+ export declare interface ThemeProps {
2616
+ theme: Theme_2
2617
+ }
2618
+
2619
+ /**
2620
+ * @public
2621
+ */
2622
+ export declare function ThemeProvider(props: ThemeProviderProps): React.JSX.Element
2623
+
2624
+ export declare namespace ThemeProvider {
2625
+ var displayName: string
2626
+ }
2627
+
2628
+ /**
2629
+ * @public
2630
+ */
2631
+ export declare interface ThemeProviderProps {
2632
+ children?: React.ReactNode
2633
+ scheme?: ThemeColorSchemeKey_2
2634
+ theme?: RootTheme_2
2635
+ tone?: ThemeColorCardToneKey
2636
+ }
2637
+
2638
+ /**
2639
+ * @public
2640
+ * @deprecated Use `ThemeShadow` from `@bettercms-ai/kit/theme` instead.
2641
+ */
2642
+ export declare type ThemeShadow = ThemeShadow_2
2643
+
2644
+ /**
2645
+ * The `Toast` component gives feedback to users when an action has taken place.
2646
+ *
2647
+ * Toasts can be closed with a close button, or auto-dismiss after a certain timeout.
2648
+ *
2649
+ * @public
2650
+ */
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
2682
+ }
2683
+
2684
+ /**
2685
+ * @public
2686
+ */
2687
+ declare interface ToastLayerProps {
2688
+ children: React.ReactNode
2689
+ padding?: number | number[]
2690
+ paddingX?: number | number[]
2691
+ paddingY?: number | number[]
2692
+ gap?: number | number[]
2693
+ }
2694
+
2695
+ /**
2696
+ * @public
2697
+ */
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'
2706
+ }
2707
+
2708
+ /**
2709
+ * @public
2710
+ */
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
2720
+ }
2721
+
2722
+ /**
2723
+ * @public
2724
+ */
2725
+ export declare function ToastProvider(props: ToastProviderProps): React.JSX.Element
2726
+
2727
+ export declare namespace ToastProvider {
2728
+ var displayName: string
2729
+ }
2730
+
2731
+ /**
2732
+ * @public
2733
+ */
2734
+ export declare interface ToastProviderProps extends Omit<ToastLayerProps, 'children'> {
2735
+ children?: React.ReactNode
2736
+ zOffset?: number | number[]
2737
+ }
2738
+
2739
+ /**
2740
+ * Tooltips display information when hovering, focusing or tapping.
2741
+ *
2742
+ * @public
2743
+ */
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
+
2754
+ /**
2755
+ * @beta
2756
+ */
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
2825
+ /**
2826
+ * Whether the tooltip should animate in and out.
2827
+ *
2828
+ * @beta
2829
+ * @defaultValue false
2830
+ */
2831
+ animate?: boolean
2832
+ }
2833
+
2834
+ /**
2835
+ * This API might change. DO NOT USE IN PRODUCTION.
2836
+ * @beta
2837
+ */
2838
+ export declare const Tree: ForwardRefExoticComponent<
2839
+ TreeProps &
2840
+ Omit<HTMLProps<HTMLUListElement>, 'wrap' | 'height' | 'as' | 'ref' | 'align' | 'role'> &
2841
+ RefAttributes<HTMLUListElement>
2842
+ >
2843
+
2844
+ /**
2845
+ * @beta
2846
+ */
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[]
2856
+ /**
2857
+ * @deprecated Use `gap` instead. `space` will be removed in v4.
2858
+ */
2859
+ space: number | number[]
2860
+ state: TreeState
2861
+ }
2862
+
2863
+ /**
2864
+ * This API might change. DO NOT USE IN PRODUCTION.
2865
+ * @beta
2866
+ */
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
2873
+ }
2874
+
2875
+ /**
2876
+ * @beta
2877
+ */
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
2894
+ }
2895
+
2896
+ /**
2897
+ * This API might change. DO NOT USE IN PRODUCTION.
2898
+ * @beta
2899
+ */
2900
+ export declare interface TreeProps {
2901
+ gap?: number | number[]
2902
+ /**
2903
+ * @deprecated Use `gap` instead. `space` will be removed in v4.
2904
+ */
2905
+ space?: number | number[]
2906
+ }
2907
+
2908
+ /**
2909
+ * @beta
2910
+ */
2911
+ export declare interface TreeState {
2912
+ [key: string]:
2913
+ | {
2914
+ element: HTMLElement
2915
+ expanded: boolean
2916
+ }
2917
+ | undefined
2918
+ }
2919
+
2920
+ /**
2921
+ * @deprecated instead of `useArrayProp(width)` use `Array.isArray(width) ? width : [width]` instead
2922
+ * @beta
2923
+ */
2924
+ export declare function useArrayProp<T extends ArrayPropPrimitive = ArrayPropPrimitive>(
2925
+ val: T | T[] | undefined,
2926
+ defaultVal?: T[],
2927
+ ): T[]
2928
+
2929
+ /**
2930
+ * @public
2931
+ */
2932
+ export declare function useBoundaryElement(): BoundaryElementContextValue
2933
+
2934
+ /**
2935
+ * @public
2936
+ * @deprecated replaced by the new `useClickOutsideEvent` hook, instead of:
2937
+ * ```tsx
2938
+ * const [button, setButtonElement] = useState(null)
2939
+ * useClickOutside((event) => {}, [button])
2940
+ * return <button ref={setButtonElement} />
2941
+ * ```
2942
+ * do:
2943
+ * ```tsx
2944
+ * const buttonRef = useRef()
2945
+ * useClickOutsideEvent((event) => {}, () => [buttonRef.current])
2946
+ * return <button ref={buttonRef} />
2947
+ * ```
2948
+ */
2949
+ export declare function useClickOutside(
2950
+ listener: ClickOutsideListener,
2951
+ elementsArg?: ClickOutsideElements,
2952
+ boundaryElement?: HTMLElement | null,
2953
+ ): (el: HTMLElement | null) => void
2954
+
2955
+ /**
2956
+ * @public
2957
+ */
2958
+ export declare function useClickOutsideEvent(
2959
+ listener: ClickOutsideEventListener | false | undefined,
2960
+ elementsArg?: () => ClickOutsideEventElements,
2961
+ boundaryElement?: () => HTMLElement | null,
2962
+ ): void
2963
+
2964
+ /**
2965
+ * @beta
2966
+ */
2967
+ export declare function useCustomValidity(
2968
+ ref: {
2969
+ current: null | {
2970
+ setCustomValidity: (validity: string) => void
2971
+ }
2972
+ },
2973
+ customValidity: string | undefined,
2974
+ ): void
2975
+
2976
+ /**
2977
+ * This API might change. DO NOT USE IN PRODUCTION.
2978
+ * @beta
2979
+ */
2980
+ export declare function useDialog(): DialogContextValue
2981
+
2982
+ /**
2983
+ * Subscribe to the rect of a DOM element.
2984
+ * @beta
2985
+ *
2986
+ * @deprecated Use `useElementSize` instead
2987
+ */
2988
+ export declare function useElementRect(element: HTMLElement | null): DOMRectReadOnly | null
2989
+
2990
+ /**
2991
+ * Subscribe to the size of a DOM element.
2992
+ * @beta
2993
+ */
2994
+ export declare function useElementSize(element: HTMLElement | null): ElementSize | null
2995
+
2996
+ /**
2997
+ * @beta
2998
+ * @deprecated use `useImperativeHandle` instead
2999
+ * @example
3000
+ * ```diff
3001
+ * -const ref = useForwardedRef(forwardedRef)
3002
+ * +const ref = useRef(null)
3003
+ * +useImperativeHandle(forwardedRef, () => ref.current)
3004
+ * ```
3005
+ */
3006
+ export declare function useForwardedRef<T>(
3007
+ ref: React.ForwardedRef<T>,
3008
+ ): React.MutableRefObject<T | null>
3009
+
3010
+ /**
3011
+ * Adds global keydown event listener to the window.
3012
+ *
3013
+ * @param onKeyDown - The function to call when a keydown event is triggered.
3014
+ * @param options - The options to pass to the addEventListener function (example, capture: true)
3015
+ * @beta
3016
+ */
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
+
3027
+ /**
3028
+ * Efficiently subscribes to `window.matchMedia` queries
3029
+ *
3030
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Required if the hook is called during SSR (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
3031
+ *
3032
+ * @public
3033
+ */
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
+
3045
+ /**
3046
+ * @public
3047
+ */
3048
+ export declare function usePortal(): PortalContextValue
3049
+
3050
+ /**
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
3060
+ */
3061
+ export declare function usePrefersDark(getServerSnapshot?: () => boolean): boolean
3062
+
3063
+ /**
3064
+ * Returns true if motion should be reduced
3065
+ *
3066
+ * @param getServerSnapshot - Only called during server-side rendering, and hydration if using hydrateRoot. Since the server environment doesn't have access to the DOM, we can't determine the current value of the media query and we assume `(prefers-reduced-motion: no-preference)` since it's the most common scheme (https://react.dev/reference/react/useSyncExternalStore#adding-support-for-server-rendering)
3067
+ *
3068
+ * If you persist the detected preference in a cookie or a header then you may implement your own server snapshot to read it.
3069
+ * Chrome supports reading the `prefers-reduced-motion` media query from a header if the server response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Sec-CH-Prefers-Reduced-Motion
3070
+ * @example https://gist.github.com/stipsan/0c0f839a27842249cada893e9fb7767b
3071
+ *
3072
+ * @public
3073
+ */
3074
+ export declare function usePrefersReducedMotion(getServerSnapshot?: () => boolean): boolean
3075
+
3076
+ /**
3077
+ * @public
3078
+ */
3079
+ export declare function useRootTheme(): ThemeContextValue
3080
+
3081
+ /**
3082
+ * @public
3083
+ */
3084
+ export declare function useTheme(): Theme_2
3085
+
3086
+ /**
3087
+ * @public
3088
+ */
3089
+ export declare function useTheme_v2(): Theme_v2
3090
+
3091
+ /**
3092
+ * @public
3093
+ */
3094
+ export declare function useToast(): ToastContextValue
3095
+
3096
+ /**
3097
+ * @beta
3098
+ */
3099
+ export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue | null
3100
+
3101
+ /**
3102
+ * @beta
3103
+ */
3104
+ export declare function useTree(): TreeContextValue
3105
+
3106
+ /**
3107
+ * @beta
3108
+ */
3109
+ export declare const VirtualList: ForwardRefExoticComponent<
3110
+ VirtualListProps<any> &
3111
+ StackOwnProps &
3112
+ Omit<HTMLProps<HTMLDivElement>, 'as' | 'children' | 'ref' | 'onChange'> &
3113
+ RefAttributes<HTMLDivElement>
3114
+ >
3115
+
3116
+ /**
3117
+ * @beta
3118
+ */
3119
+ export declare interface VirtualListChangeOpts {
3120
+ fromIndex: number
3121
+ gap: number
3122
+ itemHeight: number
3123
+ scrollHeight: number
3124
+ scrollTop: number
3125
+ toIndex: number
3126
+ }
3127
+
3128
+ /**
3129
+ * @beta
3130
+ */
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
3138
+ }
3139
+
3140
+ export {}