@sanity/ui 3.0.0-static.27 → 3.0.0-static.29
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 +5 -8
- package/dist/_chunks-cjs/_visual-editing.cjs +744 -874
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/refractor.cjs +2 -2
- package/dist/_chunks-cjs/refractor.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +788 -917
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/refractor.js +1 -1
- package/dist/{css.cjs → css/index.cjs} +72 -53
- package/dist/css/index.cjs.map +1 -0
- package/dist/css/index.css +1 -0
- package/dist/{css.d.ts → css/index.d.cts} +26 -8
- package/dist/{css.d.cts → css/index.d.ts} +26 -8
- package/dist/{css.js → css/index.js} +72 -53
- package/dist/css/index.js.map +1 -0
- package/dist/css/layers.css +4 -0
- package/dist/css/primitives/popover/popover.css +4 -0
- package/dist/index.cjs +2049 -1811
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +62 -26
- package/dist/index.d.ts +62 -26
- package/dist/index.js +2056 -1819
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs +7 -7
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.js +7 -7
- package/dist/theme.js.map +1 -1
- package/exports/_visual-editing.ts +1 -1
- package/package.json +14 -19
- package/src/core/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/core/components/autocomplete/__workshop__/fullscreen.tsx +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +15 -19
- package/src/core/components/autocomplete/autocompleteOption.tsx +1 -1
- package/src/core/components/autocomplete/constants.ts +3 -1
- package/src/core/components/autocomplete/types.ts +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +8 -3
- package/src/core/components/dialog/__workshop__/activate.tsx +11 -3
- package/src/core/components/dialog/__workshop__/panes.tsx +12 -5
- package/src/core/components/dialog/dialog.tsx +12 -6
- package/src/core/components/dialog/dialogCard.tsx +89 -54
- package/src/core/components/dialog/dialogContext.ts +1 -1
- package/src/core/components/dialog/dialogProvider.tsx +1 -1
- package/src/core/components/dialog/index.ts +1 -0
- package/src/core/components/dialog/isTargetWithinScope.ts +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +3 -2
- package/src/core/components/menu/__workshop__/avatarMenu.tsx +12 -6
- package/src/core/components/menu/__workshop__/customSelectedState.tsx +1 -5
- package/src/core/components/menu/__workshop__/shouldFocus.tsx +1 -2
- package/src/core/components/menu/helpers.ts +1 -1
- package/src/core/components/menu/menu.tsx +6 -3
- package/src/core/components/menu/menuButton.tsx +5 -3
- package/src/core/components/menu/menuDivider.tsx +1 -1
- package/src/core/components/menu/menuGroup.tsx +8 -4
- package/src/core/components/menu/menuItem.tsx +4 -2
- package/src/core/components/tab/tab.tsx +2 -2
- package/src/core/components/tab/tabList.tsx +2 -2
- package/src/core/components/tab/tabPanel.tsx +2 -2
- package/src/core/components/toast/toast.tsx +21 -17
- package/src/core/components/toast/toastLayer.tsx +3 -2
- package/src/core/components/toast/toastProvider.tsx +15 -11
- package/src/core/components/tree/tree.tsx +2 -2
- package/src/core/components/tree/treeGroup.tsx +2 -2
- package/src/core/components/tree/treeItem.tsx +13 -6
- package/src/core/components/tree/types.ts +0 -1
- package/src/core/components/virtualList/virtualList.tsx +10 -5
- package/src/core/helpers/focus.ts +0 -8
- package/src/core/hooks/useArrayProp.ts +1 -1
- package/src/core/hooks/useElementRect/__workshop__/example.tsx +1 -3
- package/src/core/hooks/useElementSize.ts +1 -1
- package/src/core/hooks/useResponsiveProp.ts +1 -1
- package/src/core/index.ts +84 -7
- package/src/core/observers/{elementSizeObserver.ts → elementSize.ts} +1 -1
- package/src/core/primitives/_selectable/index.ts +1 -0
- package/src/core/primitives/_selectable/selectable.tsx +13 -3
- package/src/core/{types/selectable.ts → primitives/_selectable/types.ts} +1 -1
- package/src/core/primitives/arrow/arrow.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +4 -3
- package/src/core/primitives/avatar/avatarCounter.tsx +3 -3
- package/src/core/primitives/avatar/avatarStack.tsx +4 -4
- package/src/core/primitives/avatar/types.ts +17 -0
- package/src/core/primitives/badge/badge.tsx +2 -1
- package/src/core/primitives/badge/types.ts +11 -2
- package/src/core/primitives/box/__workshop__/responsive.tsx +0 -1
- package/src/core/primitives/box/box.tsx +1 -1
- package/src/core/primitives/box/index.ts +1 -0
- package/src/core/primitives/button/__workshop__/disabled.tsx +37 -51
- package/src/core/primitives/button/__workshop__/index.ts +5 -0
- package/src/core/primitives/button/__workshop__/textOverflow.tsx +13 -0
- package/src/core/primitives/button/button.tsx +15 -14
- package/src/core/primitives/button/index.ts +1 -0
- package/src/core/primitives/card/__workshop__/listNavigation.tsx +2 -2
- package/src/core/primitives/card/card.tsx +1 -1
- package/src/core/primitives/card/types.ts +3 -0
- package/src/core/primitives/checkbox/__workshop__/tones.tsx +9 -1
- package/src/core/primitives/checkbox/checkbox.tsx +3 -4
- package/src/core/primitives/code/__workshop__/opticalAlignment.tsx +17 -42
- package/src/core/primitives/code/code.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/flex/index.ts +1 -0
- package/src/core/primitives/grid/grid.tsx +1 -1
- package/src/core/primitives/grid/index.ts +1 -0
- package/src/core/primitives/heading/heading.tsx +1 -1
- package/src/core/primitives/inline/inline.tsx +1 -1
- package/src/core/primitives/kbd/kbd.tsx +1 -1
- package/src/core/primitives/label/label.tsx +1 -1
- package/src/core/primitives/layer/layer.test.tsx +1 -1
- package/src/core/primitives/layer/layer.tsx +2 -2
- package/src/core/primitives/layer/layerCard.tsx +3 -3
- package/src/core/primitives/layer/layerProvider.tsx +2 -1
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +12 -10
- package/src/core/primitives/popover/__workshop__/TestStory.tsx +9 -8
- package/src/core/primitives/popover/constants.ts +1 -1
- package/src/core/primitives/popover/floating-ui/size.ts +1 -1
- package/src/core/primitives/popover/popover.tsx +7 -4
- package/src/core/primitives/popover/popoverLayer.tsx +2 -1
- package/src/core/primitives/popover/types.ts +5 -0
- package/src/core/primitives/radio/radio.tsx +2 -2
- package/src/core/primitives/root/Root.tsx +89 -0
- package/src/core/primitives/root/__workshop__/boundary.tsx +5 -0
- package/src/core/primitives/root/__workshop__/index.ts +8 -0
- package/src/core/primitives/root/index.ts +1 -0
- package/src/core/primitives/select/select.tsx +2 -2
- package/src/core/{components → primitives}/skeleton/__workshop__/index.ts +1 -1
- package/src/core/{components → primitives}/skeleton/codeSkeleton.tsx +1 -1
- package/src/core/{components → primitives}/skeleton/headingSkeleton.tsx +1 -1
- package/src/core/{components → primitives}/skeleton/labelSkeleton.tsx +1 -1
- package/src/core/{components → primitives}/skeleton/skeleton.tsx +7 -8
- package/src/core/{components → primitives}/skeleton/textSkeleton.tsx +1 -1
- package/src/core/primitives/spinner/spinner.tsx +1 -1
- package/src/core/primitives/srOnly/srOnly.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +1 -1
- package/src/core/primitives/switch/switch.tsx +1 -6
- package/src/core/primitives/text/__workshop__/colored.tsx +2 -2
- package/src/core/primitives/text/__workshop__/opticalAlignment.tsx +17 -42
- package/src/core/primitives/text/text.tsx +3 -1
- package/src/core/primitives/textArea/__workshop__/plain.tsx +2 -2
- package/src/core/primitives/textArea/textArea.tsx +2 -2
- package/src/core/primitives/textInput/textInput.tsx +3 -2
- package/src/core/primitives/tooltip/constants.ts +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +5 -3
- package/src/core/primitives/tooltip/tooltipLayer.tsx +1 -1
- package/src/core/primitives/types.ts +8 -10
- package/src/core/types/radius.ts +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +9 -5
- package/src/core/utils/elementQuery/elementQuery.tsx +2 -2
- package/src/core/utils/portal/portal.tsx +1 -1
- package/src/css/components/dialog/dialog.css.ts +26 -1
- package/src/css/components/dialog/dialog.ts +27 -7
- package/src/css/components/skeleton/skeleton.ts +3 -1
- package/src/css/components/skeleton/types.ts +3 -1
- package/src/css/components/toast/toast.css.ts +1 -0
- package/src/css/defaultTheme.css.ts +55 -2
- package/src/css/index.ts +77 -5
- package/src/css/primitives/_input/input.ts +2 -1
- package/src/css/primitives/_input/types.ts +2 -1
- package/src/css/primitives/_selectable/_selectable.css.ts +32 -24
- package/src/css/primitives/_selectable/selectable.ts +1 -1
- package/src/css/primitives/_selectable/types.ts +1 -1
- package/src/css/primitives/avatar/avatar.css.ts +8 -4
- package/src/css/primitives/avatar/avatar.ts +1 -1
- package/src/css/primitives/badge/types.ts +0 -2
- package/src/css/primitives/box/box.ts +35 -37
- package/src/css/primitives/box/types.ts +34 -36
- package/src/css/primitives/button/button.css.ts +4 -0
- package/src/css/primitives/button/button.ts +5 -2
- package/src/css/primitives/button/types.ts +4 -11
- package/src/css/primitives/card/__workshop__/color.tsx +70 -0
- package/src/css/primitives/card/__workshop__/index.ts +14 -0
- package/src/css/primitives/card/card.css.ts +4 -0
- package/src/css/primitives/code/code.ts +3 -1
- package/src/css/primitives/code/types.ts +2 -1
- package/src/css/primitives/container/container.ts +3 -1
- package/src/css/primitives/heading/heading.ts +4 -1
- package/src/css/primitives/heading/types.ts +3 -1
- 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 -1
- package/src/css/primitives/label/types.ts +3 -1
- package/src/css/primitives/root/index.ts +2 -0
- package/src/css/primitives/root/root.css.ts +15 -0
- package/src/css/primitives/root/root.ts +17 -0
- package/src/css/primitives/root/types.ts +10 -0
- package/src/css/primitives/switch/switch.css.ts +1 -1
- package/src/css/primitives/text/text.ts +6 -1
- package/src/css/primitives/text/types.ts +5 -2
- package/src/theme/v3/defaultFonts.ts +6 -6
- package/src/theme/v3/defaultTokens.ts +1 -1
- package/bin/sanity-ui.cjs +0 -5
- package/dist/css.cjs.map +0 -1
- package/dist/css.js.map +0 -1
- package/dist/ui.css +0 -1
- package/src/cli/buildCommand.ts +0 -10
- package/src/cli/index.ts +0 -26
- package/src/core/components/autocomplete/index.ts +0 -2
- package/src/core/components/index.ts +0 -10
- package/src/core/helpers/index.ts +0 -5
- package/src/core/hooks/index.ts +0 -13
- package/src/core/observers/index.ts +0 -2
- package/src/core/primitives/index.ts +0 -30
- package/src/core/types/avatar.ts +0 -16
- package/src/core/types/card.ts +0 -4
- package/src/core/types/index.ts +0 -15
- package/src/core/types/popover.ts +0 -4
- package/src/core/utils/index.ts +0 -4
- package/src/css/__theme/index.ts +0 -16
- package/src/css/__theme/lib/contract/buildVarContract.ts +0 -78
- package/src/css/__theme/lib/contract/index.ts +0 -4
- package/src/css/__theme/lib/contract/types.ts +0 -17
- package/src/css/__theme/resolveTheme.ts +0 -865
- package/src/css/components/index.ts +0 -6
- package/src/css/primitives/index.ts +0 -24
- package/src/css/props/index.ts +0 -37
- package/src/css/utils/srOnly/index.ts +0 -1
- /package/src/core/{global.ts → __DEV__.ts} +0 -0
- /package/src/core/{types/dialog.ts → components/dialog/types.ts} +0 -0
- /package/src/core/observers/{resizeObserver.ts → resize.ts} +0 -0
- /package/src/core/{types/badge.ts → primitives/badge/types2.ts} +0 -0
- /package/src/core/{types/box.ts → primitives/box/types.ts} +0 -0
- /package/src/core/{types/button.ts → primitives/button/types.ts} +0 -0
- /package/src/core/{types/flex.ts → primitives/flex/types.ts} +0 -0
- /package/src/core/{types/grid.ts → primitives/grid/types.ts} +0 -0
- /package/src/core/{components → primitives}/skeleton/__workshop__/delay.tsx +0 -0
- /package/src/core/{components → primitives}/skeleton/__workshop__/skeleton.tsx +0 -0
- /package/src/core/{components → primitives}/skeleton/index.ts +0 -0
- /package/src/core/types/{text.ts → textAlign.ts} +0 -0
- /package/src/css/{utils → primitives/srOnly}/index.ts +0 -0
- /package/src/css/{utils → primitives}/srOnly/srOnly.css.ts +0 -0
- /package/src/css/{utils → primitives}/srOnly/srOnly.ts +0 -0
|
@@ -201,8 +201,7 @@ export declare function buttonLoadingBox(): string
|
|
|
201
201
|
|
|
202
202
|
/** @public */
|
|
203
203
|
export declare interface ButtonStyleProps
|
|
204
|
-
extends
|
|
205
|
-
FlexStyleProps,
|
|
204
|
+
extends FlexStyleProps,
|
|
206
205
|
RadiusStyleProps,
|
|
207
206
|
WidthStyleProps {
|
|
208
207
|
className?: string
|
|
@@ -489,9 +488,6 @@ export declare type _CSSThemeWithoutPalette = Omit<CSSTheme, '@layer' | 'color'>
|
|
|
489
488
|
color: Omit<CSSThemeColor, 'palette'>
|
|
490
489
|
}
|
|
491
490
|
|
|
492
|
-
/** @public */
|
|
493
|
-
export declare const defaultTheme: string
|
|
494
|
-
|
|
495
491
|
/** @public */
|
|
496
492
|
export declare function dialog(props: {className?: string}): string | undefined
|
|
497
493
|
|
|
@@ -511,7 +507,13 @@ export declare function dialogFooter(): string | undefined
|
|
|
511
507
|
export declare function dialogHeader(): string | undefined
|
|
512
508
|
|
|
513
509
|
/** @public */
|
|
514
|
-
export declare function
|
|
510
|
+
export declare function dialogScroller(): string | undefined
|
|
511
|
+
|
|
512
|
+
/** @public */
|
|
513
|
+
export declare function dialogScrollerShadowBottom(): string | undefined
|
|
514
|
+
|
|
515
|
+
/** @public */
|
|
516
|
+
export declare function dialogScrollerShadowTop(): string | undefined
|
|
515
517
|
|
|
516
518
|
/** @public */
|
|
517
519
|
export declare type Display =
|
|
@@ -1215,6 +1217,16 @@ export declare type ResponsiveRuleOptions<K extends string | number> = Record<K,
|
|
|
1215
1217
|
/** @public */
|
|
1216
1218
|
export declare type ResponsiveRules = Record<Breakpoint, string>
|
|
1217
1219
|
|
|
1220
|
+
/** @public */
|
|
1221
|
+
export declare function root(props: RootStyleProps): string | undefined
|
|
1222
|
+
|
|
1223
|
+
/** @public */
|
|
1224
|
+
export declare interface RootStyleProps extends HeightStyleProps {
|
|
1225
|
+
className?: string
|
|
1226
|
+
scheme?: ThemeColorSchemeKey
|
|
1227
|
+
tone?: ThemeColorCardToneKey
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1218
1230
|
/**
|
|
1219
1231
|
* @public
|
|
1220
1232
|
* @deprecated Use `GridTemplateRows` instead
|
|
@@ -1251,7 +1263,10 @@ export declare interface ShadowStyleProps {
|
|
|
1251
1263
|
export declare function skeleton(props: SkeletonStyleProps): string | undefined
|
|
1252
1264
|
|
|
1253
1265
|
/** @beta */
|
|
1254
|
-
export declare interface SkeletonStyleProps
|
|
1266
|
+
export declare interface SkeletonStyleProps
|
|
1267
|
+
extends FlexStyleProps,
|
|
1268
|
+
MarginStyleProps,
|
|
1269
|
+
RadiusStyleProps {
|
|
1255
1270
|
className?: string
|
|
1256
1271
|
}
|
|
1257
1272
|
|
|
@@ -1352,7 +1367,7 @@ export declare interface TextSkeletonStyleProps {
|
|
|
1352
1367
|
}
|
|
1353
1368
|
|
|
1354
1369
|
/** @public */
|
|
1355
|
-
export declare interface TextStyleProps extends FlexStyleProps, FontStyleProps {
|
|
1370
|
+
export declare interface TextStyleProps extends FlexStyleProps, FontStyleProps, MaxWidthStyleProps {
|
|
1356
1371
|
/**
|
|
1357
1372
|
* @deprecated Will be removed in next major version
|
|
1358
1373
|
*/
|
|
@@ -1363,6 +1378,9 @@ export declare interface TextStyleProps extends FlexStyleProps, FontStyleProps {
|
|
|
1363
1378
|
size?: ResponsiveProp<TextSize>
|
|
1364
1379
|
}
|
|
1365
1380
|
|
|
1381
|
+
/** @public */
|
|
1382
|
+
export declare const themeClassName: string
|
|
1383
|
+
|
|
1366
1384
|
/**
|
|
1367
1385
|
* Variables to be defined in a theme.
|
|
1368
1386
|
*
|
|
@@ -201,8 +201,7 @@ export declare function buttonLoadingBox(): string
|
|
|
201
201
|
|
|
202
202
|
/** @public */
|
|
203
203
|
export declare interface ButtonStyleProps
|
|
204
|
-
extends
|
|
205
|
-
FlexStyleProps,
|
|
204
|
+
extends FlexStyleProps,
|
|
206
205
|
RadiusStyleProps,
|
|
207
206
|
WidthStyleProps {
|
|
208
207
|
className?: string
|
|
@@ -489,9 +488,6 @@ export declare type _CSSThemeWithoutPalette = Omit<CSSTheme, '@layer' | 'color'>
|
|
|
489
488
|
color: Omit<CSSThemeColor, 'palette'>
|
|
490
489
|
}
|
|
491
490
|
|
|
492
|
-
/** @public */
|
|
493
|
-
export declare const defaultTheme: string
|
|
494
|
-
|
|
495
491
|
/** @public */
|
|
496
492
|
export declare function dialog(props: {className?: string}): string | undefined
|
|
497
493
|
|
|
@@ -511,7 +507,13 @@ export declare function dialogFooter(): string | undefined
|
|
|
511
507
|
export declare function dialogHeader(): string | undefined
|
|
512
508
|
|
|
513
509
|
/** @public */
|
|
514
|
-
export declare function
|
|
510
|
+
export declare function dialogScroller(): string | undefined
|
|
511
|
+
|
|
512
|
+
/** @public */
|
|
513
|
+
export declare function dialogScrollerShadowBottom(): string | undefined
|
|
514
|
+
|
|
515
|
+
/** @public */
|
|
516
|
+
export declare function dialogScrollerShadowTop(): string | undefined
|
|
515
517
|
|
|
516
518
|
/** @public */
|
|
517
519
|
export declare type Display =
|
|
@@ -1215,6 +1217,16 @@ export declare type ResponsiveRuleOptions<K extends string | number> = Record<K,
|
|
|
1215
1217
|
/** @public */
|
|
1216
1218
|
export declare type ResponsiveRules = Record<Breakpoint, string>
|
|
1217
1219
|
|
|
1220
|
+
/** @public */
|
|
1221
|
+
export declare function root(props: RootStyleProps): string | undefined
|
|
1222
|
+
|
|
1223
|
+
/** @public */
|
|
1224
|
+
export declare interface RootStyleProps extends HeightStyleProps {
|
|
1225
|
+
className?: string
|
|
1226
|
+
scheme?: ThemeColorSchemeKey
|
|
1227
|
+
tone?: ThemeColorCardToneKey
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1218
1230
|
/**
|
|
1219
1231
|
* @public
|
|
1220
1232
|
* @deprecated Use `GridTemplateRows` instead
|
|
@@ -1251,7 +1263,10 @@ export declare interface ShadowStyleProps {
|
|
|
1251
1263
|
export declare function skeleton(props: SkeletonStyleProps): string | undefined
|
|
1252
1264
|
|
|
1253
1265
|
/** @beta */
|
|
1254
|
-
export declare interface SkeletonStyleProps
|
|
1266
|
+
export declare interface SkeletonStyleProps
|
|
1267
|
+
extends FlexStyleProps,
|
|
1268
|
+
MarginStyleProps,
|
|
1269
|
+
RadiusStyleProps {
|
|
1255
1270
|
className?: string
|
|
1256
1271
|
}
|
|
1257
1272
|
|
|
@@ -1352,7 +1367,7 @@ export declare interface TextSkeletonStyleProps {
|
|
|
1352
1367
|
}
|
|
1353
1368
|
|
|
1354
1369
|
/** @public */
|
|
1355
|
-
export declare interface TextStyleProps extends FlexStyleProps, FontStyleProps {
|
|
1370
|
+
export declare interface TextStyleProps extends FlexStyleProps, FontStyleProps, MaxWidthStyleProps {
|
|
1356
1371
|
/**
|
|
1357
1372
|
* @deprecated Will be removed in next major version
|
|
1358
1373
|
*/
|
|
@@ -1363,6 +1378,9 @@ export declare interface TextStyleProps extends FlexStyleProps, FontStyleProps {
|
|
|
1363
1378
|
size?: ResponsiveProp<TextSize>
|
|
1364
1379
|
}
|
|
1365
1380
|
|
|
1381
|
+
/** @public */
|
|
1382
|
+
export declare const themeClassName: string
|
|
1383
|
+
|
|
1366
1384
|
/**
|
|
1367
1385
|
* Variables to be defined in a theme.
|
|
1368
1386
|
*
|