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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1353) hide show
  1. package/README.md +7 -9
  2. package/dist/_chunks-cjs/_visual-editing.cjs +2358 -0
  3. package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -0
  4. package/dist/_chunks-cjs/refractor.cjs +26 -0
  5. package/dist/_chunks-cjs/refractor.cjs.map +1 -0
  6. package/dist/_chunks-es/_visual-editing.js +2371 -0
  7. package/dist/_chunks-es/_visual-editing.js.map +1 -0
  8. package/dist/_chunks-es/refractor.js +25 -0
  9. package/dist/_chunks-es/refractor.js.map +1 -0
  10. package/dist/_visual-editing.cjs +30 -0
  11. package/dist/_visual-editing.cjs.map +1 -0
  12. package/dist/_visual-editing.d.cts +894 -0
  13. package/dist/_visual-editing.d.ts +504 -418
  14. package/dist/_visual-editing.js +29 -30
  15. package/dist/_visual-editing.js.map +1 -1
  16. package/dist/css/index.cjs +617 -0
  17. package/dist/css/index.cjs.map +1 -0
  18. package/dist/css/index.css +1 -0
  19. package/dist/css/index.d.cts +14902 -0
  20. package/dist/css/index.d.ts +14902 -0
  21. package/dist/css/index.js +617 -0
  22. package/dist/css/index.js.map +1 -0
  23. package/dist/css/layers.css +4 -0
  24. package/dist/css/primitives/popover/popover.css +4 -0
  25. package/dist/index.cjs +2470 -0
  26. package/dist/index.cjs.map +1 -0
  27. package/dist/index.d.cts +3212 -0
  28. package/dist/index.d.ts +1325 -982
  29. package/dist/index.js +1614 -692
  30. package/dist/index.js.map +1 -1
  31. package/dist/theme.cjs +4791 -0
  32. package/dist/theme.cjs.map +1 -0
  33. package/dist/theme.d.cts +1903 -0
  34. package/dist/theme.d.ts +329 -309
  35. package/dist/theme.js +3188 -1384
  36. package/dist/theme.js.map +1 -1
  37. package/exports/_visual-editing.ts +26 -27
  38. package/exports/index.ts +1 -1
  39. package/package.json +67 -79
  40. package/src/core/_compat/helpers.ts +72 -0
  41. package/src/core/_compat/styles/_responsive.ts +19 -0
  42. package/src/core/_compat/theme/theme.test.tsx +72 -0
  43. package/src/core/_compat/theme/themeColorProvider.tsx +24 -0
  44. package/src/core/_compat/theme/themeContext.ts +10 -0
  45. package/src/core/_compat/theme/themeProvider.tsx +68 -0
  46. package/src/core/_compat/theme/types.ts +10 -0
  47. package/src/core/_compat/theme/useRootTheme.ts +15 -0
  48. package/src/core/_compat/theme/useTheme.ts +12 -0
  49. package/src/core/_compat/types.ts +191 -0
  50. package/src/core/components/autocomplete/__workshop__/async.tsx +156 -0
  51. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +131 -0
  52. package/src/core/components/autocomplete/__workshop__/custom.tsx +91 -0
  53. package/src/core/components/autocomplete/__workshop__/example.tsx +80 -0
  54. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +36 -0
  55. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +292 -0
  56. package/src/core/components/autocomplete/__workshop__/index.ts +39 -0
  57. package/src/core/components/autocomplete/autocomplete.tsx +690 -0
  58. package/src/core/components/autocomplete/autocompleteOption.tsx +45 -0
  59. package/src/core/components/autocomplete/autocompleteReducer.ts +47 -0
  60. package/src/core/components/autocomplete/constants.ts +28 -0
  61. package/src/core/components/autocomplete/types.ts +103 -0
  62. package/src/core/components/breadcrumbs/__workshop__/example.tsx +61 -0
  63. package/src/core/components/breadcrumbs/breadcrumbs.tsx +136 -0
  64. package/src/core/components/dialog/__workshop__/activate.tsx +141 -0
  65. package/src/core/components/dialog/__workshop__/autoFocus.tsx +29 -0
  66. package/src/core/components/dialog/__workshop__/onScroll.tsx +51 -0
  67. package/src/core/components/dialog/__workshop__/panes.tsx +89 -0
  68. package/src/core/components/dialog/__workshop__/position.tsx +30 -0
  69. package/src/core/components/dialog/__workshop__/props.tsx +77 -0
  70. package/src/core/components/dialog/__workshop__/wrapped.tsx +76 -0
  71. package/src/core/components/dialog/dialog.tsx +233 -0
  72. package/src/core/components/dialog/dialogCard.tsx +226 -0
  73. package/src/core/components/dialog/dialogContext.ts +22 -0
  74. package/src/core/components/dialog/dialogProvider.tsx +34 -0
  75. package/src/core/components/dialog/isTargetWithinScope.ts +14 -0
  76. package/src/core/components/dialog/types.ts +2 -0
  77. package/src/core/components/dialog/useDialog.ts +11 -0
  78. package/src/core/components/hotkeys/hotkeys.tsx +71 -0
  79. package/src/core/components/menu/__workshop__/asComponent.tsx +45 -0
  80. package/src/core/components/menu/__workshop__/avatarMenu.tsx +57 -0
  81. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +47 -0
  82. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +133 -0
  83. package/src/core/components/menu/__workshop__/customMenuItem.tsx +45 -0
  84. package/src/core/components/menu/__workshop__/customSelectedState.tsx +35 -0
  85. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +40 -0
  86. package/src/core/components/menu/__workshop__/groups.tsx +156 -0
  87. package/src/core/components/menu/__workshop__/menuButton.tsx +80 -0
  88. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +65 -0
  89. package/src/core/components/menu/__workshop__/nestedMenu.tsx +22 -0
  90. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +50 -0
  91. package/src/core/components/menu/__workshop__/selectedItem.tsx +69 -0
  92. package/src/core/components/menu/__workshop__/shouldFocus.tsx +42 -0
  93. package/src/core/components/menu/__workshop__/tones.tsx +25 -0
  94. package/src/core/components/menu/__workshop__/withoutArrow.tsx +32 -0
  95. package/src/core/components/menu/helpers.ts +82 -0
  96. package/src/core/components/menu/menu.test.tsx +127 -0
  97. package/src/core/components/menu/menu.tsx +194 -0
  98. package/src/core/components/menu/menuButton.tsx +271 -0
  99. package/src/core/components/menu/menuContext.ts +31 -0
  100. package/src/core/components/menu/menuDivider.tsx +32 -0
  101. package/src/core/components/menu/menuGroup.tsx +238 -0
  102. package/src/core/components/menu/menuItem.tsx +194 -0
  103. package/src/core/components/menu/useMenu.ts +21 -0
  104. package/src/core/components/menu/useMenuController.ts +241 -0
  105. package/src/core/components/tab/__workshop__/example.tsx +79 -0
  106. package/src/core/components/tab/tab.tsx +107 -0
  107. package/src/core/components/tab/tabList.tsx +95 -0
  108. package/src/core/components/tab/tabPanel.tsx +47 -0
  109. package/src/core/components/toast/__workshop__/hook.tsx +71 -0
  110. package/src/core/components/toast/__workshop__/toast.tsx +26 -0
  111. package/src/core/components/toast/toast.test.tsx +101 -0
  112. package/src/core/components/toast/toast.tsx +189 -0
  113. package/src/core/components/toast/toastContext.ts +7 -0
  114. package/src/core/components/toast/toastLayer.tsx +54 -0
  115. package/src/core/components/toast/toastProvider.tsx +112 -0
  116. package/src/core/components/toast/types.ts +24 -0
  117. package/src/core/components/toast/useToast.ts +23 -0
  118. package/src/core/components/tree/__workshop__/basic.perf.ts +19 -0
  119. package/src/core/components/tree/__workshop__/basic.tsx +105 -0
  120. package/src/core/components/tree/__workshop__/tabFromElement.tsx +84 -0
  121. package/src/core/components/tree/helpers.ts +105 -0
  122. package/src/core/components/tree/tree.tsx +249 -0
  123. package/src/core/components/tree/treeContext.ts +10 -0
  124. package/src/core/components/tree/treeGroup.tsx +48 -0
  125. package/src/core/components/tree/treeItem.tsx +237 -0
  126. package/src/core/components/tree/types.ts +24 -0
  127. package/src/core/components/tree/useTree.ts +17 -0
  128. package/src/core/components/virtualList/__workshop__/index.ts +29 -0
  129. package/src/core/components/virtualList/__workshop__/infiniteList.tsx +48 -0
  130. package/src/core/components/virtualList/virtualList.tsx +209 -0
  131. package/src/core/constants.ts +85 -0
  132. package/src/core/helpers/focus.ts +92 -0
  133. package/src/core/helpers/props.ts +28 -0
  134. package/src/core/hooks/useArrayProp.ts +26 -0
  135. package/src/core/hooks/useClickOutside.test.tsx +481 -0
  136. package/src/core/hooks/useClickOutside.ts +113 -0
  137. package/src/core/hooks/useClickOutsideEvent.test.tsx +114 -0
  138. package/src/core/hooks/useClickOutsideEvent.ts +67 -0
  139. package/src/core/hooks/useDelayed.test.ts +67 -0
  140. package/src/core/hooks/useDelayedState.ts +28 -0
  141. package/src/core/hooks/useElementRect/__workshop__/example.tsx +30 -0
  142. package/src/core/hooks/useElementSize.ts +19 -0
  143. package/src/core/hooks/useForwardedRef.ts +19 -0
  144. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +14 -0
  145. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +21 -0
  146. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +102 -0
  147. package/src/core/hooks/usePrefersDark.hydration.test.tsx +56 -0
  148. package/src/core/hooks/usePrefersDark.test.tsx +20 -0
  149. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +56 -0
  150. package/src/core/hooks/usePrefersReducedMotion.test.tsx +20 -0
  151. package/src/core/hooks/useResponsiveProp.ts +28 -0
  152. package/src/core/index.ts +136 -0
  153. package/src/core/lib/isArray.ts +3 -0
  154. package/src/core/middleware/origin.ts +47 -0
  155. package/src/core/observers/elementSize.ts +116 -0
  156. package/src/core/primitives/arrow/arrow.tsx +74 -0
  157. package/src/core/primitives/avatar/__workshop__/asButton.tsx +14 -0
  158. package/src/core/primitives/avatar/__workshop__/stack.tsx +25 -0
  159. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +55 -0
  160. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +72 -0
  161. package/src/core/primitives/avatar/avatar.tsx +154 -0
  162. package/src/core/primitives/avatar/avatarCounter.tsx +69 -0
  163. package/src/core/primitives/avatar/avatarStack.tsx +81 -0
  164. package/src/core/primitives/avatar/types.ts +34 -0
  165. package/src/core/primitives/badge/__workshop__/props.tsx +19 -0
  166. package/src/core/primitives/badge/__workshop__/tones.tsx +16 -0
  167. package/src/core/primitives/badge/badge.test.tsx +15 -0
  168. package/src/core/primitives/badge/badge.tsx +60 -0
  169. package/src/core/primitives/badge/types.ts +18 -0
  170. package/src/core/primitives/box/__workshop__/props.tsx +20 -0
  171. package/src/core/primitives/box/__workshop__/responsive.tsx +20 -0
  172. package/src/core/primitives/box/box.tsx +219 -0
  173. package/src/core/primitives/button/__workshop__/custom.tsx +27 -0
  174. package/src/core/primitives/button/__workshop__/customIcons.tsx +30 -0
  175. package/src/core/primitives/button/__workshop__/disabled.tsx +54 -0
  176. package/src/core/primitives/button/__workshop__/index.ts +64 -0
  177. package/src/core/primitives/button/__workshop__/props.tsx +55 -0
  178. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +36 -0
  179. package/src/core/primitives/button/__workshop__/stacked.tsx +58 -0
  180. package/src/core/primitives/button/__workshop__/textOverflow.tsx +13 -0
  181. package/src/core/primitives/button/__workshop__/uploadButton.tsx +29 -0
  182. package/src/core/primitives/button/button.test.tsx +29 -0
  183. package/src/core/primitives/button/button.tsx +196 -0
  184. package/src/core/primitives/button/types.ts +22 -0
  185. package/src/core/primitives/card/__workshop__/asButton.tsx +107 -0
  186. package/src/core/primitives/card/__workshop__/asComponent.tsx +27 -0
  187. package/src/core/primitives/card/__workshop__/checkered.tsx +26 -0
  188. package/src/core/primitives/card/__workshop__/index.ts +18 -0
  189. package/src/core/primitives/card/__workshop__/interactive.tsx +29 -0
  190. package/src/core/primitives/card/__workshop__/listNavigation.tsx +78 -0
  191. package/src/core/primitives/card/__workshop__/props.tsx +52 -0
  192. package/src/core/primitives/card/__workshop__/selected.tsx +62 -0
  193. package/src/core/primitives/card/__workshop__/tones.tsx +27 -0
  194. package/src/core/primitives/card/card.tsx +106 -0
  195. package/src/core/primitives/card/cardContext.ts +10 -0
  196. package/src/core/primitives/card/cardProvider.tsx +27 -0
  197. package/src/core/primitives/card/types.ts +31 -0
  198. package/src/core/primitives/card/useCard.ts +9 -0
  199. package/src/core/primitives/checkbox/__workshop__/props.tsx +35 -0
  200. package/src/core/primitives/checkbox/__workshop__/tones.tsx +27 -0
  201. package/src/core/primitives/checkbox/checkbox.tsx +80 -0
  202. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +23 -0
  203. package/src/core/primitives/code/__workshop__/props.tsx +18 -0
  204. package/src/core/primitives/code/code.tsx +46 -0
  205. package/src/core/primitives/code/refractor.tsx +18 -0
  206. package/src/core/primitives/container/__workshop__/example.tsx +20 -0
  207. package/src/core/primitives/container/container.tsx +37 -0
  208. package/src/core/primitives/flex/__workshop__/example.tsx +34 -0
  209. package/src/core/primitives/flex/flex.tsx +56 -0
  210. package/src/core/primitives/flex/types.ts +27 -0
  211. package/src/core/primitives/grid/grid.tsx +33 -0
  212. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +54 -0
  213. package/src/core/primitives/heading/__workshop__/plain.tsx +29 -0
  214. package/src/core/primitives/heading/heading.tsx +80 -0
  215. package/src/core/primitives/inline/__workshop__/plain.tsx +24 -0
  216. package/src/core/primitives/inline/inline.tsx +69 -0
  217. package/src/core/primitives/kbd/kbd.tsx +55 -0
  218. package/src/core/primitives/label/__workshop__/plain.tsx +28 -0
  219. package/src/core/primitives/label/label.tsx +77 -0
  220. package/src/core/primitives/layer/__workshop__/index.ts +24 -0
  221. package/src/core/primitives/layer/__workshop__/multipleRoots.tsx +49 -0
  222. package/src/core/primitives/layer/__workshop__/nested.tsx +98 -0
  223. package/src/core/primitives/layer/__workshop__/responsiveZOffset.tsx +17 -0
  224. package/src/core/primitives/layer/getLayerContext.test.ts +32 -0
  225. package/src/core/primitives/layer/getLayerContext.ts +21 -0
  226. package/src/core/primitives/layer/layer.test.tsx +108 -0
  227. package/src/core/primitives/layer/layer.tsx +42 -0
  228. package/src/core/primitives/layer/layerCard.tsx +90 -0
  229. package/src/core/primitives/layer/layerContext.ts +7 -0
  230. package/src/core/primitives/layer/layerProvider.tsx +114 -0
  231. package/src/core/primitives/layer/useLayer.ts +24 -0
  232. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +77 -0
  233. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +32 -0
  234. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +71 -0
  235. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +69 -0
  236. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +96 -0
  237. package/src/core/primitives/popover/__workshop__/TestStory.tsx +100 -0
  238. package/src/core/primitives/popover/constants.ts +22 -0
  239. package/src/core/primitives/popover/floating-ui/size.ts +83 -0
  240. package/src/core/primitives/popover/helpers.ts +32 -0
  241. package/src/core/primitives/popover/popover.tsx +453 -0
  242. package/src/core/primitives/popover/popoverLayer.tsx +149 -0
  243. package/src/core/primitives/popover/types.ts +12 -0
  244. package/src/core/primitives/radio/__workshop__/example.tsx +63 -0
  245. package/src/core/primitives/radio/__workshop__/plain.tsx +28 -0
  246. package/src/core/primitives/radio/radio.tsx +64 -0
  247. package/src/core/primitives/root/Root.tsx +84 -0
  248. package/src/core/primitives/root/RootProvider.tsx +40 -0
  249. package/src/core/primitives/root/__workshop__/boundary.tsx +5 -0
  250. package/src/core/primitives/root/__workshop__/index.ts +8 -0
  251. package/src/core/primitives/select/__workshop__/plain.tsx +39 -0
  252. package/src/core/primitives/select/__workshop__/readOnly.tsx +23 -0
  253. package/src/core/primitives/select/select.tsx +85 -0
  254. package/src/core/primitives/selectable/selectable.tsx +50 -0
  255. package/src/core/primitives/selectable/types.ts +7 -0
  256. package/src/core/primitives/skeleton/__workshop__/delay.tsx +70 -0
  257. package/src/core/primitives/skeleton/__workshop__/index.ts +11 -0
  258. package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +64 -0
  259. package/src/core/primitives/skeleton/codeSkeleton.tsx +49 -0
  260. package/src/core/primitives/skeleton/headingSkeleton.tsx +48 -0
  261. package/src/core/primitives/skeleton/labelSkeleton.tsx +47 -0
  262. package/src/core/primitives/skeleton/skeleton.tsx +71 -0
  263. package/src/core/primitives/skeleton/textSkeleton.tsx +49 -0
  264. package/src/core/primitives/spinner/__workshop__/Props.tsx +15 -0
  265. package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +14 -0
  266. package/src/core/primitives/spinner/spinner.tsx +45 -0
  267. package/src/core/primitives/srOnly/srOnly.tsx +33 -0
  268. package/src/core/primitives/stack/__workshop__/plain.tsx +32 -0
  269. package/src/core/primitives/stack/stack.tsx +65 -0
  270. package/src/core/primitives/switch/switch.tsx +84 -0
  271. package/src/core/primitives/text/__workshop__/colored.tsx +23 -0
  272. package/src/core/primitives/text/__workshop__/example.tsx +28 -0
  273. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +23 -0
  274. package/src/core/primitives/text/text.tsx +74 -0
  275. package/src/core/primitives/textArea/__workshop__/plain.tsx +61 -0
  276. package/src/core/primitives/textArea/textArea.tsx +96 -0
  277. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +17 -0
  278. package/src/core/primitives/textInput/__workshop__/plain.tsx +110 -0
  279. package/src/core/primitives/textInput/__workshop__/states.tsx +53 -0
  280. package/src/core/primitives/textInput/__workshop__/tones.tsx +277 -0
  281. package/src/core/primitives/textInput/__workshop__/typed.tsx +23 -0
  282. package/src/core/primitives/textInput/textInput.tsx +261 -0
  283. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +102 -0
  284. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +74 -0
  285. package/src/core/primitives/tooltip/__workshop__/props.tsx +112 -0
  286. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +86 -0
  287. package/src/core/primitives/tooltip/constants.ts +23 -0
  288. package/src/core/primitives/tooltip/tooltip.test.tsx +454 -0
  289. package/src/core/primitives/tooltip/tooltip.tsx +489 -0
  290. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +11 -0
  291. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +53 -0
  292. package/src/core/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +13 -0
  293. package/src/core/primitives/tooltip/tooltipLayer.tsx +106 -0
  294. package/src/core/primitives/types.ts +153 -0
  295. package/src/core/types/props.ts +28 -0
  296. package/src/core/types/radius.ts +7 -0
  297. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +100 -0
  298. package/src/core/utils/boundaryElement/boundaryElementContext.ts +7 -0
  299. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +18 -0
  300. package/src/core/utils/boundaryElement/types.ts +5 -0
  301. package/src/core/utils/boundaryElement/useBoundaryElement.ts +24 -0
  302. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +41 -0
  303. package/src/core/utils/elementQuery/elementQuery.tsx +75 -0
  304. package/src/core/utils/errorBoundary.tsx +50 -0
  305. package/src/core/utils/getElementRef.ts +27 -0
  306. package/src/core/utils/portal/__workshop__/named.tsx +63 -0
  307. package/src/core/utils/portal/portal.test.tsx +103 -0
  308. package/src/core/utils/portal/portal.tsx +40 -0
  309. package/src/core/utils/portal/portalContext.ts +31 -0
  310. package/src/core/utils/portal/portalProvider.tsx +73 -0
  311. package/src/core/utils/portal/types.ts +7 -0
  312. package/src/core/utils/portal/usePortal.ts +23 -0
  313. package/src/css/_assign.ts +3 -0
  314. package/src/css/_composeClassNames.ts +12 -0
  315. package/src/css/_fromEntries.ts +3 -0
  316. package/src/css/_getClassNames.ts +9 -0
  317. package/src/css/_responsiveClassName.ts +45 -0
  318. package/src/css/_responsiveStyle.css.ts +34 -0
  319. package/src/css/_style.css.ts +9 -0
  320. package/src/css/components/breadcrumbs/breadcrumbs.css.ts +6 -0
  321. package/src/css/components/breadcrumbs/breadcrumbs.ts +5 -3
  322. package/src/css/components/dialog/dialog.css.ts +106 -0
  323. package/src/css/components/dialog/dialog.ts +42 -14
  324. package/src/css/components/menu/menu.css.ts +14 -0
  325. package/src/css/components/menu/menu.ts +8 -5
  326. package/src/css/components/skeleton/skeleton.css.ts +132 -0
  327. package/src/css/components/skeleton/skeleton.ts +16 -9
  328. package/src/css/components/skeleton/types.ts +16 -6
  329. package/src/css/components/toast/toast.css.ts +17 -0
  330. package/src/css/components/toast/toast.ts +5 -15
  331. package/src/css/components/tree/tree.css.ts +65 -0
  332. package/src/css/components/tree/tree.ts +5 -3
  333. package/src/css/constants.ts +10 -1
  334. package/src/css/defaultTheme.css.ts +521 -0
  335. package/src/css/index.ts +141 -39
  336. package/src/css/layers.css.ts +9 -0
  337. package/src/css/primitives/_arrow/_arrow.css.ts +68 -0
  338. package/src/css/primitives/_arrow/_arrow.ts +16 -4
  339. package/src/css/primitives/_input/_input.css.ts +261 -0
  340. package/src/css/primitives/_input/input.ts +16 -12
  341. package/src/css/primitives/_input/types.ts +4 -3
  342. package/src/css/primitives/_selectable/_selectable.css.ts +131 -0
  343. package/src/css/primitives/_selectable/selectable.ts +5 -5
  344. package/src/css/primitives/_selectable/types.ts +3 -2
  345. package/src/css/primitives/avatar/avatar.css.ts +198 -0
  346. package/src/css/primitives/avatar/avatar.ts +52 -11
  347. package/src/css/primitives/avatar/types.ts +5 -3
  348. package/src/css/primitives/badge/badge.css.ts +27 -0
  349. package/src/css/primitives/badge/badge.ts +4 -4
  350. package/src/css/primitives/badge/types.ts +4 -5
  351. package/src/css/primitives/box/box.css.ts +19 -0
  352. package/src/css/primitives/box/box.ts +63 -31
  353. package/src/css/primitives/box/types.ts +56 -30
  354. package/src/css/primitives/button/button.css.ts +289 -0
  355. package/src/css/primitives/button/button.ts +19 -34
  356. package/src/css/primitives/button/types.ts +12 -0
  357. package/src/css/primitives/card/__workshop__/color.tsx +75 -0
  358. package/src/css/primitives/card/__workshop__/index.ts +14 -0
  359. package/src/css/primitives/card/card.css.ts +370 -0
  360. package/src/css/primitives/card/card.ts +9 -10
  361. package/src/css/primitives/card/types.ts +4 -6
  362. package/src/css/primitives/checkbox/checkbox.css.ts +193 -0
  363. package/src/css/primitives/checkbox/checkbox.ts +13 -5
  364. package/src/css/primitives/code/code.css.ts +271 -0
  365. package/src/css/primitives/code/code.ts +15 -5
  366. package/src/css/primitives/code/types.ts +5 -3
  367. package/src/css/primitives/container/container.css.ts +4 -0
  368. package/src/css/primitives/container/container.ts +14 -4
  369. package/src/css/primitives/container/types.ts +4 -2
  370. package/src/css/primitives/heading/heading.css.ts +85 -0
  371. package/src/css/primitives/heading/heading.ts +16 -11
  372. package/src/css/primitives/heading/types.ts +8 -3
  373. package/src/css/primitives/kbd/kbd.css.ts +16 -0
  374. package/src/css/primitives/kbd/kbd.ts +6 -4
  375. package/src/css/primitives/kbd/types.ts +2 -3
  376. package/src/css/primitives/label/label.css.ts +86 -0
  377. package/src/css/primitives/label/label.ts +16 -10
  378. package/src/css/primitives/label/types.ts +15 -5
  379. package/src/css/primitives/popover/popover.css.ts +6 -0
  380. package/src/css/primitives/popover/popover.ts +10 -3
  381. package/src/css/primitives/radio/radio.css.ts +78 -0
  382. package/src/css/primitives/radio/radio.ts +15 -3
  383. package/src/css/primitives/root/root.css.ts +15 -0
  384. package/src/css/primitives/root/root.ts +17 -0
  385. package/src/css/primitives/root/types.ts +10 -0
  386. package/src/css/primitives/select/select.css.ts +24 -0
  387. package/src/css/primitives/select/select.ts +8 -6
  388. package/src/css/primitives/select/types.ts +1 -1
  389. package/src/css/primitives/spinner/spinner.css.ts +23 -0
  390. package/src/css/primitives/spinner/spinner.ts +9 -5
  391. package/src/css/primitives/spinner/types.ts +4 -0
  392. package/src/css/primitives/srOnly/srOnly.css.ts +10 -0
  393. package/src/css/primitives/srOnly/srOnly.ts +7 -0
  394. package/src/css/primitives/stack/stack.css.ts +6 -0
  395. package/src/css/primitives/stack/stack.ts +7 -0
  396. package/src/css/primitives/switch/switch.css.ts +98 -0
  397. package/src/css/primitives/switch/switch.ts +13 -7
  398. package/src/css/primitives/text/text.css.ts +85 -0
  399. package/src/css/primitives/text/text.ts +18 -11
  400. package/src/css/primitives/text/types.ts +12 -3
  401. package/src/css/primitives/textArea/textArea.css.ts +4 -0
  402. package/src/css/primitives/textArea/textArea.ts +6 -5
  403. package/src/css/primitives/textArea/types.ts +5 -3
  404. package/src/css/primitives/textInput/textInput.css.ts +41 -0
  405. package/src/css/primitives/textInput/textInput.ts +21 -5
  406. package/src/css/primitives/textInput/types.ts +3 -7
  407. package/src/css/primitives/tooltip/tooltip.css.ts +4 -0
  408. package/src/css/primitives/tooltip/tooltip.ts +6 -7
  409. package/src/css/primitives/tooltip/types.ts +4 -0
  410. package/src/css/props/alignItems/alignItems.css.ts +22 -0
  411. package/src/css/props/alignItems/alignItems.ts +8 -0
  412. package/src/css/props/alignItems/types.ts +9 -0
  413. package/src/css/props/border/border.css.ts +65 -0
  414. package/src/css/props/border/border.ts +36 -0
  415. package/src/css/props/border/types.ts +13 -0
  416. package/src/css/props/boxSizing/boxSizing.css.ts +11 -0
  417. package/src/css/props/boxSizing/boxSizing.ts +10 -0
  418. package/src/css/props/boxSizing/types.ts +7 -0
  419. package/src/css/props/display/display.css.ts +56 -0
  420. package/src/css/props/display/display.ts +17 -0
  421. package/src/css/props/display/types.ts +16 -0
  422. package/src/css/props/flex/flex.css.ts +52 -0
  423. package/src/css/props/flex/flex.ts +8 -0
  424. package/src/css/props/flex/types.ts +9 -0
  425. package/src/css/props/flexDirection/flexDirection.css.ts +19 -0
  426. package/src/css/props/flexDirection/flexDirection.ts +8 -0
  427. package/src/css/props/flexDirection/types.ts +9 -0
  428. package/src/css/props/flexWrap/flexWrap.css.ts +16 -0
  429. package/src/css/props/flexWrap/flexWrap.ts +8 -0
  430. package/src/css/props/flexWrap/types.ts +9 -0
  431. package/src/css/props/font/font.css.ts +93 -0
  432. package/src/css/props/font/font.ts +8 -0
  433. package/src/css/props/font/types.ts +6 -0
  434. package/src/css/props/gap/gap.css.ts +40 -0
  435. package/src/css/props/gap/gap.ts +13 -0
  436. package/src/css/props/gap/types.ts +10 -0
  437. package/src/css/props/gridAutoColumns/gridAutoColumns.css.ts +19 -0
  438. package/src/css/props/gridAutoColumns/gridAutoColumns.ts +8 -0
  439. package/src/css/props/gridAutoColumns/types.ts +19 -0
  440. package/src/css/props/gridAutoFlow/gridAutoFlow.css.ts +19 -0
  441. package/src/css/props/gridAutoFlow/gridAutoFlow.ts +8 -0
  442. package/src/css/props/gridAutoFlow/types.ts +13 -0
  443. package/src/css/props/gridAutoRows/gridAutoRows.css.ts +19 -0
  444. package/src/css/props/gridAutoRows/gridAutoRows.ts +8 -0
  445. package/src/css/props/gridAutoRows/types.ts +13 -0
  446. package/src/css/props/gridColumn/gridColumn.css.ts +49 -0
  447. package/src/css/props/gridColumn/gridColumn.ts +8 -0
  448. package/src/css/props/gridColumn/types.ts +19 -0
  449. package/src/css/props/gridColumnEnd/gridColumnEnd.css.ts +46 -0
  450. package/src/css/props/gridColumnEnd/gridColumnEnd.ts +8 -0
  451. package/src/css/props/gridColumnEnd/types.ts +19 -0
  452. package/src/css/props/gridColumnStart/gridColumnStart.css.ts +46 -0
  453. package/src/css/props/gridColumnStart/gridColumnStart.ts +11 -0
  454. package/src/css/props/gridColumnStart/types.ts +19 -0
  455. package/src/css/props/gridRow/gridRow.css.ts +49 -0
  456. package/src/css/props/gridRow/gridRow.ts +8 -0
  457. package/src/css/props/gridRow/types.ts +19 -0
  458. package/src/css/props/gridRowEnd/gridRowEnd.css.ts +46 -0
  459. package/src/css/props/gridRowEnd/gridRowEnd.ts +8 -0
  460. package/src/css/props/gridRowEnd/types.ts +19 -0
  461. package/src/css/props/gridRowStart/gridRowStart.css.ts +46 -0
  462. package/src/css/props/gridRowStart/gridRowStart.ts +8 -0
  463. package/src/css/props/gridRowStart/types.ts +19 -0
  464. package/src/css/props/gridTemplateColumns/gridTemplateColumns.css.ts +43 -0
  465. package/src/css/props/gridTemplateColumns/gridTemplateColumns.ts +8 -0
  466. package/src/css/props/gridTemplateColumns/types.ts +19 -0
  467. package/src/css/props/gridTemplateRows/gridTemplateRows.css.ts +43 -0
  468. package/src/css/props/gridTemplateRows/gridTemplateRows.ts +8 -0
  469. package/src/css/props/gridTemplateRows/types.ts +19 -0
  470. package/src/css/props/height/height.css.ts +25 -0
  471. package/src/css/props/height/height.ts +8 -0
  472. package/src/css/props/height/types.ts +15 -0
  473. package/src/css/props/inset/inset.css.ts +37 -0
  474. package/src/css/props/inset/inset.ts +21 -0
  475. package/src/css/props/inset/types.ts +13 -0
  476. package/src/css/props/justifyContent/justifyContent.css.ts +25 -0
  477. package/src/css/props/justifyContent/justifyContent.ts +8 -0
  478. package/src/css/props/justifyContent/types.ts +15 -0
  479. package/src/css/props/margin/margin.css.ts +117 -0
  480. package/src/css/props/margin/margin.ts +25 -0
  481. package/src/css/props/margin/types.ts +17 -0
  482. package/src/css/props/maxWidth/maxWidth.css.ts +32 -0
  483. package/src/css/props/maxWidth/maxWidth.ts +8 -0
  484. package/src/css/props/maxWidth/types.ts +11 -0
  485. package/src/css/props/minHeight/minHeight.css.ts +13 -0
  486. package/src/css/props/minHeight/minHeight.ts +8 -0
  487. package/src/css/props/minHeight/types.ts +9 -0
  488. package/src/css/props/minWidth/minWidth.css.ts +25 -0
  489. package/src/css/props/minWidth/minWidth.ts +8 -0
  490. package/src/css/props/minWidth/types.ts +9 -0
  491. package/src/css/props/outline/outline.css.ts +10 -0
  492. package/src/css/props/outline/outline.ts +8 -0
  493. package/src/css/props/outline/types.ts +7 -0
  494. package/src/css/props/overflow/overflow.css.ts +16 -0
  495. package/src/css/props/overflow/overflow.ts +8 -0
  496. package/src/css/props/overflow/types.ts +17 -0
  497. package/src/css/props/padding/padding.css.ts +87 -0
  498. package/src/css/props/padding/padding.ts +25 -0
  499. package/src/css/props/padding/types.ts +17 -0
  500. package/src/css/props/pointerEvents/pointerEvents.css.ts +13 -0
  501. package/src/css/props/pointerEvents/pointerEvents.ts +8 -0
  502. package/src/css/props/position/position.css.ts +22 -0
  503. package/src/css/props/position/position.ts +8 -0
  504. package/src/css/props/position/types.ts +9 -0
  505. package/src/css/props/radius/radius.css.ts +21 -0
  506. package/src/css/props/radius/radius.ts +8 -0
  507. package/src/css/props/radius/types.ts +8 -0
  508. package/src/css/props/shadow/shadow.css.ts +23 -0
  509. package/src/css/props/shadow/shadow.ts +8 -0
  510. package/src/css/props/shadow/types.ts +8 -0
  511. package/src/css/props/textAlign/textAlign.css.ts +22 -0
  512. package/src/css/props/textAlign/textAlign.ts +8 -0
  513. package/src/css/props/textAlign/types.ts +7 -0
  514. package/src/css/props/textOverflow/textOverflow.css.ts +19 -0
  515. package/src/css/props/textOverflow/textOverflow.ts +8 -0
  516. package/src/css/props/textOverflow/types.ts +12 -0
  517. package/src/css/props/width/types.ts +11 -0
  518. package/src/css/props/width/width.css.ts +31 -0
  519. package/src/css/props/width/width.ts +8 -0
  520. package/src/css/types.ts +221 -810
  521. package/src/css/util.ts +3 -8
  522. package/src/css/vars.css.ts +676 -0
  523. package/src/theme/getScopedTheme.ts +4 -4
  524. package/src/theme/index.ts +0 -5
  525. package/src/theme/types.ts +6 -10
  526. package/src/theme/v0/color/_generic.ts +1 -1
  527. package/src/theme/v0/color/button.ts +1 -1
  528. package/src/theme/v0/color/card.ts +1 -1
  529. package/src/theme/v0/color/color.ts +11 -11
  530. package/src/theme/v0/color/input.ts +1 -1
  531. package/src/theme/v0/color/muted.ts +1 -1
  532. package/src/theme/v0/color/selectable.ts +1 -1
  533. package/src/theme/v0/color/solid.ts +1 -1
  534. package/src/theme/v0/color/spot.ts +1 -1
  535. package/src/theme/v0/focusRing.ts +1 -3
  536. package/src/theme/v0/font.ts +6 -19
  537. package/src/theme/v0/layer.ts +1 -3
  538. package/src/theme/v0/shadow.ts +2 -6
  539. package/src/theme/v0/styles.ts +1 -1
  540. package/src/theme/v0/theme.ts +7 -7
  541. package/src/theme/v2/avatar.ts +2 -4
  542. package/src/theme/v2/build/_deprecated/color/_selectable/createSelectableTones.ts +76 -0
  543. package/src/theme/v2/build/_deprecated/color/_solid/createSolidTones.ts +54 -0
  544. package/src/theme/v2/build/_deprecated/color/button/createButtonModes.ts +22 -0
  545. package/src/theme/v2/build/_deprecated/color/button/createButtonTones.ts +55 -0
  546. package/src/theme/v2/build/_deprecated/color/card/createCardStates.ts +60 -0
  547. package/src/theme/v2/build/_deprecated/color/color.test.ts +63 -0
  548. package/src/theme/v2/build/_deprecated/color/defaults.ts +390 -0
  549. package/src/theme/v2/build/_deprecated/color/factory.ts +141 -0
  550. package/src/theme/v2/build/_deprecated/color/input/createInputModes.ts +86 -0
  551. package/src/theme/v2/build/_deprecated/color/muted/createMuted.ts +54 -0
  552. package/src/theme/v2/build/_deprecated/color/spot/createSpot.ts +20 -0
  553. package/src/theme/v2/build/buildColorTheme.test.ts +185 -0
  554. package/src/theme/v2/build/buildColorTheme.ts +494 -0
  555. package/src/theme/v2/build/buildTheme.test.ts +89 -0
  556. package/src/theme/v2/build/buildTheme.ts +37 -0
  557. package/src/theme/v2/build/colorToken/colorToken.ts +19 -0
  558. package/src/theme/v2/build/colorToken/compileColorToken.ts +21 -0
  559. package/src/theme/v2/build/colorToken/types.ts +6 -0
  560. package/src/theme/v2/build/lib/color-fns/blend/mix.ts +21 -0
  561. package/src/theme/v2/build/lib/color-fns/blend/multiply.ts +18 -0
  562. package/src/theme/v2/build/lib/color-fns/blend/screen.ts +18 -0
  563. package/src/theme/v2/build/lib/color-fns/color-fns.test.ts +68 -0
  564. package/src/theme/v2/build/lib/color-fns/contrastRatio.ts +34 -0
  565. package/src/theme/v2/build/lib/color-fns/convert.ts +150 -0
  566. package/src/theme/v2/build/lib/color-fns/parse.ts +60 -0
  567. package/src/theme/v2/build/mixThemeColor.test.ts +23 -0
  568. package/src/theme/v2/build/mixThemeColor.ts +53 -0
  569. package/src/theme/v2/build/renderColorTheme.ts +532 -0
  570. package/src/theme/v2/build/renderColorValue.ts +85 -0
  571. package/src/theme/v2/build/resolveColorTokens.ts +268 -0
  572. package/src/theme/v2/color/_helpers.ts +2 -2
  573. package/src/theme/v2/color/_system.ts +2 -4
  574. package/src/theme/v2/color/avatar.ts +3 -7
  575. package/src/theme/v2/color/badge.ts +3 -7
  576. package/src/theme/v2/color/button.ts +5 -11
  577. package/src/theme/v2/color/color.ts +10 -16
  578. package/src/theme/v2/color/input.ts +8 -10
  579. package/src/theme/v2/color/kbd.ts +1 -3
  580. package/src/theme/v2/color/selectable.ts +4 -8
  581. package/src/theme/v2/color/state.ts +5 -7
  582. package/src/theme/v2/color/syntax.ts +1 -3
  583. package/src/theme/v2/config/helpers.ts +48 -0
  584. package/src/theme/v2/config/system.ts +114 -0
  585. package/src/theme/v2/config/tokens/color/types.ts +137 -0
  586. package/src/theme/v2/config/tokens/index.ts +3 -0
  587. package/src/theme/v2/config/tokens/parseTokenValue.test.ts +44 -0
  588. package/src/theme/v2/config/tokens/parseTokenValue.ts +133 -0
  589. package/src/theme/v2/config/tokens/types.ts +53 -0
  590. package/src/theme/v2/config/types.ts +47 -0
  591. package/src/theme/v2/defaults/colorPalette.ts +5 -0
  592. package/src/theme/v2/defaults/colorTokens.ts +648 -0
  593. package/src/theme/v2/defaults/config.ts +84 -0
  594. package/src/theme/v2/defaults/fonts.ts +227 -0
  595. package/src/theme/v2/index.ts +2 -0
  596. package/src/theme/v2/input.ts +2 -4
  597. package/src/theme/v2/theme.ts +10 -14
  598. package/src/theme/v3/_constants.ts +29 -0
  599. package/src/theme/v3/_parseColorToken.ts +180 -0
  600. package/src/theme/v3/buildTheme_v3.ts +20 -11
  601. package/src/theme/v3/color/_constants.ts +15 -0
  602. package/src/theme/v3/color/avatar.ts +14 -0
  603. package/src/theme/v3/color/card.ts +58 -95
  604. package/src/theme/v3/color/color.ts +75 -71
  605. package/src/theme/v3/color/element.ts +8 -8
  606. package/src/theme/v3/color/index.ts +2 -2
  607. package/src/theme/v3/color/token.ts +19 -4
  608. package/src/theme/v3/color/tokens.ts +2 -2
  609. package/src/theme/v3/defaultFonts.ts +250 -0
  610. package/src/theme/v3/defaultTokens.ts +199 -0
  611. package/src/theme/v3/index.ts +4 -1
  612. package/src/theme/v3/palette/constants.ts +15 -0
  613. package/src/theme/v3/palette/types.ts +7 -0
  614. package/src/theme/v3/resolveTokens.ts +70 -65
  615. package/src/theme/v3/tokens.ts +2 -2
  616. package/src/theme/v3/types.ts +97 -12
  617. package/src/theme/versioning/getTheme_v2.ts +3 -3
  618. package/src/theme/versioning/is_v0.ts +2 -2
  619. package/src/theme/versioning/is_v2.ts +2 -2
  620. package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
  621. package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -1
  622. package/src/theme/versioning/themeColor_v3_v2.ts +229 -52
  623. package/src/theme/versioning/v0_v2.ts +3 -3
  624. package/src/theme/versioning/v2_v0.ts +4 -4
  625. package/src/theme/versioning/v3_v2.ts +62 -40
  626. package/bin/ui.js +0 -5
  627. package/dist/_chunks-cjs/_visual-editing.js +0 -3100
  628. package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
  629. package/dist/_chunks-cjs/buildCommand.js +0 -32
  630. package/dist/_chunks-cjs/buildCommand.js.map +0 -1
  631. package/dist/_chunks-cjs/refractor.js +0 -27
  632. package/dist/_chunks-cjs/refractor.js.map +0 -1
  633. package/dist/_chunks-cjs/v3_v2.js +0 -251
  634. package/dist/_chunks-cjs/v3_v2.js.map +0 -1
  635. package/dist/_chunks-es/_visual-editing.mjs +0 -3107
  636. package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
  637. package/dist/_chunks-es/refractor.mjs +0 -26
  638. package/dist/_chunks-es/refractor.mjs.map +0 -1
  639. package/dist/_chunks-es/v3_v2.mjs +0 -252
  640. package/dist/_chunks-es/v3_v2.mjs.map +0 -1
  641. package/dist/_visual-editing.d.mts +0 -808
  642. package/dist/_visual-editing.mjs +0 -31
  643. package/dist/_visual-editing.mjs.map +0 -1
  644. package/dist/cli.d.ts +0 -1
  645. package/dist/cli.js +0 -357
  646. package/dist/cli.js.map +0 -1
  647. package/dist/css.d.mts +0 -2197
  648. package/dist/css.d.ts +0 -2197
  649. package/dist/css.js +0 -4769
  650. package/dist/css.js.map +0 -1
  651. package/dist/css.mjs +0 -4770
  652. package/dist/css.mjs.map +0 -1
  653. package/dist/index.d.mts +0 -2869
  654. package/dist/index.mjs +0 -1545
  655. package/dist/index.mjs.map +0 -1
  656. package/dist/sanity-palette.css +0 -9
  657. package/dist/sanity-theme.css +0 -1
  658. package/dist/system.css +0 -22813
  659. package/dist/theme.d.mts +0 -1883
  660. package/dist/theme.mjs +0 -2989
  661. package/dist/theme.mjs.map +0 -1
  662. package/src/cli/buildCommand.ts +0 -48
  663. package/src/cli/index.ts +0 -38
  664. package/src/css/_comp.test.ts +0 -7
  665. package/src/css/_comp.ts +0 -10
  666. package/src/css/_mergeStyles.ts +0 -31
  667. package/src/css/_resp.ts +0 -38
  668. package/src/css/_responsiveRule.ts +0 -38
  669. package/src/css/aspects/border/border.style.ts +0 -13
  670. package/src/css/aspects/border/border.ts +0 -14
  671. package/src/css/aspects/border/index.ts +0 -2
  672. package/src/css/aspects/border/types.ts +0 -10
  673. package/src/css/aspects/display/display.style.ts +0 -34
  674. package/src/css/aspects/display/display.ts +0 -7
  675. package/src/css/aspects/display/index.ts +0 -2
  676. package/src/css/aspects/display/types.ts +0 -17
  677. package/src/css/aspects/flex/flex.style.ts +0 -30
  678. package/src/css/aspects/flex/flex.ts +0 -13
  679. package/src/css/aspects/flex/flexAlign.style.ts +0 -12
  680. package/src/css/aspects/flex/flexDirection.style.ts +0 -11
  681. package/src/css/aspects/flex/flexJustify.style.ts +0 -13
  682. package/src/css/aspects/flex/flexWrap.style.ts +0 -10
  683. package/src/css/aspects/flex/index.ts +0 -2
  684. package/src/css/aspects/flex/types.ts +0 -35
  685. package/src/css/aspects/flexItem/flex.style.ts +0 -22
  686. package/src/css/aspects/flexItem/flexItem.ts +0 -8
  687. package/src/css/aspects/flexItem/index.ts +0 -2
  688. package/src/css/aspects/flexItem/types.ts +0 -27
  689. package/src/css/aspects/font/font.style.ts +0 -151
  690. package/src/css/aspects/font/font.ts +0 -12
  691. package/src/css/aspects/font/index.ts +0 -2
  692. package/src/css/aspects/font/types.ts +0 -12
  693. package/src/css/aspects/gap/gap.style.ts +0 -21
  694. package/src/css/aspects/gap/gap.ts +0 -8
  695. package/src/css/aspects/gap/index.ts +0 -2
  696. package/src/css/aspects/gap/types.ts +0 -10
  697. package/src/css/aspects/grid/grid.ts +0 -13
  698. package/src/css/aspects/grid/gridAutoColumns.style.ts +0 -11
  699. package/src/css/aspects/grid/gridAutoFlow.style.ts +0 -11
  700. package/src/css/aspects/grid/gridAutoRows.style.ts +0 -11
  701. package/src/css/aspects/grid/gridColumns.style.ts +0 -18
  702. package/src/css/aspects/grid/gridRows.style.ts +0 -18
  703. package/src/css/aspects/grid/index.ts +0 -2
  704. package/src/css/aspects/grid/types.ts +0 -29
  705. package/src/css/aspects/gridItem/gridColumn.style.ts +0 -20
  706. package/src/css/aspects/gridItem/gridColumnEnd.style.ts +0 -20
  707. package/src/css/aspects/gridItem/gridColumnStart.style.ts +0 -20
  708. package/src/css/aspects/gridItem/gridItem.ts +0 -15
  709. package/src/css/aspects/gridItem/gridRow.style.ts +0 -20
  710. package/src/css/aspects/gridItem/gridRowEnd.style.ts +0 -20
  711. package/src/css/aspects/gridItem/gridRowStart.style.ts +0 -20
  712. package/src/css/aspects/gridItem/index.ts +0 -2
  713. package/src/css/aspects/gridItem/types.ts +0 -41
  714. package/src/css/aspects/height/height.style.ts +0 -9
  715. package/src/css/aspects/height/height.ts +0 -17
  716. package/src/css/aspects/height/index.ts +0 -1
  717. package/src/css/aspects/height/rules.ts +0 -7
  718. package/src/css/aspects/index.ts +0 -20
  719. package/src/css/aspects/inset/index.ts +0 -2
  720. package/src/css/aspects/inset/inset.style.ts +0 -12
  721. package/src/css/aspects/inset/inset.ts +0 -13
  722. package/src/css/aspects/inset/types.ts +0 -13
  723. package/src/css/aspects/margin/index.ts +0 -2
  724. package/src/css/aspects/margin/margin.style.ts +0 -46
  725. package/src/css/aspects/margin/margin.ts +0 -15
  726. package/src/css/aspects/margin/types.ts +0 -11
  727. package/src/css/aspects/maxWidth/index.ts +0 -2
  728. package/src/css/aspects/maxWidth/maxWidth.style.ts +0 -16
  729. package/src/css/aspects/maxWidth/maxWidth.ts +0 -6
  730. package/src/css/aspects/maxWidth/types.ts +0 -7
  731. package/src/css/aspects/outline/outline.style.ts +0 -9
  732. package/src/css/aspects/overflow/index.ts +0 -2
  733. package/src/css/aspects/overflow/overflow.style.ts +0 -11
  734. package/src/css/aspects/overflow/overflow.ts +0 -11
  735. package/src/css/aspects/overflow/types.ts +0 -11
  736. package/src/css/aspects/padding/index.ts +0 -2
  737. package/src/css/aspects/padding/padding.style.ts +0 -46
  738. package/src/css/aspects/padding/padding.ts +0 -15
  739. package/src/css/aspects/padding/types.ts +0 -14
  740. package/src/css/aspects/pointerEvents/index.ts +0 -2
  741. package/src/css/aspects/pointerEvents/pointerEvents.style.ts +0 -13
  742. package/src/css/aspects/pointerEvents/pointerEvents.ts +0 -6
  743. package/src/css/aspects/position/index.ts +0 -2
  744. package/src/css/aspects/position/position.style.ts +0 -12
  745. package/src/css/aspects/position/position.ts +0 -7
  746. package/src/css/aspects/position/types.ts +0 -9
  747. package/src/css/aspects/radius/index.ts +0 -2
  748. package/src/css/aspects/radius/radius.style.ts +0 -16
  749. package/src/css/aspects/radius/radius.ts +0 -8
  750. package/src/css/aspects/radius/types.ts +0 -8
  751. package/src/css/aspects/shadow/index.ts +0 -2
  752. package/src/css/aspects/shadow/shadow.style.ts +0 -49
  753. package/src/css/aspects/shadow/shadow.ts +0 -7
  754. package/src/css/aspects/shadow/types.ts +0 -8
  755. package/src/css/aspects/textOverflow/index.ts +0 -2
  756. package/src/css/aspects/textOverflow/textOverflow.style.ts +0 -21
  757. package/src/css/aspects/textOverflow/textOverflow.ts +0 -6
  758. package/src/css/aspects/textOverflow/types.ts +0 -8
  759. package/src/css/aspects/width/index.ts +0 -2
  760. package/src/css/aspects/width/rules.ts +0 -8
  761. package/src/css/aspects/width/types.ts +0 -9
  762. package/src/css/aspects/width/width.style.ts +0 -11
  763. package/src/css/aspects/width/width.ts +0 -6
  764. package/src/css/compile/compilePalette.ts +0 -60
  765. package/src/css/compile/compileRule.ts +0 -96
  766. package/src/css/compile/compileRules.test.ts +0 -36
  767. package/src/css/compile/compileRules.ts +0 -43
  768. package/src/css/compile/compileStyle.ts +0 -148
  769. package/src/css/compile/compileSystem.ts +0 -10
  770. package/src/css/compile/compileTheme.ts +0 -15
  771. package/src/css/compile/compileTheme_v3.ts +0 -410
  772. package/src/css/compile/types.ts +0 -6
  773. package/src/css/components/breadcrumbs/breadcrumbs.style.ts +0 -9
  774. package/src/css/components/breadcrumbs/index.ts +0 -1
  775. package/src/css/components/breadcrumbs/rules.ts +0 -25
  776. package/src/css/components/dialog/dialog.style.ts +0 -79
  777. package/src/css/components/dialog/index.ts +0 -1
  778. package/src/css/components/dialog/rules.ts +0 -78
  779. package/src/css/components/menu/index.ts +0 -1
  780. package/src/css/components/menu/menu.style.ts +0 -17
  781. package/src/css/components/menu/rules.ts +0 -15
  782. package/src/css/components/skeleton/index.ts +0 -2
  783. package/src/css/components/skeleton/rules.ts +0 -113
  784. package/src/css/components/skeleton/skeleton.style.ts +0 -96
  785. package/src/css/components/toast/index.ts +0 -1
  786. package/src/css/components/toast/rules.ts +0 -18
  787. package/src/css/components/toast/toast.style.ts +0 -20
  788. package/src/css/components/tree/index.ts +0 -1
  789. package/src/css/components/tree/rules.ts +0 -168
  790. package/src/css/components/tree/tree.style.ts +0 -55
  791. package/src/css/composeClassNames.ts +0 -17
  792. package/src/css/primitives/_arrow/_arrow.style.ts +0 -73
  793. package/src/css/primitives/_arrow/index.ts +0 -1
  794. package/src/css/primitives/_input/__workshop__/customInput.tsx +0 -16
  795. package/src/css/primitives/_input/__workshop__/index.ts +0 -14
  796. package/src/css/primitives/_input/_input.style.ts +0 -162
  797. package/src/css/primitives/_input/index.ts +0 -2
  798. package/src/css/primitives/_selectable/__style.ts +0 -117
  799. package/src/css/primitives/_selectable/_contants.ts +0 -11
  800. package/src/css/primitives/_selectable/_selectable.style.ts +0 -132
  801. package/src/css/primitives/_selectable/index.ts +0 -2
  802. package/src/css/primitives/avatar/avatar.style.ts +0 -175
  803. package/src/css/primitives/avatar/index.ts +0 -2
  804. package/src/css/primitives/avatar/rules.ts +0 -176
  805. package/src/css/primitives/badge/badge.style.ts +0 -22
  806. package/src/css/primitives/badge/index.ts +0 -2
  807. package/src/css/primitives/box/box.style.ts +0 -31
  808. package/src/css/primitives/box/index.ts +0 -2
  809. package/src/css/primitives/button/_constants.ts +0 -17
  810. package/src/css/primitives/button/button.style.ts +0 -182
  811. package/src/css/primitives/button/index.ts +0 -1
  812. package/src/css/primitives/button/rules.ts +0 -302
  813. package/src/css/primitives/card/_constants.ts +0 -13
  814. package/src/css/primitives/card/card.style.ts +0 -198
  815. package/src/css/primitives/card/index.ts +0 -2
  816. package/src/css/primitives/card/rules.ts +0 -473
  817. package/src/css/primitives/checkbox/__styles.ts +0 -129
  818. package/src/css/primitives/checkbox/checkbox.style.ts +0 -154
  819. package/src/css/primitives/checkbox/index.ts +0 -1
  820. package/src/css/primitives/checkbox/rules.ts +0 -152
  821. package/src/css/primitives/code/code.style.ts +0 -62
  822. package/src/css/primitives/code/index.ts +0 -2
  823. package/src/css/primitives/code/rules.ts +0 -96
  824. package/src/css/primitives/container/container.style.ts +0 -10
  825. package/src/css/primitives/container/index.ts +0 -2
  826. package/src/css/primitives/container/rules.ts +0 -8
  827. package/src/css/primitives/heading/heading.style.ts +0 -47
  828. package/src/css/primitives/heading/index.ts +0 -2
  829. package/src/css/primitives/heading/rules.ts +0 -155
  830. package/src/css/primitives/kbd/index.ts +0 -2
  831. package/src/css/primitives/kbd/kbd.style.ts +0 -22
  832. package/src/css/primitives/kbd/rules.ts +0 -20
  833. package/src/css/primitives/label/index.ts +0 -2
  834. package/src/css/primitives/label/label.style.ts +0 -48
  835. package/src/css/primitives/label/rules.ts +0 -137
  836. package/src/css/primitives/popover/index.ts +0 -1
  837. package/src/css/primitives/popover/popover.style.ts +0 -5
  838. package/src/css/primitives/popover/rules.ts +0 -5
  839. package/src/css/primitives/radio/index.ts +0 -1
  840. package/src/css/primitives/radio/radio.style.ts +0 -123
  841. package/src/css/primitives/radio/rules.ts +0 -121
  842. package/src/css/primitives/select/index.ts +0 -2
  843. package/src/css/primitives/select/rules.ts +0 -22
  844. package/src/css/primitives/select/select.style.ts +0 -24
  845. package/src/css/primitives/spinner/index.ts +0 -1
  846. package/src/css/primitives/spinner/rules.ts +0 -21
  847. package/src/css/primitives/spinner/spinner.style.ts +0 -22
  848. package/src/css/primitives/switch/index.ts +0 -1
  849. package/src/css/primitives/switch/rules.ts +0 -340
  850. package/src/css/primitives/switch/switch.style.ts +0 -169
  851. package/src/css/primitives/text/index.ts +0 -2
  852. package/src/css/primitives/text/rules.ts +0 -164
  853. package/src/css/primitives/text/text.style.ts +0 -56
  854. package/src/css/primitives/textArea/index.ts +0 -2
  855. package/src/css/primitives/textArea/rules.ts +0 -7
  856. package/src/css/primitives/textArea/textArea.style.ts +0 -9
  857. package/src/css/primitives/textInput/index.ts +0 -2
  858. package/src/css/primitives/textInput/rules.ts +0 -224
  859. package/src/css/primitives/textInput/textInput.style.ts +0 -167
  860. package/src/css/primitives/token/rules.ts +0 -45
  861. package/src/css/primitives/token/token.style.ts +0 -49
  862. package/src/css/primitives/tooltip/index.ts +0 -1
  863. package/src/css/primitives/tooltip/rules.ts +0 -19
  864. package/src/css/primitives/tooltip/tooltip.style.ts +0 -21
  865. package/src/css/responsiveRules.ts +0 -25
  866. package/src/css/scopeClassName.ts +0 -6
  867. package/src/css/system.style.ts +0 -154
  868. package/src/css/utils/srOnly/index.ts +0 -1
  869. package/src/css/utils/srOnly/srOnly.style.ts +0 -14
  870. package/src/css/utils/srOnly/srOnly.ts +0 -5
  871. package/src/css/varNames.ts +0 -486
  872. package/src/css/vars.ts +0 -456
  873. package/src/theme/_constants.ts +0 -26
  874. package/src/theme/_types.ts +0 -41
  875. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +0 -76
  876. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +0 -54
  877. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +0 -17
  878. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +0 -55
  879. package/src/theme/build/_deprecated/color/card/createCardStates.ts +0 -60
  880. package/src/theme/build/_deprecated/color/color.test.ts +0 -63
  881. package/src/theme/build/_deprecated/color/defaults.ts +0 -390
  882. package/src/theme/build/_deprecated/color/factory.ts +0 -141
  883. package/src/theme/build/_deprecated/color/input/createInputModes.ts +0 -81
  884. package/src/theme/build/_deprecated/color/muted/createMuted.ts +0 -54
  885. package/src/theme/build/_deprecated/color/spot/createSpot.ts +0 -20
  886. package/src/theme/build/buildColorTheme.test.ts +0 -183
  887. package/src/theme/build/buildColorTheme.ts +0 -494
  888. package/src/theme/build/buildTheme.test.ts +0 -87
  889. package/src/theme/build/buildTheme.ts +0 -12
  890. package/src/theme/build/colorToken/colorToken.ts +0 -19
  891. package/src/theme/build/colorToken/compileColorToken.ts +0 -21
  892. package/src/theme/build/colorToken/types.ts +0 -6
  893. package/src/theme/build/lib/color-fns/blend/mix.ts +0 -21
  894. package/src/theme/build/lib/color-fns/blend/multiply.ts +0 -18
  895. package/src/theme/build/lib/color-fns/blend/screen.ts +0 -18
  896. package/src/theme/build/lib/color-fns/color-fns.test.ts +0 -68
  897. package/src/theme/build/lib/color-fns/contrastRatio.ts +0 -31
  898. package/src/theme/build/lib/color-fns/convert.ts +0 -150
  899. package/src/theme/build/lib/color-fns/parse.ts +0 -60
  900. package/src/theme/build/mixThemeColor.test.ts +0 -21
  901. package/src/theme/build/mixThemeColor.ts +0 -53
  902. package/src/theme/build/renderColorTheme.ts +0 -532
  903. package/src/theme/build/renderColorValue.ts +0 -85
  904. package/src/theme/build/resolveColorTokens.ts +0 -268
  905. package/src/theme/build/theme.test.ts +0 -27
  906. package/src/theme/config/helpers.ts +0 -55
  907. package/src/theme/config/system.ts +0 -115
  908. package/src/theme/config/tokens/color/types.ts +0 -133
  909. package/src/theme/config/tokens/index.ts +0 -4
  910. package/src/theme/config/tokens/parseTokenKey.test.ts +0 -64
  911. package/src/theme/config/tokens/parseTokenKey.ts +0 -67
  912. package/src/theme/config/tokens/parseTokenValue.test.ts +0 -42
  913. package/src/theme/config/tokens/parseTokenValue.ts +0 -133
  914. package/src/theme/config/tokens/types.ts +0 -53
  915. package/src/theme/config/types.ts +0 -45
  916. package/src/theme/defaults/colorPalette.ts +0 -5
  917. package/src/theme/defaults/colorTokens.ts +0 -648
  918. package/src/theme/defaults/config.ts +0 -84
  919. package/src/theme/defaults/fonts.ts +0 -228
  920. package/src/theme/palette/constants.ts +0 -15
  921. package/src/theme/palette/types.ts +0 -16
  922. package/src/theme/v3/buildTheme_v3.test.ts +0 -40
  923. package/src/theme/v3/color/buildColor_v3.ts +0 -193
  924. package/src/theme/v3/color/parseColor.test.ts +0 -79
  925. package/src/theme/v3/color/parseColor.ts +0 -167
  926. package/src/theme/v3/color/renderColor.test.ts +0 -19
  927. package/src/theme/v3/color/renderColor.ts +0 -33
  928. package/src/theme/v3/defaults.ts +0 -205
  929. package/src/ui/StyleTags.tsx +0 -24
  930. package/src/ui/_compat/index.ts +0 -9
  931. package/src/ui/_compat/styles/_responsive.ts +0 -19
  932. package/src/ui/_compat/styles/index.ts +0 -1
  933. package/src/ui/_compat/theme/index.ts +0 -5
  934. package/src/ui/_compat/theme/theme.test.tsx +0 -73
  935. package/src/ui/_compat/theme/themeColorProvider.tsx +0 -30
  936. package/src/ui/_compat/theme/themeContext.ts +0 -10
  937. package/src/ui/_compat/theme/themeProvider.tsx +0 -74
  938. package/src/ui/_compat/theme/types.ts +0 -12
  939. package/src/ui/_compat/theme/useRootTheme.ts +0 -17
  940. package/src/ui/_compat/theme/useTheme.ts +0 -16
  941. package/src/ui/_compat/types.ts +0 -274
  942. package/src/ui/components/autocomplete/__workshop__/async.tsx +0 -157
  943. package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
  944. package/src/ui/components/autocomplete/__workshop__/custom.tsx +0 -90
  945. package/src/ui/components/autocomplete/__workshop__/example.tsx +0 -80
  946. package/src/ui/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
  947. package/src/ui/components/autocomplete/__workshop__/fullscreen.tsx +0 -293
  948. package/src/ui/components/autocomplete/__workshop__/index.ts +0 -39
  949. package/src/ui/components/autocomplete/autocomplete.tsx +0 -731
  950. package/src/ui/components/autocomplete/autocompleteOption.tsx +0 -45
  951. package/src/ui/components/autocomplete/autocompleteReducer.ts +0 -47
  952. package/src/ui/components/autocomplete/constants.ts +0 -28
  953. package/src/ui/components/autocomplete/index.ts +0 -2
  954. package/src/ui/components/autocomplete/types.ts +0 -108
  955. package/src/ui/components/breadcrumbs/__workshop__/example.tsx +0 -62
  956. package/src/ui/components/breadcrumbs/breadcrumbs.tsx +0 -127
  957. package/src/ui/components/breadcrumbs/index.ts +0 -1
  958. package/src/ui/components/dialog/__workshop__/activate.tsx +0 -134
  959. package/src/ui/components/dialog/__workshop__/autoFocus.tsx +0 -29
  960. package/src/ui/components/dialog/__workshop__/onScroll.tsx +0 -39
  961. package/src/ui/components/dialog/__workshop__/panes.tsx +0 -82
  962. package/src/ui/components/dialog/__workshop__/position.tsx +0 -30
  963. package/src/ui/components/dialog/__workshop__/props.tsx +0 -77
  964. package/src/ui/components/dialog/__workshop__/wrapped.tsx +0 -76
  965. package/src/ui/components/dialog/dialog.tsx +0 -433
  966. package/src/ui/components/dialog/dialogContext.ts +0 -20
  967. package/src/ui/components/dialog/dialogProvider.tsx +0 -35
  968. package/src/ui/components/dialog/index.ts +0 -4
  969. package/src/ui/components/dialog/useDialog.ts +0 -11
  970. package/src/ui/components/hotkeys/hotkeys.tsx +0 -54
  971. package/src/ui/components/hotkeys/index.ts +0 -1
  972. package/src/ui/components/index.ts +0 -9
  973. package/src/ui/components/menu/__workshop__/asComponent.tsx +0 -45
  974. package/src/ui/components/menu/__workshop__/avatarMenu.tsx +0 -51
  975. package/src/ui/components/menu/__workshop__/closableMenuButton.tsx +0 -46
  976. package/src/ui/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
  977. package/src/ui/components/menu/__workshop__/customMenuItem.tsx +0 -45
  978. package/src/ui/components/menu/__workshop__/customSelectedState.tsx +0 -39
  979. package/src/ui/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
  980. package/src/ui/components/menu/__workshop__/groups.tsx +0 -156
  981. package/src/ui/components/menu/__workshop__/menuButton.tsx +0 -80
  982. package/src/ui/components/menu/__workshop__/menuGroupRight.tsx +0 -65
  983. package/src/ui/components/menu/__workshop__/nestedMenu.tsx +0 -22
  984. package/src/ui/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
  985. package/src/ui/components/menu/__workshop__/selectedItem.tsx +0 -69
  986. package/src/ui/components/menu/__workshop__/shouldFocus.tsx +0 -47
  987. package/src/ui/components/menu/__workshop__/tones.tsx +0 -25
  988. package/src/ui/components/menu/__workshop__/withoutArrow.tsx +0 -32
  989. package/src/ui/components/menu/helpers.ts +0 -82
  990. package/src/ui/components/menu/index.ts +0 -5
  991. package/src/ui/components/menu/menu.test.tsx +0 -128
  992. package/src/ui/components/menu/menu.tsx +0 -200
  993. package/src/ui/components/menu/menuButton.tsx +0 -275
  994. package/src/ui/components/menu/menuContext.ts +0 -31
  995. package/src/ui/components/menu/menuDivider.tsx +0 -22
  996. package/src/ui/components/menu/menuGroup.tsx +0 -228
  997. package/src/ui/components/menu/menuItem.tsx +0 -180
  998. package/src/ui/components/menu/useMenu.ts +0 -21
  999. package/src/ui/components/menu/useMenuController.ts +0 -241
  1000. package/src/ui/components/skeleton/__workshop__/delay.tsx +0 -70
  1001. package/src/ui/components/skeleton/__workshop__/index.ts +0 -11
  1002. package/src/ui/components/skeleton/__workshop__/skeleton.tsx +0 -64
  1003. package/src/ui/components/skeleton/index.ts +0 -2
  1004. package/src/ui/components/skeleton/skeleton.tsx +0 -53
  1005. package/src/ui/components/skeleton/textSkeleton.tsx +0 -132
  1006. package/src/ui/components/tab/__workshop__/example.tsx +0 -79
  1007. package/src/ui/components/tab/index.ts +0 -3
  1008. package/src/ui/components/tab/tab.tsx +0 -105
  1009. package/src/ui/components/tab/tabList.tsx +0 -74
  1010. package/src/ui/components/tab/tabPanel.tsx +0 -40
  1011. package/src/ui/components/toast/__workshop__/hook.tsx +0 -71
  1012. package/src/ui/components/toast/__workshop__/toast.tsx +0 -26
  1013. package/src/ui/components/toast/index.ts +0 -4
  1014. package/src/ui/components/toast/toast.test.tsx +0 -101
  1015. package/src/ui/components/toast/toast.tsx +0 -211
  1016. package/src/ui/components/toast/toastContext.ts +0 -7
  1017. package/src/ui/components/toast/toastLayer.tsx +0 -38
  1018. package/src/ui/components/toast/toastProvider.tsx +0 -113
  1019. package/src/ui/components/toast/types.ts +0 -28
  1020. package/src/ui/components/toast/useToast.ts +0 -25
  1021. package/src/ui/components/tree/__workshop__/basic.perf.ts +0 -19
  1022. package/src/ui/components/tree/__workshop__/basic.tsx +0 -105
  1023. package/src/ui/components/tree/__workshop__/tabFromElement.tsx +0 -84
  1024. package/src/ui/components/tree/helpers.ts +0 -105
  1025. package/src/ui/components/tree/index.ts +0 -4
  1026. package/src/ui/components/tree/tree.tsx +0 -244
  1027. package/src/ui/components/tree/treeContext.ts +0 -10
  1028. package/src/ui/components/tree/treeGroup.tsx +0 -30
  1029. package/src/ui/components/tree/treeItem.tsx +0 -220
  1030. package/src/ui/components/tree/types.ts +0 -25
  1031. package/src/ui/components/tree/useTree.ts +0 -17
  1032. package/src/ui/constants.ts +0 -79
  1033. package/src/ui/helpers/focus.ts +0 -100
  1034. package/src/ui/helpers/index.ts +0 -5
  1035. package/src/ui/helpers/props.ts +0 -10
  1036. package/src/ui/hooks/index.ts +0 -12
  1037. package/src/ui/hooks/useArrayProp.ts +0 -29
  1038. package/src/ui/hooks/useClickOutside.test.tsx +0 -482
  1039. package/src/ui/hooks/useClickOutside.ts +0 -117
  1040. package/src/ui/hooks/useClickOutsideEvent.test.tsx +0 -115
  1041. package/src/ui/hooks/useClickOutsideEvent.ts +0 -73
  1042. package/src/ui/hooks/useDelayed.test.ts +0 -68
  1043. package/src/ui/hooks/useDelayedState.ts +0 -28
  1044. package/src/ui/hooks/useElementRect/__workshop__/example.tsx +0 -32
  1045. package/src/ui/hooks/useElementRect/index.ts +0 -1
  1046. package/src/ui/hooks/useElementSize.ts +0 -19
  1047. package/src/ui/hooks/useForwardedRef.ts +0 -19
  1048. package/src/ui/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
  1049. package/src/ui/hooks/useMediaIndex/index.ts +0 -1
  1050. package/src/ui/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -36
  1051. package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -104
  1052. package/src/ui/hooks/usePrefersDark.hydration.test.tsx +0 -56
  1053. package/src/ui/hooks/usePrefersDark.test.tsx +0 -19
  1054. package/src/ui/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -56
  1055. package/src/ui/hooks/usePrefersReducedMotion.test.tsx +0 -19
  1056. package/src/ui/index.ts +0 -9
  1057. package/src/ui/middleware/origin.ts +0 -47
  1058. package/src/ui/observers/elementSizeObserver.ts +0 -116
  1059. package/src/ui/observers/index.ts +0 -2
  1060. package/src/ui/primitives/_selectable/index.ts +0 -1
  1061. package/src/ui/primitives/_selectable/selectable.tsx +0 -31
  1062. package/src/ui/primitives/avatar/__workshop__/asButton.tsx +0 -14
  1063. package/src/ui/primitives/avatar/__workshop__/stack.tsx +0 -25
  1064. package/src/ui/primitives/avatar/__workshop__/withinButton.tsx +0 -63
  1065. package/src/ui/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
  1066. package/src/ui/primitives/avatar/avatar.tsx +0 -158
  1067. package/src/ui/primitives/avatar/avatarCounter.tsx +0 -62
  1068. package/src/ui/primitives/avatar/avatarStack.tsx +0 -82
  1069. package/src/ui/primitives/avatar/index.ts +0 -4
  1070. package/src/ui/primitives/avatar/types.ts +0 -17
  1071. package/src/ui/primitives/badge/__workshop__/props.tsx +0 -30
  1072. package/src/ui/primitives/badge/__workshop__/tones.tsx +0 -21
  1073. package/src/ui/primitives/badge/badge.test.tsx +0 -16
  1074. package/src/ui/primitives/badge/badge.tsx +0 -64
  1075. package/src/ui/primitives/badge/index.ts +0 -1
  1076. package/src/ui/primitives/badge/types.ts +0 -8
  1077. package/src/ui/primitives/box/__workshop__/props.tsx +0 -20
  1078. package/src/ui/primitives/box/__workshop__/responsive.tsx +0 -20
  1079. package/src/ui/primitives/box/box.tsx +0 -155
  1080. package/src/ui/primitives/box/index.ts +0 -1
  1081. package/src/ui/primitives/button/__workshop__/custom.tsx +0 -50
  1082. package/src/ui/primitives/button/__workshop__/customIcons.tsx +0 -30
  1083. package/src/ui/primitives/button/__workshop__/disabled.tsx +0 -74
  1084. package/src/ui/primitives/button/__workshop__/index.ts +0 -59
  1085. package/src/ui/primitives/button/__workshop__/props.tsx +0 -58
  1086. package/src/ui/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
  1087. package/src/ui/primitives/button/__workshop__/stacked.tsx +0 -59
  1088. package/src/ui/primitives/button/__workshop__/uploadButton.tsx +0 -28
  1089. package/src/ui/primitives/button/button.test.tsx +0 -44
  1090. package/src/ui/primitives/button/button.tsx +0 -206
  1091. package/src/ui/primitives/button/index.ts +0 -1
  1092. package/src/ui/primitives/card/__workshop__/allTones.tsx +0 -27
  1093. package/src/ui/primitives/card/__workshop__/asButton.tsx +0 -107
  1094. package/src/ui/primitives/card/__workshop__/asComponent.tsx +0 -27
  1095. package/src/ui/primitives/card/__workshop__/checkered.tsx +0 -26
  1096. package/src/ui/primitives/card/__workshop__/index.ts +0 -18
  1097. package/src/ui/primitives/card/__workshop__/interactive.tsx +0 -30
  1098. package/src/ui/primitives/card/__workshop__/listNavigation.tsx +0 -80
  1099. package/src/ui/primitives/card/__workshop__/props.tsx +0 -55
  1100. package/src/ui/primitives/card/__workshop__/selected.tsx +0 -93
  1101. package/src/ui/primitives/card/card.tsx +0 -119
  1102. package/src/ui/primitives/card/cardContext.ts +0 -10
  1103. package/src/ui/primitives/card/cardProvider.tsx +0 -19
  1104. package/src/ui/primitives/card/index.ts +0 -4
  1105. package/src/ui/primitives/card/types.ts +0 -27
  1106. package/src/ui/primitives/card/useCard.ts +0 -7
  1107. package/src/ui/primitives/checkbox/__workshop__/props.tsx +0 -33
  1108. package/src/ui/primitives/checkbox/__workshop__/tones.tsx +0 -28
  1109. package/src/ui/primitives/checkbox/checkbox.tsx +0 -74
  1110. package/src/ui/primitives/checkbox/index.ts +0 -1
  1111. package/src/ui/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
  1112. package/src/ui/primitives/code/__workshop__/props.tsx +0 -21
  1113. package/src/ui/primitives/code/code.tsx +0 -49
  1114. package/src/ui/primitives/code/index.ts +0 -1
  1115. package/src/ui/primitives/code/refractor.tsx +0 -20
  1116. package/src/ui/primitives/container/__workshop__/example.tsx +0 -20
  1117. package/src/ui/primitives/container/container.tsx +0 -35
  1118. package/src/ui/primitives/container/index.ts +0 -2
  1119. package/src/ui/primitives/flex/__workshop__/example.tsx +0 -34
  1120. package/src/ui/primitives/flex/flex.tsx +0 -29
  1121. package/src/ui/primitives/flex/index.ts +0 -1
  1122. package/src/ui/primitives/grid/grid.tsx +0 -30
  1123. package/src/ui/primitives/grid/index.ts +0 -1
  1124. package/src/ui/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
  1125. package/src/ui/primitives/heading/__workshop__/plain.tsx +0 -32
  1126. package/src/ui/primitives/heading/heading.tsx +0 -62
  1127. package/src/ui/primitives/heading/index.ts +0 -1
  1128. package/src/ui/primitives/index.ts +0 -27
  1129. package/src/ui/primitives/inline/__workshop__/plain.tsx +0 -27
  1130. package/src/ui/primitives/inline/index.ts +0 -1
  1131. package/src/ui/primitives/inline/inline.tsx +0 -50
  1132. package/src/ui/primitives/inline/types.ts +0 -6
  1133. package/src/ui/primitives/kbd/index.ts +0 -1
  1134. package/src/ui/primitives/kbd/kbd.tsx +0 -55
  1135. package/src/ui/primitives/label/__workshop__/plain.tsx +0 -37
  1136. package/src/ui/primitives/label/index.ts +0 -1
  1137. package/src/ui/primitives/label/label.tsx +0 -67
  1138. package/src/ui/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
  1139. package/src/ui/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  1140. package/src/ui/primitives/popover/__workshop__/PlainStory.tsx +0 -71
  1141. package/src/ui/primitives/popover/__workshop__/RecursiveStory.tsx +0 -70
  1142. package/src/ui/primitives/popover/__workshop__/SidePanelStory.tsx +0 -93
  1143. package/src/ui/primitives/popover/__workshop__/TestStory.tsx +0 -98
  1144. package/src/ui/primitives/popover/constants.ts +0 -22
  1145. package/src/ui/primitives/popover/floating-ui/size.ts +0 -83
  1146. package/src/ui/primitives/popover/helpers.ts +0 -32
  1147. package/src/ui/primitives/popover/index.ts +0 -2
  1148. package/src/ui/primitives/popover/popover.tsx +0 -492
  1149. package/src/ui/primitives/popover/popoverCard.tsx +0 -155
  1150. package/src/ui/primitives/popover/types.ts +0 -6
  1151. package/src/ui/primitives/radio/__workshop__/example.tsx +0 -63
  1152. package/src/ui/primitives/radio/__workshop__/plain.tsx +0 -28
  1153. package/src/ui/primitives/radio/index.ts +0 -1
  1154. package/src/ui/primitives/radio/radio.tsx +0 -49
  1155. package/src/ui/primitives/select/__workshop__/plain.tsx +0 -30
  1156. package/src/ui/primitives/select/__workshop__/readOnly.tsx +0 -23
  1157. package/src/ui/primitives/select/index.ts +0 -1
  1158. package/src/ui/primitives/select/select.tsx +0 -85
  1159. package/src/ui/primitives/spinner/__workshop__/Props.tsx +0 -16
  1160. package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +0 -16
  1161. package/src/ui/primitives/spinner/index.ts +0 -1
  1162. package/src/ui/primitives/spinner/spinner.tsx +0 -33
  1163. package/src/ui/primitives/stack/__workshop__/plain.tsx +0 -32
  1164. package/src/ui/primitives/stack/index.ts +0 -1
  1165. package/src/ui/primitives/stack/stack.tsx +0 -40
  1166. package/src/ui/primitives/switch/index.ts +0 -1
  1167. package/src/ui/primitives/switch/switch.tsx +0 -75
  1168. package/src/ui/primitives/text/__workshop__/colored.tsx +0 -23
  1169. package/src/ui/primitives/text/__workshop__/example.tsx +0 -39
  1170. package/src/ui/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
  1171. package/src/ui/primitives/text/index.ts +0 -1
  1172. package/src/ui/primitives/text/text.tsx +0 -64
  1173. package/src/ui/primitives/textArea/__workshop__/plain.tsx +0 -50
  1174. package/src/ui/primitives/textArea/index.ts +0 -1
  1175. package/src/ui/primitives/textArea/textArea.tsx +0 -71
  1176. package/src/ui/primitives/textInput/__workshop__/customValidity.tsx +0 -17
  1177. package/src/ui/primitives/textInput/__workshop__/plain.tsx +0 -104
  1178. package/src/ui/primitives/textInput/__workshop__/states.tsx +0 -53
  1179. package/src/ui/primitives/textInput/__workshop__/tones.tsx +0 -277
  1180. package/src/ui/primitives/textInput/__workshop__/typed.tsx +0 -23
  1181. package/src/ui/primitives/textInput/index.ts +0 -1
  1182. package/src/ui/primitives/textInput/textInput.tsx +0 -286
  1183. package/src/ui/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
  1184. package/src/ui/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
  1185. package/src/ui/primitives/tooltip/__workshop__/props.tsx +0 -111
  1186. package/src/ui/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
  1187. package/src/ui/primitives/tooltip/constants.ts +0 -23
  1188. package/src/ui/primitives/tooltip/index.ts +0 -2
  1189. package/src/ui/primitives/tooltip/tooltip.test.tsx +0 -453
  1190. package/src/ui/primitives/tooltip/tooltip.tsx +0 -467
  1191. package/src/ui/primitives/tooltip/tooltipCard.tsx +0 -115
  1192. package/src/ui/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -11
  1193. package/src/ui/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
  1194. package/src/ui/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -13
  1195. package/src/ui/primitives/types.ts +0 -166
  1196. package/src/ui/types/avatar.ts +0 -19
  1197. package/src/ui/types/badge.ts +0 -12
  1198. package/src/ui/types/button.ts +0 -24
  1199. package/src/ui/types/card.ts +0 -6
  1200. package/src/ui/types/dialog.ts +0 -4
  1201. package/src/ui/types/flex.ts +0 -27
  1202. package/src/ui/types/index.ts +0 -15
  1203. package/src/ui/types/popover.ts +0 -4
  1204. package/src/ui/types/props.ts +0 -18
  1205. package/src/ui/types/radius.ts +0 -7
  1206. package/src/ui/types/selectable.ts +0 -7
  1207. package/src/ui/utils/arrow/arrow.tsx +0 -59
  1208. package/src/ui/utils/arrow/index.ts +0 -1
  1209. package/src/ui/utils/boundaryElement/boundaryElement.test.tsx +0 -100
  1210. package/src/ui/utils/boundaryElement/boundaryElementContext.ts +0 -7
  1211. package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +0 -24
  1212. package/src/ui/utils/boundaryElement/index.ts +0 -3
  1213. package/src/ui/utils/boundaryElement/types.ts +0 -7
  1214. package/src/ui/utils/boundaryElement/useBoundaryElement.ts +0 -26
  1215. package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
  1216. package/src/ui/utils/conditionalWrapper/index.ts +0 -1
  1217. package/src/ui/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
  1218. package/src/ui/utils/elementQuery/elementQuery.tsx +0 -53
  1219. package/src/ui/utils/elementQuery/index.ts +0 -1
  1220. package/src/ui/utils/errorBoundary.tsx +0 -48
  1221. package/src/ui/utils/getElementRef.ts +0 -26
  1222. package/src/ui/utils/index.ts +0 -9
  1223. package/src/ui/utils/layer/__workshop__/index.ts +0 -24
  1224. package/src/ui/utils/layer/__workshop__/multipleRoots.tsx +0 -49
  1225. package/src/ui/utils/layer/__workshop__/nested.tsx +0 -98
  1226. package/src/ui/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
  1227. package/src/ui/utils/layer/getLayerContext.test.ts +0 -30
  1228. package/src/ui/utils/layer/getLayerContext.ts +0 -21
  1229. package/src/ui/utils/layer/index.ts +0 -4
  1230. package/src/ui/utils/layer/layer.test.tsx +0 -108
  1231. package/src/ui/utils/layer/layer.tsx +0 -112
  1232. package/src/ui/utils/layer/layerContext.ts +0 -7
  1233. package/src/ui/utils/layer/layerProvider.tsx +0 -110
  1234. package/src/ui/utils/layer/useLayer.ts +0 -26
  1235. package/src/ui/utils/portal/__workshop__/named.tsx +0 -63
  1236. package/src/ui/utils/portal/index.ts +0 -4
  1237. package/src/ui/utils/portal/portal.test.tsx +0 -103
  1238. package/src/ui/utils/portal/portal.ts +0 -46
  1239. package/src/ui/utils/portal/portalContext.ts +0 -31
  1240. package/src/ui/utils/portal/portalProvider.tsx +0 -79
  1241. package/src/ui/utils/portal/types.ts +0 -9
  1242. package/src/ui/utils/portal/usePortal.ts +0 -25
  1243. package/src/ui/utils/srOnly/index.ts +0 -1
  1244. package/src/ui/utils/srOnly/srOnly.tsx +0 -35
  1245. package/src/ui/utils/virtualList/__workshop__/index.ts +0 -29
  1246. package/src/ui/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
  1247. package/src/ui/utils/virtualList/index.ts +0 -1
  1248. package/src/ui/utils/virtualList/virtualList.tsx +0 -189
  1249. /package/src/{ui/global.ts → core/__DEV__.ts} +0 -0
  1250. /package/src/{ui/components/autocomplete/__mocks__ → core/components/autocomplete/__workshop__/mock}/apiStore.ts +0 -0
  1251. /package/src/{ui/components/autocomplete/__mocks__ → core/components/autocomplete/__workshop__/mock}/countries.ts +0 -0
  1252. /package/src/{ui → core}/components/autocomplete/__workshop__/types.ts +0 -0
  1253. /package/src/{ui → core}/components/breadcrumbs/__workshop__/index.ts +0 -0
  1254. /package/src/{ui → core}/components/dialog/__workshop__/index.ts +0 -0
  1255. /package/src/{ui → core}/components/dialog/__workshop__/layering.tsx +0 -0
  1256. /package/src/{ui → core}/components/dialog/__workshop__/nested.tsx +0 -0
  1257. /package/src/{ui → core}/components/dialog/__workshop__/provider.tsx +0 -0
  1258. /package/src/{ui → core}/components/hotkeys/__workshop__/index.ts +0 -0
  1259. /package/src/{ui → core}/components/hotkeys/__workshop__/plain.tsx +0 -0
  1260. /package/src/{ui → core}/components/menu/__workshop__/index.ts +0 -0
  1261. /package/src/{ui → core}/components/tab/__workshop__/index.ts +0 -0
  1262. /package/src/{ui → core}/components/toast/__workshop__/index.ts +0 -0
  1263. /package/src/{ui → core}/components/toast/toastState.ts +0 -0
  1264. /package/src/{ui → core}/components/tree/__workshop__/index.ts +0 -0
  1265. /package/src/{ui/utils → core/components}/virtualList/__workshop__/changingProps.tsx +0 -0
  1266. /package/src/{ui/utils → core/components}/virtualList/__workshop__/elementScroll.tsx +0 -0
  1267. /package/src/{ui/utils → core/components}/virtualList/__workshop__/windowScrolll.tsx +0 -0
  1268. /package/src/{ui → core}/helpers/animation.ts +0 -0
  1269. /package/src/{ui → core}/helpers/element.ts +0 -0
  1270. /package/src/{ui → core}/helpers/scroll.ts +0 -0
  1271. /package/src/{ui → core}/hooks/useCustomValidity.ts +0 -0
  1272. /package/src/{ui → core}/hooks/useElementRect/__workshop__/index.ts +0 -0
  1273. /package/src/{ui → core}/hooks/useElementRect/useElementRect.ts +0 -0
  1274. /package/src/{ui → core}/hooks/useGlobalKeyDown.ts +0 -0
  1275. /package/src/{ui → core}/hooks/useIsomorphicEffect.ts +0 -0
  1276. /package/src/{ui → core}/hooks/useMatchMedia.ts +0 -0
  1277. /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/index.ts +0 -0
  1278. /package/src/{ui → core}/hooks/useMounted.ts +0 -0
  1279. /package/src/{ui → core}/hooks/usePrefersDark.ts +0 -0
  1280. /package/src/{ui → core}/hooks/usePrefersReducedMotion.ts +0 -0
  1281. /package/src/{ui → core}/lib/createGlobalScopedContext.ts +0 -0
  1282. /package/src/{ui → core}/lib/globalScope.ts +0 -0
  1283. /package/src/{theme/build → core}/lib/isRecord.ts +0 -0
  1284. /package/src/{ui/observers/resizeObserver.ts → core/observers/resize.ts} +0 -0
  1285. /package/src/{ui/utils → core/primitives}/arrow/cmds.ts +0 -0
  1286. /package/src/{ui → core}/primitives/avatar/__workshop__/index.ts +0 -0
  1287. /package/src/{ui → core}/primitives/badge/__workshop__/index.ts +0 -0
  1288. /package/src/{ui → core}/primitives/box/__workshop__/index.ts +0 -0
  1289. /package/src/{ui/types/box.ts → core/primitives/box/types.ts} +0 -0
  1290. /package/src/{ui → core}/primitives/button/__workshop__/mixedChildren.tsx +0 -0
  1291. /package/src/{ui → core}/primitives/button/__workshop__/styled1.tsx +0 -0
  1292. /package/src/{ui → core}/primitives/button/__workshop__/styled2.tsx +0 -0
  1293. /package/src/{ui → core}/primitives/card/__workshop__/styled.tsx +0 -0
  1294. /package/src/{ui → core}/primitives/checkbox/__workshop__/example.tsx +0 -0
  1295. /package/src/{ui → core}/primitives/checkbox/__workshop__/index.ts +0 -0
  1296. /package/src/{ui → core}/primitives/checkbox/__workshop__/readOnly.tsx +0 -0
  1297. /package/src/{ui → core}/primitives/code/__workshop__/index.ts +0 -0
  1298. /package/src/{ui → core}/primitives/container/__workshop__/index.ts +0 -0
  1299. /package/src/{ui → core}/primitives/container/types.ts +0 -0
  1300. /package/src/{ui → core}/primitives/flex/__workshop__/gap.tsx +0 -0
  1301. /package/src/{ui → core}/primitives/flex/__workshop__/index.ts +0 -0
  1302. /package/src/{ui → core}/primitives/grid/__workshop__/index.ts +0 -0
  1303. /package/src/{ui → core}/primitives/grid/__workshop__/responsive.tsx +0 -0
  1304. /package/src/{ui/types/grid.ts → core/primitives/grid/types.ts} +0 -0
  1305. /package/src/{ui → core}/primitives/heading/__workshop__/index.ts +0 -0
  1306. /package/src/{ui → core}/primitives/inline/__workshop__/index.ts +0 -0
  1307. /package/src/{ui → core}/primitives/kbd/__workshop__/index.ts +0 -0
  1308. /package/src/{ui → core}/primitives/kbd/__workshop__/plain.tsx +0 -0
  1309. /package/src/{ui → core}/primitives/label/__workshop__/index.ts +0 -0
  1310. /package/src/{ui → core}/primitives/label/__workshop__/opticalAlignment.tsx +0 -0
  1311. /package/src/{ui/utils → core/primitives}/layer/__workshop__/_debug.tsx +0 -0
  1312. /package/src/{ui/utils → core/primitives}/layer/types.ts +0 -0
  1313. /package/src/{ui → core}/primitives/popover/__workshop__/MarginsStory.tsx +0 -0
  1314. /package/src/{ui → core}/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -0
  1315. /package/src/{ui → core}/primitives/popover/__workshop__/index.ts +0 -0
  1316. /package/src/{ui → core}/primitives/radio/__workshop__/index.ts +0 -0
  1317. /package/src/{ui → core}/primitives/select/__workshop__/index.ts +0 -0
  1318. /package/src/{ui → core}/primitives/spinner/__workshop__/index.ts +0 -0
  1319. /package/src/{ui → core}/primitives/stack/__workshop__/index.ts +0 -0
  1320. /package/src/{ui → core}/primitives/switch/__workshop__/example.tsx +0 -0
  1321. /package/src/{ui → core}/primitives/switch/__workshop__/index.ts +0 -0
  1322. /package/src/{ui → core}/primitives/switch/__workshop__/props.tsx +0 -0
  1323. /package/src/{ui → core}/primitives/text/__workshop__/index.ts +0 -0
  1324. /package/src/{ui → core}/primitives/textArea/__workshop__/index.ts +0 -0
  1325. /package/src/{ui → core}/primitives/textInput/__workshop__/clearButton.tsx +0 -0
  1326. /package/src/{ui → core}/primitives/textInput/__workshop__/index.ts +0 -0
  1327. /package/src/{ui → core}/primitives/textInput/__workshop__/readOnly.tsx +0 -0
  1328. /package/src/{ui → core}/primitives/tooltip/__workshop__/index.ts +0 -0
  1329. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/index.ts +0 -0
  1330. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/types.ts +0 -0
  1331. /package/src/{ui → core}/types/gridItem.ts +0 -0
  1332. /package/src/{ui → core}/types/placement.ts +0 -0
  1333. /package/src/{ui/types/text.ts → core/types/textAlign.ts} +0 -0
  1334. /package/src/{ui → core}/utils/boundaryElement/__workshop__/index.ts +0 -0
  1335. /package/src/{ui → core}/utils/boundaryElement/__workshop__/plain.tsx +0 -0
  1336. /package/src/{ui → core}/utils/elementQuery/__workshop__/index.ts +0 -0
  1337. /package/src/{ui → core}/utils/elementQuery/helpers.ts +0 -0
  1338. /package/src/{ui → core}/utils/portal/__workshop__/index.ts +0 -0
  1339. /package/src/{ui → core}/utils/spanWithTextOverflow.tsx +0 -0
  1340. /package/src/css/{aspects → props}/pointerEvents/types.ts +0 -0
  1341. /package/src/theme/{build → v2/build}/_deprecated/color/index.ts +0 -0
  1342. /package/src/theme/{build → v2/build}/colorToken/index.ts +0 -0
  1343. /package/src/theme/{build → v2/build}/index.ts +0 -0
  1344. /package/src/theme/{build → v2/build}/lib/color-fns/blend/index.ts +0 -0
  1345. /package/src/theme/{build → v2/build}/lib/color-fns/index.ts +0 -0
  1346. /package/src/theme/{build → v2/build}/lib/color-fns/rgba.ts +0 -0
  1347. /package/src/theme/{build → v2/build}/lib/color-fns/types.ts +0 -0
  1348. /package/src/{ui → theme/v2/build}/lib/isRecord.ts +0 -0
  1349. /package/src/theme/{build → v2/build}/lib/utils.ts +0 -0
  1350. /package/src/theme/{build → v2/build}/merge.ts +0 -0
  1351. /package/src/theme/{config → v2/config}/index.ts +0 -0
  1352. /package/src/theme/{config → v2/config}/tokens/color/index.ts +0 -0
  1353. /package/src/theme/{palette → v3/palette}/index.ts +0 -0
