@sanity/ui 3.0.0-static.8 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1062) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +3550 -1279
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-cjs/refractor.js +3 -7
  4. package/dist/_chunks-cjs/refractor.js.map +1 -1
  5. package/dist/_chunks-es/_visual-editing.mjs +3562 -1292
  6. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  7. package/dist/_chunks-es/refractor.mjs +2 -2
  8. package/dist/_chunks-es/refractor.mjs.map +1 -1
  9. package/dist/_visual-editing.d.mts +439 -239
  10. package/dist/_visual-editing.d.ts +439 -239
  11. package/dist/index.d.mts +638 -544
  12. package/dist/index.d.ts +638 -544
  13. package/dist/index.js +501 -315
  14. package/dist/index.js.map +1 -1
  15. package/dist/index.mjs +504 -309
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/theme.d.mts +76 -425
  18. package/dist/theme.d.ts +76 -425
  19. package/dist/theme.js +2237 -1325
  20. package/dist/theme.js.map +1 -1
  21. package/dist/theme.mjs +2284 -1372
  22. package/dist/theme.mjs.map +1 -1
  23. package/exports/_visual-editing.ts +27 -27
  24. package/exports/index.ts +1 -1
  25. package/package.json +91 -97
  26. package/src/core/__workshop__/constants.ts +293 -0
  27. package/src/core/_compat.ts +264 -0
  28. package/src/core/components/autocomplete/__workshop__/async.tsx +156 -0
  29. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +137 -0
  30. package/src/core/components/autocomplete/__workshop__/custom.tsx +89 -0
  31. package/src/core/components/autocomplete/__workshop__/example.tsx +79 -0
  32. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +294 -0
  33. package/src/core/components/autocomplete/autocomplete.styles.tsx +39 -0
  34. package/src/core/components/autocomplete/autocomplete.tsx +729 -0
  35. package/src/core/components/autocomplete/autocompleteOption.tsx +45 -0
  36. package/src/core/components/autocomplete/types.ts +108 -0
  37. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +18 -0
  38. package/src/core/components/breadcrumbs/breadcrumbs.tsx +99 -0
  39. package/src/core/components/dialog/__workshop__/nested.tsx +72 -0
  40. package/src/core/components/dialog/__workshop__/onScroll.tsx +39 -0
  41. package/src/core/components/dialog/__workshop__/position.tsx +30 -0
  42. package/src/core/components/dialog/__workshop__/props.tsx +75 -0
  43. package/src/core/components/dialog/dialog.tsx +434 -0
  44. package/src/core/components/dialog/dialogProvider.tsx +35 -0
  45. package/src/core/components/dialog/styles.ts +77 -0
  46. package/src/core/components/hotkeys/hotkeys.tsx +62 -0
  47. package/src/core/components/menu/__workshop__/menuButton.tsx +80 -0
  48. package/src/core/components/menu/__workshop__/tones.tsx +25 -0
  49. package/src/core/components/menu/menu.test.tsx +128 -0
  50. package/src/core/components/menu/menu.tsx +177 -0
  51. package/src/core/components/menu/menuButton.tsx +268 -0
  52. package/src/core/components/menu/menuContext.ts +29 -0
  53. package/src/core/components/menu/menuDivider.ts +12 -0
  54. package/src/core/components/menu/menuGroup.tsx +217 -0
  55. package/src/core/components/menu/menuItem.tsx +180 -0
  56. package/src/core/components/menu/useMenuController.ts +231 -0
  57. package/src/core/components/skeleton/__workshop__/delay.tsx +70 -0
  58. package/src/core/components/skeleton/__workshop__/skeleton.tsx +64 -0
  59. package/src/core/components/skeleton/skeleton.tsx +57 -0
  60. package/src/core/components/skeleton/styles.ts +50 -0
  61. package/src/core/components/skeleton/textSkeleton.tsx +123 -0
  62. package/src/core/components/tab/tab.tsx +101 -0
  63. package/src/core/components/tab/tabList.tsx +70 -0
  64. package/src/core/components/tab/tabPanel.tsx +39 -0
  65. package/src/core/components/toast/__workshop__/toast.tsx +26 -0
  66. package/src/core/components/toast/styles.ts +77 -0
  67. package/src/core/components/toast/toast.tsx +198 -0
  68. package/src/core/components/toast/toastLayer.tsx +51 -0
  69. package/src/core/components/toast/types.ts +26 -0
  70. package/src/core/components/tree/style.ts +105 -0
  71. package/src/core/components/tree/tree.tsx +237 -0
  72. package/src/core/components/tree/treeGroup.tsx +30 -0
  73. package/src/core/components/tree/treeItem.tsx +205 -0
  74. package/src/core/components/tree/types.ts +21 -0
  75. package/src/core/constants.ts +79 -0
  76. package/src/core/helpers/index.ts +4 -0
  77. package/src/core/hooks/useArrayProp.ts +31 -0
  78. package/src/core/hooks/useClickOutside.test.tsx +482 -0
  79. package/src/core/hooks/useForwardedRef.ts +19 -0
  80. package/src/core/hooks/useMatchMedia.ts +28 -0
  81. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +36 -0
  82. package/src/core/hooks/useMediaIndex/useMediaIndex.ts +102 -0
  83. package/src/core/hooks/usePrefersDark.ts +16 -0
  84. package/src/core/hooks/usePrefersReducedMotion.ts +16 -0
  85. package/src/core/index.ts +10 -0
  86. package/src/core/primitives/_selectable/selectable.tsx +15 -0
  87. package/src/core/primitives/_selectable/style.ts +115 -0
  88. package/src/core/primitives/avatar/__workshop__/asButton.tsx +14 -0
  89. package/src/core/primitives/avatar/__workshop__/stack.tsx +25 -0
  90. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +63 -0
  91. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +70 -0
  92. package/src/core/primitives/avatar/avatar.tsx +192 -0
  93. package/src/core/primitives/avatar/avatarCounter.tsx +94 -0
  94. package/src/core/primitives/avatar/avatarStack.tsx +101 -0
  95. package/src/core/primitives/avatar/styles.ts +167 -0
  96. package/src/core/primitives/badge/__workshop__/props.tsx +30 -0
  97. package/src/core/primitives/badge/__workshop__/tones.tsx +21 -0
  98. package/src/core/primitives/badge/badge.tsx +62 -0
  99. package/src/core/primitives/badge/styles.ts +20 -0
  100. package/src/core/primitives/box/__workshop__/props.tsx +20 -0
  101. package/src/core/primitives/box/box.tsx +131 -0
  102. package/src/core/primitives/button/__workshop__/custom.tsx +51 -0
  103. package/src/core/primitives/button/__workshop__/props.tsx +55 -0
  104. package/src/core/primitives/button/__workshop__/stacked.tsx +58 -0
  105. package/src/core/primitives/button/button.tsx +187 -0
  106. package/src/core/primitives/button/styles.ts +117 -0
  107. package/src/core/primitives/card/__workshop__/allTones.tsx +25 -0
  108. package/src/core/primitives/card/__workshop__/asButton.tsx +107 -0
  109. package/src/core/primitives/card/__workshop__/props.tsx +53 -0
  110. package/src/core/primitives/card/__workshop__/selected.tsx +94 -0
  111. package/src/core/primitives/card/card.tsx +116 -0
  112. package/src/core/primitives/card/styles.ts +147 -0
  113. package/src/core/primitives/card/types.ts +11 -0
  114. package/src/core/primitives/checkbox/checkbox.tsx +73 -0
  115. package/src/core/primitives/checkbox/styles.ts +128 -0
  116. package/src/core/primitives/code/__workshop__/props.tsx +21 -0
  117. package/src/core/primitives/code/code.tsx +40 -0
  118. package/src/core/primitives/code/refractor.tsx +20 -0
  119. package/src/core/primitives/code/styles.ts +77 -0
  120. package/src/core/primitives/container/__workshop__/example.tsx +20 -0
  121. package/src/core/primitives/container/container.tsx +41 -0
  122. package/src/core/primitives/container/styles.ts +23 -0
  123. package/src/core/primitives/flex/__workshop__/example.tsx +34 -0
  124. package/src/core/primitives/flex/__workshop__/gap.tsx +25 -0
  125. package/src/core/primitives/flex/flex.tsx +54 -0
  126. package/src/core/primitives/grid/grid.tsx +48 -0
  127. package/src/core/primitives/heading/__workshop__/plain.tsx +32 -0
  128. package/src/core/primitives/heading/heading.tsx +80 -0
  129. package/src/core/primitives/heading/styles.ts +64 -0
  130. package/src/core/primitives/heading/types.ts +7 -0
  131. package/src/core/primitives/inline/__workshop__/plain.tsx +27 -0
  132. package/src/core/primitives/inline/inline.tsx +47 -0
  133. package/src/core/primitives/inline/styles.ts +32 -0
  134. package/src/core/primitives/kbd/kbd.tsx +61 -0
  135. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +48 -0
  136. package/src/core/primitives/label/__workshop__/plain.tsx +24 -0
  137. package/src/core/primitives/label/label.tsx +79 -0
  138. package/src/core/primitives/label/styles.ts +45 -0
  139. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +77 -0
  140. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +32 -0
  141. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +11 -0
  142. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +71 -0
  143. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +71 -0
  144. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +89 -0
  145. package/src/core/primitives/popover/__workshop__/TestStory.tsx +97 -0
  146. package/src/core/primitives/popover/helpers.ts +31 -0
  147. package/src/core/primitives/popover/popover.tsx +484 -0
  148. package/src/core/primitives/popover/popoverCard.tsx +168 -0
  149. package/src/core/primitives/radio/radio.tsx +51 -0
  150. package/src/core/primitives/radio/styles.ts +117 -0
  151. package/src/core/primitives/select/__workshop__/plain.tsx +27 -0
  152. package/src/core/primitives/select/select.tsx +87 -0
  153. package/src/core/primitives/select/styles.ts +166 -0
  154. package/src/core/primitives/spinner/__workshop__/Props.tsx +15 -0
  155. package/src/core/primitives/spinner/spinner.tsx +46 -0
  156. package/src/core/primitives/stack/__workshop__/plain.tsx +32 -0
  157. package/src/core/primitives/stack/stack.tsx +43 -0
  158. package/src/core/primitives/stack/styles.ts +32 -0
  159. package/src/core/primitives/switch/styles.ts +173 -0
  160. package/src/core/primitives/switch/switch.tsx +68 -0
  161. package/src/core/primitives/text/__workshop__/colored.tsx +30 -0
  162. package/src/core/primitives/text/__workshop__/example.tsx +39 -0
  163. package/src/core/primitives/text/styles.ts +74 -0
  164. package/src/core/primitives/text/text.tsx +81 -0
  165. package/src/core/primitives/textArea/__workshop__/plain.tsx +50 -0
  166. package/src/core/primitives/textArea/textArea.tsx +119 -0
  167. package/src/core/primitives/textInput/__workshop__/plain.tsx +98 -0
  168. package/src/core/primitives/textInput/__workshop__/typed.tsx +23 -0
  169. package/src/core/primitives/textInput/textInput.tsx +389 -0
  170. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +102 -0
  171. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +74 -0
  172. package/src/core/primitives/tooltip/__workshop__/props.tsx +107 -0
  173. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +86 -0
  174. package/src/core/primitives/tooltip/tooltip.test.tsx +452 -0
  175. package/src/core/primitives/tooltip/tooltip.tsx +465 -0
  176. package/src/core/primitives/tooltip/tooltipCard.tsx +111 -0
  177. package/src/core/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +57 -0
  178. package/src/core/primitives/types.ts +146 -0
  179. package/src/core/styles/border/borderStyle.ts +56 -0
  180. package/src/core/styles/border/index.ts +2 -0
  181. package/src/core/styles/border/types.ts +10 -0
  182. package/src/core/styles/box/boxStyle.ts +69 -0
  183. package/src/core/styles/box/index.ts +2 -0
  184. package/src/core/styles/box/types.ts +11 -0
  185. package/src/core/styles/card/_cardColorStyle.ts +108 -0
  186. package/src/core/styles/card/index.ts +1 -0
  187. package/src/core/styles/flex/flexItemStyle.ts +27 -0
  188. package/src/core/styles/flex/flexStyle.ts +70 -0
  189. package/src/core/styles/flex/index.ts +3 -0
  190. package/src/core/styles/flex/types.ts +25 -0
  191. package/src/core/styles/focusRing/index.ts +25 -0
  192. package/src/core/styles/font/codeFontStyle.ts +13 -0
  193. package/src/core/styles/font/headingFontStyle.ts +13 -0
  194. package/src/core/styles/font/index.ts +6 -0
  195. package/src/core/styles/font/labelFontStyle.ts +13 -0
  196. package/src/core/styles/font/responsiveFont.ts +101 -0
  197. package/src/core/styles/font/textAlignStyle.ts +19 -0
  198. package/src/core/styles/font/textFontStyle.ts +13 -0
  199. package/src/core/styles/font/types.ts +35 -0
  200. package/src/core/styles/grid/gridItemStyle.ts +82 -0
  201. package/src/core/styles/grid/gridStyle.ts +108 -0
  202. package/src/core/styles/grid/index.ts +3 -0
  203. package/src/core/styles/grid/types.ts +37 -0
  204. package/src/core/styles/helpers.ts +72 -0
  205. package/src/core/styles/index.ts +5 -0
  206. package/src/core/styles/input/index.ts +2 -0
  207. package/src/core/styles/input/responsiveInputPaddingStyle.ts +78 -0
  208. package/src/core/styles/input/textInputStyle.ts +263 -0
  209. package/src/core/styles/internal.ts +12 -0
  210. package/src/core/styles/margin/index.ts +2 -0
  211. package/src/core/styles/margin/marginStyle.ts +21 -0
  212. package/src/core/styles/margin/marginsStyle.test.ts +33 -0
  213. package/src/core/styles/margin/types.ts +9 -0
  214. package/src/core/styles/padding/index.ts +2 -0
  215. package/src/core/styles/padding/paddingStyle.test.ts +33 -0
  216. package/src/core/styles/padding/paddingStyle.ts +21 -0
  217. package/src/core/styles/padding/types.ts +12 -0
  218. package/src/core/styles/radius/index.ts +2 -0
  219. package/src/core/styles/radius/radiusStyle.ts +23 -0
  220. package/src/core/styles/radius/types.ts +8 -0
  221. package/src/core/styles/shadow/index.ts +2 -0
  222. package/src/core/styles/shadow/shadowStyle.ts +29 -0
  223. package/src/core/styles/shadow/types.ts +6 -0
  224. package/src/core/styles/types.ts +8 -0
  225. package/src/core/theme/__workshop__/build/Root.tsx +367 -0
  226. package/src/core/theme/__workshop__/build/helpers.ts +46 -0
  227. package/src/core/theme/__workshop__/build/story.tsx +465 -0
  228. package/src/core/theme/__workshop__/canvas.tsx +351 -0
  229. package/src/core/theme/__workshop__/color.tsx +62 -0
  230. package/src/core/theme/__workshop__/debug/story.tsx +408 -0
  231. package/src/core/theme/__workshop__/index.ts +39 -0
  232. package/src/core/theme/__workshop__/layer.tsx +78 -0
  233. package/src/core/theme/__workshop__/nestedProvider.tsx +15 -0
  234. package/src/core/theme/theme.test.tsx +73 -0
  235. package/src/core/theme/themeColorProvider.tsx +29 -0
  236. package/src/core/theme/themeContext.ts +10 -0
  237. package/src/core/theme/themeProvider.tsx +62 -0
  238. package/src/core/types/avatar.ts +14 -0
  239. package/src/core/types/box.ts +19 -0
  240. package/src/core/types/button.ts +21 -0
  241. package/src/core/types/flex.ts +30 -0
  242. package/src/core/types/grid.ts +14 -0
  243. package/src/core/types/gridItem.ts +29 -0
  244. package/src/core/types/index.ts +14 -0
  245. package/src/core/types/radius.ts +4 -0
  246. package/src/core/types/selectable.ts +6 -0
  247. package/src/core/types/text.ts +4 -0
  248. package/src/core/utils/arrow/arrow.tsx +123 -0
  249. package/src/core/utils/boundaryElement/boundaryElementProvider.tsx +24 -0
  250. package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +21 -0
  251. package/src/core/utils/elementQuery/elementQuery.tsx +53 -0
  252. package/src/core/utils/errorBoundary.tsx +48 -0
  253. package/src/core/utils/layer/layer.tsx +98 -0
  254. package/src/core/utils/layer/layerProvider.tsx +110 -0
  255. package/src/core/utils/portal/portal.ts +32 -0
  256. package/src/core/utils/portal/portalProvider.tsx +79 -0
  257. package/src/core/utils/srOnly/srOnly.tsx +36 -0
  258. package/src/core/utils/virtualList/virtualList.tsx +174 -0
  259. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +1 -1
  260. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +1 -1
  261. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +6 -1
  262. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +2 -2
  263. package/src/theme/build/_deprecated/color/card/createCardStates.ts +1 -1
  264. package/src/theme/build/_deprecated/color/factory.ts +3 -2
  265. package/src/theme/build/_deprecated/color/input/createInputModes.ts +1 -1
  266. package/src/theme/build/_deprecated/color/muted/createMuted.ts +1 -1
  267. package/src/theme/build/_deprecated/color/spot/createSpot.ts +1 -1
  268. package/src/theme/build/buildColorTheme.ts +1 -1
  269. package/src/theme/build/buildTheme.ts +32 -8
  270. package/src/theme/build/lib/color-fns/rgba.ts +0 -4
  271. package/src/theme/build/renderColorTheme.ts +4 -4
  272. package/src/theme/build/renderColorValue.ts +1 -1
  273. package/src/theme/build/resolveColorTokens.ts +1 -1
  274. package/src/theme/config/system.ts +1 -1
  275. package/src/theme/config/tokens/color/types.ts +1 -1
  276. package/src/theme/config/tokens/parseTokenKey.ts +1 -1
  277. package/src/theme/config/tokens/parseTokenValue.ts +1 -1
  278. package/src/theme/config/tokens/types.ts +1 -1
  279. package/src/theme/config/types.ts +3 -2
  280. package/src/theme/defaults/config.ts +2 -2
  281. package/src/theme/defaults/fonts.ts +16 -17
  282. package/src/theme/getScopedTheme.ts +9 -6
  283. package/src/theme/index.ts +1 -7
  284. package/src/theme/system/avatar.ts +14 -0
  285. package/src/theme/system/font.ts +52 -0
  286. package/src/theme/system/index.ts +11 -0
  287. package/src/theme/system/input.ts +33 -0
  288. package/src/theme/system/theme.ts +138 -0
  289. package/src/theme/system/v0/color/_generic.ts +35 -0
  290. package/src/theme/system/v0/color/color.ts +40 -0
  291. package/src/theme/system/v0/color/input.ts +34 -0
  292. package/src/theme/system/v0/color/spot.ts +13 -0
  293. package/src/theme/system/v0/index.ts +3 -0
  294. package/src/theme/versioning/getTheme_v2.ts +1 -2
  295. package/src/theme/versioning/index.ts +4 -0
  296. package/src/theme/versioning/is_v0.ts +1 -2
  297. package/src/theme/versioning/is_v2.ts +1 -2
  298. package/src/theme/versioning/themeColor_v0_v2.ts +4 -6
  299. package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -1
  300. package/src/theme/versioning/v0_v2.ts +1 -2
  301. package/src/theme/versioning/v2_v0.ts +6 -6
  302. package/bin/ui.js +0 -5
  303. package/dist/_chunks-cjs/buildCommand.js +0 -32
  304. package/dist/_chunks-cjs/buildCommand.js.map +0 -1
  305. package/dist/cli.d.ts +0 -1
  306. package/dist/cli.js +0 -357
  307. package/dist/cli.js.map +0 -1
  308. package/dist/css.d.mts +0 -1471
  309. package/dist/css.d.ts +0 -1471
  310. package/dist/css.js +0 -4830
  311. package/dist/css.js.map +0 -1
  312. package/dist/css.mjs +0 -4831
  313. package/dist/css.mjs.map +0 -1
  314. package/dist/sanity-palette.css +0 -1
  315. package/dist/sanity-theme.css +0 -1
  316. package/dist/system.css +0 -23238
  317. package/exports/css.ts +0 -1
  318. package/src/cli/buildCommand.ts +0 -48
  319. package/src/cli/index.ts +0 -38
  320. package/src/css/_comp.test.ts +0 -7
  321. package/src/css/_comp.ts +0 -11
  322. package/src/css/_mergeStyles.ts +0 -31
  323. package/src/css/_resp.ts +0 -38
  324. package/src/css/_responsiveRule.ts +0 -38
  325. package/src/css/aspects/border/border.style.ts +0 -13
  326. package/src/css/aspects/border/border.ts +0 -14
  327. package/src/css/aspects/border/index.ts +0 -2
  328. package/src/css/aspects/border/types.ts +0 -10
  329. package/src/css/aspects/display/display.style.ts +0 -34
  330. package/src/css/aspects/display/display.ts +0 -7
  331. package/src/css/aspects/display/index.ts +0 -2
  332. package/src/css/aspects/display/types.ts +0 -17
  333. package/src/css/aspects/flex/flex.style.ts +0 -30
  334. package/src/css/aspects/flex/flex.ts +0 -13
  335. package/src/css/aspects/flex/flexAlign.style.ts +0 -12
  336. package/src/css/aspects/flex/flexDirection.style.ts +0 -11
  337. package/src/css/aspects/flex/flexJustify.style.ts +0 -13
  338. package/src/css/aspects/flex/flexWrap.style.ts +0 -10
  339. package/src/css/aspects/flex/index.ts +0 -2
  340. package/src/css/aspects/flex/types.ts +0 -35
  341. package/src/css/aspects/flexItem/flex.style.ts +0 -22
  342. package/src/css/aspects/flexItem/flexItem.ts +0 -8
  343. package/src/css/aspects/flexItem/index.ts +0 -2
  344. package/src/css/aspects/flexItem/types.ts +0 -27
  345. package/src/css/aspects/font/font.style.ts +0 -151
  346. package/src/css/aspects/font/font.ts +0 -12
  347. package/src/css/aspects/font/index.ts +0 -2
  348. package/src/css/aspects/font/types.ts +0 -12
  349. package/src/css/aspects/gap/gap.style.ts +0 -21
  350. package/src/css/aspects/gap/gap.ts +0 -8
  351. package/src/css/aspects/gap/index.ts +0 -2
  352. package/src/css/aspects/gap/types.ts +0 -10
  353. package/src/css/aspects/grid/grid.ts +0 -13
  354. package/src/css/aspects/grid/gridAutoColumns.style.ts +0 -11
  355. package/src/css/aspects/grid/gridAutoFlow.style.ts +0 -11
  356. package/src/css/aspects/grid/gridAutoRows.style.ts +0 -11
  357. package/src/css/aspects/grid/gridColumns.style.ts +0 -18
  358. package/src/css/aspects/grid/gridRows.style.ts +0 -18
  359. package/src/css/aspects/grid/index.ts +0 -2
  360. package/src/css/aspects/grid/types.ts +0 -29
  361. package/src/css/aspects/gridItem/gridColumn.style.ts +0 -20
  362. package/src/css/aspects/gridItem/gridColumnEnd.style.ts +0 -20
  363. package/src/css/aspects/gridItem/gridColumnStart.style.ts +0 -20
  364. package/src/css/aspects/gridItem/gridItem.ts +0 -15
  365. package/src/css/aspects/gridItem/gridRow.style.ts +0 -20
  366. package/src/css/aspects/gridItem/gridRowEnd.style.ts +0 -20
  367. package/src/css/aspects/gridItem/gridRowStart.style.ts +0 -20
  368. package/src/css/aspects/gridItem/index.ts +0 -2
  369. package/src/css/aspects/gridItem/types.ts +0 -41
  370. package/src/css/aspects/height/height.style.ts +0 -9
  371. package/src/css/aspects/height/height.ts +0 -17
  372. package/src/css/aspects/height/index.ts +0 -1
  373. package/src/css/aspects/height/rules.ts +0 -7
  374. package/src/css/aspects/index.ts +0 -21
  375. package/src/css/aspects/inset/index.ts +0 -2
  376. package/src/css/aspects/inset/inset.style.ts +0 -12
  377. package/src/css/aspects/inset/inset.ts +0 -13
  378. package/src/css/aspects/inset/types.ts +0 -13
  379. package/src/css/aspects/margin/index.ts +0 -2
  380. package/src/css/aspects/margin/margin.style.ts +0 -46
  381. package/src/css/aspects/margin/margin.ts +0 -15
  382. package/src/css/aspects/margin/types.ts +0 -11
  383. package/src/css/aspects/maxWidth/index.ts +0 -2
  384. package/src/css/aspects/maxWidth/maxWidth.style.ts +0 -16
  385. package/src/css/aspects/maxWidth/maxWidth.ts +0 -6
  386. package/src/css/aspects/maxWidth/types.ts +0 -7
  387. package/src/css/aspects/minWidth/index.ts +0 -2
  388. package/src/css/aspects/minWidth/minWidth.style.ts +0 -13
  389. package/src/css/aspects/minWidth/minWidth.ts +0 -6
  390. package/src/css/aspects/minWidth/types.ts +0 -7
  391. package/src/css/aspects/outline/outline.style.ts +0 -9
  392. package/src/css/aspects/overflow/index.ts +0 -2
  393. package/src/css/aspects/overflow/overflow.style.ts +0 -11
  394. package/src/css/aspects/overflow/overflow.ts +0 -11
  395. package/src/css/aspects/overflow/types.ts +0 -11
  396. package/src/css/aspects/padding/index.ts +0 -2
  397. package/src/css/aspects/padding/padding.style.ts +0 -46
  398. package/src/css/aspects/padding/padding.ts +0 -15
  399. package/src/css/aspects/padding/types.ts +0 -14
  400. package/src/css/aspects/pointerEvents/index.ts +0 -2
  401. package/src/css/aspects/pointerEvents/pointerEvents.style.ts +0 -13
  402. package/src/css/aspects/pointerEvents/pointerEvents.ts +0 -6
  403. package/src/css/aspects/pointerEvents/types.ts +0 -7
  404. package/src/css/aspects/position/index.ts +0 -2
  405. package/src/css/aspects/position/position.style.ts +0 -12
  406. package/src/css/aspects/position/position.ts +0 -7
  407. package/src/css/aspects/position/types.ts +0 -9
  408. package/src/css/aspects/radius/index.ts +0 -2
  409. package/src/css/aspects/radius/radius.style.ts +0 -16
  410. package/src/css/aspects/radius/radius.ts +0 -8
  411. package/src/css/aspects/radius/types.ts +0 -8
  412. package/src/css/aspects/shadow/index.ts +0 -2
  413. package/src/css/aspects/shadow/shadow.style.ts +0 -49
  414. package/src/css/aspects/shadow/shadow.ts +0 -7
  415. package/src/css/aspects/shadow/types.ts +0 -8
  416. package/src/css/aspects/textOverflow/index.ts +0 -2
  417. package/src/css/aspects/textOverflow/textOverflow.style.ts +0 -21
  418. package/src/css/aspects/textOverflow/textOverflow.ts +0 -6
  419. package/src/css/aspects/textOverflow/types.ts +0 -8
  420. package/src/css/aspects/width/index.ts +0 -2
  421. package/src/css/aspects/width/rules.ts +0 -8
  422. package/src/css/aspects/width/types.ts +0 -9
  423. package/src/css/aspects/width/width.style.ts +0 -11
  424. package/src/css/aspects/width/width.ts +0 -6
  425. package/src/css/compile/compilePalette.ts +0 -27
  426. package/src/css/compile/compileRule.ts +0 -97
  427. package/src/css/compile/compileRules.test.ts +0 -36
  428. package/src/css/compile/compileRules.ts +0 -43
  429. package/src/css/compile/compileStyle.ts +0 -148
  430. package/src/css/compile/compileSystem.ts +0 -10
  431. package/src/css/compile/compileTheme.ts +0 -15
  432. package/src/css/compile/compileTheme_v3.ts +0 -401
  433. package/src/css/compile/types.ts +0 -6
  434. package/src/css/components/breadcrumbs/breadcrumbs.style.ts +0 -9
  435. package/src/css/components/breadcrumbs/breadcrumbs.ts +0 -5
  436. package/src/css/components/breadcrumbs/rules.ts +0 -25
  437. package/src/css/components/dialog/dialog.style.ts +0 -79
  438. package/src/css/components/dialog/dialog.ts +0 -30
  439. package/src/css/components/dialog/index.ts +0 -1
  440. package/src/css/components/dialog/rules.ts +0 -78
  441. package/src/css/components/menu/index.ts +0 -1
  442. package/src/css/components/menu/menu.style.ts +0 -17
  443. package/src/css/components/menu/menu.ts +0 -9
  444. package/src/css/components/menu/rules.ts +0 -15
  445. package/src/css/components/skeleton/index.ts +0 -2
  446. package/src/css/components/skeleton/rules.ts +0 -113
  447. package/src/css/components/skeleton/skeleton.style.ts +0 -96
  448. package/src/css/components/skeleton/skeleton.ts +0 -31
  449. package/src/css/components/skeleton/types.ts +0 -26
  450. package/src/css/components/toast/index.ts +0 -1
  451. package/src/css/components/toast/rules.ts +0 -18
  452. package/src/css/components/toast/toast.style.ts +0 -20
  453. package/src/css/components/toast/toast.ts +0 -21
  454. package/src/css/components/tree/index.ts +0 -1
  455. package/src/css/components/tree/rules.ts +0 -168
  456. package/src/css/components/tree/tree.style.ts +0 -55
  457. package/src/css/components/tree/tree.ts +0 -5
  458. package/src/css/composeClassNames.ts +0 -17
  459. package/src/css/constants.ts +0 -1
  460. package/src/css/index.ts +0 -41
  461. package/src/css/primitives/_arrow/_arrow.style.ts +0 -73
  462. package/src/css/primitives/_arrow/_arrow.ts +0 -14
  463. package/src/css/primitives/_arrow/index.ts +0 -1
  464. package/src/css/primitives/_input/__workshop__/customInput.tsx +0 -16
  465. package/src/css/primitives/_input/__workshop__/index.ts +0 -14
  466. package/src/css/primitives/_input/_input.style.ts +0 -162
  467. package/src/css/primitives/_input/index.ts +0 -2
  468. package/src/css/primitives/_input/input.ts +0 -25
  469. package/src/css/primitives/_input/types.ts +0 -12
  470. package/src/css/primitives/_selectable/__style.ts +0 -117
  471. package/src/css/primitives/_selectable/_contants.ts +0 -11
  472. package/src/css/primitives/_selectable/_selectable.style.ts +0 -132
  473. package/src/css/primitives/_selectable/index.ts +0 -2
  474. package/src/css/primitives/_selectable/selectable.ts +0 -9
  475. package/src/css/primitives/_selectable/types.ts +0 -8
  476. package/src/css/primitives/avatar/avatar.style.ts +0 -175
  477. package/src/css/primitives/avatar/avatar.ts +0 -27
  478. package/src/css/primitives/avatar/index.ts +0 -2
  479. package/src/css/primitives/avatar/rules.ts +0 -176
  480. package/src/css/primitives/avatar/types.ts +0 -8
  481. package/src/css/primitives/badge/badge.style.ts +0 -22
  482. package/src/css/primitives/badge/badge.ts +0 -8
  483. package/src/css/primitives/badge/index.ts +0 -2
  484. package/src/css/primitives/badge/types.ts +0 -8
  485. package/src/css/primitives/box/box.style.ts +0 -31
  486. package/src/css/primitives/box/box.ts +0 -52
  487. package/src/css/primitives/box/index.ts +0 -2
  488. package/src/css/primitives/box/types.ts +0 -51
  489. package/src/css/primitives/button/_constants.ts +0 -17
  490. package/src/css/primitives/button/button.style.ts +0 -201
  491. package/src/css/primitives/button/button.ts +0 -41
  492. package/src/css/primitives/button/rules.ts +0 -302
  493. package/src/css/primitives/card/_constants.ts +0 -13
  494. package/src/css/primitives/card/card.style.ts +0 -270
  495. package/src/css/primitives/card/card.ts +0 -14
  496. package/src/css/primitives/card/types.ts +0 -10
  497. package/src/css/primitives/checkbox/__styles.ts +0 -129
  498. package/src/css/primitives/checkbox/checkbox.style.ts +0 -154
  499. package/src/css/primitives/checkbox/checkbox.ts +0 -9
  500. package/src/css/primitives/checkbox/rules.ts +0 -152
  501. package/src/css/primitives/code/code.style.ts +0 -62
  502. package/src/css/primitives/code/code.ts +0 -9
  503. package/src/css/primitives/code/index.ts +0 -2
  504. package/src/css/primitives/code/rules.ts +0 -96
  505. package/src/css/primitives/code/types.ts +0 -10
  506. package/src/css/primitives/container/container.style.ts +0 -10
  507. package/src/css/primitives/container/container.ts +0 -7
  508. package/src/css/primitives/container/rules.ts +0 -8
  509. package/src/css/primitives/container/types.ts +0 -7
  510. package/src/css/primitives/heading/heading.style.ts +0 -47
  511. package/src/css/primitives/heading/heading.ts +0 -17
  512. package/src/css/primitives/heading/index.ts +0 -2
  513. package/src/css/primitives/heading/rules.ts +0 -155
  514. package/src/css/primitives/heading/types.ts +0 -12
  515. package/src/css/primitives/kbd/index.ts +0 -2
  516. package/src/css/primitives/kbd/kbd.style.ts +0 -22
  517. package/src/css/primitives/kbd/kbd.ts +0 -7
  518. package/src/css/primitives/kbd/rules.ts +0 -20
  519. package/src/css/primitives/kbd/types.ts +0 -7
  520. package/src/css/primitives/label/index.ts +0 -2
  521. package/src/css/primitives/label/label.style.ts +0 -48
  522. package/src/css/primitives/label/label.ts +0 -16
  523. package/src/css/primitives/label/rules.ts +0 -137
  524. package/src/css/primitives/label/types.ts +0 -12
  525. package/src/css/primitives/popover/index.ts +0 -1
  526. package/src/css/primitives/popover/popover.style.ts +0 -5
  527. package/src/css/primitives/popover/popover.ts +0 -9
  528. package/src/css/primitives/popover/rules.ts +0 -5
  529. package/src/css/primitives/radio/radio.style.ts +0 -123
  530. package/src/css/primitives/radio/radio.ts +0 -5
  531. package/src/css/primitives/radio/rules.ts +0 -121
  532. package/src/css/primitives/select/index.ts +0 -2
  533. package/src/css/primitives/select/rules.ts +0 -22
  534. package/src/css/primitives/select/select.style.ts +0 -24
  535. package/src/css/primitives/select/select.ts +0 -12
  536. package/src/css/primitives/select/types.ts +0 -5
  537. package/src/css/primitives/spinner/rules.ts +0 -21
  538. package/src/css/primitives/spinner/spinner.style.ts +0 -22
  539. package/src/css/primitives/spinner/spinner.ts +0 -9
  540. package/src/css/primitives/stack/stack.style.ts +0 -9
  541. package/src/css/primitives/stack/stack.ts +0 -6
  542. package/src/css/primitives/switch/rules.ts +0 -340
  543. package/src/css/primitives/switch/switch.style.ts +0 -94
  544. package/src/css/primitives/switch/switch.ts +0 -21
  545. package/src/css/primitives/text/index.ts +0 -2
  546. package/src/css/primitives/text/rules.ts +0 -164
  547. package/src/css/primitives/text/text.style.ts +0 -64
  548. package/src/css/primitives/text/text.ts +0 -17
  549. package/src/css/primitives/text/types.ts +0 -11
  550. package/src/css/primitives/textArea/index.ts +0 -2
  551. package/src/css/primitives/textArea/rules.ts +0 -7
  552. package/src/css/primitives/textArea/textArea.style.ts +0 -9
  553. package/src/css/primitives/textArea/textArea.ts +0 -8
  554. package/src/css/primitives/textArea/types.ts +0 -5
  555. package/src/css/primitives/textInput/index.ts +0 -2
  556. package/src/css/primitives/textInput/rules.ts +0 -224
  557. package/src/css/primitives/textInput/textInput.style.ts +0 -167
  558. package/src/css/primitives/textInput/textInput.ts +0 -8
  559. package/src/css/primitives/textInput/types.ts +0 -11
  560. package/src/css/primitives/token/rules.ts +0 -45
  561. package/src/css/primitives/token/token.style.ts +0 -49
  562. package/src/css/primitives/tooltip/index.ts +0 -1
  563. package/src/css/primitives/tooltip/rules.ts +0 -19
  564. package/src/css/primitives/tooltip/tooltip.style.ts +0 -21
  565. package/src/css/primitives/tooltip/tooltip.ts +0 -9
  566. package/src/css/responsiveRules.ts +0 -25
  567. package/src/css/scopeClassName.ts +0 -6
  568. package/src/css/system.style.ts +0 -158
  569. package/src/css/types.ts +0 -850
  570. package/src/css/util.ts +0 -27
  571. package/src/css/utils/srOnly/srOnly.style.ts +0 -14
  572. package/src/css/utils/srOnly/srOnly.ts +0 -5
  573. package/src/css/varNames.ts +0 -496
  574. package/src/css/vars.ts +0 -465
  575. package/src/theme/_constants.ts +0 -26
  576. package/src/theme/_types.ts +0 -41
  577. package/src/theme/palette/constants.ts +0 -13
  578. package/src/theme/palette/index.ts +0 -2
  579. package/src/theme/palette/types.ts +0 -4
  580. package/src/theme/types.ts +0 -32
  581. package/src/theme/v0/color/_generic.ts +0 -35
  582. package/src/theme/v0/color/color.ts +0 -40
  583. package/src/theme/v0/color/input.ts +0 -34
  584. package/src/theme/v0/color/spot.ts +0 -13
  585. package/src/theme/v0/font.ts +0 -53
  586. package/src/theme/v0/index.ts +0 -10
  587. package/src/theme/v0/theme.ts +0 -72
  588. package/src/theme/v2/avatar.ts +0 -14
  589. package/src/theme/v2/index.ts +0 -4
  590. package/src/theme/v2/input.ts +0 -33
  591. package/src/theme/v2/theme.ts +0 -49
  592. package/src/theme/v3/buildTheme_v3.test.ts +0 -40
  593. package/src/theme/v3/buildTheme_v3.ts +0 -29
  594. package/src/theme/v3/color/buildColor_v3.ts +0 -198
  595. package/src/theme/v3/color/card.ts +0 -121
  596. package/src/theme/v3/color/color.ts +0 -98
  597. package/src/theme/v3/color/element.ts +0 -19
  598. package/src/theme/v3/color/index.ts +0 -7
  599. package/src/theme/v3/color/parseColor.test.ts +0 -79
  600. package/src/theme/v3/color/parseColor.ts +0 -167
  601. package/src/theme/v3/color/renderColor.test.ts +0 -19
  602. package/src/theme/v3/color/renderColor.ts +0 -33
  603. package/src/theme/v3/color/token.ts +0 -17
  604. package/src/theme/v3/color/tokens.ts +0 -5
  605. package/src/theme/v3/defaults.ts +0 -202
  606. package/src/theme/v3/index.ts +0 -6
  607. package/src/theme/v3/merge.ts +0 -22
  608. package/src/theme/v3/resolveTokens.ts +0 -204
  609. package/src/theme/v3/tokens.ts +0 -16
  610. package/src/theme/v3/types.ts +0 -45
  611. package/src/theme/versioning/themeColor_v3_v2.ts +0 -206
  612. package/src/theme/versioning/v3_v2.ts +0 -108
  613. package/src/ui/StyleTags.tsx +0 -24
  614. package/src/ui/_compat/index.ts +0 -9
  615. package/src/ui/_compat/styles/_responsive.ts +0 -19
  616. package/src/ui/_compat/styles/index.ts +0 -1
  617. package/src/ui/_compat/theme/theme.test.tsx +0 -73
  618. package/src/ui/_compat/theme/themeColorProvider.tsx +0 -30
  619. package/src/ui/_compat/theme/themeContext.ts +0 -10
  620. package/src/ui/_compat/theme/themeProvider.tsx +0 -74
  621. package/src/ui/_compat/types.ts +0 -274
  622. package/src/ui/components/autocomplete/__workshop__/async.tsx +0 -156
  623. package/src/ui/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -131
  624. package/src/ui/components/autocomplete/__workshop__/custom.tsx +0 -90
  625. package/src/ui/components/autocomplete/__workshop__/example.tsx +0 -80
  626. package/src/ui/components/autocomplete/__workshop__/fullscreen.tsx +0 -293
  627. package/src/ui/components/autocomplete/autocomplete.tsx +0 -722
  628. package/src/ui/components/autocomplete/autocompleteOption.tsx +0 -45
  629. package/src/ui/components/autocomplete/types.ts +0 -108
  630. package/src/ui/components/breadcrumbs/breadcrumbs.tsx +0 -127
  631. package/src/ui/components/breadcrumbs/index.ts +0 -1
  632. package/src/ui/components/dialog/__workshop__/nested.tsx +0 -72
  633. package/src/ui/components/dialog/__workshop__/onScroll.tsx +0 -39
  634. package/src/ui/components/dialog/__workshop__/position.tsx +0 -30
  635. package/src/ui/components/dialog/__workshop__/props.tsx +0 -77
  636. package/src/ui/components/dialog/dialog.tsx +0 -432
  637. package/src/ui/components/dialog/dialogProvider.tsx +0 -35
  638. package/src/ui/components/hotkeys/hotkeys.tsx +0 -54
  639. package/src/ui/components/menu/__workshop__/menuButton.tsx +0 -80
  640. package/src/ui/components/menu/__workshop__/tones.tsx +0 -25
  641. package/src/ui/components/menu/menu.test.tsx +0 -128
  642. package/src/ui/components/menu/menu.tsx +0 -200
  643. package/src/ui/components/menu/menuButton.tsx +0 -275
  644. package/src/ui/components/menu/menuContext.ts +0 -31
  645. package/src/ui/components/menu/menuDivider.tsx +0 -22
  646. package/src/ui/components/menu/menuGroup.tsx +0 -228
  647. package/src/ui/components/menu/menuItem.tsx +0 -180
  648. package/src/ui/components/menu/useMenuController.ts +0 -241
  649. package/src/ui/components/skeleton/__workshop__/delay.tsx +0 -70
  650. package/src/ui/components/skeleton/__workshop__/skeleton.tsx +0 -64
  651. package/src/ui/components/skeleton/skeleton.tsx +0 -53
  652. package/src/ui/components/skeleton/textSkeleton.tsx +0 -132
  653. package/src/ui/components/tab/tab.tsx +0 -105
  654. package/src/ui/components/tab/tabList.tsx +0 -74
  655. package/src/ui/components/tab/tabPanel.tsx +0 -40
  656. package/src/ui/components/toast/__workshop__/toast.tsx +0 -26
  657. package/src/ui/components/toast/toast.tsx +0 -211
  658. package/src/ui/components/toast/toastLayer.tsx +0 -38
  659. package/src/ui/components/toast/types.ts +0 -28
  660. package/src/ui/components/tree/tree.tsx +0 -244
  661. package/src/ui/components/tree/treeGroup.tsx +0 -30
  662. package/src/ui/components/tree/treeItem.tsx +0 -220
  663. package/src/ui/components/tree/types.ts +0 -25
  664. package/src/ui/constants.ts +0 -85
  665. package/src/ui/helpers/index.ts +0 -5
  666. package/src/ui/helpers/props.ts +0 -10
  667. package/src/ui/hooks/useArrayProp.ts +0 -29
  668. package/src/ui/hooks/useClickOutside.test.tsx +0 -482
  669. package/src/ui/hooks/useForwardedRef.ts +0 -19
  670. package/src/ui/hooks/useMatchMedia.ts +0 -28
  671. package/src/ui/hooks/useMediaIndex/useMediaIndex.test.tsx +0 -36
  672. package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -102
  673. package/src/ui/hooks/usePrefersDark.ts +0 -16
  674. package/src/ui/hooks/usePrefersReducedMotion.ts +0 -16
  675. package/src/ui/index.ts +0 -9
  676. package/src/ui/primitives/_selectable/selectable.tsx +0 -31
  677. package/src/ui/primitives/avatar/__workshop__/asButton.tsx +0 -14
  678. package/src/ui/primitives/avatar/__workshop__/stack.tsx +0 -25
  679. package/src/ui/primitives/avatar/__workshop__/withinButton.tsx +0 -63
  680. package/src/ui/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -72
  681. package/src/ui/primitives/avatar/avatar.tsx +0 -158
  682. package/src/ui/primitives/avatar/avatarCounter.tsx +0 -62
  683. package/src/ui/primitives/avatar/avatarStack.tsx +0 -82
  684. package/src/ui/primitives/badge/__workshop__/props.tsx +0 -30
  685. package/src/ui/primitives/badge/__workshop__/tones.tsx +0 -21
  686. package/src/ui/primitives/badge/badge.tsx +0 -64
  687. package/src/ui/primitives/box/__workshop__/props.tsx +0 -20
  688. package/src/ui/primitives/box/box.tsx +0 -162
  689. package/src/ui/primitives/button/__workshop__/custom.tsx +0 -50
  690. package/src/ui/primitives/button/__workshop__/props.tsx +0 -58
  691. package/src/ui/primitives/button/__workshop__/stacked.tsx +0 -59
  692. package/src/ui/primitives/button/button.tsx +0 -207
  693. package/src/ui/primitives/button/index.ts +0 -1
  694. package/src/ui/primitives/card/__workshop__/allTones.tsx +0 -27
  695. package/src/ui/primitives/card/__workshop__/asButton.tsx +0 -107
  696. package/src/ui/primitives/card/__workshop__/props.tsx +0 -55
  697. package/src/ui/primitives/card/__workshop__/selected.tsx +0 -93
  698. package/src/ui/primitives/card/card.tsx +0 -118
  699. package/src/ui/primitives/card/cardContext.ts +0 -10
  700. package/src/ui/primitives/card/cardProvider.tsx +0 -19
  701. package/src/ui/primitives/card/index.ts +0 -4
  702. package/src/ui/primitives/card/types.ts +0 -27
  703. package/src/ui/primitives/card/useCard.ts +0 -7
  704. package/src/ui/primitives/checkbox/checkbox.tsx +0 -74
  705. package/src/ui/primitives/checkbox/index.ts +0 -1
  706. package/src/ui/primitives/code/__workshop__/props.tsx +0 -21
  707. package/src/ui/primitives/code/code.tsx +0 -49
  708. package/src/ui/primitives/code/refractor.tsx +0 -20
  709. package/src/ui/primitives/container/__workshop__/example.tsx +0 -20
  710. package/src/ui/primitives/container/container.tsx +0 -35
  711. package/src/ui/primitives/container/index.ts +0 -2
  712. package/src/ui/primitives/flex/__workshop__/example.tsx +0 -34
  713. package/src/ui/primitives/flex/__workshop__/gap.tsx +0 -25
  714. package/src/ui/primitives/flex/flex.tsx +0 -29
  715. package/src/ui/primitives/grid/grid.tsx +0 -30
  716. package/src/ui/primitives/heading/__workshop__/plain.tsx +0 -32
  717. package/src/ui/primitives/heading/heading.tsx +0 -62
  718. package/src/ui/primitives/inline/__workshop__/plain.tsx +0 -27
  719. package/src/ui/primitives/inline/inline.tsx +0 -50
  720. package/src/ui/primitives/kbd/kbd.tsx +0 -55
  721. package/src/ui/primitives/label/__workshop__/opticalAlignment.tsx +0 -54
  722. package/src/ui/primitives/label/__workshop__/plain.tsx +0 -37
  723. package/src/ui/primitives/label/label.tsx +0 -67
  724. package/src/ui/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
  725. package/src/ui/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  726. package/src/ui/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
  727. package/src/ui/primitives/popover/__workshop__/PlainStory.tsx +0 -71
  728. package/src/ui/primitives/popover/__workshop__/RecursiveStory.tsx +0 -70
  729. package/src/ui/primitives/popover/__workshop__/SidePanelStory.tsx +0 -93
  730. package/src/ui/primitives/popover/__workshop__/TestStory.tsx +0 -98
  731. package/src/ui/primitives/popover/helpers.ts +0 -32
  732. package/src/ui/primitives/popover/popover.tsx +0 -422
  733. package/src/ui/primitives/popover/popoverCard.tsx +0 -161
  734. package/src/ui/primitives/radio/index.ts +0 -1
  735. package/src/ui/primitives/radio/radio.tsx +0 -49
  736. package/src/ui/primitives/select/__workshop__/plain.tsx +0 -30
  737. package/src/ui/primitives/select/select.tsx +0 -85
  738. package/src/ui/primitives/spinner/__workshop__/Props.tsx +0 -16
  739. package/src/ui/primitives/spinner/animatedSpinnerIcon.tsx +0 -16
  740. package/src/ui/primitives/spinner/index.ts +0 -1
  741. package/src/ui/primitives/spinner/spinner.tsx +0 -33
  742. package/src/ui/primitives/stack/__workshop__/plain.tsx +0 -32
  743. package/src/ui/primitives/stack/index.ts +0 -1
  744. package/src/ui/primitives/stack/stack.tsx +0 -45
  745. package/src/ui/primitives/switch/index.ts +0 -1
  746. package/src/ui/primitives/switch/switch.tsx +0 -75
  747. package/src/ui/primitives/text/__workshop__/colored.tsx +0 -23
  748. package/src/ui/primitives/text/__workshop__/example.tsx +0 -39
  749. package/src/ui/primitives/text/text.tsx +0 -64
  750. package/src/ui/primitives/textArea/__workshop__/plain.tsx +0 -50
  751. package/src/ui/primitives/textArea/textArea.tsx +0 -71
  752. package/src/ui/primitives/textInput/__workshop__/plain.tsx +0 -104
  753. package/src/ui/primitives/textInput/__workshop__/typed.tsx +0 -23
  754. package/src/ui/primitives/textInput/textInput.tsx +0 -286
  755. package/src/ui/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
  756. package/src/ui/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
  757. package/src/ui/primitives/tooltip/__workshop__/props.tsx +0 -111
  758. package/src/ui/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
  759. package/src/ui/primitives/tooltip/tooltip.test.tsx +0 -453
  760. package/src/ui/primitives/tooltip/tooltip.tsx +0 -466
  761. package/src/ui/primitives/tooltip/tooltipCard.tsx +0 -115
  762. package/src/ui/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupProvider.tsx +0 -55
  763. package/src/ui/primitives/types.ts +0 -166
  764. package/src/ui/types/avatar.ts +0 -19
  765. package/src/ui/types/box.ts +0 -22
  766. package/src/ui/types/button.ts +0 -24
  767. package/src/ui/types/flex.ts +0 -27
  768. package/src/ui/types/grid.ts +0 -17
  769. package/src/ui/types/gridItem.ts +0 -32
  770. package/src/ui/types/index.ts +0 -15
  771. package/src/ui/types/props.ts +0 -18
  772. package/src/ui/types/radius.ts +0 -7
  773. package/src/ui/types/selectable.ts +0 -7
  774. package/src/ui/types/text.ts +0 -7
  775. package/src/ui/utils/arrow/arrow.tsx +0 -59
  776. package/src/ui/utils/boundaryElement/boundaryElementProvider.tsx +0 -24
  777. package/src/ui/utils/conditionalWrapper/conditionalWrapper.tsx +0 -23
  778. package/src/ui/utils/elementQuery/elementQuery.tsx +0 -53
  779. package/src/ui/utils/errorBoundary.tsx +0 -48
  780. package/src/ui/utils/layer/layer.tsx +0 -112
  781. package/src/ui/utils/layer/layerProvider.tsx +0 -110
  782. package/src/ui/utils/portal/portal.ts +0 -46
  783. package/src/ui/utils/portal/portalProvider.tsx +0 -79
  784. package/src/ui/utils/srOnly/index.ts +0 -1
  785. package/src/ui/utils/srOnly/srOnly.tsx +0 -35
  786. package/src/ui/utils/virtualList/virtualList.tsx +0 -189
  787. /package/src/{ui → core}/components/autocomplete/__mocks__/apiStore.ts +0 -0
  788. /package/src/{ui → core}/components/autocomplete/__mocks__/countries.ts +0 -0
  789. /package/src/{ui → core}/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -0
  790. /package/src/{ui → core}/components/autocomplete/__workshop__/index.ts +0 -0
  791. /package/src/{ui → core}/components/autocomplete/__workshop__/types.ts +0 -0
  792. /package/src/{ui → core}/components/autocomplete/autocompleteReducer.ts +0 -0
  793. /package/src/{ui → core}/components/autocomplete/constants.ts +0 -0
  794. /package/src/{ui → core}/components/autocomplete/index.ts +0 -0
  795. /package/src/{ui → core}/components/breadcrumbs/__workshop__/example.tsx +0 -0
  796. /package/src/{ui → core}/components/breadcrumbs/__workshop__/index.ts +0 -0
  797. /package/src/{css → core}/components/breadcrumbs/index.ts +0 -0
  798. /package/src/{ui → core}/components/dialog/__workshop__/activate.tsx +0 -0
  799. /package/src/{ui → core}/components/dialog/__workshop__/autoFocus.tsx +0 -0
  800. /package/src/{ui → core}/components/dialog/__workshop__/index.ts +0 -0
  801. /package/src/{ui → core}/components/dialog/__workshop__/layering.tsx +0 -0
  802. /package/src/{ui → core}/components/dialog/__workshop__/panes.tsx +0 -0
  803. /package/src/{ui → core}/components/dialog/__workshop__/provider.tsx +0 -0
  804. /package/src/{ui → core}/components/dialog/__workshop__/wrapped.tsx +0 -0
  805. /package/src/{ui → core}/components/dialog/dialogContext.ts +0 -0
  806. /package/src/{ui → core}/components/dialog/index.ts +0 -0
  807. /package/src/{ui → core}/components/dialog/useDialog.ts +0 -0
  808. /package/src/{ui → core}/components/hotkeys/__workshop__/index.ts +0 -0
  809. /package/src/{ui → core}/components/hotkeys/__workshop__/plain.tsx +0 -0
  810. /package/src/{ui → core}/components/hotkeys/index.ts +0 -0
  811. /package/src/{ui → core}/components/index.ts +0 -0
  812. /package/src/{ui → core}/components/menu/__workshop__/asComponent.tsx +0 -0
  813. /package/src/{ui → core}/components/menu/__workshop__/avatarMenu.tsx +0 -0
  814. /package/src/{ui → core}/components/menu/__workshop__/closableMenuButton.tsx +0 -0
  815. /package/src/{ui → core}/components/menu/__workshop__/constrainedInBoundary.tsx +0 -0
  816. /package/src/{ui → core}/components/menu/__workshop__/customMenuItem.tsx +0 -0
  817. /package/src/{ui → core}/components/menu/__workshop__/customSelectedState.tsx +0 -0
  818. /package/src/{ui → core}/components/menu/__workshop__/disableFocusOnClose.tsx +0 -0
  819. /package/src/{ui → core}/components/menu/__workshop__/groups.tsx +0 -0
  820. /package/src/{ui → core}/components/menu/__workshop__/index.ts +0 -0
  821. /package/src/{ui → core}/components/menu/__workshop__/menuGroupRight.tsx +0 -0
  822. /package/src/{ui → core}/components/menu/__workshop__/nestedMenu.tsx +0 -0
  823. /package/src/{ui → core}/components/menu/__workshop__/onCloseMenuButton.tsx +0 -0
  824. /package/src/{ui → core}/components/menu/__workshop__/selectedItem.tsx +0 -0
  825. /package/src/{ui → core}/components/menu/__workshop__/shouldFocus.tsx +0 -0
  826. /package/src/{ui → core}/components/menu/__workshop__/withoutArrow.tsx +0 -0
  827. /package/src/{ui → core}/components/menu/helpers.ts +0 -0
  828. /package/src/{ui → core}/components/menu/index.ts +0 -0
  829. /package/src/{ui → core}/components/menu/useMenu.ts +0 -0
  830. /package/src/{ui → core}/components/skeleton/__workshop__/index.ts +0 -0
  831. /package/src/{ui → core}/components/skeleton/index.ts +0 -0
  832. /package/src/{ui → core}/components/tab/__workshop__/example.tsx +0 -0
  833. /package/src/{ui → core}/components/tab/__workshop__/index.ts +0 -0
  834. /package/src/{ui → core}/components/tab/index.ts +0 -0
  835. /package/src/{ui → core}/components/toast/__workshop__/hook.tsx +0 -0
  836. /package/src/{ui → core}/components/toast/__workshop__/index.ts +0 -0
  837. /package/src/{ui → core}/components/toast/index.ts +0 -0
  838. /package/src/{ui → core}/components/toast/toast.test.tsx +0 -0
  839. /package/src/{ui → core}/components/toast/toastContext.ts +0 -0
  840. /package/src/{ui → core}/components/toast/toastProvider.tsx +0 -0
  841. /package/src/{ui → core}/components/toast/toastState.ts +0 -0
  842. /package/src/{ui → core}/components/toast/useToast.ts +0 -0
  843. /package/src/{ui → core}/components/tree/__workshop__/basic.perf.ts +0 -0
  844. /package/src/{ui → core}/components/tree/__workshop__/basic.tsx +0 -0
  845. /package/src/{ui → core}/components/tree/__workshop__/index.ts +0 -0
  846. /package/src/{ui → core}/components/tree/__workshop__/tabFromElement.tsx +0 -0
  847. /package/src/{ui → core}/components/tree/helpers.ts +0 -0
  848. /package/src/{ui → core}/components/tree/index.ts +0 -0
  849. /package/src/{ui → core}/components/tree/treeContext.ts +0 -0
  850. /package/src/{ui → core}/components/tree/useTree.ts +0 -0
  851. /package/src/{ui → core}/global.ts +0 -0
  852. /package/src/{ui → core}/helpers/animation.ts +0 -0
  853. /package/src/{ui → core}/helpers/element.ts +0 -0
  854. /package/src/{ui → core}/helpers/focus.ts +0 -0
  855. /package/src/{ui → core}/helpers/scroll.ts +0 -0
  856. /package/src/{ui → core}/hooks/index.ts +0 -0
  857. /package/src/{ui → core}/hooks/useClickOutside.ts +0 -0
  858. /package/src/{ui → core}/hooks/useClickOutsideEvent.test.tsx +0 -0
  859. /package/src/{ui → core}/hooks/useClickOutsideEvent.ts +0 -0
  860. /package/src/{ui → core}/hooks/useCustomValidity.ts +0 -0
  861. /package/src/{ui → core}/hooks/useDelayed.test.ts +0 -0
  862. /package/src/{ui → core}/hooks/useDelayedState.ts +0 -0
  863. /package/src/{ui → core}/hooks/useElementRect/__workshop__/example.tsx +0 -0
  864. /package/src/{ui → core}/hooks/useElementRect/__workshop__/index.ts +0 -0
  865. /package/src/{ui → core}/hooks/useElementRect/index.ts +0 -0
  866. /package/src/{ui → core}/hooks/useElementRect/useElementRect.ts +0 -0
  867. /package/src/{ui → core}/hooks/useElementSize.ts +0 -0
  868. /package/src/{ui → core}/hooks/useGlobalKeyDown.ts +0 -0
  869. /package/src/{ui → core}/hooks/useIsomorphicEffect.ts +0 -0
  870. /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/index.ts +0 -0
  871. /package/src/{ui → core}/hooks/useMediaIndex/__workshop__/test.tsx +0 -0
  872. /package/src/{ui → core}/hooks/useMediaIndex/index.ts +0 -0
  873. /package/src/{ui → core}/hooks/useMounted.ts +0 -0
  874. /package/src/{ui → core}/hooks/usePrefersDark.hydration.test.tsx +0 -0
  875. /package/src/{ui → core}/hooks/usePrefersDark.test.tsx +0 -0
  876. /package/src/{ui → core}/hooks/usePrefersReducedMotion.hydration.test.tsx +0 -0
  877. /package/src/{ui → core}/hooks/usePrefersReducedMotion.test.tsx +0 -0
  878. /package/src/{ui → core}/lib/createGlobalScopedContext.ts +0 -0
  879. /package/src/{ui → core}/lib/globalScope.ts +0 -0
  880. /package/src/{ui → core}/lib/isRecord.ts +0 -0
  881. /package/src/{ui → core}/middleware/origin.ts +0 -0
  882. /package/src/{ui → core}/observers/elementSizeObserver.ts +0 -0
  883. /package/src/{ui → core}/observers/index.ts +0 -0
  884. /package/src/{ui → core}/observers/resizeObserver.ts +0 -0
  885. /package/src/{ui → core}/primitives/_selectable/index.ts +0 -0
  886. /package/src/{ui → core}/primitives/avatar/__workshop__/index.ts +0 -0
  887. /package/src/{ui → core}/primitives/avatar/index.ts +0 -0
  888. /package/src/{ui → core}/primitives/avatar/types.ts +0 -0
  889. /package/src/{ui → core}/primitives/badge/__workshop__/index.ts +0 -0
  890. /package/src/{ui → core}/primitives/badge/badge.test.tsx +0 -0
  891. /package/src/{ui → core}/primitives/badge/index.ts +0 -0
  892. /package/src/{ui → core}/primitives/badge/types.ts +0 -0
  893. /package/src/{ui → core}/primitives/box/__workshop__/index.ts +0 -0
  894. /package/src/{ui → core}/primitives/box/__workshop__/responsive.tsx +0 -0
  895. /package/src/{ui → core}/primitives/box/index.ts +0 -0
  896. /package/src/{ui → core}/primitives/button/__workshop__/customIcons.tsx +0 -0
  897. /package/src/{ui → core}/primitives/button/__workshop__/disabled.tsx +0 -0
  898. /package/src/{ui → core}/primitives/button/__workshop__/index.ts +0 -0
  899. /package/src/{ui → core}/primitives/button/__workshop__/mixedChildren.tsx +0 -0
  900. /package/src/{ui → core}/primitives/button/__workshop__/sanityUploadButton.tsx +0 -0
  901. /package/src/{ui → core}/primitives/button/__workshop__/styled1.tsx +0 -0
  902. /package/src/{ui → core}/primitives/button/__workshop__/styled2.tsx +0 -0
  903. /package/src/{ui → core}/primitives/button/__workshop__/uploadButton.tsx +0 -0
  904. /package/src/{ui → core}/primitives/button/button.test.tsx +0 -0
  905. /package/src/{css → core}/primitives/button/index.ts +0 -0
  906. /package/src/{ui → core}/primitives/card/__workshop__/asComponent.tsx +0 -0
  907. /package/src/{ui → core}/primitives/card/__workshop__/checkered.tsx +0 -0
  908. /package/src/{ui → core}/primitives/card/__workshop__/index.ts +0 -0
  909. /package/src/{ui → core}/primitives/card/__workshop__/interactive.tsx +0 -0
  910. /package/src/{ui → core}/primitives/card/__workshop__/listNavigation.tsx +0 -0
  911. /package/src/{ui → core}/primitives/card/__workshop__/styled.tsx +0 -0
  912. /package/src/{css → core}/primitives/card/index.ts +0 -0
  913. /package/src/{ui → core}/primitives/checkbox/__workshop__/example.tsx +0 -0
  914. /package/src/{ui → core}/primitives/checkbox/__workshop__/index.ts +0 -0
  915. /package/src/{ui → core}/primitives/checkbox/__workshop__/props.tsx +0 -0
  916. /package/src/{ui → core}/primitives/checkbox/__workshop__/readOnly.tsx +0 -0
  917. /package/src/{ui → core}/primitives/checkbox/__workshop__/tones.tsx +0 -0
  918. /package/src/{css → core}/primitives/checkbox/index.ts +0 -0
  919. /package/src/{ui → core}/primitives/code/__workshop__/index.ts +0 -0
  920. /package/src/{ui → core}/primitives/code/__workshop__/opticalAlignment.tsx +0 -0
  921. /package/src/{ui → core}/primitives/code/index.ts +0 -0
  922. /package/src/{ui → core}/primitives/container/__workshop__/index.ts +0 -0
  923. /package/src/{css → core}/primitives/container/index.ts +0 -0
  924. /package/src/{ui → core}/primitives/container/types.ts +0 -0
  925. /package/src/{ui → core}/primitives/flex/__workshop__/index.ts +0 -0
  926. /package/src/{ui → core}/primitives/flex/index.ts +0 -0
  927. /package/src/{ui → core}/primitives/grid/__workshop__/index.ts +0 -0
  928. /package/src/{ui → core}/primitives/grid/__workshop__/responsive.tsx +0 -0
  929. /package/src/{ui → core}/primitives/grid/index.ts +0 -0
  930. /package/src/{ui → core}/primitives/heading/__workshop__/index.ts +0 -0
  931. /package/src/{ui → core}/primitives/heading/__workshop__/opticalAlignment.tsx +0 -0
  932. /package/src/{ui → core}/primitives/heading/index.ts +0 -0
  933. /package/src/{ui → core}/primitives/index.ts +0 -0
  934. /package/src/{ui → core}/primitives/inline/__workshop__/index.ts +0 -0
  935. /package/src/{ui → core}/primitives/inline/index.ts +0 -0
  936. /package/src/{ui → core}/primitives/inline/types.ts +0 -0
  937. /package/src/{ui → core}/primitives/kbd/__workshop__/index.ts +0 -0
  938. /package/src/{ui → core}/primitives/kbd/__workshop__/plain.tsx +0 -0
  939. /package/src/{ui → core}/primitives/kbd/index.ts +0 -0
  940. /package/src/{ui → core}/primitives/label/__workshop__/index.ts +0 -0
  941. /package/src/{ui → core}/primitives/label/index.ts +0 -0
  942. /package/src/{ui → core}/primitives/popover/__workshop__/MarginsStory.tsx +0 -0
  943. /package/src/{ui → core}/primitives/popover/__workshop__/index.ts +0 -0
  944. /package/src/{ui → core}/primitives/popover/constants.ts +0 -0
  945. /package/src/{ui → core}/primitives/popover/floating-ui/size.ts +0 -0
  946. /package/src/{ui → core}/primitives/popover/index.ts +0 -0
  947. /package/src/{ui → core}/primitives/popover/types.ts +0 -0
  948. /package/src/{ui → core}/primitives/radio/__workshop__/example.tsx +0 -0
  949. /package/src/{ui → core}/primitives/radio/__workshop__/index.ts +0 -0
  950. /package/src/{ui → core}/primitives/radio/__workshop__/plain.tsx +0 -0
  951. /package/src/{css → core}/primitives/radio/index.ts +0 -0
  952. /package/src/{ui → core}/primitives/select/__workshop__/index.ts +0 -0
  953. /package/src/{ui → core}/primitives/select/__workshop__/readOnly.tsx +0 -0
  954. /package/src/{ui → core}/primitives/select/index.ts +0 -0
  955. /package/src/{ui → core}/primitives/spinner/__workshop__/index.ts +0 -0
  956. /package/src/{css → core}/primitives/spinner/index.ts +0 -0
  957. /package/src/{ui → core}/primitives/stack/__workshop__/index.ts +0 -0
  958. /package/src/{css → core}/primitives/stack/index.ts +0 -0
  959. /package/src/{ui → core}/primitives/switch/__workshop__/example.tsx +0 -0
  960. /package/src/{ui → core}/primitives/switch/__workshop__/index.ts +0 -0
  961. /package/src/{ui → core}/primitives/switch/__workshop__/props.tsx +0 -0
  962. /package/src/{css → core}/primitives/switch/index.ts +0 -0
  963. /package/src/{ui → core}/primitives/text/__workshop__/index.ts +0 -0
  964. /package/src/{ui → core}/primitives/text/__workshop__/opticalAlignment.tsx +0 -0
  965. /package/src/{ui → core}/primitives/text/index.ts +0 -0
  966. /package/src/{ui → core}/primitives/textArea/__workshop__/index.ts +0 -0
  967. /package/src/{ui → core}/primitives/textArea/index.ts +0 -0
  968. /package/src/{ui → core}/primitives/textInput/__workshop__/clearButton.tsx +0 -0
  969. /package/src/{ui → core}/primitives/textInput/__workshop__/customValidity.tsx +0 -0
  970. /package/src/{ui → core}/primitives/textInput/__workshop__/index.ts +0 -0
  971. /package/src/{ui → core}/primitives/textInput/__workshop__/readOnly.tsx +0 -0
  972. /package/src/{ui → core}/primitives/textInput/__workshop__/states.tsx +0 -0
  973. /package/src/{ui → core}/primitives/textInput/__workshop__/tones.tsx +0 -0
  974. /package/src/{ui → core}/primitives/textInput/index.ts +0 -0
  975. /package/src/{ui → core}/primitives/tooltip/__workshop__/index.ts +0 -0
  976. /package/src/{ui → core}/primitives/tooltip/constants.ts +0 -0
  977. /package/src/{ui → core}/primitives/tooltip/index.ts +0 -0
  978. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/index.ts +0 -0
  979. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/tooltipDelayGroupContext.tsx +0 -0
  980. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/types.ts +0 -0
  981. /package/src/{ui → core}/primitives/tooltip/tooltipDelayGroup/useTooltipDelayGroup.ts +0 -0
  982. /package/src/{ui/_compat → core}/theme/index.ts +0 -0
  983. /package/src/{ui/_compat → core}/theme/types.ts +0 -0
  984. /package/src/{ui/_compat → core}/theme/useRootTheme.ts +0 -0
  985. /package/src/{ui/_compat → core}/theme/useTheme.ts +0 -0
  986. /package/src/{ui → core}/types/badge.ts +0 -0
  987. /package/src/{ui → core}/types/card.ts +0 -0
  988. /package/src/{ui → core}/types/dialog.ts +0 -0
  989. /package/src/{ui → core}/types/placement.ts +0 -0
  990. /package/src/{ui → core}/types/popover.ts +0 -0
  991. /package/src/{ui → core}/utils/arrow/cmds.ts +0 -0
  992. /package/src/{ui → core}/utils/arrow/index.ts +0 -0
  993. /package/src/{ui → core}/utils/boundaryElement/__workshop__/index.ts +0 -0
  994. /package/src/{ui → core}/utils/boundaryElement/__workshop__/plain.tsx +0 -0
  995. /package/src/{ui → core}/utils/boundaryElement/boundaryElement.test.tsx +0 -0
  996. /package/src/{ui → core}/utils/boundaryElement/boundaryElementContext.ts +0 -0
  997. /package/src/{ui → core}/utils/boundaryElement/index.ts +0 -0
  998. /package/src/{ui → core}/utils/boundaryElement/types.ts +0 -0
  999. /package/src/{ui → core}/utils/boundaryElement/useBoundaryElement.ts +0 -0
  1000. /package/src/{ui → core}/utils/conditionalWrapper/index.ts +0 -0
  1001. /package/src/{ui → core}/utils/elementQuery/__workshop__/customMedia.tsx +0 -0
  1002. /package/src/{ui → core}/utils/elementQuery/__workshop__/index.ts +0 -0
  1003. /package/src/{ui → core}/utils/elementQuery/helpers.ts +0 -0
  1004. /package/src/{ui → core}/utils/elementQuery/index.ts +0 -0
  1005. /package/src/{ui → core}/utils/getElementRef.ts +0 -0
  1006. /package/src/{ui → core}/utils/index.ts +0 -0
  1007. /package/src/{ui → core}/utils/layer/__workshop__/_debug.tsx +0 -0
  1008. /package/src/{ui → core}/utils/layer/__workshop__/index.ts +0 -0
  1009. /package/src/{ui → core}/utils/layer/__workshop__/multipleRoots.tsx +0 -0
  1010. /package/src/{ui → core}/utils/layer/__workshop__/nested.tsx +0 -0
  1011. /package/src/{ui → core}/utils/layer/__workshop__/responsiveZOffset.tsx +0 -0
  1012. /package/src/{ui → core}/utils/layer/getLayerContext.test.ts +0 -0
  1013. /package/src/{ui → core}/utils/layer/getLayerContext.ts +0 -0
  1014. /package/src/{ui → core}/utils/layer/index.ts +0 -0
  1015. /package/src/{ui → core}/utils/layer/layer.test.tsx +0 -0
  1016. /package/src/{ui → core}/utils/layer/layerContext.ts +0 -0
  1017. /package/src/{ui → core}/utils/layer/types.ts +0 -0
  1018. /package/src/{ui → core}/utils/layer/useLayer.ts +0 -0
  1019. /package/src/{ui → core}/utils/portal/__workshop__/index.ts +0 -0
  1020. /package/src/{ui → core}/utils/portal/__workshop__/named.tsx +0 -0
  1021. /package/src/{ui → core}/utils/portal/index.ts +0 -0
  1022. /package/src/{ui → core}/utils/portal/portal.test.tsx +0 -0
  1023. /package/src/{ui → core}/utils/portal/portalContext.ts +0 -0
  1024. /package/src/{ui → core}/utils/portal/types.ts +0 -0
  1025. /package/src/{ui → core}/utils/portal/usePortal.ts +0 -0
  1026. /package/src/{ui → core}/utils/spanWithTextOverflow.tsx +0 -0
  1027. /package/src/{css → core}/utils/srOnly/index.ts +0 -0
  1028. /package/src/{ui → core}/utils/virtualList/__workshop__/changingProps.tsx +0 -0
  1029. /package/src/{ui → core}/utils/virtualList/__workshop__/elementScroll.tsx +0 -0
  1030. /package/src/{ui → core}/utils/virtualList/__workshop__/index.ts +0 -0
  1031. /package/src/{ui → core}/utils/virtualList/__workshop__/infiniteList.tsx +0 -0
  1032. /package/src/{ui → core}/utils/virtualList/__workshop__/windowScrolll.tsx +0 -0
  1033. /package/src/{ui → core}/utils/virtualList/index.ts +0 -0
  1034. /package/src/theme/{v2 → system}/color/_constants.ts +0 -0
  1035. /package/src/theme/{v2 → system}/color/_helpers.ts +0 -0
  1036. /package/src/theme/{v2 → system}/color/_system.ts +0 -0
  1037. /package/src/theme/{v2 → system}/color/avatar.ts +0 -0
  1038. /package/src/theme/{v2 → system}/color/badge.ts +0 -0
  1039. /package/src/theme/{v2 → system}/color/button.ts +0 -0
  1040. /package/src/theme/{v2 → system}/color/color.ts +0 -0
  1041. /package/src/theme/{v2 → system}/color/index.ts +0 -0
  1042. /package/src/theme/{v2 → system}/color/input.ts +0 -0
  1043. /package/src/theme/{v2 → system}/color/kbd.ts +0 -0
  1044. /package/src/theme/{v2 → system}/color/selectable.ts +0 -0
  1045. /package/src/theme/{v2 → system}/color/shadow.ts +0 -0
  1046. /package/src/theme/{v2 → system}/color/state.ts +0 -0
  1047. /package/src/theme/{v2 → system}/color/syntax.ts +0 -0
  1048. /package/src/theme/{v0 → system}/css.ts +0 -0
  1049. /package/src/theme/{v0 → system}/focusRing.ts +0 -0
  1050. /package/src/theme/{v0 → system}/layer.ts +0 -0
  1051. /package/src/theme/{v0 → system}/shadow.ts +0 -0
  1052. /package/src/theme/{v0 → system}/styles.ts +0 -0
  1053. /package/src/theme/{v0 → system/v0}/avatar.ts +0 -0
  1054. /package/src/theme/{v0 → system/v0}/color/_system.ts +0 -0
  1055. /package/src/theme/{v0 → system/v0}/color/base.ts +0 -0
  1056. /package/src/theme/{v0 → system/v0}/color/button.ts +0 -0
  1057. /package/src/theme/{v0 → system/v0}/color/card.ts +0 -0
  1058. /package/src/theme/{v0 → system/v0}/color/index.ts +0 -0
  1059. /package/src/theme/{v0 → system/v0}/color/muted.ts +0 -0
  1060. /package/src/theme/{v0 → system/v0}/color/selectable.ts +0 -0
  1061. /package/src/theme/{v0 → system/v0}/color/solid.ts +0 -0
  1062. /package/src/theme/{v0 → system/v0}/input.ts +0 -0
