@sanity/ui 2.16.22 → 2.16.23

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 (325) hide show
  1. package/dist/_chunks-cjs/_visual-editing.js +115 -1040
  2. package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
  3. package/dist/_chunks-cjs/refractor.js.map +1 -1
  4. package/dist/_chunks-es/_visual-editing.mjs +115 -1040
  5. package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
  6. package/dist/_chunks-es/refractor.mjs.map +1 -1
  7. package/dist/_visual-editing.d.mts +411 -351
  8. package/dist/_visual-editing.d.ts +411 -351
  9. package/dist/index.d.mts +1107 -930
  10. package/dist/index.d.ts +1107 -930
  11. package/dist/index.js +64 -155
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +64 -155
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/theme.d.mts +769 -681
  16. package/dist/theme.d.ts +769 -681
  17. package/dist/theme.js +47 -0
  18. package/dist/theme.js.map +1 -1
  19. package/dist/theme.mjs +47 -0
  20. package/dist/theme.mjs.map +1 -1
  21. package/exports/_visual-editing.ts +1 -0
  22. package/package.json +49 -162
  23. package/src/core/_compat.ts +30 -0
  24. package/src/core/components/autocomplete/autocomplete.tsx +11 -4
  25. package/src/core/components/autocomplete/autocompleteOption.tsx +1 -0
  26. package/src/core/components/breadcrumbs/breadcrumbs.tsx +1 -0
  27. package/src/core/components/dialog/dialog.tsx +3 -0
  28. package/src/core/components/hotkeys/hotkeys.tsx +1 -0
  29. package/src/core/components/menu/menu.test.tsx +6 -4
  30. package/src/core/components/menu/menu.tsx +3 -2
  31. package/src/core/components/menu/menuButton.tsx +8 -0
  32. package/src/core/components/menu/menuGroup.tsx +5 -2
  33. package/src/core/components/menu/menuItem.tsx +4 -0
  34. package/src/core/components/menu/useMenuController.ts +6 -4
  35. package/src/core/components/skeleton/skeleton.tsx +2 -1
  36. package/src/core/components/tab/tab.tsx +1 -0
  37. package/src/core/components/tab/tabList.tsx +1 -0
  38. package/src/core/components/toast/toast.test.tsx +9 -4
  39. package/src/core/components/tree/tree.tsx +1 -0
  40. package/src/core/components/tree/treeGroup.tsx +1 -0
  41. package/src/core/components/tree/treeItem.tsx +2 -2
  42. package/src/core/hooks/useClickOutside.test.tsx +43 -15
  43. package/src/core/hooks/useClickOutside.ts +1 -1
  44. package/src/core/hooks/useClickOutsideEvent.test.tsx +8 -4
  45. package/src/core/hooks/useDelayed.test.ts +7 -6
  46. package/src/core/hooks/useElementRect/useElementRect.ts +1 -0
  47. package/src/core/hooks/useForwardedRef.ts +1 -0
  48. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +2 -1
  49. package/src/core/hooks/usePrefersDark.hydration.test.tsx +7 -5
  50. package/src/core/hooks/usePrefersDark.test.tsx +3 -1
  51. package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +7 -5
  52. package/src/core/hooks/usePrefersReducedMotion.test.tsx +3 -1
  53. package/src/core/lib/createGlobalScopedContext.ts +1 -0
  54. package/src/core/lib/globalScope.ts +1 -0
  55. package/src/core/observers/elementSizeObserver.ts +1 -0
  56. package/src/core/primitives/avatar/avatar.tsx +1 -2
  57. package/src/core/primitives/avatar/avatarStack.tsx +1 -0
  58. package/src/core/primitives/badge/badge.test.tsx +3 -2
  59. package/src/core/primitives/badge/badge.tsx +2 -1
  60. package/src/core/primitives/box/box.tsx +2 -1
  61. package/src/core/primitives/button/button.test.tsx +3 -2
  62. package/src/core/primitives/button/button.tsx +2 -0
  63. package/src/core/primitives/button/styles.ts +1 -0
  64. package/src/core/primitives/card/card.tsx +1 -5
  65. package/src/core/primitives/card/types.ts +1 -0
  66. package/src/core/primitives/code/refractor.tsx +2 -0
  67. package/src/core/primitives/flex/flex.tsx +1 -3
  68. package/src/core/primitives/inline/inline.tsx +1 -0
  69. package/src/core/primitives/popover/popover.tsx +12 -3
  70. package/src/core/primitives/popover/popoverCard.tsx +1 -0
  71. package/src/core/primitives/popover/types.ts +0 -1
  72. package/src/core/primitives/stack/styles.ts +1 -0
  73. package/src/core/primitives/textInput/textInput.tsx +2 -0
  74. package/src/core/primitives/tooltip/tooltip.test.tsx +82 -49
  75. package/src/core/primitives/tooltip/tooltip.tsx +5 -0
  76. package/src/core/primitives/tooltip/tooltipCard.tsx +1 -0
  77. package/src/core/primitives/tooltip/tooltipDelayGroup/types.ts +2 -0
  78. package/src/core/styles/flex/types.ts +0 -1
  79. package/src/core/styles/font/responsiveFont.ts +0 -3
  80. package/src/core/styles/font/types.ts +1 -3
  81. package/src/core/styles/grid/gridStyle.ts +1 -0
  82. package/src/core/styles/margin/marginStyle.ts +1 -0
  83. package/src/core/styles/margin/marginsStyle.test.ts +2 -1
  84. package/src/core/styles/padding/paddingStyle.test.ts +2 -1
  85. package/src/core/styles/padding/paddingStyle.ts +1 -0
  86. package/src/core/theme/theme.test.tsx +7 -3
  87. package/src/core/theme/useRootTheme.ts +1 -0
  88. package/src/core/theme/useTheme.ts +2 -0
  89. package/src/core/utils/arrow/arrow.tsx +1 -0
  90. package/src/core/utils/boundaryElement/boundaryElement.test.tsx +9 -4
  91. package/src/core/utils/conditionalWrapper/conditionalWrapper.tsx +1 -0
  92. package/src/core/utils/getElementRef.ts +5 -0
  93. package/src/core/utils/layer/getLayerContext.test.ts +2 -0
  94. package/src/core/utils/layer/layer.test.tsx +9 -4
  95. package/src/core/utils/layer/layer.tsx +1 -0
  96. package/src/core/utils/layer/useLayer.ts +2 -0
  97. package/src/core/utils/portal/portal.test.tsx +9 -4
  98. package/src/core/utils/portal/portalProvider.tsx +4 -3
  99. package/src/core/utils/virtualList/virtualList.tsx +2 -1
  100. package/src/theme/build/_deprecated/color/_selectable/createSelectableTones.ts +10 -0
  101. package/src/theme/build/_deprecated/color/_solid/createSolidTones.ts +4 -0
  102. package/src/theme/build/_deprecated/color/button/createButtonModes.ts +5 -0
  103. package/src/theme/build/_deprecated/color/button/createButtonTones.ts +5 -0
  104. package/src/theme/build/_deprecated/color/card/createCardStates.ts +6 -0
  105. package/src/theme/build/_deprecated/color/color.test.ts +5 -1
  106. package/src/theme/build/_deprecated/color/defaults.ts +1 -0
  107. package/src/theme/build/_deprecated/color/factory.ts +36 -0
  108. package/src/theme/build/_deprecated/color/input/createInputModes.ts +5 -0
  109. package/src/theme/build/_deprecated/color/muted/createMuted.ts +4 -0
  110. package/src/theme/build/_deprecated/color/spot/createSpot.ts +3 -0
  111. package/src/theme/build/buildColorTheme.test.ts +2 -0
  112. package/src/theme/build/buildColorTheme.ts +7 -0
  113. package/src/theme/build/buildTheme.test.ts +2 -0
  114. package/src/theme/build/lib/color-fns/color-fns.test.ts +3 -1
  115. package/src/theme/build/merge.ts +5 -0
  116. package/src/theme/build/mixThemeColor.test.ts +2 -0
  117. package/src/theme/build/renderColorTheme.ts +6 -0
  118. package/src/theme/build/renderColorValue.ts +0 -2
  119. package/src/theme/build/resolveColorTokens.ts +6 -0
  120. package/src/theme/build/theme.test.ts +2 -0
  121. package/src/theme/config/helpers.ts +5 -0
  122. package/src/theme/config/system.ts +2 -0
  123. package/src/theme/config/tokens/color/types.ts +6 -4
  124. package/src/theme/config/tokens/parseTokenKey.test.ts +2 -0
  125. package/src/theme/config/tokens/parseTokenValue.test.ts +2 -0
  126. package/src/theme/config/tokens/parseTokenValue.ts +1 -0
  127. package/src/theme/getScopedTheme.ts +5 -0
  128. package/src/theme/system/color/_helpers.ts +4 -0
  129. package/src/theme/system/theme.ts +4 -0
  130. package/src/theme/system/v0/color/_system.ts +1 -0
  131. package/src/theme/system/v0/color/button.ts +14 -0
  132. package/src/theme/system/v0/color/card.ts +6 -0
  133. package/src/theme/system/v0/color/color.ts +11 -0
  134. package/src/theme/system/v0/color/input.ts +6 -0
  135. package/src/theme/system/v0/color/muted.ts +11 -0
  136. package/src/theme/system/v0/color/selectable.ts +11 -0
  137. package/src/theme/system/v0/color/solid.ts +11 -0
  138. package/src/theme/system/v0/color/spot.ts +1 -0
  139. package/src/theme/versioning/getTheme_v2.ts +15 -0
  140. package/src/theme/versioning/themeColor_v0_v2.ts +7 -0
  141. package/src/theme/versioning/themeColor_v2_v2_9.ts +1 -0
  142. package/src/theme/versioning/v0_v2.ts +13 -1
  143. package/src/theme/versioning/v2_v0.ts +15 -0
  144. package/src/core/__workshop__/constants.ts +0 -293
  145. package/src/core/components/autocomplete/__mocks__/apiStore.ts +0 -49
  146. package/src/core/components/autocomplete/__mocks__/countries.ts +0 -245
  147. package/src/core/components/autocomplete/__workshop__/async.tsx +0 -156
  148. package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +0 -137
  149. package/src/core/components/autocomplete/__workshop__/custom.tsx +0 -89
  150. package/src/core/components/autocomplete/__workshop__/example.tsx +0 -79
  151. package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +0 -36
  152. package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +0 -294
  153. package/src/core/components/autocomplete/__workshop__/index.ts +0 -39
  154. package/src/core/components/autocomplete/__workshop__/types.ts +0 -4
  155. package/src/core/components/breadcrumbs/__workshop__/example.tsx +0 -62
  156. package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -14
  157. package/src/core/components/dialog/__workshop__/activate.tsx +0 -134
  158. package/src/core/components/dialog/__workshop__/autoFocus.tsx +0 -29
  159. package/src/core/components/dialog/__workshop__/index.ts +0 -19
  160. package/src/core/components/dialog/__workshop__/layering.tsx +0 -41
  161. package/src/core/components/dialog/__workshop__/nested.tsx +0 -72
  162. package/src/core/components/dialog/__workshop__/onScroll.tsx +0 -39
  163. package/src/core/components/dialog/__workshop__/panes.tsx +0 -82
  164. package/src/core/components/dialog/__workshop__/position.tsx +0 -30
  165. package/src/core/components/dialog/__workshop__/props.tsx +0 -75
  166. package/src/core/components/dialog/__workshop__/provider.tsx +0 -11
  167. package/src/core/components/dialog/__workshop__/wrapped.tsx +0 -76
  168. package/src/core/components/hotkeys/__workshop__/index.ts +0 -14
  169. package/src/core/components/hotkeys/__workshop__/plain.tsx +0 -9
  170. package/src/core/components/menu/__workshop__/asComponent.tsx +0 -45
  171. package/src/core/components/menu/__workshop__/avatarMenu.tsx +0 -51
  172. package/src/core/components/menu/__workshop__/closableMenuButton.tsx +0 -46
  173. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +0 -134
  174. package/src/core/components/menu/__workshop__/customMenuItem.tsx +0 -45
  175. package/src/core/components/menu/__workshop__/customSelectedState.tsx +0 -39
  176. package/src/core/components/menu/__workshop__/disableFocusOnClose.tsx +0 -40
  177. package/src/core/components/menu/__workshop__/groups.tsx +0 -156
  178. package/src/core/components/menu/__workshop__/index.ts +0 -89
  179. package/src/core/components/menu/__workshop__/menuButton.tsx +0 -80
  180. package/src/core/components/menu/__workshop__/menuGroupRight.tsx +0 -65
  181. package/src/core/components/menu/__workshop__/nestedMenu.tsx +0 -22
  182. package/src/core/components/menu/__workshop__/onCloseMenuButton.tsx +0 -41
  183. package/src/core/components/menu/__workshop__/selectedItem.tsx +0 -69
  184. package/src/core/components/menu/__workshop__/shouldFocus.tsx +0 -47
  185. package/src/core/components/menu/__workshop__/tones.tsx +0 -25
  186. package/src/core/components/menu/__workshop__/withoutArrow.tsx +0 -32
  187. package/src/core/components/skeleton/__workshop__/delay.tsx +0 -70
  188. package/src/core/components/skeleton/__workshop__/index.ts +0 -11
  189. package/src/core/components/skeleton/__workshop__/skeleton.tsx +0 -64
  190. package/src/core/components/tab/__workshop__/example.tsx +0 -79
  191. package/src/core/components/tab/__workshop__/index.ts +0 -14
  192. package/src/core/components/toast/__workshop__/hook.tsx +0 -71
  193. package/src/core/components/toast/__workshop__/index.ts +0 -19
  194. package/src/core/components/toast/__workshop__/toast.tsx +0 -26
  195. package/src/core/components/tree/__workshop__/basic.perf.ts +0 -19
  196. package/src/core/components/tree/__workshop__/basic.tsx +0 -105
  197. package/src/core/components/tree/__workshop__/index.ts +0 -21
  198. package/src/core/components/tree/__workshop__/tabFromElement.tsx +0 -84
  199. package/src/core/hooks/useElementRect/__workshop__/example.tsx +0 -32
  200. package/src/core/hooks/useElementRect/__workshop__/index.ts +0 -14
  201. package/src/core/hooks/useMediaIndex/__workshop__/index.ts +0 -14
  202. package/src/core/hooks/useMediaIndex/__workshop__/test.tsx +0 -14
  203. package/src/core/primitives/avatar/__workshop__/asButton.tsx +0 -14
  204. package/src/core/primitives/avatar/__workshop__/index.ts +0 -29
  205. package/src/core/primitives/avatar/__workshop__/stack.tsx +0 -25
  206. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +0 -63
  207. package/src/core/primitives/avatar/__workshop__/withinMenuItem.tsx +0 -70
  208. package/src/core/primitives/badge/__workshop__/index.ts +0 -19
  209. package/src/core/primitives/badge/__workshop__/props.tsx +0 -30
  210. package/src/core/primitives/badge/__workshop__/tones.tsx +0 -21
  211. package/src/core/primitives/box/__workshop__/index.ts +0 -19
  212. package/src/core/primitives/box/__workshop__/props.tsx +0 -20
  213. package/src/core/primitives/box/__workshop__/responsive.tsx +0 -20
  214. package/src/core/primitives/button/__workshop__/custom.tsx +0 -51
  215. package/src/core/primitives/button/__workshop__/customIcons.tsx +0 -30
  216. package/src/core/primitives/button/__workshop__/disabled.tsx +0 -74
  217. package/src/core/primitives/button/__workshop__/index.ts +0 -59
  218. package/src/core/primitives/button/__workshop__/mixedChildren.tsx +0 -12
  219. package/src/core/primitives/button/__workshop__/props.tsx +0 -55
  220. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +0 -36
  221. package/src/core/primitives/button/__workshop__/stacked.tsx +0 -58
  222. package/src/core/primitives/button/__workshop__/styled1.tsx +0 -17
  223. package/src/core/primitives/button/__workshop__/styled2.tsx +0 -19
  224. package/src/core/primitives/button/__workshop__/uploadButton.tsx +0 -28
  225. package/src/core/primitives/card/__workshop__/allTones.tsx +0 -25
  226. package/src/core/primitives/card/__workshop__/asButton.tsx +0 -107
  227. package/src/core/primitives/card/__workshop__/asComponent.tsx +0 -27
  228. package/src/core/primitives/card/__workshop__/checkered.tsx +0 -26
  229. package/src/core/primitives/card/__workshop__/index.ts +0 -18
  230. package/src/core/primitives/card/__workshop__/interactive.tsx +0 -30
  231. package/src/core/primitives/card/__workshop__/listNavigation.tsx +0 -80
  232. package/src/core/primitives/card/__workshop__/props.tsx +0 -53
  233. package/src/core/primitives/card/__workshop__/selected.tsx +0 -94
  234. package/src/core/primitives/card/__workshop__/styled.tsx +0 -14
  235. package/src/core/primitives/checkbox/__workshop__/example.tsx +0 -25
  236. package/src/core/primitives/checkbox/__workshop__/index.ts +0 -13
  237. package/src/core/primitives/checkbox/__workshop__/props.tsx +0 -33
  238. package/src/core/primitives/checkbox/__workshop__/readOnly.tsx +0 -16
  239. package/src/core/primitives/checkbox/__workshop__/tones.tsx +0 -28
  240. package/src/core/primitives/code/__workshop__/index.ts +0 -19
  241. package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +0 -48
  242. package/src/core/primitives/code/__workshop__/props.tsx +0 -21
  243. package/src/core/primitives/container/__workshop__/example.tsx +0 -20
  244. package/src/core/primitives/container/__workshop__/index.ts +0 -8
  245. package/src/core/primitives/flex/__workshop__/example.tsx +0 -34
  246. package/src/core/primitives/flex/__workshop__/gap.tsx +0 -25
  247. package/src/core/primitives/flex/__workshop__/index.ts +0 -11
  248. package/src/core/primitives/grid/__workshop__/index.ts +0 -10
  249. package/src/core/primitives/grid/__workshop__/responsive.tsx +0 -54
  250. package/src/core/primitives/heading/__workshop__/index.ts +0 -19
  251. package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +0 -54
  252. package/src/core/primitives/heading/__workshop__/plain.tsx +0 -32
  253. package/src/core/primitives/inline/__workshop__/index.ts +0 -8
  254. package/src/core/primitives/inline/__workshop__/plain.tsx +0 -27
  255. package/src/core/primitives/kbd/__workshop__/index.ts +0 -8
  256. package/src/core/primitives/kbd/__workshop__/plain.tsx +0 -9
  257. package/src/core/primitives/label/__workshop__/index.ts +0 -19
  258. package/src/core/primitives/label/__workshop__/opticalAlignment.tsx +0 -48
  259. package/src/core/primitives/label/__workshop__/plain.tsx +0 -24
  260. package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +0 -77
  261. package/src/core/primitives/popover/__workshop__/MarginsStory.tsx +0 -31
  262. package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +0 -32
  263. package/src/core/primitives/popover/__workshop__/OpenOnMountStory.tsx +0 -11
  264. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +0 -71
  265. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -71
  266. package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +0 -89
  267. package/src/core/primitives/popover/__workshop__/TestStory.tsx +0 -97
  268. package/src/core/primitives/popover/__workshop__/index.ts +0 -49
  269. package/src/core/primitives/radio/__workshop__/example.tsx +0 -63
  270. package/src/core/primitives/radio/__workshop__/index.ts +0 -11
  271. package/src/core/primitives/radio/__workshop__/plain.tsx +0 -28
  272. package/src/core/primitives/select/__workshop__/index.ts +0 -11
  273. package/src/core/primitives/select/__workshop__/plain.tsx +0 -27
  274. package/src/core/primitives/select/__workshop__/readOnly.tsx +0 -23
  275. package/src/core/primitives/spinner/__workshop__/Props.tsx +0 -15
  276. package/src/core/primitives/spinner/__workshop__/index.ts +0 -14
  277. package/src/core/primitives/stack/__workshop__/index.ts +0 -14
  278. package/src/core/primitives/stack/__workshop__/plain.tsx +0 -32
  279. package/src/core/primitives/switch/__workshop__/example.tsx +0 -23
  280. package/src/core/primitives/switch/__workshop__/index.ts +0 -11
  281. package/src/core/primitives/switch/__workshop__/props.tsx +0 -21
  282. package/src/core/primitives/text/__workshop__/colored.tsx +0 -30
  283. package/src/core/primitives/text/__workshop__/example.tsx +0 -39
  284. package/src/core/primitives/text/__workshop__/index.ts +0 -24
  285. package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +0 -48
  286. package/src/core/primitives/textArea/__workshop__/index.ts +0 -14
  287. package/src/core/primitives/textArea/__workshop__/plain.tsx +0 -50
  288. package/src/core/primitives/textInput/__workshop__/clearButton.tsx +0 -30
  289. package/src/core/primitives/textInput/__workshop__/customValidity.tsx +0 -17
  290. package/src/core/primitives/textInput/__workshop__/index.ts +0 -44
  291. package/src/core/primitives/textInput/__workshop__/plain.tsx +0 -98
  292. package/src/core/primitives/textInput/__workshop__/readOnly.tsx +0 -9
  293. package/src/core/primitives/textInput/__workshop__/states.tsx +0 -53
  294. package/src/core/primitives/textInput/__workshop__/tones.tsx +0 -277
  295. package/src/core/primitives/textInput/__workshop__/typed.tsx +0 -23
  296. package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +0 -102
  297. package/src/core/primitives/tooltip/__workshop__/index.ts +0 -29
  298. package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +0 -74
  299. package/src/core/primitives/tooltip/__workshop__/props.tsx +0 -107
  300. package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +0 -86
  301. package/src/core/theme/__workshop__/build/Root.tsx +0 -367
  302. package/src/core/theme/__workshop__/build/helpers.ts +0 -46
  303. package/src/core/theme/__workshop__/build/story.tsx +0 -465
  304. package/src/core/theme/__workshop__/canvas.tsx +0 -352
  305. package/src/core/theme/__workshop__/color.tsx +0 -62
  306. package/src/core/theme/__workshop__/debug/story.tsx +0 -408
  307. package/src/core/theme/__workshop__/index.ts +0 -39
  308. package/src/core/theme/__workshop__/layer.tsx +0 -78
  309. package/src/core/theme/__workshop__/nestedProvider.tsx +0 -15
  310. package/src/core/utils/boundaryElement/__workshop__/index.ts +0 -14
  311. package/src/core/utils/boundaryElement/__workshop__/plain.tsx +0 -19
  312. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +0 -30
  313. package/src/core/utils/elementQuery/__workshop__/index.ts +0 -14
  314. package/src/core/utils/layer/__workshop__/_debug.tsx +0 -17
  315. package/src/core/utils/layer/__workshop__/index.ts +0 -24
  316. package/src/core/utils/layer/__workshop__/multipleRoots.tsx +0 -49
  317. package/src/core/utils/layer/__workshop__/nested.tsx +0 -98
  318. package/src/core/utils/layer/__workshop__/responsiveZOffset.tsx +0 -13
  319. package/src/core/utils/portal/__workshop__/index.ts +0 -14
  320. package/src/core/utils/portal/__workshop__/named.tsx +0 -63
  321. package/src/core/utils/virtualList/__workshop__/changingProps.tsx +0 -36
  322. package/src/core/utils/virtualList/__workshop__/elementScroll.tsx +0 -24
  323. package/src/core/utils/virtualList/__workshop__/index.ts +0 -29
  324. package/src/core/utils/virtualList/__workshop__/infiniteList.tsx +0 -48
  325. package/src/core/utils/virtualList/__workshop__/windowScrolll.tsx +0 -22
