@sanity/ui 3.0.0-static.4 → 3.0.0-static.40

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