@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,24 +1,18 @@
1
1
  import {CloseIcon} from '@sanity/icons'
2
- import {ThemeFontWeightKey} from '@sanity/ui/theme'
2
+ import {
3
+ composeClassNames,
4
+ RadiusStyleProps,
5
+ ResponsiveProp,
6
+ textInput,
7
+ textInputElement,
8
+ } from '@sanity/ui/css'
9
+ import {FontTextSize, Space, ThemeFontWeightKey} from '@sanity/ui/theme'
3
10
  import {forwardRef, isValidElement, useCallback, useImperativeHandle, useMemo, useRef} from 'react'
4
11
  import {isValidElementType} from 'react-is'
5
- import {styled} from 'styled-components'
6
12
  import {EMPTY_RECORD} from '../../constants'
7
13
  import {useArrayProp, useCustomValidity} from '../../hooks'
8
- import {
9
- responsiveRadiusStyle,
10
- ResponsiveRadiusStyleProps,
11
- responsiveInputPaddingStyle,
12
- TextInputInputStyleProps,
13
- TextInputRepresentationStyleProps,
14
- TextInputResponsivePaddingStyleProps,
15
- textInputBaseStyle,
16
- textInputFontSizeStyle,
17
- textInputRepresentationStyle,
18
- textInputRootStyle,
19
- } from '../../styles/internal'
14
+ import {styled} from '../../lib/styled'
20
15
  import {useRootTheme} from '../../theme'
21
- import {Radius} from '../../types'
22
16
  import {Box} from '../box'
23
17
  import {Button, ButtonProps} from '../button'
24
18
  import {Card} from '../card'
@@ -50,7 +44,7 @@ export type TextInputType =
50
44
  /**
51
45
  * @public
52
46
  */