@@ -243,6 +243,7 @@ function _createElementRectValueListener() {
243
243
  subscribe(element, subscriber) {
244
244
  const resizeObserver2 = new _ResizeObserver(([entry]) => {
245
245
  subscriber({
246
+ // oxlint-disable-next-line no-deprecated
246
247
  _contentRect: entry.contentRect,
247
248
  border: {
248
249
  width: entry.borderBoxSize[0].inlineSize,
@@ -380,7 +381,7 @@ function useTheme() {
380
381
  return styledComponents.useTheme();
381
382
  }
382
383
  function useTheme_v2() {
383
- const $ = reactCompilerRuntime.c(2), t0 = styledComponents.useTheme();
384
+ const $ = reactCompilerRuntime.c(2), t0 = /* @__PURE__ */ styledComponents.useTheme();
384
385
  let t1;
385
386
  return $[0] !== t0 ? (t1 = theme.getTheme_v2(t0), $[0] = t0, $[1] = t1) : t1 = $[1], t1;
386
387
  }
@@ -786,6 +787,7 @@ function responsiveGridGapStyle(props) {
786
787
  space
787
788
  } = theme.getTheme_v2(props.theme);
788
789
  return _responsive(media, props.$gap, (gap) => ({
790
+ // oxlint-disable-next-line no-deprecated
789
791
  gridGap: gap ? rem(space[gap]) : void 0
790
792
  }));
791
793
  }
@@ -837,13 +839,7 @@ function responsiveInputPaddingIconRightStyle(props) {
837
839
  $iconRight: !0
838
840
  });
839
841
  }
840
- const ROOT_STYLE = styledComponents.css`
841
- &:not([hidden]) {
842
- display: flex;
843
- }
844
-
845
- align-items: center;
846
- `;
842
+ const ROOT_STYLE = styledComponents.css`&:not([hidden]){display:flex;}align-items:center;`;
847
843
  function textInputRootStyle() {
848
844
  return ROOT_STYLE;
849
845
  }
@@ -856,71 +852,7 @@ function textInputBaseStyle(props) {
856
852
  color,
857
853
  font
858
854
  } = theme.getTheme_v2(props.theme);
859
- return styledComponents.css`
860
- appearance: none;
861
- background: none;
862
- border: 0;
863
- border-radius: 0;
864
- outline: none;
865
- width: 100%;
866
- box-sizing: border-box;
867
- font-family: ${font.text.family};
868
- font-weight: ${$weight && font.text.weights[$weight] || font.text.weights.regular};
869
- margin: 0;
870
- position: relative;
871
- z-index: 1;
872
- display: block;
873
-
874
- /* NOTE: This is a hack to disable Chrome’s autofill styles */
875
- &:-webkit-autofill,
876
- &:-webkit-autofill:hover,
877
- &:-webkit-autofill:focus,
878
- &:-webkit-autofill:active {
879
- -webkit-text-fill-color: var(--input-fg-color) !important;
880
- transition: background-color 5000s;
881
- transition-delay: 86400s /* 24h */;
882
- }
883
-
884
- /* &:is(textarea) */
885
- &[data-as='textarea'] {
886
- resize: none;
887
- }
888
-
889
- color: var(--input-fg-color);
890
-
891
- &::placeholder {
892
- color: var(--input-placeholder-color);
893
- }
894
-
895
- &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
896
- --input-fg-color: ${color.input.default.enabled.fg};
897
- --input-placeholder-color: ${color.input.default.enabled.placeholder};
898
-
899
- /* enabled */
900
- &:not(:invalid):not(:disabled):not(:read-only) {
901
- --input-fg-color: ${color.input.default.enabled.fg};
902
- --input-placeholder-color: ${color.input.default.enabled.placeholder};
903
- }
904
-
905
- /* disabled */
906
- &:not(:invalid):disabled {
907
- --input-fg-color: ${color.input.default.disabled.fg};
908
- --input-placeholder-color: ${color.input.default.disabled.placeholder};
909
- }
910
-
911
- /* invalid */
912
- &:invalid {
913
- --input-fg-color: ${color.input.invalid.enabled.fg};
914
- --input-placeholder-color: ${color.input.invalid.enabled.placeholder};
915
- }
916
-
917
- /* readOnly */
918
- &:read-only {
919
- --input-fg-color: ${color.input.default.readOnly.fg};
920
- --input-placeholder-color: ${color.input.default.readOnly.placeholder};
921
- }
922
- }
923
- `;
855
+ return styledComponents.css`appearance:none;background:none;border:0;border-radius:0;outline:none;width:100%;box-sizing:border-box;font-family:${font.text.family};font-weight:${$weight && font.text.weights[$weight] || font.text.weights.regular};margin:0;position:relative;z-index:1;display:block;&:-webkit-autofill,&:-webkit-autofill:hover,&:-webkit-autofill:focus,&:-webkit-autofill:active{-webkit-text-fill-color:var(--input-fg-color) !important;transition:background-color 5000s;transition-delay:86400s;}&[data-as='textarea']{resize:none;}color:var(--input-fg-color);&::placeholder{color:var(--input-placeholder-color);}&[data-scheme='${$scheme}'][data-tone='${$tone}']{--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};&:not(:invalid):not(:disabled):not(:read-only){--input-fg-color:${color.input.default.enabled.fg};--input-placeholder-color:${color.input.default.enabled.placeholder};}&:not(:invalid):disabled{--input-fg-color:${color.input.default.disabled.fg};--input-placeholder-color:${color.input.default.disabled.placeholder};}&:invalid{--input-fg-color:${color.input.invalid.enabled.fg};--input-placeholder-color:${color.input.invalid.enabled.placeholder};}&:read-only{--input-fg-color:${color.input.default.readOnly.fg};--input-placeholder-color:${color.input.default.readOnly.placeholder};}}`;
924
856
  }
925
857
  function textInputFontSizeStyle(props) {
926
858
  const {
@@ -946,136 +878,33 @@ function textInputRepresentationStyle(props) {
946
878
  color,
947
879
  input
948
880
  } = theme.getTheme_v2(props.theme);
949
- return styledComponents.css`
950
- --input-box-shadow: none;
951
-
952
- position: absolute;
953
- top: 0;
954
- left: 0;
955
- right: 0;
956
- bottom: 0;
957
- display: block;
958
- pointer-events: none;
959
- z-index: 0;
960
-
961
- background-color: var(--card-bg-color);
962
- box-shadow: var(--input-box-shadow);
963
-
964
- border-top-left-radius: ${$hasPrefix ? 0 : void 0};
965
- border-bottom-left-radius: ${$hasPrefix ? 0 : void 0};
966
- border-top-right-radius: ${$hasSuffix ? 0 : void 0};
967
- border-bottom-right-radius: ${$hasSuffix ? 0 : void 0};
968
-
969
- &[data-scheme='${$scheme}'][data-tone='${$tone}'] {
970
- --card-bg-color: ${color.input.default.enabled.bg};
971
- --card-fg-color: ${color.input.default.enabled.fg};
972
-
973
- /* enabled */
974
- *:not(:disabled) + &[data-border] {
975
- --input-box-shadow: ${focusRingBorderStyle({
881
+ return styledComponents.css`--input-box-shadow:none;position:absolute;top:0;left:0;right:0;bottom:0;display:block;pointer-events:none;z-index:0;background-color:var(--card-bg-color);box-shadow:var(--input-box-shadow);border-top-left-radius:${$hasPrefix ? 0 : void 0};border-bottom-left-radius:${$hasPrefix ? 0 : void 0};border-top-right-radius:${$hasSuffix ? 0 : void 0};border-bottom-right-radius:${$hasSuffix ? 0 : void 0};&[data-scheme='${$scheme}'][data-tone='${$tone}']{--card-bg-color:${color.input.default.enabled.bg};--card-fg-color:${color.input.default.enabled.fg};*:not(:disabled) + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
976
882
  color: color.input.default.enabled.border,
977
883
  width: input.border.width
978
- })};
979
- }
980
-
981
- /* invalid */
982
- *:not(:disabled):invalid + & {
983
- --card-bg-color: ${color.input.invalid.enabled.bg};
984
- --card-fg-color: ${color.input.invalid.enabled.fg};
985
-
986
- &[data-border] {
987
- --input-box-shadow: ${focusRingBorderStyle({
884
+ })};}*:not(:disabled):invalid + &{--card-bg-color:${color.input.invalid.enabled.bg};--card-fg-color:${color.input.invalid.enabled.fg};&[data-border]{--input-box-shadow:${focusRingBorderStyle({
988
885
  color: color.input.invalid.enabled.border,
989
886
  width: input.border.width
990
- })};
991
- }
992
- }
993
-
994
- /* focused */
995
- *:not(:disabled):focus + & {
996
- &[data-border] {
997
- --input-box-shadow: ${$unstableDisableFocusRing ? void 0 : focusRingStyle({
887
+ })};}}*:not(:disabled):focus + &{&[data-border]{--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({
998
888
  border: {
999
889
  color: color.input.default.enabled.border,
1000
890
  width: input.border.width
1001
891
  },
1002
892
  focusRing: input.text.focusRing
1003
- })};
1004
- }
1005
-
1006
- &:not([data-border]) {
1007
- --input-box-shadow: ${$unstableDisableFocusRing ? void 0 : focusRingStyle({
893
+ })};}&:not([data-border]){--input-box-shadow:${$unstableDisableFocusRing ? void 0 : focusRingStyle({
1008
894
  focusRing: input.text.focusRing
1009
- })};
1010
- }
1011
- }
1012
-
1013
- /* disabled */
1014
- *:not(:invalid):disabled + & {
1015
- --card-bg-color: ${color.input.default.disabled.bg} !important;
1016
- --card-fg-color: ${color.input.default.disabled.fg} !important;
1017
- --card-icon-color: ${color.input.default.disabled.fg} !important;
1018
-
1019
- &[data-border] {
1020
- --input-box-shadow: ${focusRingBorderStyle({
895
+ })};}}*:not(:invalid):disabled + &{--card-bg-color:${color.input.default.disabled.bg} !important;--card-fg-color:${color.input.default.disabled.fg} !important;--card-icon-color:${color.input.default.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({
1021
896
  color: color.input.default.disabled.border,
1022
897
  width: input.border.width
1023
- })};
1024
- }
1025
- }
1026
-
1027
- *:invalid:disabled + & {
1028
- --card-bg-color: ${color.input.invalid.disabled.bg} !important;
1029
- --card-fg-color: ${color.input.invalid.disabled.fg} !important;
1030
- --card-icon-color: ${color.input.invalid.disabled.fg} !important;
1031
-
1032
- &[data-border] {
1033
- --input-box-shadow: ${focusRingBorderStyle({
898
+ })};}}*:invalid:disabled + &{--card-bg-color:${color.input.invalid.disabled.bg} !important;--card-fg-color:${color.input.invalid.disabled.fg} !important;--card-icon-color:${color.input.invalid.disabled.fg} !important;&[data-border]{--input-box-shadow:${focusRingBorderStyle({
1034
899
  color: color.input.invalid.disabled.border,
1035
900
  width: input.border.width
1036
- })};
1037
- }
1038
- }
1039
-
1040
- /* readOnly */
1041
- *:not(:invalid):read-only + & {
1042
- --card-bg-color: ${color.input.default.readOnly.bg} !important;
1043
- --card-fg-color: ${color.input.default.readOnly.fg} !important;
1044
- }
1045
-
1046
- *:invalid:read-only + & {
1047
- --card-bg-color: ${color.input.invalid.readOnly.bg} !important;
1048
- --card-fg-color: ${color.input.invalid.readOnly.fg} !important;
1049
- }
1050
-
1051
- /* hovered */
1052
- @media (hover: hover) {
1053
- *:not(:disabled):not(:read-only):not(:invalid):hover + & {
1054
- --card-bg-color: ${color.input.default.hovered.bg};
1055
- --card-fg-color: ${color.input.default.hovered.fg};
1056
- }
1057
-
1058
- *:invalid:not(:disabled):not(:read-only):hover + & {
1059
- --card-bg-color: ${color.input.invalid.hovered.bg};
1060
- --card-fg-color: ${color.input.invalid.hovered.fg};
1061
- }
1062
-
1063
- *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {
1064
- --input-box-shadow: ${focusRingBorderStyle({
901
+ })};}}*:not(:invalid):read-only + &{--card-bg-color:${color.input.default.readOnly.bg} !important;--card-fg-color:${color.input.default.readOnly.fg} !important;}*:invalid:read-only + &{--card-bg-color:${color.input.invalid.readOnly.bg} !important;--card-fg-color:${color.input.invalid.readOnly.fg} !important;}@media (hover:hover){*:not(:disabled):not(:read-only):not(:invalid):hover + &{--card-bg-color:${color.input.default.hovered.bg};--card-fg-color:${color.input.default.hovered.fg};}*:invalid:not(:disabled):not(:read-only):hover + &{--card-bg-color:${color.input.invalid.hovered.bg};--card-fg-color:${color.input.invalid.hovered.fg};}*:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
1065
902
  color: color.input.default.hovered.border,
1066
903
  width: input.border.width
1067
- })};
1068
- }
1069
-
1070
- *:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border] {
1071
- --input-box-shadow: ${focusRingBorderStyle({
904
+ })};}*:invalid:not(:disabled):not(:read-only):not(:focus):hover + &[data-border]{--input-box-shadow:${focusRingBorderStyle({
1072
905
  color: color.input.invalid.hovered.border,
1073
906
  width: input.border.width
1074
- })};
1075
- }
1076
- }
1077
- }
1078
- `;
907
+ })};}}}`;
1079
908
  }
