@sanity/ui 3.0.0-static.29 → 3.0.0-static.30

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 (232) hide show
  1. package/README.md +1 -1
  2. package/dist/_chunks-cjs/_visual-editing.cjs +293 -293
  3. package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
  4. package/dist/_chunks-es/_visual-editing.js +294 -294
  5. package/dist/_chunks-es/_visual-editing.js.map +1 -1
  6. package/dist/css/index.cjs.map +1 -1
  7. package/dist/css/index.css +1 -1
  8. package/dist/css/index.js.map +1 -1
  9. package/dist/index.cjs +47 -37
  10. package/dist/index.cjs.map +1 -1
  11. package/dist/index.d.cts +12 -0
  12. package/dist/index.d.ts +12 -0
  13. package/dist/index.js +48 -38
  14. package/dist/index.js.map +1 -1
  15. package/dist/theme.cjs +6 -6
  16. package/dist/theme.cjs.map +1 -1
  17. package/dist/theme.js +6 -6
  18. package/dist/theme.js.map +1 -1
  19. package/package.json +1 -1
  20. package/src/core/components/autocomplete/autocomplete.tsx +7 -7
  21. package/src/core/components/autocomplete/constants.ts +0 -2
  22. package/src/core/components/autocomplete/types.ts +1 -1
  23. package/src/core/components/breadcrumbs/breadcrumbs.tsx +6 -6
  24. package/src/core/components/dialog/__workshop__/activate.tsx +1 -2
  25. package/src/core/components/dialog/dialog.tsx +6 -5
  26. package/src/core/components/dialog/dialogCard.tsx +8 -8
  27. package/src/core/components/hotkeys/hotkeys.tsx +2 -2
  28. package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +1 -2
  29. package/src/core/components/menu/__workshop__/shouldFocus.tsx +1 -5
  30. package/src/core/components/menu/menu.tsx +3 -3
  31. package/src/core/components/menu/menuButton.tsx +2 -2
  32. package/src/core/components/menu/menuGroup.tsx +5 -5
  33. package/src/core/components/menu/menuItem.tsx +5 -5
  34. package/src/core/components/tab/tab.tsx +1 -1
  35. package/src/core/components/tab/tabList.tsx +1 -1
  36. package/src/core/components/tab/tabPanel.tsx +1 -1
  37. package/src/core/components/toast/toast.tsx +6 -6
  38. package/src/core/components/toast/toastLayer.tsx +2 -2
  39. package/src/core/components/toast/toastProvider.tsx +1 -1
  40. package/src/core/components/tree/tree.tsx +1 -1
  41. package/src/core/components/tree/treeGroup.tsx +1 -1
  42. package/src/core/components/tree/treeItem.tsx +5 -5
  43. package/src/core/components/virtualList/virtualList.tsx +1 -1
  44. package/src/core/index.ts +95 -44
  45. package/src/core/primitives/avatar/__workshop__/withinButton.tsx +1 -9
  46. package/src/core/primitives/avatar/avatar.tsx +2 -2
  47. package/src/core/primitives/avatar/avatarCounter.tsx +2 -2
  48. package/src/core/primitives/avatar/avatarStack.tsx +1 -1
  49. package/src/core/primitives/badge/badge.tsx +2 -2
  50. package/src/core/primitives/button/__workshop__/disabled.tsx +1 -7
  51. package/src/core/primitives/button/button.tsx +3 -4
  52. package/src/core/primitives/card/__workshop__/listNavigation.tsx +1 -3
  53. package/src/core/primitives/card/card.tsx +1 -1
  54. package/src/core/primitives/container/container.tsx +1 -1
  55. package/src/core/primitives/flex/flex.tsx +1 -1
  56. package/src/core/primitives/grid/grid.tsx +1 -1
  57. package/src/core/primitives/inline/inline.tsx +1 -1
  58. package/src/core/primitives/kbd/kbd.tsx +4 -4
  59. package/src/core/primitives/layer/layer.tsx +1 -1
  60. package/src/core/primitives/layer/layerCard.tsx +1 -1
  61. package/src/core/primitives/layer/layerProvider.tsx +1 -1
  62. package/src/core/primitives/popover/popover.tsx +6 -4
  63. package/src/core/primitives/popover/popoverLayer.tsx +3 -3
  64. package/src/core/primitives/root/Root.tsx +11 -16
  65. package/src/core/primitives/root/RootProvider.tsx +40 -0
  66. package/src/core/primitives/select/select.tsx +2 -2
  67. package/src/core/primitives/{_selectable → selectable}/selectable.tsx +1 -1
  68. package/src/core/primitives/spinner/spinner.tsx +1 -1
  69. package/src/core/primitives/stack/stack.tsx +1 -1
  70. package/src/core/primitives/switch/switch.tsx +1 -1
  71. package/src/core/primitives/textInput/textInput.tsx +3 -3
  72. package/src/core/primitives/tooltip/tooltip.test.tsx +2 -2
  73. package/src/core/primitives/tooltip/tooltip.tsx +6 -4
  74. package/src/core/primitives/tooltip/tooltipLayer.tsx +2 -2
  75. package/src/core/utils/errorBoundary.tsx +1 -1
  76. package/src/core/utils/portal/portal.tsx +2 -1
  77. package/src/css/components/dialog/dialog.ts +1 -1
  78. package/src/css/components/skeleton/skeleton.ts +3 -3
  79. package/src/css/components/skeleton/types.ts +3 -3
  80. package/src/css/defaultTheme.css.ts +1 -1
  81. package/src/css/index.ts +126 -69
  82. package/src/css/primitives/_input/input.ts +2 -2
  83. package/src/css/primitives/_input/types.ts +2 -2
  84. package/src/css/primitives/_selectable/selectable.ts +1 -1
  85. package/src/css/primitives/_selectable/types.ts +1 -1
  86. package/src/css/primitives/avatar/avatar.ts +1 -1
  87. package/src/css/primitives/box/box.ts +35 -35
  88. package/src/css/primitives/box/types.ts +34 -34
  89. package/src/css/primitives/button/button.css.ts +8 -8
  90. package/src/css/primitives/button/button.ts +4 -4
  91. package/src/css/primitives/button/types.ts +3 -3
  92. package/src/css/primitives/card/__workshop__/color.tsx +8 -3
  93. package/src/css/primitives/code/code.ts +3 -3
  94. package/src/css/primitives/code/types.ts +2 -2
  95. package/src/css/primitives/container/container.ts +3 -3
  96. package/src/css/primitives/heading/heading.ts +4 -4
  97. package/src/css/primitives/heading/types.ts +3 -3
  98. package/src/css/primitives/kbd/kbd.ts +1 -1
  99. package/src/css/primitives/kbd/types.ts +1 -1
  100. package/src/css/primitives/label/label.ts +4 -4
  101. package/src/css/primitives/label/types.ts +3 -3
  102. package/src/css/primitives/root/root.ts +2 -2
  103. package/src/css/primitives/root/types.ts +1 -1
  104. package/src/css/primitives/select/select.ts +1 -1
  105. package/src/css/primitives/select/types.ts +1 -1
  106. package/src/css/primitives/text/text.ts +5 -5
  107. package/src/css/primitives/text/types.ts +4 -4
  108. package/src/css/primitives/textArea/textArea.ts +1 -1
  109. package/src/css/primitives/textArea/types.ts +1 -1
  110. package/src/css/primitives/textInput/textInput.ts +1 -1
  111. package/src/css/primitives/textInput/types.ts +1 -1
  112. package/src/css/primitives/tooltip/tooltip.css.ts +1 -3
  113. package/src/css/primitives/tooltip/tooltip.ts +0 -2
  114. package/src/theme/v3/defaultTokens.ts +6 -6
  115. package/src/core/_compat/index.ts +0 -4
  116. package/src/core/_compat/styles/index.ts +0 -1
  117. package/src/core/_compat/theme/index.ts +0 -5
  118. package/src/core/components/breadcrumbs/index.ts +0 -1
  119. package/src/core/components/dialog/index.ts +0 -5
  120. package/src/core/components/hotkeys/index.ts +0 -1
  121. package/src/core/components/menu/index.ts +0 -5
  122. package/src/core/components/tab/index.ts +0 -3
  123. package/src/core/components/toast/index.ts +0 -4
  124. package/src/core/components/tree/index.ts +0 -4
  125. package/src/core/components/virtualList/index.ts +0 -1
  126. package/src/core/hooks/useElementRect/index.ts +0 -1
  127. package/src/core/hooks/useMediaIndex/index.ts +0 -1
  128. package/src/core/primitives/_selectable/index.ts +0 -2
  129. package/src/core/primitives/arrow/index.ts +0 -1
  130. package/src/core/primitives/avatar/index.ts +0 -4
  131. package/src/core/primitives/badge/index.ts +0 -1
  132. package/src/core/primitives/badge/types2.ts +0 -10
  133. package/src/core/primitives/box/index.ts +0 -2
  134. package/src/core/primitives/button/index.ts +0 -2
  135. package/src/core/primitives/card/index.ts +0 -4
  136. package/src/core/primitives/checkbox/index.ts +0 -1
  137. package/src/core/primitives/code/index.ts +0 -1
  138. package/src/core/primitives/container/index.ts +0 -2
  139. package/src/core/primitives/flex/index.ts +0 -2
  140. package/src/core/primitives/grid/index.ts +0 -2
  141. package/src/core/primitives/heading/index.ts +0 -1
  142. package/src/core/primitives/inline/index.ts +0 -1
  143. package/src/core/primitives/inline/types.ts +0 -7
  144. package/src/core/primitives/kbd/index.ts +0 -1
  145. package/src/core/primitives/label/index.ts +0 -1
  146. package/src/core/primitives/layer/index.ts +0 -4
  147. package/src/core/primitives/popover/index.ts +0 -2
  148. package/src/core/primitives/radio/index.ts +0 -1
  149. package/src/core/primitives/root/index.ts +0 -1
  150. package/src/core/primitives/select/index.ts +0 -1
  151. package/src/core/primitives/skeleton/index.ts +0 -5
  152. package/src/core/primitives/spinner/index.ts +0 -1
  153. package/src/core/primitives/srOnly/index.ts +0 -1
  154. package/src/core/primitives/stack/index.ts +0 -1
  155. package/src/core/primitives/switch/index.ts +0 -1
  156. package/src/core/primitives/text/index.ts +0 -1
  157. package/src/core/primitives/textArea/index.ts +0 -1
  158. package/src/core/primitives/textInput/index.ts +0 -1
  159. package/src/core/primitives/tooltip/index.ts +0 -2
  160. package/src/core/utils/boundaryElement/index.ts +0 -3
  161. package/src/core/utils/elementQuery/index.ts +0 -1
  162. package/src/core/utils/portal/index.ts +0 -4
  163. package/src/css/components/breadcrumbs/index.ts +0 -1
  164. package/src/css/components/dialog/index.ts +0 -1
  165. package/src/css/components/menu/index.ts +0 -1
  166. package/src/css/components/skeleton/index.ts +0 -2
  167. package/src/css/components/toast/index.ts +0 -1
  168. package/src/css/components/tree/index.ts +0 -1
  169. package/src/css/primitives/_arrow/index.ts +0 -1
  170. package/src/css/primitives/_input/index.ts +0 -2
  171. package/src/css/primitives/_selectable/index.ts +0 -2
  172. package/src/css/primitives/avatar/index.ts +0 -2
  173. package/src/css/primitives/badge/index.ts +0 -2
  174. package/src/css/primitives/box/index.ts +0 -2
  175. package/src/css/primitives/button/index.ts +0 -2
  176. package/src/css/primitives/card/index.ts +0 -2
  177. package/src/css/primitives/checkbox/index.ts +0 -1
  178. package/src/css/primitives/code/index.ts +0 -2
  179. package/src/css/primitives/container/index.ts +0 -2
  180. package/src/css/primitives/heading/index.ts +0 -2
  181. package/src/css/primitives/kbd/index.ts +0 -2
  182. package/src/css/primitives/label/index.ts +0 -2
  183. package/src/css/primitives/popover/index.ts +0 -1
  184. package/src/css/primitives/radio/index.ts +0 -1
  185. package/src/css/primitives/root/index.ts +0 -2
  186. package/src/css/primitives/select/index.ts +0 -2
  187. package/src/css/primitives/spinner/index.ts +0 -2
  188. package/src/css/primitives/srOnly/index.ts +0 -1
  189. package/src/css/primitives/stack/index.ts +0 -1
  190. package/src/css/primitives/switch/index.ts +0 -1
  191. package/src/css/primitives/text/index.ts +0 -2
  192. package/src/css/primitives/textArea/index.ts +0 -2
  193. package/src/css/primitives/textInput/index.ts +0 -2
  194. package/src/css/primitives/tooltip/index.ts +0 -2
  195. package/src/css/props/alignItems/index.ts +0 -2
  196. package/src/css/props/border/index.ts +0 -2
  197. package/src/css/props/boxSizing/index.ts +0 -2
  198. package/src/css/props/display/index.ts +0 -2
  199. package/src/css/props/flex/index.ts +0 -2
  200. package/src/css/props/flexDirection/index.ts +0 -2
  201. package/src/css/props/flexWrap/index.ts +0 -2
  202. package/src/css/props/font/index.ts +0 -2
  203. package/src/css/props/gap/index.ts +0 -2
  204. package/src/css/props/gridAutoColumns/index.ts +0 -2
  205. package/src/css/props/gridAutoFlow/index.ts +0 -2
  206. package/src/css/props/gridAutoRows/index.ts +0 -2
  207. package/src/css/props/gridColumn/index.ts +0 -2
  208. package/src/css/props/gridColumnEnd/index.ts +0 -2
  209. package/src/css/props/gridColumnStart/index.ts +0 -2
  210. package/src/css/props/gridRow/index.ts +0 -2
  211. package/src/css/props/gridRowEnd/index.ts +0 -2
  212. package/src/css/props/gridRowStart/index.ts +0 -2
  213. package/src/css/props/gridTemplateColumns/index.ts +0 -2
  214. package/src/css/props/gridTemplateRows/index.ts +0 -2
  215. package/src/css/props/height/index.ts +0 -2
  216. package/src/css/props/inset/index.ts +0 -2
  217. package/src/css/props/justifyContent/index.ts +0 -2
  218. package/src/css/props/margin/index.ts +0 -2
  219. package/src/css/props/maxWidth/index.ts +0 -2
  220. package/src/css/props/minHeight/index.ts +0 -2
  221. package/src/css/props/minWidth/index.ts +0 -2
  222. package/src/css/props/outline/index.ts +0 -2
  223. package/src/css/props/overflow/index.ts +0 -2
  224. package/src/css/props/padding/index.ts +0 -2
  225. package/src/css/props/pointerEvents/index.ts +0 -2
  226. package/src/css/props/position/index.ts +0 -2
  227. package/src/css/props/radius/index.ts +0 -2
  228. package/src/css/props/shadow/index.ts +0 -2
  229. package/src/css/props/textAlign/index.ts +0 -2
  230. package/src/css/props/textOverflow/index.ts +0 -2
  231. package/src/css/props/width/index.ts +0 -2
  232. /package/src/core/primitives/{_selectable → selectable}/types.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import type {FontTextSize, Space} from '@sanity/ui/theme'
