@sanity/ui 4.0.0-static.2 → 4.0.0-static.21
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 +2 -1
- package/dist/css/index.css.map +1 -0
- package/dist/css/index.d.ts +29 -1
- package/dist/css/index.js +17965 -50
- package/dist/css/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +14 -16
- package/dist/index.js.map +1 -1
- package/package.json +38 -48
- package/src/core/components/autocomplete/__workshop__/custom.tsx +14 -1
- package/src/core/components/autocomplete/__workshop__/example.tsx +12 -1
- package/src/core/components/dialog/__workshop__/position.tsx +9 -1
- package/src/core/components/dialog/__workshop__/props.tsx +2 -0
- package/src/core/components/menu/__workshop__/menuButton.tsx +6 -1
- package/src/core/components/menu/__workshop__/tones.tsx +7 -1
- package/src/core/components/menu/menu.tsx +1 -1
- package/src/core/components/menu/menuButton.tsx +10 -5
- package/src/core/components/menu/menuContext.ts +1 -1
- package/src/core/components/menu/menuGroup.tsx +7 -4
- package/src/core/components/menu/menuItem.tsx +1 -1
- package/src/core/components/toast/__workshop__/toast.tsx +2 -0
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +8 -1
- package/src/core/primitives/avatar/__workshop__/stack.tsx +5 -1
- package/src/core/primitives/badge/__workshop__/props.tsx +12 -1
- package/src/core/primitives/box/__workshop__/props.tsx +6 -1
- package/src/core/primitives/button/__workshop__/props.tsx +22 -0
- package/src/core/primitives/button/__workshop__/stacked.tsx +16 -0
- package/src/core/primitives/card/__workshop__/props.tsx +10 -0
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/card.tsx +2 -2
- package/src/core/primitives/code/__workshop__/props.tsx +6 -1
- package/src/core/primitives/container/__workshop__/example.tsx +6 -1
- package/src/core/primitives/flex/__workshop__/example.tsx +7 -1
- package/src/core/primitives/heading/__workshop__/plain.tsx +12 -1
- package/src/core/primitives/inline/__workshop__/plain.tsx +5 -1
- package/src/core/primitives/label/__workshop__/plain.tsx +15 -1
- package/src/core/primitives/popover/__workshop__/AlignedStory.tsx +13 -1
- package/src/core/primitives/popover/__workshop__/MatchReferenceWidthStory.tsx +2 -0
- package/src/core/primitives/popover/__workshop__/PlainStory.tsx +8 -0
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +7 -1
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +6 -0
- package/src/core/primitives/popover/popover.tsx +0 -1
- package/src/core/primitives/select/__workshop__/plain.tsx +4 -0
- package/src/core/primitives/skeleton/__workshop__/delay.tsx +9 -1
- package/src/core/primitives/skeleton/__workshop__/skeleton.tsx +9 -1
- package/src/core/primitives/spinner/__workshop__/Props.tsx +6 -1
- package/src/core/primitives/stack/__workshop__/plain.tsx +4 -1
- package/src/core/primitives/text/__workshop__/colored.tsx +8 -1
- package/src/core/primitives/text/__workshop__/example.tsx +15 -1
- package/src/core/primitives/textArea/__workshop__/plain.tsx +8 -0
- package/src/core/primitives/textInput/__workshop__/plain.tsx +34 -4
- package/src/core/primitives/textInput/__workshop__/typed.tsx +7 -1
- package/src/core/primitives/textInput/textInput.tsx +1 -1
- package/src/core/primitives/tooltip/__workshop__/customPortal.tsx +2 -0
- package/src/core/primitives/tooltip/__workshop__/overflowingBoundary.tsx +2 -0
- package/src/core/primitives/tooltip/__workshop__/props.tsx +12 -0
- package/src/core/primitives/tooltip/__workshop__/resizableBoundary.tsx +5 -0
- package/src/css/primitives/avatar/avatar.css.ts +9 -5
- package/src/css/primitives/card/__workshop__/color.tsx +9 -1
- package/src/css/primitives/card/card.css.ts +10 -0
- package/src/css/theme/buildCSSTheme.ts +4 -0
- package/src/css/types.ts +4 -0
- package/src/css/vars.css.ts +4 -0
- package/dist/_chunks-cjs/refractor.cjs +0 -22
- package/dist/_chunks-cjs/refractor.cjs.map +0 -1
- package/dist/css/index.cjs +0 -966
- package/dist/css/index.cjs.map +0 -1
- package/dist/css/index.d.cts +0 -1370
- package/dist/index.cjs +0 -4515
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -2521
- package/dist/theme.cjs +0 -870
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -499
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'
|
|
@@ -293,6 +292,10 @@ export declare type CoreThemeTokens = {
|
|
|
293
292
|
border: {
|
|
294
293
|
width: string
|
|
295
294
|
}
|
|
295
|
+
focusRing: {
|
|
296
|
+
offset: string
|
|
297
|
+
width: string
|
|
298
|
+
}
|
|
296
299
|
shadow: {
|
|
297
300
|
outline: string
|
|
298
301
|
}
|
|
@@ -360,6 +363,10 @@ export declare type CoreThemeTokens = {
|
|
|
360
363
|
space: Record<Space, string>
|
|
361
364
|
}
|
|
362
365
|
|
|
366
|
+
declare function createThemeContract<ThemeTokens extends NullableTokens_2>(
|
|
367
|
+
tokens: ThemeTokens,
|
|
368
|
+
): ThemeVars_2<ThemeTokens>
|
|
369
|
+
|
|
363
370
|
/** @public */
|
|
364
371
|
export declare type CSSCardColorTokens = {
|
|
365
372
|
avatar: Record<
|
|
@@ -440,6 +447,8 @@ export declare type CSSThemeOptions = {
|
|
|
440
447
|
/** @public */
|
|
441
448
|
export declare type CSSVarFunction = `var(${CSSVarName})`
|
|
442
449
|
|
|
450
|
+
declare type CSSVarFunction_2 = `var(--${string})`
|
|
451
|
+
|
|
443
452
|
/** @public */
|
|
444
453
|
export declare type CSSVarName = `--${string}`
|
|
445
454
|
|
|
@@ -840,6 +849,14 @@ export declare interface LabelStyleProps extends FlexStyleProps, FontStyleProps
|
|
|
840
849
|
/** @public */
|
|
841
850
|
export declare const layers: Record<CSSLayer, string>
|
|
842
851
|
|
|
852
|
+
declare type MapLeafNodes<Obj, LeafType> = {
|
|
853
|
+
[Prop in keyof Obj]: Obj[Prop] extends Primitive
|
|
854
|
+
? LeafType
|
|
855
|
+
: Obj[Prop] extends Record<string | number, any>
|
|
856
|
+
? MapLeafNodes<Obj[Prop], LeafType>
|
|
857
|
+
: never
|
|
858
|
+
}
|
|
859
|
+
|
|
843
860
|
/** @public */
|
|
844
861
|
export declare type Margin = Space | 'auto'
|
|
845
862
|
|
|
@@ -901,6 +918,10 @@ export declare type NullableTokens = {
|
|
|
901
918
|
[key: string]: string | NullableTokens
|
|
902
919
|
}
|
|
903
920
|
|
|
921
|
+
declare type NullableTokens_2 = {
|
|
922
|
+
[key: string]: string | NullableTokens_2 | null
|
|
923
|
+
}
|
|
924
|
+
|
|
904
925
|
/** @public */
|
|
905
926
|
export declare type Outline = 'none'
|
|
906
927
|
|
|
@@ -973,6 +994,8 @@ export declare interface PositionStyleProps {
|
|
|
973
994
|
position?: ResponsiveProp<Position>
|
|
974
995
|
}
|
|
975
996
|
|
|
997
|
+
declare type Primitive = string | boolean | number | null | undefined
|
|
998
|
+
|
|
976
999
|
/** @public */
|
|
977
1000
|
export declare function radio(props: {className?: string}): string | undefined
|
|
978
1001
|
|
|
@@ -1329,6 +1352,11 @@ export declare type ThemeVars = ThemeContract<ThemeTokens & ScopedTokens>
|
|
|
1329
1352
|
* @internal */
|
|
1330
1353
|
export declare const themeVars: ThemeContract<ThemeTokens>
|
|
1331
1354
|
|
|
1355
|
+
declare type ThemeVars_2<ThemeContract extends NullableTokens_2> = MapLeafNodes<
|
|
1356
|
+
ThemeContract,
|
|
1357
|
+
CSSVarFunction_2
|
|
1358
|
+
>
|
|
1359
|
+
|
|
1332
1360
|
/** @public */
|
|
1333
1361
|
export declare function toast(): string
|
|
1334
1362
|
|