1080
909
  function responsiveMarginStyle(props) {
1081
910
  const {
@@ -1130,37 +959,7 @@ function labelBaseStyle(props) {
1130
959
  } = props, {
1131
960
  font
1132
961
  } = theme.getTheme_v2(props.theme);
1133
- return styledComponents.css`
1134
- text-transform: uppercase;
1135
-
1136
- ${$accent && styledComponents.css`
1137
- color: var(--card-accent-fg-color);
1138
- `}
1139
-
1140
- ${$muted && styledComponents.css`
1141
- color: var(--card-muted-fg-color);
1142
- `}
1143
-
1144
- & code {
1145
- font-family: ${font.code.family};
1146
- border-radius: 1px;
1147
- }
1148
-
1149
- & a {
1150
- text-decoration: none;
1151
- border-radius: 1px;
1152
- }
1153
-
1154
- & svg {
1155
- /* Certain popular CSS libraries changes the defaults for SVG display */
1156
- /* Make sure SVGs are rendered as inline elements */
1157
- display: inline;
1158
- }
1159
-
1160
- & [data-sanity-icon] {
1161
- vertical-align: baseline;
1162
- }
1163
- `;
962
+ return styledComponents.css`text-transform:uppercase;${$accent && styledComponents.css`color:var(--card-accent-fg-color);`} ${$muted && styledComponents.css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;}`;
1164
963
  }
1165
964
  const StyledLabel = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1166
965
  displayName: "StyledLabel",
@@ -1580,66 +1379,7 @@ function textBaseStyle(props) {
1580
1379
  } = props, {
1581
1380
  font
1582
1381
  } = theme.getTheme_v2(props.theme);
1583
- return styledComponents.css`
1584
- color: var(--card-fg-color);
1585
-
1586
- ${$accent && styledComponents.css`
1587
- color: var(--card-accent-fg-color);
1588
- `}
1589
-
1590
- ${$muted && styledComponents.css`
1591
- color: var(--card-muted-fg-color);
1592
- `}
1593
-
1594
- & code {
1595
- font-family: ${font.code.family};
1596
- border-radius: 1px;
1597
- background-color: var(--card-code-bg-color);
1598
- color: var(--card-code-fg-color);
1599
- }
1600
-
1601
- & a {
1602
- text-decoration: none;
1603
- border-radius: 1px;
1604
- color: var(--card-link-color);
1605
- outline: none;
1606
-
1607
- @media (hover: hover) {
1608
- &:hover {
1609
- text-decoration: underline;
1610
- }
1611
- }
1612
-
1613
- &:focus {
1614
- box-shadow:
1615
- 0 0 0 1px var(--card-bg-color),
1616
- 0 0 0 3px var(--card-focus-ring-color);
1617
- }
1618
-
1619
- &:focus:not(:focus-visible) {
1620
- box-shadow: none;
1621
- }
1622
- }
1623
-
1624
- & strong {
1625
- font-weight: ${font.text.weights.bold};
1626
- }
1627
-
1628
- & svg {
1629
- /* Certain popular CSS libraries changes the defaults for SVG display */
1630
- /* Make sure SVGs are rendered as inline elements */
1631
- display: inline;
1632
- }
1633
-
1634
- & [data-sanity-icon] {
1635
- vertical-align: baseline;
1636
- color: var(--card-icon-color);
1637
-
1638
- & path {
1639
- vector-effect: non-scaling-stroke !important;
1640
- }
1641
- }
1642
- `;
1382
+ return styledComponents.css`color:var(--card-fg-color);${$accent && styledComponents.css`color:var(--card-accent-fg-color);`} ${$muted && styledComponents.css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;background-color:var(--card-code-bg-color);color:var(--card-code-fg-color);}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.text.weights.bold};}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;color:var(--card-icon-color);& path{vector-effect:non-scaling-stroke !important;}}`;
1643
1383
  }