package/dist/index.js CHANGED
@@ -1,11 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), css = require("@sanity/ui/css"), jsxRuntime = require("react/jsx-runtime"), icons = require("@sanity/icons"), react = require("react"), reactCompilerRuntime = require("react-compiler-runtime"), framerMotion = require("framer-motion"), theme = require("@sanity/ui/theme");
4
- function _responsive(media, values, callback) {
5
- return (values?.map(callback) || []).map((statement, mediaIndex) => mediaIndex === 0 ? statement : {
6
- [`@media screen and (min-width: ${media[mediaIndex - 1]}px)`]: statement
7
- });
8
- }
3
+ var _visualEditing = require("./_chunks-cjs/_visual-editing.js"), jsxRuntime = require("react/jsx-runtime"), icons = require("@sanity/icons"), react = require("react"), styledComponents = require("styled-components"), reactCompilerRuntime = require("react-compiler-runtime"), theme = require("@sanity/ui/theme"), framerMotion = require("framer-motion");
9
4
  function _raf(fn) {
10
5
  const frameId = requestAnimationFrame(fn);
11
6
  return () => {
@@ -133,6 +128,24 @@ class ErrorBoundary extends react.Component {
133
128
  return this.props.children;
134
129
  }
135
130
  }
131
+ const StyledAutocomplete = styledComponents.styled.div.withConfig({
132
+ displayName: "StyledAutocomplete",
133
+ componentId: "sc-1igauft-0"
134
+ })`line-height:0;`, ListBox = styledComponents.styled(_visualEditing.Box).withConfig({
135
+ displayName: "ListBox",
136
+ componentId: "sc-1igauft-1"
137
+ })`& > ul{list-style:none;padding:0;margin:0;}`, rotate = styledComponents.keyframes`
138
+ from {
139
+ transform: rotate(0deg);
140
+ }
141
+
142
+ to {
143
+ transform: rotate(360deg);
144
+ }
145
+ `, AnimatedSpinnerIcon = styledComponents.styled(icons.SpinnerIcon).withConfig({
146
+ displayName: "AnimatedSpinnerIcon",
147
+ componentId: "sc-1igauft-2"
148
+ })`animation:${rotate} 500ms linear infinite;`;
136
149
  function AutocompleteOption(props) {
137
150
  const $ = reactCompilerRuntime.c(11), {
138
151
  children,
@@ -240,7 +253,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
240
253
  value
241
254
  } = state, defaultRenderOption = react.useCallback(({
242
255
  value: value_0
243
- }) => /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { as: "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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 = 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);
256
+ }) => /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { "data-as": "button", padding: paddingProp, radius: 2, tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.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 = 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);
244
257
  react.useImperativeHandle(forwardedRef, () => inputElementRef.current);
245
258
  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) => {
246
259
  setTimeout(() => {
@@ -368,9 +381,9 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
368
381
  };
369
382
  }, [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) => {
370
383
  dispatchOpen(), openButtonProps.onClick && openButtonProps.onClick(event_4), _raf(() => inputElementRef.current?.focus());
371
- }, [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) => {
384
+ }, [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, 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 && 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) => {
372
385
  event_5.key === "Tab" && listFocused && inputElementRef.current?.focus();
373
- }, [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) => {
386
+ }, [listFocused]), content2 = react.useMemo(() => filteredOptions.length === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(ListBox, { "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) => {
374
387
  const active = activeValue !== null ? option_0.value === activeValue : currentOption === option_0;
375
388
  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), {
376
389
  disabled: loading,
@@ -383,46 +396,100 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ["Control", "Shift", "Alt", "Enter", "H
383
396
  inputElement: inputElementRef.current,
384
397
  onMouseEnter: handlePopoverMouseEnter,
385
398
  onMouseLeave: handlePopoverMouseLeave
386
- }, resultsPopoverElementRef) : filteredOptionsLen === 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { arrow: !1, constrainSize: !0, content: content2, fallbackPlacements: AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS, matchReferenceWidth: !0, onMouseEnter: handlePopoverMouseEnter, onMouseLeave: handlePopoverMouseLeave, open: expanded, overflow: "auto", placement: AUTOCOMPLETE_POPOVER_PLACEMENT, portal: !0, radius: 3, ref: resultsPopoverElementRef, referenceElement: inputElementRef.current, ...popover }), [content2, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, renderPopover]);
387
- return (
388
- // eslint-disable-next-line jsx-a11y/no-static-element-interactions
389
- /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
390
- input,
391
- results
392
- ] })
393
- );
399
+ }, 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]);
400
+ return /* @__PURE__ */ jsxRuntime.jsxs(StyledAutocomplete, { "data-ui": "Autocomplete", onBlur: handleRootBlur, onFocus: handleRootFocus, onKeyDown: handleRootKeyDown, ref: rootElementRef, children: [
401
+ input,
402
+ results
403
+ ] });
394
404
  });
