@sanity/ui 2.10.0-corel.0 → 3.0.0-static.1

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 (389) hide show
  1. package/bin/ui.js +6 -0
  2. package/dist/_chunks-cjs/buildCommand.js +3542 -0
  3. package/dist/_chunks-cjs/buildCommand.js.map +1 -0
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +25 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/css.d.mts +1062 -0
  8. package/dist/css.d.ts +1062 -0
  9. package/dist/css.esm.js +3794 -0
  10. package/dist/css.esm.js.map +1 -0
  11. package/dist/css.js +3794 -0
  12. package/dist/css.js.map +1 -0
  13. package/dist/css.mjs +3794 -0
  14. package/dist/css.mjs.map +1 -0
  15. package/dist/index.d.mts +240 -221
  16. package/dist/index.d.ts +240 -221
  17. package/dist/index.esm.js +3033 -4536
  18. package/dist/index.esm.js.map +1 -1
  19. package/dist/index.js +3037 -4541
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +3033 -4536
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/sanity-theme.css +25 -0
  24. package/dist/system.css +3385 -0
  25. package/dist/theme.d.mts +84 -22
  26. package/dist/theme.d.ts +84 -22
  27. package/dist/theme.esm.js +1718 -656
  28. package/dist/theme.esm.js.map +1 -1
  29. package/dist/theme.js +1757 -693
  30. package/dist/theme.js.map +1 -1
  31. package/dist/theme.mjs +1718 -656
  32. package/dist/theme.mjs.map +1 -1
  33. package/exports/css.ts +1 -0
  34. package/package.json +45 -24
  35. package/src/core/__workshop__/constants.ts +28 -19
  36. package/src/core/_compat/index.ts +2 -0
  37. package/src/core/{styles → _compat/styles}/border/borderStyle.ts +6 -0
  38. package/src/core/{styles → _compat/styles}/border/types.ts +1 -0
  39. package/src/core/{styles → _compat/styles}/box/boxStyle.ts +7 -1
  40. package/src/core/{styles → _compat/styles}/box/types.ts +1 -1
  41. package/src/core/{styles → _compat/styles}/card/_cardColorStyle.ts +2 -10
  42. package/src/core/{styles → _compat/styles}/flex/flexItemStyle.ts +1 -1
  43. package/src/core/{styles → _compat/styles}/flex/flexStyle.ts +0 -18
  44. package/src/core/{styles → _compat/styles}/flex/types.ts +1 -3
  45. package/src/core/{styles → _compat/styles}/font/types.ts +1 -1
  46. package/src/core/{styles → _compat/styles}/grid/gridStyle.ts +0 -10
  47. package/src/core/{styles → _compat/styles}/grid/types.ts +1 -1
  48. package/src/core/{styles → _compat/styles}/helpers.ts +10 -1
  49. package/src/core/{styles → _compat/styles}/input/textInputStyle.ts +2 -2
  50. package/src/core/{styles → _compat/styles}/radius/types.ts +1 -1
  51. package/src/core/{styles → _compat/styles}/shadow/shadowStyle.ts +1 -1
  52. package/src/core/components/autocomplete/__workshop__/custom.tsx +5 -4
  53. package/src/core/components/autocomplete/__workshop__/example.tsx +3 -2
  54. package/src/core/components/autocomplete/autocomplete.tsx +17 -9
  55. package/src/core/components/breadcrumbs/__workshop__/example.tsx +1 -3
  56. package/src/core/components/breadcrumbs/__workshop__/index.ts +0 -5
  57. package/src/core/components/breadcrumbs/breadcrumbs.tsx +14 -9
  58. package/src/core/components/dialog/__workshop__/props.tsx +2 -0
  59. package/src/core/components/dialog/dialog.tsx +73 -92
  60. package/src/core/components/hotkeys/hotkeys.tsx +18 -29
  61. package/src/core/components/menu/menu.tsx +13 -12
  62. package/src/core/components/menu/menuDivider.tsx +16 -0
  63. package/src/core/components/menu/menuGroup.tsx +10 -8
  64. package/src/core/components/menu/menuItem.tsx +23 -14
  65. package/src/core/components/skeleton/skeleton.tsx +14 -20
  66. package/src/core/components/skeleton/textSkeleton.tsx +72 -48
  67. package/src/core/components/tab/tab.tsx +5 -7
  68. package/src/core/components/tab/tabList.tsx +5 -21
  69. package/src/core/components/tab/tabPanel.tsx +1 -0
  70. package/src/core/components/toast/toast.tsx +31 -16
  71. package/src/core/components/toast/toastProvider.tsx +23 -23
  72. package/src/core/components/tree/tree.tsx +7 -2
  73. package/src/core/components/tree/treeGroup.tsx +4 -1
  74. package/src/core/components/tree/treeItem.tsx +44 -35
  75. package/src/core/components/tree/types.ts +5 -1
  76. package/src/core/hooks/useArrayProp.ts +1 -1
  77. package/src/core/index.ts +0 -1
  78. package/src/core/lib/styled/elements.ts +135 -0
  79. package/src/core/lib/styled/index.ts +2 -0
  80. package/src/core/lib/styled/members.ts +15 -0
  81. package/src/core/lib/styled/styled.ts +79 -0
  82. package/src/core/primitives/_selectable/selectable.tsx +27 -14
  83. package/src/core/primitives/avatar/avatar.tsx +38 -39
  84. package/src/core/primitives/avatar/avatarCounter.tsx +2 -2
  85. package/src/core/primitives/avatar/avatarStack.tsx +2 -2
  86. package/src/core/primitives/avatar/styles.ts +2 -2
  87. package/src/core/primitives/badge/__workshop__/tones.tsx +9 -16
  88. package/src/core/primitives/badge/badge.tsx +18 -20
  89. package/src/core/primitives/box/box.tsx +65 -74
  90. package/src/core/primitives/button/__workshop__/props.tsx +5 -2
  91. package/src/core/primitives/button/__workshop__/stacked.tsx +2 -1
  92. package/src/core/primitives/button/button.tsx +38 -45
  93. package/src/core/primitives/button/styles.ts +5 -5
  94. package/src/core/primitives/card/RootCardContext.ts +3 -0
  95. package/src/core/primitives/card/__workshop__/props.tsx +2 -2
  96. package/src/core/primitives/card/card.tsx +37 -42
  97. package/src/core/primitives/checkbox/checkbox.tsx +6 -8
  98. package/src/core/primitives/code/code.tsx +22 -13
  99. package/src/core/primitives/code/styles.ts +1 -1
  100. package/src/core/primitives/container/container.tsx +7 -15
  101. package/src/core/primitives/container/styles.ts +1 -1
  102. package/src/core/primitives/flex/flex.tsx +6 -31
  103. package/src/core/primitives/grid/grid.tsx +6 -19
  104. package/src/core/primitives/heading/heading.tsx +24 -28
  105. package/src/core/primitives/heading/styles.ts +2 -2
  106. package/src/core/primitives/inline/inline.tsx +18 -18
  107. package/src/core/primitives/inline/styles.ts +1 -1
  108. package/src/core/primitives/kbd/kbd.tsx +30 -37
  109. package/src/core/primitives/label/label.tsx +15 -9
  110. package/src/core/primitives/label/styles.ts +2 -2
  111. package/src/core/primitives/popover/__workshop__/PlainStory.tsx +2 -2
  112. package/src/core/primitives/popover/__workshop__/RecursiveStory.tsx +0 -1
  113. package/src/core/primitives/popover/__workshop__/TestStory.tsx +2 -1
  114. package/src/core/primitives/popover/popover.tsx +21 -15
  115. package/src/core/primitives/popover/popoverCard.tsx +36 -38
  116. package/src/core/primitives/radio/radio.tsx +1 -1
  117. package/src/core/primitives/radio/styles.ts +3 -3
  118. package/src/core/primitives/select/select.tsx +1 -1
  119. package/src/core/primitives/select/styles.ts +3 -3
  120. package/src/core/primitives/spinner/__workshop__/Props.tsx +2 -1
  121. package/src/core/primitives/spinner/animatedSpinnerIcon.tsx +16 -0
  122. package/src/core/primitives/spinner/spinner.tsx +8 -22
  123. package/src/core/primitives/stack/stack.tsx +12 -10
  124. package/src/core/primitives/stack/styles.ts +1 -1
  125. package/src/core/primitives/switch/styles.ts +11 -11
  126. package/src/core/primitives/switch/switch.tsx +20 -21
  127. package/src/core/primitives/text/styles.ts +2 -3
  128. package/src/core/primitives/text/text.tsx +18 -25
  129. package/src/core/primitives/textArea/__workshop__/plain.tsx +2 -2
  130. package/src/core/primitives/textArea/textArea.tsx +3 -3
  131. package/src/core/primitives/textInput/__workshop__/plain.tsx +4 -3
  132. package/src/core/primitives/textInput/textInput.tsx +111 -125
  133. package/src/core/primitives/tooltip/tooltip.test.tsx +1 -0
  134. package/src/core/primitives/tooltip/tooltip.tsx +13 -13
  135. package/src/core/primitives/tooltip/tooltipCard.tsx +15 -14
  136. package/src/core/primitives/types.ts +36 -16
  137. package/src/core/theme/__workshop__/build/story.tsx +2 -4
  138. package/src/core/theme/useTheme.ts +1 -1
  139. package/src/core/types/avatar.ts +6 -1
  140. package/src/core/types/box.ts +22 -16
  141. package/src/core/types/button.ts +1 -0
  142. package/src/core/types/flex.ts +27 -26
  143. package/src/core/types/grid.ts +17 -12
  144. package/src/core/types/gridItem.ts +32 -24
  145. package/src/core/types/radius.ts +7 -4
  146. package/src/core/types/text.ts +7 -4
  147. package/src/core/utils/arrow/arrow.tsx +1 -1
  148. package/src/core/utils/layer/layer.tsx +28 -11
  149. package/src/core/utils/srOnly/srOnly.tsx +1 -1
  150. package/src/core/utils/virtualList/virtualList.tsx +1 -1
  151. package/src/css/_resp.ts +28 -0
  152. package/src/css/cli/buildCommand.ts +36 -0
  153. package/src/css/cli/index.ts +38 -0
  154. package/src/css/compile/compileRule.ts +58 -0
  155. package/src/css/compile/compileRules.ts +56 -0
  156. package/src/css/compile/compileSystem.ts +7 -0
  157. package/src/css/compile/compileTheme.ts +512 -0
  158. package/src/css/components/breadcrumbs/breadcrumbs.ts +5 -0
  159. package/src/css/components/breadcrumbs/index.ts +1 -0
  160. package/src/css/components/breadcrumbs/rules.ts +25 -0
  161. package/src/css/components/dialog/classes.ts +29 -0
  162. package/src/css/components/dialog/index.ts +1 -0
  163. package/src/css/components/dialog/rules.ts +75 -0
  164. package/src/css/components/menu/index.ts +1 -0
  165. package/src/css/components/menu/menu.ts +5 -0
  166. package/src/css/components/menu/rules.ts +10 -0
  167. package/src/css/components/skeleton/index.ts +2 -0
  168. package/src/css/components/skeleton/rules.ts +106 -0
  169. package/src/css/components/skeleton/skeleton.ts +31 -0
  170. package/src/css/components/skeleton/types.ts +24 -0
  171. package/src/css/components/toast/rules.ts +68 -0
  172. package/src/css/components/tree/index.ts +1 -0
  173. package/src/css/components/tree/rules.ts +167 -0
  174. package/src/css/components/tree/tree.ts +5 -0
  175. package/src/css/composeClassNames.ts +3 -0
  176. package/src/css/index.ts +51 -0
  177. package/src/css/primitives/avatar/avatar.ts +32 -0
  178. package/src/css/primitives/avatar/index.ts +2 -0
  179. package/src/css/primitives/avatar/rules.ts +190 -0
  180. package/src/css/primitives/avatar/types.ts +9 -0
  181. package/src/css/primitives/badge/badge.ts +8 -0
  182. package/src/css/primitives/badge/index.ts +2 -0
  183. package/src/css/primitives/badge/rules.ts +25 -0
  184. package/src/css/primitives/badge/types.ts +8 -0
  185. package/src/css/primitives/box/box.ts +38 -0
  186. package/src/css/primitives/box/index.ts +2 -0
  187. package/src/css/primitives/box/rules.ts +25 -0
  188. package/src/css/primitives/box/types.ts +48 -0
  189. package/src/css/primitives/button/button.ts +26 -0
  190. package/src/css/primitives/button/index.ts +1 -0
  191. package/src/css/primitives/button/rules.ts +58 -0
  192. package/src/css/primitives/card/card.ts +21 -0
  193. package/src/css/primitives/card/index.ts +1 -0
  194. package/src/css/primitives/card/rules.ts +241 -0
  195. package/src/css/primitives/checkbox/__styles.ts +129 -0
  196. package/src/css/primitives/checkbox/checkbox.ts +9 -0
  197. package/src/css/primitives/checkbox/index.ts +1 -0
  198. package/src/css/primitives/checkbox/rules.ts +136 -0
  199. package/src/css/primitives/code/code.ts +9 -0
  200. package/src/css/primitives/code/index.ts +2 -0
  201. package/src/css/primitives/code/rules.ts +71 -0
  202. package/src/css/primitives/code/types.ts +10 -0
  203. package/src/css/primitives/container/container.ts +7 -0
  204. package/src/css/primitives/container/index.ts +2 -0
  205. package/src/css/primitives/container/rules.ts +8 -0
  206. package/src/css/primitives/container/types.ts +6 -0
  207. package/src/css/primitives/heading/heading.ts +16 -0
  208. package/src/css/primitives/heading/index.ts +2 -0
  209. package/src/css/primitives/heading/rules.ts +84 -0
  210. package/src/css/primitives/heading/types.ts +12 -0
  211. package/src/css/primitives/kbd/index.ts +2 -0
  212. package/src/css/primitives/kbd/kbd.ts +7 -0
  213. package/src/css/primitives/kbd/rules.ts +20 -0
  214. package/src/css/primitives/kbd/types.ts +5 -0
  215. package/src/css/primitives/label/index.ts +2 -0
  216. package/src/css/primitives/label/label.ts +16 -0
  217. package/src/css/primitives/label/rules.ts +85 -0
  218. package/src/css/primitives/label/types.ts +12 -0
  219. package/src/css/primitives/popover/index.ts +1 -0
  220. package/src/css/primitives/popover/popover.ts +5 -0
  221. package/src/css/primitives/popover/rules.ts +5 -0
  222. package/src/css/primitives/radio/index.ts +1 -0
  223. package/src/css/primitives/radio/radio.ts +5 -0
  224. package/src/css/primitives/radio/rules.ts +5 -0
  225. package/src/css/primitives/select/index.ts +1 -0
  226. package/src/css/primitives/select/rules.ts +5 -0
  227. package/src/css/primitives/select/select.ts +5 -0
  228. package/src/css/primitives/selectable/__style.ts +117 -0
  229. package/src/css/primitives/selectable/index.ts +2 -0
  230. package/src/css/primitives/selectable/rules.ts +27 -0
  231. package/src/css/primitives/selectable/selectable.ts +9 -0
  232. package/src/css/primitives/selectable/types.ts +6 -0
  233. package/src/css/primitives/spinner/index.ts +1 -0
  234. package/src/css/primitives/spinner/rules.ts +20 -0
  235. package/src/css/primitives/spinner/spinner.ts +9 -0
  236. package/src/css/primitives/switch/index.ts +1 -0
  237. package/src/css/primitives/switch/rules.ts +132 -0
  238. package/src/css/primitives/switch/switch.ts +5 -0
  239. package/src/css/primitives/text/index.ts +2 -0
  240. package/src/css/primitives/text/rules.ts +75 -0
  241. package/src/css/primitives/text/text.ts +16 -0
  242. package/src/css/primitives/text/types.ts +11 -0
  243. package/src/css/primitives/textArea/index.ts +1 -0
  244. package/src/css/primitives/textArea/rules.ts +5 -0
  245. package/src/css/primitives/textArea/textArea.ts +5 -0
  246. package/src/css/primitives/textInput/index.ts +2 -0
  247. package/src/css/primitives/textInput/rules.ts +321 -0
  248. package/src/css/primitives/textInput/textInput.ts +15 -0
  249. package/src/css/primitives/textInput/types.ts +8 -0
  250. package/src/css/primitives/token/rules.ts +45 -0
  251. package/src/css/primitives/tooltip/index.ts +1 -0
  252. package/src/css/primitives/tooltip/rules.ts +17 -0
  253. package/src/css/primitives/tooltip/tooltip.ts +9 -0
  254. package/src/css/responsiveRules.ts +25 -0
  255. package/src/css/rules.ts +99 -0
  256. package/src/css/styles/border/border.ts +22 -0
  257. package/src/css/styles/border/index.ts +2 -0
  258. package/src/css/styles/border/rules.ts +24 -0
  259. package/src/css/styles/border/types.ts +10 -0
  260. package/src/css/styles/display/rules.ts +62 -0
  261. package/src/css/styles/flex/flex.ts +20 -0
  262. package/src/css/styles/flex/index.ts +2 -0
  263. package/src/css/styles/flex/rules.ts +28 -0
  264. package/src/css/styles/flex/types.ts +35 -0
  265. package/src/css/styles/flexItem/flexItem.ts +8 -0
  266. package/src/css/styles/flexItem/index.ts +2 -0
  267. package/src/css/styles/flexItem/rules.ts +11 -0
  268. package/src/css/styles/flexItem/types.ts +11 -0
  269. package/src/css/styles/font/font.ts +17 -0
  270. package/src/css/styles/font/index.ts +2 -0
  271. package/src/css/styles/font/rules.ts +148 -0
  272. package/src/css/styles/font/types.ts +12 -0
  273. package/src/css/styles/gap/gap.ts +8 -0
  274. package/src/css/styles/gap/index.ts +2 -0
  275. package/src/css/styles/gap/rules.ts +33 -0
  276. package/src/css/styles/gap/types.ts +9 -0
  277. package/src/css/styles/grid/grid.ts +13 -0
  278. package/src/css/styles/grid/index.ts +2 -0
  279. package/src/css/styles/grid/rules.ts +146 -0
  280. package/src/css/styles/grid/types.ts +29 -0
  281. package/src/css/styles/gridItem/gridItem.ts +15 -0
  282. package/src/css/styles/gridItem/index.ts +2 -0
  283. package/src/css/styles/gridItem/rules.ts +96 -0
  284. package/src/css/styles/gridItem/types.ts +41 -0
  285. package/src/css/styles/height/rules.ts +7 -0
  286. package/src/css/styles/margin/index.ts +2 -0
  287. package/src/css/styles/margin/margin.ts +15 -0
  288. package/src/css/styles/margin/rules.ts +63 -0
  289. package/src/css/styles/margin/types.ts +11 -0
  290. package/src/css/styles/maxWidth/index.ts +2 -0
  291. package/src/css/styles/maxWidth/maxWidth.ts +6 -0
  292. package/src/css/styles/maxWidth/rules.ts +36 -0
  293. package/src/css/styles/maxWidth/types.ts +6 -0
  294. package/src/css/styles/outline/rules.ts +7 -0
  295. package/src/css/styles/overflow/index.ts +2 -0
  296. package/src/css/styles/overflow/overflow.ts +11 -0
  297. package/src/css/styles/overflow/rules.ts +9 -0
  298. package/src/css/styles/overflow/types.ts +11 -0
  299. package/src/css/styles/padding/index.ts +2 -0
  300. package/src/css/styles/padding/padding.ts +15 -0
  301. package/src/css/styles/padding/rules.ts +61 -0
  302. package/src/css/styles/padding/types.ts +12 -0
  303. package/src/css/styles/pointerEvents/index.ts +2 -0
  304. package/src/css/styles/pointerEvents/pointerEvents.ts +6 -0
  305. package/src/css/styles/pointerEvents/rules.ts +11 -0
  306. package/src/css/styles/pointerEvents/types.ts +7 -0
  307. package/src/css/styles/position/index.ts +2 -0
  308. package/src/css/styles/position/position.ts +7 -0
  309. package/src/css/styles/position/rules.ts +31 -0
  310. package/src/css/styles/position/types.ts +13 -0
  311. package/src/css/styles/radius/index.ts +2 -0
  312. package/src/css/styles/radius/radius.ts +8 -0
  313. package/src/css/styles/radius/rules.ts +13 -0
  314. package/src/css/styles/radius/types.ts +7 -0
  315. package/src/css/styles/shadow/rules.ts +53 -0
  316. package/src/css/styles/width/index.ts +2 -0
  317. package/src/css/styles/width/rules.ts +7 -0
  318. package/src/css/styles/width/types.ts +8 -0
  319. package/src/css/styles/width/width.ts +6 -0
  320. package/src/css/types.ts +626 -0
  321. package/src/css/varNames.ts +381 -0
  322. package/src/css/vars.ts +399 -0
  323. package/src/theme/build/_deprecated/color/factory.ts +1 -1
  324. package/src/theme/build/_deprecated/color/muted/createMuted.ts +2 -2
  325. package/src/theme/build/buildColorTheme.ts +39 -45
  326. package/src/theme/build/renderColorTheme.ts +65 -239
  327. package/src/theme/build/resolveColorTokens.ts +115 -51
  328. package/src/theme/config/tokens/color/types.ts +18 -4
  329. package/src/theme/defaults/colorTokens.ts +10 -17
  330. package/src/theme/defaults/config.ts +1 -1
  331. package/src/theme/getScopedTheme.ts +2 -9
  332. package/src/theme/system/_constants.ts +25 -0
  333. package/src/theme/system/_types.ts +41 -0
  334. package/src/theme/system/color/_constants.ts +0 -8
  335. package/src/theme/system/color/badge.ts +7 -3
  336. package/src/theme/system/index.ts +2 -0
  337. package/src/theme/system/v0/color/_system.ts +4 -8
  338. package/src/theme/system/v0/color/color.ts +2 -3
  339. package/src/theme/versioning/themeColor_v0_v2.ts +0 -26
  340. package/src/theme/versioning/v0_v2.ts +0 -4
  341. package/dist/_chunks-cjs/getTheme_v2.js +0 -342
  342. package/dist/_chunks-cjs/getTheme_v2.js.map +0 -1
  343. package/dist/_chunks-es/getTheme_v2.mjs +0 -343
  344. package/dist/_chunks-es/getTheme_v2.mjs.map +0 -1
  345. package/dist/_legacy/getTheme_v2.esm.js +0 -343
  346. package/dist/_legacy/getTheme_v2.esm.js.map +0 -1
  347. package/src/core/components/autocomplete/autocomplete.styles.tsx +0 -38
  348. package/src/core/components/breadcrumbs/__workshop__/buttons.tsx +0 -58
  349. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +0 -5
  350. package/src/core/components/dialog/styles.ts +0 -76
  351. package/src/core/components/menu/menuDivider.ts +0 -12
  352. package/src/core/components/skeleton/styles.ts +0 -50
  353. package/src/core/components/toast/styles.ts +0 -61
  354. package/src/core/components/tree/style.ts +0 -104
  355. package/src/core/primitives/_selectable/style.ts +0 -114
  356. package/src/core/primitives/card/styles.ts +0 -146
  357. package/src/core/primitives/checkbox/styles.ts +0 -127
  358. /package/src/core/{styles → _compat/styles}/border/index.ts +0 -0
  359. /package/src/core/{styles → _compat/styles}/box/index.ts +0 -0
  360. /package/src/core/{styles → _compat/styles}/card/index.ts +0 -0
  361. /package/src/core/{styles → _compat/styles}/flex/index.ts +0 -0
  362. /package/src/core/{styles → _compat/styles}/focusRing/index.ts +0 -0
  363. /package/src/core/{styles → _compat/styles}/font/codeFontStyle.ts +0 -0
  364. /package/src/core/{styles → _compat/styles}/font/headingFontStyle.ts +0 -0
  365. /package/src/core/{styles → _compat/styles}/font/index.ts +0 -0
  366. /package/src/core/{styles → _compat/styles}/font/labelFontStyle.ts +0 -0
  367. /package/src/core/{styles → _compat/styles}/font/responsiveFont.ts +0 -0
  368. /package/src/core/{styles → _compat/styles}/font/textAlignStyle.ts +0 -0
  369. /package/src/core/{styles → _compat/styles}/font/textFontStyle.ts +0 -0
  370. /package/src/core/{styles → _compat/styles}/grid/gridItemStyle.ts +0 -0
  371. /package/src/core/{styles → _compat/styles}/grid/index.ts +0 -0
  372. /package/src/core/{styles → _compat/styles}/index.ts +0 -0
  373. /package/src/core/{styles → _compat/styles}/input/index.ts +0 -0
  374. /package/src/core/{styles → _compat/styles}/input/responsiveInputPaddingStyle.ts +0 -0
  375. /package/src/core/{styles → _compat/styles}/internal.ts +0 -0
  376. /package/src/core/{styles → _compat/styles}/margin/index.ts +0 -0
  377. /package/src/core/{styles → _compat/styles}/margin/marginStyle.ts +0 -0
  378. /package/src/core/{styles → _compat/styles}/margin/marginsStyle.test.ts +0 -0
  379. /package/src/core/{styles → _compat/styles}/margin/types.ts +0 -0
  380. /package/src/core/{styles → _compat/styles}/padding/index.ts +0 -0
  381. /package/src/core/{styles → _compat/styles}/padding/paddingStyle.test.ts +0 -0
  382. /package/src/core/{styles → _compat/styles}/padding/paddingStyle.ts +0 -0
  383. /package/src/core/{styles → _compat/styles}/padding/types.ts +0 -0
  384. /package/src/core/{styles → _compat/styles}/radius/index.ts +0 -0
  385. /package/src/core/{styles → _compat/styles}/radius/radiusStyle.ts +0 -0
  386. /package/src/core/{styles → _compat/styles}/shadow/index.ts +0 -0
  387. /package/src/core/{styles → _compat/styles}/shadow/types.ts +0 -0
  388. /package/src/core/{styles → _compat/styles}/types.ts +0 -0
  389. /package/src/core/{_compat.ts → _compat/types.ts} +0 -0