1644
1384
  const StyledText = /* @__PURE__ */ styledComponents.styled.div.withConfig({
1645
1385
  displayName: "StyledText",
@@ -1835,45 +1575,7 @@ function buttonBaseStyles(props) {
1835
1575
  } = props, {
1836
1576
  style
1837
1577
  } = theme.getTheme_v2(props.theme);
1838
- return styledComponents.css`
1839
- ${style?.button};
1840
-
1841
- -webkit-font-smoothing: inherit;
1842
- appearance: none;
1843
- display: inline-flex;
1844
- align-items: center;
1845
- font: inherit;
1846
- border: 0;
1847
- outline: none;
1848
- user-select: none;
1849
- text-decoration: none;
1850
- border: 0;
1851
- box-sizing: border-box;
1852
- padding: 0;
1853
- margin: 0;
1854
- white-space: nowrap;
1855
- text-align: left;
1856
- position: relative;
1857
- vertical-align: top;
1858
-
1859
- ${$width === "fill" && styledComponents.css`
1860
- width: -moz-available;
1861
- width: -webkit-fill-available;
1862
- width: stretch;
1863
- `}
1864
-
1865
- & > span {
1866
- display: block;
1867
- flex: 1;
1868
- min-width: 0;
1869
- border-radius: inherit;
1870
- }
1871
-
1872
- &::-moz-focus-inner {
1873
- border: 0;
1874
- padding: 0;
1875
- }
1876
- `;
1578
+ return styledComponents.css`${style?.button};-webkit-font-smoothing:inherit;appearance:none;display:inline-flex;align-items:center;font:inherit;border:0;outline:none;user-select:none;text-decoration:none;border:0;box-sizing:border-box;padding:0;margin:0;white-space:nowrap;text-align:left;position:relative;vertical-align:top;${$width === "fill" && styledComponents.css`width:-moz-available;width:-webkit-fill-available;width:stretch;`} & > span{display:block;flex:1;min-width:0;border-radius:inherit;}&::-moz-focus-inner{border:0;padding:0;}`;
1877
1579
  }
1878
1580
  function combineBoxShadow(...boxShadows) {
1879
1581
  return boxShadows.filter(Boolean).join(",");
@@ -2002,36 +1704,7 @@ function cardBaseStyle(props) {
2002
1704
  } = props, {
2003
1705
  space
2004
1706
  } = theme.getTheme_v2(props.theme);
2005
- return styledComponents.css`
2006
- ${$checkered && styledComponents.css`
2007
- background-size: ${space[3]}px ${space[3]}px;
2008
- background-position: 50% 50%;
2009
- background-image: var(--card-bg-image);
2010
- `}
2011
-
2012
- &[data-as='button'] {
2013
- -webkit-font-smoothing: inherit;
2014
- appearance: none;
2015
- outline: none;
2016
- font: inherit;
2017
- text-align: inherit;
2018
- border: 0;
2019
- width: -moz-available;
2020
- width: -webkit-fill-available;
2021
- width: stretch;
2022
- }
2023
-
2024
- /* &:is(a) */
2025
- &[data-as='a'] {
2026
- outline: none;
2027
- text-decoration: none;
2028
- }
2029
-
2030
- /* &:is(pre) */
2031
- &[data-as='pre'] {
2032
- font: inherit;
2033
- }
2034
- `;
1707
+ return styledComponents.css`${$checkered && styledComponents.css`background-size:${space[3]}px ${space[3]}px;background-position:50% 50%;background-image:var(--card-bg-image);`} &[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{outline:none;text-decoration:none;}&[data-as='pre']{font:inherit;}`;
2035
1708
  }
2036
1709
  function cardColorStyle(props) {
2037
1710
  const {
@@ -2046,100 +1719,15 @@ function cardColorStyle(props) {
2046
1719
  width: card.border.width,
2047
1720
  color: "var(--card-border-color)"
2048
1721
  };
2049
- return styledComponents.css`
2050
- color-scheme: ${color._dark ? "dark" : "light"};
2051
-
2052
- ${_cardColorStyle(color, color, $checkered)}
2053
-
2054
- background-color: ${$muted ? "var(--card-muted-bg-color)" : "var(--card-bg-color)"};
2055
- color: var(--card-fg-color);
2056
-
2057
- /* &:is(button) */
2058
- &[data-as='button'] {
2059
- --card-focus-ring-box-shadow: none;
2060
-
2061
- cursor: default;
2062
- box-shadow: var(--card-focus-ring-box-shadow);
2063
-
2064
- &:disabled {
2065
- ${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}
2066
- }
2067
-
2068
- &:not(:disabled) {
2069
- &[data-pressed] {
2070
- ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}
2071
- }
2072
-
2073
- &[data-selected] {
2074
- ${_cardColorStyle(color, color.selectable.default.selected, $checkered)}
2075
- }
2076
-
2077
- @media (hover: hover) {
2078
- &:not([data-pressed]):not([data-selected]) {
2079
- &[data-hovered],
2080
- &:hover {
2081
- ${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}
2082
- }
2083
-
2084
- &:active {
2085
- ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}
2086
- }
2087
- }
2088
- }
2089
-
2090
- &:focus-visible {
2091
- --card-focus-ring-box-shadow: ${$focusRing ? focusRingStyle({
1722
+ return styledComponents.css`color-scheme:${color._dark ? "dark" : "light"};${_cardColorStyle(color, color, $checkered)} background-color:${$muted ? "var(--card-muted-bg-color)" : "var(--card-bg-color)"};color:var(--card-fg-color);&[data-as='button']{--card-focus-ring-box-shadow:none;cursor:default;box-shadow:var(--card-focus-ring-box-shadow);&:disabled{${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}}&:not(:disabled){&[data-pressed]{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}&[data-selected]{${_cardColorStyle(color, color.selectable.default.selected, $checkered)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}}&:active{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}}}&:focus-visible{--card-focus-ring-box-shadow:${$focusRing ? focusRingStyle({
2092
1723
  base: color,
2093
1724
  border: border2,
2094
1725
  focusRing: card.focusRing
2095
- }) : void 0};
2096
- }
2097
- }
2098
- }
2099
-
2100
- /* &:is(a) */
2101
- &[data-as='a'] {
2102
- cursor: pointer;
2103
- box-shadow: var(--card-focus-ring-box-shadow);
2104
-
2105
- &[data-disabled] {
2106
- ${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}
2107
- }
2108
-
2109
- &:not([data-disabled]) {
2110
- &[data-pressed] {
2111
- ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}
2112
- }
2113
-
2114
- &[data-selected] {
2115
- ${_cardColorStyle(color, color.selectable.default.selected, $checkered)}
2116
- }
2117
-
2118
- @media (hover: hover) {
2119
- &:not([data-pressed]):not([data-selected]) {
2120
- &[data-hovered],
2121
- &:hover {
2122
- ${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}
2123
- }
2124
-
2125
- &:active {
2126
- ${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}
2127
- }
2128
- }
2129
- }
2130
-
2131
- &:focus-visible {
2132
- --card-focus-ring-box-shadow: ${$focusRing ? focusRingStyle({
1726
+ }) : void 0};}}}&[data-as='a']{cursor:pointer;box-shadow:var(--card-focus-ring-box-shadow);&[data-disabled]{${_cardColorStyle(color, color.selectable.default.disabled, $checkered)}}&:not([data-disabled]){&[data-pressed]{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}&[data-selected]{${_cardColorStyle(color, color.selectable.default.selected, $checkered)}}@media (hover:hover){&:not([data-pressed]):not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, color.selectable.default.hovered, $checkered)}}&:active{${_cardColorStyle(color, color.selectable.default.pressed, $checkered)}}}}&:focus-visible{--card-focus-ring-box-shadow:${$focusRing ? focusRingStyle({
2133
1727
  base: color,
2134
1728
  border: border2,
2135
1729
  focusRing: card.focusRing
2136
- }) : void 0};
2137
- }
2138
- }
2139
- }
2140
-
2141
- ${style?.card?.root}
2142
- `;
1730
+ }) : void 0};}}}${style?.card?.root}`;
2143
1731
  }