395
405
  InnerAutocomplete.displayName = "ForwardRef(Autocomplete)";
396
- const Autocomplete = InnerAutocomplete, Breadcrumbs = react.forwardRef(function(props, ref) {
406
+ const Autocomplete = InnerAutocomplete, StyledBreadcrumbs = styledComponents.styled.ol.withConfig({
407
+ displayName: "StyledBreadcrumbs",
408
+ componentId: "sc-1es8h8q-0"
409
+ })`margin:0;padding:0;display:flex;list-style:none;align-items:center;white-space:nowrap;line-height:0;`, ExpandButton = styledComponents.styled(_visualEditing.Button).withConfig({
410
+ displayName: "ExpandButton",
411
+ componentId: "sc-1es8h8q-1"
412
+ })`appearance:none;margin:-4px;`, Breadcrumbs = react.forwardRef(function(props, ref) {
397
413
  const {
398
414
  children,
399
- className,
400
- expandButton: expandButtonProps,
401
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
402
- gap: _gapProp,
403
- gapX = props.gap ?? props.space ?? 2,
404
- gapY = props.gap ?? props.space ?? 2,
405
415
  maxLength,
406
416
  separator,
407
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
408
- space: _spaceProp,
417
+ space: spaceRaw = 2,
409
418
  ...restProps
410
- } = props, [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
419
+ } = props, space = _visualEditing.useArrayProp(spaceRaw), [open, setOpen] = react.useState(!1), expandElementRef = react.useRef(null), popoverElementRef = react.useRef(null), collapse = react.useCallback(() => setOpen(!1), []), expand = react.useCallback(() => setOpen(!0), []);
411
420
  _visualEditing.useClickOutsideEvent(collapse, () => [expandElementRef.current, popoverElementRef.current]);
412
421
  const rawItems = react.useMemo(() => react.Children.toArray(children).filter(react.isValidElement), [children]), items = react.useMemo(() => {
413
422
  const len = rawItems.length;
414
423
  if (maxLength && len > maxLength) {
415
424
  const beforeLength = Math.ceil(maxLength / 2), afterLength = Math.floor(maxLength / 2);
416
- 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)];
425
+ return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { constrainSize: !0, content: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ol", overflow: "auto", padding: space, space, children: rawItems.slice(beforeLength - 1, len - afterLength) }), open, placement: "top", portal: !0, ref: popoverElementRef, children: /* @__PURE__ */ jsxRuntime.jsx(ExpandButton, { fontSize: 1, mode: "bleed", onClick: open ? collapse : expand, padding: 1, ref: expandElementRef, selected: open, text: "\u2026" }) }, "button"), ...rawItems.slice(len - afterLength)];
417
426
  }
418
427
  return rawItems;
419
- }, [collapse, expand, expandButtonProps, gapY, maxLength, open, rawItems]);
420
- 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: [
421
- itemIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { "aria-hidden": !0, as: "li", children: separator || /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted: !0, children: "/" }) }),
428
+ }, [collapse, expand, maxLength, open, rawItems, space]);
429
+ return /* @__PURE__ */ jsxRuntime.jsx(StyledBreadcrumbs, { "data-ui": "Breadcrumbs", ...restProps, 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", paddingX: space, children: separator || /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted: !0, children: "/" }) }),
422
431
  /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { as: "li", children: item })
423
432
  ] }, itemIndex)) });
