@sanity/ui 4.0.0-static.4 → 4.0.0-static.6
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/dist/css/index.css +1 -1
- package/dist/css/index.d.cts +25 -1
- package/dist/css/index.d.ts +25 -1
- package/package.json +3 -3
package/dist/css/index.d.cts
CHANGED
|
@@ -7,7 +7,6 @@ import {ColorTokens as ColorTokens_2} from '@sanity/ui/theme'
|
|
|
7
7
|
import type {ColorVariant} from '@sanity/ui/theme'
|
|
8
8
|
import type {ContainerScale} from '@sanity/ui/theme'
|
|
9
9
|
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
10
|
-
import type {createThemeContract} from '@vanilla-extract/css'
|
|
11
10
|
import type {ElementTone} from '@sanity/ui/theme'
|
|
12
11
|
import type {FontCodeSize} from '@sanity/ui/theme'
|
|
13
12
|
import type {FontHeadingSize} from '@sanity/ui/theme'
|
|
@@ -360,6 +359,10 @@ export declare type CoreThemeTokens = {
|
|
|
360
359
|
space: Record<Space, string>
|
|
361
360
|
}
|
|
362
361
|
|
|
362
|
+
declare function createThemeContract<ThemeTokens extends NullableTokens_2>(
|
|
363
|
+
tokens: ThemeTokens,
|
|
364
|
+
): ThemeVars_2<ThemeTokens>
|
|
365
|
+
|
|
363
366
|
/** @public */
|
|
364
367
|
export declare type CSSCardColorTokens = {
|
|
365
368
|
avatar: Record<
|
|
@@ -440,6 +443,8 @@ export declare type CSSThemeOptions = {
|
|
|
440
443
|
/** @public */
|
|
441
444
|
export declare type CSSVarFunction = `var(${CSSVarName})`
|
|
442
445
|
|
|
446
|
+
declare type CSSVarFunction_2 = `var(--${string})`
|
|
447
|
+
|
|
443
448
|
/** @public */
|
|
444
449
|
export declare type CSSVarName = `--${string}`
|
|
445
450
|
|
|
@@ -840,6 +845,14 @@ export declare interface LabelStyleProps extends FlexStyleProps, FontStyleProps
|
|
|
840
845
|
/** @public */
|
|
841
846
|
export declare const layers: Record<CSSLayer, string>
|
|
842
847
|
|
|
848
|
+
declare type MapLeafNodes<Obj, LeafType> = {
|
|
849
|
+
[Prop in keyof Obj]: Obj[Prop] extends Primitive
|
|
850
|
+
? LeafType
|
|
851
|
+
: Obj[Prop] extends Record<string | number, any>
|
|
852
|
+
? MapLeafNodes<Obj[Prop], LeafType>
|
|
853
|
+
: never
|
|
854
|
+
}
|
|
855
|
+
|
|
843
856
|
/** @public */
|
|
844
857
|
export declare type Margin = Space | 'auto'
|
|
845
858
|
|
|
@@ -901,6 +914,10 @@ export declare type NullableTokens = {
|
|
|
901
914
|
[key: string]: string | NullableTokens
|
|
902
915
|
}
|
|
903
916
|
|
|
917
|
+
declare type NullableTokens_2 = {
|
|
918
|
+
[key: string]: string | NullableTokens_2 | null
|
|
919
|
+
}
|
|
920
|
+
|
|
904
921
|
/** @public */
|
|
905
922
|
export declare type Outline = 'none'
|
|
906
923
|
|
|
@@ -973,6 +990,8 @@ export declare interface PositionStyleProps {
|
|
|
973
990
|
position?: ResponsiveProp<Position>
|
|
974
991
|
}
|
|
975
992
|
|
|
993
|
+
declare type Primitive = string | boolean | number | null | undefined
|
|
994
|
+
|
|
976
995
|
/** @public */
|
|
977
996
|
export declare function radio(props: {className?: string}): string | undefined
|
|
978
997
|
|
|
@@ -1329,6 +1348,11 @@ export declare type ThemeVars = ThemeContract<ThemeTokens & ScopedTokens>
|
|
|
1329
1348
|
* @internal */
|
|
1330
1349
|
export declare const themeVars: ThemeContract<ThemeTokens>
|
|
1331
1350
|
|
|
1351
|
+
declare type ThemeVars_2<ThemeContract extends NullableTokens_2> = MapLeafNodes<
|
|
1352
|
+
ThemeContract,
|
|
1353
|
+
CSSVarFunction_2
|
|
1354
|
+
>
|
|
1355
|
+
|
|
1332
1356
|
/** @public */
|
|
1333
1357
|
export declare function toast(): string
|
|
1334
1358
|
|
package/dist/css/index.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ import {ColorTokens as ColorTokens_2} from '@sanity/ui/theme'
|
|
|
7
7
|
import type {ColorVariant} from '@sanity/ui/theme'
|
|
8
8
|
import type {ContainerScale} from '@sanity/ui/theme'
|
|
9
9
|
import type {ContainerWidth} from '@sanity/ui/theme'
|
|
10
|
-
import type {createThemeContract} from '@vanilla-extract/css'
|
|
11
10
|
import type {ElementTone} from '@sanity/ui/theme'
|
|
12
11
|
import type {FontCodeSize} from '@sanity/ui/theme'
|
|
13
12
|
import type {FontHeadingSize} from '@sanity/ui/theme'
|
|
@@ -360,6 +359,10 @@ export declare type CoreThemeTokens = {
|
|
|
360
359
|
space: Record<Space, string>
|
|
361
360
|
}
|
|
362
361
|
|
|
362
|
+
declare function createThemeContract<ThemeTokens extends NullableTokens_2>(
|
|
363
|
+
tokens: ThemeTokens,
|
|
364
|
+
): ThemeVars_2<ThemeTokens>
|
|
365
|
+
|
|
363
366
|
/** @public */
|
|
364
367
|
export declare type CSSCardColorTokens = {
|
|
365
368
|
avatar: Record<
|
|
@@ -440,6 +443,8 @@ export declare type CSSThemeOptions = {
|
|
|
440
443
|
/** @public */
|
|
441
444
|
export declare type CSSVarFunction = `var(${CSSVarName})`
|
|
442
445
|
|
|
446
|
+
declare type CSSVarFunction_2 = `var(--${string})`
|
|
447
|
+
|
|
443
448
|
/** @public */
|
|
444
449
|
export declare type CSSVarName = `--${string}`
|
|
445
450
|
|
|
@@ -840,6 +845,14 @@ export declare interface LabelStyleProps extends FlexStyleProps, FontStyleProps
|
|
|
840
845
|
/** @public */
|
|
841
846
|
export declare const layers: Record<CSSLayer, string>
|
|
842
847
|
|
|
848
|
+
declare type MapLeafNodes<Obj, LeafType> = {
|
|
849
|
+
[Prop in keyof Obj]: Obj[Prop] extends Primitive
|
|
850
|
+
? LeafType
|
|
851
|
+
: Obj[Prop] extends Record<string | number, any>
|
|
852
|
+
? MapLeafNodes<Obj[Prop], LeafType>
|
|
853
|
+
: never
|
|
854
|
+
}
|
|
855
|
+
|
|
843
856
|
/** @public */
|
|
844
857
|
export declare type Margin = Space | 'auto'
|
|
845
858
|
|
|
@@ -901,6 +914,10 @@ export declare type NullableTokens = {
|
|
|
901
914
|
[key: string]: string | NullableTokens
|
|
902
915
|
}
|
|
903
916
|
|
|
917
|
+
declare type NullableTokens_2 = {
|
|
918
|
+
[key: string]: string | NullableTokens_2 | null
|
|
919
|
+
}
|
|
920
|
+
|
|
904
921
|
/** @public */
|
|
905
922
|
export declare type Outline = 'none'
|
|
906
923
|
|
|
@@ -973,6 +990,8 @@ export declare interface PositionStyleProps {
|
|
|
973
990
|
position?: ResponsiveProp<Position>
|
|
974
991
|
}
|
|
975
992
|
|
|
993
|
+
declare type Primitive = string | boolean | number | null | undefined
|
|
994
|
+
|
|
976
995
|
/** @public */
|
|
977
996
|
export declare function radio(props: {className?: string}): string | undefined
|
|
978
997
|
|
|
@@ -1329,6 +1348,11 @@ export declare type ThemeVars = ThemeContract<ThemeTokens & ScopedTokens>
|
|
|
1329
1348
|
* @internal */
|
|
1330
1349
|
export declare const themeVars: ThemeContract<ThemeTokens>
|
|
1331
1350
|
|
|
1351
|
+
declare type ThemeVars_2<ThemeContract extends NullableTokens_2> = MapLeafNodes<
|
|
1352
|
+
ThemeContract,
|
|
1353
|
+
CSSVarFunction_2
|
|
1354
|
+
>
|
|
1355
|
+
|
|
1332
1356
|
/** @public */
|
|
1333
1357
|
export declare function toast(): string
|
|
1334
1358
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/ui",
|
|
3
|
-
"version": "4.0.0-static.
|
|
3
|
+
"version": "4.0.0-static.6",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"react",
|
|
6
6
|
"ui",
|
|
@@ -122,11 +122,9 @@
|
|
|
122
122
|
"@juggle/resize-observer": "^3.4.0",
|
|
123
123
|
"@sanity/color": "^3.0.6",
|
|
124
124
|
"@sanity/icons": "^3.7.4",
|
|
125
|
-
"@vanilla-extract/css": "^1.17.4",
|
|
126
125
|
"@vanilla-extract/dynamic": "^2.1.5",
|
|
127
126
|
"csstype": "^3.1.3",
|
|
128
127
|
"framer-motion": "^12.23.12",
|
|
129
|
-
"react-compiler-runtime": "19.1.0-rc.2",
|
|
130
128
|
"react-refractor": "^4.0.0",
|
|
131
129
|
"use-effect-event": "^2.0.3"
|
|
132
130
|
},
|
|
@@ -151,12 +149,14 @@
|
|
|
151
149
|
"@types/react": "^19.1.9",
|
|
152
150
|
"@types/react-dom": "^19.1.7",
|
|
153
151
|
"@types/react-is": "^19.0.0",
|
|
152
|
+
"@vanilla-extract/css": "^1.17.4",
|
|
154
153
|
"@vanilla-extract/rollup-plugin": "^1.4.0",
|
|
155
154
|
"@vanilla-extract/vite-plugin": "^5.1.1",
|
|
156
155
|
"@vitejs/plugin-react": "^4.7.0",
|
|
157
156
|
"@vitest/browser": "^3.2.4",
|
|
158
157
|
"autoprefixer": "^10.4.21",
|
|
159
158
|
"babel-plugin-react-compiler": "19.1.0-rc.2",
|
|
159
|
+
"browserslist": "^4.25.1",
|
|
160
160
|
"cac": "^6.7.14",
|
|
161
161
|
"commitizen": "^4.3.1",
|
|
162
162
|
"cssnano": "^7.1.0",
|