2144
1732
  const StyledCard = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
2145
1733
  displayName: "StyledCard",
@@ -2173,10 +1761,7 @@ const StyledCard = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
2173
1761
  });
2174
1762
  Card.displayName = "ForwardRef(Card)";
2175
1763
  function checkboxBaseStyles() {
2176
- return styledComponents.css`
2177
- position: relative;
2178
- display: inline-block;
2179
- `;
1764
+ return styledComponents.css`position:relative;display:inline-block;`;
2180
1765
  }
2181
1766
  function inputElementStyles(props) {
2182
1767
  const {
@@ -2186,86 +1771,23 @@ function inputElementStyles(props) {
2186
1771
  } = theme.getTheme_v2(props.theme), {
2187
1772
  focusRing
2188
1773
  } = input.checkbox;
2189
- return styledComponents.css`
2190
- position: absolute;
2191
- top: 0;
2192
- left: 0;
2193
- width: 100%;
2194
- height: 100%;
2195
- outline: none;
2196
- opacity: 0;
2197
- z-index: 1;
2198
- padding: 0;
2199
- margin: 0;
2200
-
2201
- & + span {
2202
- position: relative;
2203
- display: block;
2204
- height: ${rem(input.checkbox.size)};
2205
- width: ${rem(input.checkbox.size)};
2206
- box-sizing: border-box;
2207
- box-shadow: ${focusRingBorderStyle({
1774
+ return styledComponents.css`position:absolute;top:0;left:0;width:100%;height:100%;outline:none;opacity:0;z-index:1;padding:0;margin:0;& + span{position:relative;display:block;height:${rem(input.checkbox.size)};width:${rem(input.checkbox.size)};box-sizing:border-box;box-shadow:${focusRingBorderStyle({
2208
1775
  color: color.input.default.enabled.border,
2209
1776
  width: input.border.width
2210
- })};
2211
- border-radius: ${rem(radius[2])};
2212
- line-height: 1;
2213
- background-color: ${color.input.default.enabled.bg};
2214
-
2215
- & > svg {
2216
- display: block;
2217
- position: absolute;
2218
- opacity: 0;
2219
- height: 100%;
2220
- width: 100%;
2221
-
2222
- & > path {
2223
- vector-effect: non-scaling-stroke;
2224
- stroke-width: 1.5px !important;
2225
- }
2226
- }
2227
- }
2228
-
2229
- &:checked + span {
2230
- background: ${color.input.default.enabled.fg};
2231
- box-shadow: ${focusRingBorderStyle({
1777
+ })};border-radius:${rem(radius[2])};line-height:1;background-color:${color.input.default.enabled.bg};& > svg{display:block;position:absolute;opacity:0;height:100%;width:100%;& > path{vector-effect:non-scaling-stroke;stroke-width:1.5px !important;}}}&:checked + span{background:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
2232
1778
  color: color.input.default.enabled.fg,
2233
1779
  width: input.border.width
2234
- })};
2235
- color: ${color.input.default.enabled.bg};
2236
- }
2237
-
2238
- /* focus */
2239
- &:not(:disabled):focus:focus-visible + span {
2240
- box-shadow: ${focusRingStyle({
1780
+ })};color:${color.input.default.enabled.bg};}&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({
2241
1781
  focusRing
2242
- })};
2243
- }
2244
-
2245
- /* focus when checked - uses a different offset */
2246
- &:not(:disabled):focus:focus-visible&:checked + span {
2247
- box-shadow: ${focusRingStyle({
1782
+ })};}&:not(:disabled):focus:focus-visible&:checked + span{box-shadow:${focusRingStyle({
2248
1783
  focusRing: {
2249
1784
  width: 1,
2250
1785
  offset: 1
2251
1786
  }
2252
- })};
2253
- }
2254
-
2255
- &[data-error] + span {
2256
- background-color: ${color.input.invalid.enabled.border};
2257
- box-shadow: ${focusRingBorderStyle({
1787
+ })};}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
2258
1788
  width: input.border.width,
2259
1789
  color: color.input.invalid.enabled.muted.bg
2260
- })};
2261
- color: ${color.input.default.disabled.fg};
2262
- }
2263
- &[data-error]&:checked + span {
2264
- background-color: ${color.input.invalid.enabled.muted.bg};
2265
- color: ${color.input.default.enabled.bg};
2266
- }
2267
- &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {
2268
- box-shadow: ${focusRingStyle({
1790
+ })};color:${color.input.default.disabled.fg};}&[data-error]&:checked + span{background-color:${color.input.invalid.enabled.muted.bg};color:${color.input.default.enabled.bg};}&[data-error]&:checked&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({
2269
1791
  border: {
2270
1792
  width: input.border.width,
2271
1793
  color: color.input.invalid.readOnly.muted.bg
@@ -2274,41 +1796,13 @@ function inputElementStyles(props) {
2274
1796
  width: 1,
2275
1797
  offset: 1
2276
1798
  }
2277
- })};
2278
- }
2279
-
2280
- &:disabled + span {
2281
- background-color: ${color.input.default.disabled.bg};
2282
- box-shadow: ${focusRingBorderStyle({
1799
+ })};}&:disabled + span{background-color:${color.input.default.disabled.bg};box-shadow:${focusRingBorderStyle({
2283
1800
  width: input.border.width,
2284
1801
  color: color.input.default.disabled.border
2285
- })};
2286
- color: ${color.input.default.disabled.fg};
2287
- }
2288
- &:disabled&:checked + span {
2289
- background-color: ${color.input.default.disabled.muted.bg};
2290
- }
2291
-
2292
- &[data-read-only] + span {
2293
- background-color: ${color.input.default.readOnly.bg};
2294
- box-shadow: ${focusRingBorderStyle({
1802
+ })};color:${color.input.default.disabled.fg};}&:disabled&:checked + span{background-color:${color.input.default.disabled.muted.bg};}&[data-read-only] + span{background-color:${color.input.default.readOnly.bg};box-shadow:${focusRingBorderStyle({
2295
1803
  width: input.border.width,
2296
1804
  color: color.input.default.readOnly.border
2297
- })};
2298
- color: ${color.input.default.readOnly.fg};
2299
- }
2300
-
2301
- &[data-read-only]&:checked + span {
2302
- background-color: ${color.input.default.readOnly.muted.bg};
2303
- }
2304
-
2305
- &:checked + span > svg:first-child {
2306
- opacity: 1;
2307
- }
2308
- &:indeterminate + span > svg:last-child {
2309
- opacity: 1;
2310
- }
2311
- `;
1805
+ })};color:${color.input.default.readOnly.fg};}&[data-read-only]&:checked + span{background-color:${color.input.default.readOnly.muted.bg};}&:checked + span > svg:first-child{opacity:1;}&:indeterminate + span > svg:last-child{opacity:1;}`;
2312
1806
  }
2313
1807
  const StyledCheckbox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2314
1808
  displayName: "StyledCheckbox",
@@ -2471,33 +1965,7 @@ function codeSyntaxHighlightingStyle({
2471
1965
  };
2472
1966
  }
2473
1967
  function codeBaseStyle() {
2474
- return styledComponents.css`
2475
- color: var(--card-code-fg-color);
2476
-
2477
- & code {
2478
- font-family: inherit;
2479
-
2480
- &.refractor .token {
2481
- ${codeSyntaxHighlightingStyle}
2482
- }
2483
- }
2484
-
2485
- & a {
2486
- color: inherit;
2487
- text-decoration: underline;
2488
- border-radius: 1px;
2489
- }
2490
-
2491
- & svg {
2492
- /* Certain popular CSS libraries changes the defaults for SVG display */
2493
- /* Make sure SVGs are rendered as inline elements */
2494
- display: inline;
2495
- }
2496
-
2497
- & [data-sanity-icon] {
2498
- vertical-align: baseline;
2499
- }
2500
- `;
1968
+ return styledComponents.css`color:var(--card-code-fg-color);& code{font-family:inherit;&.refractor .token{${codeSyntaxHighlightingStyle}}}& a{color:inherit;text-decoration:underline;border-radius:1px;}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;}`;
2501
1969
  }
2502
1970
  const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
2503
1971
  return require("./refractor.js");
@@ -2588,57 +2056,7 @@ function headingBaseStyle(props) {
2588
2056
  } = props, {
2589
2057
  font
2590
2058
  } = theme.getTheme_v2(props.theme);