package/dist/index.js CHANGED
@@ -1,6 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), css = require("@sanity/ui/css"), jsxRuntime = require("react/jsx-runtime"), icons = require("@sanity/icons"), react = require("react"), reactCompilerRuntime = require("react-compiler-runtime"), framerMotion = require("framer-motion"), theme = require("@sanity/ui/theme");
1
+ import { createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1 } from "@sanity/ui/theme";
2
+ import { isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, isHTMLElement, _isEnterToClickElement, Selectable, Text, useResponsiveProp, EMPTY_ARRAY, EMPTY_RECORD, Box, Button, Stack, Popover, TextInput, AnimatedSpinnerIcon, useClickOutsideEvent, Flex, containsOrEqualsElement, usePortal, useBoundaryElement, useLayer, useGlobalKeyDown, Card, createGlobalScopedContext, usePrefersReducedMotion, Portal, Z_OFFSETS, Layer, Grid, LayerProvider, isRecord, _getArrayProp, useCustomValidity, BoundaryElementContext, CardProvider, PortalProvider, useDelayedState, TooltipDelayGroupContext } from "./_chunks-es/_visual-editing.js";
3
+ import { Arrow, DEFAULT_ARROW_ELEMENT, DEFAULT_BOX_ELEMENT, DEFAULT_BUTTON_ELEMENT, DEFAULT_CARD_ELEMENT, DEFAULT_FLEX_ELEMENT, DEFAULT_GRID_ELEMENT, DEFAULT_HOTKEYS_ELEMENT, DEFAULT_KBD_ELEMENT, DEFAULT_LAYER_ELEMENT, DEFAULT_MENU_DIVIDER_ELEMENT, DEFAULT_MENU_ELEMENT, DEFAULT_MENU_GROUP_ELEMENT, DEFAULT_MENU_ITEM_ELEMENT, DEFAULT_POPOVER_ELEMENT, DEFAULT_SELECTABLE_ELEMENT, DEFAULT_SPINNER_ELEMENT, DEFAULT_STACK_ELEMENT, DEFAULT_TAB_ELEMENT, DEFAULT_TAB_LIST_ELEMENT, DEFAULT_TEXT_ELEMENT, DEFAULT_TEXT_INPUT_ELEMENT, DEFAULT_TOOLTIP_ELEMENT, Hotkeys, KBD, Menu, MenuDivider, MenuGroup, MenuItem, Spinner, Tab, TabList, ThemeColorProvider, ThemeProvider, Tooltip, _getResponsiveProp, useCard, useMatchMedia, useMediaIndex, usePrefersDark, useRootTheme, useTheme, useTheme_v2, useTooltipDelayGroup } from "./_chunks-es/_visual-editing.js";
4
+ import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
5
+ import { ChevronDownIcon, CloseIcon, ToggleArrowRightIcon, CheckmarkIcon, RemoveIcon } from "@sanity/icons";
6
+ import { useReducer, useCallback, useRef, useImperativeHandle, useMemo, useEffect, cloneElement, useState, Children, isValidElement, Fragment, useContext, useSyncExternalStore, startTransition, memo, useId, lazy, Suspense, Component } from "react";
7
+ import { c } from "react/compiler-runtime";
8
+ import { breadcrumbs, container as container$1, dialogCard, dialogHeader, dialogContent, dialogScrollerShadowTop, dialogScroller, dialogScrollerShadowBottom, dialogFooter, dialog, dialogContainer, toast, toastLayer, treeItem, vars, label, textOverflow, avatar, avatarArrow, avatarInitials, avatarImage, avatarImageOutline, avatarCounter, avatarStack, badge, checkbox, checkboxInput, checkboxPresentation, code, heading, radio, radioInput, radioPresentation, box, root, select, _inputElement, selectPresentation, skeleton, codeSkeleton, headingSkeleton, labelSkeleton, textSkeleton, srOnly, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, _inputPresentation, BREAKPOINTS } from "@sanity/ui/css";
9
+ import { px, rem } from "@sanity/ui/css";
10
+ import { motion, AnimatePresence } from "framer-motion";
11
+ import { ResizeObserver } from "@juggle/resize-observer";
12
+ const createColorTheme = createColorTheme$1, hexToRgb = hexToRgb$1, hslToRgb = hslToRgb$1, multiply = multiply$1, parseColor = parseColor$1, rgbToHex = rgbToHex$1, rgbToHsl = rgbToHsl$1, rgba = rgba$1, screen = screen$1;
4
13
  function _responsive(media, values, callback) {
5
14
  return (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : {
6
15
  [`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement
@@ -25,7 +34,7 @@ function _hasFocus(element) {
25
34
  return !!document.activeElement && element.contains(document.activeElement);
26
35
  }
27
36
  function isFocusable(element) {
28
- return element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null ? !0 : _visualEditing.isHTMLAnchorElement(element) ? !!element.href && element.rel !== "ignore" : _visualEditing.isHTMLInputElement(element) ? element.type !== "hidden" && element.type !== "file" && !element.disabled : _visualEditing.isHTMLButtonElement(element) || _visualEditing.isHTMLSelectElement(element) || _visualEditing.isHTMLTextAreaElement(element) ? !element.disabled : !1;
37
+ return element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute("tabIndex") !== null ? !0 : isHTMLAnchorElement(element) ? !!element.href && element.rel !== "ignore" : isHTMLInputElement(element) ? element.type !== "hidden" && element.type !== "file" && !element.disabled : isHTMLButtonElement(element) || isHTMLSelectElement(element) || isHTMLTextAreaElement(element) ? !element.disabled : !1;
29
38
  }
30
39
  function attemptFocus(element) {
31
40
  if (!isFocusable(element))
@@ -39,7 +48,7 @@ function attemptFocus(element) {
39
48
  function focusFirstDescendant(element) {
40
49
  for (let i = 0; i < element.childNodes.length; i++) {
41
50
  const child = element.childNodes[i];
42
- if (_visualEditing.isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child)))
51
+ if (isHTMLElement(child) && (attemptFocus(child) || focusFirstDescendant(child)))
43
52
  return !0;
44
53
  }
45
54
  return !1;
@@ -47,94 +56,13 @@ function focusFirstDescendant(element) {
47
56
  function focusLastDescendant(element) {
48
57
  for (let i = element.childNodes.length - 1; i >= 0; i--) {
49
58
  const child = element.childNodes[i];
50
- if (_visualEditing.isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child)))
59
+ if (isHTMLElement(child) && (attemptFocus(child) || focusLastDescendant(child)))
51
60
  return !0;
52
61
  }
53
62
  return !1;
54
63
  }
55
- function _getElements(element, elementsArg) {
56
- const ret = [element];
57
- for (const el of elementsArg)
58
- Array.isArray(el) ? ret.push(...el) : ret.push(el);
59
- return ret.filter(Boolean);
60
- }
61
- function useClickOutside(listener, t0, boundaryElement) {
62
- const $ = reactCompilerRuntime.c(12), elementsArg = t0 === void 0 ? _visualEditing.EMPTY_ARRAY : t0, [element, setElement] = react.useState(null);
63
- let t1;
64
- $[0] !== element || $[1] !== elementsArg ? (t1 = () => _getElements(element, elementsArg), $[0] = element, $[1] = elementsArg, $[2] = t1) : t1 = $[2];
65
- const [elements, setElements] = react.useState(t1), elementsRef = react.useRef(elements);
66
- let t2, t3;
67
- $[3] !== element || $[4] !== elementsArg ? (t2 = () => {
68
- const prevElements = elementsRef.current, nextElements = _getElements(element, elementsArg);
69
- if (prevElements.length !== nextElements.length) {
70
- setElements(nextElements), elementsRef.current = nextElements;
71
- return;
72
- }
73
- for (const el of prevElements)
74
- if (!nextElements.includes(el)) {
75
- setElements(nextElements), elementsRef.current = nextElements;
76
- return;
77
- }
78
- for (const el_0 of nextElements)
79
- if (!prevElements.includes(el_0)) {
80
- setElements(nextElements), elementsRef.current = nextElements;
81
- return;
82
- }
83
- }, t3 = [element, elementsArg], $[3] = element, $[4] = elementsArg, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), react.useEffect(t2, t3);
84
- let t4, t5;
85
- return $[7] !== boundaryElement || $[8] !== elements || $[9] !== listener ? (t4 = () => {
86
- if (!listener)
87
- return;
88
- const handleWindowMouseDown = (evt) => {
89
- const target = evt.target;
90
- if (target instanceof Node && !(boundaryElement && !boundaryElement.contains(target))) {
91
- for (const el_1 of elements)
92
- if (target === el_1 || el_1.contains(target))
93
- return;
94
- listener(evt);
95
- }
96
- };
97
- return window.addEventListener("mousedown", handleWindowMouseDown), () => {
98
- window.removeEventListener("mousedown", handleWindowMouseDown);
99
- };
100
- }, t5 = [boundaryElement, listener, elements], $[7] = boundaryElement, $[8] = elements, $[9] = listener, $[10] = t4, $[11] = t5) : (t4 = $[10], t5 = $[11]), react.useEffect(t4, t5), setElement;
101
- }
102
- function useElementRect(element) {
103
- return _visualEditing.useElementSize(element)?._contentRect || null;
104
- }
105
- function useForwardedRef(ref) {
106
- const $ = reactCompilerRuntime.c(1), innerRef = react.useRef(null);
107
- let t0;
108
- return $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => innerRef.current, $[0] = t0) : t0 = $[0], react.useImperativeHandle(ref, t0), innerRef;
109
- }
110
- class ErrorBoundary extends react.Component {
111
- state = {
112
- error: null
113
- };
114
- static getDerivedStateFromError(error) {
115
- return {
116
- error
117
- };
118
- }
119
- componentDidCatch(error, info) {
120
- this.props.onCatch({
121
- error,
122
- info
123
- });
124
- }
125
- render() {
126
- const {
127
- error
128
- } = this.state;
129
- if (error) {
130
- const message = typeof error?.message == "string" ? error.message : "Error";
131
- return /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Code, { children: message });
132
- }
133
- return this.props.children;
134
- }
135
- }
136
64
  function AutocompleteOption(props) {
137
- const $ = reactCompilerRuntime.c(11), {
65
+ const $ = c(11), {
138
66
  children,
139
67
  id,
140
68
  onSelect,
@@ -150,11 +78,11 @@ function AutocompleteOption(props) {
150
78
  const handleClick = t0;
151
79
  let t1;
152
80
  $[3] !== handleClick ? (t1 = (event) => {
153
- event.key === "Enter" && !_visualEditing._isEnterToClickElement(event.currentTarget) && handleClick();
81
+ event.key === "Enter" && !_isEnterToClickElement(event.currentTarget) && handleClick();
154
82
  }, $[3] = handleClick, $[4] = t1) : t1 = $[4];
155
83
  const handleKeyDown = t1;
156
84
  let t2;
157
- return $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("li", { "aria-selected": selected, "data-ui": "AutocompleteOption", id, role: "option", onClick: handleClick, onKeyDown: handleKeyDown, children }), $[5] = children, $[6] = handleClick, $[7] = handleKeyDown, $[8] = id, $[9] = selected, $[10] = t2) : t2 = $[10], t2;
85
+ return $[5] !== children || $[6] !== handleClick || $[7] !== handleKeyDown || $[8] !== id || $[9] !== selected ? (t2 = /* @__PURE__ */ jsx("li", { "aria-selected": selected, "data-ui": "AutocompleteOption", id, role: "option", onClick: handleClick, onKeyDown: handleKeyDown, children }), $[5] = children, $[6] = handleClick, $[7] = handleKeyDown, $[8] = id, $[9] = selected, $[10] = t2) : t2 = $[10], t2;
158
86
  }
159
87
  function autocompleteReducer(state, msg) {
160
88
  return msg.type === "input/change" ? {
@@ -195,16 +123,18 @@ function autocompleteReducer(state, msg) {
195
123
  value: msg.value
196
124
  } : state;
197
125
  }
198
- const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "Home", "End", "PageUp", "PageDown", "Meta", "Tab", "CapsLock"], AUTOCOMPLETE_POPOVER_PLACEMENT = "bottom-start", AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ["bottom-start", "top-start"], DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1, InnerAutocomplete = react.forwardRef(function(props, forwardedRef) {
126
+ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "Home", "End", "PageUp", "PageDown", "Meta", "Tab", "CapsLock"], AUTOCOMPLETE_POPOVER_PLACEMENT = "bottom-start", AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ["bottom-start", "top-start"], DEFAULT_AUTOCOMPLETE_ELEMENT = "input", DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value, DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1;
127
+ function Autocomplete(props) {
199
128
  const {
129
+ as = DEFAULT_AUTOCOMPLETE_ELEMENT,
200
130
  border = !0,
201
131
  customValidity,
202
132
  disabled,
203
133
  filterOption: filterOptionProp,
204
- fontSize = 1,
134
+ fontSize = 2,
205
135
  icon,
206
136
  id,
207
- listBox = _visualEditing.EMPTY_RECORD,
137
+ listBox = EMPTY_RECORD,
208
138
  loading,
209
139
  onBlur,
210
140
  onChange,
@@ -215,18 +145,19 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
215
145
  openOnFocus,
216
146
  options: optionsProp,
217
147
  padding: paddingProp = 3,
218
- popover = _visualEditing.EMPTY_RECORD,
148
+ popover = EMPTY_RECORD,
219
149
  prefix,
220
150
  radius = 2,
221
151
  readOnly,
152
+ ref: forwardedRef,
222
153
  relatedElements,
223
154
  renderOption: renderOptionProp,
224
155
  renderPopover,
225
156
  renderValue = DEFAULT_RENDER_VALUE,
226
157
  suffix,
227
158
  value: valueProp,
228
- ...restProps
229
- } = props, [state, dispatch] = react.useReducer(autocompleteReducer, {
159
+ ...rest
160
+ } = props, [state, dispatch] = useReducer(autocompleteReducer, {
230
161
  activeValue: valueProp || null,
231
162
  focused: !1,
232
163
  listFocused: !1,
@@ -238,20 +169,11 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
238
169
  listFocused,
239
170
  query,
240
171
  value
241
- } = state, defaultRenderOption = react.useCallback(({
172
+ } = state, defaultRenderOption = useCallback(({
242
173
  value: value_0
243
- }) => /* @__PURE__ */ jsxRuntime.jsx(
244
- _visualEditing.Card,
245
- {
246
- as: "button",
247
- padding: paddingProp,
248
- radius: 2,
249
- selectable: !0,
250
- children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { size: fontSize, textOverflow: "ellipsis", children: value_0 })
251
- }
252
- ), [fontSize, paddingProp]), renderOption = typeof renderOptionProp == "function" ? renderOptionProp : defaultRenderOption, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = react.useRef(null), resultsPopoverElementRef = react.useRef(null), inputElementRef = react.useRef(null), listBoxElementRef = react.useRef(null), listFocusedRef = react.useRef(!1), valueRef = react.useRef(value), valuePropRef = react.useRef(valueProp), popoverMouseWithinRef = react.useRef(!1);
253
- react.useImperativeHandle(forwardedRef, () => inputElementRef.current);
254
- const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : _visualEditing.EMPTY_ARRAY, padding = _visualEditing.useArrayProp(paddingProp), currentOption = react.useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = react.useMemo(() => options.filter((option) => query ? filterOption(query, option) : !0), [filterOption, options, query]), filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, handleRootBlur = react.useCallback((event) => {
174
+ }) => /* @__PURE__ */ jsx(Selectable, { as: "button", padding: paddingProp, radius: 2, children: /* @__PURE__ */ jsx(Text, { size: fontSize, textOverflow: "ellipsis", children: value_0 }) }), [fontSize, paddingProp]), renderOption = typeof renderOptionProp == "function" ? renderOptionProp : defaultRenderOption, filterOption = typeof filterOptionProp == "function" ? filterOptionProp : DEFAULT_FILTER_OPTION, rootElementRef = useRef(null), resultsPopoverElementRef = useRef(null), inputElementRef = useRef(null), listBoxElementRef = useRef(null), listFocusedRef = useRef(!1), valueRef = useRef(value), valuePropRef = useRef(valueProp), popoverMouseWithinRef = useRef(!1);
175
+ useImperativeHandle(forwardedRef, () => inputElementRef.current);
176
+ const listBoxId = `${id}-listbox`, options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY, padding = useResponsiveProp(paddingProp), currentOption = useMemo(() => value !== null ? options.find((o) => o.value === value) : void 0, [options, value]), filteredOptions = useMemo(() => options.filter((option) => query ? filterOption(query, option) : !0), [filterOption, options, query]), filteredOptionsLen = filteredOptions.length, activeItemId = activeValue ? `${id}-option-${activeValue}` : void 0, expanded = query !== null && loading || focused && query !== null, handleRootBlur = useCallback((event) => {
255
177
  setTimeout(() => {
256
178
  if (popoverMouseWithinRef.current)
257
179
  return;
@@ -268,18 +190,18 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
268
190
  type: "root/blur"
269
191
  }), popoverMouseWithinRef.current = !1, onQueryChange && onQueryChange(null), onBlur && onBlur(event));
270
192
  }, 0);
271
- }, [onBlur, onQueryChange, relatedElements]), handleRootFocus = react.useCallback((event_0) => {
193
+ }, [onBlur, onQueryChange, relatedElements]), handleRootFocus = useCallback((event_0) => {
272
194
  const listBoxElement = listBoxElementRef.current, focusedElement = event_0.target instanceof HTMLElement ? event_0.target : null, listFocused_0 = listBoxElement?.contains(focusedElement) || !1;
273
195
  listFocused_0 !== listFocusedRef.current && (listFocusedRef.current = listFocused_0, dispatch({
274
196
  type: "root/setListFocused",
275
197
  listFocused: listFocused_0
276
198
  }));
277
- }, []), handleOptionSelect = react.useCallback((v) => {
199
+ }, []), handleOptionSelect = useCallback((v) => {
278
200
  dispatch({
279
201
  type: "value/change",
280
202
  value: v
281
203
  }), popoverMouseWithinRef.current = !1, onSelect && onSelect(v), valueRef.current = v, onChange && onChange(v), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
282
- }, [onChange, onSelect, onQueryChange]), handleRootKeyDown = react.useCallback((event_1) => {
204
+ }, [onChange, onSelect, onQueryChange]), handleRootKeyDown = useCallback((event_1) => {
283
205
  if (event_1.key === "ArrowDown") {
284
206
  if (event_1.preventDefault(), !filteredOptionsLen) return;
285
207
  const activeOption = filteredOptions.find((o_0) => o_0.value === activeValue), activeIndex = activeOption ? filteredOptions.indexOf(activeOption) : -1, nextActiveOption = filteredOptions[(activeIndex + 1) % filteredOptionsLen];
@@ -311,35 +233,35 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
311
233
  inputElementRef.current?.focus();
312
234
  return;
313
235
  }
314
- }, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]), handleInputChange = react.useCallback((event_2) => {
236
+ }, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]), handleInputChange = useCallback((event_2) => {
315
237
  const nextQuery = event_2.currentTarget.value;
316
238
  dispatch({
317
239
  type: "input/change",
318
240
  query: nextQuery
319
241
  }), onQueryChange && onQueryChange(nextQuery);
320
- }, [onQueryChange]), dispatchOpen = react.useCallback(() => {
242
+ }, [onQueryChange]), dispatchOpen = useCallback(() => {
321
243
  dispatch({
322
244
  type: "root/open",
323
245
  query: value ? renderValue(value, currentOption) : ""
324
246
  });
325
- }, [currentOption, renderValue, value]), handleInputFocus = react.useCallback((event_3) => {
247
+ }, [currentOption, renderValue, value]), handleInputFocus = useCallback((event_3) => {
326
248
  focused || (dispatch({
327
249
  type: "input/focus"
328
250
  }), onFocus && onFocus(event_3), openOnFocus && dispatchOpen());
329
- }, [focused, onFocus, openOnFocus, dispatchOpen]), handlePopoverMouseEnter = react.useCallback(() => {
251
+ }, [focused, onFocus, openOnFocus, dispatchOpen]), handlePopoverMouseEnter = useCallback(() => {
330
252
  popoverMouseWithinRef.current = !0;
331
- }, []), handlePopoverMouseLeave = react.useCallback(() => {
253
+ }, []), handlePopoverMouseLeave = useCallback(() => {
332
254
  popoverMouseWithinRef.current = !1;
333
- }, []), handleClearButtonClick = react.useCallback(() => {
255
+ }, []), handleClearButtonClick = useCallback(() => {
334
256
  dispatch({
335
257
  type: "root/clear"
336
258
  }), valueRef.current = "", onChange && onChange(""), onQueryChange && onQueryChange(null), inputElementRef.current?.focus();
337
- }, [onChange, onQueryChange]), handleClearButtonFocus = react.useCallback(() => {
259
+ }, [onChange, onQueryChange]), handleClearButtonFocus = useCallback(() => {
338
260
  dispatch({
339
261
  type: "input/focus"
340
262
  });
341
263
  }, []);
342
- react.useEffect(() => {
264
+ useEffect(() => {
343
265
  if (valueProp !== valuePropRef.current) {
344
266
  valuePropRef.current = valueProp, valueProp !== void 0 && (dispatch({
345
267
  type: "value/change",
@@ -351,12 +273,12 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
351
273
  type: "value/change",
352
274
  value: valueProp || null
353
275
  }));
354
- }, [valueProp]), react.useEffect(() => {
276
+ }, [valueProp]), useEffect(() => {
355
277
  !focused && valueRef.current && dispatch({
356
278
  type: "root/setActiveValue",
357
279
  value: valueRef.current
358
280
  });
359
- }, [focused]), react.useEffect(() => {
281
+ }, [focused]), useEffect(() => {
360
282
  const listElement = listBoxElementRef.current;
361
283
  if (!listElement) return;
362
284
  const activeOption_1 = filteredOptions.find((o_2) => o_2.value === activeValue);
@@ -369,42 +291,42 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
369
291
  }
370
292
  }
371
293
  }, [activeValue, filteredOptions]);
372
- const clearButton = react.useMemo(() => {
294
+ const clearButton = useMemo(() => {
373
295
  if (!loading && !disabled && value)
374
296
  return {
375
297
  "aria-label": "Clear",
376
298
  onFocus: handleClearButtonFocus
377
299
  };
378
- }, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = react.useMemo(() => padding.map((v_0) => v_0 === 0 ? 0 : v_0 === 1 || v_0 === 2 ? 1 : v_0 - 2), [padding]), openButtonPadding = react.useMemo(() => padding.map((v_1) => Math.max(v_1 - 1, 0)), [padding]), openButtonProps = react.useMemo(() => typeof openButton == "object" ? openButton : _visualEditing.EMPTY_RECORD, [openButton]), handleOpenClick = react.useCallback((event_4) => {
300
+ }, [disabled, handleClearButtonFocus, loading, value]), openButtonBoxPadding = useMemo(() => Object.fromEntries(Object.entries(padding).map(([key, value_1]) => value_1 === 0 ? [key, 0] : value_1 === 1 ? [key, 1] : value_1 === 2 ? [key, 1] : [key, value_1 - 2])), [padding]), openButtonPadding = useMemo(() => Object.values(padding).map((v_0) => Math.max(v_0 - 1, 0)), [padding]), openButtonProps = useMemo(() => typeof openButton == "object" ? openButton : EMPTY_RECORD, [openButton]), handleOpenClick = useCallback((event_4) => {
379
301
  dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
380
- }, [openButtonProps, dispatchOpen]), openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Open", disabled: expanded, display: "block", fontSize, icon: icons.ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = react.useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.TextInput, { ...restProps, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", border, clearButton, customValidity, disabled, fontSize, icon, iconRight: loading && _visualEditing.AnimatedSpinnerIcon, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: inputElementRef, role: "combobox", spellCheck: !1, suffix: suffix || openButtonNode, value: inputValue }), handleListBoxKeyDown = react.useCallback((event_5) => {
302
+ }, [openButtonProps, dispatchOpen]), openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */ jsx(Box, { "aria-hidden": expanded, padding: openButtonBoxPadding, children: /* @__PURE__ */ jsx(Button, { "aria-label": "Open", disabled: expanded, display: "block", fontSize, icon: ChevronDownIcon, mode: "bleed", padding: openButtonPadding, ...openButtonProps, onClick: handleOpenClick }) }) : void 0, [disabled, expanded, fontSize, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]), inputValue = useMemo(() => query === null ? value !== null ? renderValue(value, currentOption) : "" : query, [currentOption, query, renderValue, value]), input = /* @__PURE__ */ jsx(TextInput, { ...rest, "aria-activedescendant": activeItemId, "aria-autocomplete": "list", "aria-expanded": expanded, "aria-owns": listBoxId, autoCapitalize: "off", autoComplete: "off", autoCorrect: "off", as, border, clearButton, customValidity, disabled, fontSize, icon, iconRight: loading && AnimatedSpinnerIcon, id, inputMode: "search", onChange: handleInputChange, onClear: handleClearButtonClick, onFocus: handleInputFocus, padding, prefix, radius, readOnly, ref: inputElementRef, role: "combobox", spellCheck: !1, suffix: suffix || openButtonNode, value: inputValue }), handleListBoxKeyDown = useCallback((event_5) => {
381
303
  event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
382
- }, [listFocused]), content2 = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", id: listBoxId, ref: listBoxElementRef, role: "listbox", space: 1, children: filteredOptions.map((option_0) => {
304
+ }, [listFocused]), content2 = useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsx(Box, { "data-ui": "AutoComplete__results", onKeyDown: handleListBoxKeyDown, padding: 1, ...listBox, tabIndex: -1, children: /* @__PURE__ */ jsx(Stack, { as: "ul", "aria-multiselectable": !1, "data-ui": "AutoComplete__resultsList", gap: 1, id: listBoxId, ref: listBoxElementRef, role: "listbox", children: filteredOptions.map((option_0) => {
383
305
  const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
384
- return /* @__PURE__ */ jsxRuntime.jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: react.cloneElement(renderOption(option_0), {
306
+ return /* @__PURE__ */ jsx(AutocompleteOption, { id: `${id}-option-${option_0.value}`, onSelect: handleOptionSelect, selected: active, value: option_0.value, children: cloneElement(renderOption(option_0), {
385
307
  disabled: loading,
386
308
  selected: active,
387
- selectable: !0,
388
309
  tabIndex: listFocused && active ? 0 : -1
389
310
  }) }, option_0.value);
390
- }) }) }), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = react.useMemo(() => renderPopover ? renderPopover({
311
+ }) }) }), [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]), results = useMemo(() => renderPopover ? renderPopover({
391
312
  content: content2,
392
313
  hidden: !expanded,
393
314
  inputElement: inputElementRef.current,
394
315
  onMouseEnter: handlePopoverMouseEnter,
395
316
  onMouseLeave: handlePopoverMouseLeave
396
- }, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { arrow: !1, constrainSize: !0, content: content2, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius: 3, ref: resultsPopoverElementRef, referenceElement: inputElementRef.current, ...popover }), [content2, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
317
+ }, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsx(Popover, { arrow: !1, constrainSize: !0, content: content2, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius: 3, ref: resultsPopoverElementRef, referenceElement: inputElementRef.current, ...popover }), [content2, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, renderPopover]);
397
318
  return (
398
319
  // eslint-disable-next-line jsx-a11y/no-static-element-interactions
399
- /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
320
+ /* @__PURE__ */ jsxs("div", { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
400
321
  input,
401
322
  results
402
323
  ] })
403
324
  );
404
- });
405
- InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
406
- const Autocomplete = InnerAutocomplete, Breadcrumbs = react.forwardRef(function(props, ref) {
325
+ }
326
+ const DEFAULT_BREADCRUMBS_ELEMENT = "nav";
327
+ function Breadcrumbs(props) {
407
328
  const {
329
+ as = DEFAULT_BREADCRUMBS_ELEMENT,
408
330
  children,
409
331
  className,
410
332
  expandButton: expandButtonProps,
@@ -416,36 +338,54 @@ const Autocomplete = InnerAutocomplete, Breadcrumbs = react.forwardRef(function(
416
338
  separator,
417
339
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
418
340
  space: _spaceProp,
419
- ...restProps
420
- } = props, [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
421
- _visualEditing.useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
422
- const rawItems = react.useMemo(() => react.Children.toArray(children).filter(react.isValidElement), [children]), items = react.useMemo(() => {
341
+ ...rest
342
+ } = props, [open, setOpen] = useState(!1), expandElementRef = useRef(null), popoverElementRef = useRef(null), collapse = useCallback(() => setOpen(!1), []), expand = useCallback(() => setOpen(!0), []);
343
+ useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
344
+ const rawItems = useMemo(() => Children.toArray(children).filter(isValidElement), [children]), items = useMemo(() => {
423
345
  const len = rawItems.length;
424
346
  if (maxLength && len > maxLength) {
425
347
  const beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2);
426
- return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { constrainSize: !0, content: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ol", overflow: "auto", space: gapY, children: rawItems.slice(beforeLength - 1, len - afterLength) }), open, padding: 2, placement: "top", portal: !0, ref: popoverElementRef, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { mode: "bleed", padding: 0, text: "\u2026", ...expandButtonProps, onClick: open ? collapse : expand, ref: expandElementRef, selected: open }) }, "button"), ...rawItems.slice(len - afterLength)];
348
+ return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsx(Popover, { constrainSize: !0, content: /* @__PURE__ */ jsx(Stack, { as: "ol", gap: gapY, overflow: "auto", children: rawItems.slice(beforeLength - 1, len - afterLength) }), open, padding: 2, placement: "top", portal: !0, ref: popoverElementRef, children: /* @__PURE__ */ jsx(Button, { mode: "bleed", padding: 0, text: "\u2026", ...expandButtonProps, onClick: open ? collapse : expand, ref: expandElementRef, selected: open }) }, "button"), ...rawItems.slice(len - afterLength)];
427
349
  }
428
350
  return rawItems;
429
351
  }, [collapse, expand, expandButtonProps, gapY, maxLength, open, rawItems]);
430
- return /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Flex, { as: "nav", "data-ui": "Breadcrumbs", ...restProps, className: css.composeClassNames(className, css.breadcrumbs()), gapX, gapY, ref, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
431
- itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": !0, as: "li", children: separator || /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted: !0, children: "/" }) }),
432
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { as: "li", children: item })
352
+ return /* @__PURE__ */ jsx(Flex, { as, "data-ui": "Breadcrumbs", ...rest, className: breadcrumbs({
353
+ className
354
+ }), gapX, gapY, children: items.map((item, itemIndex) => /* @__PURE__ */ jsxs(Fragment, { children: [
355
+ itemIndex > 0 && /* @__PURE__ */ jsx(Box, { "aria-hidden": !0, as: "li", children: separator || /* @__PURE__ */ jsx(Text, { muted: !0, children: "/" }) }),
356
+ /* @__PURE__ */ jsx(Box, { as: "li", children: item })
433
357
  ] }, itemIndex)) });
434
- });
435
- Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
436
- const DialogContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/dialog", {
437
- version: 0
438
- });
439
- function useDialog() {
440
- return react.useContext(DialogContext);
358
+ }
359
+ const DEFAULT_CONTAINER_ELEMENT = "div";
360
+ function Container(props) {
361
+ const $ = c(12), t0 = props;
362
+ let className, rest, t1, t2;
363
+ $[0] !== t0 ? ({
364
+ as: t1,
365
+ className,
366
+ width: t2,
367
+ ...rest
368
+ } = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1, $[4] = t2) : (className = $[1], rest = $[2], t1 = $[3], t2 = $[4]);
369
+ const as = t1 === void 0 ? DEFAULT_CONTAINER_ELEMENT : t1, width = t2 === void 0 ? 2 : t2;
370
+ let t3;
371
+ $[5] !== className || $[6] !== width ? (t3 = container$1({
372
+ className,
373
+ width
374
+ }), $[5] = className, $[6] = width, $[7] = t3) : t3 = $[7];
375
+ let t4;
376
+ return $[8] !== as || $[9] !== rest || $[10] !== t3 ? (t4 = /* @__PURE__ */ jsx(Box, { "data-ui": "Container", ...rest, as, className: t3 }), $[8] = as, $[9] = rest, $[10] = t3, $[11] = t4) : t4 = $[11], t4;
441
377
  }
442
378
  function isTargetWithinScope(boundaryElement, portalElement, target) {
443
- return !boundaryElement || !portalElement ? !0 : _visualEditing.containsOrEqualsElement(boundaryElement, target) || _visualEditing.containsOrEqualsElement(portalElement, target);
379
+ return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
444
380
  }
445
- const DialogCard = react.forwardRef(function(props, forwardedRef) {
446
- const $ = reactCompilerRuntime.c(43), {
381
+ const DEFAULT_DIALOG_CARD_ELEMENT = "div";
382
+ function DialogCard(props) {
383
+ const $ = c(60), t0 = props;
384
+ let autoFocus, children, footer, forwardedContentRef, forwardedRef, header, hideCloseButton, id, onClickOutside, onClose, portalProp, rest, t1;
385
+ $[0] !== t0 ? ({
447
386
  __unstable_autoFocus: autoFocus,
448
387
  __unstable_hideCloseButton: hideCloseButton,
388
+ as: t1,
449
389
  children,
450
390
  contentRef: forwardedContentRef,
451
391
  footer,
@@ -454,75 +394,97 @@ const DialogCard = react.forwardRef(function(props, forwardedRef) {
454
394
  onClickOutside,
455
395
  onClose,
456
396
  portal: portalProp,
457
- radius: radiusProp,
458
- scheme,
459
- shadow: t0,
460
- tone,
461
- width: widthProp
462
- } = props, shadowProp = t0 === void 0 ? 4 : t0, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element, radius = _visualEditing.useArrayProp(radiusProp), shadow = _visualEditing.useArrayProp(shadowProp), width = _visualEditing.useArrayProp(widthProp), ref = react.useRef(null), contentRef = react.useRef(null), layer = _visualEditing.useLayer(), {
397
+ ref: forwardedRef,
398
+ ...rest
399
+ } = t0, $[0] = t0, $[1] = autoFocus, $[2] = children, $[3] = footer, $[4] = forwardedContentRef, $[5] = forwardedRef, $[6] = header, $[7] = hideCloseButton, $[8] = id, $[9] = onClickOutside, $[10] = onClose, $[11] = portalProp, $[12] = rest, $[13] = t1) : (autoFocus = $[1], children = $[2], footer = $[3], forwardedContentRef = $[4], forwardedRef = $[5], header = $[6], hideCloseButton = $[7], id = $[8], onClickOutside = $[9], onClose = $[10], portalProp = $[11], rest = $[12], t1 = $[13]);
400
+ const as = t1 === void 0 ? DEFAULT_DIALOG_CARD_ELEMENT : t1, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, ref = useRef(null), contentRef = useRef(null), layer = useLayer(), {
463
401
  isTopLayer
464
- } = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
465
- let t1;
466
- $[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[0] = t1) : t1 = $[0], react.useImperativeHandle(forwardedRef, t1);
402
+ } = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton, [scrollTop, setScrollTop] = useState(0);
467
403
  let t2;
468
- $[1] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => contentRef.current, $[1] = t2) : t2 = $[1], react.useImperativeHandle(forwardedContentRef, t2);
469
- let t3, t4;
470
- $[2] !== autoFocus ? (t3 = () => {
404
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[14] = t2) : t2 = $[14], useImperativeHandle(forwardedRef, t2);
405
+ let t3;
406
+ $[15] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => contentRef.current, $[15] = t3) : t3 = $[15], useImperativeHandle(forwardedContentRef, t3);
407
+ let t4, t5;
408
+ $[16] !== autoFocus ? (t4 = () => {
471
409
  autoFocus && ref.current && focusFirstDescendant(ref.current);
472
- }, t4 = [autoFocus, ref], $[2] = autoFocus, $[3] = t3, $[4] = t4) : (t3 = $[3], t4 = $[4]), react.useEffect(t3, t4);
473
- let t5;
474
- $[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t5 = (event) => {
410
+ }, t5 = [autoFocus, ref], $[16] = autoFocus, $[17] = t4, $[18] = t5) : (t4 = $[17], t5 = $[18]), useEffect(t4, t5);
411
+ let t6;
412
+ $[19] !== boundaryElement || $[20] !== isTopLayer || $[21] !== onClose || $[22] !== portalElement ? (t6 = (event) => {
475
413
  if (!isTopLayer || !onClose)
476
414
  return;
477
415
  const target = document.activeElement;
478
416
  target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
479
- }, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t5) : t5 = $[9], _visualEditing.useGlobalKeyDown(t5);
480
- let t6;
481
- $[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t6 = isTopLayer && onClickOutside && ((event_0) => {
417
+ }, $[19] = boundaryElement, $[20] = isTopLayer, $[21] = onClose, $[22] = portalElement, $[23] = t6) : t6 = $[23], useGlobalKeyDown(t6);
418
+ let t7;
419
+ $[24] !== boundaryElement || $[25] !== isTopLayer || $[26] !== onClickOutside || $[27] !== portalElement ? (t7 = isTopLayer && onClickOutside && ((event_0) => {
482
420
  const target_0 = event_0.target;
483
421
  target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
484
- }), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t6) : t6 = $[14];
485
- let t7;
486
- $[15] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[15] = t7) : t7 = $[15], _visualEditing.useClickOutsideEvent(t6, t7);
422
+ }), $[24] = boundaryElement, $[25] = isTopLayer, $[26] = onClickOutside, $[27] = portalElement, $[28] = t7) : t7 = $[28];
487
423
  let t8;
488
- $[16] === Symbol.for("react.memo_cache_sentinel") ? (t8 = css.dialogContainer(), $[16] = t8) : t8 = $[16];
489
- let t9;
490
- $[17] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css.dialogCardRoot(), $[17] = t9) : t9 = $[17];
491
- let t10;
492
- $[18] === Symbol.for("react.memo_cache_sentinel") ? (t10 = css.dialogLayout(), $[18] = t10) : t10 = $[18];
424
+ $[29] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => [ref.current], $[29] = t8) : t8 = $[29], useClickOutsideEvent(t7, t8);
425
+ let t10, t9;
426
+ $[30] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => {
427
+ const el = contentRef.current;
428
+ if (!el)
429
+ return;
430
+ const handleScroll = () => {
431
+ setScrollTop(el.scrollTop);
432
+ };
433
+ return el.addEventListener("scroll", handleScroll, {
434
+ passive: !0
435
+ }), () => {
436
+ el.removeEventListener("scroll", handleScroll);
437
+ };
438
+ }, t10 = [], $[30] = t10, $[31] = t9) : (t10 = $[30], t9 = $[31]), useEffect(t9, t10);
493
439
  let t11;
494
- $[19] !== header || $[20] !== labelId || $[21] !== onClose || $[22] !== showCloseButton || $[23] !== showHeader ? (t11 = showHeader && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { className: css.dialogHeader(), position: "relative", children: /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { align: "flex-start", padding: 3, children: [
495
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
496
- showCloseButton && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: "none", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { "aria-label": "Close dialog", disabled: !onClose, icon: icons.CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
497
- ] }) }), $[19] = header, $[20] = labelId, $[21] = onClose, $[22] = showCloseButton, $[23] = showHeader, $[24] = t11) : t11 = $[24];
440
+ $[32] === Symbol.for("react.memo_cache_sentinel") ? (t11 = dialogCard(), $[32] = t11) : t11 = $[32];
498
441
  let t12;
499
- $[25] === Symbol.for("react.memo_cache_sentinel") ? (t12 = css.dialogContent(), $[25] = t12) : t12 = $[25];
442
+ $[33] !== header || $[34] !== labelId || $[35] !== onClose || $[36] !== showCloseButton || $[37] !== showHeader ? (t12 = showHeader && /* @__PURE__ */ jsxs(Flex, { align: "flex-start", className: dialogHeader(), padding: 3, position: "relative", children: [
443
+ /* @__PURE__ */ jsx(Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsx(Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
444
+ showCloseButton && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsx(Button, { "aria-label": "Close dialog", disabled: !onClose, icon: CloseIcon, mode: "bleed", onClick: onClose, padding: 2 }) })
445
+ ] }), $[33] = header, $[34] = labelId, $[35] = onClose, $[36] = showCloseButton, $[37] = showHeader, $[38] = t12) : t12 = $[38];
500
446
  let t13;
501
- $[26] !== children ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { className: t12, flex: 1, overflow: "auto", position: "relative", ref: contentRef, tabIndex: -1, children }), $[26] = children, $[27] = t13) : t13 = $[27];
447
+ $[39] === Symbol.for("react.memo_cache_sentinel") ? (t13 = dialogContent(), $[39] = t13) : t13 = $[39];
502
448
  let t14;
503
- $[28] !== footer ? (t14 = footer && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { className: css.dialogFooter(), position: "relative", children: footer }), $[28] = footer, $[29] = t14) : t14 = $[29];
449
+ $[40] !== scrollTop || $[41] !== showHeader ? (t14 = showHeader && /* @__PURE__ */ jsx("div", { className: dialogScrollerShadowTop(), style: {
450
+ opacity: Math.min(scrollTop, 32) / 32
451
+ } }), $[40] = scrollTop, $[41] = showHeader, $[42] = t14) : t14 = $[42];
504
452
  let t15;
505
- $[30] !== t11 || $[31] !== t13 || $[32] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { className: t10, direction: "column", flex: 1, children: [
506
- t11,
507
- t13,
508
- t14
509
- ] }), $[30] = t11, $[31] = t13, $[32] = t14, $[33] = t15) : t15 = $[33];
453
+ $[43] === Symbol.for("react.memo_cache_sentinel") ? (t15 = dialogScroller(), $[43] = t15) : t15 = $[43];
510
454
  let t16;
511
- $[34] !== radius || $[35] !== scheme || $[36] !== shadow || $[37] !== t15 || $[38] !== tone ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { className: t9, display: "flex", radius, ref, scheme, shadow, tone, children: t15 }), $[34] = radius, $[35] = scheme, $[36] = shadow, $[37] = t15, $[38] = tone, $[39] = t16) : t16 = $[39];
455
+ $[44] !== children ? (t16 = /* @__PURE__ */ jsx(Box, { className: t15, overflow: "auto", ref: contentRef, children }), $[44] = children, $[45] = t16) : t16 = $[45];
512
456
  let t17;
513
- return $[40] !== t16 || $[41] !== width ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Container, { align: "center", className: t8, "data-ui": "DialogCard", direction: "column", display: "flex", justify: "center", width, children: t16 }), $[40] = t16, $[41] = width, $[42] = t17) : t17 = $[42], t17;
457
+ $[46] !== footer ? (t17 = footer && /* @__PURE__ */ jsx("div", { className: dialogScrollerShadowBottom() }), $[46] = footer, $[47] = t17) : t17 = $[47];
458
+ let t18;
459
+ $[48] !== t14 || $[49] !== t16 || $[50] !== t17 ? (t18 = /* @__PURE__ */ jsxs(Box, { className: t13, flex: 1, position: "relative", tabIndex: -1, children: [
460
+ t14,
461
+ t16,
462
+ t17
463
+ ] }), $[48] = t14, $[49] = t16, $[50] = t17, $[51] = t18) : t18 = $[51];
464
+ let t19;
465
+ $[52] !== footer ? (t19 = footer && /* @__PURE__ */ jsx(Box, { className: dialogFooter(), position: "relative", children: footer }), $[52] = footer, $[53] = t19) : t19 = $[53];
466
+ let t20;
467
+ return $[54] !== as || $[55] !== rest || $[56] !== t12 || $[57] !== t18 || $[58] !== t19 ? (t20 = /* @__PURE__ */ jsxs(Card, { ...rest, as, className: t11, display: "flex", flexDirection: "column", ref, children: [
468
+ t12,
469
+ t18,
470
+ t19
471
+ ] }), $[54] = as, $[55] = rest, $[56] = t12, $[57] = t18, $[58] = t19, $[59] = t20) : t20 = $[59], t20;
472
+ }
473
+ const DialogContext = createGlobalScopedContext("@sanity/ui/context/dialog", {
474
+ version: 0
514
475
  });
515
- DialogCard.displayName = "ForwardRef(DialogCard)";
516
- const Dialog = react.forwardRef(function(props, ref) {
517
- const $ = reactCompilerRuntime.c(66), context = useDialog(), {
518
- layer
519
- } = _visualEditing.useTheme_v2();
520
- let _positionProp, _zOffsetProp, cardShadow, children, className, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, tone;
521
- $[0] !== props ? ({
522
- __unstable_autoFocus: t0,
523
- __unstable_hideCloseButton: t1,
524
- animate: t2,
525
- cardRadius: t3,
476
+ function useDialog() {
477
+ return useContext(DialogContext);
478
+ }
479
+ const DEFAULT_DIALOG_ELEMENT = "div";
480
+ function Dialog(props) {
481
+ const $ = c(69), context = useDialog(), t0 = props;
482
+ let _positionProp, _zOffsetProp, children, className, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, rest, scheme, t1, t2, t3, t4, t5, t6, t7, tone;
483
+ $[0] !== t0 ? ({
484
+ __unstable_autoFocus: t1,
485
+ __unstable_hideCloseButton: t2,
486
+ animate: t3,
487
+ cardRadius: t4,
526
488
  children,
527
489
  className,
528
490
  contentRef,
@@ -533,19 +495,19 @@ const Dialog = react.forwardRef(function(props, ref) {
533
495
  onClickOutside,
534
496
  onClose,
535
497
  onFocus,
536
- padding: t4,
498
+ padding: t5,
537
499
  portal: portalProp,
538
500
  position: _positionProp,
539
501
  scheme,
540
- shadow: cardShadow,
541
- width: t5,
502
+ shadow: t6,
503
+ width: t7,
542
504
  zOffset: _zOffsetProp,
543
505
  tone,
544
- ...restProps
545
- } = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = cardShadow, $[4] = children, $[5] = className, $[6] = contentRef, $[7] = footer, $[8] = header, $[9] = id, $[10] = onActivate, $[11] = onClickOutside, $[12] = onClose, $[13] = onFocus, $[14] = portalProp, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4, $[22] = t5, $[23] = tone) : (_positionProp = $[1], _zOffsetProp = $[2], cardShadow = $[3], children = $[4], className = $[5], contentRef = $[6], footer = $[7], header = $[8], id = $[9], onActivate = $[10], onClickOutside = $[11], onClose = $[12], onFocus = $[13], portalProp = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t2 = $[19], t3 = $[20], t4 = $[21], t5 = $[22], tone = $[23]);
546
- const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, _animate = t2 === void 0 ? !1 : t2, cardRadiusProp = t3 === void 0 ? 4 : t3, padding = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, positionProp = _positionProp ?? (context.position || "fixed"), zOffsetProp = _zOffsetProp ?? (context.zOffset || layer.dialog.zOffset), animate = _visualEditing.usePrefersReducedMotion() ? !1 : _animate, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element, cardRadius = _visualEditing.useArrayProp(cardRadiusProp), position = _visualEditing.useArrayProp(positionProp), width = _visualEditing.useArrayProp(widthProp), zOffset = _visualEditing.useArrayProp(zOffsetProp), preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
547
- let t6;
548
- $[24] !== onFocus ? (t6 = (event) => {
506
+ ...rest
507
+ } = t0, $[0] = t0, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = className, $[5] = contentRef, $[6] = footer, $[7] = header, $[8] = id, $[9] = onActivate, $[10] = onClickOutside, $[11] = onClose, $[12] = onFocus, $[13] = portalProp, $[14] = rest, $[15] = scheme, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = tone) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], className = $[4], contentRef = $[5], footer = $[6], header = $[7], id = $[8], onActivate = $[9], onClickOutside = $[10], onClose = $[11], onFocus = $[12], portalProp = $[13], rest = $[14], scheme = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], tone = $[23]);
508
+ const autoFocus = t1 === void 0 ? !0 : t1, hideCloseButton = t2 === void 0 ? !1 : t2, _animate = t3 === void 0 ? !1 : t3, cardRadiusProp = t4 === void 0 ? 4 : t4, padding = t5 === void 0 ? 3 : t5, cardShadow = t6 === void 0 ? 4 : t6, width = t7 === void 0 ? 0 : t7, positionProp = _positionProp ?? context.position ?? "fixed", zOffsetProp = _zOffsetProp ?? context.zOffset ?? Z_OFFSETS.dialog, animate = usePrefersReducedMotion() ? !1 : _animate, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, cardRadius = useResponsiveProp(cardRadiusProp), position = useResponsiveProp(positionProp), zOffset = useResponsiveProp(zOffsetProp), preDivRef = useRef(null), postDivRef = useRef(null), cardRef = useRef(null), focusedElementRef = useRef(null);
509
+ let t8;
510
+ $[24] !== onFocus ? (t8 = (event) => {
549
511
  onFocus?.(event);
550
512
  const target = event.target, cardElement = cardRef.current;
551
513
  if (cardElement && target === preDivRef.current) {
@@ -556,11 +518,11 @@ const Dialog = react.forwardRef(function(props, ref) {
556
518
  focusFirstDescendant(cardElement);
557
519
  return;
558
520
  }
559
- _visualEditing.isHTMLElement(event.target) && (focusedElementRef.current = event.target);
560
- }, $[24] = onFocus, $[25] = t6) : t6 = $[25];
561
- const handleFocus = t6, labelId = `${id}_label`, rootClickTimeoutRef = react.useRef(void 0);
562
- let t7;
563
- $[26] !== boundaryElement || $[27] !== portalElement ? (t7 = () => {
521
+ isHTMLElement(event.target) && (focusedElementRef.current = event.target);
522
+ }, $[24] = onFocus, $[25] = t8) : t8 = $[25];
523
+ const handleFocus = t8, labelId = `${id}_label`, rootClickTimeoutRef = useRef(void 0);
524
+ let t9;
525
+ $[26] !== boundaryElement || $[27] !== portalElement ? (t9 = () => {
564
526
  rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
565
527
  const activeElement = document.activeElement;
566
528
  if (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {
@@ -573,29 +535,34 @@ const Dialog = react.forwardRef(function(props, ref) {
573
535
  target_0.focus();
574
536
  }
575
537
  }, 0);
576
- }, $[26] = boundaryElement, $[27] = portalElement, $[28] = t7) : t7 = $[28];
577
- const handleRootClick = t7;
578
- let t8;
579
- $[29] !== className ? (t8 = css.composeClassNames(className, css.dialog()), $[29] = className, $[30] = t8) : t8 = $[30];
580
- const t9 = animate ? "" : void 0;
538
+ }, $[26] = boundaryElement, $[27] = portalElement, $[28] = t9) : t9 = $[28];
539
+ const handleRootClick = t9;
581
540
  let t10;
582
- $[31] === Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: preDivRef, tabIndex: 0 }), $[31] = t10) : t10 = $[31];
583
- let t11;
584
- $[32] !== autoFocus || $[33] !== cardRadius || $[34] !== cardShadow || $[35] !== children || $[36] !== contentRef || $[37] !== footer || $[38] !== header || $[39] !== hideCloseButton || $[40] !== id || $[41] !== onClickOutside || $[42] !== onClose || $[43] !== portalProp || $[44] !== scheme || $[45] !== tone || $[46] !== width ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, tone, width, children }), $[32] = autoFocus, $[33] = cardRadius, $[34] = cardShadow, $[35] = children, $[36] = contentRef, $[37] = footer, $[38] = header, $[39] = hideCloseButton, $[40] = id, $[41] = onClickOutside, $[42] = onClose, $[43] = portalProp, $[44] = scheme, $[45] = tone, $[46] = width, $[47] = t11) : t11 = $[47];
541
+ $[29] !== className ? (t10 = dialog({
542
+ className
543
+ }), $[29] = className, $[30] = t10) : t10 = $[30];
544
+ const t11 = animate ? "" : void 0;
585
545
  let t12;
586
- $[48] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[48] = t12) : t12 = $[48];
546
+ $[31] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx("div", { ref: preDivRef, tabIndex: 0 }), $[31] = t12) : t12 = $[31];
587
547
  let t13;
588
- $[49] !== handleFocus || $[50] !== handleRootClick || $[51] !== id || $[52] !== labelId || $[53] !== onActivate || $[54] !== padding || $[55] !== position || $[56] !== ref || $[57] !== restProps || $[58] !== t11 || $[59] !== t8 || $[60] !== t9 || $[61] !== zOffset ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Layer, { ...restProps, "aria-labelledby": labelId, "aria-modal": !0, className: t8, "data-animate": t9, "data-ui": "Dialog", display: "flex", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, padding, position, ref, role: "dialog", zOffset, children: [
589
- t10,
590
- t11,
591
- t12
592
- ] }), $[49] = handleFocus, $[50] = handleRootClick, $[51] = id, $[52] = labelId, $[53] = onActivate, $[54] = padding, $[55] = position, $[56] = ref, $[57] = restProps, $[58] = t11, $[59] = t8, $[60] = t9, $[61] = zOffset, $[62] = t13) : t13 = $[62];
548
+ $[32] === Symbol.for("react.memo_cache_sentinel") ? (t13 = dialogContainer(), $[32] = t13) : t13 = $[32];
593
549
  let t14;
594
- return $[63] !== portalProp || $[64] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Portal, { __unstable_name: portalProp, children: t13 }), $[63] = portalProp, $[64] = t13, $[65] = t14) : t14 = $[65], t14;
595
- });
596
- Dialog.displayName = "ForwardRef(Dialog)";
550
+ $[33] !== autoFocus || $[34] !== cardRadius || $[35] !== cardShadow || $[36] !== children || $[37] !== contentRef || $[38] !== footer || $[39] !== header || $[40] !== hideCloseButton || $[41] !== id || $[42] !== onClickOutside || $[43] !== onClose || $[44] !== portalProp || $[45] !== scheme || $[46] !== tone || $[47] !== width ? (t14 = /* @__PURE__ */ jsx(DialogCard, { __unstable_autoFocus: autoFocus, __unstable_hideCloseButton: hideCloseButton, contentRef, footer, header, id, onClickOutside, onClose, portal: portalProp, radius: cardRadius, ref: cardRef, scheme, shadow: cardShadow, tone, width, children }), $[33] = autoFocus, $[34] = cardRadius, $[35] = cardShadow, $[36] = children, $[37] = contentRef, $[38] = footer, $[39] = header, $[40] = hideCloseButton, $[41] = id, $[42] = onClickOutside, $[43] = onClose, $[44] = portalProp, $[45] = scheme, $[46] = tone, $[47] = width, $[48] = t14) : t14 = $[48];
551
+ let t15;
552
+ $[49] !== t14 || $[50] !== width ? (t15 = /* @__PURE__ */ jsx(Container, { alignItems: "center", className: t13, "data-ui": "DialogCard", flexDirection: "column", display: "flex", justifyContent: "center", width, children: t14 }), $[49] = t14, $[50] = width, $[51] = t15) : t15 = $[51];
553
+ let t16;
554
+ $[52] === Symbol.for("react.memo_cache_sentinel") ? (t16 = /* @__PURE__ */ jsx("div", { ref: postDivRef, tabIndex: 0 }), $[52] = t16) : t16 = $[52];
555
+ let t17;
556
+ $[53] !== handleFocus || $[54] !== handleRootClick || $[55] !== id || $[56] !== labelId || $[57] !== onActivate || $[58] !== padding || $[59] !== position || $[60] !== rest || $[61] !== t10 || $[62] !== t11 || $[63] !== t15 || $[64] !== zOffset ? (t17 = /* @__PURE__ */ jsxs(Layer, { ...rest, "aria-labelledby": labelId, "aria-modal": !0, className: t10, "data-animate": t11, "data-ui": "Dialog", display: "flex", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, padding, position, role: "dialog", zOffset, children: [
557
+ t12,
558
+ t15,
559
+ t16
560
+ ] }), $[53] = handleFocus, $[54] = handleRootClick, $[55] = id, $[56] = labelId, $[57] = onActivate, $[58] = padding, $[59] = position, $[60] = rest, $[61] = t10, $[62] = t11, $[63] = t15, $[64] = zOffset, $[65] = t17) : t17 = $[65];
561
+ let t18;
562
+ return $[66] !== portalProp || $[67] !== t17 ? (t18 = /* @__PURE__ */ jsx(Portal, { __unstable_name: portalProp, children: t17 }), $[66] = portalProp, $[67] = t17, $[68] = t18) : t18 = $[68], t18;
563
+ }
597
564
  function DialogProvider(props) {
598
- const $ = reactCompilerRuntime.c(6), {
565
+ const $ = c(6), {
599
566
  children,
600
567
  position,
601
568
  zOffset
@@ -608,11 +575,10 @@ function DialogProvider(props) {
608
575
  }, $[0] = position, $[1] = zOffset, $[2] = t1) : t1 = $[2], t0 = t1;
609
576
  const contextValue = t0;
610
577
  let t2;
611
- return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
578
+ return $[3] !== children || $[4] !== contextValue ? (t2 = /* @__PURE__ */ jsx(DialogContext.Provider, { value: contextValue, children }), $[3] = children, $[4] = contextValue, $[5] = t2) : t2 = $[5], t2;
612
579
  }
613
- DialogProvider.displayName = "DialogProvider";
614
- const MenuButton = react.forwardRef(function(props, forwardedRef) {
615
- const $ = reactCompilerRuntime.c(63), {
580
+ function MenuButton(props) {
581
+ const $ = c(63), {
616
582
  __unstable_disableRestoreFocusOnClose: t0,
617
583
  boundaryElement: deprecated_boundaryElement,
618
584
  button: buttonProp,
@@ -625,26 +591,27 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
625
591
  portal: t1,
626
592
  popover,
627
593
  popoverRadius: deprecated_popoverRadius,
628
- preventOverflow: deprecated_preventOverflow
629
- } = props, disableRestoreFocusOnClose = t0 === void 0 ? !1 : t0, deprecated_portal = t1 === void 0 ? !0 : t1, [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), [buttonElement, setButtonElement] = react.useState(null);
594
+ preventOverflow: deprecated_preventOverflow,
595
+ ref: forwardedRef
596
+ } = props, disableRestoreFocusOnClose = t0 === void 0 ? !1 : t0, deprecated_portal = t1 === void 0 ? !0 : t1, [open, setOpen] = useState(!1), [shouldFocus, setShouldFocus] = useState(null), [buttonElement, setButtonElement] = useState(null);
630
597
  let t2;
631
598
  $[0] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[0] = t2) : t2 = $[0];
632
- const [menuElements, setChildMenuElements] = react.useState(t2), openRef = react.useRef(open);
599
+ const [menuElements, setChildMenuElements] = useState(t2), openRef = useRef(open);
633
600
  let t3, t4;
634
601
  $[1] !== onOpen || $[2] !== open ? (t3 = () => {
635
602
  onOpen && open && !openRef.current && onOpen();
636
- }, t4 = [onOpen, open], $[1] = onOpen, $[2] = open, $[3] = t3, $[4] = t4) : (t3 = $[3], t4 = $[4]), react.useEffect(t3, t4);
603
+ }, t4 = [onOpen, open], $[1] = onOpen, $[2] = open, $[3] = t3, $[4] = t4) : (t3 = $[3], t4 = $[4]), useEffect(t3, t4);
637
604
  let t5, t6;
638
605
  $[5] !== onClose || $[6] !== open ? (t5 = () => {
639
606
  onClose && !open && openRef.current && onClose();
640
- }, t6 = [onClose, open], $[5] = onClose, $[6] = open, $[7] = t5, $[8] = t6) : (t5 = $[7], t6 = $[8]), react.useEffect(t5, t6);
607
+ }, t6 = [onClose, open], $[5] = onClose, $[6] = open, $[7] = t5, $[8] = t6) : (t5 = $[7], t6 = $[8]), useEffect(t5, t6);
641
608
  let t7, t8;
642
609
  $[9] !== open ? (t7 = () => {
643
610
  openRef.current = open;
644
- }, t8 = [open], $[9] = open, $[10] = t7, $[11] = t8) : (t7 = $[10], t8 = $[11]), react.useEffect(t7, t8);
611
+ }, t8 = [open], $[9] = open, $[10] = t7, $[11] = t8) : (t7 = $[10], t8 = $[11]), useEffect(t7, t8);
645
612
  let t9;
646
613
  $[12] === Symbol.for("react.memo_cache_sentinel") ? (t9 = () => {
647
- setOpen(_temp$2), setShouldFocus(null);
614
+ setOpen(_temp$4), setShouldFocus(null);
648
615
  }, $[12] = t9) : t9 = $[12];
649
616
  const handleButtonClick = t9;
650
617
  let t10;
@@ -700,7 +667,7 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
700
667
  $[27] === Symbol.for("react.memo_cache_sentinel") ? (t16 = (el_1) => (setChildMenuElements((els) => els.concat([el_1])), () => setChildMenuElements((els_0) => els_0.filter((_el) => _el !== el_1))), $[27] = t16) : t16 = $[27];
701
668
  const registerElement = t16;
702
669
  let t17;
703
- $[28] !== buttonElement || $[29] !== handleBlur || $[30] !== handleItemClick || $[31] !== handleMenuClickOutside || $[32] !== handleMenuEscape || $[33] !== id || $[34] !== menuProp || $[35] !== shouldFocus ? (t17 = menuProp && react.cloneElement(menuProp, {
670
+ $[28] !== buttonElement || $[29] !== handleBlur || $[30] !== handleItemClick || $[31] !== handleMenuClickOutside || $[32] !== handleMenuEscape || $[33] !== id || $[34] !== menuProp || $[35] !== shouldFocus ? (t17 = menuProp && cloneElement(menuProp, {
704
671
  "aria-labelledby": id,
705
672
  onBlurCapture: handleBlur,
706
673
  onClickOutside: handleMenuClickOutside,
@@ -719,7 +686,7 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
719
686
  }
720
687
  const t192 = buttonProp.props.selected ?? open;
721
688
  let t202;
722
- $[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open || $[41] !== t192 ? (t202 = react.cloneElement(buttonProp, {
689
+ $[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open || $[41] !== t192 ? (t202 = cloneElement(buttonProp, {
723
690
  "data-ui": "MenuButton",
724
691
  id,
725
692
  onClick: handleButtonClick,
@@ -733,7 +700,7 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
733
700
  }
734
701
  const button = t18;
735
702
  let t19, t20;
736
- $[43] !== buttonElement ? (t19 = () => buttonElement, t20 = [buttonElement], $[43] = buttonElement, $[44] = t19, $[45] = t20) : (t19 = $[44], t20 = $[45]), react.useImperativeHandle(forwardedRef, t19, t20);
703
+ $[43] !== buttonElement ? (t19 = () => buttonElement, t20 = [buttonElement], $[43] = buttonElement, $[44] = t19, $[45] = t20) : (t19 = $[44], t20 = $[45]), useImperativeHandle(forwardedRef, t19, t20);
737
704
  let t21, t22;
738
705
  $[46] !== popover ? (t22 = popover || {}, $[46] = popover, $[47] = t22) : t22 = $[47];
739
706
  let t23;
@@ -749,126 +716,28 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
749
716
  }, $[48] = deprecated_boundaryElement, $[49] = deprecated_placement, $[50] = deprecated_popoverRadius, $[51] = deprecated_popoverScheme, $[52] = deprecated_portal, $[53] = deprecated_preventOverflow, $[54] = t22, $[55] = t23) : t23 = $[55], t21 = t23;
750
717
  const popoverProps = t21;
751
718
  let t24;
752
- $[56] !== button ? (t24 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[56] = button, $[57] = t24) : t24 = $[57];
719
+ $[56] !== button ? (t24 = button || /* @__PURE__ */ jsx(Fragment$1, {}), $[56] = button, $[57] = t24) : t24 = $[57];
753
720
  let t25;
754
- return $[58] !== menu || $[59] !== open || $[60] !== popoverProps || $[61] !== t24 ? (t25 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t24 }), $[58] = menu, $[59] = open, $[60] = popoverProps, $[61] = t24, $[62] = t25) : t25 = $[62], t25;
755
- });
756
- MenuButton.displayName = "ForwardRef(MenuButton)";
757
- function _temp$2(v) {
721
+ return $[58] !== menu || $[59] !== open || $[60] !== popoverProps || $[61] !== t24 ? (t25 = /* @__PURE__ */ jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t24 }), $[58] = menu, $[59] = open, $[60] = popoverProps, $[61] = t24, $[62] = t25) : t25 = $[62], t25;
722
+ }
723
+ function _temp$4(v) {
758
724
  return !v;
759
725
  }
760
- const Skeleton = react.forwardRef(function(props, ref) {
761
- const $ = reactCompilerRuntime.c(18);
762
- let className, delay, radius, restProps, t0;
763
- $[0] !== props ? ({
764
- animated: t0,
765
- className,
766
- delay,
767
- radius,
768
- ...restProps
769
- } = props, $[0] = props, $[1] = className, $[2] = delay, $[3] = radius, $[4] = restProps, $[5] = t0) : (className = $[1], delay = $[2], radius = $[3], restProps = $[4], t0 = $[5]);
770
- const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = react.useState(!delay);
771
- let t1, t2;
772
- $[6] !== delay ? (t1 = () => {
773
- if (!delay)
774
- return setVisible(!0);
775
- const timeout = setTimeout(() => {
776
- setVisible(!0);
777
- }, delay);
778
- return () => {
779
- clearTimeout(timeout);
780
- };
781
- }, t2 = [delay], $[6] = delay, $[7] = t1, $[8] = t2) : (t1 = $[7], t2 = $[8]), react.useEffect(t1, t2);
726
+ const DEFAULT_TAB_PANEL_ELEMENT = "div";
727
+ function TabPanel(props) {
728
+ const $ = c(10), t0 = props;
729
+ let children, rest, t1, tabIndex;
730
+ $[0] !== t0 ? ({
731
+ as: t1,
732
+ children,
733
+ tabIndex,
734
+ ...rest
735
+ } = t0, $[0] = t0, $[1] = children, $[2] = rest, $[3] = t1, $[4] = tabIndex) : (children = $[1], rest = $[2], t1 = $[3], tabIndex = $[4]);
736
+ const as = t1 === void 0 ? DEFAULT_TAB_PANEL_ELEMENT : t1, t2 = tabIndex === void 0 ? 0 : tabIndex;
782
737
  let t3;
783
- $[9] !== className || $[10] !== radius ? (t3 = css.composeClassNames(className, css.skeleton({
784
- radius
785
- })), $[9] = className, $[10] = radius, $[11] = t3) : t3 = $[11];
786
- const t4 = animated ? "" : void 0, t5 = visible ? "" : void 0;
787
- let t6;
788
- return $[12] !== ref || $[13] !== restProps || $[14] !== t3 || $[15] !== t4 || $[16] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "data-ui": "Skeleton", ...restProps, className: t3, "data-animated": t4, "data-visible": t5, ref }), $[12] = ref, $[13] = restProps, $[14] = t3, $[15] = t4, $[16] = t5, $[17] = t6) : t6 = $[17], t6;
789
- });
790
- Skeleton.displayName = "ForwardRef(Skeleton)";
791
- const TextSkeleton = react.forwardRef(function(props, ref) {
792
- const $ = reactCompilerRuntime.c(11);
793
- let className, restProps, t0;
794
- $[0] !== props ? ({
795
- className,
796
- size: t0,
797
- ...restProps
798
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
799
- const size = t0 === void 0 ? 2 : t0;
800
- let t1;
801
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.textSkeleton({
802
- size
803
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
804
- let t2;
805
- return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { "data-ui": "TextSkeleton", ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
806
- });
807
- TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
808
- const LabelSkeleton = react.forwardRef(function(props, ref) {
809
- const $ = reactCompilerRuntime.c(11);
810
- let className, restProps, t0;
811
- $[0] !== props ? ({
812
- className,
813
- size: t0,
814
- ...restProps
815
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
816
- const size = t0 === void 0 ? 2 : t0;
817
- let t1;
818
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.labelSkeleton({
819
- size
820
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
821
- let t2;
822
- return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { "data-ui": "LabelSkeleton", ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
823
- });
824
- LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
825
- const HeadingSkeleton = react.forwardRef(function(props, ref) {
826
- const $ = reactCompilerRuntime.c(11);
827
- let className, restProps, t0;
828
- $[0] !== props ? ({
829
- className,
830
- size: t0,
831
- ...restProps
832
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
833
- const size = t0 === void 0 ? 2 : t0;
834
- let t1;
835
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.headingSkeleton({
836
- size
837
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
838
- let t2;
839
- return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
840
- });
841
- HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
842
- const CodeSkeleton = react.forwardRef(function(props, ref) {
843
- const $ = reactCompilerRuntime.c(11);
844
- let className, restProps, t0;
845
- $[0] !== props ? ({
846
- className,
847
- size: t0,
848
- ...restProps
849
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
850
- const size = t0 === void 0 ? 2 : t0;
851
- let t1;
852
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.codeSkeleton({
853
- size
854
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
855
- let t2;
856
- return $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { ...restProps, className: t1, ref }), $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
857
- });
858
- CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
859
- const TabPanel = react.forwardRef(function(props, ref) {
860
- const $ = reactCompilerRuntime.c(9);
861
- let flex, restProps;
862
- $[0] !== props ? ({
863
- flex,
864
- ...restProps
865
- } = props, $[0] = props, $[1] = flex, $[2] = restProps) : (flex = $[1], restProps = $[2]);
866
- const t0 = props.tabIndex === void 0 ? 0 : props.tabIndex;
867
- let t1;
868
- return $[3] !== flex || $[4] !== props.children || $[5] !== ref || $[6] !== restProps || $[7] !== t0 ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "data-ui": "TabPanel", ...restProps, flex, ref, role: "tabpanel", tabIndex: t0, children: props.children }), $[3] = flex, $[4] = props.children, $[5] = ref, $[6] = restProps, $[7] = t0, $[8] = t1) : t1 = $[8], t1;
869
- });
870
- TabPanel.displayName = "ForwardRef(TabPanel)";
871
- const ROLES = {
738
+ return $[5] !== as || $[6] !== children || $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "TabPanel", ...rest, as, role: "tabpanel", tabIndex: t2, children }), $[5] = as, $[6] = children, $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
739
+ }
740
+ const DEFAULT_TOAST_ELEMENT = "li", LONG_ENOUGH_BUT_NOT_TOO_LONG = 1e3 * 60 * 60 * 24 * 24, ROLES = {
872
741
  error: "alert",
873
742
  warning: "alert",
874
743
  success: "alert",
@@ -883,81 +752,64 @@ const ROLES = {
883
752
  warning: "caution",
884
753
  success: "positive",
885
754
  info: "neutral"
886
- }, LONG_ENOUGH_BUT_NOT_TOO_LONG = 1e3 * 60 * 60 * 24 * 24;
755
+ };
887
756
  function Toast(props) {
888
- const $ = reactCompilerRuntime.c(51);
889
- let closable, description, duration, onClose, restProps, status, t0, title, updatedAt;
890
- $[0] !== props ? ({
757
+ const $ = c(42), t0 = props;
758
+ let closable, description, duration, onClose, rest, status, t1, t2, title;
759
+ $[0] !== t0 ? ({
760
+ as: t1,
891
761
  closable,
892
762
  description,
893
763
  duration,
894
764
  onClose,
895
- radius: t0,
765
+ radius: t2,
896
766
  title,
897
767
  status,
898
- updatedAt,
899
- ...restProps
900
- } = props, $[0] = props, $[1] = closable, $[2] = description, $[3] = duration, $[4] = onClose, $[5] = restProps, $[6] = status, $[7] = t0, $[8] = title, $[9] = updatedAt) : (closable = $[1], description = $[2], duration = $[3], onClose = $[4], restProps = $[5], status = $[6], t0 = $[7], title = $[8], updatedAt = $[9]);
901
- const radius = t0 === void 0 ? 3 : t0, cardTone = status ? STATUS_CARD_TONE[status] : "default", buttonTone = status ? BUTTON_TONE[status] : "default", role = status ? ROLES[status] : "status", visualDuration = _visualEditing.usePrefersReducedMotion() ? 0 : 0.26;
902
- let t1;
903
- $[10] !== visualDuration ? (t1 = visualDuration ? {
768
+ ...rest
769
+ } = t0, $[0] = t0, $[1] = closable, $[2] = description, $[3] = duration, $[4] = onClose, $[5] = rest, $[6] = status, $[7] = t1, $[8] = t2, $[9] = title) : (closable = $[1], description = $[2], duration = $[3], onClose = $[4], rest = $[5], status = $[6], t1 = $[7], t2 = $[8], title = $[9]);
770
+ const as = t1 === void 0 ? DEFAULT_TOAST_ELEMENT : t1, radius = t2 === void 0 ? 3 : t2, cardTone = status ? STATUS_CARD_TONE[status] : "default", buttonTone = status ? BUTTON_TONE[status] : "default", role = status ? ROLES[status] : "status", visualDuration = usePrefersReducedMotion() ? 0 : 0.26;
771
+ let t3;
772
+ $[10] !== visualDuration ? (t3 = visualDuration ? {
904
773
  type: "spring",
905
774
  visualDuration,
906
775
  bounce: 0.25
907
776
  } : {
908
777
  duration: 0
909
- }, $[10] = visualDuration, $[11] = t1) : t1 = $[11];
910
- const transition = t1, hasDuration = duration && isFinite(duration) && duration < LONG_ENOUGH_BUT_NOT_TOO_LONG;
911
- let t2;
912
- $[12] === Symbol.for("react.memo_cache_sentinel") ? (t2 = ["hidden", "initial"], $[12] = t2) : t2 = $[12];
913
- const initial = t2;
914
- let t3;
915
- $[13] === Symbol.for("react.memo_cache_sentinel") ? (t3 = ["visible", "slideIn"], $[13] = t3) : t3 = $[13];
916
- const animate = t3;
778
+ }, $[10] = visualDuration, $[11] = t3) : t3 = $[11];
779
+ const transition = t3, hasDuration = duration && isFinite(duration) && duration < LONG_ENOUGH_BUT_NOT_TOO_LONG;
917
780
  let t4;
918
- $[14] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["hidden", "slideOut"], $[14] = t4) : t4 = $[14];
919
- const exit = t4;
781
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["hidden", "initial"], $[12] = t4) : t4 = $[12];
782
+ const initial = t4;
920
783
  let t5;
921
- $[15] === Symbol.for("react.memo_cache_sentinel") ? (t5 = css.toast(), $[15] = t5) : t5 = $[15];
922
- const t6 = hasDuration ? "" : void 0;
784
+ $[13] === Symbol.for("react.memo_cache_sentinel") ? (t5 = ["visible", "slideIn"], $[13] = t5) : t5 = $[13];
785
+ const animate = t5;
786
+ let t6;
787
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t6 = ["hidden", "slideOut"], $[14] = t6) : t6 = $[14];
788
+ const exit = t6;
923
789
  let t7;
924
- $[16] !== title ? (t7 = title && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { size: 1, weight: "medium", children: title }), $[16] = title, $[17] = t7) : t7 = $[17];
925
- let t8;
926
- $[18] !== description || $[19] !== transition ? (t8 = description && /* @__PURE__ */ jsxRuntime.jsx(MotionText, { muted: !0, size: 1, variants: content, transition, children: description }), $[18] = description, $[19] = transition, $[20] = t8) : t8 = $[20];
790
+ $[15] === Symbol.for("react.memo_cache_sentinel") ? (t7 = toast(), $[15] = t7) : t7 = $[15];
791
+ const t8 = hasDuration ? "" : void 0;
927
792
  let t9;
928
- $[21] !== t7 || $[22] !== t8 ? (t9 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Flex, { flex: 1, overflowX: "auto", padding: 3, children: /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Stack, { space: 3, children: [
929
- t7,
930
- t8
931
- ] }) }), $[21] = t7, $[22] = t8, $[23] = t9) : t9 = $[23];
793
+ $[16] !== title ? (t9 = title && /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", children: title }), $[16] = title, $[17] = t9) : t9 = $[17];
932
794
  let t10;
933
- $[24] !== buttonTone || $[25] !== closable || $[26] !== onClose ? (t10 = closable && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { padding: 1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Button, { as: "button", icon: icons.CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
934
- verticalAlign: "top"
935
- } }) }), $[24] = buttonTone, $[25] = closable, $[26] = onClose, $[27] = t10) : t10 = $[27];
795
+ $[18] !== description || $[19] !== transition ? (t10 = description && /* @__PURE__ */ jsx(MotionText, { muted: !0, size: 1, variants: content, transition, children: description }), $[18] = description, $[19] = transition, $[20] = t10) : t10 = $[20];
936
796
  let t11;
937
- $[28] !== t10 || $[29] !== t9 || $[30] !== transition ? (t11 = /* @__PURE__ */ jsxRuntime.jsxs(MotionFlex, { align: "flex-start", variants: content, transition, children: [
797
+ $[21] !== t10 || $[22] !== t9 ? (t11 = /* @__PURE__ */ jsx(Flex, { flex: 1, overflowX: "auto", padding: 3, children: /* @__PURE__ */ jsxs(Stack, { gap: 3, children: [
938
798
  t9,
939
799
  t10
940
- ] }), $[28] = t10, $[29] = t9, $[30] = transition, $[31] = t11) : t11 = $[31];
800
+ ] }) }), $[21] = t10, $[22] = t9, $[23] = t11) : t11 = $[23];
941
801
  let t12;
942
- $[32] !== cardTone || $[33] !== duration || $[34] !== hasDuration || $[35] !== onClose || $[36] !== radius || $[37] !== transition || $[38] !== updatedAt || $[39] !== visualDuration ? (t12 = hasDuration && /* @__PURE__ */ jsxRuntime.jsxs(MotionBox, { className: css.toastLoadingBar(), variants: content, transition, children: [
943
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { className: css.toastLoadingBarMask(), tone: cardTone, radius }),
944
- /* @__PURE__ */ jsxRuntime.jsx(MotionCard, { className: css.toastLoadingBarProgress(), tone: cardTone, initial: {
945
- scaleX: 0
946
- }, animate: {
947
- scaleX: 1
948
- }, transition: {
949
- delay: visualDuration,
950
- duration: duration / 1e3,
951
- ease: "linear"
952
- }, onAnimationComplete: onClose }, `progress-${updatedAt}`)
953
- ] }), $[32] = cardTone, $[33] = duration, $[34] = hasDuration, $[35] = onClose, $[36] = radius, $[37] = transition, $[38] = updatedAt, $[39] = visualDuration, $[40] = t12) : t12 = $[40];
802
+ $[24] !== buttonTone || $[25] !== closable || $[26] !== onClose ? (t12 = closable && /* @__PURE__ */ jsx(Box, { padding: 1, children: /* @__PURE__ */ jsx(Button, { as: "button", icon: CloseIcon, mode: "bleed", padding: 2, tone: buttonTone, onClick: onClose, style: {
803
+ verticalAlign: "top"
804
+ } }) }), $[24] = buttonTone, $[25] = closable, $[26] = onClose, $[27] = t12) : t12 = $[27];
954
805
  let t13;
955
- return $[41] !== cardTone || $[42] !== radius || $[43] !== restProps || $[44] !== role || $[45] !== t11 || $[46] !== t12 || $[47] !== t6 || $[48] !== transition || $[49] !== visualDuration ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { as: "li", className: t5, "data-ui": "Toast", role, ...restProps, "data-has-duration": t6, custom: visualDuration, radius, shadow: 2, tone: cardTone, layout: "position", variants: container, initial, animate, exit, transition, position: "relative", children: [
806
+ $[28] !== t11 || $[29] !== t12 || $[30] !== transition ? (t13 = /* @__PURE__ */ jsxs(MotionFlex, { align: "flex-start", variants: content, transition, children: [
956
807
  t11,
957
808
  t12
958
- ] }), $[41] = cardTone, $[42] = radius, $[43] = restProps, $[44] = role, $[45] = t11, $[46] = t12, $[47] = t6, $[48] = transition, $[49] = visualDuration, $[50] = t13) : t13 = $[50], t13;
809
+ ] }), $[28] = t11, $[29] = t12, $[30] = transition, $[31] = t13) : t13 = $[31];
810
+ let t14;
811
+ return $[32] !== as || $[33] !== cardTone || $[34] !== radius || $[35] !== rest || $[36] !== role || $[37] !== t13 || $[38] !== t8 || $[39] !== transition || $[40] !== visualDuration ? (t14 = /* @__PURE__ */ jsx(MotionCard, { as, className: t7, "data-ui": "Toast", role, ...rest, custom: visualDuration, "data-has-duration": t8, radius, shadow: 2, tone: cardTone, layout: "position", variants: container, initial, animate, exit, transition, position: "relative", children: t13 }), $[32] = as, $[33] = cardTone, $[34] = radius, $[35] = rest, $[36] = role, $[37] = t13, $[38] = t8, $[39] = transition, $[40] = visualDuration, $[41] = t14) : t14 = $[41], t14;
959
812
  }
960
- Toast.displayName = "Toast";
961
813
  const container = {
962
814
  initial: {
963
815
  y: 32,
@@ -995,44 +847,44 @@ const container = {
995
847
  visible: {
996
848
  opacity: 1
997
849
  }
998
- }, MotionCard = framerMotion.motion.create(_visualEditing.Card), MotionFlex = framerMotion.motion.create(_visualEditing.Flex), MotionText = framerMotion.motion.create(_visualEditing.Text), MotionBox = framerMotion.motion.create(_visualEditing.Box);
850
+ }, MotionCard = motion.create(Card), MotionFlex = motion.create(Flex), MotionText = motion.create(Text);
999
851
  function useMounted() {
1000
- return react.useSyncExternalStore(subscribe, _temp$1, _temp2);
852
+ return useSyncExternalStore(subscribe, _temp$3, _temp2);
1001
853
  }
1002
854
  function _temp2() {
1003
855
  return !1;
1004
856
  }
1005
- function _temp$1() {
857
+ function _temp$3() {
1006
858
  return !0;
1007
859
  }
1008
860
  const subscribe = () => () => {
1009
- }, ToastContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/toast", null);
861
+ }, ToastContext = createGlobalScopedContext("@sanity/ui/context/toast", null), DEFAULT_TOAST_LAYER_ELEMENT = "ul";
1010
862
  function ToastLayer(props) {
1011
- const $ = reactCompilerRuntime.c(10), {
863
+ const $ = c(11), {
864
+ as: t0,
1012
865
  children,
1013
- padding: t0,
866
+ padding: t1,
1014
867
  paddingX,
1015
868
  paddingY,
1016
- gap: t1
1017
- } = props, padding = t0 === void 0 ? 4 : t0, gap = t1 === void 0 ? 3 : t1, {
869
+ gap: t2
870
+ } = props, as = t0 === void 0 ? DEFAULT_TOAST_LAYER_ELEMENT : t0, padding = t1 === void 0 ? 4 : t1, gap = t2 === void 0 ? 3 : t2, {
1018
871
  zIndex
1019
- } = _visualEditing.useLayer();
1020
- let t2;
1021
- $[0] === Symbol.for("react.memo_cache_sentinel") ? (t2 = css.toastLayer(), $[0] = t2) : t2 = $[0];
872
+ } = useLayer();
1022
873
  let t3;
1023
- $[1] !== zIndex ? (t3 = {
1024
- zIndex
1025
- }, $[1] = zIndex, $[2] = t3) : t3 = $[2];
874
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t3 = toastLayer(), $[0] = t3) : t3 = $[0];
1026
875
  let t4;
1027
- return $[3] !== children || $[4] !== gap || $[5] !== padding || $[6] !== paddingX || $[7] !== paddingY || $[8] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Grid, { as: "ul", className: t2, "data-ui": "ToastProvider", padding, paddingX, paddingY, gap, columns: 1, style: t3, children }), $[3] = children, $[4] = gap, $[5] = padding, $[6] = paddingX, $[7] = paddingY, $[8] = t3, $[9] = t4) : t4 = $[9], t4;
876
+ $[1] !== zIndex ? (t4 = {
877
+ zIndex
878
+ }, $[1] = zIndex, $[2] = t4) : t4 = $[2];
879
+ let t5;
880
+ return $[3] !== as || $[4] !== children || $[5] !== gap || $[6] !== padding || $[7] !== paddingX || $[8] !== paddingY || $[9] !== t4 ? (t5 = /* @__PURE__ */ jsx(Grid, { as, className: t3, "data-ui": "ToastProvider", padding, paddingX, paddingY, gap, columns: 1, style: t4, children }), $[3] = as, $[4] = children, $[5] = gap, $[6] = padding, $[7] = paddingX, $[8] = paddingY, $[9] = t4, $[10] = t5) : t5 = $[10], t5;
1028
881
  }
1029
- ToastLayer.displayName = "ToastLayer";
1030
882
  let toastId = 0;
1031
883
  function generateToastId() {
1032
884
  return String(toastId++);
1033
885
  }
1034
886
  function ToastProvider(props) {
1035
- const $ = reactCompilerRuntime.c(13), {
887
+ const $ = c(13), {
1036
888
  children,
1037
889
  padding,
1038
890
  paddingX,
@@ -1042,21 +894,24 @@ function ToastProvider(props) {
1042
894
  } = props, zOffset = t0 === void 0 ? 1 : t0;
1043
895
  let t1;
1044
896
  $[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[0] = t1) : t1 = $[0];
1045
- const [state, setState] = react.useState(t1), mounted = useMounted();
897
+ const [state, setState] = useState(t1), mounted = useMounted();
1046
898
  let t2, t3;
1047
899
  $[1] === Symbol.for("react.memo_cache_sentinel") ? (t3 = {
1048
900
  version: 0,
1049
901
  push: (params) => {
1050
- const id = params.id || generateToastId(), duration = params.duration || 5e3;
1051
- return react.startTransition(() => {
902
+ const id = params.id ?? generateToastId(), duration = params.duration ?? 5e3;
903
+ return startTransition(() => {
1052
904
  setState((prevState) => {
1053
905
  if (duration === 0.01)
1054
- return prevState.filter((toast) => toast.id !== id);
1055
- const dismiss = () => react.startTransition(() => setState((currentState) => currentState.filter((toast_0) => toast_0.id !== id)));
906
+ return prevState.filter((toast2) => toast2.id !== id);
907
+ const dismiss = () => {
908
+ startTransition(() => {
909
+ timeoutId && clearTimeout(timeoutId), setState((currentState) => currentState.filter((toast_0) => toast_0.id !== id));
910
+ });
911
+ }, timeoutId = setTimeout(dismiss, duration);
1056
912
  return [...prevState.filter((toast_1) => toast_1.id !== id), {
1057
913
  dismiss,
1058
914
  id,
1059
- updatedAt: Date.now(),
1060
915
  params: {
1061
916
  ...params,
1062
917
  duration
@@ -1068,28 +923,26 @@ function ToastProvider(props) {
1068
923
  }, $[1] = t3) : t3 = $[1], t2 = t3;
1069
924
  const value = t2;
1070
925
  let t4;
1071
- $[2] !== gap || $[3] !== mounted || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== state || $[8] !== zOffset ? (t4 = mounted && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.LayerProvider, { zOffset, children: /* @__PURE__ */ jsxRuntime.jsx(ToastLayer, { padding, paddingX, paddingY, gap, children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: !1, mode: "popLayout", children: state.map(_temp) }) }) }), $[2] = gap, $[3] = mounted, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = state, $[8] = zOffset, $[9] = t4) : t4 = $[9];
926
+ $[2] !== gap || $[3] !== mounted || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== state || $[8] !== zOffset ? (t4 = mounted && /* @__PURE__ */ jsx(LayerProvider, { zOffset, children: /* @__PURE__ */ jsx(ToastLayer, { padding, paddingX, paddingY, gap, children: /* @__PURE__ */ jsx(AnimatePresence, { initial: !1, mode: "popLayout", children: state.map(_temp$2) }) }) }), $[2] = gap, $[3] = mounted, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = state, $[8] = zOffset, $[9] = t4) : t4 = $[9];
1072
927
  let t5;
1073
- return $[10] !== children || $[11] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(ToastContext.Provider, { value, children: [
928
+ return $[10] !== children || $[11] !== t4 ? (t5 = /* @__PURE__ */ jsxs(ToastContext.Provider, { value, children: [
1074
929
  children,
1075
930
  t4
1076
931
  ] }), $[10] = children, $[11] = t4, $[12] = t5) : t5 = $[12], t5;
1077
932
  }
1078
- function _temp(t0) {
933
+ function _temp$2(t0) {
1079
934
  const {
1080
935
  dismiss: dismiss_0,
1081
936
  id: id_0,
1082
- params: params_0,
1083
- updatedAt
937
+ params: params_0
1084
938
  } = t0;
1085
- return /* @__PURE__ */ jsxRuntime.jsx(Toast, { closable: params_0.closable, description: params_0.description, onClose: dismiss_0, status: params_0.status, title: params_0.title, duration: params_0.duration, updatedAt }, id_0);
939
+ return /* @__PURE__ */ jsx(Toast, { closable: params_0.closable, description: params_0.description, onClose: dismiss_0, status: params_0.status, title: params_0.title, duration: params_0.duration }, id_0);
1086
940
  }
1087
- ToastProvider.displayName = "ToastProvider";
1088
941
  function useToast() {
1089
- const value = react.useContext(ToastContext);
942
+ const value = useContext(ToastContext);
1090
943
  if (!value)
1091
944
  throw new Error("useToast(): missing context value");
1092
- if (!_visualEditing.isRecord(value) || value.version !== 0)
945
+ if (!isRecord(value) || value.version !== 0)
1093
946
  throw new Error("useToast(): the context value is not compatible");
1094
947
  return value;
1095
948
  }
@@ -1147,38 +1000,40 @@ function _focusItemElement(el) {
1147
1000
  firstChild && firstChild instanceof HTMLElement && firstChild.focus();
1148
1001
  }
1149
1002
  }
1150
- const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
1151
- const $ = reactCompilerRuntime.c(38);
1152
- let children, gap, onFocus, restProps, t0;
1153
- $[0] !== props ? ({
1003
+ const TreeContext = createGlobalScopedContext("@sanity/ui/context/tree", null), DEFAULT_TREE_ELEMENT = "div";
1004
+ function Tree(props) {
1005
+ const $ = c(39), t0 = props;
1006
+ let children, forwardedRef, gap, onFocus, rest, t1;
1007
+ $[0] !== t0 ? ({
1154
1008
  children,
1155
1009
  gap,
1156
- space: t0,
1010
+ space: t1,
1157
1011
  onFocus,
1158
- ...restProps
1159
- } = props, $[0] = props, $[1] = children, $[2] = gap, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], gap = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
1160
- const space = t0 === void 0 ? 1 : t0, ref = react.useRef(null), [focusedElement, setFocusedElement] = react.useState(null), focusedElementRef = react.useRef(focusedElement);
1161
- let t1, t2;
1162
- $[6] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[6] = t2) : t2 = $[6], t1 = t2;
1163
- const path = t1;
1164
- let t3;
1165
- $[7] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [], $[7] = t3) : t3 = $[7];
1166
- const [itemElements, setItemElements] = react.useState(t3);
1012
+ ref: forwardedRef,
1013
+ ...rest
1014
+ } = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = gap, $[4] = onFocus, $[5] = rest, $[6] = t1) : (children = $[1], forwardedRef = $[2], gap = $[3], onFocus = $[4], rest = $[5], t1 = $[6]);
1015
+ const space = t1 === void 0 ? 1 : t1, ref = useRef(null), [focusedElement, setFocusedElement] = useState(null), focusedElementRef = useRef(focusedElement);
1016
+ let t2, t3;
1017
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [], $[7] = t3) : t3 = $[7], t2 = t3;
1018
+ const path = t2;
1167
1019
  let t4;
1168
- $[8] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {}, $[8] = t4) : t4 = $[8];
1169
- const [state, setState] = react.useState(t4), stateRef = react.useRef(state);
1020
+ $[8] === Symbol.for("react.memo_cache_sentinel") ? (t4 = [], $[8] = t4) : t4 = $[8];
1021
+ const [itemElements, setItemElements] = useState(t4);
1170
1022
  let t5;
1171
- $[9] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[9] = t5) : t5 = $[9], react.useImperativeHandle(forwardedRef, t5);
1172
- let t6, t7;
1173
- $[10] !== focusedElement ? (t6 = () => {
1023
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t5 = {}, $[9] = t5) : t5 = $[9];
1024
+ const [state, setState] = useState(t5), stateRef = useRef(state);
1025
+ let t6;
1026
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[10] = t6) : t6 = $[10], useImperativeHandle(forwardedRef, t6);
1027
+ let t7, t8;
1028
+ $[11] !== focusedElement ? (t7 = () => {
1174
1029
  focusedElementRef.current = focusedElement;
1175
- }, t7 = [focusedElement], $[10] = focusedElement, $[11] = t6, $[12] = t7) : (t6 = $[11], t7 = $[12]), react.useEffect(t6, t7);
1176
- let t8, t9;
1177
- $[13] !== state ? (t8 = () => {
1030
+ }, t8 = [focusedElement], $[11] = focusedElement, $[12] = t7, $[13] = t8) : (t7 = $[12], t8 = $[13]), useEffect(t7, t8);
1031
+ let t10, t9;
1032
+ $[14] !== state ? (t9 = () => {
1178
1033
  stateRef.current = state;
1179
- }, t9 = [state], $[13] = state, $[14] = t8, $[15] = t9) : (t8 = $[14], t9 = $[15]), react.useEffect(t8, t9);
1180
- let t10;
1181
- $[16] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
1034
+ }, t10 = [state], $[14] = state, $[15] = t10, $[16] = t9) : (t10 = $[15], t9 = $[16]), useEffect(t9, t10);
1035
+ let t11;
1036
+ $[17] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (element, path_0, expanded, selected) => (setState((s) => ({
1182
1037
  ...s,
1183
1038
  [path_0]: {
1184
1039
  element,
@@ -1191,10 +1046,10 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1191
1046
  };
1192
1047
  return delete newState[path_0], newState;
1193
1048
  });
1194
- }), $[16] = t10) : t10 = $[16];
1195
- const registerItem = t10;
1196
- let t11;
1197
- $[17] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
1049
+ }), $[17] = t11) : t11 = $[17];
1050
+ const registerItem = t11;
1051
+ let t12;
1052
+ $[18] === Symbol.for("react.memo_cache_sentinel") ? (t12 = (path_1, expanded_0) => {
1198
1053
  setState((s_1) => {
1199
1054
  const itemState = s_1[path_1];
1200
1055
  return itemState ? {
@@ -1205,14 +1060,14 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1205
1060
  }
1206
1061
  } : s_1;
1207
1062
  });
1208
- }, $[17] = t11) : t11 = $[17];
1209
- const setExpanded = t11;
1210
- let t12;
1211
- const t13 = focusedElement || itemElements[0] || null;
1212
- let t14;
1213
- $[18] !== space || $[19] !== state || $[20] !== t13 ? (t14 = {
1063
+ }, $[18] = t12) : t12 = $[18];
1064
+ const setExpanded = t12;
1065
+ let t13;
1066
+ const t14 = focusedElement || itemElements[0] || null;
1067
+ let t15;
1068
+ $[19] !== space || $[20] !== state || $[21] !== t14 ? (t15 = {
1214
1069
  version: 0,
1215
- focusedElement: t13,
1070
+ focusedElement: t14,
1216
1071
  level: 0,
1217
1072
  path,
1218
1073
  registerItem,
@@ -1220,10 +1075,10 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1220
1075
  setFocusedElement,
1221
1076
  space,
1222
1077
  state
1223
- }, $[18] = space, $[19] = state, $[20] = t13, $[21] = t14) : t14 = $[21], t12 = t14;
1224
- const contextValue = t12;
1225
- let t15;
1226
- $[22] !== itemElements ? (t15 = (event) => {
1078
+ }, $[19] = space, $[20] = state, $[21] = t14, $[22] = t15) : t15 = $[22], t13 = t15;
1079
+ const contextValue = t13;
1080
+ let t16;
1081
+ $[23] !== itemElements ? (t16 = (event) => {
1227
1082
  if (focusedElementRef.current) {
1228
1083
  if (event.key === "ArrowDown") {
1229
1084
  event.preventDefault();
@@ -1282,47 +1137,47 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1282
1137
  return;
1283
1138
  }
1284
1139
  }
1285
- }, $[22] = itemElements, $[23] = t15) : t15 = $[23];
1286
- const handleKeyDown = t15;
1287
- let t16;
1288
- $[24] !== onFocus ? (t16 = (event_0) => {
1289
- setFocusedElement(event_0.target), onFocus?.(event_0);
1290
- }, $[24] = onFocus, $[25] = t16) : t16 = $[25];
1291
- const handleFocus = t16;
1140
+ }, $[23] = itemElements, $[24] = t16) : t16 = $[24];
1141
+ const handleKeyDown = t16;
1292
1142
  let t17;
1293
- $[26] === Symbol.for("react.memo_cache_sentinel") ? (t17 = () => {
1143
+ $[25] !== onFocus ? (t17 = (event_0) => {
1144
+ setFocusedElement(event_0.target), onFocus?.(event_0);
1145
+ }, $[25] = onFocus, $[26] = t17) : t17 = $[26];
1146
+ const handleFocus = t17;
1147
+ let t18;
1148
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t18 = () => {
1294
1149
  if (!ref.current)
1295
1150
  return;
1296
1151
  const _itemElements = Array.from(ref.current.querySelectorAll('[data-ui="TreeItem"]'));
1297
1152
  setItemElements(_itemElements);
1298
- }, $[26] = t17) : t17 = $[26];
1299
- let t18;
1300
- $[27] !== children ? (t18 = [children], $[27] = children, $[28] = t18) : t18 = $[28], react.useEffect(t17, t18);
1301
- const t19 = gap ?? space;
1302
- let t20;
1303
- $[29] !== children || $[30] !== handleFocus || $[31] !== handleKeyDown || $[32] !== restProps || $[33] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ul", "data-ui": "Tree", ...restProps, gap: t19, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", children }), $[29] = children, $[30] = handleFocus, $[31] = handleKeyDown, $[32] = restProps, $[33] = t19, $[34] = t20) : t20 = $[34];
1153
+ }, $[27] = t18) : t18 = $[27];
1154
+ let t19;
1155
+ $[28] !== children ? (t19 = [children], $[28] = children, $[29] = t19) : t19 = $[29], useEffect(t18, t19);
1156
+ const t20 = gap ?? space;
1304
1157
  let t21;
1305
- return $[35] !== contextValue || $[36] !== t20 ? (t21 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t20 }), $[35] = contextValue, $[36] = t20, $[37] = t21) : t21 = $[37], t21;
1306
- }));
1307
- Tree.displayName = "Memo(ForwardRef(Tree))";
1158
+ $[30] !== children || $[31] !== handleFocus || $[32] !== handleKeyDown || $[33] !== rest || $[34] !== t20 ? (t21 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "Tree", ...rest, gap: t20, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", children }), $[30] = children, $[31] = handleFocus, $[32] = handleKeyDown, $[33] = rest, $[34] = t20, $[35] = t21) : t21 = $[35];
1159
+ let t22;
1160
+ return $[36] !== contextValue || $[37] !== t21 ? (t22 = /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: t21 }), $[36] = contextValue, $[37] = t21, $[38] = t22) : t22 = $[38], t22;
1161
+ }
1308
1162
  function useTree() {
1309
- const tree = react.useContext(TreeContext);
1163
+ const tree = useContext(TreeContext);
1310
1164
  if (!tree)
1311
1165
  throw new Error("Tree: missing context value");
1312
1166
  return tree;
1313
1167
  }
1314
- const TreeGroup = react.memo(function(props) {
1315
- const $ = reactCompilerRuntime.c(9);
1316
- let children, restProps, t0;
1317
- $[0] !== props ? ({
1168
+ const TreeGroup = memo(function(props) {
1169
+ const $ = c(9), t0 = props;
1170
+ let children, rest, t1;
1171
+ $[0] !== t0 ? ({
1318
1172
  children,
1319
- expanded: t0,
1320
- ...restProps
1321
- } = props, $[0] = props, $[1] = children, $[2] = restProps, $[3] = t0) : (children = $[1], restProps = $[2], t0 = $[3]);
1322
- const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
1323
- let t2;
1324
- return $[4] !== children || $[5] !== restProps || $[6] !== t1 || $[7] !== tree.space ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ul", "data-ui": "TreeGroup", ...restProps, hidden: t1, marginTop: tree.space, role: "group", space: tree.space, children }), $[4] = children, $[5] = restProps, $[6] = t1, $[7] = tree.space, $[8] = t2) : t2 = $[8], t2;
1325
- }), TreeItem = react.memo(function(props) {
1173
+ expanded: t1,
1174
+ ...rest
1175
+ } = t0, $[0] = t0, $[1] = children, $[2] = rest, $[3] = t1) : (children = $[1], rest = $[2], t1 = $[3]);
1176
+ const expanded = t1 === void 0 ? !1 : t1, tree = useTree(), t2 = !expanded;
1177
+ let t3;
1178
+ return $[4] !== children || $[5] !== rest || $[6] !== t2 || $[7] !== tree.space ? (t3 = /* @__PURE__ */ jsx(Stack, { as: "ul", "data-ui": "TreeGroup", ...rest, hidden: t2, marginTop: tree.space, role: "group", gap: tree.space, children }), $[4] = children, $[5] = rest, $[6] = t2, $[7] = tree.space, $[8] = t3) : t3 = $[8], t3;
1179
+ }), DEFAULT_TREE_ITEM_ELEMENT = "a";
1180
+ function TreeItem(props) {
1326
1181
  const {
1327
1182
  children,
1328
1183
  className,
@@ -1340,207 +1195,1274 @@ const TreeGroup = react.memo(function(props) {
1340
1195
  space = 2,
1341
1196
  text,
1342
1197
  weight,
1343
- ...restProps
1344
- } = props, rootRef = react.useRef(null), treeitemRef = react.useRef(null), tree = useTree(), {
1198
+ ...rest
1199
+ } = props, rootRef = useRef(null), treeitemRef = useRef(null), tree = useTree(), {
1345
1200
  path,
1346
1201
  registerItem,
1347
1202
  setExpanded,
1348
1203
  setFocusedElement
1349
- } = tree, _id = react.useId(), id = idProp || _id, itemPath = react.useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], focused = tree.focusedElement === rootRef.current, expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, tabIndex = tree.focusedElement && tree.focusedElement === rootRef.current ? 0 : -1, contextValue = react.useMemo(() => ({
1204
+ } = tree, _id = useId(), id = idProp || _id, itemPath = useMemo(() => path.concat([id || ""]), [id, path]), itemKey = itemPath.join("/"), itemState = tree.state[itemKey], expanded = itemState?.expanded === void 0 ? expandedProp : itemState?.expanded || !1, focused = tree.focusedElement && tree.focusedElement === rootRef.current, tabIndex = focused ? 0 : -1, contextValue = useMemo(() => ({
1350
1205
  ...tree,
1351
1206
  level: tree.level + 1,
1352
1207
  path: itemPath
1353
- }), [itemPath, tree]), handleClick = react.useCallback((event) => {
1208
+ }), [itemPath, tree]), handleClick = useCallback((event) => {
1354
1209
  onClick && onClick(event);
1355
1210
  const target = event.target;
1356
1211
  target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem" || target.closest('[data-ui="TreeItem__box"]')) && (event.stopPropagation(), setExpanded(itemKey, !expanded), setFocusedElement(rootRef.current));
1357
- }, [expanded, itemKey, onClick, setExpanded, setFocusedElement]), handleKeyDown = react.useCallback((event_0) => {
1212
+ }, [expanded, itemKey, onClick, setExpanded, setFocusedElement]), handleKeyDown = useCallback((event_0) => {
1358
1213
  focused && event_0.key === "Enter" && (treeitemRef.current || rootRef.current)?.click();
1359
1214
  }, [focused]);
1360
- react.useEffect(() => {
1215
+ useEffect(() => {
1361
1216
  if (rootRef.current)
1362
1217
  return registerItem(rootRef.current, itemPath.join("/"), expanded, selected);
1363
1218
  }, [expanded, itemPath, registerItem, selected]);
1364
- const content2 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { gap: space, padding, children: [
1365
- /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { style: {
1219
+ const content2 = /* @__PURE__ */ jsxs(Flex, { gap: space, padding, children: [
1220
+ /* @__PURE__ */ jsxs(Box, { style: {
1366
1221
  visibility: IconComponent || children ? "visible" : "hidden",
1367
1222
  pointerEvents: "none"
1368
1223
  }, children: [
1369
- IconComponent && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {}) }),
1370
- !IconComponent && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ToggleArrowRightIcon, { style: {
1224
+ IconComponent && /* @__PURE__ */ jsx(Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsx(IconComponent, {}) }),
1225
+ !IconComponent && /* @__PURE__ */ jsx(Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsx(ToggleArrowRightIcon, { style: {
1371
1226
  transform: expanded ? "rotate(90deg)" : void 0
1372
1227
  } }) })
1373
1228
  ] }),
1374
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) })
1229
+ /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) })
1375
1230
  ] });
1376
- return href ? /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...restProps, as: "li", className: css.composeClassNames(className, css.treeItem()), onClick: handleClick, ref: rootRef, role: "none", children: [
1377
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Selectable, { "aria-expanded": expanded, as: linkAs, "data-pressed": selected ? "" : void 0, "data-ui": "TreeItem__box", href, radius, ref: treeitemRef, role: "treeitem", tabIndex, style: {
1378
- paddingLeft: `calc(var(--space-2) * ${tree.level})`
1379
- }, children: content2 }),
1380
- /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }) })
1381
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...restProps, "aria-expanded": expanded, className: css.composeClassNames(className, css.treeItem()), onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
1382
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Selectable, { as: "button", "data-pressed": selected ? "" : void 0, "data-ui": "TreeItem__box", radius, style: {
1383
- paddingLeft: `calc(var(--space-2) * ${tree.level})`
1384
- }, children: content2 }),
1385
- /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }) })
1231
+ return href ? /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...rest, as: "li", className: treeItem({
1232
+ className
1233
+ }), onClick: handleClick, ref: rootRef, role: "none", children: [
1234
+ /* @__PURE__ */ jsx(
1235
+ Selectable,
1236
+ {
1237
+ "aria-expanded": expanded,
1238
+ as: linkAs,
1239
+ "data-ui": "TreeItem__box",
1240
+ href,
1241
+ radius,
1242
+ ref: treeitemRef,
1243
+ role: "treeitem",
1244
+ selected,
1245
+ tabIndex,
1246
+ style: {
1247
+ paddingLeft: `calc(${vars.space[2]} * ${tree.level})`
1248
+ },
1249
+ children: content2
1250
+ }
1251
+ ),
1252
+ /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { hidden: !expanded, children }) })
1253
+ ] }) : /* @__PURE__ */ jsxs(Box, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...rest, "aria-expanded": expanded, className: treeItem({
1254
+ className
1255
+ }), onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
1256
+ /* @__PURE__ */ jsx(
1257
+ Selectable,
1258
+ {
1259
+ as: "button",
1260
+ "data-focused": focused ? "" : void 0,
1261
+ "data-ui": "TreeItem__box",
1262
+ radius,
1263
+ selected,
1264
+ style: {
1265
+ paddingLeft: `calc(${vars.space[2]} * ${tree.level})`
1266
+ },
1267
+ children: content2
1268
+ }
1269
+ ),
1270
+ /* @__PURE__ */ jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsx(TreeGroup, { expanded, children }) })
1386
1271
  ] });
1387
- });
1388
- TreeItem.displayName = "Memo(TreeItem)";
1389
- function StyleTags(props) {
1390
- const $ = reactCompilerRuntime.c(14), {
1391
- theme: themeProp
1392
- } = props;
1393
- let t0;
1394
- $[0] !== themeProp ? (t0 = themeProp ?? theme.buildTheme_v3(), $[0] = themeProp, $[1] = t0) : t0 = $[1];
1395
- const theme$1 = t0;
1396
- let t1;
1397
- $[2] !== theme$1._palette ? (t1 = css.compilePalette(theme$1._palette), $[2] = theme$1._palette, $[3] = t1) : t1 = $[3];
1398
- let t2;
1399
- $[4] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-palette", precedence: "palette", children: t1 }), $[4] = t1, $[5] = t2) : t2 = $[5];
1400
- let t3;
1401
- $[6] !== theme$1 ? (t3 = css.compileTheme({
1402
- v3: theme$1
1403
- }), $[6] = theme$1, $[7] = t3) : t3 = $[7];
1272
+ }
1273
+ function _isScrollable(el) {
1274
+ if (!(el instanceof Element)) return !1;
1275
+ const style = window.getComputedStyle(el);
1276
+ return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
1277
+ }
1278
+ const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, DEFAULT_VIRTUAL_LIST_ELEMENT = "div";
1279
+ function VirtualList(props) {
1280
+ const $ = c(61), t0 = props;
1281
+ let forwardedRef, getItemKey, onChange, renderItem, rest, t1, t2, t3;
1282
+ $[0] !== t0 ? ({
1283
+ as: t1,
1284
+ gap: t2,
1285
+ getItemKey,
1286
+ items: t3,
1287
+ onChange,
1288
+ renderItem,
1289
+ ref: forwardedRef,
1290
+ ...rest
1291
+ } = t0, $[0] = t0, $[1] = forwardedRef, $[2] = getItemKey, $[3] = onChange, $[4] = renderItem, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3) : (forwardedRef = $[1], getItemKey = $[2], onChange = $[3], renderItem = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8]);
1292
+ const as = t1 === void 0 ? DEFAULT_VIRTUAL_LIST_ELEMENT : t1, gap = t2 === void 0 ? 0 : t2;
1404
1293
  let t4;
1405
- $[8] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-theme", precedence: "theme", children: t3 }), $[8] = t3, $[9] = t4) : t4 = $[9];
1294
+ $[9] !== t3 ? (t4 = t3 === void 0 ? [] : t3, $[9] = t3, $[10] = t4) : t4 = $[10];
1295
+ const items = t4, ref = useRef(null), wrapperRef = useRef(null), [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), [itemHeight, setItemHeight] = useState(-1), [gapValue, setGapValue] = useState(0);
1406
1296
  let t5;
1407
- $[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-system", precedence: "system", children: css.compileSystem() }), $[10] = t5) : t5 = $[10];
1408
- let t6;
1409
- return $[11] !== t2 || $[12] !== t4 ? (t6 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1410
- t2,
1411
- t4,
1412
- t5
1413
- ] }), $[11] = t2, $[12] = t4, $[13] = t6) : t6 = $[13], t6;
1414
- }
1415
- exports.Arrow = _visualEditing.Arrow;
1416
- exports.Avatar = _visualEditing.Avatar;
1417
- exports.AvatarCounter = _visualEditing.AvatarCounter;
1418
- exports.AvatarStack = _visualEditing.AvatarStack;
1419
- exports.Badge = _visualEditing.Badge;
1420
- exports.BoundaryElementProvider = _visualEditing.BoundaryElementProvider;
1421
- exports.Box = _visualEditing.Box;
1422
- exports.Button = _visualEditing.Button;
1423
- exports.Card = _visualEditing.Card;
1424
- exports.CardProvider = _visualEditing.CardProvider;
1425
- exports.Checkbox = _visualEditing.Checkbox;
1426
- exports.Code = _visualEditing.Code;
1427
- exports.ConditionalWrapper = _visualEditing.ConditionalWrapper;
1428
- exports.Container = _visualEditing.Container;
1429
- exports.ElementQuery = _visualEditing.ElementQuery;
1430
- exports.Flex = _visualEditing.Flex;
1431
- exports.Grid = _visualEditing.Grid;
1432
- exports.Heading = _visualEditing.Heading;
1433
- exports.Hotkeys = _visualEditing.Hotkeys;
1434
- exports.Inline = _visualEditing.Inline;
1435
- exports.KBD = _visualEditing.KBD;
1436
- exports.Label = _visualEditing.Label;
1437
- exports.Layer = _visualEditing.Layer;
1438
- exports.LayerProvider = _visualEditing.LayerProvider;
1439
- exports.Menu = _visualEditing.Menu;
1440
- exports.MenuDivider = _visualEditing.MenuDivider;
1441
- exports.MenuGroup = _visualEditing.MenuGroup;
1442
- exports.MenuItem = _visualEditing.MenuItem;
1443
- exports.Popover = _visualEditing.Popover;
1444
- exports.Portal = _visualEditing.Portal;
1445
- exports.PortalProvider = _visualEditing.PortalProvider;
1446
- exports.Radio = _visualEditing.Radio;
1447
- exports.Select = _visualEditing.Select;
1448
- exports.Spinner = _visualEditing.Spinner;
1449
- exports.SrOnly = _visualEditing.SrOnly;
1450
- exports.Stack = _visualEditing.Stack;
1451
- exports.Switch = _visualEditing.Switch;
1452
- exports.Tab = _visualEditing.Tab;
1453
- exports.TabList = _visualEditing.TabList;
1454
- exports.Text = _visualEditing.Text;
1455
- exports.TextArea = _visualEditing.TextArea;
1456
- exports.TextInput = _visualEditing.TextInput;
1457
- exports.ThemeColorProvider = _visualEditing.ThemeColorProvider;
1458
- exports.ThemeProvider = _visualEditing.ThemeProvider;
1459
- exports.Tooltip = _visualEditing.Tooltip;
1460
- exports.TooltipDelayGroupContext = _visualEditing.TooltipDelayGroupContext;
1461
- exports.TooltipDelayGroupProvider = _visualEditing.TooltipDelayGroupProvider;
1462
- exports.VirtualList = _visualEditing.VirtualList;
1463
- exports._ResizeObserver = _visualEditing._ResizeObserver;
1464
- exports._elementSizeObserver = _visualEditing._elementSizeObserver;
1465
- exports._getArrayProp = _visualEditing._getArrayProp;
1466
- exports._isEnterToClickElement = _visualEditing._isEnterToClickElement;
1467
- exports._isScrollable = _visualEditing._isScrollable;
1468
- exports.containsOrEqualsElement = _visualEditing.containsOrEqualsElement;
1469
- exports.createColorTheme = _visualEditing.createColorTheme;
1470
- exports.hexToRgb = _visualEditing.hexToRgb;
1471
- exports.hslToRgb = _visualEditing.hslToRgb;
1472
- exports.isHTMLAnchorElement = _visualEditing.isHTMLAnchorElement;
1473
- exports.isHTMLButtonElement = _visualEditing.isHTMLButtonElement;
1474
- exports.isHTMLElement = _visualEditing.isHTMLElement;
1475
- exports.isHTMLInputElement = _visualEditing.isHTMLInputElement;
1476
- exports.isHTMLSelectElement = _visualEditing.isHTMLSelectElement;
1477
- exports.isHTMLTextAreaElement = _visualEditing.isHTMLTextAreaElement;
1478
- exports.multiply = _visualEditing.multiply;
1479
- exports.parseColor = _visualEditing.parseColor;
1480
- exports.rgbToHex = _visualEditing.rgbToHex;
1481
- exports.rgbToHsl = _visualEditing.rgbToHsl;
1482
- exports.rgba = _visualEditing.rgba;
1483
- exports.screen = _visualEditing.screen;
1484
- exports.studioTheme = _visualEditing.studioTheme;
1485
- exports.useArrayProp = _visualEditing.useArrayProp;
1486
- exports.useBoundaryElement = _visualEditing.useBoundaryElement;
1487
- exports.useCard = _visualEditing.useCard;
1488
- exports.useClickOutsideEvent = _visualEditing.useClickOutsideEvent;
1489
- exports.useCustomValidity = _visualEditing.useCustomValidity;
1490
- exports.useElementSize = _visualEditing.useElementSize;
1491
- exports.useGlobalKeyDown = _visualEditing.useGlobalKeyDown;
1492
- exports.useLayer = _visualEditing.useLayer;
1493
- exports.useMatchMedia = _visualEditing.useMatchMedia;
1494
- exports.useMediaIndex = _visualEditing.useMediaIndex;
1495
- exports.usePortal = _visualEditing.usePortal;
1496
- exports.usePrefersDark = _visualEditing.usePrefersDark;
1497
- exports.usePrefersReducedMotion = _visualEditing.usePrefersReducedMotion;
1498
- exports.useRootTheme = _visualEditing.useRootTheme;
1499
- exports.useTheme = _visualEditing.useTheme;
1500
- exports.useTheme_v2 = _visualEditing.useTheme_v2;
1501
- exports.useTooltipDelayGroup = _visualEditing.useTooltipDelayGroup;
1502
- Object.defineProperty(exports, "px", {
1503
- enumerable: !0,
1504
- get: function() {
1505
- return css.px;
1506
- }
1507
- });
1508
- Object.defineProperty(exports, "rem", {
1509
- enumerable: !0,
1510
- get: function() {
1511
- return css.rem;
1297
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[11] = t5) : t5 = $[11], useImperativeHandle(forwardedRef, t5);
1298
+ let t6, t7;
1299
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => {
1300
+ if (!ref.current)
1301
+ return;
1302
+ const scrollEl = findScrollable(ref.current.parentNode);
1303
+ if (scrollEl) {
1304
+ if (!(scrollEl instanceof HTMLElement))
1305
+ return;
1306
+ const handleScroll = () => {
1307
+ setScrollTop(scrollEl.scrollTop);
1308
+ };
1309
+ scrollEl.addEventListener("scroll", handleScroll, {
1310
+ passive: !0
1311
+ });
1312
+ const ro = new _ResizeObserver((entries) => {
1313
+ setScrollHeight(entries[0].contentRect.height);
1314
+ });
1315
+ return ro.observe(scrollEl), handleScroll(), () => {
1316
+ scrollEl.removeEventListener("scroll", handleScroll), ro.unobserve(scrollEl), ro.disconnect();
1317
+ };
1318
+ }
1319
+ const handleScroll_0 = () => {
1320
+ setScrollTop(window.scrollY);
1321
+ }, handleResize = () => {
1322
+ setScrollHeight(window.innerHeight);
1323
+ };
1324
+ return window.addEventListener("scroll", handleScroll_0, {
1325
+ passive: !0
1326
+ }), window.addEventListener("resize", handleResize), setScrollHeight(window.innerHeight), handleScroll_0(), () => {
1327
+ window.removeEventListener("scroll", handleScroll_0), window.removeEventListener("resize", handleResize);
1328
+ };
1329
+ }, t7 = [], $[12] = t6, $[13] = t7) : (t6 = $[12], t7 = $[13]), useEffect(t6, t7);
1330
+ const len = items.length, height = itemHeight ? len * (itemHeight + gapValue) - gapValue : 0, fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0, toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
1331
+ let t8, t9;
1332
+ $[14] !== fromIndex || $[15] !== gapValue || $[16] !== itemHeight || $[17] !== onChange || $[18] !== scrollHeight || $[19] !== scrollTop || $[20] !== toIndex ? (t8 = () => {
1333
+ onChange?.({
1334
+ fromIndex,
1335
+ gap: gapValue,
1336
+ itemHeight,
1337
+ scrollHeight,
1338
+ scrollTop,
1339
+ toIndex
1340
+ });
1341
+ }, t9 = [fromIndex, gapValue, itemHeight, onChange, scrollHeight, scrollTop, toIndex], $[14] = fromIndex, $[15] = gapValue, $[16] = itemHeight, $[17] = onChange, $[18] = scrollHeight, $[19] = scrollTop, $[20] = toIndex, $[21] = t8, $[22] = t9) : (t8 = $[21], t9 = $[22]), useEffect(t8, t9);
1342
+ let t10;
1343
+ $[23] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => {
1344
+ setItemHeight(-1);
1345
+ }, $[23] = t10) : t10 = $[23];
1346
+ let t11;
1347
+ $[24] !== renderItem ? (t11 = [renderItem], $[24] = renderItem, $[25] = t11) : t11 = $[25], useEffect(t10, t11);
1348
+ let t12;
1349
+ bb0: {
1350
+ if (!renderItem || items.length === 0) {
1351
+ t12 = null;
1352
+ break bb0;
1353
+ }
1354
+ if (itemHeight === -1) {
1355
+ let t133;
1356
+ $[26] === Symbol.for("react.memo_cache_sentinel") ? (t133 = (el) => el ? setItemHeight(el.offsetHeight) : void 0, $[26] = t133) : t133 = $[26];
1357
+ let t142;
1358
+ $[27] !== items[0] || $[28] !== renderItem ? (t142 = renderItem(items[0]), $[27] = items[0], $[28] = renderItem, $[29] = t142) : t142 = $[29];
1359
+ let t152;
1360
+ $[30] !== t142 ? (t152 = /* @__PURE__ */ jsx(Box, { ref: t133, insetTop: 0, insetLeft: 0, insetRight: 0, position: "absolute", children: t142 }, 0), $[30] = t142, $[31] = t152) : t152 = $[31];
1361
+ let t162;
1362
+ $[32] === Symbol.for("react.memo_cache_sentinel") ? (t162 = (el_0) => el_0 ? setGapValue(el_0.offsetHeight) : void 0, $[32] = t162) : t162 = $[32];
1363
+ const t17 = vars.space[gap];
1364
+ let t18;
1365
+ $[33] !== t17 ? (t18 = /* @__PURE__ */ jsx("div", { ref: t162, style: {
1366
+ height: t17
1367
+ } }), $[33] = t17, $[34] = t18) : t18 = $[34];
1368
+ let t19;
1369
+ $[35] !== t152 || $[36] !== t18 ? (t19 = [/* @__PURE__ */ jsxs(Fragment$1, { children: [
1370
+ t152,
1371
+ t18
1372
+ ] })], $[35] = t152, $[36] = t18, $[37] = t19) : t19 = $[37], t12 = t19;
1373
+ break bb0;
1374
+ }
1375
+ let t132;
1376
+ if ($[38] !== fromIndex || $[39] !== gapValue || $[40] !== getItemKey || $[41] !== itemHeight || $[42] !== items || $[43] !== renderItem || $[44] !== toIndex) {
1377
+ let t142;
1378
+ $[46] !== fromIndex || $[47] !== gapValue || $[48] !== getItemKey || $[49] !== itemHeight || $[50] !== renderItem ? (t142 = (item, _itemIndex) => {
1379
+ const itemIndex = fromIndex + _itemIndex, node = renderItem(item), key = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
1380
+ return /* @__PURE__ */ jsx(Box, { insetLeft: 0, insetRight: 0, position: "absolute", style: {
1381
+ top: itemIndex * (itemHeight + gapValue)
1382
+ }, children: node }, key);
1383
+ }, $[46] = fromIndex, $[47] = gapValue, $[48] = getItemKey, $[49] = itemHeight, $[50] = renderItem, $[51] = t142) : t142 = $[51], t132 = items.slice(fromIndex, toIndex).map(t142), $[38] = fromIndex, $[39] = gapValue, $[40] = getItemKey, $[41] = itemHeight, $[42] = items, $[43] = renderItem, $[44] = toIndex, $[45] = t132;
1384
+ } else
1385
+ t132 = $[45];
1386
+ t12 = t132;
1512
1387
  }
1513
- });
1514
- exports.Autocomplete = Autocomplete;
1515
- exports.Breadcrumbs = Breadcrumbs;
1516
- exports.CodeSkeleton = CodeSkeleton;
1517
- exports.Dialog = Dialog;
1518
- exports.DialogContext = DialogContext;
1519
- exports.DialogProvider = DialogProvider;
1520
- exports.ErrorBoundary = ErrorBoundary;
1521
- exports.HeadingSkeleton = HeadingSkeleton;
1522
- exports.LabelSkeleton = LabelSkeleton;
1523
- exports.MenuButton = MenuButton;
1524
- exports.Skeleton = Skeleton;
1525
- exports.StyleTags = StyleTags;
1526
- exports.TabPanel = TabPanel;
1527
- exports.TextSkeleton = TextSkeleton;
1528
- exports.Toast = Toast;
1529
- exports.ToastProvider = ToastProvider;
1530
- exports.Tree = Tree;
1531
- exports.TreeItem = TreeItem;
1532
- exports._hasFocus = _hasFocus;
1533
- exports._raf = _raf;
1534
- exports._raf2 = _raf2;
1535
- exports._responsive = _responsive;
1536
- exports.attemptFocus = attemptFocus;
1537
- exports.focusFirstDescendant = focusFirstDescendant;
1538
- exports.focusLastDescendant = focusLastDescendant;
1539
- exports.isFocusable = isFocusable;
1540
- exports.useClickOutside = useClickOutside;
1541
- exports.useDialog = useDialog;
1542
- exports.useElementRect = useElementRect;
1543
- exports.useForwardedRef = useForwardedRef;
1544
- exports.useToast = useToast;
1545
- exports.useTree = useTree;
1388
+ const children = t12;
1389
+ let t13, t14;
1390
+ $[52] !== height ? (t14 = {
1391
+ height
1392
+ }, $[52] = height, $[53] = t14) : t14 = $[53], t13 = t14;
1393
+ const wrapperStyle = t13;
1394
+ let t15;
1395
+ $[54] !== children || $[55] !== wrapperStyle ? (t15 = /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: wrapperStyle, children }), $[54] = children, $[55] = wrapperStyle, $[56] = t15) : t15 = $[56];
1396
+ let t16;
1397
+ return $[57] !== as || $[58] !== rest || $[59] !== t15 ? (t16 = /* @__PURE__ */ jsx(Box, { "data-ui": "VirtualList", ...rest, as, position: "relative", ref, children: t15 }), $[57] = as, $[58] = rest, $[59] = t15, $[60] = t16) : t16 = $[60], t16;
1398
+ }
1399
+ function findScrollable(parentNode) {
1400
+ let _scrollEl = parentNode;
1401
+ for (; _scrollEl && !_isScrollable(_scrollEl); )
1402
+ _scrollEl = _scrollEl.parentNode;
1403
+ return _scrollEl;
1404
+ }
1405
+ function useArrayProp(val, defaultVal) {
1406
+ const $ = c(3);
1407
+ let t0;
1408
+ $[0] !== defaultVal || $[1] !== val ? (t0 = () => [_getArrayProp(val, defaultVal), JSON.stringify(val ?? defaultVal)], $[0] = defaultVal, $[1] = val, $[2] = t0) : t0 = $[2];
1409
+ const [t1, setCache] = useState(t0), [cachedVal, cachedHash] = t1, hash = JSON.stringify(val ?? defaultVal);
1410
+ return hash !== cachedHash && setCache([_getArrayProp(val, defaultVal), hash]), cachedVal;
1411
+ }
1412
+ function _getElements(element, elementsArg) {
1413
+ const ret = [element];
1414
+ for (const el of elementsArg)
1415
+ Array.isArray(el) ? ret.push(...el) : ret.push(el);
1416
+ return ret.filter(Boolean);
1417
+ }
1418
+ function useClickOutside(listener, t0, boundaryElement) {
1419
+ const $ = c(12), elementsArg = t0 === void 0 ? EMPTY_ARRAY : t0, [element, setElement] = useState(null);
1420
+ let t1;
1421
+ $[0] !== element || $[1] !== elementsArg ? (t1 = () => _getElements(element, elementsArg), $[0] = element, $[1] = elementsArg, $[2] = t1) : t1 = $[2];
1422
+ const [elements, setElements] = useState(t1), elementsRef = useRef(elements);
1423
+ let t2, t3;
1424
+ $[3] !== element || $[4] !== elementsArg ? (t2 = () => {
1425
+ const prevElements = elementsRef.current, nextElements = _getElements(element, elementsArg);
1426
+ if (prevElements.length !== nextElements.length) {
1427
+ setElements(nextElements), elementsRef.current = nextElements;
1428
+ return;
1429
+ }
1430
+ for (const el of prevElements)
1431
+ if (!nextElements.includes(el)) {
1432
+ setElements(nextElements), elementsRef.current = nextElements;
1433
+ return;
1434
+ }
1435
+ for (const el_0 of nextElements)
1436
+ if (!prevElements.includes(el_0)) {
1437
+ setElements(nextElements), elementsRef.current = nextElements;
1438
+ return;
1439
+ }
1440
+ }, t3 = [element, elementsArg], $[3] = element, $[4] = elementsArg, $[5] = t2, $[6] = t3) : (t2 = $[5], t3 = $[6]), useEffect(t2, t3);
1441
+ let t4, t5;
1442
+ return $[7] !== boundaryElement || $[8] !== elements || $[9] !== listener ? (t4 = () => {
1443
+ if (!listener)
1444
+ return;
1445
+ const handleWindowMouseDown = (evt) => {
1446
+ const target = evt.target;
1447
+ if (target instanceof Node && !(boundaryElement && !boundaryElement.contains(target))) {
1448
+ for (const el_1 of elements)
1449
+ if (target === el_1 || el_1.contains(target))
1450
+ return;
1451
+ listener(evt);
1452
+ }
1453
+ };
1454
+ return window.addEventListener("mousedown", handleWindowMouseDown), () => {
1455
+ window.removeEventListener("mousedown", handleWindowMouseDown);
1456
+ };
1457
+ }, t5 = [boundaryElement, listener, elements], $[7] = boundaryElement, $[8] = elements, $[9] = listener, $[10] = t4, $[11] = t5) : (t4 = $[10], t5 = $[11]), useEffect(t4, t5), setElement;
1458
+ }
1459
+ const _elementSizeObserver = _createElementSizeObserver();
1460
+ function _createElementRectValueListener() {
1461
+ return {
1462
+ subscribe(element, subscriber) {
1463
+ const resizeObserver = new _ResizeObserver(([entry]) => {
1464
+ subscriber({
1465
+ _contentRect: entry.contentRect,
1466
+ border: {
1467
+ width: entry.borderBoxSize[0].inlineSize,
1468
+ height: entry.borderBoxSize[0].blockSize
1469
+ },
1470
+ content: {
1471
+ width: entry.contentRect.width,
1472
+ height: entry.contentRect.height
1473
+ }
1474
+ });
1475
+ });
1476
+ return resizeObserver.observe(element), () => {
1477
+ resizeObserver.unobserve(element), resizeObserver.disconnect();
1478
+ };
1479
+ }
1480
+ };
1481
+ }
1482
+ function _createElementSizeObserver() {
1483
+ const disposeCache = /* @__PURE__ */ new WeakMap(), subscribersCache = /* @__PURE__ */ new WeakMap();
1484
+ return {
1485
+ subscribe(element, subscriber) {
1486
+ const subscribers = subscribersCache.get(element) || [];
1487
+ let dispose = disposeCache.get(element);
1488
+ return subscribersCache.has(element) || (subscribersCache.set(element, subscribers), dispose = _createElementRectValueListener().subscribe(element, (elementRect) => {
1489
+ for (const sub of subscribers)
1490
+ sub(elementRect);
1491
+ })), subscribers.push(subscriber), () => {
1492
+ const idx = subscribers.indexOf(subscriber);
1493
+ idx > -1 && subscribers.splice(idx, 1), subscribers.length === 0 && dispose && dispose();
1494
+ };
1495
+ }
1496
+ };
1497
+ }
1498
+ function useElementSize(element) {
1499
+ const $ = c(3), [size, setSize] = useState(null);
1500
+ let t0, t1;
1501
+ return $[0] !== element ? (t0 = () => {
1502
+ if (element)
1503
+ return _elementSizeObserver.subscribe(element, setSize);
1504
+ }, t1 = [element], $[0] = element, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), size;
1505
+ }
1506
+ function useElementRect(element) {
1507
+ return useElementSize(element)?._contentRect || null;
1508
+ }
1509
+ function useForwardedRef(ref) {
1510
+ const $ = c(1), innerRef = useRef(null);
1511
+ let t0;
1512
+ return $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => innerRef.current, $[0] = t0) : t0 = $[0], useImperativeHandle(ref, t0), innerRef;
1513
+ }
1514
+ const DEFAULT_LABEL_ELEMENT = "div";
1515
+ function Label(props) {
1516
+ const $ = c(28);
1517
+ let accent, align, children, className, rest, t0, t1, t2, t3, textOverflowProp;
1518
+ $[0] !== props ? ({
1519
+ accent,
1520
+ align,
1521
+ as: t0,
1522
+ children,
1523
+ className,
1524
+ muted: t1,
1525
+ size: t2,
1526
+ textOverflow: textOverflowProp,
1527
+ weight: t3,
1528
+ ...rest
1529
+ } = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = children, $[4] = className, $[5] = rest, $[6] = t0, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = textOverflowProp) : (accent = $[1], align = $[2], children = $[3], className = $[4], rest = $[5], t0 = $[6], t1 = $[7], t2 = $[8], t3 = $[9], textOverflowProp = $[10]);
1530
+ const Element2 = t0 === void 0 ? DEFAULT_LABEL_ELEMENT : t0, muted = t1 === void 0 ? !1 : t1, size = t2 === void 0 ? 1 : t2, weight = t3 === void 0 ? "regular" : t3;
1531
+ let t4;
1532
+ $[11] !== accent || $[12] !== align || $[13] !== className || $[14] !== muted || $[15] !== size || $[16] !== weight ? (t4 = label({
1533
+ className,
1534
+ accent,
1535
+ align,
1536
+ muted,
1537
+ size,
1538
+ weight
1539
+ }), $[11] = accent, $[12] = align, $[13] = className, $[14] = muted, $[15] = size, $[16] = weight, $[17] = t4) : t4 = $[17];
1540
+ let t5;
1541
+ $[18] !== textOverflowProp ? (t5 = textOverflow({
1542
+ textOverflow: textOverflowProp
1543
+ }), $[18] = textOverflowProp, $[19] = t5) : t5 = $[19];
1544
+ let t6;
1545
+ $[20] !== children || $[21] !== t5 ? (t6 = /* @__PURE__ */ jsx("span", { className: t5, children }), $[20] = children, $[21] = t5, $[22] = t6) : t6 = $[22];
1546
+ let t7;
1547
+ return $[23] !== Element2 || $[24] !== rest || $[25] !== t4 || $[26] !== t6 ? (t7 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Label", ...rest, className: t4, children: t6 }), $[23] = Element2, $[24] = rest, $[25] = t4, $[26] = t6, $[27] = t7) : t7 = $[27], t7;
1548
+ }
1549
+ const DEFAULT_AVATAR_ELEMENT = "span";
1550
+ function Avatar(props) {
1551
+ const $ = c(51), t0 = props;
1552
+ let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, className, initials, onImageLoadError, rest, src, t1, t2, t3, t4, title;
1553
+ $[0] !== t0 ? ({
1554
+ __unstable_hideInnerStroke,
1555
+ as: t1,
1556
+ className,
1557
+ color: t2,
1558
+ src,
1559
+ title,
1560
+ initials,
1561
+ onImageLoadError,
1562
+ arrowPosition: arrowPositionProp,
1563
+ animateArrowFrom,
1564
+ status: t3,
1565
+ size: t4,
1566
+ ...rest
1567
+ } = t0, $[0] = t0, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = className, $[5] = initials, $[6] = onImageLoadError, $[7] = rest, $[8] = src, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = title) : (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], className = $[4], initials = $[5], onImageLoadError = $[6], rest = $[7], src = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], title = $[13]);
1568
+ const Element2 = t1 === void 0 ? DEFAULT_AVATAR_ELEMENT : t1, color = t2 === void 0 ? "magenta" : t2, sizeProp = t4 === void 0 ? 1 : t4, size = useResponsiveProp(sizeProp), [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside"), [imageError, setImageError] = useState(!1);
1569
+ let t5, t6;
1570
+ $[14] !== arrowPosition || $[15] !== arrowPositionProp ? (t5 = () => {
1571
+ if (arrowPosition === arrowPositionProp)
1572
+ return;
1573
+ const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
1574
+ return () => cancelAnimationFrame(raf);
1575
+ }, t6 = [arrowPosition, arrowPositionProp], $[14] = arrowPosition, $[15] = arrowPositionProp, $[16] = t5, $[17] = t6) : (t5 = $[16], t6 = $[17]), useEffect(t5, t6);
1576
+ let t7, t8;
1577
+ $[18] !== src ? (t7 = () => {
1578
+ src && setImageError(!1);
1579
+ }, t8 = [src], $[18] = src, $[19] = t7, $[20] = t8) : (t7 = $[19], t8 = $[20]), useEffect(t7, t8);
1580
+ let t9;
1581
+ $[21] !== onImageLoadError ? (t9 = () => {
1582
+ setImageError(!0), onImageLoadError && onImageLoadError(new Error("Avatar: the image failed to load"));
1583
+ }, $[21] = onImageLoadError, $[22] = t9) : t9 = $[22];
1584
+ const handleImageError = t9;
1585
+ let t10, t11;
1586
+ $[23] !== size ? (t11 = Object.values(size).map(_temp$1), $[23] = size, $[24] = t11) : t11 = $[24], t10 = t11;
1587
+ const initialsSize = t10, t12 = __unstable_hideInnerStroke ? "" : void 0;
1588
+ let t13;
1589
+ $[25] !== className || $[26] !== color || $[27] !== sizeProp ? (t13 = avatar({
1590
+ className,
1591
+ color,
1592
+ size: sizeProp
1593
+ }), $[25] = className, $[26] = color, $[27] = sizeProp, $[28] = t13) : t13 = $[28];
1594
+ const t14 = imageError ? "" : void 0;
1595
+ let t15;
1596
+ $[29] === Symbol.for("react.memo_cache_sentinel") ? (t15 = avatarArrow(), $[29] = t15) : t15 = $[29];
1597
+ let t16;
1598
+ $[30] !== color ? (t16 = /* @__PURE__ */ jsx("span", { className: t15, children: /* @__PURE__ */ jsx("svg", { width: "11", height: "7", viewBox: "0 0 11 7", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z", fill: color }) }) }), $[30] = color, $[31] = t16) : t16 = $[31];
1599
+ let t17;
1600
+ $[32] === Symbol.for("react.memo_cache_sentinel") ? (t17 = avatarInitials(), $[32] = t17) : t17 = $[32];
1601
+ let t18;
1602
+ $[33] !== initials || $[34] !== initialsSize ? (t18 = /* @__PURE__ */ jsx(Box, { alignItems: "center", as: "span", className: t17, display: "flex", justifyContent: "center", position: "absolute", inset: 0, children: /* @__PURE__ */ jsx(Label, { align: "center", as: "span", size: initialsSize, weight: "medium", children: initials }) }), $[33] = initials, $[34] = initialsSize, $[35] = t18) : t18 = $[35];
1603
+ let t19;
1604
+ $[36] !== handleImageError || $[37] !== initials || $[38] !== src ? (t19 = src && /* @__PURE__ */ jsxs(Box, { className: avatarImage(), inset: 0, position: "absolute", children: [
1605
+ /* @__PURE__ */ jsx("img", { alt: initials, onError: handleImageError, src }),
1606
+ /* @__PURE__ */ jsx("span", { className: avatarImageOutline() })
1607
+ ] }), $[36] = handleImageError, $[37] = initials, $[38] = src, $[39] = t19) : t19 = $[39];
1608
+ let t20;
1609
+ return $[40] !== Element2 || $[41] !== arrowPosition || $[42] !== rest || $[43] !== t12 || $[44] !== t13 || $[45] !== t14 || $[46] !== t16 || $[47] !== t18 || $[48] !== t19 || $[49] !== title ? (t20 = /* @__PURE__ */ jsxs(Element2, { "data-hide-inner-stroke": t12, "data-ui": "Avatar", ...rest, "aria-label": title, className: t13, "data-arrow-position": arrowPosition, "data-image-error": t14, title, children: [
1610
+ t16,
1611
+ t18,
1612
+ t19
1613
+ ] }), $[40] = Element2, $[41] = arrowPosition, $[42] = rest, $[43] = t12, $[44] = t13, $[45] = t14, $[46] = t16, $[47] = t18, $[48] = t19, $[49] = title, $[50] = t20) : t20 = $[50], t20;
1614
+ }
1615
+ function _temp$1(s) {
1616
+ return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
1617
+ }
1618
+ const DEFAULT_AVATAR_COUNTER_ELEMENT = "span";
1619
+ function AvatarCounter(props) {
1620
+ const $ = c(19), t0 = props;
1621
+ let className, count, rest, t1, t2;
1622
+ $[0] !== t0 ? ({
1623
+ as: t1,
1624
+ className,
1625
+ count,
1626
+ size: t2,
1627
+ ...rest
1628
+ } = t0, $[0] = t0, $[1] = className, $[2] = count, $[3] = rest, $[4] = t1, $[5] = t2) : (className = $[1], count = $[2], rest = $[3], t1 = $[4], t2 = $[5]);
1629
+ const as = t1 === void 0 ? DEFAULT_AVATAR_COUNTER_ELEMENT : t1, size = useResponsiveProp(t2 === void 0 ? 1 : t2);
1630
+ let t3, t4;
1631
+ $[6] !== size ? (t4 = Object.values(size).map(_temp), $[6] = size, $[7] = t4) : t4 = $[7], t3 = t4;
1632
+ const labelSize = t3;
1633
+ let t5;
1634
+ $[8] !== className || $[9] !== size ? (t5 = avatarCounter({
1635
+ className,
1636
+ size
1637
+ }), $[8] = className, $[9] = size, $[10] = t5) : t5 = $[10];
1638
+ let t6;
1639
+ $[11] !== count || $[12] !== labelSize ? (t6 = /* @__PURE__ */ jsx(Label, { align: "center", as: "span", size: labelSize, weight: "medium", children: count }), $[11] = count, $[12] = labelSize, $[13] = t6) : t6 = $[13];
1640
+ let t7;
1641
+ return $[14] !== as || $[15] !== rest || $[16] !== t5 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsx(Box, { "data-ui": "AvatarCounter", ...rest, alignItems: "center", as, className: t5, display: "flex", flex: "none", justifyContent: "center", paddingX: 2, sizing: "border", children: t6 }), $[14] = as, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
1642
+ }
1643
+ function _temp(s) {
1644
+ return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
1645
+ }
1646
+ const DEFAULT_AVATAR_STACK_ELEMENT = "span";
1647
+ function AvatarStack(props) {
1648
+ const $ = c(20), t0 = props;
1649
+ let childrenProp, className, rest, t1, t2, t3;
1650
+ $[0] !== t0 ? ({
1651
+ as: t1,
1652
+ children: childrenProp,
1653
+ className,
1654
+ maxLength: t2,
1655
+ size: t3,
1656
+ ...rest
1657
+ } = t0, $[0] = t0, $[1] = childrenProp, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3) : (childrenProp = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6]);
1658
+ const as = t1 === void 0 ? DEFAULT_AVATAR_STACK_ELEMENT : t1, maxLengthProp = t2 === void 0 ? 4 : t2, sizeProp = t3 === void 0 ? 1 : t3, children = Children.toArray(childrenProp).filter(isValidElement), maxLength = Math.max(maxLengthProp, 0), size = useResponsiveProp(sizeProp), len = children.length, visibleCount = maxLength - 1, extraCount = len - visibleCount, visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children, T0 = Box, t4 = "AvatarStack", t5 = "center";
1659
+ let t6;
1660
+ $[7] !== className || $[8] !== size ? (t6 = avatarStack({
1661
+ className,
1662
+ size
1663
+ }), $[7] = className, $[8] = size, $[9] = t6) : t6 = $[9];
1664
+ const t7 = "flex", t8 = "flex-start", t9 = len === 0 && /* @__PURE__ */ jsx(AvatarCounter, { count: len, size }), t10 = len !== 0 && extraCount > 1 && /* @__PURE__ */ jsx(AvatarCounter, { count: extraCount, size });
1665
+ let t11;
1666
+ $[10] !== size ? (t11 = (child, childIndex) => /* @__PURE__ */ jsx(Fragment, { children: cloneElement(child, {
1667
+ size
1668
+ }) }, String(childIndex)), $[10] = size, $[11] = t11) : t11 = $[11];
1669
+ const t12 = visibleChildren.map(t11);
1670
+ let t13;
1671
+ return $[12] !== T0 || $[13] !== as || $[14] !== rest || $[15] !== t10 || $[16] !== t12 || $[17] !== t6 || $[18] !== t9 ? (t13 = /* @__PURE__ */ jsxs(T0, { "data-ui": t4, ...rest, alignItems: t5, as, className: t6, display: t7, justifyContent: t8, children: [
1672
+ t9,
1673
+ t10,
1674
+ t12
1675
+ ] }), $[12] = T0, $[13] = as, $[14] = rest, $[15] = t10, $[16] = t12, $[17] = t6, $[18] = t9, $[19] = t13) : t13 = $[19], t13;
1676
+ }
1677
+ const DEFAULT_BADGE_ELEMENT = "span";
1678
+ function Badge(props) {
1679
+ const $ = c(22), t0 = props;
1680
+ let children, className, rest, t1, t2, t3, t4, t5;
1681
+ $[0] !== t0 ? ({
1682
+ as: t1,
1683
+ children,
1684
+ className,
1685
+ fontSize: t2,
1686
+ padding: t3,
1687
+ radius: t4,
1688
+ tone: t5,
1689
+ ...rest
1690
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1, $[5] = t2, $[6] = t3, $[7] = t4, $[8] = t5) : (children = $[1], className = $[2], rest = $[3], t1 = $[4], t2 = $[5], t3 = $[6], t4 = $[7], t5 = $[8]);
1691
+ const as = t1 === void 0 ? DEFAULT_BADGE_ELEMENT : t1, fontSize = t2 === void 0 ? 1 : t2, padding = t3 === void 0 ? 1 : t3, radius = t4 === void 0 ? 2 : t4, tone = t5 === void 0 ? "default" : t5;
1692
+ let t6;
1693
+ $[9] !== className || $[10] !== tone ? (t6 = badge({
1694
+ className,
1695
+ tone
1696
+ }), $[9] = className, $[10] = tone, $[11] = t6) : t6 = $[11];
1697
+ let t7;
1698
+ $[12] !== children || $[13] !== fontSize ? (t7 = /* @__PURE__ */ jsx(Text, { size: fontSize, children }), $[12] = children, $[13] = fontSize, $[14] = t7) : t7 = $[14];
1699
+ let t8;
1700
+ return $[15] !== as || $[16] !== padding || $[17] !== radius || $[18] !== rest || $[19] !== t6 || $[20] !== t7 ? (t8 = /* @__PURE__ */ jsx(Box, { "data-ui": "Badge", ...rest, as, className: t6, display: "flex", maxWidth: "fill", padding, radius, width: "min", children: t7 }), $[15] = as, $[16] = padding, $[17] = radius, $[18] = rest, $[19] = t6, $[20] = t7, $[21] = t8) : t8 = $[21], t8;
1701
+ }
1702
+ const DEFAULT_CHECKBOX_ELEMENT = "input";
1703
+ function Checkbox(props) {
1704
+ const $ = c(29), t0 = props;
1705
+ let className, customValidity, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
1706
+ $[0] !== t0 ? ({
1707
+ as: t1,
1708
+ className,
1709
+ disabled,
1710
+ indeterminate,
1711
+ customValidity,
1712
+ readOnly,
1713
+ ref: forwardedRef,
1714
+ style,
1715
+ ...rest
1716
+ } = t0, $[0] = t0, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = indeterminate, $[6] = readOnly, $[7] = rest, $[8] = style, $[9] = t1) : (className = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], indeterminate = $[5], readOnly = $[6], rest = $[7], style = $[8], t1 = $[9]);
1717
+ const Element2 = t1 === void 0 ? DEFAULT_CHECKBOX_ELEMENT : t1, ref = useRef(null);
1718
+ let t2;
1719
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[10] = t2) : t2 = $[10], useImperativeHandle(forwardedRef, t2);
1720
+ let t3, t4;
1721
+ $[11] !== indeterminate ? (t3 = () => {
1722
+ ref.current && (ref.current.indeterminate = indeterminate || !1);
1723
+ }, t4 = [indeterminate], $[11] = indeterminate, $[12] = t3, $[13] = t4) : (t3 = $[12], t4 = $[13]), useEffect(t3, t4), useCustomValidity(ref, customValidity);
1724
+ let t5;
1725
+ $[14] !== className ? (t5 = checkbox({
1726
+ className
1727
+ }), $[14] = className, $[15] = t5) : t5 = $[15];
1728
+ let t6;
1729
+ $[16] === Symbol.for("react.memo_cache_sentinel") ? (t6 = checkboxInput(), $[16] = t6) : t6 = $[16];
1730
+ const t7 = customValidity ? "" : void 0, t8 = !disabled && readOnly ? "" : void 0, t9 = disabled || readOnly;
1731
+ let t10;
1732
+ $[17] !== Element2 || $[18] !== readOnly || $[19] !== rest || $[20] !== t7 || $[21] !== t8 || $[22] !== t9 ? (t10 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t6, "data-invalid": t7, "data-read-only": t8, disabled: t9, type: "checkbox", readOnly, ref }), $[17] = Element2, $[18] = readOnly, $[19] = rest, $[20] = t7, $[21] = t8, $[22] = t9, $[23] = t10) : t10 = $[23];
1733
+ let t11;
1734
+ $[24] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxs("span", { className: checkboxPresentation(), children: [
1735
+ /* @__PURE__ */ jsx(CheckmarkIcon, {}),
1736
+ /* @__PURE__ */ jsx(RemoveIcon, {})
1737
+ ] }), $[24] = t11) : t11 = $[24];
1738
+ let t12;
1739
+ return $[25] !== style || $[26] !== t10 || $[27] !== t5 ? (t12 = /* @__PURE__ */ jsxs("span", { className: t5, "data-ui": "Checkbox", style, children: [
1740
+ t10,
1741
+ t11
1742
+ ] }), $[25] = style, $[26] = t10, $[27] = t5, $[28] = t12) : t12 = $[28], t12;
1743
+ }
1744
+ const LazyRefractor = lazy(() => import("./_chunks-es/refractor.js")), DEFAULT_CODE_ELEMENT = "pre";
1745
+ function Code(props) {
1746
+ const $ = c(25), t0 = props;
1747
+ let children, className, languageProp, rest, t1, t2, t3;
1748
+ $[0] !== t0 ? ({
1749
+ as: t1,
1750
+ children,
1751
+ className,
1752
+ language: languageProp,
1753
+ size: t2,
1754
+ weight: t3,
1755
+ ...rest
1756
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = t3) : (children = $[1], className = $[2], languageProp = $[3], rest = $[4], t1 = $[5], t2 = $[6], t3 = $[7]);
1757
+ const Element2 = t1 === void 0 ? DEFAULT_CODE_ELEMENT : t1, size = t2 === void 0 ? 2 : t2, weight = t3 === void 0 ? "regular" : t3, language = typeof languageProp == "string" ? languageProp : void 0;
1758
+ let t4;
1759
+ $[8] !== className || $[9] !== size || $[10] !== weight ? (t4 = code({
1760
+ className,
1761
+ size,
1762
+ weight
1763
+ }), $[8] = className, $[9] = size, $[10] = weight, $[11] = t4) : t4 = $[11];
1764
+ let t5;
1765
+ $[12] !== children ? (t5 = /* @__PURE__ */ jsx("code", { children }), $[12] = children, $[13] = t5) : t5 = $[13];
1766
+ let t6;
1767
+ $[14] !== children || $[15] !== language ? (t6 = /* @__PURE__ */ jsx(LazyRefractor, { language, value: children }), $[14] = children, $[15] = language, $[16] = t6) : t6 = $[16];
1768
+ let t7;
1769
+ $[17] !== t5 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsx(Suspense, { fallback: t5, children: t6 }), $[17] = t5, $[18] = t6, $[19] = t7) : t7 = $[19];
1770
+ let t8;
1771
+ return $[20] !== Element2 || $[21] !== rest || $[22] !== t4 || $[23] !== t7 ? (t8 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Code", ...rest, className: t4, children: t7 }), $[20] = Element2, $[21] = rest, $[22] = t4, $[23] = t7, $[24] = t8) : t8 = $[24], t8;
1772
+ }
1773
+ const DEFAULT_HEADING_ELEMENT = "div";
1774
+ function Heading(props) {
1775
+ const $ = c(30), t0 = props;
1776
+ let align, children, className, flex, rest, t1, t2, t3, t4, t5, textOverflowProp;
1777
+ $[0] !== t0 ? ({
1778
+ accent: t1,
1779
+ align,
1780
+ as: t2,
1781
+ children,
1782
+ className,
1783
+ flex,
1784
+ muted: t3,
1785
+ size: t4,
1786
+ textOverflow: textOverflowProp,
1787
+ weight: t5,
1788
+ ...rest
1789
+ } = t0, $[0] = t0, $[1] = align, $[2] = children, $[3] = className, $[4] = flex, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4, $[10] = t5, $[11] = textOverflowProp) : (align = $[1], children = $[2], className = $[3], flex = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8], t4 = $[9], t5 = $[10], textOverflowProp = $[11]);
1790
+ const accent = t1 === void 0 ? !1 : t1, Element2 = t2 === void 0 ? DEFAULT_HEADING_ELEMENT : t2, muted = t3 === void 0 ? !1 : t3, size = t4 === void 0 ? 2 : t4, weight = t5 === void 0 ? "regular" : t5;
1791
+ let t6;
1792
+ $[12] !== accent || $[13] !== align || $[14] !== className || $[15] !== flex || $[16] !== muted || $[17] !== size || $[18] !== weight ? (t6 = heading({
1793
+ className,
1794
+ accent,
1795
+ align,
1796
+ flex,
1797
+ muted,
1798
+ size,
1799
+ weight
1800
+ }), $[12] = accent, $[13] = align, $[14] = className, $[15] = flex, $[16] = muted, $[17] = size, $[18] = weight, $[19] = t6) : t6 = $[19];
1801
+ let t7;
1802
+ $[20] !== textOverflowProp ? (t7 = textOverflow({
1803
+ textOverflow: textOverflowProp
1804
+ }), $[20] = textOverflowProp, $[21] = t7) : t7 = $[21];
1805
+ let t8;
1806
+ $[22] !== children || $[23] !== t7 ? (t8 = /* @__PURE__ */ jsx("span", { className: t7, children }), $[22] = children, $[23] = t7, $[24] = t8) : t8 = $[24];
1807
+ let t9;
1808
+ return $[25] !== Element2 || $[26] !== rest || $[27] !== t6 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(Element2, { "data-ui": "Heading", ...rest, className: t6, children: t8 }), $[25] = Element2, $[26] = rest, $[27] = t6, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
1809
+ }
1810
+ const DEFAULT_INLINE_ELEMENT = "div";
1811
+ function Inline(props) {
1812
+ const $ = c(11), t0 = props;
1813
+ let children, gap, rest, space, t1;
1814
+ $[0] !== t0 ? ({
1815
+ as: t1,
1816
+ children,
1817
+ gap,
1818
+ space,
1819
+ ...rest
1820
+ } = t0, $[0] = t0, $[1] = children, $[2] = gap, $[3] = rest, $[4] = space, $[5] = t1) : (children = $[1], gap = $[2], rest = $[3], space = $[4], t1 = $[5]);
1821
+ const as = t1 === void 0 ? DEFAULT_INLINE_ELEMENT : t1, t2 = gap ?? space;
1822
+ let t3;
1823
+ return $[6] !== as || $[7] !== children || $[8] !== rest || $[9] !== t2 ? (t3 = /* @__PURE__ */ jsx(Box, { "data-ui": "Inline", ...rest, alignItems: "center", as, display: "flex", gap: t2, flexWrap: "wrap", children }), $[6] = as, $[7] = children, $[8] = rest, $[9] = t2, $[10] = t3) : t3 = $[10], t3;
1824
+ }
1825
+ const DEFAULT_RADIO_ELEMENT = "input";
1826
+ function Radio(props) {
1827
+ const $ = c(25), t0 = props;
1828
+ let className, customValidity, disabled, forwardedRef, readOnly, rest, style, t1;
1829
+ $[0] !== t0 ? ({
1830
+ as: t1,
1831
+ className,
1832
+ disabled,
1833
+ style,
1834
+ customValidity,
1835
+ readOnly,
1836
+ ref: forwardedRef,
1837
+ ...rest
1838
+ } = t0, $[0] = t0, $[1] = className, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = readOnly, $[6] = rest, $[7] = style, $[8] = t1) : (className = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], readOnly = $[5], rest = $[6], style = $[7], t1 = $[8]);
1839
+ const Element2 = t1 === void 0 ? DEFAULT_RADIO_ELEMENT : t1, ref = useRef(null);
1840
+ let t2;
1841
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[9] = t2) : t2 = $[9], useImperativeHandle(forwardedRef, t2), useCustomValidity(ref, customValidity);
1842
+ let t3;
1843
+ $[10] !== className ? (t3 = radio({
1844
+ className
1845
+ }), $[10] = className, $[11] = t3) : t3 = $[11];
1846
+ let t4;
1847
+ $[12] === Symbol.for("react.memo_cache_sentinel") ? (t4 = radioInput(), $[12] = t4) : t4 = $[12];
1848
+ const t5 = customValidity ? "" : void 0, t6 = !disabled && readOnly ? "" : void 0, t7 = disabled || readOnly;
1849
+ let t8;
1850
+ $[13] !== Element2 || $[14] !== readOnly || $[15] !== rest || $[16] !== t5 || $[17] !== t6 || $[18] !== t7 ? (t8 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t4, "data-invalid": t5, "data-read-only": t6, disabled: t7, readOnly, ref, type: "radio" }), $[13] = Element2, $[14] = readOnly, $[15] = rest, $[16] = t5, $[17] = t6, $[18] = t7, $[19] = t8) : t8 = $[19];
1851
+ let t9;
1852
+ $[20] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx("span", { className: radioPresentation() }), $[20] = t9) : t9 = $[20];
1853
+ let t10;
1854
+ return $[21] !== style || $[22] !== t3 || $[23] !== t8 ? (t10 = /* @__PURE__ */ jsxs("div", { className: t3, "data-ui": "Radio", style, children: [
1855
+ t8,
1856
+ t9
1857
+ ] }), $[21] = style, $[22] = t3, $[23] = t8, $[24] = t10) : t10 = $[24], t10;
1858
+ }
1859
+ function BoundaryElementProvider(props) {
1860
+ const $ = c(5), {
1861
+ children,
1862
+ element
1863
+ } = props;
1864
+ let t0, t1;
1865
+ $[0] !== element ? (t1 = {
1866
+ version: 0,
1867
+ element
1868
+ }, $[0] = element, $[1] = t1) : t1 = $[1], t0 = t1;
1869
+ const value = t0;
1870
+ let t2;
1871
+ return $[2] !== children || $[3] !== value ? (t2 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t2) : t2 = $[4], t2;
1872
+ }
1873
+ function RootProvider(props) {
1874
+ const $ = c(10), {
1875
+ boundaryElement: t0,
1876
+ children,
1877
+ portalElement: t1,
1878
+ scheme: t2,
1879
+ tone: t3
1880
+ } = props, boundaryElement = t0 === void 0 ? null : t0, portalElement = t1 === void 0 ? null : t1, scheme = t2 === void 0 ? "light" : t2, tone = t3 === void 0 ? "transparent" : t3;
1881
+ let t4;
1882
+ $[0] !== children || $[1] !== portalElement ? (t4 = /* @__PURE__ */ jsx(PortalProvider, { element: portalElement, children }), $[0] = children, $[1] = portalElement, $[2] = t4) : t4 = $[2];
1883
+ let t5;
1884
+ $[3] !== boundaryElement || $[4] !== t4 ? (t5 = /* @__PURE__ */ jsx(ToastProvider, { children: /* @__PURE__ */ jsx(BoundaryElementProvider, { element: boundaryElement, children: t4 }) }), $[3] = boundaryElement, $[4] = t4, $[5] = t5) : t5 = $[5];
1885
+ let t6;
1886
+ return $[6] !== scheme || $[7] !== t5 || $[8] !== tone ? (t6 = /* @__PURE__ */ jsx(LayerProvider, { children: /* @__PURE__ */ jsx(CardProvider, { scheme, tone, children: t5 }) }), $[6] = scheme, $[7] = t5, $[8] = tone, $[9] = t6) : t6 = $[9], t6;
1887
+ }
1888
+ const DEFAULT_ROOT_ELEMENT = "html";
1889
+ function Root(props) {
1890
+ const $ = c(33), t0 = props;
1891
+ let children, className, forwardedRef, rest, t1, t2, t3, t4;
1892
+ $[0] !== t0 ? ({
1893
+ as: t1,
1894
+ children,
1895
+ className,
1896
+ height: t2,
1897
+ ref: forwardedRef,
1898
+ scheme: t3,
1899
+ tone: t4,
1900
+ ...rest
1901
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = forwardedRef, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4) : (children = $[1], className = $[2], forwardedRef = $[3], rest = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8]);
1902
+ const as = t1 === void 0 ? DEFAULT_ROOT_ELEMENT : t1, height = t2 === void 0 ? "fill" : t2, scheme = t3 === void 0 ? "light" : t3, tone = t4 === void 0 ? "transparent" : t4, ref = useRef(null);
1903
+ let t5;
1904
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[9] = t5) : t5 = $[9], useImperativeHandle(forwardedRef, t5);
1905
+ const [portalElement, setPortalElement] = useState(null), [boundaryElement, setBoundaryElement] = useState(null);
1906
+ let t6;
1907
+ $[10] === Symbol.for("react.memo_cache_sentinel") ? (t6 = (el) => {
1908
+ setBoundaryElement(el), ref.current = el;
1909
+ }, $[10] = t6) : t6 = $[10];
1910
+ const handleRef = t6;
1911
+ let t7;
1912
+ $[11] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsx("div", { "data-portal": "", ref: setPortalElement }), $[11] = t7) : t7 = $[11];
1913
+ let t8;
1914
+ $[12] !== boundaryElement || $[13] !== children || $[14] !== portalElement || $[15] !== scheme || $[16] !== tone ? (t8 = /* @__PURE__ */ jsxs(RootProvider, { boundaryElement, portalElement, scheme, tone, children: [
1915
+ children,
1916
+ t7
1917
+ ] }), $[12] = boundaryElement, $[13] = children, $[14] = portalElement, $[15] = scheme, $[16] = tone, $[17] = t8) : t8 = $[17];
1918
+ let node = t8;
1919
+ if (as === "html") {
1920
+ let t92;
1921
+ $[18] !== height ? (t92 = box({
1922
+ height,
1923
+ margin: 0
1924
+ }), $[18] = height, $[19] = t92) : t92 = $[19];
1925
+ let t102;
1926
+ $[20] !== node || $[21] !== t92 ? (t102 = /* @__PURE__ */ jsx("body", { className: t92, children: node }), $[20] = node, $[21] = t92, $[22] = t102) : t102 = $[22], node = t102;
1927
+ }
1928
+ let t9;
1929
+ $[23] !== className || $[24] !== height || $[25] !== scheme || $[26] !== tone ? (t9 = root({
1930
+ className,
1931
+ height,
1932
+ scheme,
1933
+ tone
1934
+ }), $[23] = className, $[24] = height, $[25] = scheme, $[26] = tone, $[27] = t9) : t9 = $[27];
1935
+ let t10;
1936
+ return $[28] !== as || $[29] !== node || $[30] !== rest || $[31] !== t9 ? (t10 = /* @__PURE__ */ jsx(Box, { as, "data-ui": "Root", ...rest, className: t9, ref: handleRef, children: node }), $[28] = as, $[29] = node, $[30] = rest, $[31] = t9, $[32] = t10) : t10 = $[32], t10;
1937
+ }
1938
+ const DEFAULT_SELECT_ELEMENT = "select";
1939
+ function Select(props) {
1940
+ const $ = c(38), t0 = props;
1941
+ let children, customValidity, disabled, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6;
1942
+ $[0] !== t0 ? ({
1943
+ as: t1,
1944
+ border: t2,
1945
+ children,
1946
+ customValidity,
1947
+ disabled,
1948
+ fontSize: t3,
1949
+ gap,
1950
+ padding: t4,
1951
+ radius: t5,
1952
+ readOnly,
1953
+ ref: forwardedRef,
1954
+ space: t6,
1955
+ ...rest
1956
+ } = t0, $[0] = t0, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = forwardedRef, $[5] = gap, $[6] = readOnly, $[7] = rest, $[8] = t1, $[9] = t2, $[10] = t3, $[11] = t4, $[12] = t5, $[13] = t6) : (children = $[1], customValidity = $[2], disabled = $[3], forwardedRef = $[4], gap = $[5], readOnly = $[6], rest = $[7], t1 = $[8], t2 = $[9], t3 = $[10], t4 = $[11], t5 = $[12], t6 = $[13]);
1957
+ const Element2 = t1 === void 0 ? DEFAULT_SELECT_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, fontSize = t3 === void 0 ? 2 : t3, padding = t4 === void 0 ? 3 : t4, radius = t5 === void 0 ? 1 : t5, space = t6 === void 0 ? 2 : t6, ref = useRef(null);
1958
+ let t7;
1959
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[14] = t7) : t7 = $[14], useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
1960
+ const t8 = gap ?? space;
1961
+ let t9;
1962
+ $[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t8 ? (t9 = select({
1963
+ border,
1964
+ fontSize,
1965
+ padding,
1966
+ radius,
1967
+ gap: t8
1968
+ }), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t8, $[20] = t9) : t9 = $[20];
1969
+ let t10;
1970
+ $[21] === Symbol.for("react.memo_cache_sentinel") ? (t10 = _inputElement(), $[21] = t10) : t10 = $[21];
1971
+ const t11 = disabled || readOnly;
1972
+ let t12;
1973
+ $[22] !== Element2 || $[23] !== children || $[24] !== rest || $[25] !== t11 ? (t12 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t10, disabled: t11, ref, children }), $[22] = Element2, $[23] = children, $[24] = rest, $[25] = t11, $[26] = t12) : t12 = $[26];
1974
+ let t13;
1975
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t13 = selectPresentation(), $[27] = t13) : t13 = $[27];
1976
+ let t14;
1977
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(ChevronDownIcon, {}), $[28] = t14) : t14 = $[28];
1978
+ let t15;
1979
+ $[29] !== fontSize ? (t15 = /* @__PURE__ */ jsx(Text, { size: fontSize, children: t14 }), $[29] = fontSize, $[30] = t15) : t15 = $[30];
1980
+ let t16;
1981
+ $[31] !== padding || $[32] !== t15 ? (t16 = /* @__PURE__ */ jsx("span", { className: t13, children: /* @__PURE__ */ jsx(Box, { as: "span", display: "inline-block", padding, children: t15 }) }), $[31] = padding, $[32] = t15, $[33] = t16) : t16 = $[33];
1982
+ let t17;
1983
+ return $[34] !== t12 || $[35] !== t16 || $[36] !== t9 ? (t17 = /* @__PURE__ */ jsxs("div", { "data-ui": "Select", className: t9, "data-icon-right": "", children: [
1984
+ t12,
1985
+ t16
1986
+ ] }), $[34] = t12, $[35] = t16, $[36] = t9, $[37] = t17) : t17 = $[37], t17;
1987
+ }
1988
+ const DEFAULT_SKELETON_ELEMENT = "div";
1989
+ function Skeleton(props) {
1990
+ const $ = c(19), t0 = props;
1991
+ let className, delay, radius, rest, t1, t2;
1992
+ $[0] !== t0 ? ({
1993
+ as: t1,
1994
+ animated: t2,
1995
+ className,
1996
+ delay,
1997
+ radius,
1998
+ ...rest
1999
+ } = t0, $[0] = t0, $[1] = className, $[2] = delay, $[3] = radius, $[4] = rest, $[5] = t1, $[6] = t2) : (className = $[1], delay = $[2], radius = $[3], rest = $[4], t1 = $[5], t2 = $[6]);
2000
+ const As = t1 === void 0 ? DEFAULT_SKELETON_ELEMENT : t1, animated = t2 === void 0 ? !1 : t2, [visible, setVisible] = useState(!delay);
2001
+ let t3, t4;
2002
+ $[7] !== delay ? (t3 = () => {
2003
+ if (!delay)
2004
+ return setVisible(!0);
2005
+ const timeout = setTimeout(() => {
2006
+ setVisible(!0);
2007
+ }, delay);
2008
+ return () => {
2009
+ clearTimeout(timeout);
2010
+ };
2011
+ }, t4 = [delay], $[7] = delay, $[8] = t3, $[9] = t4) : (t3 = $[8], t4 = $[9]), useEffect(t3, t4);
2012
+ let t5;
2013
+ $[10] !== className || $[11] !== radius ? (t5 = skeleton({
2014
+ className,
2015
+ radius
2016
+ }), $[10] = className, $[11] = radius, $[12] = t5) : t5 = $[12];
2017
+ const t6 = animated ? "" : void 0, t7 = visible ? "" : void 0;
2018
+ let t8;
2019
+ return $[13] !== As || $[14] !== rest || $[15] !== t5 || $[16] !== t6 || $[17] !== t7 ? (t8 = /* @__PURE__ */ jsx(As, { "data-ui": "Skeleton", ...rest, className: t5, "data-animated": t6, "data-visible": t7 }), $[13] = As, $[14] = rest, $[15] = t5, $[16] = t6, $[17] = t7, $[18] = t8) : t8 = $[18], t8;
2020
+ }
2021
+ const DEFAULT_CODE_SKELETON_ELEMENT = "div";
2022
+ function CodeSkeleton(props) {
2023
+ const $ = c(10), t0 = props;
2024
+ let className, rest, t1;
2025
+ $[0] !== t0 ? ({
2026
+ className,
2027
+ size: t1,
2028
+ ...rest
2029
+ } = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
2030
+ const size = t1 === void 0 ? 2 : t1;
2031
+ let t2;
2032
+ $[4] !== className || $[5] !== size ? (t2 = codeSkeleton({
2033
+ className,
2034
+ size
2035
+ }), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
2036
+ let t3;
2037
+ return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
2038
+ }
2039
+ const DEFAULT_HEADING_SKELETON_ELEMENT = "div";
2040
+ function HeadingSkeleton(props) {
2041
+ const $ = c(10), t0 = props;
2042
+ let className, rest, t1;
2043
+ $[0] !== t0 ? ({
2044
+ className,
2045
+ size: t1,
2046
+ ...rest
2047
+ } = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
2048
+ const size = t1 === void 0 ? 2 : t1;
2049
+ let t2;
2050
+ $[4] !== className || $[5] !== size ? (t2 = headingSkeleton({
2051
+ className,
2052
+ size
2053
+ }), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
2054
+ let t3;
2055
+ return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
2056
+ }
2057
+ const DEFAULT_LABEL_SKELETON_ELEMENT = "div";
2058
+ function LabelSkeleton(props) {
2059
+ const $ = c(10), t0 = props;
2060
+ let className, rest, t1;
2061
+ $[0] !== t0 ? ({
2062
+ className,
2063
+ size: t1,
2064
+ ...rest
2065
+ } = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
2066
+ const size = t1 === void 0 ? 2 : t1;
2067
+ let t2;
2068
+ $[4] !== className || $[5] !== size ? (t2 = labelSkeleton({
2069
+ className,
2070
+ size
2071
+ }), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
2072
+ let t3;
2073
+ return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
2074
+ }
2075
+ const DEFAULT_TEXT_SKELETON_ELEMENT = "div";
2076
+ function TextSkeleton(props) {
2077
+ const $ = c(10), t0 = props;
2078
+ let className, rest, t1;
2079
+ $[0] !== t0 ? ({
2080
+ className,
2081
+ size: t1,
2082
+ ...rest
2083
+ } = t0, $[0] = t0, $[1] = className, $[2] = rest, $[3] = t1) : (className = $[1], rest = $[2], t1 = $[3]);
2084
+ const size = t1 === void 0 ? 2 : t1;
2085
+ let t2;
2086
+ $[4] !== className || $[5] !== size ? (t2 = textSkeleton({
2087
+ className,
2088
+ size
2089
+ }), $[4] = className, $[5] = size, $[6] = t2) : t2 = $[6];
2090
+ let t3;
2091
+ return $[7] !== rest || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Skeleton, { ...rest, className: t2 }), $[7] = rest, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
2092
+ }
2093
+ const DEFAULT_SR_ONLY_ELEMENT = "span";
2094
+ function SrOnly(props) {
2095
+ const $ = c(12), t0 = props;
2096
+ let children, className, rest, t1;
2097
+ $[0] !== t0 ? ({
2098
+ as: t1,
2099
+ children,
2100
+ className,
2101
+ ...rest
2102
+ } = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = rest, $[4] = t1) : (children = $[1], className = $[2], rest = $[3], t1 = $[4]);
2103
+ const Element2 = t1 === void 0 ? DEFAULT_SR_ONLY_ELEMENT : t1;
2104
+ let t2;
2105
+ $[5] !== className ? (t2 = srOnly({
2106
+ className
2107
+ }), $[5] = className, $[6] = t2) : t2 = $[6];
2108
+ let t3;
2109
+ return $[7] !== Element2 || $[8] !== children || $[9] !== rest || $[10] !== t2 ? (t3 = /* @__PURE__ */ jsx(Element2, { "data-ui": "SrOnly", ...rest, "aria-hidden": !0, className: t2, children }), $[7] = Element2, $[8] = children, $[9] = rest, $[10] = t2, $[11] = t3) : t3 = $[11], t3;
2110
+ }
2111
+ const DEFAULT_SWITCH_ELEMENT = "input";
2112
+ function Switch(props) {
2113
+ const $ = c(26), t0 = props;
2114
+ let className, disabled, forwardedRef, indeterminate, readOnly, rest, style, t1;
2115
+ $[0] !== t0 ? ({
2116
+ as: t1,
2117
+ className,
2118
+ disabled,
2119
+ indeterminate,
2120
+ readOnly,
2121
+ ref: forwardedRef,
2122
+ style,
2123
+ ...rest
2124
+ } = t0, $[0] = t0, $[1] = className, $[2] = disabled, $[3] = forwardedRef, $[4] = indeterminate, $[5] = readOnly, $[6] = rest, $[7] = style, $[8] = t1) : (className = $[1], disabled = $[2], forwardedRef = $[3], indeterminate = $[4], readOnly = $[5], rest = $[6], style = $[7], t1 = $[8]);
2125
+ const Element2 = t1 === void 0 ? DEFAULT_SWITCH_ELEMENT : t1, ref = useRef(null);
2126
+ let t2;
2127
+ $[9] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[9] = t2) : t2 = $[9], useImperativeHandle(forwardedRef, t2);
2128
+ let t3, t4;
2129
+ $[10] !== indeterminate ? (t3 = () => {
2130
+ ref.current && (ref.current.indeterminate = indeterminate || !1);
2131
+ }, t4 = [indeterminate], $[10] = indeterminate, $[11] = t3, $[12] = t4) : (t3 = $[11], t4 = $[12]), useEffect(t3, t4);
2132
+ let t5;
2133
+ $[13] !== className ? (t5 = _switch({
2134
+ className
2135
+ }), $[13] = className, $[14] = t5) : t5 = $[14];
2136
+ let t6;
2137
+ $[15] === Symbol.for("react.memo_cache_sentinel") ? (t6 = _switchElement(), $[15] = t6) : t6 = $[15];
2138
+ const t7 = !disabled && readOnly ? "" : void 0, t8 = disabled || readOnly;
2139
+ let t9;
2140
+ $[16] !== Element2 || $[17] !== rest || $[18] !== t7 || $[19] !== t8 ? (t9 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t6, "data-read-only": t7, disabled: t8, type: "checkbox", ref }), $[16] = Element2, $[17] = rest, $[18] = t7, $[19] = t8, $[20] = t9) : t9 = $[20];
2141
+ let t10;
2142
+ $[21] === Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsxs("span", { "aria-hidden": !0, className: _switchPresentation(), children: [
2143
+ /* @__PURE__ */ jsx("span", { className: _switchTrack() }),
2144
+ /* @__PURE__ */ jsx("span", { className: _switchThumb() })
2145
+ ] }), $[21] = t10) : t10 = $[21];
2146
+ let t11;
2147
+ return $[22] !== style || $[23] !== t5 || $[24] !== t9 ? (t11 = /* @__PURE__ */ jsxs(Box, { className: t5, "data-ui": "Switch", display: "block", position: "relative", style, children: [
2148
+ t9,
2149
+ t10
2150
+ ] }), $[22] = style, $[23] = t5, $[24] = t9, $[25] = t11) : t11 = $[25], t11;
2151
+ }
2152
+ const DEFAULT_TEXT_AREA_ELEMENT = "textarea";
2153
+ function TextArea(props) {
2154
+ const $ = c(34), t0 = props;
2155
+ let __unstable_disableFocusRing, customValidity, forwardedRef, gap, readOnly, rest, t1, t2, t3, t4, t5, t6, t7;
2156
+ $[0] !== t0 ? ({
2157
+ __unstable_disableFocusRing,
2158
+ as: t1,
2159
+ border: t2,
2160
+ customValidity,
2161
+ disabled: t3,
2162
+ fontSize: t4,
2163
+ gap,
2164
+ padding: t5,
2165
+ radius: t6,
2166
+ readOnly,
2167
+ ref: forwardedRef,
2168
+ space: t7,
2169
+ ...rest
2170
+ } = t0, $[0] = t0, $[1] = __unstable_disableFocusRing, $[2] = customValidity, $[3] = forwardedRef, $[4] = gap, $[5] = readOnly, $[6] = rest, $[7] = t1, $[8] = t2, $[9] = t3, $[10] = t4, $[11] = t5, $[12] = t6, $[13] = t7) : (__unstable_disableFocusRing = $[1], customValidity = $[2], forwardedRef = $[3], gap = $[4], readOnly = $[5], rest = $[6], t1 = $[7], t2 = $[8], t3 = $[9], t4 = $[10], t5 = $[11], t6 = $[12], t7 = $[13]);
2171
+ const Element2 = t1 === void 0 ? DEFAULT_TEXT_AREA_ELEMENT : t1, border = t2 === void 0 ? !0 : t2, disabled = t3 === void 0 ? !1 : t3, fontSize = t4 === void 0 ? 2 : t4, padding = t5 === void 0 ? 3 : t5, radius = t6 === void 0 ? 2 : t6, space = t7 === void 0 ? 3 : t7, ref = useRef(null);
2172
+ let t8;
2173
+ $[14] === Symbol.for("react.memo_cache_sentinel") ? (t8 = () => ref.current, $[14] = t8) : t8 = $[14], useImperativeHandle(forwardedRef, t8), useCustomValidity(ref, customValidity);
2174
+ const t9 = gap ?? space;
2175
+ let t10;
2176
+ $[15] !== border || $[16] !== fontSize || $[17] !== padding || $[18] !== radius || $[19] !== t9 ? (t10 = textArea({
2177
+ border,
2178
+ fontSize,
2179
+ padding,
2180
+ radius,
2181
+ gap: t9
2182
+ }), $[15] = border, $[16] = fontSize, $[17] = padding, $[18] = radius, $[19] = t9, $[20] = t10) : t10 = $[20];
2183
+ const t11 = customValidity ? "" : void 0, t12 = !disabled && readOnly ? "" : void 0;
2184
+ let t13;
2185
+ $[21] === Symbol.for("react.memo_cache_sentinel") ? (t13 = _inputElement(), $[21] = t13) : t13 = $[21];
2186
+ const t14 = __unstable_disableFocusRing ? "" : void 0;
2187
+ let t15;
2188
+ $[22] !== Element2 || $[23] !== disabled || $[24] !== readOnly || $[25] !== rest || $[26] !== t14 ? (t15 = /* @__PURE__ */ jsx(Element2, { ...rest, className: t13, "data-no-focus-ring": t14, disabled, readOnly, ref }), $[22] = Element2, $[23] = disabled, $[24] = readOnly, $[25] = rest, $[26] = t14, $[27] = t15) : t15 = $[27];
2189
+ let t16;
2190
+ $[28] === Symbol.for("react.memo_cache_sentinel") ? (t16 = /* @__PURE__ */ jsx("span", { className: _inputPresentation() }), $[28] = t16) : t16 = $[28];
2191
+ let t17;
2192
+ return $[29] !== t10 || $[30] !== t11 || $[31] !== t12 || $[32] !== t15 ? (t17 = /* @__PURE__ */ jsxs("span", { className: t10, "data-invalid": t11, "data-read-only": t12, "data-ui": "TextArea", children: [
2193
+ t15,
2194
+ t16
2195
+ ] }), $[29] = t10, $[30] = t11, $[31] = t12, $[32] = t15, $[33] = t17) : t17 = $[33], t17;
2196
+ }
2197
+ function TooltipDelayGroupProvider(props) {
2198
+ const $ = c(9), {
2199
+ children,
2200
+ delay
2201
+ } = props, [isGroupActive, setIsGroupActive] = useDelayedState(!1), [openTooltipId, setOpenTooltipId] = useDelayedState(null), openDelay = typeof delay == "number" ? delay : delay?.open || 0, closeDelay = typeof delay == "number" ? delay : delay?.close || 0;
2202
+ let t0;
2203
+ const t1 = isGroupActive ? 1 : openDelay;
2204
+ let t2;
2205
+ $[0] !== closeDelay || $[1] !== openTooltipId || $[2] !== setIsGroupActive || $[3] !== setOpenTooltipId || $[4] !== t1 ? (t2 = {
2206
+ setIsGroupActive,
2207
+ openTooltipId,
2208
+ setOpenTooltipId,
2209
+ openDelay: t1,
2210
+ closeDelay
2211
+ }, $[0] = closeDelay, $[1] = openTooltipId, $[2] = setIsGroupActive, $[3] = setOpenTooltipId, $[4] = t1, $[5] = t2) : t2 = $[5], t0 = t2;
2212
+ const value = t0;
2213
+ let t3;
2214
+ return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
2215
+ }
2216
+ function findMaxBreakpoints(media, width) {
2217
+ const ret = [];
2218
+ for (let i = 0; i < media.length; i += 1)
2219
+ media[i] > width && ret.push(i);
2220
+ return ret;
2221
+ }
2222
+ function findMinBreakpoints(media, width) {
2223
+ const ret = [];
2224
+ for (let i = 0; i < media.length; i += 1)
2225
+ media[i] <= width && ret.push(i);
2226
+ return ret;
2227
+ }
2228
+ const DEFAULT_ELEMENT_QUERY_ELEMENT = "div", DEFAULT_BREAKPOINTS = Object.values(BREAKPOINTS);
2229
+ function ElementQuery(props) {
2230
+ const $ = c(21), t0 = props;
2231
+ let children, forwardedRef, mediaProp, rest, t1;
2232
+ $[0] !== t0 ? ({
2233
+ as: t1,
2234
+ children,
2235
+ media: mediaProp,
2236
+ ref: forwardedRef,
2237
+ ...rest
2238
+ } = t0, $[0] = t0, $[1] = children, $[2] = forwardedRef, $[3] = mediaProp, $[4] = rest, $[5] = t1) : (children = $[1], forwardedRef = $[2], mediaProp = $[3], rest = $[4], t1 = $[5]);
2239
+ const Element2 = t1 === void 0 ? DEFAULT_ELEMENT_QUERY_ELEMENT : t1, breakpoints = mediaProp ?? DEFAULT_BREAKPOINTS, [element, setElement] = useState(null), elementSize = useElementSize(element);
2240
+ let t2;
2241
+ t2 = elementSize?.border.width ?? window.innerWidth;
2242
+ const width = t2;
2243
+ let t3, t4;
2244
+ if ($[6] !== breakpoints || $[7] !== width) {
2245
+ const eq = findMaxBreakpoints(breakpoints, width);
2246
+ t4 = eq.length ? eq.join(" ") : void 0, $[6] = breakpoints, $[7] = width, $[8] = t4;
2247
+ } else
2248
+ t4 = $[8];
2249
+ t3 = t4;
2250
+ const max = t3;
2251
+ let t5, t6;
2252
+ if ($[9] !== breakpoints || $[10] !== width) {
2253
+ const eq_0 = findMinBreakpoints(breakpoints, width);
2254
+ t6 = eq_0.length ? eq_0.join(" ") : void 0, $[9] = breakpoints, $[10] = width, $[11] = t6;
2255
+ } else
2256
+ t6 = $[11];
2257
+ t5 = t6;
2258
+ const min = t5;
2259
+ let t7, t8;
2260
+ $[12] !== element ? (t7 = () => element, t8 = [element], $[12] = element, $[13] = t7, $[14] = t8) : (t7 = $[13], t8 = $[14]), useImperativeHandle(forwardedRef, t7, t8);
2261
+ let t9;
2262
+ return $[15] !== Element2 || $[16] !== children || $[17] !== max || $[18] !== min || $[19] !== rest ? (t9 = /* @__PURE__ */ jsx(Element2, { "data-ui": "ElementQuery", ...rest, "data-eq-max": max, "data-eq-min": min, ref: setElement, children }), $[15] = Element2, $[16] = children, $[17] = max, $[18] = min, $[19] = rest, $[20] = t9) : t9 = $[20], t9;
2263
+ }
2264
+ class ErrorBoundary extends Component {
2265
+ state = {
2266
+ error: null
2267
+ };
2268
+ static displayName = "ErrorBoundary";
2269
+ static getDerivedStateFromError(error) {
2270
+ return {
2271
+ error
2272
+ };
2273
+ }
2274
+ componentDidCatch(error, info) {
2275
+ this.props.onCatch({
2276
+ error,
2277
+ info
2278
+ });
2279
+ }
2280
+ render() {
2281
+ const {
2282
+ error
2283
+ } = this.state;
2284
+ if (error) {
2285
+ const message = typeof error?.message == "string" ? error.message : "Error";
2286
+ return /* @__PURE__ */ jsx(Code, { children: message });
2287
+ }
2288
+ return this.props.children;
2289
+ }
2290
+ }
2291
+ export {
2292
+ Arrow,
2293
+ Autocomplete,
2294
+ Avatar,
2295
+ AvatarCounter,
2296
+ AvatarStack,
2297
+ Badge,
2298
+ BoundaryElementProvider,
2299
+ Box,
2300
+ Breadcrumbs,
2301
+ Button,
2302
+ Card,
2303
+ CardProvider,
2304
+ Checkbox,
2305
+ Code,
2306
+ CodeSkeleton,
2307
+ Container,
2308
+ DEFAULT_ARROW_ELEMENT,
2309
+ DEFAULT_AUTOCOMPLETE_ELEMENT,
2310
+ DEFAULT_AVATAR_COUNTER_ELEMENT,
2311
+ DEFAULT_AVATAR_ELEMENT,
2312
+ DEFAULT_AVATAR_STACK_ELEMENT,
2313
+ DEFAULT_BADGE_ELEMENT,
2314
+ DEFAULT_BOX_ELEMENT,
2315
+ DEFAULT_BREADCRUMBS_ELEMENT,
2316
+ DEFAULT_BUTTON_ELEMENT,
2317
+ DEFAULT_CARD_ELEMENT,
2318
+ DEFAULT_CHECKBOX_ELEMENT,
2319
+ DEFAULT_CODE_ELEMENT,
2320
+ DEFAULT_CODE_SKELETON_ELEMENT,
2321
+ DEFAULT_CONTAINER_ELEMENT,
2322
+ DEFAULT_DIALOG_ELEMENT,
2323
+ DEFAULT_ELEMENT_QUERY_ELEMENT,
2324
+ DEFAULT_FLEX_ELEMENT,
2325
+ DEFAULT_GRID_ELEMENT,
2326
+ DEFAULT_HEADING_ELEMENT,
2327
+ DEFAULT_HEADING_SKELETON_ELEMENT,
2328
+ DEFAULT_HOTKEYS_ELEMENT,
2329
+ DEFAULT_INLINE_ELEMENT,
2330
+ DEFAULT_KBD_ELEMENT,
2331
+ DEFAULT_LABEL_ELEMENT,
2332
+ DEFAULT_LABEL_SKELETON_ELEMENT,
2333
+ DEFAULT_LAYER_ELEMENT,
2334
+ DEFAULT_MENU_DIVIDER_ELEMENT,
2335
+ DEFAULT_MENU_ELEMENT,
2336
+ DEFAULT_MENU_GROUP_ELEMENT,
2337
+ DEFAULT_MENU_ITEM_ELEMENT,
2338
+ DEFAULT_POPOVER_ELEMENT,
2339
+ DEFAULT_RADIO_ELEMENT,
2340
+ DEFAULT_ROOT_ELEMENT,
2341
+ DEFAULT_SELECTABLE_ELEMENT,
2342
+ DEFAULT_SELECT_ELEMENT,
2343
+ DEFAULT_SKELETON_ELEMENT,
2344
+ DEFAULT_SPINNER_ELEMENT,
2345
+ DEFAULT_SR_ONLY_ELEMENT,
2346
+ DEFAULT_STACK_ELEMENT,
2347
+ DEFAULT_SWITCH_ELEMENT,
2348
+ DEFAULT_TAB_ELEMENT,
2349
+ DEFAULT_TAB_LIST_ELEMENT,
2350
+ DEFAULT_TAB_PANEL_ELEMENT,
2351
+ DEFAULT_TEXT_AREA_ELEMENT,
2352
+ DEFAULT_TEXT_ELEMENT,
2353
+ DEFAULT_TEXT_INPUT_ELEMENT,
2354
+ DEFAULT_TEXT_SKELETON_ELEMENT,
2355
+ DEFAULT_TOAST_ELEMENT,
2356
+ DEFAULT_TOOLTIP_ELEMENT,
2357
+ DEFAULT_TREE_ELEMENT,
2358
+ DEFAULT_TREE_ITEM_ELEMENT,
2359
+ DEFAULT_VIRTUAL_LIST_ELEMENT,
2360
+ Dialog,
2361
+ DialogContext,
2362
+ DialogProvider,
2363
+ ElementQuery,
2364
+ ErrorBoundary,
2365
+ Flex,
2366
+ Grid,
2367
+ Heading,
2368
+ HeadingSkeleton,
2369
+ Hotkeys,
2370
+ Inline,
2371
+ KBD,
2372
+ Label,
2373
+ LabelSkeleton,
2374
+ Layer,
2375
+ LayerProvider,
2376
+ Menu,
2377
+ MenuButton,
2378
+ MenuDivider,
2379
+ MenuGroup,
2380
+ MenuItem,
2381
+ Popover,
2382
+ Portal,
2383
+ PortalProvider,
2384
+ Radio,
2385
+ Root,
2386
+ RootProvider,
2387
+ Select,
2388
+ Selectable,
2389
+ Skeleton,
2390
+ Spinner,
2391
+ SrOnly,
2392
+ Stack,
2393
+ Switch,
2394
+ Tab,
2395
+ TabList,
2396
+ TabPanel,
2397
+ Text,
2398
+ TextArea,
2399
+ TextInput,
2400
+ TextSkeleton,
2401
+ ThemeColorProvider,
2402
+ ThemeProvider,
2403
+ Toast,
2404
+ ToastProvider,
2405
+ Tooltip,
2406
+ TooltipDelayGroupContext,
2407
+ TooltipDelayGroupProvider,
2408
+ Tree,
2409
+ TreeItem,
2410
+ VirtualList,
2411
+ _ResizeObserver,
2412
+ _elementSizeObserver,
2413
+ _getArrayProp,
2414
+ _getResponsiveProp,
2415
+ _hasFocus,
2416
+ _isEnterToClickElement,
2417
+ _isScrollable,
2418
+ _raf,
2419
+ _raf2,
2420
+ _responsive,
2421
+ attemptFocus,
2422
+ containsOrEqualsElement,
2423
+ createColorTheme,
2424
+ focusFirstDescendant,
2425
+ focusLastDescendant,
2426
+ hexToRgb,
2427
+ hslToRgb,
2428
+ isFocusable,
2429
+ isHTMLAnchorElement,
2430
+ isHTMLButtonElement,
2431
+ isHTMLElement,
2432
+ isHTMLInputElement,
2433
+ isHTMLSelectElement,
2434
+ isHTMLTextAreaElement,
2435
+ multiply,
2436
+ parseColor,
2437
+ px,
2438
+ rem,
2439
+ rgbToHex,
2440
+ rgbToHsl,
2441
+ rgba,
2442
+ screen,
2443
+ useArrayProp,
2444
+ useBoundaryElement,
2445
+ useCard,
2446
+ useClickOutside,
2447
+ useClickOutsideEvent,
2448
+ useCustomValidity,
2449
+ useDialog,
2450
+ useElementRect,
2451
+ useElementSize,
2452
+ useForwardedRef,
2453
+ useGlobalKeyDown,
2454
+ useLayer,
2455
+ useMatchMedia,
2456
+ useMediaIndex,
2457
+ usePortal,
2458
+ usePrefersDark,
2459
+ usePrefersReducedMotion,
2460
+ useResponsiveProp,
2461
+ useRootTheme,
2462
+ useTheme,
2463
+ useTheme_v2,
2464
+ useToast,
2465
+ useTooltipDelayGroup,
2466
+ useTree
2467
+ };
1546
2468
  //# sourceMappingURL=index.js.map