424
433
  });
425
434
  Breadcrumbs.displayName = "ForwardRef(Breadcrumbs)";
435
+ function dialogStyle({
436
+ theme: theme$1
437
+ }) {
438
+ const {
439
+ color
440
+ } = theme.getTheme_v2(theme$1);
441
+ return {
442
+ "&:not([hidden])": {
443
+ display: "flex"
444
+ },
445
+ top: 0,
446
+ left: 0,
447
+ right: 0,
448
+ bottom: 0,
449
+ alignItems: "center",
450
+ justifyContent: "center",
451
+ outline: "none",
452
+ background: color.backdrop
453
+ };
454
+ }
455
+ function responsiveDialogPositionStyle(props) {
456
+ const {
457
+ media
458
+ } = theme.getTheme_v2(props.theme);
459
+ return _visualEditing._responsive(media, props.$position, (position) => ({
460
+ "&&": {
461
+ position
462
+ }
463
+ }));
464
+ }
465
+ function animationDialogStyle(props) {
466
+ return props.$animate ? styledComponents.css`
467
+ @keyframes zoomIn {
468
+ from {
469
+ opacity: 0;
470
+ transform: scale(0.95);
471
+ }
472
+ to {
473
+ opacity: 1;
474
+ transform: scale(1);
475
+ }
476
+ }
477
+ @keyframes fadeIn {
478
+ from {
479
+ opacity: 0;
480
+ }
481
+ to {
482
+ opacity: 1;
483
+ }
484
+ }
485
+
486
+ animation: fadeIn 200ms ease-out;
487
+ // Animates the dialog card.
488
+ & > [data-ui='DialogCard'] {
489
+ animation: zoomIn 200ms ease-out;
490
+ }
491
+ ` : styledComponents.css``;
492
+ }
426
493
  const DialogContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/dialog", {