2591
- return styledComponents.css`
2592
- ${$accent && styledComponents.css`
2593
- color: var(--card-accent-fg-color);
2594
- `}
2595
-
2596
- ${$muted && styledComponents.css`
2597
- color: var(--card-muted-fg-color);
2598
- `}
2599
-
2600
- & code {
2601
- font-family: ${font.code.family};
2602
- border-radius: 1px;
2603
- }
2604
-
2605
- & a {
2606
- text-decoration: none;
2607
- border-radius: 1px;
2608
- color: var(--card-link-color);
2609
- outline: none;
2610
-
2611
- @media (hover: hover) {
2612
- &:hover {
2613
- text-decoration: underline;
2614
- }
2615
- }
2616
-
2617
- &:focus {
2618
- box-shadow:
2619
- 0 0 0 1px var(--card-bg-color),
2620
- 0 0 0 3px var(--card-focus-ring-color);
2621
- }
2622
-
2623
- &:focus:not(:focus-visible) {
2624
- box-shadow: none;
2625
- }
2626
- }
2627
-
2628
- & strong {
2629
- font-weight: ${font.heading.weights.bold};
2630
- }
2631
-
2632
- & svg {
2633
- /* Certain popular CSS libraries changes the defaults for SVG display */
2634
- /* Make sure SVGs are rendered as inline elements */
2635
- display: inline;
2636
- }
2637
-
2638
- & [data-sanity-icon] {
2639
- vertical-align: baseline;
2640
- }
2641
- `;
2059
+ return styledComponents.css`${$accent && styledComponents.css`color:var(--card-accent-fg-color);`} ${$muted && styledComponents.css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.heading.weights.bold};}& svg{display:inline;}& [data-sanity-icon]{vertical-align:baseline;}`;
2642
2060
  }
2643
2061
  const StyledHeading = /* @__PURE__ */ styledComponents.styled.div.withConfig({
2644
2062
  displayName: "StyledHeading",
@@ -3514,6 +2932,7 @@ const ViewportOverlay = () => {
3514
2932
  __unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
3515
2933
  animate: _animate = !1,
3516
2934
  arrow: arrowProp = !1,
2935
+ // oxlint-disable-next-line no-deprecated
3517
2936
  boundaryElement = boundaryElementContext.element,
3518
2937
  children: childProp,
3519
2938
  constrainSize = !1,
@@ -3521,6 +2940,7 @@ const ViewportOverlay = () => {
3521
2940
  disabled,
3522
2941
  fallbackPlacements = props.fallbackPlacements ?? DEFAULT_FALLBACK_PLACEMENTS$1[props.placement ?? "bottom"],
3523
2942
  matchReferenceWidth,
2943
+ // oxlint-disable-next-line no-deprecated
3524
2944
  floatingBoundary = props.boundaryElement ?? boundaryElementContext.element,
3525
2945
  modal,
3526
2946
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -3533,6 +2953,7 @@ const ViewportOverlay = () => {
3533
2953
  portal,
3534
2954
  preventOverflow = !0,
3535
2955
  radius: radiusProp = 3,
2956
+ // oxlint-disable-next-line no-deprecated
3536
2957
  referenceBoundary = props.boundaryElement ?? boundaryElementContext.element,
3537
2958
  referenceElement,
3538
2959
  scheme,
@@ -3577,28 +2998,35 @@ const ViewportOverlay = () => {
3577
2998
  rootBoundary
3578
2999
  }))), ret.push(reactDom$1.offset({
3579
3000
  mainAxis: DEFAULT_POPOVER_DISTANCE
3580
- })), (constrainSize || matchReferenceWidth) && ret.push(size({
3581
- apply({
3582
- availableWidth,
3583
- availableHeight,
3584
- elements,
3585
- referenceWidth: referenceWidth_0
3586
- }) {
3587
- referenceWidthRef.current = referenceWidth_0;
3588
- const _currentWidth = widthRef.current, _maxWidth = maxWidthRef.current;
3589
- matchReferenceWidth ? elements.floating.style.width = `${referenceWidth_0}px` : _currentWidth !== void 0 && (elements.floating.style.width = `${_currentWidth}px`), constrainSize && (elements.floating.style.maxWidth = `${Math.min(availableWidth, _maxWidth ?? 1 / 0)}px`, elements.floating.style.maxHeight = `${availableHeight}px`);
3590
- },
3591
- boundaryElement: floatingBoundary || void 0,
3592
- margins,
3593
- padding: DEFAULT_POPOVER_PADDING
3594
- })), preventOverflow && ret.push(reactDom$1.shift({
3001
+ })), (constrainSize || matchReferenceWidth) && ret.push(
3002
+ // oxlint-disable-next-line react-compiler
3003
+ size({
3004
+ apply({
3005
+ availableWidth,
3006
+ availableHeight,
3007
+ elements,
3008
+ referenceWidth: referenceWidth_0
3009
+ }) {
3010
+ referenceWidthRef.current = referenceWidth_0;
3011
+ const _currentWidth = widthRef.current, _maxWidth = maxWidthRef.current;
3012
+ matchReferenceWidth ? elements.floating.style.width = `${referenceWidth_0}px` : _currentWidth !== void 0 && (elements.floating.style.width = `${_currentWidth}px`), constrainSize && (elements.floating.style.maxWidth = `${Math.min(availableWidth, _maxWidth ?? 1 / 0)}px`, elements.floating.style.maxHeight = `${availableHeight}px`);
3013
+ },
3014
+ boundaryElement: floatingBoundary || void 0,
3015
+ margins,
3016
+ padding: DEFAULT_POPOVER_PADDING
3017
+ })
3018
+ ), preventOverflow && ret.push(reactDom$1.shift({
3595
3019
  boundary: floatingBoundary || void 0,
3596
3020
  rootBoundary,
3597
3021
  padding: DEFAULT_POPOVER_PADDING
3598
- })), arrowProp && ret.push(reactDom$1.arrow({
3599
- element: arrowRef,
3600
- padding: DEFAULT_POPOVER_PADDING
3601
- })), animate && ret.push(origin), ret.push(reactDom$1.hide({
3022
+ })), arrowProp && ret.push(
3023
+ // oxlint-disable-next-line react-compiler
3024
+ reactDom$1.arrow({
3025
+ // oxlint-disable-next-line react-compiler
3026
+ element: arrowRef,
3027
+ padding: DEFAULT_POPOVER_PADDING
3028
+ })
3029
+ ), animate && ret.push(origin), ret.push(reactDom$1.hide({
3602
3030
  boundary: referenceBoundary || void 0,
3603
3031
  padding: DEFAULT_POPOVER_PADDING,
3604
3032
  strategy: "referenceHidden"
@@ -3635,7 +3063,34 @@ const ViewportOverlay = () => {
3635
3063
  return childProp || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
3636
3064
  const popover = /* @__PURE__ */ jsxRuntime.jsxs(LayerProvider, { zOffset, children: [
3637
3065
  modal && /* @__PURE__ */ jsxRuntime.jsx(ViewportOverlay, {}),
3638
- /* @__PURE__ */ jsxRuntime.jsx(PopoverCard, { ...restProps, __unstable_margins: margins, animate, arrow: arrowProp, arrowRef: setArrow, arrowX, arrowY, hidden: referenceHidden, overflow, padding, placement, radius, ref: setFloating, scheme, shadow, originX, originY, strategy, tone, width: matchReferenceWidth ? referenceWidthRef.current : width, x, y, children: content })
3066
+ /* @__PURE__ */ jsxRuntime.jsx(
3067
+ PopoverCard,
3068
+ {
3069
+ ...restProps,
3070
+ __unstable_margins: margins,
3071
+ animate,
3072
+ arrow: arrowProp,
3073
+ arrowRef: setArrow,
3074
+ arrowX,
3075
+ arrowY,
3076
+ hidden: referenceHidden,
3077
+ overflow,
3078
+ padding,
3079
+ placement,
3080
+ radius,
3081
+ ref: setFloating,
3082
+ scheme,
3083
+ shadow,
3084
+ originX,
3085
+ originY,
3086
+ strategy,
3087
+ tone,
3088
+ width: matchReferenceWidth ? referenceWidthRef.current : width,
3089
+ x,
3090
+ y,
3091
+ children: content
3092
+ }
3093
+ )
3639
3094
  ] }), children = open && (portal ? /* @__PURE__ */ jsxRuntime.jsx(Portal, { __unstable_name: typeof portal == "string" ? portal : void 0, children: popover }) : popover);
3640
3095
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3641
3096
  animate ? /* @__PURE__ */ jsxRuntime.jsx(react$1.AnimatePresence, { children }) : children,
@@ -3644,118 +3099,29 @@ const ViewportOverlay = () => {
3644
3099
  }));
3645
3100
  Popover.displayName = "Memo(ForwardRef(Popover))";
3646
3101
  function radioBaseStyle() {
3647
- return styledComponents.css`
3648
- position: relative;
3649
-
3650
- &:not([hidden]) {
3651
- display: inline-block;
3652
- }
3653
-
3654
- &[data-read-only] {
3655
- outline: 1px solid red;
3656
- }
3657
- `;
3102
+ return styledComponents.css`position:relative;&:not([hidden]){display:inline-block;}&[data-read-only]{outline:1px solid red;}`;
3658
3103
  }
3659
3104
  function inputElementStyle(props) {
3660
3105
  const {
3661
3106
  color,
3662
3107
  input
3663
3108
  } = theme.getTheme_v2(props.theme), dist = (input.radio.size - input.radio.markSize) / 2;
3664
- return styledComponents.css`
3665
- appearance: none;
3666
- position: absolute;
3667
- top: 0;
3668
- left: 0;
3669
- opacity: 0;
3670
- height: 100%;
3671
- width: 100%;
3672
- outline: none;
3673
- z-index: 1;
3674
- padding: 0;
3675
- margin: 0;
3676
- border-radius: ${rem(input.radio.size / 2)};
3677
- border: none;
3678
-
3679
- /* enabled */
3680
- & + span {
3681
- display: block;
3682
- position: relative;
3683
- height: ${rem(input.radio.size)};
3684
- width: ${rem(input.radio.size)};
3685
- border-radius: ${rem(input.radio.size / 2)};
3686
- background: ${color.input.default.enabled.bg};
3687
- box-shadow: ${focusRingBorderStyle({
3109
+ return styledComponents.css`appearance:none;position:absolute;top:0;left:0;opacity:0;height:100%;width:100%;outline:none;z-index:1;padding:0;margin:0;border-radius:${rem(input.radio.size / 2)};border:none;& + span{display:block;position:relative;height:${rem(input.radio.size)};width:${rem(input.radio.size)};border-radius:${rem(input.radio.size / 2)};background:${color.input.default.enabled.bg};box-shadow:${focusRingBorderStyle({
3688
3110
  color: color.input.default.enabled.border,
3689
3111
  width: input.border.width
3690
- })};
3691
-
3692
- &::after {
3693
- content: '';
3694
- position: absolute;
3695
- top: ${rem(dist)};
3696
- left: ${rem(dist)};
3697
- height: ${rem(input.radio.markSize)};
3698
- width: ${rem(input.radio.markSize)};
3699
- border-radius: ${rem(input.radio.markSize / 2)};
3700
- background: ${color.input.default.enabled.fg};
3701
- opacity: 0;
3702
- }
3703
- }
3704
-
3705
- /* focused */
3706
- &:not(:disabled):focus + span {
3707
- box-shadow: ${focusRingStyle({
3112
+ })};&::after{content:'';position:absolute;top:${rem(dist)};left:${rem(dist)};height:${rem(input.radio.markSize)};width:${rem(input.radio.markSize)};border-radius:${rem(input.radio.markSize / 2)};background:${color.input.default.enabled.fg};opacity:0;}}&:not(:disabled):focus + span{box-shadow:${focusRingStyle({
3708
3113
  border: {
3709
3114
  width: input.border.width,
3710
3115
  color: color.input.default.enabled.border
3711
3116
  },
3712
3117
  focusRing: input.radio.focusRing
3713
- })};
3714
- }
3715
-
3716
- &:not(:disabled):focus:not(:focus-visible) + span {
3717
- box-shadow: ${focusRingBorderStyle({
3118
+ })};}&:not(:disabled):focus:not(:focus-visible) + span{box-shadow:${focusRingBorderStyle({
3718
3119
  color: color.input.default.enabled.border,
3719
3120
  width: input.border.width
3720
- })};
3721
- }
3722
-
3723
- &:checked + span::after {
3724
- opacity: 1;
3725
- }
3726
-
3727
- /* customValidity */
3728
- &[data-error] + span {
3729
- background-color: ${color.input.invalid.enabled.border};
3730
- box-shadow: ${focusRingBorderStyle({
3121
+ })};}&:checked + span::after{opacity:1;}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
3731
3122
  width: input.border.width,
3732
3123
  color: color.input.invalid.enabled.muted.bg
3733
- })};
3734
- &::after {
3735
- background: ${color.input.invalid.enabled.muted.bg};
3736
- }
3737
- }
3738
-
3739
- /* read only */
3740
- &[data-read-only] + span {
3741
- box-shadow: 0 0 0 1px ${color.input.default.readOnly.border};
3742
- background: ${color.input.default.readOnly.bg};
3743
-
3744
- &::after {
3745
- background: ${color.input.default.readOnly.border};
3746
- }
3747
- }
3748
-
3749
- /* disabled */
3750
- &:not([data-read-only]):disabled + span {
3751
- box-shadow: 0 0 0 1px ${color.input.default.disabled.border};
3752
- background: ${color.input.default.disabled.bg};
3753
-
3754
- &::after {
3755
- background: ${color.input.default.disabled.border};
3756
- }
3757
- }
3758
- `;
3124
+ })};&::after{background:${color.input.invalid.enabled.muted.bg};}}&[data-read-only] + span{box-shadow:0 0 0 1px ${color.input.default.readOnly.border};background:${color.input.default.readOnly.bg};&::after{background:${color.input.default.readOnly.border};}}&:not([data-read-only]):disabled + span{box-shadow:0 0 0 1px ${color.input.default.disabled.border};background:${color.input.default.disabled.bg};&::after{background:${color.input.default.disabled.border};}}`;
3759
3125
  }
