@sanity/ui 3.0.0-static.2 → 3.0.0-static.21

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