53
- export interface TextInputProps {
47
+ export interface TextInputProps extends RadiusStyleProps {
54
48
  /**
55
49
  * @beta
56
50
  */
@@ -61,82 +55,27 @@ export interface TextInputProps {
61
55
  */
62
56
  clearButton?: boolean | TextInputClearButtonProps
63
57
  customValidity?: string
64
- fontSize?: number | number[]
58
+ fontSize?: ResponsiveProp<FontTextSize>
65
59
  icon?: React.ElementType | React.ReactNode
66
60
  iconRight?: React.ElementType | React.ReactNode
67
61
  /**
68
62
  * @beta
69
63
  */
70
64
  onClear?: () => void
71
- padding?: number | number[]
65
+ padding?: ResponsiveProp<Space>
72
66
  prefix?: React.ReactNode
73
- radius?: Radius | Radius[]
74
- space?: number | number[]
67
+ space?: ResponsiveProp<Space>
75
68
  suffix?: React.ReactNode
76
69
  type?: TextInputType
77
70
  weight?: ThemeFontWeightKey
78
71
  }
79
72
 
80
- const CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {zIndex: 2}
81
-
82
- const Root = styled(Card).attrs({forwardedAs: 'span'})(textInputRootStyle)
83
-
84
- const InputRoot = styled.span`
85
- flex: 1;
86
- min-width: 0;
87
- display: block;
88
- position: relative;
89
- `
90
-
91
- const Prefix = styled(Card).attrs({forwardedAs: 'span'})`
92
- border-top-right-radius: 0;
93
- border-bottom-right-radius: 0;
94
-
95
- & > span {
96
- display: block;
97
- margin: -1px;
98
- }
99
- `
100
-
101
- const Suffix = styled(Card).attrs({forwardedAs: 'span'})`
102
- border-top-left-radius: 0;
103
- border-bottom-left-radius: 0;
104
-
105
- & > span {
106
- display: block;
107
- margin: -1px;
108
- }
109
- `
110
-
111
- const Input = styled.input<TextInputResponsivePaddingStyleProps & TextInputInputStyleProps>(
112
- responsiveInputPaddingStyle,
113
- textInputBaseStyle,
114
- textInputFontSizeStyle,
115
- )
116
-
117
- const Presentation = styled.span<ResponsiveRadiusStyleProps & TextInputRepresentationStyleProps>(
118
- responsiveRadiusStyle,
119
- textInputRepresentationStyle,
120
- )
121
-
122
- const LeftBox = styled(Box)`
123
- position: absolute;
124
- top: 0;
125
- left: 0;
126
- `
127
-
128
- const RightBox = styled(Box)`
129
- position: absolute;
130
- top: 0;
131
- right: 0;
132
- `
133
-
134
- const RightCard = styled(Card)`
135
- background-color: transparent;
136
- position: absolute;
137
- top: 0;
138
- right: 0;
139
- `
73
+ const CLEAR_BUTTON_BOX_STYLE: React.CSSProperties = {
74
+ backgroundColor: 'transparent',
75
+ top: 0,
76
+ right: 0,
77
+ zIndex: 2,
78
+ }
140
79
 
141
80
  const TextInputClearButton = styled(Button)({
142
81
  '&:not([hidden])': {
@@ -156,6 +95,7 @@ export const TextInput = forwardRef(function TextInput(
156
95
  const {
157
96
  __unstable_disableFocusRing,
158
97
  border = true,
98
+ className,
159
99
  clearButton,
160
100
  disabled = false,
161
101
  fontSize: fontSizeProp = 2,
@@ -166,11 +106,11 @@ export const TextInput = forwardRef(function TextInput(
166
106
  prefix,
167
107
  radius: radiusProp = 2,
168
108
  readOnly,
169
- space: spaceProp = 3,
109
+ space: _space = 3, // eslint-disable-line @typescript-eslint/no-unused-vars
170
110
  suffix,
171
111
  customValidity,
172
112
  type = 'text',
173
- weight,
113
+ weight: _width, // eslint-disable-line @typescript-eslint/no-unused-vars
174
114
  ...restProps
175
115
  } = props
176
116
  const ref = useRef<HTMLInputElement | null>(null)
@@ -180,14 +120,14 @@ export const TextInput = forwardRef(function TextInput(
180
120
  const fontSize = useArrayProp(fontSizeProp)
181
121
  const padding = useArrayProp(paddingProp)
182
122
  const radius = useArrayProp(radiusProp)
183
- const space = useArrayProp(spaceProp)
123
+ // const space = useArrayProp(spaceProp)
184
124
 
185
125
  // Transient properties
186
126
  const $hasClearButton = Boolean(clearButton)
187
- const $hasIcon = Boolean(IconComponent)
188
- const $hasIconRight = Boolean(IconRightComponent)
189
- const $hasSuffix = Boolean(suffix)
190
- const $hasPrefix = Boolean(prefix)
127
+ // const $hasIcon = Boolean(IconComponent)
128
+ // const $hasIconRight = Boolean(IconRightComponent)
129
+ // const $hasSuffix = Boolean(suffix)
130
+ // const $hasPrefix = Boolean(prefix)
191
131
 
192
132
  useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(
193
133
  forwardedRef,
@@ -219,9 +159,18 @@ export const TextInput = forwardRef(function TextInput(
219
159
  const prefixNode = useMemo(
220
160
  () =>
221
161
  prefix && (
222
- <Prefix borderTop borderLeft borderBottom radius={radius} sizing="border" tone="inherit">
162
+ <Card
163
+ as="span"
164
+ borderTop
165
+ borderLeft
166
+ borderBottom
167
+ className="text-input-prefix"
168
+ radius={radius}
169
+ sizing="border"
170
+ tone="inherit"
171
+ >
223
172
  <span>{prefix}</span>
224
- </Prefix>
173
+ </Card>
225
174
  ),
226
175
  [prefix, radius],
227
176
  )
@@ -229,35 +178,41 @@ export const TextInput = forwardRef(function TextInput(
229
178
  // Render presentation (memoized)
230
179
  const presentationNode = useMemo(
231
180
  () => (
232
- <Presentation
233
- $hasPrefix={$hasPrefix}
234
- $unstableDisableFocusRing={__unstable_disableFocusRing}
235
- $hasSuffix={$hasSuffix}
236
- $radius={radius}
237
- $scheme={rootTheme.scheme}
238
- $tone={rootTheme.tone}
181
+ <Card
182
+ as="span"
183
+ // $hasPrefix={$hasPrefix}
184
+ // $unstableDisableFocusRing={__unstable_disableFocusRing}
185
+ // $hasSuffix={$hasSuffix}
186
+ // $radius={radius}
187
+ // $scheme={rootTheme.scheme}
188
+ // $tone={rootTheme.tone}
189
+ // border={border}
190
+ className="text-input-presentation"
239
191
  data-border={border ? '' : undefined}
192
+ data-disable-focus-ring={__unstable_disableFocusRing ? '' : undefined}
240
193
  data-scheme={rootTheme.scheme}
241
194
  data-tone={rootTheme.tone}
195
+ position="absolute"
196
+ radius={radius}
242
197
  >
243
198
  {IconComponent && (
244
- <LeftBox padding={padding}>
199
+ <Box as="span" padding={padding} position="absolute" style={{top: 0, left: 0}}>
245
200
  <Text size={fontSize}>
246
201
  {isValidElement(IconComponent) && IconComponent}
247
202
  {isValidElementType(IconComponent) && <IconComponent />}
248
203
  </Text>
249
- </LeftBox>
204
+ </Box>
250
205
  )}
251
206
 
252
207
  {!$hasClearButton && IconRightComponent && (
253
- <RightBox padding={padding}>
208
+ <Box as="span" padding={padding} position="absolute" style={{top: 0, right: 0}}>
254
209
  <Text size={fontSize}>
255
210
  {isValidElement(IconRightComponent) && IconRightComponent}
256
211
  {isValidElementType(IconRightComponent) && <IconRightComponent />}
257
212
  </Text>
258
- </RightBox>
213
+ </Box>
259
214
  )}
260
- </Presentation>
215
+ </Card>
261
216
  ),
262
217
  [
263
218
  __unstable_disableFocusRing,
@@ -269,8 +224,8 @@ export const TextInput = forwardRef(function TextInput(
269
224
  radius,
270
225
  rootTheme,
271
226
  $hasClearButton,
272
- $hasPrefix,
273
- $hasSuffix,
227
+ // $hasPrefix,
228
+ // $hasSuffix,
274
229
  ],
275
230
  )
276
231
 
@@ -282,10 +237,11 @@ export const TextInput = forwardRef(function TextInput(
282
237
  if (v === 1) return 1
283
238
  if (v === 2) return 1
284
239
 
285
- return v - 2
240
+ return (v as Space) - 2
286
241
  }),
287
242
  [padding],
288
243
  )
244
+
289
245
  const clearButtonPadding = useMemo(
290
246
  () =>
291
247
  padding.map((v) => {
@@ -293,7 +249,7 @@ export const TextInput = forwardRef(function TextInput(
293
249
  if (v === 1) return 0
294
250
  if (v === 2) return 1
295
251
 
296
- return v - 1
252
+ return (v as Space) - 1
297
253
  }),
298
254
  [padding],
299
255
  )
@@ -306,11 +262,16 @@ export const TextInput = forwardRef(function TextInput(
306
262
  !disabled &&
307
263
  !readOnly &&
308
264
  clearButton && (
309
- <RightCard
310
- forwardedAs="span"
265
+ <Card
266
+ // forwardedAs="span"
311
267
  padding={clearButtonBoxPadding}
268
+ position="absolute"
312
269
  style={CLEAR_BUTTON_BOX_STYLE}
313
270
  tone={customValidity ? 'critical' : 'inherit'}
271
+
272
+ // position: absolute;
273
+ // top: 0;
274
+ // right: 0;
314
275
  >
315
276
  <TextInputClearButton
316
277
  aria-label="Clear"
@@ -324,7 +285,7 @@ export const TextInput = forwardRef(function TextInput(
324
285
  onClick={handleClearClick}
325
286
  onMouseDown={handleClearMouseDown}
326
287
  />
327
- </RightCard>
288
+ </Card>
328
289
  ),
329
290
  [
330
291
  clearButton,
@@ -345,31 +306,55 @@ export const TextInput = forwardRef(function TextInput(
345
306
  const suffixNode = useMemo(
346
307
  () =>
347
308
  suffix && (
348
- <Suffix borderTop borderRight borderBottom radius={radius} sizing="border" tone="inherit">
309
+ <Card
310
+ as="span"
311
+ borderTop
312
+ borderRight
313
+ borderBottom
314
+ className="text-input-suffix"
315
+ radius={radius}
316
+ sizing="border"
317
+ tone="inherit"
318
+ >
349
319
  <span>{suffix}</span>
350
- </Suffix>
320
+ </Card>
351
321
  ),
352
322
  [radius, suffix],
353
323
  )
354
324
 
355
325
  return (
356
- <Root data-ui="TextInput" tone={rootTheme.tone}>
326
+ <Card
327
+ align="center"
328
+ as="span"
329
+ className={composeClassNames(className, textInput({padding, size: fontSizeProp}))}
330
+ data-ui="TextInput"
331
+ display="flex"
332
+ tone={rootTheme.tone}
333
+ >
357
334
  {prefixNode}
358
335
 
359
- <InputRoot>
360
- <Input
336
+ <Box
337
+ as="span"
338
+ // className="text-input-wrapper"
339
+ flex={1}
340
+ // todo
341
+ // minWidth={0}
342
+ position="relative"
343
+ >
344
+ <input
361
345
  data-as="input"
362
- data-scheme={rootTheme.scheme}
363
- data-tone={rootTheme.tone}
346
+ // data-scheme={rootTheme.scheme}
347
+ // data-tone={rootTheme.tone}
364
348
  {...restProps}
365
- $fontSize={fontSize}
366
- $iconLeft={$hasIcon}
367
- $iconRight={$hasIconRight || $hasClearButton}
368
- $padding={padding}
369
- $scheme={rootTheme.scheme}
370
- $space={space}
371
- $tone={rootTheme.tone}
372
- $weight={weight}
349
+ className={textInputElement()}
350
+ // $fontSize={fontSize}
351
+ // $iconLeft={$hasIcon}
352
+ // $iconRight={$hasIconRight || $hasClearButton}
353
+ // $padding={padding}
354
+ // $scheme={rootTheme.scheme}
355
+ // $space={space}
356
+ // $tone={rootTheme.tone}
357
+ // $weight={weight}
373
358
  disabled={disabled}
374
359
  readOnly={readOnly}
375
360
  ref={ref}
@@ -378,10 +363,11 @@ export const TextInput = forwardRef(function TextInput(
378
363
 
379
364
  {presentationNode}
380
365
  {clearButtonNode}
381
- </InputRoot>
366
+ </Box>
382
367
 
383
368
  {suffixNode}
384
- </Root>
369
+ </Card>
385
370
  )
386
371
  })
372
+
387
373
  TextInput.displayName = 'ForwardRef(TextInput)'
@@ -1,4 +1,5 @@
1
1
  /** @jest-environment jsdom */
2
+
2
3
  import {screen, act, fireEvent} from '@testing-library/react'
3
4
  import '../../../../test/mocks/resizeObserver.mock'
4
5
  import '../../../../test/mocks/matchMedia.mock'
@@ -9,6 +9,7 @@ import {
9
9
  type Middleware,
10
10
  type RootBoundary,
11
11
  } from '@floating-ui/react-dom'
12
+ import {composeClassNames, RadiusStyleProps, tooltip} from '@sanity/ui/css'
12
13
  import type {ThemeColorSchemeKey} from '@sanity/ui/theme'
13
14
  import {AnimatePresence} from 'framer-motion'
14
15
  import {
@@ -23,7 +24,6 @@ import {
23
24
  useImperativeHandle,
24
25
  useLayoutEffect,
25
26
  } from 'react'
26
- import {styled} from 'styled-components'
27
27
  import {useEffectEvent} from 'use-effect-event'
28
28
  import {useArrayProp, usePrefersReducedMotion} from '../../hooks'
29
29
  import {useDelayedState} from '../../hooks/useDelayedState'
@@ -43,7 +43,7 @@ import {useTooltipDelayGroup} from './tooltipDelayGroup'
43
43
  /**
44
44
  * @public
45
45
  */
46
- export interface TooltipProps extends Omit<LayerProps, 'as'> {
46
+ export interface TooltipProps extends Omit<LayerProps, 'as'>, RadiusStyleProps {
47
47
  /** @deprecated Use `fallbackPlacements` instead. */
48
48
  allowedAutoPlacements?: Placement[]
49
49
  arrow?: boolean
@@ -56,7 +56,7 @@ export interface TooltipProps extends Omit<LayerProps, 'as'> {
56
56
  placement?: Placement
57
57
  /** Whether or not to render the tooltip in a portal element. */
58
58
  portal?: boolean | string
59
- radius?: number | number[]
59
+ // radius?: number | number[]
60
60
  scheme?: ThemeColorSchemeKey
61
61
  shadow?: number | number[]
62
62
  /**
@@ -79,17 +79,14 @@ export interface TooltipProps extends Omit<LayerProps, 'as'> {
79
79
  animate?: boolean
80
80
  }
81
81
 
82
- const Root = styled(Layer)`
83
- pointer-events: none;
84
- `
85
-
86
82
  /**
87
83
  * Tooltips display information when hovering, focusing or tapping.
88
84
  *
89
85
  * @public
90
86
  */
91
87
  export const Tooltip = forwardRef(function Tooltip(
92
- props: TooltipProps & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content'>,
88
+ props: TooltipProps &
89
+ Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'children' | 'content' | 'width' | 'wrap'>,
93
90
  forwardedRef: React.ForwardedRef<HTMLDivElement>,
94
91
  ) {
95
92
  const boundaryElementContext = useBoundaryElement()
@@ -99,6 +96,7 @@ export const Tooltip = forwardRef(function Tooltip(
99
96
  arrow: arrowProp = false,
100
97
  boundaryElement = boundaryElementContext?.element,
101
98
  children: childProp,
99
+ className,
102
100
  content,
103
101
  disabled,
104
102
  fallbackPlacements: fallbackPlacementsProp = props.fallbackPlacements ??
@@ -364,10 +362,11 @@ export const Tooltip = forwardRef(function Tooltip(
364
362
 
365
363
  if (disabled) return child
366
364
 
367
- const tooltip = (
368
- <Root
365
+ const node = (
366
+ <Layer
369
367
  data-ui="Tooltip"
370
368
  {...restProps}
369
+ className={composeClassNames(className, tooltip())}
371
370
  ref={setFloating}
372
371
  style={{
373
372
  ...floatingStyles,
@@ -393,17 +392,17 @@ export const Tooltip = forwardRef(function Tooltip(
393
392
  >
394
393
  {content}
395
394
  </TooltipCard>
396
- </Root>
395
+ </Layer>
397
396
  )
398
397
 
399
398
  const children =
400
399
  showTooltip &&
401
400
  (portalProp ? (
402
401
  <Portal __unstable_name={typeof portalProp === 'string' ? portalProp : undefined}>
403
- {tooltip}
402
+ {node}
404
403
  </Portal>
405
404
  ) : (
406
- tooltip
405
+ node
407
406
  ))
408
407
 
409
408
  return (
@@ -416,6 +415,7 @@ export const Tooltip = forwardRef(function Tooltip(
416
415
  </>
417
416
  )
418
417
  })
418
+
419
419
  Tooltip.displayName = 'ForwardRef(Tooltip)'
420
420
 
421
421
  /**
@@ -1,23 +1,21 @@
1
+ import {RadiusStyleProps, tooltipCard} from '@sanity/ui/css'
1
2
  import {ThemeColorSchemeKey} from '@sanity/ui/theme'
2
- import {MotionProps, motion} from 'framer-motion'
3
+ import {motion} from 'framer-motion'
3
4
  import React, {CSSProperties, forwardRef, memo, useMemo} from 'react'
4
- import {styled} from 'styled-components'
5
- import {POPOVER_MOTION_CONTENT_OPACITY_PROPERTY, POPOVER_MOTION_PROPS} from '../../constants'
6
- import {Placement, Radius} from '../../types'
5
+ import {
6
+ // POPOVER_MOTION_CONTENT_OPACITY_PROPERTY,
7
+ POPOVER_MOTION_PROPS,
8
+ } from '../../constants'
9
+ import {Placement} from '../../types'
7
10
  import {Arrow} from '../../utils'
8
- import {Card, CardProps} from '../card'
11
+ import {Card} from '../card'
9
12
  import {
10
13
  DEFAULT_TOOLTIP_ARROW_HEIGHT,
11
14
  DEFAULT_TOOLTIP_ARROW_RADIUS,
12
15
  DEFAULT_TOOLTIP_ARROW_WIDTH,
13
16
  } from './constants'
14
17
 
15
- const MotionCard = styled(motion(Card))`
16
- & > * {
17
- opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
18
- will-change: opacity;
19
- }
20
- `
18
+ const MotionCard = motion(Card) as typeof Card
21
19
 
22
20
  /**
23
21
  * @internal
@@ -34,10 +32,10 @@ export const TooltipCard = memo(
34
32
  originY?: number
35
33
  padding?: number | number[]
36
34
  placement?: Placement
37
- radius?: Radius | Radius[]
38
35
  scheme?: ThemeColorSchemeKey
39
36
  shadow?: number | number[]
40
- } & Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'width'>,
37
+ } & RadiusStyleProps &
38
+ Omit<React.HTMLProps<HTMLDivElement>, 'as' | 'height' | 'rows' | 'width' | 'wrap'>,
41
39
  ref: React.ForwardedRef<HTMLDivElement>,
42
40
  ) {
43
41
  const {
@@ -81,7 +79,9 @@ export const TooltipCard = memo(
81
79
  return (
82
80
  <MotionCard
83
81
  data-ui="Tooltip__card"
84
- {...(restProps as CardProps & MotionProps)}
82
+ {...restProps}
83
+ data-animate={animate ? '' : undefined}
84
+ className={tooltipCard()}
85
85
  data-placement={placement}
86
86
  padding={padding}
87
87
  radius={radius}
@@ -106,4 +106,5 @@ export const TooltipCard = memo(
106
106
  )
107
107
  }),
108
108
  )
109
+
109
110
  TooltipCard.displayName = 'Memo(ForwardRef(TooltipCard))'
@@ -1,27 +1,37 @@
1
1
  import {
2
- BoxDisplay,
3
- BoxHeight,
4
- BoxOverflow,
5
- BoxSizing,
6
- FlexAlign,
7
- FlexDirection,
8
- FlexJustify,
9
- FlexValue,
10
- FlexWrap,
11
- GridAutoCols,
12
- GridAutoFlow,
13
- GridAutoRows,
14
2
  GridItemColumn,
15
3
  GridItemColumnEnd,
16
4
  GridItemColumnStart,
17
5
  GridItemRow,
18
6
  GridItemRowEnd,
19
7
  GridItemRowStart,
20
- Radius,
8
+ type FlexAlign,
9
+ type FlexDirection,
10
+ type FlexJustify,
11
+ type FlexValue,
12
+ type FlexWrap,
13
+ } from '@sanity/ui/css'
14
+
15
+ import {
16
+ type BoxDisplay,
17
+ type BoxHeight,
18
+ type BoxOverflow,
19
+ type BoxSizing,
20
+ type GridAutoCols,
21
+ type GridAutoFlow,
22
+ type GridAutoRows,
23
+ // type GridItemColumn,
24
+ // type GridItemColumnEnd,
25
+ // type GridItemColumnStart,
26
+ // type GridItemRow,
27
+ // type GridItemRowEnd,
28
+ // type GridItemRowStart,
29
+ type Radius,
21
30
  } from '../types'
22
31
 
23
32
  /**
24
33
  * @public
34
+ * @deprecated
25
35
  */
26
36
  export interface ResponsiveBorderProps {
27
37
  border?: boolean | boolean[]
@@ -33,6 +43,7 @@ export interface ResponsiveBorderProps {
33
43
 
34
44
  /**
35
45
  * @public
46
+ * @deprecated
36
47
  */
37
48
  export interface ResponsiveBoxProps {
38
49
  display?: BoxDisplay | BoxDisplay[]
@@ -43,6 +54,7 @@ export interface ResponsiveBoxProps {
43
54
 
44
55
  /**
45
56
  * @public
57
+ * @deprecated
46
58
  */
47
59
  export interface ResponsiveFlexProps {
48
60
  align?: FlexAlign | FlexAlign[]
@@ -53,6 +65,7 @@ export interface ResponsiveFlexProps {
53
65
 
54
66
  /**
55
67
  * @public
68
+ * @deprecated
56
69
  */
57
70
  export interface ResponsiveFlexItemProps {
58
71
  /** Sets the flex CSS attribute. The property is responsive. */
@@ -61,20 +74,22 @@ export interface ResponsiveFlexItemProps {
61
74
 
62
75
  /**
63
76
  * @public
77
+ * @deprecated
64
78
  */
65
79
  export interface ResponsiveGridProps {
66
80
  autoRows?: GridAutoRows | GridAutoRows[]
67
81
  autoCols?: GridAutoCols | GridAutoCols[]
68
82
  autoFlow?: GridAutoFlow | GridAutoFlow[]
69
83
  columns?: number | number[]
70
- gap?: number | number[]
71
- gapX?: number | number[]
72
- gapY?: number | number[]
84
+ // gap?: number | number[]
85
+ // gapX?: number | number[]
86
+ // gapY?: number | number[]
73
87
  rows?: number | number[]
74
88
  }
75
89
 
76
90
  /**
77
91
  * @public
92
+ * @deprecated
78
93
  */
79
94
  export interface ResponsiveGridItemProps {
80
95
  column?: GridItemColumn | GridItemColumn[]
@@ -87,6 +102,7 @@ export interface ResponsiveGridItemProps {
87
102
 
88
103
  /**
89
104
  * @public
105
+ * @deprecated
90
106
  */
91
107
  export interface ResponsiveMarginProps {
92
108
  /** Applies margins to all sides. The property is responsive. */
@@ -103,6 +119,7 @@ export interface ResponsiveMarginProps {
103
119
 
104
120
  /**
105
121
  * @public
122
+ * @deprecated
106
123
  */
107
124
  export interface ResponsivePaddingProps {
108
125
  padding?: number | number[]
@@ -116,6 +133,7 @@ export interface ResponsivePaddingProps {
116
133
 
117
134
  /**
118
135
  * @public
136
+ * @deprecated
119
137
  */
120
138
  export interface ResponsiveRadiusProps {
121
139
  radius?: Radius | Radius[]
@@ -123,6 +141,7 @@ export interface ResponsiveRadiusProps {
123
141
 
124
142
  /**
125
143
  * @public
144
+ * @deprecated
126
145
  */
127
146
  export interface ResponsiveShadowProps {
128
147
  shadow?: number | number[]
@@ -130,6 +149,7 @@ export interface ResponsiveShadowProps {
130
149
 
131
150
  /**
132
151
  * @public
152
+ * @deprecated
133
153
  */
134
154
  export interface ResponsiveWidthProps {
135
155
  width?: number | 'auto' | (number | 'auto')[]