3760
3126
  const StyledRadio = /* @__PURE__ */ styledComponents.styled.div.withConfig({
3761
3127
  displayName: "StyledRadio",
@@ -3790,93 +3156,38 @@ const StyledRadio = /* @__PURE__ */ styledComponents.styled.div.withConfig({
3790
3156
  });
3791
3157
  Radio.displayName = "ForwardRef(Radio)";
3792
3158
  function rootStyle() {
3793
- return styledComponents.css`
3794
- position: relative;
3795
- width: -moz-available;
3796
- width: -webkit-fill-available;
3797
- width: stretch;
3798
-
3799
- &:not([hidden]) {
3800
- display: inline-block;
3801
- }
3802
- `;
3159
+ return styledComponents.css`position:relative;width:-moz-available;width:-webkit-fill-available;width:stretch;&:not([hidden]){display:inline-block;}`;
3803
3160
  }
3804
3161
  function inputBaseStyle(props) {
3805
3162
  const {
3806
3163
  font
3807
3164
  } = theme.getTheme_v2(props.theme);
3808
- return styledComponents.css`
3809
- -webkit-font-smoothing: antialiased;
3810
- appearance: none;
3811
- border: 0;
3812
- font-family: ${font.text.family};
3813
- color: inherit;
3814
- width: 100%;
3815
- outline: none;
3816
- margin: 0;
3817
-
3818
- &:disabled {
3819
- opacity: 1;
3820
- }
3821
- `;
3165
+ return styledComponents.css`-webkit-font-smoothing:antialiased;appearance:none;border:0;font-family:${font.text.family};color:inherit;width:100%;outline:none;margin:0;&:disabled{opacity:1;}`;
3822
3166
  }
3823
3167
  function inputColorStyle(props) {
3824
3168
  const {
3825
3169
  color,
3826
3170
  input
3827
3171
  } = theme.getTheme_v2(props.theme);
3828
- return styledComponents.css`
3829
- /* enabled */
3830
- background-color: ${color.input.default.enabled.bg};
3831
- color: ${color.input.default.enabled.fg};
3832
- box-shadow: ${focusRingBorderStyle({
3172
+ return styledComponents.css`background-color:${color.input.default.enabled.bg};color:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
3833
3173
  color: color.input.default.enabled.border,
3834
3174
  width: input.border.width
3835
- })};
3836
-
3837
- /* hovered */
3838
- @media (hover: hover) {
3839
- &:not(:disabled):hover {
3840
- background-color: ${color.input.default.hovered.bg};
3841
- color: ${color.input.default.hovered.fg};
3842
- box-shadow: ${focusRingBorderStyle({
3175
+ })};@media (hover:hover){&:not(:disabled):hover{background-color:${color.input.default.hovered.bg};color:${color.input.default.hovered.fg};box-shadow:${focusRingBorderStyle({
3843
3176
  color: color.input.default.hovered.border,
3844
3177
  width: input.border.width
3845
- })};
3846
- }
3847
- }
3848
-
3849
- /* focused */
3850
- &:not(:disabled):focus {
3851
- box-shadow: ${focusRingStyle({
3178
+ })};}}&:not(:disabled):focus{box-shadow:${focusRingStyle({
3852
3179
  border: {
3853
3180
  width: input.border.width,
3854
3181
  color: color.input.default.enabled.border
3855
3182
  },
3856
3183
  focusRing: input.select.focusRing
3857
- })};
3858
- }
3859
-
3860
- /* read-only */
3861
- &[data-read-only] {
3862
- background-color: ${color.input.default.readOnly.bg};
3863
- color: ${color.input.default.readOnly.fg};
3864
- box-shadow: ${focusRingBorderStyle({
3184
+ })};}&[data-read-only]{background-color:${color.input.default.readOnly.bg};color:${color.input.default.readOnly.fg};box-shadow:${focusRingBorderStyle({
3865
3185
  color: color.input.default.readOnly.border,
3866
3186
  width: input.border.width
3867
- })};
3868
- }
3869
-
3870
- /* disabled */
3871
- &:not([data-read-only]):disabled {
3872
- background-color: ${color.input.default.disabled.bg};
3873
- color: ${color.input.default.disabled.fg};
3874
- box-shadow: ${focusRingBorderStyle({
3187
+ })};}&:not([data-read-only]):disabled{background-color:${color.input.default.disabled.bg};color:${color.input.default.disabled.fg};box-shadow:${focusRingBorderStyle({
3875
3188
  color: color.input.default.disabled.border,
3876
3189
  width: input.border.width
3877
- })};
3878
- }
3879
- `;
3190
+ })};}`;
3880
3191
  }
3881
3192
  function textSize(size2) {
3882
3193
  return {
@@ -3900,32 +3211,7 @@ function iconBoxStyle(props) {
3900
3211
  const {
3901
3212
  color
3902
3213
  } = theme.getTheme_v2(props.theme);
3903
- return styledComponents.css`
3904
- pointer-events: none;
3905
- position: absolute;
3906
- top: 0;
3907
- right: 0;
3908
-
3909
- /* enabled */
3910
- --card-fg-color: ${color.input.default.enabled.fg};
3911
-
3912
- /* hover */
3913
- @media (hover: hover) {
3914
- select:not(disabled):not(:read-only):hover + && {
3915
- --card-fg-color: ${color.input.default.hovered.fg};
3916
- }
3917
- }
3918
-
3919
- /* disabled */
3920
- select:disabled + && {
3921
- --card-fg-color: ${color.input.default.disabled.fg};
3922
- }
3923
-
3924
- /* read-only */
3925
- select[data-read-only] + && {
3926
- --card-fg-color: ${color.input.default.readOnly.fg};
3927
- }
3928
- `;
3214
+ return styledComponents.css`pointer-events:none;position:absolute;top:0;right:0;--card-fg-color:${color.input.default.enabled.fg};@media (hover:hover){select:not(disabled):not(:read-only):hover + &&{--card-fg-color:${color.input.default.hovered.fg};}}select:disabled + &&{--card-fg-color:${color.input.default.disabled.fg};}select[data-read-only] + &&{--card-fg-color:${color.input.default.readOnly.fg};}`;
3929
3215
  }
3930
3216
  const selectStyle = {
3931
3217
  root: rootStyle,
@@ -3992,6 +3278,7 @@ function responsiveStackSpaceStyle(props) {
3992
3278
  space
3993
3279
  } = theme.getTheme_v2(props.theme);
3994
3280
  return _responsive(media, props.$space, (spaceIndex) => ({
3281
+ // oxlint-disable-next-line no-deprecated
3995
3282
  gridGap: rem(space[spaceIndex])
3996
3283
  }));
3997
3284
  }
@@ -4012,125 +3299,25 @@ const StyledStack = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
4012
3299
  });
4013
3300
  Stack.displayName = "ForwardRef(Stack)";
4014
3301
  function switchBaseStyles() {
4015
- return styledComponents.css`
4016
- position: relative;
4017
- &:not([hidden]) {
4018
- display: inline-block;
4019
- }
4020
- `;
3302
+ return styledComponents.css`position:relative;&:not([hidden]){display:inline-block;}`;
4021
3303
  }
4022
3304
  function switchInputStyles() {
4023
- return styledComponents.css`
4024
- position: absolute;
4025
- top: 0;
4026
- right: 0;
4027
- bottom: 0;
4028
- left: 0;
4029
- opacity: 0;
4030
- height: 100%;
4031
- width: 100%;
4032
- outline: none;
4033
- padding: 0;
4034
- margin: 0;
4035
-
4036
- /* Place the input element above the representation element */
4037
- z-index: 1;
4038
- `;
3305
+ return styledComponents.css`position:absolute;top:0;right:0;bottom:0;left:0;opacity:0;height:100%;width:100%;outline:none;padding:0;margin:0;z-index:1;`;
4039
3306
  }
