@sanity/ui 3.0.0-static.16 → 3.0.0-static.18
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 +2 -4
- package/bin/{ui.js → sanity-ui.cjs} +1 -1
- package/dist/_chunks-cjs/{_visual-editing.js → _visual-editing.cjs} +6 -6
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -0
- package/dist/_chunks-cjs/{buildCommand.js → buildCommand.cjs} +26 -10
- package/dist/_chunks-cjs/buildCommand.cjs.map +1 -0
- package/dist/_chunks-cjs/{refractor.js → refractor.cjs} +1 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -0
- package/dist/_chunks-es/{_visual-editing.mjs → _visual-editing.js} +7 -7
- package/dist/_chunks-es/_visual-editing.js.map +1 -0
- package/dist/_chunks-es/{refractor.mjs → refractor.js} +1 -1
- package/dist/_chunks-es/refractor.js.map +1 -0
- package/dist/_visual-editing.cjs +30 -0
- package/dist/_visual-editing.cjs.map +1 -0
- package/dist/_visual-editing.js +29 -29
- package/dist/_visual-editing.js.map +1 -1
- package/dist/{cli.js → cli.cjs} +4 -4
- package/dist/cli.cjs.map +1 -0
- package/dist/{css.mjs → css.cjs} +491 -499
- package/dist/css.cjs.map +1 -0
- package/dist/{css.d.mts → css.d.cts} +26 -26
- package/dist/css.d.ts +26 -26
- package/dist/css.js +491 -497
- package/dist/css.js.map +1 -1
- package/dist/{index.mjs → index.cjs} +368 -367
- package/dist/{index.mjs.map → index.cjs.map} +1 -1
- package/dist/{index.d.mts → index.d.cts} +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +366 -367
- package/dist/index.js.map +1 -1
- package/dist/{theme.mjs → theme.cjs} +219 -196
- package/dist/theme.cjs.map +1 -0
- package/dist/{theme.d.mts → theme.d.cts} +2 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +218 -195
- package/dist/theme.js.map +1 -1
- package/dist/{sanity-palette.css → ui-palette.css} +1 -1
- package/dist/ui-palette.min.css +1 -0
- package/dist/{system.css → ui-system.css} +258 -140
- package/dist/ui-system.min.css +1 -0
- package/dist/{sanity-theme.css → ui-theme.css} +199 -199
- package/dist/ui-theme.min.css +1 -0
- package/dist/ui.css +29152 -0
- package/dist/ui.min.css +1 -0
- package/package.json +20 -20
- package/src/cli/buildCommand.ts +55 -20
- package/src/cli/index.ts +1 -1
- package/src/core/StyleTags.tsx +4 -4
- package/src/core/components/autocomplete/__workshop__/async.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/custom.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/focusAndBlur.tsx +3 -3
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +2 -18
- package/src/core/hooks/useMediaIndex/useMediaIndex.ts +9 -9
- package/src/core/primitives/button/__workshop__/custom.tsx +18 -41
- package/src/core/primitives/button/button.tsx +3 -1
- package/src/core/primitives/card/__workshop__/asButton.tsx +0 -9
- package/src/core/primitives/card/__workshop__/interactive.tsx +0 -1
- package/src/core/primitives/card/__workshop__/props.tsx +0 -3
- package/src/core/primitives/card/__workshop__/selected.tsx +6 -37
- package/src/core/primitives/heading/__workshop__/opticalAlignment.tsx +1 -1
- package/src/core/primitives/heading/__workshop__/plain.tsx +1 -8
- package/src/core/primitives/label/__workshop__/plain.tsx +1 -9
- package/src/core/primitives/text/__workshop__/example.tsx +1 -9
- package/src/css/{compilePalette.ts → _compilePalette.ts} +2 -2
- package/src/css/{compileSystem.ts → _compileSystem.ts} +1 -1
- package/src/css/{compileTheme.ts → _compileTheme.ts} +3 -3
- package/src/css/{compileTheme_v3.ts → _compileTheme_v3.ts} +7 -1
- package/src/css/_system.style.ts +1 -0
- package/src/css/constants.ts +1 -0
- package/src/css/index.ts +3 -3
- package/src/css/primitives/button/button.style.ts +23 -9
- package/src/css/primitives/button/button.ts +1 -12
- package/src/css/primitives/button/types.ts +1 -6
- package/src/css/primitives/card/card.style.ts +12 -21
- package/src/css/primitives/kbd/kbd.style.ts +3 -6
- package/src/css/types.ts +32 -27
- package/src/theme/v3/color/buildColor_v3.ts +53 -25
- package/src/theme/v3/color/card.ts +0 -42
- package/src/theme/v3/color/renderColor.test.ts +1 -0
- package/src/theme/v3/color/renderColor.ts +9 -2
- package/src/theme/v3/color/token.ts +1 -0
- package/src/theme/v3/defaultTokens.ts +7 -2
- package/dist/_chunks-cjs/_visual-editing.js.map +0 -1
- package/dist/_chunks-cjs/buildCommand.js.map +0 -1
- package/dist/_chunks-cjs/refractor.js.map +0 -1
- package/dist/_chunks-es/_visual-editing.mjs.map +0 -1
- package/dist/_chunks-es/refractor.mjs.map +0 -1
- package/dist/_visual-editing.mjs +0 -30
- package/dist/_visual-editing.mjs.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/css.mjs.map +0 -1
- package/dist/sanity-palette.min.css +0 -1
- package/dist/sanity-theme.min.css +0 -1
- package/dist/system.min.css +0 -1
- package/dist/theme.mjs.map +0 -1
- package/src/css/primitives/button/_constants.ts +0 -17
- /package/dist/{_visual-editing.d.mts → _visual-editing.d.cts} +0 -0
- /package/dist/{cli.d.ts → cli.d.cts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {AvatarSize} from '@sanity/ui/theme'
|
|
2
|
-
import {ColorTintKey} from '@sanity/color'
|
|
2
|
+
import type {ColorTintKey} from '@sanity/color'
|
|
3
3
|
import {ContainerWidth} from '@sanity/ui/theme'
|
|
4
4
|
import {default as CSS_2} from 'csstype'
|
|
5
5
|
import {FontCodeSize} from '@sanity/ui/theme'
|
|
@@ -7,18 +7,17 @@ import {FontHeadingSize} from '@sanity/ui/theme'
|
|
|
7
7
|
import {FontLabelSize} from '@sanity/ui/theme'
|
|
8
8
|
import {FontTextSize} from '@sanity/ui/theme'
|
|
9
9
|
import {FontWeight} from '@sanity/ui/theme'
|
|
10
|
-
import {Hue} from '@sanity/ui/theme'
|
|
10
|
+
import type {Hue} from '@sanity/ui/theme'
|
|
11
11
|
import {Radius} from '@sanity/ui/theme'
|
|
12
12
|
import {RootTheme} from '@sanity/ui/theme'
|
|
13
13
|
import {Shadow} from '@sanity/ui/theme'
|
|
14
14
|
import {Space} from '@sanity/ui/theme'
|
|
15
15
|
import {ThemeBoxShadow} from '@sanity/ui/theme'
|
|
16
16
|
import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
17
|
-
import {ThemeColorButtonModeKey} from '@sanity/ui/theme'
|
|
18
17
|
import {ThemeColorCardToneKey} from '@sanity/ui/theme'
|
|
19
18
|
import {ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
20
19
|
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
21
|
-
import {Tint} from '@sanity/ui/theme'
|
|
20
|
+
import type {Tint} from '@sanity/ui/theme'
|
|
22
21
|
|
|
23
22
|
/** @public */
|
|
24
23
|
export declare function animatedSpinnerIcon(): string | undefined
|
|
@@ -127,8 +126,12 @@ export declare interface BoxStyleProps
|
|
|
127
126
|
/** @public */
|
|
128
127
|
export declare function breadcrumbs(): string | undefined
|
|
129
128
|
|
|
129
|
+
/** @public */
|
|
130
|
+
export declare type Breakpoint = keyof typeof BREAKPOINTS
|
|
131
|
+
|
|
130
132
|
/** @public */
|
|
131
133
|
export declare const BREAKPOINTS: {
|
|
134
|
+
0: number
|
|
132
135
|
1: number
|
|
133
136
|
2: number
|
|
134
137
|
3: number
|
|
@@ -151,10 +154,7 @@ export declare interface ButtonStyleProps
|
|
|
151
154
|
extends DisplayStyleProps,
|
|
152
155
|
FlexItemStyleProps,
|
|
153
156
|
RadiusStyleProps,
|
|
154
|
-
WidthStyleProps {
|
|
155
|
-
mode?: ThemeColorButtonModeKey
|
|
156
|
-
tone?: ThemeColorStateToneKey
|
|
157
|
-
}
|
|
157
|
+
WidthStyleProps {}
|
|
158
158
|
|
|
159
159
|
/** @public */
|
|
160
160
|
export declare function card(props: CardStyleProps): string | undefined
|
|
@@ -629,13 +629,13 @@ export declare interface ColorVariantVars
|
|
|
629
629
|
export declare type Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
|
|
630
630
|
|
|
631
631
|
/** @internal */
|
|
632
|
-
export declare function
|
|
632
|
+
export declare function _compilePalette(): string
|
|
633
633
|
|
|
634
634
|
/** @internal */
|
|
635
|
-
export declare function
|
|
635
|
+
export declare function _compileSystem(): string
|
|
636
636
|
|
|
637
637
|
/** @internal */
|
|
638
|
-
export declare function
|
|
638
|
+
export declare function _compileTheme(theme: RootTheme): string
|
|
639
639
|
|
|
640
640
|
/** @public */
|
|
641
641
|
export declare function composeClassNames(
|
|
@@ -1467,6 +1467,21 @@ export declare type VarName =
|
|
|
1467
1467
|
|
|
1468
1468
|
/** @public */
|
|
1469
1469
|
export declare interface VarNames {
|
|
1470
|
+
avatar: {
|
|
1471
|
+
distance: VarName
|
|
1472
|
+
focusRing: {
|
|
1473
|
+
offset: VarName
|
|
1474
|
+
width: VarName
|
|
1475
|
+
}
|
|
1476
|
+
size: VarName
|
|
1477
|
+
sizes: Record<
|
|
1478
|
+
AvatarSize,
|
|
1479
|
+
{
|
|
1480
|
+
distance: VarName
|
|
1481
|
+
size: VarName
|
|
1482
|
+
}
|
|
1483
|
+
>
|
|
1484
|
+
}
|
|
1470
1485
|
button: {
|
|
1471
1486
|
border: {
|
|
1472
1487
|
width: VarName
|
|
@@ -1485,21 +1500,6 @@ export declare interface VarNames {
|
|
|
1485
1500
|
ScopedColorVarNames &
|
|
1486
1501
|
Record<ThemeColorCardToneKey, ColorCardVarNames>
|
|
1487
1502
|
container: Record<Exclude<ContainerWidth, 'auto'>, VarName>
|
|
1488
|
-
avatar: {
|
|
1489
|
-
distance: VarName
|
|
1490
|
-
focusRing: {
|
|
1491
|
-
offset: VarName
|
|
1492
|
-
width: VarName
|
|
1493
|
-
}
|
|
1494
|
-
size: VarName
|
|
1495
|
-
sizes: Record<
|
|
1496
|
-
AvatarSize,
|
|
1497
|
-
{
|
|
1498
|
-
distance: VarName
|
|
1499
|
-
size: VarName
|
|
1500
|
-
}
|
|
1501
|
-
>
|
|
1502
|
-
}
|
|
1503
1503
|
font: {
|
|
1504
1504
|
code: FontVarNames<FontCodeSize>
|
|
1505
1505
|
heading: FontVarNames<FontHeadingSize>
|
package/dist/css.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {AvatarSize} from '@sanity/ui/theme'
|
|
2
|
-
import {ColorTintKey} from '@sanity/color'
|
|
2
|
+
import type {ColorTintKey} from '@sanity/color'
|
|
3
3
|
import {ContainerWidth} from '@sanity/ui/theme'
|
|
4
4
|
import {default as CSS_2} from 'csstype'
|
|
5
5
|
import {FontCodeSize} from '@sanity/ui/theme'
|
|
@@ -7,18 +7,17 @@ import {FontHeadingSize} from '@sanity/ui/theme'
|
|
|
7
7
|
import {FontLabelSize} from '@sanity/ui/theme'
|
|
8
8
|
import {FontTextSize} from '@sanity/ui/theme'
|
|
9
9
|
import {FontWeight} from '@sanity/ui/theme'
|
|
10
|
-
import {Hue} from '@sanity/ui/theme'
|
|
10
|
+
import type {Hue} from '@sanity/ui/theme'
|
|
11
11
|
import {Radius} from '@sanity/ui/theme'
|
|
12
12
|
import {RootTheme} from '@sanity/ui/theme'
|
|
13
13
|
import {Shadow} from '@sanity/ui/theme'
|
|
14
14
|
import {Space} from '@sanity/ui/theme'
|
|
15
15
|
import {ThemeBoxShadow} from '@sanity/ui/theme'
|
|
16
16
|
import {ThemeColorAvatarColorKey} from '@sanity/ui/theme'
|
|
17
|
-
import {ThemeColorButtonModeKey} from '@sanity/ui/theme'
|
|
18
17
|
import {ThemeColorCardToneKey} from '@sanity/ui/theme'
|
|
19
18
|
import {ThemeColorSchemeKey} from '@sanity/ui/theme'
|
|
20
19
|
import {ThemeColorStateToneKey} from '@sanity/ui/theme'
|
|
21
|
-
import {Tint} from '@sanity/ui/theme'
|
|
20
|
+
import type {Tint} from '@sanity/ui/theme'
|
|
22
21
|
|
|
23
22
|
/** @public */
|
|
24
23
|
export declare function animatedSpinnerIcon(): string | undefined
|
|
@@ -127,8 +126,12 @@ export declare interface BoxStyleProps
|
|
|
127
126
|
/** @public */
|
|
128
127
|
export declare function breadcrumbs(): string | undefined
|
|
129
128
|
|
|
129
|
+
/** @public */
|
|
130
|
+
export declare type Breakpoint = keyof typeof BREAKPOINTS
|
|
131
|
+
|
|
130
132
|
/** @public */
|
|
131
133
|
export declare const BREAKPOINTS: {
|
|
134
|
+
0: number
|
|
132
135
|
1: number
|
|
133
136
|
2: number
|
|
134
137
|
3: number
|
|
@@ -151,10 +154,7 @@ export declare interface ButtonStyleProps
|
|
|
151
154
|
extends DisplayStyleProps,
|
|
152
155
|
FlexItemStyleProps,
|
|
153
156
|
RadiusStyleProps,
|
|
154
|
-
WidthStyleProps {
|
|
155
|
-
mode?: ThemeColorButtonModeKey
|
|
156
|
-
tone?: ThemeColorStateToneKey
|
|
157
|
-
}
|
|
157
|
+
WidthStyleProps {}
|
|
158
158
|
|
|
159
159
|
/** @public */
|
|
160
160
|
export declare function card(props: CardStyleProps): string | undefined
|
|
@@ -629,13 +629,13 @@ export declare interface ColorVariantVars
|
|
|
629
629
|
export declare type Columns = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12
|
|
630
630
|
|
|
631
631
|
/** @internal */
|
|
632
|
-
export declare function
|
|
632
|
+
export declare function _compilePalette(): string
|
|
633
633
|
|
|
634
634
|
/** @internal */
|
|
635
|
-
export declare function
|
|
635
|
+
export declare function _compileSystem(): string
|
|
636
636
|
|
|
637
637
|
/** @internal */
|
|
638
|
-
export declare function
|
|
638
|
+
export declare function _compileTheme(theme: RootTheme): string
|
|
639
639
|
|
|
640
640
|
/** @public */
|
|
641
641
|
export declare function composeClassNames(
|
|
@@ -1467,6 +1467,21 @@ export declare type VarName =
|
|
|
1467
1467
|
|
|
1468
1468
|
/** @public */
|
|
1469
1469
|
export declare interface VarNames {
|
|
1470
|
+
avatar: {
|
|
1471
|
+
distance: VarName
|
|
1472
|
+
focusRing: {
|
|
1473
|
+
offset: VarName
|
|
1474
|
+
width: VarName
|
|
1475
|
+
}
|
|
1476
|
+
size: VarName
|
|
1477
|
+
sizes: Record<
|
|
1478
|
+
AvatarSize,
|
|
1479
|
+
{
|
|
1480
|
+
distance: VarName
|
|
1481
|
+
size: VarName
|
|
1482
|
+
}
|
|
1483
|
+
>
|
|
1484
|
+
}
|
|
1470
1485
|
button: {
|
|
1471
1486
|
border: {
|
|
1472
1487
|
width: VarName
|
|
@@ -1485,21 +1500,6 @@ export declare interface VarNames {
|
|
|
1485
1500
|
ScopedColorVarNames &
|
|
1486
1501
|
Record<ThemeColorCardToneKey, ColorCardVarNames>
|
|
1487
1502
|
container: Record<Exclude<ContainerWidth, 'auto'>, VarName>
|
|
1488
|
-
avatar: {
|
|
1489
|
-
distance: VarName
|
|
1490
|
-
focusRing: {
|
|
1491
|
-
offset: VarName
|
|
1492
|
-
width: VarName
|
|
1493
|
-
}
|
|
1494
|
-
size: VarName
|
|
1495
|
-
sizes: Record<
|
|
1496
|
-
AvatarSize,
|
|
1497
|
-
{
|
|
1498
|
-
distance: VarName
|
|
1499
|
-
size: VarName
|
|
1500
|
-
}
|
|
1501
|
-
>
|
|
1502
|
-
}
|
|
1503
1503
|
font: {
|
|
1504
1504
|
code: FontVarNames<FontCodeSize>
|
|
1505
1505
|
heading: FontVarNames<FontHeadingSize>
|