@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.
- package/README.md +1 -1
- package/dist/_chunks-cjs/_visual-editing.cjs +293 -293
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +294 -294
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/css/index.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/index.js.map +1 -1
- package/dist/index.cjs +47 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +48 -38
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +6 -6
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.js +6 -6
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +7 -7
- package/src/core/components/autocomplete/constants.ts +0 -2
- package/src/core/components/autocomplete/types.ts +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +6 -6
- package/src/core/components/dialog/__workshop__/activate.tsx +1 -2
- package/src/core/components/dialog/dialog.tsx +6 -5
- package/src/core/components/dialog/dialogCard.tsx +8 -8
- package/src/core/components/hotkeys/hotkeys.tsx +2 -2
- package/src/core/components/menu/__workshop__/constrainedInBoundary.tsx +1 -2
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +1 -5
- package/src/core/components/menu/menu.tsx +3 -3
- package/src/core/components/menu/menuButton.tsx +2 -2
- package/src/core/components/menu/menuGroup.tsx +5 -5
- package/src/core/components/menu/menuItem.tsx +5 -5
- package/src/core/components/tab/tab.tsx +1 -1
- package/src/core/components/tab/tabList.tsx +1 -1
- package/src/core/components/tab/tabPanel.tsx +1 -1
- package/src/core/components/toast/toast.tsx +6 -6
- package/src/core/components/toast/toastLayer.tsx +2 -2
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/tree/tree.tsx +1 -1
- package/src/core/components/tree/treeGroup.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +5 -5
- package/src/core/components/virtualList/virtualList.tsx +1 -1
- package/src/core/index.ts +95 -44
- package/src/core/primitives/avatar/__workshop__/withinButton.tsx +1 -9
- package/src/core/primitives/avatar/avatar.tsx +2 -2
- package/src/core/primitives/avatar/avatarCounter.tsx +2 -2
- package/src/core/primitives/avatar/avatarStack.tsx +1 -1
- package/src/core/primitives/badge/badge.tsx +2 -2
- package/src/core/primitives/button/__workshop__/disabled.tsx +1 -7
- package/src/core/primitives/button/button.tsx +3 -4
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +1 -3
- package/src/core/primitives/card/card.tsx +1 -1
- package/src/core/primitives/container/container.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +1 -1
- package/src/core/primitives/grid/grid.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +1 -1
- package/src/core/primitives/kbd/kbd.tsx +4 -4
- package/src/core/primitives/layer/layer.tsx +1 -1
- package/src/core/primitives/layer/layerCard.tsx +1 -1
- package/src/core/primitives/layer/layerProvider.tsx +1 -1
- package/src/core/primitives/popover/popover.tsx +6 -4
- package/src/core/primitives/popover/popoverLayer.tsx +3 -3
- package/src/core/primitives/root/Root.tsx +11 -16
- package/src/core/primitives/root/RootProvider.tsx +40 -0
- package/src/core/primitives/select/select.tsx +2 -2
- package/src/core/primitives/{_selectable → selectable}/selectable.tsx +1 -1
- package/src/core/primitives/spinner/spinner.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +1 -1
- package/src/core/primitives/switch/switch.tsx +1 -1
- package/src/core/primitives/textInput/textInput.tsx +3 -3
- package/src/core/primitives/tooltip/tooltip.test.tsx +2 -2
- package/src/core/primitives/tooltip/tooltip.tsx +6 -4
- package/src/core/primitives/tooltip/tooltipLayer.tsx +2 -2
- package/src/core/utils/errorBoundary.tsx +1 -1
- package/src/core/utils/portal/portal.tsx +2 -1
- package/src/css/components/dialog/dialog.ts +1 -1
- package/src/css/components/skeleton/skeleton.ts +3 -3
- package/src/css/components/skeleton/types.ts +3 -3
- package/src/css/defaultTheme.css.ts +1 -1
- package/src/css/index.ts +126 -69
- package/src/css/primitives/_input/input.ts +2 -2
- package/src/css/primitives/_input/types.ts +2 -2
- package/src/css/primitives/_selectable/selectable.ts +1 -1
- package/src/css/primitives/_selectable/types.ts +1 -1
- package/src/css/primitives/avatar/avatar.ts +1 -1
- package/src/css/primitives/box/box.ts +35 -35
- package/src/css/primitives/box/types.ts +34 -34
- package/src/css/primitives/button/button.css.ts +8 -8
- package/src/css/primitives/button/button.ts +4 -4
- package/src/css/primitives/button/types.ts +3 -3
- package/src/css/primitives/card/__workshop__/color.tsx +8 -3
- package/src/css/primitives/code/code.ts +3 -3
- package/src/css/primitives/code/types.ts +2 -2
- package/src/css/primitives/container/container.ts +3 -3
- package/src/css/primitives/heading/heading.ts +4 -4
- package/src/css/primitives/heading/types.ts +3 -3
- package/src/css/primitives/kbd/kbd.ts +1 -1
- package/src/css/primitives/kbd/types.ts +1 -1
- package/src/css/primitives/label/label.ts +4 -4
- package/src/css/primitives/label/types.ts +3 -3
- package/src/css/primitives/root/root.ts +2 -2
- package/src/css/primitives/root/types.ts +1 -1
- package/src/css/primitives/select/select.ts +1 -1
- package/src/css/primitives/select/types.ts +1 -1
- package/src/css/primitives/text/text.ts +5 -5
- package/src/css/primitives/text/types.ts +4 -4
- package/src/css/primitives/textArea/textArea.ts +1 -1
- package/src/css/primitives/textArea/types.ts +1 -1
- package/src/css/primitives/textInput/textInput.ts +1 -1
- package/src/css/primitives/textInput/types.ts +1 -1
- package/src/css/primitives/tooltip/tooltip.css.ts +1 -3
- package/src/css/primitives/tooltip/tooltip.ts +0 -2
- package/src/theme/v3/defaultTokens.ts +6 -6
- package/src/core/_compat/index.ts +0 -4
- package/src/core/_compat/styles/index.ts +0 -1
- package/src/core/_compat/theme/index.ts +0 -5
- package/src/core/components/breadcrumbs/index.ts +0 -1
- package/src/core/components/dialog/index.ts +0 -5
- package/src/core/components/hotkeys/index.ts +0 -1
- package/src/core/components/menu/index.ts +0 -5
- package/src/core/components/tab/index.ts +0 -3
- package/src/core/components/toast/index.ts +0 -4
- package/src/core/components/tree/index.ts +0 -4
- package/src/core/components/virtualList/index.ts +0 -1
- package/src/core/hooks/useElementRect/index.ts +0 -1
- package/src/core/hooks/useMediaIndex/index.ts +0 -1
- package/src/core/primitives/_selectable/index.ts +0 -2
- package/src/core/primitives/arrow/index.ts +0 -1
- package/src/core/primitives/avatar/index.ts +0 -4
- package/src/core/primitives/badge/index.ts +0 -1
- package/src/core/primitives/badge/types2.ts +0 -10
- package/src/core/primitives/box/index.ts +0 -2
- package/src/core/primitives/button/index.ts +0 -2
- package/src/core/primitives/card/index.ts +0 -4
- package/src/core/primitives/checkbox/index.ts +0 -1
- package/src/core/primitives/code/index.ts +0 -1
- package/src/core/primitives/container/index.ts +0 -2
- package/src/core/primitives/flex/index.ts +0 -2
- package/src/core/primitives/grid/index.ts +0 -2
- package/src/core/primitives/heading/index.ts +0 -1
- package/src/core/primitives/inline/index.ts +0 -1
- package/src/core/primitives/inline/types.ts +0 -7
- package/src/core/primitives/kbd/index.ts +0 -1
- package/src/core/primitives/label/index.ts +0 -1
- package/src/core/primitives/layer/index.ts +0 -4
- package/src/core/primitives/popover/index.ts +0 -2
- package/src/core/primitives/radio/index.ts +0 -1
- package/src/core/primitives/root/index.ts +0 -1
- package/src/core/primitives/select/index.ts +0 -1
- package/src/core/primitives/skeleton/index.ts +0 -5
- package/src/core/primitives/spinner/index.ts +0 -1
- package/src/core/primitives/srOnly/index.ts +0 -1
- package/src/core/primitives/stack/index.ts +0 -1
- package/src/core/primitives/switch/index.ts +0 -1
- package/src/core/primitives/text/index.ts +0 -1
- package/src/core/primitives/textArea/index.ts +0 -1
- package/src/core/primitives/textInput/index.ts +0 -1
- package/src/core/primitives/tooltip/index.ts +0 -2
- package/src/core/utils/boundaryElement/index.ts +0 -3
- package/src/core/utils/elementQuery/index.ts +0 -1
- package/src/core/utils/portal/index.ts +0 -4
- package/src/css/components/breadcrumbs/index.ts +0 -1
- package/src/css/components/dialog/index.ts +0 -1
- package/src/css/components/menu/index.ts +0 -1
- package/src/css/components/skeleton/index.ts +0 -2
- package/src/css/components/toast/index.ts +0 -1
- package/src/css/components/tree/index.ts +0 -1
- package/src/css/primitives/_arrow/index.ts +0 -1
- package/src/css/primitives/_input/index.ts +0 -2
- package/src/css/primitives/_selectable/index.ts +0 -2
- package/src/css/primitives/avatar/index.ts +0 -2
- package/src/css/primitives/badge/index.ts +0 -2
- package/src/css/primitives/box/index.ts +0 -2
- package/src/css/primitives/button/index.ts +0 -2
- package/src/css/primitives/card/index.ts +0 -2
- package/src/css/primitives/checkbox/index.ts +0 -1
- package/src/css/primitives/code/index.ts +0 -2
- package/src/css/primitives/container/index.ts +0 -2
- package/src/css/primitives/heading/index.ts +0 -2
- package/src/css/primitives/kbd/index.ts +0 -2
- package/src/css/primitives/label/index.ts +0 -2
- package/src/css/primitives/popover/index.ts +0 -1
- package/src/css/primitives/radio/index.ts +0 -1
- package/src/css/primitives/root/index.ts +0 -2
- package/src/css/primitives/select/index.ts +0 -2
- package/src/css/primitives/spinner/index.ts +0 -2
- package/src/css/primitives/srOnly/index.ts +0 -1
- package/src/css/primitives/stack/index.ts +0 -1
- package/src/css/primitives/switch/index.ts +0 -1
- package/src/css/primitives/text/index.ts +0 -2
- package/src/css/primitives/textArea/index.ts +0 -2
- package/src/css/primitives/textInput/index.ts +0 -2
- package/src/css/primitives/tooltip/index.ts +0 -2
- package/src/css/props/alignItems/index.ts +0 -2
- package/src/css/props/border/index.ts +0 -2
- package/src/css/props/boxSizing/index.ts +0 -2
- package/src/css/props/display/index.ts +0 -2
- package/src/css/props/flex/index.ts +0 -2
- package/src/css/props/flexDirection/index.ts +0 -2
- package/src/css/props/flexWrap/index.ts +0 -2
- package/src/css/props/font/index.ts +0 -2
- package/src/css/props/gap/index.ts +0 -2
- package/src/css/props/gridAutoColumns/index.ts +0 -2
- package/src/css/props/gridAutoFlow/index.ts +0 -2
- package/src/css/props/gridAutoRows/index.ts +0 -2
- package/src/css/props/gridColumn/index.ts +0 -2
- package/src/css/props/gridColumnEnd/index.ts +0 -2
- package/src/css/props/gridColumnStart/index.ts +0 -2
- package/src/css/props/gridRow/index.ts +0 -2
- package/src/css/props/gridRowEnd/index.ts +0 -2
- package/src/css/props/gridRowStart/index.ts +0 -2
- package/src/css/props/gridTemplateColumns/index.ts +0 -2
- package/src/css/props/gridTemplateRows/index.ts +0 -2
- package/src/css/props/height/index.ts +0 -2
- package/src/css/props/inset/index.ts +0 -2
- package/src/css/props/justifyContent/index.ts +0 -2
- package/src/css/props/margin/index.ts +0 -2
- package/src/css/props/maxWidth/index.ts +0 -2
- package/src/css/props/minHeight/index.ts +0 -2
- package/src/css/props/minWidth/index.ts +0 -2
- package/src/css/props/outline/index.ts +0 -2
- package/src/css/props/overflow/index.ts +0 -2
- package/src/css/props/padding/index.ts +0 -2
- package/src/css/props/pointerEvents/index.ts +0 -2
- package/src/css/props/position/index.ts +0 -2
- package/src/css/props/radius/index.ts +0 -2
- package/src/css/props/shadow/index.ts +0 -2
- package/src/css/props/textAlign/index.ts +0 -2
- package/src/css/props/textOverflow/index.ts +0 -2
- package/src/css/props/width/index.ts +0 -2
- /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,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,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[
|
|
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[
|
|
167
|
-
[vars.color.border]: tinted.border[
|
|
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[
|
|
179
|
-
[vars.color.border]: tinted.border[
|
|
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[
|
|
193
|
-
[vars.color.border]: tinted.border[
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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,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,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,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: ['
|
|
149
|
+
4: ['300 75%', '700 75%'],
|
|
150
150
|
},
|
|
151
151
|
border: {
|
|
152
|
-
0: ['200
|
|
153
|
-
4: ['
|
|
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
|
|
169
|
+
4: ['300 75%', '700'],
|
|
170
170
|
},
|
|
171
171
|
border: {
|
|
172
|
-
0: ['200
|
|
173
|
-
4: ['
|
|
172
|
+
0: ['200', '800 75%'],
|
|
173
|
+
4: ['400', '700'],
|
|
174
174
|
},
|
|
175
175
|
fg: {
|
|
176
176
|
0: ['black', 'white'],
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './_responsive'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './breadcrumbs'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './hotkeys'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './virtualList'
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './useElementRect'
|