427
494
  version: 0
428
495
  });
@@ -432,8 +499,29 @@ function useDialog() {
432
499
  function isTargetWithinScope(boundaryElement, portalElement, target) {
433
500
  return !boundaryElement || !portalElement ? !0 : _visualEditing.containsOrEqualsElement(boundaryElement, target) || _visualEditing.containsOrEqualsElement(portalElement, target);
434
501
  }
435
- const DialogCard = react.forwardRef(function(props, forwardedRef) {
436
- const $ = reactCompilerRuntime.c(43), {
502
+ const StyledDialog = /* @__PURE__ */ styledComponents.styled(_visualEditing.Layer).withConfig({
503
+ displayName: "StyledDialog",
504
+ componentId: "sc-4n4xb3-0"
505
+ })(_visualEditing.responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styledComponents.styled(_visualEditing.Container).withConfig({
506
+ displayName: "DialogContainer",
507
+ componentId: "sc-4n4xb3-1"
508
+ })`&:not([hidden]){display:flex;}width:100%;height:100%;flex-direction:column;align-items:center;justify-content:center;`, DialogCardRoot = styledComponents.styled(_visualEditing.Card).withConfig({
509
+ displayName: "DialogCardRoot",
510
+ componentId: "sc-4n4xb3-2"
511
+ })`&:not([hidden]){display:flex;}width:100%;min-height:0;max-height:100%;overflow:hidden;overflow:clip;`, DialogLayout = styledComponents.styled(_visualEditing.Flex).withConfig({
512
+ displayName: "DialogLayout",
513
+ componentId: "sc-4n4xb3-3"
514
+ })`flex:1;min-height:0;width:100%;`, DialogHeader = styledComponents.styled(_visualEditing.Box).withConfig({
515
+ displayName: "DialogHeader",
516
+ componentId: "sc-4n4xb3-4"
517
+ })`position:relative;z-index:2;`, DialogContent = styledComponents.styled(_visualEditing.Box).withConfig({
518
+ displayName: "DialogContent",
519
+ componentId: "sc-4n4xb3-5"
520
+ })`position:relative;z-index:1;overflow:auto;outline:none;`, DialogFooter = styledComponents.styled(_visualEditing.Box).withConfig({
521
+ displayName: "DialogFooter",
522
+ componentId: "sc-4n4xb3-6"
523
+ })`position:relative;z-index:3;`, DialogCard = react.forwardRef(function(props, forwardedRef) {
524
+ const $ = reactCompilerRuntime.c(38), {
437
525
  __unstable_autoFocus: autoFocus,
438
526
  __unstable_hideCloseButton: hideCloseButton,
439
527
  children,
@@ -446,73 +534,65 @@ const DialogCard = react.forwardRef(function(props, forwardedRef) {
446
534
  portal: portalProp,
447
535
  radius: radiusProp,
448
536
  scheme,
449
- shadow: t0,
450
- tone,
537
+ shadow: shadowProp,
451
538
  width: widthProp
452
- } = 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(), {
539
+ } = props, 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(), {
453
540
  isTopLayer
454
541
  } = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton;
542
+ let t0;
543
+ $[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = () => ref.current, $[0] = t0) : t0 = $[0], react.useImperativeHandle(forwardedRef, t0);
455
544
  let t1;
456
- $[0] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[0] = t1) : t1 = $[0], react.useImperativeHandle(forwardedRef, t1);
457
- let t2;
458
- $[1] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => contentRef.current, $[1] = t2) : t2 = $[1], react.useImperativeHandle(forwardedContentRef, t2);
459
- let t3, t4;
460
- $[2] !== autoFocus ? (t3 = () => {
545
+ $[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => contentRef.current, $[1] = t1) : t1 = $[1], react.useImperativeHandle(forwardedContentRef, t1);
546
+ let t2, t3;
547
+ $[2] !== autoFocus ? (t2 = () => {
461
548
  autoFocus && ref.current && focusFirstDescendant(ref.current);
462
- }, t4 = [autoFocus, ref], $[2] = autoFocus, $[3] = t3, $[4] = t4) : (t3 = $[3], t4 = $[4]), react.useEffect(t3, t4);
463
- let t5;
464
- $[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t5 = (event) => {
549
+ }, t3 = [autoFocus, ref], $[2] = autoFocus, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), react.useEffect(t2, t3);
550
+ let t4;
551
+ $[5] !== boundaryElement || $[6] !== isTopLayer || $[7] !== onClose || $[8] !== portalElement ? (t4 = (event) => {
465
552
  if (!isTopLayer || !onClose)
466
553
  return;
467
554
  const target = document.activeElement;
468
555
  target && !isTargetWithinScope(boundaryElement, portalElement, target) || event.key === "Escape" && (event.preventDefault(), event.stopPropagation(), onClose());
469
- }, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t5) : t5 = $[9], _visualEditing.useGlobalKeyDown(t5);
470
- let t6;
471
- $[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t6 = isTopLayer && onClickOutside && ((event_0) => {
556
+ }, $[5] = boundaryElement, $[6] = isTopLayer, $[7] = onClose, $[8] = portalElement, $[9] = t4) : t4 = $[9], _visualEditing.useGlobalKeyDown(t4);
557
+ let t5;
558
+ $[10] !== boundaryElement || $[11] !== isTopLayer || $[12] !== onClickOutside || $[13] !== portalElement ? (t5 = isTopLayer && onClickOutside && ((event_0) => {
472
559
  const target_0 = event_0.target;
473
560
  target_0 && !isTargetWithinScope(boundaryElement, portalElement, target_0) || onClickOutside();
474
- }), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t6) : t6 = $[14];
561
+ }), $[10] = boundaryElement, $[11] = isTopLayer, $[12] = onClickOutside, $[13] = portalElement, $[14] = t5) : t5 = $[14];
562
+ let t6;
563
+ $[15] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => [ref.current], $[15] = t6) : t6 = $[15], _visualEditing.useClickOutsideEvent(t5, t6);
475
564
  let t7;
476
- $[15] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[15] = t7) : t7 = $[15], _visualEditing.useClickOutsideEvent(t6, t7);
565
+ $[16] !== header || $[17] !== labelId || $[18] !== onClose || $[19] !== showCloseButton || $[20] !== showHeader ? (t7 = showHeader && /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { align: "flex-start", padding: 3, children: [
566
+ /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
567
+ 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 }) })
568
+ ] }) }), $[16] = header, $[17] = labelId, $[18] = onClose, $[19] = showCloseButton, $[20] = showHeader, $[21] = t7) : t7 = $[21];
477
569
  let t8;
478
- $[16] === Symbol.for("react.memo_cache_sentinel") ? (t8 = css.dialogContainer(), $[16] = t8) : t8 = $[16];
570
+ $[22] !== children ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { flex: 1, ref: contentRef, tabIndex: -1, children }), $[22] = children, $[23] = t8) : t8 = $[23];
479
571
  let t9;
480
- $[17] === Symbol.for("react.memo_cache_sentinel") ? (t9 = css.dialogCardRoot(), $[17] = t9) : t9 = $[17];
572
+ $[24] !== footer ? (t9 = footer && /* @__PURE__ */ jsxRuntime.jsx(DialogFooter, { children: footer }), $[24] = footer, $[25] = t9) : t9 = $[25];
481
573
  let t10;
482
- $[18] === Symbol.for("react.memo_cache_sentinel") ? (t10 = css.dialogLayout(), $[18] = t10) : t10 = $[18];
574
+ $[26] !== t7 || $[27] !== t8 || $[28] !== t9 ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(DialogLayout, { direction: "column", children: [
575
+ t7,
576
+ t8,
577
+ t9
578
+ ] }), $[26] = t7, $[27] = t8, $[28] = t9, $[29] = t10) : t10 = $[29];
483
579
  let t11;
484
- $[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: [
485
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, padding: 2, children: header && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { id: labelId, size: 1, weight: "semibold", children: header }) }),
486
- 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 }) })
487
- ] }) }), $[19] = header, $[20] = labelId, $[21] = onClose, $[22] = showCloseButton, $[23] = showHeader, $[24] = t11) : t11 = $[24];
580
+ $[30] !== radius || $[31] !== scheme || $[32] !== shadow || $[33] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(DialogCardRoot, { radius, ref, scheme, shadow, children: t10 }), $[30] = radius, $[31] = scheme, $[32] = shadow, $[33] = t10, $[34] = t11) : t11 = $[34];
488
581
  let t12;
489
- $[25] === Symbol.for("react.memo_cache_sentinel") ? (t12 = css.dialogContent(), $[25] = t12) : t12 = $[25];
490
- let t13;
491
- $[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];
492
- let t14;
493
- $[28] !== footer ? (t14 = footer && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { className: css.dialogFooter(), position: "relative", children: footer }), $[28] = footer, $[29] = t14) : t14 = $[29];
494
- let t15;
495
- $[30] !== t11 || $[31] !== t13 || $[32] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { className: t10, direction: "column", flex: 1, children: [
496
- t11,
497
- t13,
498
- t14
499
- ] }), $[30] = t11, $[31] = t13, $[32] = t14, $[33] = t15) : t15 = $[33];
500
- let t16;
501
- $[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];
502
- let t17;
503
- 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;
582
+ return $[35] !== t11 || $[36] !== width ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(DialogContainer, { "data-ui": "DialogCard", width, children: t11 }), $[35] = t11, $[36] = width, $[37] = t12) : t12 = $[37], t12;
504
583
  });
505
584
  DialogCard.displayName = "ForwardRef(DialogCard)";