2
2
 
3
- import type {RadiusStyleProps} from '../../props/radius'
4
- import type {WidthStyleProps} from '../../props/width'
3
+ import type {RadiusStyleProps} from '../../props/radius/types'
4
+ import type {WidthStyleProps} from '../../props/width/types'
5
5
  import type {ResponsiveProp} from '../../types'
6
6
 
7
7
  /** @public */
@@ -1,5 +1,5 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {radius} from '../../props/radius'
2
+ import {radius} from '../../props/radius/radius'
3
3
  import {root, tones} from './_selectable.css'
4
4
  import type {SelectableStyleProps} from './types'
5
5
 
@@ -1,6 +1,6 @@
1
1
  import type {ThemeColorStateToneKey} from '@sanity/ui/theme'
2
2
 
3
- import type {RadiusStyleProps} from '../../props/radius'
3
+ import type {RadiusStyleProps} from '../../props/radius/types'
4
4
 
5
5
  /** @internal */
6
6
  export interface SelectableStyleProps extends RadiusStyleProps {
@@ -1,6 +1,6 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
2
  import {_responsiveClassName} from '../../_responsiveClassName'
3
- import {flex} from '../../props/flex'
3
+ import {flex} from '../../props/flex/flex'
4
4
  import {
5
5
  arrow,
6
6
  arrowSvg,
@@ -1,39 +1,39 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {alignItems} from '../../props/alignItems'
3
- import {border} from '../../props/border'
4
- import {boxSizing} from '../../props/boxSizing'
5
- import {display} from '../../props/display'
6
- import {flex} from '../../props/flex'
7
- import {flexDirection} from '../../props/flexDirection'
8
- import {flexWrap} from '../../props/flexWrap'
9
- import {gap} from '../../props/gap'
10
- import {gridAutoColumns} from '../../props/gridAutoColumns'
11
- import {gridAutoFlow} from '../../props/gridAutoFlow'
12
- import {gridAutoRows} from '../../props/gridAutoRows'
13
- import {gridColumn} from '../../props/gridColumn'
14
- import {gridColumnEnd} from '../../props/gridColumnEnd'
15
- import {gridColumnStart} from '../../props/gridColumnStart'
16
- import {gridRow} from '../../props/gridRow'
17
- import {gridRowEnd} from '../../props/gridRowEnd'
18
- import {gridRowStart} from '../../props/gridRowStart'
19
- import {gridTemplateColumns} from '../../props/gridTemplateColumns'
20
- import {gridTemplateRows} from '../../props/gridTemplateRows'
21
- import {height} from '../../props/height'
22
- import {inset} from '../../props/inset'
23
- import {justifyContent} from '../../props/justifyContent'
24
- import {margin} from '../../props/margin'
25
- import {maxWidth} from '../../props/maxWidth'
26
- import {minHeight} from '../../props/minHeight'
27
- import {minWidth} from '../../props/minWidth'
28
- import {outline} from '../../props/outline'
29
- import {overflow} from '../../props/overflow'
30
- import {padding} from '../../props/padding'
31
- import {pointerEvents} from '../../props/pointerEvents'
32
- import {position} from '../../props/position'
33
- import {radius} from '../../props/radius'
34
- import {shadow} from '../../props/shadow'
35
- import {textAlign} from '../../props/textAlign'
36
- import {width} from '../../props/width'
2
+ import {alignItems} from '../../props/alignItems/alignItems'
3
+ import {border} from '../../props/border/border'
4
+ import {boxSizing} from '../../props/boxSizing/boxSizing'
5
+ import {display} from '../../props/display/display'
6
+ import {flex} from '../../props/flex/flex'
7
+ import {flexDirection} from '../../props/flexDirection/flexDirection'
8
+ import {flexWrap} from '../../props/flexWrap/flexWrap'
9
+ import {gap} from '../../props/gap/gap'
10
+ import {gridAutoColumns} from '../../props/gridAutoColumns/gridAutoColumns'
11
+ import {gridAutoFlow} from '../../props/gridAutoFlow/gridAutoFlow'
12
+ import {gridAutoRows} from '../../props/gridAutoRows/gridAutoRows'
13
+ import {gridColumn} from '../../props/gridColumn/gridColumn'
14
+ import {gridColumnEnd} from '../../props/gridColumnEnd/gridColumnEnd'
15
+ import {gridColumnStart} from '../../props/gridColumnStart/gridColumnStart'
16
+ import {gridRow} from '../../props/gridRow/gridRow'
17
+ import {gridRowEnd} from '../../props/gridRowEnd/gridRowEnd'
18
+ import {gridRowStart} from '../../props/gridRowStart/gridRowStart'
19
+ import {gridTemplateColumns} from '../../props/gridTemplateColumns/gridTemplateColumns'
20
+ import {gridTemplateRows} from '../../props/gridTemplateRows/gridTemplateRows'
21
+ import {height} from '../../props/height/height'
22
+ import {inset} from '../../props/inset/inset'
23
+ import {justifyContent} from '../../props/justifyContent/justifyContent'
24
+ import {margin} from '../../props/margin/margin'
25
+ import {maxWidth} from '../../props/maxWidth/maxWidth'
26
+ import {minHeight} from '../../props/minHeight/minHeight'
27
+ import {minWidth} from '../../props/minWidth/minWidth'
28
+ import {outline} from '../../props/outline/outline'
29
+ import {overflow} from '../../props/overflow/overflow'
30
+ import {padding} from '../../props/padding/padding'
31
+ import {pointerEvents} from '../../props/pointerEvents/pointerEvents'
32
+ import {position} from '../../props/position/position'
33
+ import {radius} from '../../props/radius/radius'
34
+ import {shadow} from '../../props/shadow/shadow'
35
+ import {textAlign} from '../../props/textAlign/textAlign'
36
+ import {width} from '../../props/width/width'
37
37
  import {muted, root} from './box.css'
38
38
  import type {BoxStyleProps} from './types'
39
39
 
@@ -1,37 +1,37 @@
1
- import type {AlignItemsStyleProps} from '../../props/alignItems'
2
- import type {BorderStyleProps} from '../../props/border'
3
- import type {BoxSizingStyleProps} from '../../props/boxSizing'
4
- import type {DisplayStyleProps} from '../../props/display'
5
- import type {FlexStyleProps} from '../../props/flex'
6
- import type {FlexDirectionStyleProps} from '../../props/flexDirection'
7
- import type {FlexWrapStyleProps} from '../../props/flexWrap'
8
- import type {GapStyleProps} from '../../props/gap'
9
- import type {GridAutoColumnsStyleProps} from '../../props/gridAutoColumns'
10
- import type {GridAutoFlowStyleProps} from '../../props/gridAutoFlow'
11
- import type {GridAutoRowsStyleProps} from '../../props/gridAutoRows'
12
- import type {GridColumnStyleProps} from '../../props/gridColumn'
13
- import type {GridColumnEndStyleProps} from '../../props/gridColumnEnd'
14
- import type {GridColumnStartStyleProps} from '../../props/gridColumnStart'
15
- import type {GridRowStyleProps} from '../../props/gridRow'
16
- import type {GridRowEndStyleProps} from '../../props/gridRowEnd'
17
- import type {GridRowStartStyleProps} from '../../props/gridRowStart'
18
- import type {GridTemplateColumnsStyleProps} from '../../props/gridTemplateColumns'
19
- import type {GridTemplateRowsStyleProps} from '../../props/gridTemplateRows'
20
- import type {HeightStyleProps} from '../../props/height'
21
- import type {InsetStyleProps} from '../../props/inset'
22
- import type {JustifyContentStyleProps} from '../../props/justifyContent'
23
- import type {MarginStyleProps} from '../../props/margin'
24
- import type {MaxWidthStyleProps} from '../../props/maxWidth'
25
- import type {MinHeightStyleProps} from '../../props/minHeight'
26
- import type {MinWidthStyleProps} from '../../props/minWidth'
27
- import type {OverflowStyleProps} from '../../props/overflow'
28
- import type {PaddingStyleProps} from '../../props/padding'
29
- import type {PointerEventsStyleProps} from '../../props/pointerEvents'
30
- import type {PositionStyleProps} from '../../props/position'
31
- import type {RadiusStyleProps} from '../../props/radius'
32
- import type {ShadowStyleProps} from '../../props/shadow'
33
- import type {TextAlignStyleProps} from '../../props/textAlign'
34
- import type {WidthStyleProps} from '../../props/width'
1
+ import type {AlignItemsStyleProps} from '../../props/alignItems/types'
2
+ import type {BorderStyleProps} from '../../props/border/types'
3
+ import type {BoxSizingStyleProps} from '../../props/boxSizing/types'
4
+ import type {DisplayStyleProps} from '../../props/display/types'
5
+ import type {FlexStyleProps} from '../../props/flex/types'
6
+ import type {FlexDirectionStyleProps} from '../../props/flexDirection/types'
7
+ import type {FlexWrapStyleProps} from '../../props/flexWrap/types'
8
+ import type {GapStyleProps} from '../../props/gap/types'
9
+ import type {GridAutoColumnsStyleProps} from '../../props/gridAutoColumns/types'
10
+ import type {GridAutoFlowStyleProps} from '../../props/gridAutoFlow/types'
11
+ import type {GridAutoRowsStyleProps} from '../../props/gridAutoRows/types'
12
+ import type {GridColumnStyleProps} from '../../props/gridColumn/types'
13
+ import type {GridColumnEndStyleProps} from '../../props/gridColumnEnd/types'
14
+ import type {GridColumnStartStyleProps} from '../../props/gridColumnStart/types'
15
+ import type {GridRowStyleProps} from '../../props/gridRow/types'
16
+ import type {GridRowEndStyleProps} from '../../props/gridRowEnd/types'
17
+ import type {GridRowStartStyleProps} from '../../props/gridRowStart/types'
18
+ import type {GridTemplateColumnsStyleProps} from '../../props/gridTemplateColumns/types'
19
+ import type {GridTemplateRowsStyleProps} from '../../props/gridTemplateRows/types'
20
+ import type {HeightStyleProps} from '../../props/height/types'
21
+ import type {InsetStyleProps} from '../../props/inset/types'
22
+ import type {JustifyContentStyleProps} from '../../props/justifyContent/types'
23
+ import type {MarginStyleProps} from '../../props/margin/types'
24
+ import type {MaxWidthStyleProps} from '../../props/maxWidth/types'
25
+ import type {MinHeightStyleProps} from '../../props/minHeight/types'
26
+ import type {MinWidthStyleProps} from '../../props/minWidth/types'
27
+ import type {OverflowStyleProps} from '../../props/overflow/types'
28
+ import type {PaddingStyleProps} from '../../props/padding/types'
29
+ import type {PointerEventsStyleProps} from '../../props/pointerEvents/types'
30
+ import type {PositionStyleProps} from '../../props/position/types'
31
+ import type {RadiusStyleProps} from '../../props/radius/types'
32
+ import type {ShadowStyleProps} from '../../props/shadow/types'
33
+ import type {TextAlignStyleProps} from '../../props/textAlign/types'
34
+ import type {WidthStyleProps} from '../../props/width/types'
35
35
 
36
36
  /** @public */
37
37
  export interface BoxStyleProps
@@ -149,8 +149,8 @@ export const tones = {
149
149
 
150
150
  [`&.${modes.ghost}`]: {
151
151
  vars: {
152
- [vars.color.bg]: tinted.bg[1],
153
- [vars.color.border]: tinted.border[1],
152
+ [vars.color.bg]: `color-mix(in srgb, transparent, ${tinted.bg[1]} 50%)`,
153
+ [vars.color.border]: tinted.border[0],
154
154
  [vars.color.fg]: tinted.fg[2],
155
155
  [vars.color.code.bg]: tinted.bg[2],
156
156
  [vars.color.code.fg]: tinted.fg[4],
@@ -163,8 +163,8 @@ export const tones = {
163
163
 
164
164
  [`&.${modes.ghost}:not([data-disabled]):hover`]: {
165
165
  vars: {
166
- [vars.color.bg]: tinted.bg[2],
167
- [vars.color.border]: tinted.border[2],
166
+ [vars.color.bg]: tinted.bg[1],
167
+ [vars.color.border]: tinted.border[1],
168
168
  [vars.color.code.bg]: tinted.bg[3],
169
169
  [vars.color.code.fg]: tinted.fg[3],
170
170
  [vars.color.fg]: tinted.fg[1],
@@ -175,8 +175,8 @@ export const tones = {
175
175
 
176
176
  [`&.${modes.ghost}:not([data-disabled]):active`]: {
177
177
  vars: {
178
- [vars.color.bg]: tinted.bg[3],
179
- [vars.color.border]: tinted.border[3],
178
+ [vars.color.bg]: tinted.bg[2],
179
+ [vars.color.border]: tinted.border[2],
180
180
  [vars.color.code.bg]: tinted.bg[4],
181
181
  [vars.color.code.fg]: tinted.fg[3],
182
182
  [vars.color.fg]: tinted.fg[1],
@@ -189,8 +189,8 @@ export const tones = {
189
189
 
190
190
  [`&.${modes.ghost}:not([data-disabled])[data-selected]`]: {
191
191
  vars: {
192
- [vars.color.bg]: tinted.bg[3],
193
- [vars.color.border]: tinted.border[3],
192
+ [vars.color.bg]: tinted.bg[2],
193
+ [vars.color.border]: tinted.border[2],
194
194
  [vars.color.code.bg]: tinted.bg[4],
195
195
  [vars.color.code.fg]: tinted.fg[3],
196
196
  [vars.color.fg]: tinted.fg[1],
@@ -1,8 +1,8 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {display} from '../../props/display'
3
- import {flex} from '../../props/flex'
4
- import {radius} from '../../props/radius'
5
- import {width} from '../../props/width'
2
+ import {display} from '../../props/display/display'
3
+ import {flex} from '../../props/flex/flex'
4
+ import {radius} from '../../props/radius/radius'
5
+ import {width} from '../../props/width/width'
6
6
  import {loadingBox, modes, root, tones} from './button.css'
7
7
  import type {ButtonStyleProps} from './types'
8
8
 
@@ -1,8 +1,8 @@
1
1
  import type {ThemeColorButtonModeKey, ThemeColorStateToneKey} from '@sanity/ui/theme'
2
2
 
3
- import type {FlexStyleProps} from '../../props/flex'
4
- import type {RadiusStyleProps} from '../../props/radius'
5
- import type {WidthStyleProps} from '../../props/width'
3
+ import type {FlexStyleProps} from '../../props/flex/types'
4
+ import type {RadiusStyleProps} from '../../props/radius/types'
5
+ import type {WidthStyleProps} from '../../props/width/types'
6
6
 
7
7
  /** @public */
8
8
  export interface ButtonStyleProps extends FlexStyleProps, RadiusStyleProps, WidthStyleProps {
@@ -10,15 +10,20 @@ import {
10
10
  type ThemeColorSchemeKey,
11
11
  type ThemeColorVariantKey,
12
12
  } from '@sanity/ui/theme'
13
+ import {useSelect} from '@sanity/ui-workshop'
13
14
  import {useState} from 'react'
14
15
 
16
+ import {WORKSHOP_CARD_TONE_OPTIONS} from '../../../../../workshop'
17
+
15
18
  interface ColorRecordNode extends Record<string, ColorNode> {}
16
19
 
17
20
  type ColorNode = string | ColorRecordNode
18
21
 
19
22
  export default function ColorStory() {
23
+ const tone = useSelect('Tone', WORKSHOP_CARD_TONE_OPTIONS, 'default')
24
+
20
25
  return (
21
- <Box display="flex" flexDirection="column" gap={4} padding={4}>
26
+ <Card display="flex" flexDirection="column" gap={4} padding={4} tone={tone}>
22
27
  {Object.entries(vars.color).map(([key, value]) => {
23
28
  if (key === 'palette') {
24
29
  return null
@@ -38,7 +43,7 @@ export default function ColorStory() {
38
43
 
39
44
  return <ColorBox key={key} node={{key, value}} />
40
45
  })}
41
- </Box>
46
+ </Card>
42
47
  )
43
48
  }
44
49
 
@@ -56,7 +61,7 @@ function ColorBox({node}: {node: {key: string; value: ColorNode}}) {
56
61
 
57
62
  return (
58
63
  <Box overflow="hidden" radius={3} shadow={1}>
59
- <Card as="button" onClick={() => setOpen(!open)} padding={3}>
64
+ <Card as="button" onClick={() => setOpen(!open)} padding={3} tone="inherit">
60
65
  <Code size={1}>{`${key} +`}</Code>
61
66
  </Card>
62
67
 
@@ -1,8 +1,8 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
2
  import {_responsiveClassName} from '../../_responsiveClassName'
3
- import {display} from '../../props/display'
4
- import {flex} from '../../props/flex'
5
- import {font} from '../../props/font'
3
+ import {display} from '../../props/display/display'
4
+ import {flex} from '../../props/flex/flex'
5
+ import {font} from '../../props/font/font'
6
6
  import {root, scale} from './code.css'
7
7
  import type {CodeStyleProps} from './types'
8
8
 
@@ -1,5 +1,5 @@
1
- import type {FlexStyleProps} from '../../props/flex'
2
- import type {FontStyleProps} from '../../props/font'
1
+ import type {FlexStyleProps} from '../../props/flex/types'
2
+ import type {FontStyleProps} from '../../props/font/types'
3
3
  import type {ResponsiveProp} from '../../types'
4
4
 
5
5
  /** @public */
@@ -1,7 +1,7 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {margin} from '../../props/margin'
3
- import {maxWidth} from '../../props/maxWidth'
4
- import {width} from '../../props/width'
2
+ import {margin} from '../../props/margin/margin'
3
+ import {maxWidth} from '../../props/maxWidth/maxWidth'
4
+ import {width} from '../../props/width/width'
5
5
  import {root} from './container.css'
6
6
  import type {ContainerStyleProps} from './types'
7
7
 
@@ -1,9 +1,9 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
2
  import {_responsiveClassName} from '../../_responsiveClassName'
3
- import {display} from '../../props/display'
4
- import {flex} from '../../props/flex'
5
- import {font} from '../../props/font'
6
- import {textAlign} from '../../props/textAlign'
3
+ import {display} from '../../props/display/display'
4
+ import {flex} from '../../props/flex/flex'
5
+ import {font} from '../../props/font/font'
6
+ import {textAlign} from '../../props/textAlign/textAlign'
7
7
  import {muted, root, sizes} from './heading.css'
8
8
  import type {HeadingStyleProps} from './types'
9
9
 
@@ -1,6 +1,6 @@
1
- import type {FlexStyleProps} from '../../props/flex'
2
- import type {FontStyleProps} from '../../props/font'
3
- import type {TextAlignStyleProps} from '../../props/textAlign'
1
+ import type {FlexStyleProps} from '../../props/flex/types'
2
+ import type {FontStyleProps} from '../../props/font/types'
3
+ import type {TextAlignStyleProps} from '../../props/textAlign/types'
4
4
  import type {ResponsiveProp} from '../../types'
5
5
 
6
6
  /** @public */
@@ -1,5 +1,5 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {radius} from '../../props/radius'
2
+ import {radius} from '../../props/radius/radius'
3
3
  import {root} from './kbd.css'
4
4
  import type {KBDStyleProps} from './types'
5
5
 
@@ -1,4 +1,4 @@
1
- import type {RadiusStyleProps} from '../../props/radius'
1
+ import type {RadiusStyleProps} from '../../props/radius/types'
2
2
 
3
3
  /** @public */
4
4
  export interface KBDStyleProps extends RadiusStyleProps {
@@ -1,9 +1,9 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
2
  import {_responsiveClassName} from '../../_responsiveClassName'
3
- import {display} from '../../props/display'
4
- import {flex} from '../../props/flex'
5
- import {font} from '../../props/font'
6
- import {textAlign} from '../../props/textAlign'
3
+ import {display} from '../../props/display/display'
4
+ import {flex} from '../../props/flex/flex'
5
+ import {font} from '../../props/font/font'
6
+ import {textAlign} from '../../props/textAlign/textAlign'
7
7
  import {muted, root, sizes} from './label.css'
8
8
  import type {LabelStyleProps} from './types'
9
9
 
@@ -1,8 +1,8 @@
1
1
  import type {FontLabelSize} from '@sanity/ui/theme'
2
2
 
3
- import type {FlexStyleProps} from '../../props/flex'
4
- import type {FontStyleProps} from '../../props/font'
5
- import type {TextAlignStyleProps} from '../../props/textAlign'
3
+ import type {FlexStyleProps} from '../../props/flex/types'
4
+ import type {FontStyleProps} from '../../props/font/types'
5
+ import type {TextAlignStyleProps} from '../../props/textAlign/types'
6
6
  import type {ResponsiveProp} from '../../types'
7
7
 
8
8
  /**
@@ -1,7 +1,7 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
2
  import {themeClassName} from '../../defaultTheme.css'
3
- import {height} from '../../props/height'
4
- import {card} from '../card'
3
+ import {height} from '../../props/height/height'
4
+ import {card} from '../card/card'
5
5
  import {_root} from './root.css'
6
6
  import type {RootStyleProps} from './types'
7
7
 
@@ -1,6 +1,6 @@
1
1
  import type {ThemeColorCardToneKey, ThemeColorSchemeKey} from '@sanity/ui/theme'
2
2
 
3
- import type {HeightStyleProps} from '../../props/height'
3
+ import type {HeightStyleProps} from '../../props/height/types'
4
4
 
5
5
  /** @public */
6
6
  export interface RootStyleProps extends HeightStyleProps {
@@ -1,5 +1,5 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {_input, _inputPresentation} from '../_input'
2
+ import {_input, _inputPresentation} from '../_input/input'
3
3
  import {presentation, root} from './select.css'
4
4
  import type {SelectStyleProps} from './types'
5
5
 
@@ -1,4 +1,4 @@
1
- import type {InputStyleProps} from '../_input'
1
+ import type {InputStyleProps} from '../_input/types'
2
2
 
3
3
  /** @public */
4
4
  // eslint-disable-next-line @typescript-eslint/no-empty-object-type
@@ -1,10 +1,10 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
2
  import {_responsiveClassName} from '../../_responsiveClassName'
3
- import {display} from '../../props/display'
4
- import {flex} from '../../props/flex'
5
- import {font} from '../../props/font'
6
- import {maxWidth} from '../../props/maxWidth'
7
- import {textAlign} from '../../props/textAlign'
3
+ import {display} from '../../props/display/display'
4
+ import {flex} from '../../props/flex/flex'
5
+ import {font} from '../../props/font/font'
6
+ import {maxWidth} from '../../props/maxWidth/maxWidth'
7
+ import {textAlign} from '../../props/textAlign/textAlign'
8
8
  import {muted, root, sizes} from './text.css'
9
9
  import type {TextStyleProps} from './types'
10
10
 
@@ -1,7 +1,7 @@
1
- import type {FlexStyleProps} from '../../props/flex'
2
- import type {FontStyleProps} from '../../props/font'
3
- import type {MaxWidthStyleProps} from '../../props/maxWidth'
4
- import type {TextAlignStyleProps} from '../../props/textAlign'
1
+ import type {FlexStyleProps} from '../../props/flex/types'
2
+ import type {FontStyleProps} from '../../props/font/types'
3
+ import type {MaxWidthStyleProps} from '../../props/maxWidth/types'
4
+ import type {TextAlignStyleProps} from '../../props/textAlign/types'
5
5
  import type {ResponsiveProp} from '../../types'
6
6
 
7
7
  /** @public */
@@ -1,5 +1,5 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {_input} from '../_input'
2
+ import {_input} from '../_input/input'
3
3
  import {root} from './textArea.css'
4
4
  import type {TextAreaStyleProps} from './types'
5
5
 
@@ -1,4 +1,4 @@
1
- import type {InputStyleProps} from '../_input'
1
+ import type {InputStyleProps} from '../_input/types'
2
2
 
3
3
  /** @public */
4
4
 
@@ -1,5 +1,5 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- import {_input} from '../_input'
2
+ import {_input} from '../_input/input'
3
3
  import {element, prefix, root, suffix} from './textInput.css'
4
4
  import type {TextInputStyleProps} from './types'
5
5
 
@@ -1,4 +1,4 @@
1
- import type {InputStyleProps} from '../_input'
1
+ import type {InputStyleProps} from '../_input/types'
2
2
 
3
3
  /** @public */
4
4
 
@@ -1,6 +1,4 @@
1
1
  import {_style} from '../../_style.css'
2
2
  import {layers} from '../../layers.css'
3
3
 
4
- export const root = _style(layers.primitives, {
5
- // pointerEvents: 'none',
6
- })
4
+ export const root = _style(layers.primitives, {})
@@ -1,10 +1,8 @@
1
1
  import {_composeClassNames} from '../../_composeClassNames'
2
- // import {_scopeClassNames} from '../../_scopeClassNames'
3
2
  import {root} from './tooltip.css'
4
3
  import type {TooltipStyleProps} from './types'
5
4
 
6
5
  /** @public */
7
6
  export function tooltip(props: TooltipStyleProps): string | undefined {
8
- // return _scopeClassNames('tooltip')
9
7
  return _composeClassNames(props.className, root)
10
8
  }
@@ -146,11 +146,11 @@ export const defaultTokens: PartialTokens<Tokens> = {
146
146
  '*': {
147
147
  bg: {
148
148
  0: ['gray-50', 'black'],
149
- 4: ['200', '800'],
149
+ 4: ['300 75%', '700 75%'],
150
150
  },
151
151
  border: {
152
- 0: ['200 50%', '800 50%'],
153
- 4: ['300', '600'],
152
+ 0: ['200', '800 75%'],
153
+ 4: ['400', '700'],
154
154
  },
155
155
  fg: {
156
156
  0: ['black', '100'],
@@ -166,11 +166,11 @@ export const defaultTokens: PartialTokens<Tokens> = {
166
166
  '*': {
167
167
  bg: {
168
168
  0: ['white', '950'],
169
- 4: ['300 50%', '700'],
169
+ 4: ['300 75%', '700'],
170
170
  },
171
171
  border: {
172
- 0: ['200 50%', '800 50%'],
173
- 4: ['300 75%', '600'],
172
+ 0: ['200', '800 75%'],
173
+ 4: ['400', '700'],
174
174
  },
175
175
  fg: {
176
176
  0: ['black', 'white'],
@@ -1,4 +0,0 @@
1
- export * from './helpers'
2
- export * from './styles'
3
- export * from './theme'
4
- export * from './types'
@@ -1 +0,0 @@
1
- export * from './_responsive'
@@ -1,5 +0,0 @@
1
- export * from './themeColorProvider'
2
- export * from './themeProvider'
3
- export * from './types'
4
- export * from './useRootTheme'
5
- export * from './useTheme'
@@ -1 +0,0 @@
1
- export * from './breadcrumbs'
@@ -1,5 +0,0 @@
1
- export * from './dialog'
2
- export * from './dialogContext'
3
- export * from './dialogProvider'
4
- export * from './types'
5
- export * from './useDialog'
@@ -1 +0,0 @@
1
- export * from './hotkeys'
@@ -1,5 +0,0 @@
1
- export * from './menu'
2
- export * from './menuButton'
3
- export * from './menuDivider'
4
- export * from './menuGroup'
5
- export * from './menuItem'
@@ -1,3 +0,0 @@
1
- export * from './tab'
2
- export * from './tabList'
3
- export * from './tabPanel'
@@ -1,4 +0,0 @@
1
- export * from './toast'
2
- export * from './toastProvider'
3
- export * from './types'
4
- export * from './useToast'
@@ -1,4 +0,0 @@
1
- export * from './tree'
2
- export * from './treeItem'
3
- export * from './types'
4
- export * from './useTree'
@@ -1 +0,0 @@
1
- export * from './virtualList'
@@ -1 +0,0 @@
1
- export * from './useElementRect'