4040
3307
  function switchRepresentationStyles(props) {
4041
3308
  const {
4042
3309
  color,
4043
3310
  input
4044
3311
  } = theme.getTheme_v2(props.theme);
4045
- return styledComponents.css`
4046
- --switch-bg-color: ${color.input.default.enabled.border};
4047
- --switch-fg-color: ${color.input.default.enabled.bg};
4048
- --switch-box-shadow: none;
4049
-
4050
- &:not([hidden]) {
4051
- display: block;
4052
- }
4053
- position: relative;
4054
- width: ${rem(input.switch.width)};
4055
- height: ${rem(input.switch.height)};
4056
- border-radius: ${rem(input.switch.height / 2)};
4057
-
4058
- /* Make sure it’s not possible to interact with the wrapper element */
4059
- pointer-events: none;
4060
-
4061
- &:after {
4062
- content: '';
4063
- display: block;
4064
- position: absolute;
4065
- top: 0;
4066
- left: 0;
4067
- right: 0;
4068
- bottom: 0;
4069
- z-index: 1;
4070
- box-shadow: var(--switch-box-shadow);
4071
- border-radius: inherit;
4072
- }
4073
-
4074
- /* Focus styles */
4075
- input:focus + && {
4076
- --switch-box-shadow: ${focusRingStyle({
3312
+ return styledComponents.css`--switch-bg-color:${color.input.default.enabled.border};--switch-fg-color:${color.input.default.enabled.bg};--switch-box-shadow:none;&:not([hidden]){display:block;}position:relative;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};pointer-events:none;&:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;box-shadow:var(--switch-box-shadow);border-radius:inherit;}input:focus + &&{--switch-box-shadow:${focusRingStyle({
4077
3313
  focusRing: input.switch.focusRing
4078
- })};
4079
- }
4080
-
4081
- input:focus:not(:focus-visible) + && {
4082
- --switch-box-shadow: none;
4083
- }
4084
-
4085
- input:checked + && {
4086
- --switch-bg-color: ${color.input.default.enabled.fg};
4087
- --switch-fg-color: ${color.input.default.enabled.bg};
4088
- }
4089
-
4090
- @media (hover: hover) {
4091
- input:not(:disabled):hover + && {
4092
- --switch-bg-color: ${color.input.default.hovered.border};
4093
- --switch-fg-color: ${color.input.default.hovered.bg};
4094
- }
4095
-
4096
- input:not(:disabled):checked:hover + && {
4097
- --switch-bg-color: ${color.input.default.enabled.fg};
4098
- --switch-fg-color: ${color.input.default.enabled.bg};
4099
- }
4100
- }
4101
-
4102
- input:not([data-read-only]):disabled + && {
4103
- --switch-bg-color: ${color.input.default.disabled.border};
4104
- --switch-fg-color: ${color.input.default.disabled.bg};
4105
- }
4106
-
4107
- input[data-read-only]:disabled + && {
4108
- --switch-bg-color: ${color.input.default.readOnly.border};
4109
- --switch-fg-color: ${color.input.default.readOnly.bg};
4110
- }
4111
-
4112
- input:checked[data-read-only]:disabled + && {
4113
- --switch-bg-color: ${color.input.default.readOnly.fg};
4114
- --switch-fg-color: ${color.input.default.readOnly.bg};
4115
- }
4116
- `;
3314
+ })};}input:focus:not(:focus-visible) + &&{--switch-box-shadow:none;}input:checked + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}@media (hover:hover){input:not(:disabled):hover + &&{--switch-bg-color:${color.input.default.hovered.border};--switch-fg-color:${color.input.default.hovered.bg};}input:not(:disabled):checked:hover + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}}input:not([data-read-only]):disabled + &&{--switch-bg-color:${color.input.default.disabled.border};--switch-fg-color:${color.input.default.disabled.bg};}input[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.border};--switch-fg-color:${color.input.default.readOnly.bg};}input:checked[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.fg};--switch-fg-color:${color.input.default.readOnly.bg};}`;
4117
3315
  }
4118
3316
  function switchTrackStyles(props) {
4119
3317
  const {
4120
3318
  input
4121
3319
  } = theme.getTheme_v2(props.theme);
4122
- return styledComponents.css`
4123
- &:not([hidden]) {
4124
- display: block;
4125
- }
4126
- background-color: var(--switch-bg-color);
4127
- position: absolute;
4128
- left: 0;
4129
- top: 0;
4130
- width: ${rem(input.switch.width)};
4131
- height: ${rem(input.switch.height)};
4132
- border-radius: ${rem(input.switch.height / 2)};
4133
- `;
3320
+ return styledComponents.css`&:not([hidden]){display:block;}background-color:var(--switch-bg-color);position:absolute;left:0;top:0;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};`;
4134
3321
  }
4135
3322
  function switchThumbStyles(props) {
4136
3323
  const {
@@ -4138,31 +3325,7 @@ function switchThumbStyles(props) {
4138
3325
  } = props, {
4139
3326
  input
4140
3327
  } = theme.getTheme_v2(props.theme), trackWidth = input.switch.width, trackHeight = input.switch.height, trackPadding = input.switch.padding, size2 = trackHeight - input.switch.padding * 2, checkedOffset = trackWidth - trackPadding * 2 - size2, indeterminateOffset = trackWidth / 2 - size2 / 2 - trackPadding, checked = $indeterminate !== !0 && props.$checked === !0;
4141
- return styledComponents.css`
4142
- &:not([hidden]) {
4143
- display: block;
4144
- }
4145
- position: absolute;
4146
- left: ${rem(trackPadding)};
4147
- top: ${rem(trackPadding)};
4148
- height: ${rem(size2)};
4149
- width: ${rem(size2)};
4150
- border-radius: ${rem(size2 / 2)};
4151
- transition-property: transform;
4152
- transition-duration: ${input.switch.transitionDurationMs}ms;
4153
- transition-timing-function: ${input.switch.transitionTimingFunction};
4154
- background: var(--switch-fg-color);
4155
- transform: translate3d(0, 0, 0);
4156
- box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
4157
-
4158
- ${checked && styledComponents.css`
4159
- transform: translate3d(${checkedOffset}px, 0, 0);
4160
- `}
4161
-
4162
- ${$indeterminate && styledComponents.css`
4163
- transform: translate3d(${indeterminateOffset}px, 0, 0);
4164
- `}
4165
- `;
3328
+ return styledComponents.css`&:not([hidden]){display:block;}position:absolute;left:${rem(trackPadding)};top:${rem(trackPadding)};height:${rem(size2)};width:${rem(size2)};border-radius:${rem(size2 / 2)};transition-property:transform;transition-duration:${input.switch.transitionDurationMs}ms;transition-timing-function:${input.switch.transitionTimingFunction};background:var(--switch-fg-color);transform:translate3d(0,0,0);box-shadow:0px 1px 0px 0px rgba(0,0,0,0.05);${checked && styledComponents.css`transform:translate3d(${checkedOffset}px,0,0);`} ${$indeterminate && styledComponents.css`transform:translate3d(${indeterminateOffset}px,0,0);`}`;
4166
3329
  }
4167
3330
  const StyledSwitch = /* @__PURE__ */ styledComponents.styled.span.withConfig({
4168
3331
  displayName: "StyledSwitch",
@@ -4808,7 +3971,7 @@ function useMenuController(props) {
4808
3971
  });
4809
3972
  return () => cancelAnimationFrame(rafId);
4810
3973
  }, [activeIndex, mounted, setActiveIndex, shouldFocus]), {
4811
- // eslint-disable-next-line react-hooks/refs
3974
+ // oxlint-disable-next-line react-compiler
4812
3975
  activeElement,
4813
3976
  activeIndex,
4814
3977
  handleItemMouseEnter,
@@ -4909,27 +4072,7 @@ const MenuDivider = styledComponents.styled.hr.withConfig({
4909
4072
  })`height:1px;border:0;background:var(--card-hairline-soft-color);margin:0;`;
4910
4073
  MenuDivider.displayName = "MenuDivider";
4911
4074
  function selectableBaseStyle() {
4912
- return styledComponents.css`
4913
- background-color: inherit;
4914
- color: inherit;
4915
-
4916
- &[data-as='button'] {
4917
- -webkit-font-smoothing: inherit;
4918
- appearance: none;
4919
- outline: none;
4920
- font: inherit;
4921
- text-align: inherit;
4922
- border: 0;
4923
- width: -moz-available;
4924
- width: -webkit-fill-available;
4925
- width: stretch;
4926
- }
4927
-
4928
- /* &:is(a) */
4929
- &[data-as='a'] {
4930
- text-decoration: none;
4931
- }
4932
- `;
4075
+ return styledComponents.css`background-color:inherit;color:inherit;&[data-as='button']{-webkit-font-smoothing:inherit;appearance:none;outline:none;font:inherit;text-align:inherit;border:0;width:-moz-available;width:-webkit-fill-available;width:stretch;}&[data-as='a']{text-decoration:none;}`;
4933
4076
  }
4934
4077
  function selectableColorStyle(props) {
4935
4078
  const {
@@ -4938,75 +4081,7 @@ function selectableColorStyle(props) {
4938
4081
  color,
4939
4082
  style
4940
4083
  } = theme.getTheme_v2(props.theme), tone = color.selectable[$tone];
4941
- return styledComponents.css`
4942
- ${_cardColorStyle(color, tone.enabled)}
4943
-
4944
- background-color: var(--card-bg-color);
4945
- color: var(--card-fg-color);
4946
- outline: none;
4947
-
4948
- /* &:is(button) */
4949
- &[data-as='button'] {
4950
- &:disabled {
4951
- ${_cardColorStyle(color, tone.disabled)}
4952
- }
4953
-
4954
- &:not(:disabled) {
4955
- &[aria-pressed='true'] {
4956
- ${_cardColorStyle(color, tone.pressed)}
4957
- }
4958
-
4959
- &[data-selected],
4960
- &[aria-selected='true'] > & {
4961
- ${_cardColorStyle(color, tone.selected)}
4962
- }
4963
-
4964
- @media (hover: hover) {
4965
- &:not([data-selected]) {
4966
- &[data-hovered],
4967
- &:hover {
4968
- ${_cardColorStyle(color, tone.hovered)}
4969
- }
4970
-
4971
- &:active {
4972
- ${_cardColorStyle(color, tone.pressed)}
4973
- }
4974
- }
4975
- }
4976
- }
4977
- }
4978
-
4979
- /* &:is(a) */
4980
- &[data-as='a'] {
4981
- &[data-disabled] {
4982
- ${_cardColorStyle(color, tone.disabled)}
4983
- }
4984
-
4985
- &:not([data-disabled]) {
4986
- &[data-pressed] {
4987
- ${_cardColorStyle(color, tone.pressed)}
4988
- }
4989
-
4990
- &[data-selected] {
4991
- ${_cardColorStyle(color, tone.selected)}
4992
- }
4993
-
4994
- @media (hover: hover) {
4995
- &:not([data-selected]) {
4996
- &[data-hovered],
4997
- &:hover {
4998
- ${_cardColorStyle(color, tone.hovered)}
4999
- }
5000
- &:active {
5001
- ${_cardColorStyle(color, tone.pressed)}
5002
- }
5003
- }
5004
- }
5005
- }
5006
- }
5007
-
5008
- ${style?.card?.root}
5009
- `;
4084
+ return styledComponents.css`${_cardColorStyle(color, tone.enabled)} background-color:var(--card-bg-color);color:var(--card-fg-color);outline:none;&[data-as='button']{&:disabled{${_cardColorStyle(color, tone.disabled)}}&:not(:disabled){&[aria-pressed='true']{${_cardColorStyle(color, tone.pressed)}}&[data-selected],&[aria-selected='true'] > &{${_cardColorStyle(color, tone.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, tone.hovered)}}&:active{${_cardColorStyle(color, tone.pressed)}}}}}}&[data-as='a']{&[data-disabled]{${_cardColorStyle(color, tone.disabled)}}&:not([data-disabled]){&[data-pressed]{${_cardColorStyle(color, tone.pressed)}}&[data-selected]{${_cardColorStyle(color, tone.selected)}}@media (hover:hover){&:not([data-selected]){&[data-hovered],&:hover{${_cardColorStyle(color, tone.hovered)}}&:active{${_cardColorStyle(color, tone.pressed)}}}}}}${style?.card?.root}`;
5010
4085
  }
5011
4086
  const Selectable = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
5012
4087
  displayName: "Selectable",