506
585
  const Dialog = react.forwardRef(function(props, ref) {
507
- const $ = reactCompilerRuntime.c(66), context = useDialog();
508
- let _positionProp, _zOffsetProp, cardShadow, children, className, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, tone;
586
+ const $ = reactCompilerRuntime.c(60), dialog = useDialog(), {
587
+ layer
588
+ } = _visualEditing.useTheme_v2();
589
+ let _positionProp, _zOffsetProp, children, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, t6;
509
590
  $[0] !== props ? ({
510
591
  __unstable_autoFocus: t0,
511
592
  __unstable_hideCloseButton: t1,
512
- animate: t2,
513
- cardRadius: t3,
593
+ cardRadius: t2,
594
+ cardShadow: t3,
514
595
  children,
515
- className,
516
596
  contentRef,
517
597
  footer,
518
598
  header,
@@ -525,15 +605,14 @@ const Dialog = react.forwardRef(function(props, ref) {
525
605
  portal: portalProp,
526
606
  position: _positionProp,
527
607
  scheme,
528
- shadow: cardShadow,
529
608
  width: t5,
530
609
  zOffset: _zOffsetProp,
531
- tone,
610
+ animate: t6,
532
611
  ...restProps
533
- } = 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]);
534
- 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 ?? _visualEditing.Z_OFFSETS.dialog, 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);
535
- let t6;
536
- $[24] !== onFocus ? (t6 = (event) => {
612
+ } = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = children, $[4] = contentRef, $[5] = footer, $[6] = header, $[7] = id, $[8] = onActivate, $[9] = onClickOutside, $[10] = onClose, $[11] = onFocus, $[12] = portalProp, $[13] = restProps, $[14] = scheme, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6) : (_positionProp = $[1], _zOffsetProp = $[2], children = $[3], contentRef = $[4], footer = $[5], header = $[6], id = $[7], onActivate = $[8], onClickOutside = $[9], onClose = $[10], onFocus = $[11], portalProp = $[12], restProps = $[13], scheme = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21]);
613
+ const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, cardRadiusProp = t2 === void 0 ? 4 : t2, cardShadow = t3 === void 0 ? 3 : t3, paddingProp = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, _animate = t6 === void 0 ? !1 : t6, positionProp = _positionProp ?? (dialog.position || "fixed"), zOffsetProp = _zOffsetProp ?? (dialog.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), padding = _visualEditing.useArrayProp(paddingProp), 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);
614
+ let t7;
615
+ $[22] !== onFocus ? (t7 = (event) => {
537
616
  onFocus?.(event);
538
617
  const target = event.target, cardElement = cardRef.current;
539
618
  if (cardElement && target === preDivRef.current) {
@@ -545,10 +624,10 @@ const Dialog = react.forwardRef(function(props, ref) {
545
624
  return;
546
625
  }
547
626
  _visualEditing.isHTMLElement(event.target) && (focusedElementRef.current = event.target);
548
- }, $[24] = onFocus, $[25] = t6) : t6 = $[25];
549
- const handleFocus = t6, labelId = `${id}_label`, rootClickTimeoutRef = react.useRef(void 0);
550
- let t7;
551
- $[26] !== boundaryElement || $[27] !== portalElement ? (t7 = () => {
627
+ }, $[22] = onFocus, $[23] = t7) : t7 = $[23];
628
+ const handleFocus = t7, labelId = `${id}_label`, rootClickTimeoutRef = react.useRef(void 0);
629
+ let t8;
630
+ $[24] !== boundaryElement || $[25] !== portalElement ? (t8 = () => {
552
631
  rootClickTimeoutRef.current && clearTimeout(rootClickTimeoutRef.current), rootClickTimeoutRef.current = setTimeout(() => {
553
632
  const activeElement = document.activeElement;
554
633
  if (activeElement && !isTargetWithinScope(boundaryElement, portalElement, activeElement)) {
@@ -561,25 +640,22 @@ const Dialog = react.forwardRef(function(props, ref) {
561
640
  target_0.focus();
562
641
  }
563
642
  }, 0);
564
- }, $[26] = boundaryElement, $[27] = portalElement, $[28] = t7) : t7 = $[28];
565
- const handleRootClick = t7;
566
- let t8;
567
- $[29] !== className ? (t8 = css.composeClassNames(className, css.dialog()), $[29] = className, $[30] = t8) : t8 = $[30];
568
- const t9 = animate ? "" : void 0;
643
+ }, $[24] = boundaryElement, $[25] = portalElement, $[26] = t8) : t8 = $[26];
644
+ const handleRootClick = t8;
645
+ let t9;
646
+ $[27] === Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: preDivRef, tabIndex: 0 }), $[27] = t9) : t9 = $[27];
569
647
  let t10;
