@sanity/ui 4.0.0-static.1 → 4.0.0-static.10
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 +23387 -1
- package/dist/css/index.css.map +1 -0
- package/dist/css/index.d.cts +25 -1
- package/dist/css/index.d.ts +25 -1
- package/package.json +34 -30
- package/src/css/primitives/avatar/avatar.css.ts +9 -5
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.10",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"react",
|
|
6
6
|
"ui",
|
|
@@ -118,17 +118,15 @@
|
|
|
118
118
|
"extends": "@sanity/semantic-release-preset"
|
|
119
119
|
},
|
|
120
120
|
"dependencies": {
|
|
121
|
-
"@floating-ui/react-dom": "^2.1.
|
|
121
|
+
"@floating-ui/react-dom": "^2.1.5",
|
|
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
|
-
"framer-motion": "^12.23.
|
|
129
|
-
"react-compiler-runtime": "19.1.0-rc.2",
|
|
127
|
+
"framer-motion": "^12.23.12",
|
|
130
128
|
"react-refractor": "^4.0.0",
|
|
131
|
-
"use-effect-event": "^2.0.
|
|
129
|
+
"use-effect-event": "^2.0.3"
|
|
132
130
|
},
|
|
133
131
|
"devDependencies": {
|
|
134
132
|
"@babel/core": "^7.28.0",
|
|
@@ -137,34 +135,37 @@
|
|
|
137
135
|
"@babel/preset-typescript": "^7.27.1",
|
|
138
136
|
"@commitlint/cli": "^19.8.1",
|
|
139
137
|
"@commitlint/config-conventional": "^19.8.1",
|
|
140
|
-
"@eslint/js": "^9.
|
|
138
|
+
"@eslint/js": "^9.32.0",
|
|
141
139
|
"@sanity/browserslist-config": "^1.0.5",
|
|
142
|
-
"@sanity/pkg-utils": "^7.9.
|
|
140
|
+
"@sanity/pkg-utils": "^7.9.17",
|
|
143
141
|
"@sanity/prettier-config": "^2.0.1",
|
|
144
142
|
"@sanity/semantic-release-preset": "^5.0.0",
|
|
145
|
-
"@sanity/ui-workshop": "^
|
|
146
|
-
"@testing-library/dom": "^10.4.
|
|
147
|
-
"@testing-library/jest-dom": "^6.6.
|
|
143
|
+
"@sanity/ui-workshop": "^3.1.2",
|
|
144
|
+
"@testing-library/dom": "^10.4.1",
|
|
145
|
+
"@testing-library/jest-dom": "^6.6.4",
|
|
148
146
|
"@testing-library/react": "^16.3.0",
|
|
149
147
|
"@testing-library/user-event": "^14.6.1",
|
|
150
148
|
"@types/node": "^24.0.3",
|
|
151
|
-
"@types/react": "^19.1.
|
|
152
|
-
"@types/react-dom": "^19.1.
|
|
149
|
+
"@types/react": "^19.1.9",
|
|
150
|
+
"@types/react-dom": "^19.1.7",
|
|
153
151
|
"@types/react-is": "^19.0.0",
|
|
154
|
-
"@vanilla-extract/
|
|
155
|
-
"@vanilla-extract/
|
|
152
|
+
"@vanilla-extract/css": "^1.17.4",
|
|
153
|
+
"@vanilla-extract/rollup-plugin": "^1.4.0",
|
|
154
|
+
"@vanilla-extract/vite-plugin": "^5.1.1",
|
|
156
155
|
"@vitejs/plugin-react": "^4.7.0",
|
|
157
|
-
"@vitest/browser": "^3.2.
|
|
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
|
+
"browserslist-config-baseline": "^0.4.0",
|
|
160
161
|
"cac": "^6.7.14",
|
|
161
162
|
"commitizen": "^4.3.1",
|
|
162
|
-
"cssnano": "^7.0
|
|
163
|
+
"cssnano": "^7.1.0",
|
|
163
164
|
"cypress": "^13.17.0",
|
|
164
165
|
"cypress-real-events": "^1.14.0",
|
|
165
166
|
"cz-conventional-changelog": "^3.3.0",
|
|
166
167
|
"dotenv-flow": "^4.1.0",
|
|
167
|
-
"eslint": "^9.
|
|
168
|
+
"eslint": "^9.32.0",
|
|
168
169
|
"eslint-config-prettier": "^10.1.8",
|
|
169
170
|
"eslint-formatter-compact": "^8.40.0",
|
|
170
171
|
"eslint-plugin-boundaries": "^5.0.1",
|
|
@@ -174,31 +175,31 @@
|
|
|
174
175
|
"eslint-plugin-react-hooks": "0.0.0-experimental-edac0dde-20250723",
|
|
175
176
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
176
177
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
177
|
-
"eslint-plugin-storybook": "^9.0.
|
|
178
|
-
"globals": "^16.
|
|
178
|
+
"eslint-plugin-storybook": "^9.0.18",
|
|
179
|
+
"globals": "^16.3.0",
|
|
179
180
|
"husky": "^8.0.3",
|
|
180
181
|
"lightningcss": "^1.30.1",
|
|
181
182
|
"lint-staged": "^14.0.1",
|
|
182
183
|
"mkdirp": "^3.0.1",
|
|
183
184
|
"npm-run-all2": "^8.0.4",
|
|
184
185
|
"postcss": "^8.5.6",
|
|
185
|
-
"postcss-preset-env": "^10.2.
|
|
186
|
-
"prettier": "^3.
|
|
187
|
-
"prettier-plugin-packagejson": "^2.5.
|
|
188
|
-
"react": "^19.1.
|
|
189
|
-
"react-dom": "^19.1.
|
|
190
|
-
"react-is": "^19.1.
|
|
186
|
+
"postcss-preset-env": "^10.2.4",
|
|
187
|
+
"prettier": "^3.6.2",
|
|
188
|
+
"prettier-plugin-packagejson": "^2.5.19",
|
|
189
|
+
"react": "^19.1.1",
|
|
190
|
+
"react-dom": "^19.1.1",
|
|
191
|
+
"react-is": "^19.1.1",
|
|
191
192
|
"refractor": "^5.0.0",
|
|
192
193
|
"rimraf": "^5.0.10",
|
|
193
194
|
"semantic-release": "24.2.7",
|
|
194
|
-
"start-server-and-test": "^2.0.
|
|
195
|
-
"styled-components": "^6.1.
|
|
195
|
+
"start-server-and-test": "^2.0.12",
|
|
196
|
+
"styled-components": "^6.1.19",
|
|
196
197
|
"tsconfig-paths": "^4.2.0",
|
|
197
198
|
"typescript": "5.8.3",
|
|
198
199
|
"typescript-eslint": "^8.38.0",
|
|
199
200
|
"vite": "^6.3.5",
|
|
200
201
|
"vite-tsconfig-paths": "^5.1.4",
|
|
201
|
-
"vitest": "^3.2.
|
|
202
|
+
"vitest": "^3.2.4",
|
|
202
203
|
"vitest-axe": "1.0.0-pre.5"
|
|
203
204
|
},
|
|
204
205
|
"peerDependencies": {
|
|
@@ -206,7 +207,7 @@
|
|
|
206
207
|
"react-dom": "^19",
|
|
207
208
|
"react-is": "^19"
|
|
208
209
|
},
|
|
209
|
-
"packageManager": "pnpm@10.
|
|
210
|
+
"packageManager": "pnpm@10.13.1",
|
|
210
211
|
"engines": {
|
|
211
212
|
"node": ">=20.19"
|
|
212
213
|
},
|
|
@@ -226,6 +227,9 @@
|
|
|
226
227
|
"react": "$react",
|
|
227
228
|
"react-dom": "$react-dom",
|
|
228
229
|
"react-is": "$react-is"
|
|
230
|
+
},
|
|
231
|
+
"patchedDependencies": {
|
|
232
|
+
"@vanilla-extract/rollup-plugin": "patches/@vanilla-extract__rollup-plugin.patch"
|
|
229
233
|
}
|
|
230
234
|
},
|
|
231
235
|
"esm.sh": {
|
|
@@ -137,11 +137,15 @@ export const image: string = _style(layers.primitives, {
|
|
|
137
137
|
})
|
|
138
138
|
|
|
139
139
|
globalStyle(`${image} img`, {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
140
|
+
'@layer': {
|
|
141
|
+
[layers.primitives]: {
|
|
142
|
+
display: 'block',
|
|
143
|
+
width: '100%',
|
|
144
|
+
height: '100%',
|
|
145
|
+
objectFit: 'cover',
|
|
146
|
+
borderRadius: 'inherit',
|
|
147
|
+
},
|
|
148
|
+
},
|
|
145
149
|
})
|
|
146
150
|
|
|
147
151
|
export const imageOutline: string = _style(layers.primitives, {
|