@@ -1,39 +1,25 @@
1
- import {ThemeFontWeightKey} from '@sanity/ui/theme'
1
+ import {composeClassNames, FontStyleProps, heading, ResponsiveProp} from '@sanity/ui/css'
2
+ import {FontHeadingSize} from '@sanity/ui/theme'
2
3
  import {forwardRef} from 'react'
3
- import {styled} from 'styled-components'
4
- import {useArrayProp} from '../../hooks'
5
- import {
6
- ResponsiveFontStyleProps,
7
- responsiveHeadingFont,
8
- responsiveTextAlignStyle,
9
- ResponsiveTextAlignStyleProps,
10
- } from '../../styles/internal'
11
- import {TextAlign} from '../../types'
12
- import {headingBaseStyle} from './styles'
13
- import {HeadingStyleProps} from './types'
4
+ import {styled} from '../../lib/styled'
14
5
 
15
6
  /**
16
7
  * @public
17
8
  */
18
- export interface HeadingProps {
9
+ export interface HeadingProps extends FontStyleProps {
19
10
  accent?: boolean
20
- align?: TextAlign | TextAlign[]
21
11
  as?: React.ElementType | keyof JSX.IntrinsicElements
22
12
  muted?: boolean
23
- size?: number | number[]
13
+ size?: ResponsiveProp<FontHeadingSize>
24
14
  /**
25
15
  * Controls how overflowing text is treated.
26
16
  * Use `textOverflow="ellipsis"` to render text as a single line which is concatenated with a `…` symbol.
27
17
  * @beta
28
18
  */
29
- textOverflow?: 'ellipsis' | 'none'
30
- weight?: ThemeFontWeightKey
19
+ textOverflow?: 'ellipsis'
31
20
  }
32
21
 
33
- const Root = styled.div<
34
- HeadingStyleProps & ResponsiveTextAlignStyleProps & ResponsiveFontStyleProps
35
- >(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont)
36
-
22
+ // todo
37
23
  const SpanWithTextOverflow = styled.span`
38
24
  display: block;
39
25
  white-space: nowrap;
@@ -54,7 +40,9 @@ export const Heading = forwardRef(function Heading(
54
40
  const {
55
41
  accent = false,
56
42
  align,
43
+ as: As = 'div',
57
44
  children: childrenProp,
45
+ className,
58
46
  muted = false,
59
47
  size = 2,
60
48
  textOverflow,
@@ -69,18 +57,26 @@ export const Heading = forwardRef(function Heading(
69
57
  }
70
58
 
71
59
  return (
72
- <Root
60
+ <As
73
61
  data-ui="Heading"
74
62
  {...restProps}
75
- $accent={accent}
76
- $align={useArrayProp(align)}
77
- $muted={muted}
78
- $size={useArrayProp(size)}
79
- $weight={weight}
63
+ // todo
64
+ // $align={useArrayProp(align)}
65
+ className={composeClassNames(
66
+ className,
67
+ heading({
68
+ accent,
69
+ align,
70
+ muted,
71
+ size,
72
+ weight,
73
+ }),
74
+ )}
80
75
  ref={ref}
81
76
  >
82
77
  <span>{children}</span>
83
- </Root>
78
+ </As>
84
79
  )
85
80
  })
81
+
86
82
  Heading.displayName = 'ForwardRef(Heading)'
@@ -1,6 +1,6 @@
1
1
  import {getTheme_v2} from '@sanity/ui/theme'
2
- import {css} from 'styled-components'
3
- import {ThemeProps} from '../../styles'
2
+ import {ThemeProps} from '../../_compat'
3
+ import {css} from '../../lib/styled'
4
4
  import {HeadingStyleProps} from './types'
5
5
 
6
6
  export function headingBaseStyle(props: HeadingStyleProps & ThemeProps): ReturnType<typeof css> {
@@ -1,47 +1,47 @@
1
- import {forwardRef, useMemo, Children} from 'react'
2
- import {styled} from 'styled-components'
3
- import {useArrayProp} from '../../hooks'
1
+ import {ResponsiveProp} from '@sanity/ui/css'
2
+ import {Space} from '@sanity/ui/theme'
3
+ import {forwardRef, useMemo, Children, ForwardedRef} from 'react'
4
4
  import {Box, BoxProps} from '../box'
5
- import {inlineBaseStyle, inlineSpaceStyle} from './styles'
6
- import {ResponsiveInlineSpaceStyleProps} from './types'
7
5
 
8
6
  /**
9
7
  * @public
10
8
  */
11
- export interface InlineProps extends Omit<BoxProps, 'display'> {
9
+ export interface InlineProps
10
+ extends Omit<BoxProps, 'align' | 'display' | 'gap' | 'gapX' | 'gapY' | 'justify'> {
12
11
  /** The spacing between children. */
13
- space?: number | number[]
12
+ space?: ResponsiveProp<Space>
14
13
  }
15
14
 
16
- const Root = styled(Box)<ResponsiveInlineSpaceStyleProps>(inlineBaseStyle, inlineSpaceStyle)
17
-
18
15
  /**
19
16
  * The `Inline` component is a layout utility for aligning and spacing items horizontally.
20
17
  *
21
18
  * @public
22
19
  */
23
20
  export const Inline = forwardRef(function Inline(
24
- props: InlineProps & React.HTMLProps<HTMLDivElement>,
25
- ref,
21
+ props: InlineProps & Omit<React.HTMLProps<HTMLDivElement>, 'wrap'>,
22
+ ref: ForwardedRef<HTMLDivElement>,
26
23
  ) {
27
24
  const {as, children: childrenProp, space, ...restProps} = props
28
25
 
29
26
  const children = useMemo(
30
- () => Children.map(childrenProp, (child) => child && <div>{child}</div>),
27
+ () => Children.map(childrenProp, (child) => child && <Box maxWidth="fill">{child}</Box>),
31
28
  [childrenProp],
32
29
  )
33
30
 
34
31
  return (
35
- <Root
32
+ <Box
36
33
  data-ui="Inline"
37
34
  {...restProps}
38
- $space={useArrayProp(space)}
39
- forwardedAs={as}
40
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
41
- ref={ref as any}
35
+ align="center"
36
+ as={as}
37
+ display="flex"
38
+ gap={space}
39
+ ref={ref}
40
+ wrap="wrap"
42
41
  >
43
42
  {children}
44
- </Root>
43
+ </Box>
45
44
  )
46
45
  })
46
+
47
47
  Inline.displayName = 'ForwardRef(Inline)'
@@ -1,5 +1,5 @@
1
1
  import {CSSObject, getTheme_v2} from '@sanity/ui/theme'
2
- import {rem, _responsive, ThemeProps} from '../../styles'
2
+ import {rem, _responsive, ThemeProps} from '../../_compat'
3
3
  import {ResponsiveInlineSpaceStyleProps} from './types'
4
4
 
5
5
  export function inlineBaseStyle(): CSSObject {
@@ -1,41 +1,18 @@
1
+ import {composeClassNames, kbd, RadiusStyleProps, ResponsiveProp} from '@sanity/ui/css'
2
+ import {FontTextSize, Space} from '@sanity/ui/theme'
1
3
  import {forwardRef} from 'react'
2
- import {styled, css} from 'styled-components'
3
- import {useArrayProp} from '../../hooks'
4
- import {responsiveRadiusStyle, ResponsiveRadiusStyleProps} from '../../styles/internal'
5
- import {Radius} from '../../types'
6
- import {Box} from '../box'
4
+ import {Box, BoxProps} from '../box'
7
5
  import {Text} from '../text'
8
6
 
9
7
  /**
10
8
  * @public
11
9
  */
12
- export interface KBDProps {
10
+ export interface KBDProps extends BoxProps, RadiusStyleProps {
13
11
  as?: React.ElementType | keyof JSX.IntrinsicElements
14
- fontSize?: number | number[]
15
- padding?: number | number[]
16
- radius?: Radius | Radius[]
12
+ fontSize?: ResponsiveProp<FontTextSize>
13
+ padding?: ResponsiveProp<Space>
17
14
  }
18
15
 
19
- function kbdStyle() {
20
- return css`
21
- --card-bg-color: var(--card-kbd-bg-color);
22
- --card-border-color: var(--card-kbd-border-color);
23
- --card-fg-color: var(--card-kbd-fg-color);
24
-
25
- box-shadow: inset 0 0 0 1px var(--card-border-color);
26
- background: var(--card-bg-color);
27
- font: inherit;
28
-
29
- vertical-align: top;
30
-
31
- &:not([hidden]) {
32
- display: inline-block;
33
- }
34
- `
35
- }
36
-
37
- const Root = styled.kbd<ResponsiveRadiusStyleProps>(responsiveRadiusStyle, kbdStyle)
38
-
39
16
  /**
40
17
  * Used to define some text as keyboard input.
41
18
  *
@@ -45,16 +22,32 @@ export const KBD = forwardRef(function KBD(
45
22
  props: KBDProps & Omit<React.HTMLProps<HTMLElement>, 'as' | 'ref' | 'size'>,
46
23
  ref: React.ForwardedRef<HTMLDivElement>,
47
24
  ) {
48
- const {children, fontSize = 0, padding = 1, radius = 2, ...restProps} = props
25
+ const {
26
+ as = 'kbd',
27
+ children,
28
+ className,
29
+ display = 'inline-block',
30
+ fontSize = 0,
31
+ padding = 1,
32
+ radius = 2,
33
+ ...restProps
34
+ } = props
49
35
 
50
36
  return (
51
- <Root data-ui="KBD" {...restProps} $radius={useArrayProp(radius)} ref={ref}>
52
- <Box as="span" padding={padding}>
53
- <Text as="span" size={fontSize} weight="semibold">
54
- {children}
55
- </Text>
56
- </Box>
57
- </Root>
37
+ <Box
38
+ data-ui="KBD"
39
+ {...restProps}
40
+ as={as}
41
+ className={composeClassNames(className, kbd({radius}))}
42
+ display={display}
43
+ padding={padding}
44
+ ref={ref}
45
+ >
46
+ <Text as="span" size={fontSize} weight="semibold">
47
+ {children}
48
+ </Text>
49
+ </Box>
58
50
  )
59
51
  })
52
+
60
53
  KBD.displayName = 'ForwardRef(KBD)'
@@ -1,17 +1,16 @@
1
+ import {composeClassNames, FontStyleProps, label} from '@sanity/ui/css'
1
2
  import {ThemeFontWeightKey} from '@sanity/ui/theme'
2
3
  import {forwardRef} from 'react'
3
- import {styled} from 'styled-components'
4
- import {useArrayProp} from '../../hooks'
5
- import {responsiveLabelFont, responsiveTextAlignStyle} from '../../styles/internal'
4
+ import {responsiveLabelFont, responsiveTextAlignStyle} from '../../_compat/styles/internal'
5
+ import {styled} from '../../lib/styled'
6
6
  import {TextAlign} from '../../types'
7
7
  import {labelBaseStyle} from './styles'
8
8
 
9
9
  /**
10
10
  * @public
11
11
  */
12
- export interface LabelProps {
12
+ export interface LabelProps extends FontStyleProps {
13
13
  accent?: boolean
14
- align?: TextAlign | TextAlign[]
15
14
  as?: React.ElementType | keyof JSX.IntrinsicElements
16
15
  muted?: boolean
17
16
  size?: number | number[]
@@ -52,6 +51,7 @@ export const Label = forwardRef(function Label(
52
51
  accent,
53
52
  align,
54
53
  children: childrenProp,
54
+ className,
55
55
  muted = false,
56
56
  size = 2,
57
57
  textOverflow,
@@ -71,15 +71,21 @@ export const Label = forwardRef(function Label(
71
71
  <Root
72
72
  data-ui="Label"
73
73
  {...restProps}
74
- $accent={accent}
75
- $align={useArrayProp(align)}
76
- $muted={muted}
77
- $size={useArrayProp(size)}
78
74
  $weight={weight}
75
+ className={composeClassNames(
76
+ className,
77
+ label({
78
+ accent,
79
+ align,
80
+ muted,
81
+ size,
82
+ }),
83
+ )}
79
84
  ref={ref}
80
85
  >
81
86
  {children}
82
87
  </Root>
83
88
  )
84
89
  })
90
+
85
91
  Label.displayName = 'ForwardRef(Label)'
@@ -1,6 +1,6 @@
1
1
  import {getTheme_v2} from '@sanity/ui/theme'
2
- import {css} from 'styled-components'
3
- import {ThemeProps} from '../../styles'
2
+ import {ThemeProps} from '../../_compat'
3
+ import {css} from '../../lib/styled'
4
4
 
5
5
  export function labelBaseStyle(
6
6
  props: {$accent?: boolean; $muted: boolean} & ThemeProps,
@@ -1,4 +1,4 @@
1
- import {Button, Card, Popover, PortalProvider, Text} from '@sanity/ui'
1
+ import {Button, Card, Popover, PortalProvider, Radius, Text} from '@sanity/ui'
2
2
  import {useBoolean, useSelect} from '@sanity/ui-workshop'
3
3
  import {useState} from 'react'
4
4
  import {
@@ -56,7 +56,7 @@ export default function PlainStory() {
56
56
  placement={placement}
57
57
  portal={portal}
58
58
  preventOverflow={preventOverflow}
59
- radius={radius}
59
+ radius={radius as Radius}
60
60
  width={width}
61
61
  >
62
62
  <Button text="This button is the popover reference" />
@@ -62,7 +62,6 @@ function RecursiveExample({onClose}: {onClose?: () => void}) {
62
62
  mode="bleed"
63
63
  onKeyDown={handleKeyDown}
64
64
  onClick={handleOpen}
65
- radius={3}
66
65
  ref={buttonRef}
67
66
  text="Open"
68
67
  />
@@ -1,3 +1,4 @@
1
+ import {Radius} from '@sanity/ui/theme'
1
2
  import {useBoolean, useSelect, useText} from '@sanity/ui-workshop'
2
3
  import {ReactElement, useRef, useState} from 'react'
3
4
  import {
@@ -80,7 +81,7 @@ export default function TestStory(): ReactElement {
80
81
  placement={placement}
81
82
  portal={portal}
82
83
  preventOverflow={preventOverflow}
83
- radius={radius}
84
+ radius={radius as Radius}
84
85
  updateRef={updateRef}
85
86
  width={width}
86
87
  >
@@ -1,4 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
+
2
3
  import {
3
4
  Middleware,
4
5
  RootBoundary,
@@ -10,6 +11,7 @@ import {
10
11
  shift,
11
12
  useFloating,
12
13
  } from '@floating-ui/react-dom'
14
+ import {RadiusStyleProps} from '@sanity/ui/css'
13
15
  import {ThemeColorSchemeKey} from '@sanity/ui/theme'
14
16
  import {AnimatePresence} from 'framer-motion'
15
17
  import {
@@ -29,7 +31,7 @@ import {origin} from '../../middleware/origin'
29
31
  import {useTheme_v2} from '../../theme'
30
32
  import {BoxOverflow, CardTone, Placement, PopoverMargins} from '../../types'
31
33
  import {LayerProps, LayerProvider, Portal, useBoundaryElement} from '../../utils'
32
- import {ResponsiveRadiusProps, ResponsiveShadowProps} from '../types'
34
+ import {ResponsiveShadowProps} from '../types'
33
35
  import {
34
36
  DEFAULT_POPOVER_DISTANCE,
35
37
  DEFAULT_POPOVER_MARGINS,
@@ -45,8 +47,8 @@ export type {PopoverUpdateCallback}
45
47
 
46
48
  /** @public */
47
49
  export interface PopoverProps
48
- extends Omit<LayerProps, 'as'>,
49
- ResponsiveRadiusProps,
50
+ extends Omit<LayerProps, 'width'>,
51
+ RadiusStyleProps,
50
52
  ResponsiveShadowProps {
51
53
  /** @beta */
52
54
  __unstable_margins?: PopoverMargins
@@ -116,7 +118,10 @@ export interface PopoverProps
116
118
  export const Popover = memo(
117
119
  forwardRef(function Popover(
118
120
  props: PopoverProps &
119
- Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'width'>,
121
+ Omit<
122
+ React.HTMLProps<HTMLDivElement>,
123
+ 'as' | 'children' | 'content' | 'height' | 'rows' | 'width' | 'wrap'
124
+ >,
120
125
  forwardedRef: React.ForwardedRef<HTMLDivElement>,
121
126
  ): React.ReactElement {
122
127
  const {container, layer} = useTheme_v2()
@@ -139,15 +144,15 @@ export const Popover = memo(
139
144
  onActivate,
140
145
  open,
141
146
  overflow = 'hidden',
142
- padding: paddingProp,
147
+ padding,
143
148
  placement: placementProp = 'bottom',
144
149
  portal,
145
150
  preventOverflow = true,
146
- radius: radiusProp = 3,
151
+ radius = 3,
147
152
  referenceBoundary = props.boundaryElement ?? boundaryElementContext.element,
148
153
  referenceElement,
149
154
  scheme,
150
- shadow: shadowProp = 3,
155
+ shadow = 3,
151
156
  tone = 'inherit',
152
157
  width: widthProp = 'auto',
153
158
  zOffset: zOffsetProp = layer.popover.zOffset,
@@ -157,9 +162,9 @@ export const Popover = memo(
157
162
  const prefersReducedMotion = usePrefersReducedMotion()
158
163
  const animate = prefersReducedMotion ? false : _animate
159
164
  const boundarySize = useElementSize(boundaryElement)?.border
160
- const padding = useArrayProp(paddingProp)
161
- const radius = useArrayProp(radiusProp)
162
- const shadow = useArrayProp(shadowProp)
165
+ // const padding = useArrayProp(paddingProp)
166
+ // const radius = useArrayProp(radiusProp)
167
+ // const shadow = useArrayProp(shadowProp)
163
168
  const widthArrayProp = useArrayProp(widthProp)
164
169
  const zOffset = useArrayProp(zOffsetProp)
165
170
  const ref = useRef<HTMLDivElement | null>(null)
@@ -354,6 +359,7 @@ export const Popover = memo(
354
359
  (node: HTMLElement | null) => {
355
360
  refs.setReference(node)
356
361
 
362
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
357
363
  const childRef = getElementRef(childProp as any)
358
364
 
359
365
  if (typeof childRef === 'function') {
@@ -366,9 +372,9 @@ export const Popover = memo(
366
372
  )
367
373
 
368
374
  const child = useMemo(() => {
369
- if (!childProp) return null
375
+ if (!childProp || referenceElement) return null
370
376
 
371
- return cloneElement(childProp, {ref: referenceElement ? undefined : setReference})
377
+ return cloneElement(childProp, {ref: setReference})
372
378
  }, [childProp, referenceElement, setReference])
373
379
 
374
380
  useEffect(() => {
@@ -382,9 +388,8 @@ export const Popover = memo(
382
388
  }, [update, updateRef])
383
389
 
384
390
  useEffect(() => {
385
- if (referenceElement) {
386
- refs.setReference(referenceElement)
387
- }
391
+ if (child) return
392
+ refs.setReference(referenceElement || null)
388
393
  }, [referenceElement, refs, child])
389
394
 
390
395
  if (disabled) {
@@ -441,6 +446,7 @@ export const Popover = memo(
441
446
  )
442
447
  }),
443
448
  )
449
+
444
450
  Popover.displayName = 'Memo(ForwardRef(Popover))'
445
451
 
446
452
  // Before React 19 accessing `element.props.ref` will throw a warning and suggest using `element.ref`
@@ -1,10 +1,13 @@
1
1
  import {Strategy} from '@floating-ui/react-dom'
2
+ import {RadiusStyleProps} from '@sanity/ui/css'
2
3
  import {ThemeColorSchemeKey} from '@sanity/ui/theme'
3
4
  import {MotionProps, motion} from 'framer-motion'
4
5
  import React, {CSSProperties, forwardRef, memo, useMemo} from 'react'
5
- import {styled} from 'styled-components'
6
- import {POPOVER_MOTION_CONTENT_OPACITY_PROPERTY, POPOVER_MOTION_PROPS} from '../../constants'
7
- import {BoxOverflow, CardTone, Placement, PopoverMargins, Radius} from '../../types'
6
+ import {
7
+ // POPOVER_MOTION_CONTENT_OPACITY_PROPERTY,
8
+ POPOVER_MOTION_PROPS,
9
+ } from '../../constants'
10
+ import {BoxOverflow, CardTone, Placement, PopoverMargins} from '../../types'
8
11
  import {Arrow, useLayer} from '../../utils'
9
12
  import {Card, CardProps} from '../card'
10
13
  import {Flex} from '../flex'
@@ -15,46 +18,38 @@ import {
15
18
  DEFAULT_POPOVER_MARGINS,
16
19
  } from './constants'
17
20
 
18
- const MotionCard = styled(motion(Card))`
19
- &:not([hidden]) {
20
- display: flex;
21
- }
22
- flex-direction: column;
23
- width: max-content;
24
- min-width: min-content;
25
- & > * {
26
- opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
27
- will-change: opacity;
28
- }
29
- `
21
+ /** @internal */
22
+ export interface PopoverCardProps extends RadiusStyleProps {
23
+ /** @beta*/
24
+ __unstable_margins?: PopoverMargins
25
+ animate?: boolean
26
+ arrow: boolean
27
+ arrowRef: React.Ref<HTMLDivElement>
28
+ arrowX?: number
29
+ arrowY?: number
30
+ originX?: number
31
+ originY?: number
32
+ overflow?: BoxOverflow
33
+ padding?: number | number[]
34
+ placement: Placement
35
+ scheme?: ThemeColorSchemeKey
36
+ shadow?: number | number[]
37
+ strategy: Strategy
38
+ tone: CardTone
39
+ width: number | undefined
40
+ x: number | null
41
+ y: number | null
42
+ }
43
+
44
+ const MotionCard = motion(Card)
30
45
 
31
46
  /**
32
47
  * @internal
33
48
  */
34
49
  export const PopoverCard = memo(
35
50
  forwardRef(function PopoverCard(
36
- props: {
37
- /** @beta*/
38
- __unstable_margins?: PopoverMargins
39
- animate?: boolean
40
- arrow: boolean
41
- arrowRef: React.Ref<HTMLDivElement>
42
- arrowX?: number
43
- arrowY?: number
44
- originX?: number
45
- originY?: number
46
- overflow?: BoxOverflow
47
- padding?: number | number[]
48
- placement: Placement
49
- radius?: Radius | Radius[]
50
- scheme?: ThemeColorSchemeKey
51
- shadow?: number | number[]
52
- strategy: Strategy
53
- tone: CardTone
54
- width: number | undefined
55
- x: number | null
56
- y: number | null
57
- } & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'width'>,
51
+ props: PopoverCardProps &
52
+ Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'rows' | 'width' | 'wrap'>,
58
53
  ref: React.ForwardedRef<HTMLDivElement>,
59
54
  ) {
60
55
  const {
@@ -121,6 +116,7 @@ export const PopoverCard = memo(
121
116
 
122
117
  return (
123
118
  <MotionCard
119
+ className="popover-card"
124
120
  data-ui="Popover"
125
121
  {...(restProps as CardProps & MotionProps)}
126
122
  data-placement={placement}
@@ -131,7 +127,9 @@ export const PopoverCard = memo(
131
127
  sizing="border"
132
128
  style={rootStyle}
133
129
  tone={tone}
134
- {...(animate ? POPOVER_MOTION_PROPS : {})}
130
+ // todo
131
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
132
+ {...((animate ? POPOVER_MOTION_PROPS : {}) as any)}
135
133
  >
136
134
  <Flex data-ui="Popover__wrapper" direction="column" flex={1} overflow={overflow}>
137
135
  <Flex direction="column" flex={1} padding={padding}>
@@ -1,6 +1,6 @@
1
1
  import {forwardRef, useImperativeHandle, useRef} from 'react'
2
- import {styled} from 'styled-components'
3
2
  import {useCustomValidity} from '../../hooks'
3
+ import {styled} from '../../lib/styled'
4
4
  import {radioBaseStyle, inputElementStyle} from './styles'
5
5
 
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  import {getTheme_v2} from '@sanity/ui/theme'
2
- import {css} from 'styled-components'
3
- import {rem, ThemeProps} from '../../styles'
4
- import {focusRingBorderStyle, focusRingStyle} from '../../styles/internal'
2
+ import {rem, ThemeProps} from '../../_compat'
3
+ import {focusRingBorderStyle, focusRingStyle} from '../../_compat/styles/internal'
4
+ import {css} from '../../lib/styled'
5
5
 
6
6
  export function radioBaseStyle(): ReturnType<typeof css> {
7
7
  return css`
@@ -1,7 +1,7 @@
1
1
  import {ChevronDownIcon} from '@sanity/icons'
2
2
  import {forwardRef, useImperativeHandle, useRef} from 'react'
3
- import {styled} from 'styled-components'
4
3
  import {useCustomValidity, useArrayProp} from '../../hooks'
4
+ import {styled} from '../../lib/styled'
5
5
  import {Radius} from '../../types'
6
6
  import {Box} from '../box'
7
7
  import {Text} from '../text'
@@ -1,14 +1,14 @@
1
1
  import {ThemeFontSize, getTheme_v2} from '@sanity/ui/theme'
2
2
  import {CSSObject} from '@sanity/ui/theme'
3
- import {css} from 'styled-components'
4
- import {rem, _responsive, ThemeProps} from '../../styles'
3
+ import {rem, _responsive, ThemeProps} from '../../_compat'
5
4
  import {
6
5
  focusRingBorderStyle,
7
6
  focusRingStyle,
8
7
  responsiveInputPaddingIconRightStyle,
9
8
  responsiveRadiusStyle,
10
9
  ResponsiveRadiusStyleProps,
11
- } from '../../styles/internal'
10
+ } from '../../_compat/styles/internal'
11
+ import {css} from '../../lib/styled'
12
12
 
13
13
  function rootStyle(): ReturnType<typeof css> {
14
14
  return css`
@@ -1,4 +1,5 @@
1
1
  import {Flex, Spinner} from '@sanity/ui'
2
+ import {FontTextSize} from '@sanity/ui/theme'
2
3
  import {useBoolean, useSelect} from '@sanity/ui-workshop'
3
4
  import {WORKSHOP_TEXT_SIZE_OPTIONS} from '../../../__workshop__/constants'
4
5
 
@@ -8,7 +9,7 @@ export default function Props() {
8
9
 
9
10
  return (
10
11
  <Flex align="center" height="fill" justify="center">
11
- <Spinner muted={muted} size={size} />
12
+ <Spinner muted={muted} size={size as FontTextSize} />
12
13
  </Flex>
13
14
  )
14
15
  }