570
- $[31] === Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: preDivRef, tabIndex: 0 }), $[31] = t10) : t10 = $[31];
648
+ $[28] !== autoFocus || $[29] !== cardRadius || $[30] !== cardShadow || $[31] !== children || $[32] !== contentRef || $[33] !== footer || $[34] !== header || $[35] !== hideCloseButton || $[36] !== id || $[37] !== onClickOutside || $[38] !== onClose || $[39] !== portalProp || $[40] !== scheme || $[41] !== width ? (t10 = /* @__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, width, children }), $[28] = autoFocus, $[29] = cardRadius, $[30] = cardShadow, $[31] = children, $[32] = contentRef, $[33] = footer, $[34] = header, $[35] = hideCloseButton, $[36] = id, $[37] = onClickOutside, $[38] = onClose, $[39] = portalProp, $[40] = scheme, $[41] = width, $[42] = t10) : t10 = $[42];
571
649
  let t11;
572
- $[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];
650
+ $[43] === Symbol.for("react.memo_cache_sentinel") ? (t11 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[43] = t11) : t11 = $[43];
573
651
  let t12;
574
- $[48] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx("div", { ref: postDivRef, tabIndex: 0 }), $[48] = t12) : t12 = $[48];
575
- let t13;
576
- $[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: [
652
+ $[44] !== animate || $[45] !== handleFocus || $[46] !== handleRootClick || $[47] !== id || $[48] !== labelId || $[49] !== onActivate || $[50] !== padding || $[51] !== position || $[52] !== ref || $[53] !== restProps || $[54] !== t10 || $[55] !== zOffset ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(StyledDialog, { ...restProps, $animate: animate, $padding: padding, $position: position, "aria-labelledby": labelId, "aria-modal": !0, "data-ui": "Dialog", id, onActivate, onClick: handleRootClick, onFocus: handleFocus, ref, role: "dialog", zOffset, children: [
653
+ t9,
577
654
  t10,
578
- t11,
579
- t12
580
- ] }), $[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];
581
- let t14;
582
- 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;
655
+ t11
656
+ ] }), $[44] = animate, $[45] = handleFocus, $[46] = handleRootClick, $[47] = id, $[48] = labelId, $[49] = onActivate, $[50] = padding, $[51] = position, $[52] = ref, $[53] = restProps, $[54] = t10, $[55] = zOffset, $[56] = t12) : t12 = $[56];
657
+ let t13;
658
+ return $[57] !== portalProp || $[58] !== t12 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Portal, { __unstable_name: portalProp, children: t12 }), $[57] = portalProp, $[58] = t12, $[59] = t13) : t13 = $[59], t13;
583
659
  });
584
660
  Dialog.displayName = "ForwardRef(Dialog)";
585
661
  function DialogProvider(props) {
@@ -600,7 +676,7 @@ function DialogProvider(props) {
600
676
  }
601
677
  DialogProvider.displayName = "DialogProvider";
602
678
  const MenuButton = react.forwardRef(function(props, forwardedRef) {
603
- const $ = reactCompilerRuntime.c(63), {
679
+ const $ = reactCompilerRuntime.c(62), {
604
680
  __unstable_disableRestoreFocusOnClose: t0,
605
681
  boundaryElement: deprecated_boundaryElement,
606
682
  button: buttonProp,
@@ -699,33 +775,25 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
699
775
  shouldFocus
700
776
  }), $[28] = buttonElement, $[29] = handleBlur, $[30] = handleItemClick, $[31] = handleMenuClickOutside, $[32] = handleMenuEscape, $[33] = id, $[34] = menuProp, $[35] = shouldFocus, $[36] = t17) : t17 = $[36];
701
777
  const menu = t17;
702
- let t18;
703
- bb0: {
704
- if (!buttonProp) {
705
- t18 = null;
706
- break bb0;
707
- }
708
- const t192 = buttonProp.props.selected ?? open;
709
- let t202;
710
- $[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open || $[41] !== t192 ? (t202 = react.cloneElement(buttonProp, {
711
- "data-ui": "MenuButton",
712
- id,
713
- onClick: handleButtonClick,
714
- onKeyDown: handleButtonKeyDown,
715
- onMouseDown: handleMouseDown,
716
- "aria-haspopup": !0,
717
- "aria-expanded": open,
718
- ref: setButtonElement,
719
- selected: t192
720
- }), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t192, $[42] = t202) : t202 = $[42], t18 = t202;
721
- }
778
+ let t18, t19;
779
+ $[37] !== buttonProp || $[38] !== handleMouseDown || $[39] !== id || $[40] !== open ? (t19 = buttonProp && react.cloneElement(buttonProp, {
780
+ "data-ui": "MenuButton",
781
+ id,
782
+ onClick: handleButtonClick,
783
+ onKeyDown: handleButtonKeyDown,
784
+ onMouseDown: handleMouseDown,
785
+ "aria-haspopup": !0,
786
+ "aria-expanded": open,
787
+ ref: setButtonElement,
788
+ selected: buttonProp.props.selected ?? open
789
+ }), $[37] = buttonProp, $[38] = handleMouseDown, $[39] = id, $[40] = open, $[41] = t19) : t19 = $[41], t18 = t19;
722
790
  const button = t18;
723
- let t19, t20;
724
- $[43] !== buttonElement ? (t19 = () => buttonElement, t20 = [buttonElement], $[43] = buttonElement, $[44] = t19, $[45] = t20) : (t19 = $[44], t20 = $[45]), react.useImperativeHandle(forwardedRef, t19, t20);
725
- let t21, t22;
726
- $[46] !== popover ? (t22 = popover || {}, $[46] = popover, $[47] = t22) : t22 = $[47];
727
- let t23;
728
- $[48] !== deprecated_boundaryElement || $[49] !== deprecated_placement || $[50] !== deprecated_popoverRadius || $[51] !== deprecated_popoverScheme || $[52] !== deprecated_portal || $[53] !== deprecated_preventOverflow || $[54] !== t22 ? (t23 = {
791
+ let t20, t21;
792
+ $[42] !== buttonElement ? (t20 = () => buttonElement, t21 = [buttonElement], $[42] = buttonElement, $[43] = t20, $[44] = t21) : (t20 = $[43], t21 = $[44]), react.useImperativeHandle(forwardedRef, t20, t21);
793
+ let t22, t23;
794
+ $[45] !== popover ? (t23 = popover || {}, $[45] = popover, $[46] = t23) : t23 = $[46];
795
+ let t24;
796
+ $[47] !== deprecated_boundaryElement || $[48] !== deprecated_placement || $[49] !== deprecated_popoverRadius || $[50] !== deprecated_popoverScheme || $[51] !== deprecated_portal || $[52] !== deprecated_preventOverflow || $[53] !== t23 ? (t24 = {
729
797
  boundaryElement: deprecated_boundaryElement,
730
798
  overflow: "auto",
731
799
  placement: deprecated_placement,
@@ -733,31 +801,73 @@ const MenuButton = react.forwardRef(function(props, forwardedRef) {
733
801
  preventOverflow: deprecated_preventOverflow,
734
802
  radius: deprecated_popoverRadius,
735
803
  scheme: deprecated_popoverScheme,
736
- ...t22
737
- }, $[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;
738
- const popoverProps = t21;
739
- let t24;
740
- $[56] !== button ? (t24 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[56] = button, $[57] = t24) : t24 = $[57];
804
+ ...t23
805
+ }, $[47] = deprecated_boundaryElement, $[48] = deprecated_placement, $[49] = deprecated_popoverRadius, $[50] = deprecated_popoverScheme, $[51] = deprecated_portal, $[52] = deprecated_preventOverflow, $[53] = t23, $[54] = t24) : t24 = $[54], t22 = t24;
806
+ const popoverProps = t22;
741
807
  let t25;
742
- 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;
808
+ $[55] !== button ? (t25 = button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[55] = button, $[56] = t25) : t25 = $[56];
809
+ let t26;
810
+ return $[57] !== menu || $[58] !== open || $[59] !== popoverProps || $[60] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: t25 }), $[57] = menu, $[58] = open, $[59] = popoverProps, $[60] = t25, $[61] = t26) : t26 = $[61], t26;
743
811
  });
744
812
  MenuButton.displayName = "ForwardRef(MenuButton)";
745
813
  function _temp$2(v) {
746
814
  return !v;
747
815
  }
748
- const Skeleton = react.forwardRef(function(props, ref) {
749
- const $ = reactCompilerRuntime.c(18);
750
- let className, delay, radius, restProps, t0;
816
+ const keyframe = styledComponents.keyframes`
817
+ 0% {
818
+ background-position: 100%;
819
+ }
820
+ 100% {
821
+ background-position: -100%;
822
+ }
823
+ `, animation = styledComponents.css`
824
+ background-image: linear-gradient(
825
+ to right,
826
+ var(--card-skeleton-color-from),
827
+ var(--card-skeleton-color-to),
828
+ var(--card-skeleton-color-from),
829
+ var(--card-skeleton-color-from),
830
+ var(--card-skeleton-color-from)
831
+ );
832
+ background-position: 100%;
833
+ background-size: 200% 100%;
834
+ background-attachment: fixed;
835
+ animation-name: ${keyframe};
836
+ animation-timing-function: ease-in-out;
837
+ animation-iteration-count: infinite;
838
+ animation-duration: 2000ms;
839
+ `, skeletonStyle = styledComponents.css`
840
+ opacity: ${({
841
+ $visible
842
+ }) => $visible ? 1 : 0};
843
+ transition: opacity 200ms ease-in;
844
+
845
+ @media screen and (prefers-reduced-motion: no-preference) {
846
+ ${({
847
+ $animated
848
+ }) => $animated ? animation : styledComponents.css`
849
+ background-color: var(--card-skeleton-color-from);
850
+ `}
851
+ }
852
+
853
+ @media screen and (prefers-reduced-motion: reduce) {
854
+ background-color: var(--card-skeleton-color-from);
855
+ }
856
+ `, StyledSkeleton$1 = /* @__PURE__ */ styledComponents.styled(_visualEditing.Box).withConfig({
857
+ displayName: "StyledSkeleton",
858
+ componentId: "sc-ebtpni-0"
859
+ })(_visualEditing.responsiveRadiusStyle, skeletonStyle), Skeleton = react.forwardRef(function(props, ref) {
860
+ const $ = reactCompilerRuntime.c(14);
861
+ let delay, radius, restProps, t0;
751
862
  $[0] !== props ? ({
752
863
  animated: t0,
753
- className,
754
864
  delay,
755
865
  radius,
756
866
  ...restProps
757
- } = props, $[0] = props, $[1] = className, $[2] = delay, $[3] = radius, $[4] = restProps, $[5] = t0) : (className = $[1], delay = $[2], radius = $[3], restProps = $[4], t0 = $[5]);
867
+ } = props, $[0] = props, $[1] = delay, $[2] = radius, $[3] = restProps, $[4] = t0) : (delay = $[1], radius = $[2], restProps = $[3], t0 = $[4]);
758
868
  const animated = t0 === void 0 ? !1 : t0, [visible, setVisible] = react.useState(!delay);
759
869
  let t1, t2;
760
- $[6] !== delay ? (t1 = () => {
870
+ $[5] !== delay ? (t1 = () => {
761
871
  if (!delay)
762
872
  return setVisible(!0);
763
873
  const timeout = setTimeout(() => {
@@ -766,82 +876,75 @@ const Skeleton = react.forwardRef(function(props, ref) {
766
876
  return () => {
767
877
  clearTimeout(timeout);
768
878
  };
769
- }, t2 = [delay], $[6] = delay, $[7] = t1, $[8] = t2) : (t1 = $[7], t2 = $[8]), react.useEffect(t1, t2);
770
- let t3;
771
- $[9] !== className || $[10] !== radius ? (t3 = css.composeClassNames(className, css.skeleton({
772
- radius
773
- })), $[9] = className, $[10] = radius, $[11] = t3) : t3 = $[11];
774
- const t4 = animated ? "" : void 0, t5 = visible ? "" : void 0;
775
- let t6;
776
- 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;
879
+ }, t2 = [delay], $[5] = delay, $[6] = t1, $[7] = t2) : (t1 = $[6], t2 = $[7]), react.useEffect(t1, t2);
880
+ const t3 = _visualEditing.useArrayProp(radius);
881
+ let t4;
882
+ return $[8] !== animated || $[9] !== ref || $[10] !== restProps || $[11] !== t3 || $[12] !== visible ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton$1, { ...restProps, $animated: animated, $radius: t3, $visible: visible, ref }), $[8] = animated, $[9] = ref, $[10] = restProps, $[11] = t3, $[12] = visible, $[13] = t4) : t4 = $[13], t4;
777
883
  });
778
884
  Skeleton.displayName = "ForwardRef(Skeleton)";
779
- const TextSkeleton = react.forwardRef(function(props, ref) {
780
- const $ = reactCompilerRuntime.c(11);
781
- let className, restProps, t0;
885
+ const StyledSkeleton = /* @__PURE__ */ styledComponents.styled(Skeleton).withConfig({
886
+ displayName: "StyledSkeleton",
887
+ componentId: "sc-2p7a1v-0"
888
+ })((props) => {
889
+ const {
890
+ $size,
891
+ $style
892
+ } = props, {
893
+ font,
894
+ media
895
+ } = theme.getTheme_v2(props.theme), fontStyle = font[$style];
896
+ return _visualEditing._responsive(media, $size, (sizeIndex) => {
897
+ const fontSize = fontStyle.sizes[sizeIndex];
898
+ return {
899
+ height: fontSize.lineHeight - fontSize.ascenderHeight - fontSize.descenderHeight
900
+ };
901
+ });
902
+ }), TextSkeleton = react.forwardRef(function(props, ref) {
903
+ const $ = reactCompilerRuntime.c(7);
904
+ let restProps, t0;
782
905
  $[0] !== props ? ({
783
- className,
784
906
  size: t0,
785
907
  ...restProps
786
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
787
- const size = t0 === void 0 ? 2 : t0;
908
+ } = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
909
+ const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
788
910
  let t1;
789
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.textSkeleton({
790
- size
791
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
792
- let t2;
793
- 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;
911
+ return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "text" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
794
912
  });
795
913
  TextSkeleton.displayName = "ForwardRef(TextSkeleton)";
796
914
  const LabelSkeleton = react.forwardRef(function(props, ref) {
797
- const $ = reactCompilerRuntime.c(11);
798
- let className, restProps, t0;
915
+ const $ = reactCompilerRuntime.c(7);
916
+ let restProps, t0;
799
917
  $[0] !== props ? ({
800
- className,
801
918
  size: t0,
802
919
  ...restProps
803
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
804
- const size = t0 === void 0 ? 2 : t0;
920
+ } = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
921
+ const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
805
922
  let t1;
806
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.labelSkeleton({
807
- size
808
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
809
- let t2;
810
- 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;
923
+ return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "label" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
811
924
  });
812
925
  LabelSkeleton.displayName = "ForwardRef(LabelSkeleton)";
813
926
  const HeadingSkeleton = react.forwardRef(function(props, ref) {
814
- const $ = reactCompilerRuntime.c(11);
815
- let className, restProps, t0;
927
+ const $ = reactCompilerRuntime.c(7);
928
+ let restProps, t0;
816
929
  $[0] !== props ? ({
817
- className,
818
930
  size: t0,
819
931
  ...restProps
820
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
821
- const size = t0 === void 0 ? 2 : t0;
932
+ } = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
933
+ const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
822
934
  let t1;
823
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.headingSkeleton({
824
- size
825
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
826
- let t2;
827
- 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;
935
+ return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "heading" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
828
936
  });
829
937
  HeadingSkeleton.displayName = "ForwardRef(HeadingSkeleton)";
830
938
  const CodeSkeleton = react.forwardRef(function(props, ref) {
831
- const $ = reactCompilerRuntime.c(11);
832
- let className, restProps, t0;
939
+ const $ = reactCompilerRuntime.c(7);
940
+ let restProps, t0;
833
941
  $[0] !== props ? ({
834
- className,
835
942
  size: t0,
836
943
  ...restProps
837
- } = props, $[0] = props, $[1] = className, $[2] = restProps, $[3] = t0) : (className = $[1], restProps = $[2], t0 = $[3]);
838
- const size = t0 === void 0 ? 2 : t0;
944
+ } = props, $[0] = props, $[1] = restProps, $[2] = t0) : (restProps = $[1], t0 = $[2]);
945
+ const $size = _visualEditing.useArrayProp(t0 === void 0 ? 2 : t0);
839
946
  let t1;
840
- $[4] !== className || $[5] !== size ? (t1 = css.composeClassNames(className, css.codeSkeleton({
841
- size
842
- })), $[4] = className, $[5] = size, $[6] = t1) : t1 = $[6];
843
- let t2;
844
- 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;
947
+ return $[3] !== $size || $[4] !== ref || $[5] !== restProps ? (t1 = /* @__PURE__ */ jsxRuntime.jsx(StyledSkeleton, { ...restProps, $size, ref, $style: "code" }), $[3] = $size, $[4] = ref, $[5] = restProps, $[6] = t1) : t1 = $[6], t1;
845
948
  });
846
949
  CodeSkeleton.displayName = "ForwardRef(CodeSkeleton)";
847
950
  const TabPanel = react.forwardRef(function(props, ref) {
@@ -856,12 +959,7 @@ const TabPanel = react.forwardRef(function(props, ref) {
856
959
  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;
857
960
  });
858
961
  TabPanel.displayName = "ForwardRef(TabPanel)";
859
- const ROLES = {
860
- error: "alert",
861
- warning: "alert",
862
- success: "alert",
863
- info: "alert"
864
- }, STATUS_CARD_TONE = {
962
+ const LOADING_BAR_HEIGHT = 2, STATUS_CARD_TONE = {
865
963
  error: "critical",
866
964
  warning: "caution",
867
965
  success: "positive",
@@ -871,9 +969,34 @@ const ROLES = {
871
969
  warning: "caution",
872
970
  success: "positive",
873
971
  info: "neutral"
972
+ }, TextBox = styledComponents.styled(_visualEditing.Flex).withConfig({
973
+ displayName: "TextBox",
974
+ componentId: "sc-1rr7rxo-0"
975
+ })`overflow-x:auto;`, StyledToast = styledComponents.styled(_visualEditing.Card).withConfig({
976
+ displayName: "StyledToast",
977
+ componentId: "sc-1rr7rxo-1"
978
+ })`pointer-events:all;width:100%;position:relative;overflow:hidden;overflow:clip;&[data-has-duration]{padding-bottom:calc(${LOADING_BAR_HEIGHT}px / 2);}`, LoadingBar = styledComponents.styled.div.withConfig({
979
+ displayName: "LoadingBar",
980
+ componentId: "sc-1rr7rxo-2"
981
+ })`display:flex;position:absolute;bottom:0px;top:0px;left:0px;right:0px;pointer-events:none;z-index:-1;overflow:hidden;overflow:clip;background:transparent;align-items:flex-end;will-change:opacity;`, LoadingBarMask = styledComponents.styled(_visualEditing.Card).withConfig({
982
+ displayName: "LoadingBarMask",
983
+ componentId: "sc-1rr7rxo-3"
984
+ })`position:absolute;top:0;left:-${LOADING_BAR_HEIGHT}px;right:-${LOADING_BAR_HEIGHT}px;bottom:${LOADING_BAR_HEIGHT}px;z-index:1;`, LoadingBarProgress = styledComponents.styled(_visualEditing.Card).withConfig({
985
+ displayName: "LoadingBarProgress",
986
+ componentId: "sc-1rr7rxo-4"
987
+ })`display:block;height:100%;width:100%;transform-origin:0% 50%;background-color:${(props) => {
988
+ const {
989
+ color
990
+ } = theme.getTheme_v2(props.theme);
991
+ return color.button.default[props.tone].enabled.bg;
992
+ }};`, ROLES = {
993
+ error: "alert",
994
+ warning: "alert",
995
+ success: "alert",
996
+ info: "alert"
874
997
  }, LONG_ENOUGH_BUT_NOT_TOO_LONG = 1e3 * 60 * 60 * 24 * 24;
875
998
  function Toast(props) {
876
- const $ = reactCompilerRuntime.c(51);
999
+ const $ = reactCompilerRuntime.c(50);
877
1000
  let closable, description, duration, onClose, restProps, status, t0, title, updatedAt;
878
1001
  $[0] !== props ? ({
879
1002
  closable,
@@ -904,32 +1027,29 @@ function Toast(props) {
904
1027
  const animate = t3;
905
1028
  let t4;
906
1029
  $[14] === Symbol.for("react.memo_cache_sentinel") ? (t4 = ["hidden", "slideOut"], $[14] = t4) : t4 = $[14];
907
- const exit = t4;
908
- let t5;
909
- $[15] === Symbol.for("react.memo_cache_sentinel") ? (t5 = css.toast(), $[15] = t5) : t5 = $[15];
910
- const t6 = hasDuration ? "" : void 0;
1030
+ const exit = t4, t5 = hasDuration ? "" : void 0;
1031
+ let t6;
1032
+ $[15] !== title ? (t6 = title && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { size: 1, weight: "medium", children: title }), $[15] = title, $[16] = t6) : t6 = $[16];
911
1033
  let t7;
912
- $[16] !== title ? (t7 = title && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { size: 1, weight: "medium", children: title }), $[16] = title, $[17] = t7) : t7 = $[17];
1034
+ $[17] !== description || $[18] !== transition ? (t7 = description && /* @__PURE__ */ jsxRuntime.jsx(MotionText, { muted: !0, size: 1, variants: content, transition, children: description }), $[17] = description, $[18] = transition, $[19] = t7) : t7 = $[19];
913
1035
  let t8;
914
- $[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];
1036
+ $[20] !== t6 || $[21] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(TextBox, { flex: 1, padding: 3, children: /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Stack, { space: 3, children: [
1037
+ t6,
1038
+ t7
1039
+ ] }) }), $[20] = t6, $[21] = t7, $[22] = t8) : t8 = $[22];
915
1040
  let t9;
916
- $[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: [
917
- t7,
918
- t8
919
- ] }) }), $[21] = t7, $[22] = t8, $[23] = t9) : t9 = $[23];
920
- let t10;
921
- $[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: {
1041
+ $[23] !== buttonTone || $[24] !== closable || $[25] !== onClose ? (t9 = 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: {
922
1042
  verticalAlign: "top"
923
- } }) }), $[24] = buttonTone, $[25] = closable, $[26] = onClose, $[27] = t10) : t10 = $[27];
1043
+ } }) }), $[23] = buttonTone, $[24] = closable, $[25] = onClose, $[26] = t9) : t9 = $[26];
1044
+ let t10;
1045
+ $[27] !== t8 || $[28] !== t9 || $[29] !== transition ? (t10 = /* @__PURE__ */ jsxRuntime.jsxs(MotionFlex, { align: "flex-start", variants: content, transition, children: [
1046
+ t8,
1047
+ t9
1048
+ ] }), $[27] = t8, $[28] = t9, $[29] = transition, $[30] = t10) : t10 = $[30];
924
1049
  let t11;
925
- $[28] !== t10 || $[29] !== t9 || $[30] !== transition ? (t11 = /* @__PURE__ */ jsxRuntime.jsxs(MotionFlex, { align: "flex-start", variants: content, transition, children: [
926
- t9,
927
- t10
928
- ] }), $[28] = t10, $[29] = t9, $[30] = transition, $[31] = t11) : t11 = $[31];
929
- let t12;
930
- $[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: [
931
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Card, { className: css.toastLoadingBarMask(), tone: cardTone, radius }),
932
- /* @__PURE__ */ jsxRuntime.jsx(MotionCard, { className: css.toastLoadingBarProgress(), tone: cardTone, initial: {
1050
+ $[31] !== cardTone || $[32] !== duration || $[33] !== hasDuration || $[34] !== onClose || $[35] !== radius || $[36] !== transition || $[37] !== updatedAt || $[38] !== visualDuration ? (t11 = hasDuration && /* @__PURE__ */ jsxRuntime.jsxs(MotionLoadingBar, { variants: content, transition, children: [
1051
+ /* @__PURE__ */ jsxRuntime.jsx(LoadingBarMask, { tone: cardTone, radius }),
1052
+ /* @__PURE__ */ jsxRuntime.jsx(MotionLoadingBarProgress, { tone: cardTone, initial: {
933
1053
  scaleX: 0
934
1054
  }, animate: {
935
1055
  scaleX: 1
@@ -938,12 +1058,12 @@ function Toast(props) {
938
1058
  duration: duration / 1e3,
939
1059
  ease: "linear"
940
1060
  }, onAnimationComplete: onClose }, `progress-${updatedAt}`)
941
- ] }), $[32] = cardTone, $[33] = duration, $[34] = hasDuration, $[35] = onClose, $[36] = radius, $[37] = transition, $[38] = updatedAt, $[39] = visualDuration, $[40] = t12) : t12 = $[40];
942
- let t13;
943
- return $[41] !== cardTone || $[42] !== radius || $[43] !== restProps || $[44] !== role || $[45] !== t11 || $[46] !== t12 || $[47] !== t6 || $[48] !== transition || $[49] !== visualDuration ? (t13 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard, { as: "li", className: t5, "data-ui": "Toast", role, ...restProps, "data-has-duration": t6, custom: visualDuration, radius, shadow: 2, tone: cardTone, layout: "position", variants: container, initial, animate, exit, transition, position: "relative", children: [
944
- t11,
945
- t12
946
- ] }), $[41] = cardTone, $[42] = radius, $[43] = restProps, $[44] = role, $[45] = t11, $[46] = t12, $[47] = t6, $[48] = transition, $[49] = visualDuration, $[50] = t13) : t13 = $[50], t13;
1061
+ ] }), $[31] = cardTone, $[32] = duration, $[33] = hasDuration, $[34] = onClose, $[35] = radius, $[36] = transition, $[37] = updatedAt, $[38] = visualDuration, $[39] = t11) : t11 = $[39];
1062
+ let t12;
1063
+ return $[40] !== cardTone || $[41] !== radius || $[42] !== restProps || $[43] !== role || $[44] !== t10 || $[45] !== t11 || $[46] !== t5 || $[47] !== transition || $[48] !== visualDuration ? (t12 = /* @__PURE__ */ jsxRuntime.jsxs(MotionToast, { "data-ui": "Toast", role, ...restProps, "data-has-duration": t5, custom: visualDuration, radius, shadow: 2, tone: cardTone, forwardedAs: "li", layout: "position", variants: container, initial, animate, exit, transition, children: [
1064
+ t10,
1065
+ t11
1066
+ ] }), $[40] = cardTone, $[41] = radius, $[42] = restProps, $[43] = role, $[44] = t10, $[45] = t11, $[46] = t5, $[47] = transition, $[48] = visualDuration, $[49] = t12) : t12 = $[49], t12;
947
1067
  }
948
1068
  Toast.displayName = "Toast";
949
1069
  const container = {
@@ -983,7 +1103,7 @@ const container = {
983
1103
  visible: {
984
1104
  opacity: 1
985
1105
  }
986
- }, MotionCard = framerMotion.motion.create(_visualEditing.Card), MotionFlex = framerMotion.motion.create(_visualEditing.Flex), MotionText = framerMotion.motion.create(_visualEditing.Text), MotionBox = framerMotion.motion.create(_visualEditing.Box);
1106
+ }, MotionToast = framerMotion.motion.create(StyledToast), MotionFlex = framerMotion.motion.create(_visualEditing.Flex), MotionText = framerMotion.motion.create(_visualEditing.Text), MotionLoadingBar = framerMotion.motion.create(LoadingBar), MotionLoadingBarProgress = framerMotion.motion.create(LoadingBarProgress);
987
1107
  function useMounted() {
988
1108
  return react.useSyncExternalStore(subscribe, _temp$1, _temp2);
989
1109
  }
@@ -996,7 +1116,7 @@ function _temp$1() {
996
1116
  const subscribe = () => () => {
997
1117
  }, ToastContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/toast", null);
998
1118
  function ToastLayer(props) {
999
- const $ = reactCompilerRuntime.c(10), {
1119
+ const $ = reactCompilerRuntime.c(9), {
1000
1120
  children,
1001
1121
  padding: t0,
1002
1122
  paddingX,
@@ -1006,15 +1126,17 @@ function ToastLayer(props) {
1006
1126
  zIndex
1007
1127
  } = _visualEditing.useLayer();
1008
1128
  let t2;
1009
- $[0] === Symbol.for("react.memo_cache_sentinel") ? (t2 = css.toastLayer(), $[0] = t2) : t2 = $[0];
1010
- let t3;
1011
- $[1] !== zIndex ? (t3 = {
1129
+ $[0] !== zIndex ? (t2 = {
1012
1130
  zIndex
1013
- }, $[1] = zIndex, $[2] = t3) : t3 = $[2];
1014
- let t4;
1015
- 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;
1131
+ }, $[0] = zIndex, $[1] = t2) : t2 = $[1];
1132
+ let t3;
1133
+ return $[2] !== children || $[3] !== gap || $[4] !== padding || $[5] !== paddingX || $[6] !== paddingY || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(StyledLayer, { forwardedAs: "ul", "data-ui": "ToastProvider", padding, paddingX, paddingY, gap, columns: 1, style: t2, children }), $[2] = children, $[3] = gap, $[4] = padding, $[5] = paddingX, $[6] = paddingY, $[7] = t2, $[8] = t3) : t3 = $[8], t3;
1016
1134
  }
1017
1135
  ToastLayer.displayName = "ToastLayer";
1136
+ const StyledLayer = styledComponents.styled(_visualEditing.Grid).withConfig({
1137
+ displayName: "StyledLayer",
1138
+ componentId: "sc-1tbwn58-0"
1139
+ })`box-sizing:border-box;position:fixed;right:0;bottom:0;list-style:none;pointer-events:none;max-width:420px;width:100%;`;
1018
1140
  let toastId = 0;
1019
1141
  function generateToastId() {
1020
1142
  return String(toastId++);
@@ -1136,37 +1258,36 @@ function _focusItemElement(el) {
1136
1258
  }
1137
1259
  }
1138
1260
  const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context/tree", null), Tree = react.memo(react.forwardRef(function(props, forwardedRef) {
1139
- const $ = reactCompilerRuntime.c(38);
1140
- let children, gap, onFocus, restProps, t0;
1261
+ const $ = reactCompilerRuntime.c(37);
1262
+ let children, onFocus, restProps, t0;
1141
1263
  $[0] !== props ? ({
1142
1264
  children,
1143
- gap,
1144
1265
  space: t0,
1145
1266
  onFocus,
1146
1267
  ...restProps
1147
- } = props, $[0] = props, $[1] = children, $[2] = gap, $[3] = onFocus, $[4] = restProps, $[5] = t0) : (children = $[1], gap = $[2], onFocus = $[3], restProps = $[4], t0 = $[5]);
1268
+ } = props, $[0] = props, $[1] = children, $[2] = onFocus, $[3] = restProps, $[4] = t0) : (children = $[1], onFocus = $[2], restProps = $[3], t0 = $[4]);
1148
1269
  const space = t0 === void 0 ? 1 : t0, ref = react.useRef(null), [focusedElement, setFocusedElement] = react.useState(null), focusedElementRef = react.useRef(focusedElement);
1149
1270
  let t1, t2;
1150
- $[6] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[6] = t2) : t2 = $[6], t1 = t2;
1271
+ $[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[5] = t2) : t2 = $[5], t1 = t2;
1151
1272
  const path = t1;
1152
1273
  let t3;
1153
- $[7] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [], $[7] = t3) : t3 = $[7];
1274
+ $[6] === Symbol.for("react.memo_cache_sentinel") ? (t3 = [], $[6] = t3) : t3 = $[6];
1154
1275
  const [itemElements, setItemElements] = react.useState(t3);
1155
1276
  let t4;
1156
- $[8] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {}, $[8] = t4) : t4 = $[8];
1277
+ $[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {}, $[7] = t4) : t4 = $[7];
1157
1278
  const [state, setState] = react.useState(t4), stateRef = react.useRef(state);
1158
1279
  let t5;
1159
- $[9] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[9] = t5) : t5 = $[9], react.useImperativeHandle(forwardedRef, t5);
1280
+ $[8] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[8] = t5) : t5 = $[8], react.useImperativeHandle(forwardedRef, t5);
1160
1281
  let t6, t7;
1161
- $[10] !== focusedElement ? (t6 = () => {
1282
+ $[9] !== focusedElement ? (t6 = () => {
1162
1283
  focusedElementRef.current = focusedElement;
1163
- }, t7 = [focusedElement], $[10] = focusedElement, $[11] = t6, $[12] = t7) : (t6 = $[11], t7 = $[12]), react.useEffect(t6, t7);
1284
+ }, t7 = [focusedElement], $[9] = focusedElement, $[10] = t6, $[11] = t7) : (t6 = $[10], t7 = $[11]), react.useEffect(t6, t7);
1164
1285
  let t8, t9;
1165
- $[13] !== state ? (t8 = () => {
1286
+ $[12] !== state ? (t8 = () => {
1166
1287
  stateRef.current = state;
1167
- }, t9 = [state], $[13] = state, $[14] = t8, $[15] = t9) : (t8 = $[14], t9 = $[15]), react.useEffect(t8, t9);
1288
+ }, t9 = [state], $[12] = state, $[13] = t8, $[14] = t9) : (t8 = $[13], t9 = $[14]), react.useEffect(t8, t9);
1168
1289
  let t10;
1169
- $[16] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
1290
+ $[15] === Symbol.for("react.memo_cache_sentinel") ? (t10 = (element, path_0, expanded, selected) => (setState((s) => ({
1170
1291
  ...s,
1171
1292
  [path_0]: {
1172
1293
  element,
@@ -1179,10 +1300,10 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1179
1300
  };
1180
1301
  return delete newState[path_0], newState;
1181
1302
  });
1182
- }), $[16] = t10) : t10 = $[16];
1303
+ }), $[15] = t10) : t10 = $[15];
1183
1304
  const registerItem = t10;
1184
1305
  let t11;
1185
- $[17] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
1306
+ $[16] === Symbol.for("react.memo_cache_sentinel") ? (t11 = (path_1, expanded_0) => {
1186
1307
  setState((s_1) => {
1187
1308
  const itemState = s_1[path_1];
1188
1309
  return itemState ? {
@@ -1193,12 +1314,12 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1193
1314
  }
1194
1315
  } : s_1;
1195
1316
  });
1196
- }, $[17] = t11) : t11 = $[17];
1317
+ }, $[16] = t11) : t11 = $[16];
1197
1318
  const setExpanded = t11;
