@sanity/ui 3.0.0-static.4 → 3.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/_chunks-cjs/_visual-editing.js +81 -31
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +82 -32
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +14 -11
- package/dist/_visual-editing.d.ts +14 -11
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +144 -852
- package/dist/css.d.ts +144 -852
- package/dist/css.js +155 -141
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +154 -141
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -6
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +1 -1
- package/dist/system.css +54 -49
- package/dist/theme.js +271 -33
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +252 -16
- package/dist/theme.mjs.map +1 -1
- package/package.json +2 -2
- package/src/css/aspects/flex/flexJustify.style.ts +3 -3
- package/src/css/aspects/grid/types.ts +2 -2
- package/src/css/index.ts +2 -2
- package/src/css/primitives/_input/__workshop__/index.ts +1 -1
- package/src/css/primitives/button/button.style.ts +6 -4
- package/src/css/primitives/stack/index.ts +1 -0
- package/src/css/primitives/stack/stack.style.ts +9 -0
- package/src/css/primitives/stack/stack.ts +6 -0
- package/src/css/system.style.ts +2 -0
- package/src/theme/v3/defaults.ts +1 -1
- package/src/ui/components/autocomplete/__workshop__/index.ts +1 -1
- package/src/ui/components/dialog/dialog.tsx +3 -4
- package/src/ui/constants.ts +6 -0
- package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -2
- package/src/ui/primitives/box/box.tsx +6 -0
- package/src/ui/primitives/button/button.tsx +11 -10
- package/src/ui/primitives/code/code.tsx +1 -1
- package/src/ui/primitives/popover/popover.tsx +5 -75
- package/src/ui/primitives/stack/stack.tsx +10 -5
- package/src/ui/primitives/textInput/textInput.tsx +1 -1
- package/src/ui/primitives/tooltip/tooltip.tsx +2 -3
- package/dist/_chunks-cjs/v3_v2.js +0 -251
- package/dist/_chunks-cjs/v3_v2.js.map +0 -1
- package/dist/_chunks-es/v3_v2.mjs +0 -252
- package/dist/_chunks-es/v3_v2.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1558,16 +1558,16 @@ export declare interface PopoverProps extends CardProps, LayerProps {
|
|
|
1558
1558
|
ref: ForwardedRef<HTMLElement>
|
|
1559
1559
|
}>
|
|
1560
1560
|
/**
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1561
|
+
* When `true`, prevent overflow within the current boundary:
|
|
1562
|
+
* - by flipping on its side axis
|
|
1563
|
+
* - by resizing
|
|
1564
|
+
*
|
|
1565
|
+
* Note that:
|
|
1566
|
+
* - setting `preventOverflow` to `true` also prevents overflow on its side axis
|
|
1567
|
+
* - setting `matchReferenceWidth` to `true` also causes the popover to resize
|
|
1568
|
+
*
|
|
1569
|
+
* @defaultValue false
|
|
1570
|
+
*/
|
|
1571
1571
|
constrainSize?: boolean
|
|
1572
1572
|
content?: ReactNode
|
|
1573
1573
|
disabled?: boolean
|
|
@@ -1992,7 +1992,10 @@ export declare const Stack: ForwardRefExoticComponent<
|
|
|
1992
1992
|
* @public
|
|
1993
1993
|
*/
|
|
1994
1994
|
export declare interface StackProps
|
|
1995
|
-
extends Omit<
|
|
1995
|
+
extends Omit<
|
|
1996
|
+
BoxProps,
|
|
1997
|
+
'align' | 'columns' | 'direction' | 'display' | 'gapX' | 'gapY' | 'justify'
|
|
1998
|
+
> {
|
|
1996
1999
|
/** @deprecated Use `gap` instead. */
|
|
1997
2000
|
space?: ResponsiveProp<Space>
|
|
1998
2001
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1558,16 +1558,16 @@ export declare interface PopoverProps extends CardProps, LayerProps {
|
|
|
1558
1558
|
ref: ForwardedRef<HTMLElement>
|
|
1559
1559
|
}>
|
|
1560
1560
|
/**
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1561
|
+
* When `true`, prevent overflow within the current boundary:
|
|
1562
|
+
* - by flipping on its side axis
|
|
1563
|
+
* - by resizing
|
|
1564
|
+
*
|
|
1565
|
+
* Note that:
|
|
1566
|
+
* - setting `preventOverflow` to `true` also prevents overflow on its side axis
|
|
1567
|
+
* - setting `matchReferenceWidth` to `true` also causes the popover to resize
|
|
1568
|
+
*
|
|
1569
|
+
* @defaultValue false
|
|
1570
|
+
*/
|
|
1571
1571
|
constrainSize?: boolean
|
|
1572
1572
|
content?: ReactNode
|
|
1573
1573
|
disabled?: boolean
|
|
@@ -1992,7 +1992,10 @@ export declare const Stack: ForwardRefExoticComponent<
|
|
|
1992
1992
|
* @public
|
|
1993
1993
|
*/
|
|
1994
1994
|
export declare interface StackProps
|
|
1995
|
-
extends Omit<
|
|
1995
|
+
extends Omit<
|
|
1996
|
+
BoxProps,
|
|
1997
|
+
'align' | 'columns' | 'direction' | 'display' | 'gapX' | 'gapY' | 'justify'
|
|
1998
|
+
> {
|
|
1996
1999
|
/** @deprecated Use `gap` instead. */
|
|
1997
2000
|
space?: ResponsiveProp<Space>
|
|
1998
2001
|
}
|
package/dist/index.js
CHANGED
|
@@ -514,9 +514,7 @@ const DialogCard = react.forwardRef(function(props, forwardedRef) {
|
|
|
514
514
|
});
|
|
515
515
|
DialogCard.displayName = "ForwardRef(DialogCard)";
|
|
516
516
|
const Dialog = react.forwardRef(function(props, ref) {
|
|
517
|
-
const $ = reactCompilerRuntime.c(66), context = useDialog()
|
|
518
|
-
layer
|
|
519
|
-
} = _visualEditing.useTheme_v2();
|
|
517
|
+
const $ = reactCompilerRuntime.c(66), context = useDialog();
|
|
520
518
|
let _positionProp, _zOffsetProp, cardShadow, children, className, contentRef, footer, header, id, onActivate, onClickOutside, onClose, onFocus, portalProp, restProps, scheme, t0, t1, t2, t3, t4, t5, tone;
|
|
521
519
|
$[0] !== props ? ({
|
|
522
520
|
__unstable_autoFocus: t0,
|
|
@@ -543,7 +541,7 @@ const Dialog = react.forwardRef(function(props, ref) {
|
|
|
543
541
|
tone,
|
|
544
542
|
...restProps
|
|
545
543
|
} = props, $[0] = props, $[1] = _positionProp, $[2] = _zOffsetProp, $[3] = cardShadow, $[4] = children, $[5] = className, $[6] = contentRef, $[7] = footer, $[8] = header, $[9] = id, $[10] = onActivate, $[11] = onClickOutside, $[12] = onClose, $[13] = onFocus, $[14] = portalProp, $[15] = restProps, $[16] = scheme, $[17] = t0, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4, $[22] = t5, $[23] = tone) : (_positionProp = $[1], _zOffsetProp = $[2], cardShadow = $[3], children = $[4], className = $[5], contentRef = $[6], footer = $[7], header = $[8], id = $[9], onActivate = $[10], onClickOutside = $[11], onClose = $[12], onFocus = $[13], portalProp = $[14], restProps = $[15], scheme = $[16], t0 = $[17], t1 = $[18], t2 = $[19], t3 = $[20], t4 = $[21], t5 = $[22], tone = $[23]);
|
|
546
|
-
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, _animate = t2 === void 0 ? !1 : t2, cardRadiusProp = t3 === void 0 ? 4 : t3, padding = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, positionProp = _positionProp ??
|
|
544
|
+
const autoFocus = t0 === void 0 ? !0 : t0, hideCloseButton = t1 === void 0 ? !1 : t1, _animate = t2 === void 0 ? !1 : t2, cardRadiusProp = t3 === void 0 ? 4 : t3, padding = t4 === void 0 ? 3 : t4, widthProp = t5 === void 0 ? 0 : t5, positionProp = _positionProp ?? context.position ?? "fixed", zOffsetProp = _zOffsetProp ?? context.zOffset ?? _visualEditing.Z_OFFSETS.dialog, animate = _visualEditing.usePrefersReducedMotion() ? !1 : _animate, portal = _visualEditing.usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = _visualEditing.useBoundaryElement().element, cardRadius = _visualEditing.useArrayProp(cardRadiusProp), position = _visualEditing.useArrayProp(positionProp), width = _visualEditing.useArrayProp(widthProp), zOffset = _visualEditing.useArrayProp(zOffsetProp), preDivRef = react.useRef(null), postDivRef = react.useRef(null), cardRef = react.useRef(null), focusedElementRef = react.useRef(null);
|
|
547
545
|
let t6;
|
|
548
546
|
$[24] !== onFocus ? (t6 = (event) => {
|
|
549
547
|
onFocus?.(event);
|