1198
1319
  let t12;
1199
1320
  const t13 = focusedElement || itemElements[0] || null;
1200
1321
  let t14;
1201
- $[18] !== space || $[19] !== state || $[20] !== t13 ? (t14 = {
1322
+ $[17] !== space || $[18] !== state || $[19] !== t13 ? (t14 = {
1202
1323
  version: 0,
1203
1324
  focusedElement: t13,
1204
1325
  level: 0,
@@ -1208,10 +1329,10 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1208
1329
  setFocusedElement,
1209
1330
  space,
1210
1331
  state
1211
- }, $[18] = space, $[19] = state, $[20] = t13, $[21] = t14) : t14 = $[21], t12 = t14;
1332
+ }, $[17] = space, $[18] = state, $[19] = t13, $[20] = t14) : t14 = $[20], t12 = t14;
1212
1333
  const contextValue = t12;
1213
1334
  let t15;
1214
- $[22] !== itemElements ? (t15 = (event) => {
1335
+ $[21] !== itemElements ? (t15 = (event) => {
1215
1336
  if (focusedElementRef.current) {
1216
1337
  if (event.key === "ArrowDown") {
1217
1338
  event.preventDefault();
@@ -1270,29 +1391,120 @@ const TreeContext = _visualEditing.createGlobalScopedContext("@sanity/ui/context
1270
1391
  return;
1271
1392
  }
1272
1393
  }
1273
- }, $[22] = itemElements, $[23] = t15) : t15 = $[23];
1394
+ }, $[21] = itemElements, $[22] = t15) : t15 = $[22];
1274
1395
  const handleKeyDown = t15;
1275
1396
  let t16;
1276
- $[24] !== onFocus ? (t16 = (event_0) => {
1397
+ $[23] !== onFocus ? (t16 = (event_0) => {
1277
1398
  setFocusedElement(event_0.target), onFocus?.(event_0);
1278
- }, $[24] = onFocus, $[25] = t16) : t16 = $[25];
1399
+ }, $[23] = onFocus, $[24] = t16) : t16 = $[24];
1279
1400
  const handleFocus = t16;
1280
1401
  let t17;
1281
- $[26] === Symbol.for("react.memo_cache_sentinel") ? (t17 = () => {
1402
+ $[25] === Symbol.for("react.memo_cache_sentinel") ? (t17 = () => {
1282
1403
  if (!ref.current)
1283
1404
  return;
1284
1405
  const _itemElements = Array.from(ref.current.querySelectorAll('[data-ui="TreeItem"]'));
1285
1406
  setItemElements(_itemElements);
1286
- }, $[26] = t17) : t17 = $[26];
1407
+ }, $[25] = t17) : t17 = $[25];
1287
1408
  let t18;
1288
- $[27] !== children ? (t18 = [children], $[27] = children, $[28] = t18) : t18 = $[28], react.useEffect(t17, t18);
1289
- const t19 = gap ?? space;
1409
+ $[26] !== children ? (t18 = [children], $[26] = children, $[27] = t18) : t18 = $[27], react.useEffect(t17, t18);
1410
+ let t19;
1411
+ $[28] !== children || $[29] !== handleFocus || $[30] !== handleKeyDown || $[31] !== restProps || $[32] !== space ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Stack, { as: "ul", "data-ui": "Tree", ...restProps, onFocus: handleFocus, onKeyDown: handleKeyDown, ref, role: "tree", space, children }), $[28] = children, $[29] = handleFocus, $[30] = handleKeyDown, $[31] = restProps, $[32] = space, $[33] = t19) : t19 = $[33];
1290
1412
  let t20;
1291
- $[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];
1292
- let t21;
1293
- return $[35] !== contextValue || $[36] !== t20 ? (t21 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t20 }), $[35] = contextValue, $[36] = t20, $[37] = t21) : t21 = $[37], t21;
1413
+ return $[34] !== contextValue || $[35] !== t19 ? (t20 = /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: t19 }), $[34] = contextValue, $[35] = t19, $[36] = t20) : t20 = $[36], t20;
1294
1414
  }));
1295
1415
  Tree.displayName = "Memo(ForwardRef(Tree))";
1416
+ function treeItemRootStyle() {
1417
+ return styledComponents.css`
1418
+ &[role='none'] > [role='treeitem'] {
1419
+ outline: none;
1420
+ cursor: default;
1421
+ border-radius: 3px;
1422
+
1423
+ background-color: var(--card-bg-color);
1424
+ color: var(--treeitem-fg-color);
1425
+
1426
+ &:focus {
1427
+ position: relative;
1428
+ }
1429
+ }
1430
+
1431
+ &[role='treeitem'] {
1432
+ outline: none;
1433
+
1434
+ & > div {
1435
+ cursor: default;
1436
+ border-radius: 3px;
1437
+
1438
+ background-color: var(--card-bg-color);
1439
+ color: var(--treeitem-fg-color);
1440
+ }
1441
+
1442
+ &:focus > div {
1443
+ position: relative;
1444
+ }
1445
+ }
1446
+ `;
1447
+ }
1448
+ function treeItemRootColorStyle(props) {
1449
+ const $tone = "default", {
1450
+ color
1451
+ } = theme.getTheme_v2(props.theme), tone = color.selectable[$tone];
1452
+ return styledComponents.css`
1453
+ &[role='none'] {
1454
+ & > [role='treeitem'] {
1455
+ ${_visualEditing._cardColorStyle(color, tone.enabled)}
1456
+ }
1457
+
1458
+ &[data-selected] > [role='treeitem'] {
1459
+ ${_visualEditing._cardColorStyle(color, tone.pressed)}
1460
+ }
1461
+
1462
+ @media (hover: hover) {
1463
+ &:not([data-selected]) > [role='treeitem']:not(:focus):hover {
1464
+ ${_visualEditing._cardColorStyle(color, tone.hovered)}
1465
+ }
1466
+
1467
+ & > [role='treeitem']:focus {
1468
+ ${_visualEditing._cardColorStyle(color, tone.selected)}
1469
+ }
1470
+ }
1471
+ }
1472
+
1473
+ &[role='treeitem'] {
1474
+ & > [data-ui='TreeItem__box'] {
1475
+ ${_visualEditing._cardColorStyle(color, tone.enabled)}
1476
+ }
1477
+
1478
+ &[data-selected] > [data-ui='TreeItem__box'] {
1479
+ ${_visualEditing._cardColorStyle(color, tone.pressed)}
1480
+ }
1481
+
1482
+ @media (hover: hover) {
1483
+ &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {
1484
+ ${_visualEditing._cardColorStyle(color, tone.hovered)}
1485
+ }
1486
+
1487
+ &:focus > [data-ui='TreeItem__box'] {
1488
+ ${_visualEditing._cardColorStyle(color, tone.selected)}
1489
+ }
1490
+ }
1491
+ }
1492
+ `;
1493
+ }
1494
+ function treeItemBoxStyle(props) {
1495
+ const {
1496
+ $level
1497
+ } = props, {
1498
+ space
1499
+ } = theme.getTheme_v2(props.theme);
1500
+ return styledComponents.css`
1501
+ padding-left: ${_visualEditing.rem(space[2] * $level)};
1502
+
1503
+ &[data-as='a'] {
1504
+ text-decoration: none;
1505
+ }
1506
+ `;
1507
+ }
1296
1508
  function useTree() {
1297
1509
  const tree = react.useContext(TreeContext);
1298
1510
  if (!tree)
@@ -1310,20 +1522,29 @@ const TreeGroup = react.memo(function(props) {
1310
1522
  const expanded = t0 === void 0 ? !1 : t0, tree = useTree(), t1 = !expanded;
1311
1523
  let t2;
1312
1524
  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;
1313
- }), TreeItem = react.memo(function(props) {
1525
+ }), StyledTreeItem = react.memo(styledComponents.styled.li.withConfig({
1526
+ displayName: "StyledTreeItem",
1527
+ componentId: "sc-iiskig-0"
1528
+ })(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = /* @__PURE__ */ styledComponents.styled(_visualEditing.Box).attrs({
1529
+ forwardedAs: "a"
1530
+ }).withConfig({
1531
+ displayName: "TreeItemBox",
1532
+ componentId: "sc-iiskig-1"
1533
+ })(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(_visualEditing.Text).withConfig({
1534
+ displayName: "ToggleArrowText",
1535
+ componentId: "sc-iiskig-2"
1536
+ })`& > svg{transition:transform 100ms;}`, TreeItem = react.memo(function(props) {
1314
1537
  const {
1315
1538
  children,
1316
- className,
1317
1539
  expanded: expandedProp = !1,
1318
1540
  fontSize = 1,
1319
1541
  href,
1320
1542
  icon: IconComponent,
1321
1543
  id: idProp,
1322
- linkAs = "a",
1544
+ linkAs,
1323
1545
  muted,
1324
1546
  onClick,
1325
1547
  padding = 2,
1326
- radius = 2,
1327
1548
  selected = !1,
1328
1549
  space = 2,
1329
1550
  text,
@@ -1349,55 +1570,27 @@ const TreeGroup = react.memo(function(props) {
1349
1570
  if (rootRef.current)
1350
1571
  return registerItem(rootRef.current, itemPath.join("/"), expanded, selected);
1351
1572
  }, [expanded, itemPath, registerItem, selected]);
1352
- const content2 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { gap: space, padding, children: [
1353
- /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { style: {
1573
+ const content2 = /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Flex, { padding, children: [
1574
+ /* @__PURE__ */ jsxRuntime.jsxs(_visualEditing.Box, { marginRight: space, style: {
1354
1575
  visibility: IconComponent || children ? "visible" : "hidden",
1355
1576
  pointerEvents: "none"
1356
1577
  }, children: [
1357
1578
  IconComponent && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {}) }),
1358
- !IconComponent && /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ToggleArrowRightIcon, { style: {
1579
+ !IconComponent && /* @__PURE__ */ jsxRuntime.jsx(ToggleArrowText, { muted, size: fontSize, weight, children: /* @__PURE__ */ jsxRuntime.jsx(icons.ToggleArrowRightIcon, { style: {
1359
1580
  transform: expanded ? "rotate(90deg)" : void 0
1360
1581
  } }) })
1361
1582
  ] }),
1362
1583
  /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Text, { muted, size: fontSize, textOverflow: "ellipsis", weight, children: text }) })
1363
1584
  ] });
1364
- 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: [
1365
- /* @__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: {
1366
- paddingLeft: `calc(var(--space-2) * ${tree.level})`
1367
- }, children: content2 }),
1585
+ return href ? /* @__PURE__ */ jsxRuntime.jsxs(StyledTreeItem, { "data-selected": selected ? "" : void 0, "data-tree-id": id, "data-tree-key": itemKey, "data-ui": "TreeItem", ...restProps, onClick: handleClick, ref: rootRef, role: "none", children: [
1586
+ /* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, "aria-expanded": expanded, as: linkAs, "data-ui": "TreeItem__box", href, ref: treeitemRef, role: "treeitem", tabIndex, children: content2 }),
1368
1587
  /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { hidden: !expanded, children }) })
1369
- ] }) : /* @__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: [
1370
- /* @__PURE__ */ jsxRuntime.jsx(_visualEditing.Selectable, { as: "button", "data-pressed": selected ? "" : void 0, "data-ui": "TreeItem__box", radius, style: {
1371
- paddingLeft: `calc(var(--space-2) * ${tree.level})`
1372
- }, children: content2 }),
1588
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(StyledTreeItem, { "data-selected": selected ? "" : void 0, "data-ui": "TreeItem", "data-tree-id": id, "data-tree-key": itemKey, ...restProps, "aria-expanded": expanded, onClick: handleClick, onKeyDown: handleKeyDown, ref: rootRef, role: "treeitem", tabIndex, children: [
1589
+ /* @__PURE__ */ jsxRuntime.jsx(TreeItemBox, { $level: tree.level, as: "div", "data-ui": "TreeItem__box", children: content2 }),
1373
1590
  /* @__PURE__ */ jsxRuntime.jsx(TreeContext.Provider, { value: contextValue, children: children && /* @__PURE__ */ jsxRuntime.jsx(TreeGroup, { expanded, children }) })
1374
1591
  ] });
1375
1592
  });
1376
1593
  TreeItem.displayName = "Memo(TreeItem)";
1377
- function StyleTags(props) {
1378
- const $ = reactCompilerRuntime.c(10), {
1379
- theme: themeProp
1380
- } = props;
1381
- let t0;
1382
- $[0] !== themeProp ? (t0 = themeProp ?? theme.buildTheme_v3(), $[0] = themeProp, $[1] = t0) : t0 = $[1];
1383
- const theme$1 = t0;
1384
- let t1;
1385
- $[2] === Symbol.for("react.memo_cache_sentinel") ? (t1 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-palette", precedence: "palette", children: css.compilePalette() }), $[2] = t1) : t1 = $[2];
1386
- let t2;
1387
- $[3] !== theme$1 ? (t2 = css.compileTheme({
1388
- v3: theme$1
1389
- }), $[3] = theme$1, $[4] = t2) : t2 = $[4];
1390
- let t3;
1391
- $[5] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-theme", precedence: "theme", children: t2 }), $[5] = t2, $[6] = t3) : t3 = $[6];
1392
- let t4;
1393
- $[7] === Symbol.for("react.memo_cache_sentinel") ? (t4 = /* @__PURE__ */ jsxRuntime.jsx("style", { href: "sanity-system", precedence: "system", children: css.compileSystem() }), $[7] = t4) : t4 = $[7];
1394
- let t5;
1395
- return $[8] !== t3 ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1396
- t1,
1397
- t3,
1398
- t4
1399
- ] }), $[8] = t3, $[9] = t5) : t5 = $[9], t5;
1400
- }
1401
1594
  exports.Arrow = _visualEditing.Arrow;
1402
1595
  exports.Avatar = _visualEditing.Avatar;
1403
1596
  exports.AvatarCounter = _visualEditing.AvatarCounter;
@@ -1407,7 +1600,6 @@ exports.BoundaryElementProvider = _visualEditing.BoundaryElementProvider;
1407
1600
  exports.Box = _visualEditing.Box;
1408
1601
  exports.Button = _visualEditing.Button;
1409
1602
  exports.Card = _visualEditing.Card;
1410
- exports.CardProvider = _visualEditing.CardProvider;
1411
1603
  exports.Checkbox = _visualEditing.Checkbox;
1412
1604
  exports.Code = _visualEditing.Code;
1413
1605
  exports.ConditionalWrapper = _visualEditing.ConditionalWrapper;
@@ -1448,9 +1640,12 @@ exports.TooltipDelayGroupProvider = _visualEditing.TooltipDelayGroupProvider;
1448
1640
  exports.VirtualList = _visualEditing.VirtualList;
1449
1641
  exports._ResizeObserver = _visualEditing._ResizeObserver;
1450
1642
  exports._elementSizeObserver = _visualEditing._elementSizeObserver;
1643
+ exports._fillCSSObject = _visualEditing._fillCSSObject;
1451
1644
  exports._getArrayProp = _visualEditing._getArrayProp;
1645
+ exports._getResponsiveSpace = _visualEditing._getResponsiveSpace;
1452
1646
  exports._isEnterToClickElement = _visualEditing._isEnterToClickElement;
1453
1647
  exports._isScrollable = _visualEditing._isScrollable;
1648
+ exports._responsive = _visualEditing._responsive;
1454
1649
  exports.containsOrEqualsElement = _visualEditing.containsOrEqualsElement;
1455
1650
  exports.createColorTheme = _visualEditing.createColorTheme;
1456
1651
  exports.hexToRgb = _visualEditing.hexToRgb;
@@ -1463,6 +1658,12 @@ exports.isHTMLSelectElement = _visualEditing.isHTMLSelectElement;
1463
1658
  exports.isHTMLTextAreaElement = _visualEditing.isHTMLTextAreaElement;
1464
1659
  exports.multiply = _visualEditing.multiply;
1465
1660
  exports.parseColor = _visualEditing.parseColor;
1661
+ exports.rem = _visualEditing.rem;
1662
+ exports.responsiveCodeFontStyle = _visualEditing.responsiveCodeFontStyle;
1663
+ exports.responsiveHeadingFont = _visualEditing.responsiveHeadingFont;
1664
+ exports.responsiveLabelFont = _visualEditing.responsiveLabelFont;
1665
+ exports.responsiveTextAlignStyle = _visualEditing.responsiveTextAlignStyle;
1666
+ exports.responsiveTextFont = _visualEditing.responsiveTextFont;
1466
1667
  exports.rgbToHex = _visualEditing.rgbToHex;
1467
1668
  exports.rgbToHsl = _visualEditing.rgbToHsl;
1468
1669
  exports.rgba = _visualEditing.rgba;
@@ -1470,7 +1671,6 @@ exports.screen = _visualEditing.screen;
1470
1671
  exports.studioTheme = _visualEditing.studioTheme;
1471
1672
  exports.useArrayProp = _visualEditing.useArrayProp;
1472
1673
  exports.useBoundaryElement = _visualEditing.useBoundaryElement;
1473
- exports.useCard = _visualEditing.useCard;
1474
1674
  exports.useClickOutsideEvent = _visualEditing.useClickOutsideEvent;
1475
1675
  exports.useCustomValidity = _visualEditing.useCustomValidity;
1476
1676
  exports.useElementSize = _visualEditing.useElementSize;
@@ -1485,18 +1685,6 @@ exports.useRootTheme = _visualEditing.useRootTheme;
1485
1685
  exports.useTheme = _visualEditing.useTheme;
1486
1686
  exports.useTheme_v2 = _visualEditing.useTheme_v2;
1487
1687
  exports.useTooltipDelayGroup = _visualEditing.useTooltipDelayGroup;
1488
- Object.defineProperty(exports, "px", {
1489
- enumerable: !0,
1490
- get: function() {
1491
- return css.px;
1492
- }
1493
- });
1494
- Object.defineProperty(exports, "rem", {
1495
- enumerable: !0,
1496
- get: function() {
1497
- return css.rem;
1498
- }
1499
- });
1500
1688
  exports.Autocomplete = Autocomplete;
1501
1689
  exports.Breadcrumbs = Breadcrumbs;
1502
1690
  exports.CodeSkeleton = CodeSkeleton;
@@ -1508,7 +1696,6 @@ exports.HeadingSkeleton = HeadingSkeleton;
1508
1696
  exports.LabelSkeleton = LabelSkeleton;
1509
1697
  exports.MenuButton = MenuButton;
1510
1698
  exports.Skeleton = Skeleton;
1511
- exports.StyleTags = StyleTags;
1512
1699
  exports.TabPanel = TabPanel;
1513
1700
  exports.TextSkeleton = TextSkeleton;
1514
1701
  exports.Toast = Toast;
@@ -1518,7 +1705,6 @@ exports.TreeItem = TreeItem;
1518
1705
  exports._hasFocus = _hasFocus;
1519
1706
  exports._raf = _raf;
1520
1707
  exports._raf2 = _raf2;
1521
- exports._responsive = _responsive;
1522
1708
  exports.attemptFocus = attemptFocus;
1523
1709
  exports.focusFirstDescendant = focusFirstDescendant;
1524
1710
  exports.focusLastDescendant = focusLastDescendant;