@sanity/ui 3.0.0-static.30 → 3.0.0-static.32
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.cjs +62 -61
- package/dist/_chunks-cjs/_visual-editing.cjs.map +1 -1
- package/dist/_chunks-cjs/refractor.cjs.map +1 -1
- package/dist/_chunks-es/_visual-editing.js +62 -61
- package/dist/_chunks-es/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/refractor.js.map +1 -1
- package/dist/css/index.cjs +1 -3
- package/dist/css/index.cjs.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/css/index.d.cts +7228 -7228
- package/dist/css/index.d.ts +7228 -7228
- package/dist/css/index.js +1 -3
- package/dist/css/index.js.map +1 -1
- package/dist/index.cjs +91 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +93 -90
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.js.map +1 -1
- package/package.json +25 -25
- package/src/core/{primitives/root/Root.tsx → Root.tsx} +5 -3
- package/src/core/{primitives/root/RootProvider.tsx → RootProvider.tsx} +5 -5
- package/src/core/__DEV__.ts +0 -1
- package/src/core/__workshop__/boundary.tsx +28 -0
- package/src/core/__workshop__/index.ts +14 -0
- package/src/core/_compat/theme/theme.test.tsx +4 -3
- package/src/core/components/dialog/dialogCard.tsx +9 -2
- package/src/core/components/menu/menu.test.tsx +8 -7
- package/src/core/components/toast/toast.test.tsx +8 -7
- package/src/core/hooks/usePrefersDark.hydration.test.tsx +1 -1
- package/src/core/hooks/usePrefersReducedMotion.hydration.test.tsx +1 -1
- package/src/core/index.ts +4 -2
- package/src/core/lib/createGlobalScopedContext.ts +5 -2
- package/src/core/lib/globalScope.ts +1 -1
- package/src/core/primitives/card/card.tsx +4 -3
- package/src/core/primitives/card/useCard.ts +8 -2
- package/src/core/primitives/code/refractor.tsx +1 -1
- package/src/core/primitives/grid/types.ts +1 -1
- package/src/core/primitives/layer/layer.test.tsx +8 -7
- package/src/core/primitives/popover/popover.tsx +5 -33
- package/src/core/primitives/textArea/textArea.tsx +0 -2
- package/src/core/primitives/tooltip/tooltip.tsx +1 -4
- package/src/core/primitives/types.ts +11 -11
- package/src/core/types/props.ts +1 -0
- package/src/core/utils/boundaryElement/boundaryElement.test.tsx +8 -7
- package/src/core/utils/getElementRef.ts +2 -0
- package/src/core/utils/portal/portal.test.tsx +8 -7
- package/src/core/utils/portal/portal.tsx +1 -5
- package/src/core/utils/portal/portalContext.ts +10 -7
- package/src/css/components/dialog/dialog.css.ts +2 -2
- package/src/css/components/toast/toast.css.ts +2 -2
- package/src/css/primitives/button/button.css.ts +0 -2
- package/src/css/primitives/root/root.css.ts +5 -1
- package/src/css/primitives/root/root.ts +1 -1
- package/src/css/props/gridColumnStart/types.ts +1 -1
- package/src/theme/v0/css.ts +2 -0
- package/src/theme/v2/build/merge.ts +2 -0
- package/src/theme/v3/merge.ts +2 -0
- package/src/core/primitives/root/__workshop__/boundary.tsx +0 -5
- package/src/core/primitives/root/__workshop__/index.ts +0 -8
package/dist/index.d.cts
CHANGED
|
@@ -1992,7 +1992,7 @@ export declare interface ResponsiveAvatarSizeStyleProps {
|
|
|
1992
1992
|
|
|
1993
1993
|
/**
|
|
1994
1994
|
* @public
|
|
1995
|
-
* @deprecated
|
|
1995
|
+
* @deprecated No longer used.
|
|
1996
1996
|
*/
|
|
1997
1997
|
export declare interface ResponsiveBorderProps {
|
|
1998
1998
|
border?: boolean | boolean[]
|
|
@@ -2004,7 +2004,7 @@ export declare interface ResponsiveBorderProps {
|
|
|
2004
2004
|
|
|
2005
2005
|
/**
|
|
2006
2006
|
* @public
|
|
2007
|
-
* @deprecated
|
|
2007
|
+
* @deprecated No longer used.
|
|
2008
2008
|
*/
|
|
2009
2009
|
export declare interface ResponsiveBoxProps {
|
|
2010
2010
|
display?: BoxDisplay | BoxDisplay[]
|
|
@@ -2015,7 +2015,7 @@ export declare interface ResponsiveBoxProps {
|
|
|
2015
2015
|
|
|
2016
2016
|
/**
|
|
2017
2017
|
* @public
|
|
2018
|
-
* @deprecated
|
|
2018
|
+
* @deprecated No longer used.
|
|
2019
2019
|
*/
|
|
2020
2020
|
export declare interface ResponsiveFlexItemProps {
|
|
2021
2021
|
/** Sets the flex CSS attribute. The property is responsive. */
|
|
@@ -2024,7 +2024,7 @@ export declare interface ResponsiveFlexItemProps {
|
|
|
2024
2024
|
|
|
2025
2025
|
/**
|
|
2026
2026
|
* @public
|
|
2027
|
-
* @deprecated
|
|
2027
|
+
* @deprecated No longer used.
|
|
2028
2028
|
*/
|
|
2029
2029
|
export declare interface ResponsiveFlexProps {
|
|
2030
2030
|
align?: FlexAlign | FlexAlign[]
|
|
@@ -2035,7 +2035,7 @@ export declare interface ResponsiveFlexProps {
|
|
|
2035
2035
|
|
|
2036
2036
|
/**
|
|
2037
2037
|
* @public
|
|
2038
|
-
* @deprecated
|
|
2038
|
+
* @deprecated No longer used.
|
|
2039
2039
|
*/
|
|
2040
2040
|
export declare interface ResponsiveGridItemProps {
|
|
2041
2041
|
column?: GridItemColumn | GridItemColumn[]
|
|
@@ -2048,7 +2048,7 @@ export declare interface ResponsiveGridItemProps {
|
|
|
2048
2048
|
|
|
2049
2049
|
/**
|
|
2050
2050
|
* @public
|
|
2051
|
-
* @deprecated
|
|
2051
|
+
* @deprecated No longer used.
|
|
2052
2052
|
*/
|
|
2053
2053
|
export declare interface ResponsiveGridProps {
|
|
2054
2054
|
autoRows?: GridAutoRows | GridAutoRows[]
|
|
@@ -2060,7 +2060,7 @@ export declare interface ResponsiveGridProps {
|
|
|
2060
2060
|
|
|
2061
2061
|
/**
|
|
2062
2062
|
* @public
|
|
2063
|
-
* @deprecated
|
|
2063
|
+
* @deprecated No longer used.
|
|
2064
2064
|
*/
|
|
2065
2065
|
export declare interface ResponsiveMarginProps {
|
|
2066
2066
|
/** Applies margins to all sides. The property is responsive. */
|
|
@@ -2077,7 +2077,7 @@ export declare interface ResponsiveMarginProps {
|
|
|
2077
2077
|
|
|
2078
2078
|
/**
|
|
2079
2079
|
* @public
|
|
2080
|
-
* @deprecated
|
|
2080
|
+
* @deprecated No longer used.
|
|
2081
2081
|
*/
|
|
2082
2082
|
export declare interface ResponsivePaddingProps {
|
|
2083
2083
|
padding?: number | number[]
|
|
@@ -2091,7 +2091,7 @@ export declare interface ResponsivePaddingProps {
|
|
|
2091
2091
|
|
|
2092
2092
|
/**
|
|
2093
2093
|
* @public
|
|
2094
|
-
* @deprecated
|
|
2094
|
+
* @deprecated No longer used.
|
|
2095
2095
|
*/
|
|
2096
2096
|
export declare interface ResponsiveRadiusProps {
|
|
2097
2097
|
radius?: Radius | Radius[]
|
|
@@ -2099,7 +2099,7 @@ export declare interface ResponsiveRadiusProps {
|
|
|
2099
2099
|
|
|
2100
2100
|
/**
|
|
2101
2101
|
* @public
|
|
2102
|
-
* @deprecated
|
|
2102
|
+
* @deprecated No longer used.
|
|
2103
2103
|
*/
|
|
2104
2104
|
export declare interface ResponsiveShadowProps {
|
|
2105
2105
|
shadow?: number | number[]
|
|
@@ -2107,7 +2107,7 @@ export declare interface ResponsiveShadowProps {
|
|
|
2107
2107
|
|
|
2108
2108
|
/**
|
|
2109
2109
|
* @public
|
|
2110
|
-
* @deprecated
|
|
2110
|
+
* @deprecated No longer used.
|
|
2111
2111
|
*/
|
|
2112
2112
|
export declare interface ResponsiveWidthProps {
|
|
2113
2113
|
width?: number | 'auto' | (number | 'auto')[]
|
|
@@ -3018,7 +3018,7 @@ export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T
|
|
|
3018
3018
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
3019
3019
|
|
|
3020
3020
|
/** @public */
|
|
3021
|
-
export declare function useCard(): CardContextValue
|
|
3021
|
+
export declare function useCard(): CardContextValue
|
|
3022
3022
|
|
|
3023
3023
|
/**
|
|
3024
3024
|
* @public
|
package/dist/index.d.ts
CHANGED
|
@@ -1992,7 +1992,7 @@ export declare interface ResponsiveAvatarSizeStyleProps {
|
|
|
1992
1992
|
|
|
1993
1993
|
/**
|
|
1994
1994
|
* @public
|
|
1995
|
-
* @deprecated
|
|
1995
|
+
* @deprecated No longer used.
|
|
1996
1996
|
*/
|
|
1997
1997
|
export declare interface ResponsiveBorderProps {
|
|
1998
1998
|
border?: boolean | boolean[]
|
|
@@ -2004,7 +2004,7 @@ export declare interface ResponsiveBorderProps {
|
|
|
2004
2004
|
|
|
2005
2005
|
/**
|
|
2006
2006
|
* @public
|
|
2007
|
-
* @deprecated
|
|
2007
|
+
* @deprecated No longer used.
|
|
2008
2008
|
*/
|
|
2009
2009
|
export declare interface ResponsiveBoxProps {
|
|
2010
2010
|
display?: BoxDisplay | BoxDisplay[]
|
|
@@ -2015,7 +2015,7 @@ export declare interface ResponsiveBoxProps {
|
|
|
2015
2015
|
|
|
2016
2016
|
/**
|
|
2017
2017
|
* @public
|
|
2018
|
-
* @deprecated
|
|
2018
|
+
* @deprecated No longer used.
|
|
2019
2019
|
*/
|
|
2020
2020
|
export declare interface ResponsiveFlexItemProps {
|
|
2021
2021
|
/** Sets the flex CSS attribute. The property is responsive. */
|
|
@@ -2024,7 +2024,7 @@ export declare interface ResponsiveFlexItemProps {
|
|
|
2024
2024
|
|
|
2025
2025
|
/**
|
|
2026
2026
|
* @public
|
|
2027
|
-
* @deprecated
|
|
2027
|
+
* @deprecated No longer used.
|
|
2028
2028
|
*/
|
|
2029
2029
|
export declare interface ResponsiveFlexProps {
|
|
2030
2030
|
align?: FlexAlign | FlexAlign[]
|
|
@@ -2035,7 +2035,7 @@ export declare interface ResponsiveFlexProps {
|
|
|
2035
2035
|
|
|
2036
2036
|
/**
|
|
2037
2037
|
* @public
|
|
2038
|
-
* @deprecated
|
|
2038
|
+
* @deprecated No longer used.
|
|
2039
2039
|
*/
|
|
2040
2040
|
export declare interface ResponsiveGridItemProps {
|
|
2041
2041
|
column?: GridItemColumn | GridItemColumn[]
|
|
@@ -2048,7 +2048,7 @@ export declare interface ResponsiveGridItemProps {
|
|
|
2048
2048
|
|
|
2049
2049
|
/**
|
|
2050
2050
|
* @public
|
|
2051
|
-
* @deprecated
|
|
2051
|
+
* @deprecated No longer used.
|
|
2052
2052
|
*/
|
|
2053
2053
|
export declare interface ResponsiveGridProps {
|
|
2054
2054
|
autoRows?: GridAutoRows | GridAutoRows[]
|
|
@@ -2060,7 +2060,7 @@ export declare interface ResponsiveGridProps {
|
|
|
2060
2060
|
|
|
2061
2061
|
/**
|
|
2062
2062
|
* @public
|
|
2063
|
-
* @deprecated
|
|
2063
|
+
* @deprecated No longer used.
|
|
2064
2064
|
*/
|
|
2065
2065
|
export declare interface ResponsiveMarginProps {
|
|
2066
2066
|
/** Applies margins to all sides. The property is responsive. */
|
|
@@ -2077,7 +2077,7 @@ export declare interface ResponsiveMarginProps {
|
|
|
2077
2077
|
|
|
2078
2078
|
/**
|
|
2079
2079
|
* @public
|
|
2080
|
-
* @deprecated
|
|
2080
|
+
* @deprecated No longer used.
|
|
2081
2081
|
*/
|
|
2082
2082
|
export declare interface ResponsivePaddingProps {
|
|
2083
2083
|
padding?: number | number[]
|
|
@@ -2091,7 +2091,7 @@ export declare interface ResponsivePaddingProps {
|
|
|
2091
2091
|
|
|
2092
2092
|
/**
|
|
2093
2093
|
* @public
|
|
2094
|
-
* @deprecated
|
|
2094
|
+
* @deprecated No longer used.
|
|
2095
2095
|
*/
|
|
2096
2096
|
export declare interface ResponsiveRadiusProps {
|
|
2097
2097
|
radius?: Radius | Radius[]
|
|
@@ -2099,7 +2099,7 @@ export declare interface ResponsiveRadiusProps {
|
|
|
2099
2099
|
|
|
2100
2100
|
/**
|
|
2101
2101
|
* @public
|
|
2102
|
-
* @deprecated
|
|
2102
|
+
* @deprecated No longer used.
|
|
2103
2103
|
*/
|
|
2104
2104
|
export declare interface ResponsiveShadowProps {
|
|
2105
2105
|
shadow?: number | number[]
|
|
@@ -2107,7 +2107,7 @@ export declare interface ResponsiveShadowProps {
|
|
|
2107
2107
|
|
|
2108
2108
|
/**
|
|
2109
2109
|
* @public
|
|
2110
|
-
* @deprecated
|
|
2110
|
+
* @deprecated No longer used.
|
|
2111
2111
|
*/
|
|
2112
2112
|
export declare interface ResponsiveWidthProps {
|
|
2113
2113
|
width?: number | 'auto' | (number | 'auto')[]
|
|
@@ -3018,7 +3018,7 @@ export declare function useArrayProp<T>(val: T | T[] | undefined, defaultVal?: T
|
|
|
3018
3018
|
export declare function useBoundaryElement(): BoundaryElementContextValue
|
|
3019
3019
|
|
|
3020
3020
|
/** @public */
|
|
3021
|
-
export declare function useCard(): CardContextValue
|
|
3021
|
+
export declare function useCard(): CardContextValue
|
|
3022
3022
|
|
|
3023
3023
|
/**
|
|
3024
3024
|
* @public
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1 } from "@sanity/ui/theme";
|
|
2
|
-
import { isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, isHTMLElement, _isEnterToClickElement, Selectable, Text, useResponsiveProp, EMPTY_ARRAY, EMPTY_RECORD, Box, Button, Stack, Popover, TextInput, AnimatedSpinnerIcon, useClickOutsideEvent, Flex, containsOrEqualsElement, usePortal, useBoundaryElement, useLayer, useGlobalKeyDown, Card, createGlobalScopedContext, usePrefersReducedMotion, Portal, Z_OFFSETS, Layer, Grid, LayerProvider, isRecord, _getArrayProp, useCustomValidity,
|
|
2
|
+
import { isHTMLAnchorElement, isHTMLInputElement, isHTMLButtonElement, isHTMLSelectElement, isHTMLTextAreaElement, isHTMLElement, _isEnterToClickElement, Selectable, Text, useResponsiveProp, EMPTY_ARRAY, EMPTY_RECORD, Box, Button, Stack, Popover, TextInput, AnimatedSpinnerIcon, useClickOutsideEvent, Flex, containsOrEqualsElement, usePortal, useBoundaryElement, useLayer, useGlobalKeyDown, Card, createGlobalScopedContext, usePrefersReducedMotion, Portal, Z_OFFSETS, Layer, Grid, LayerProvider, isRecord, _getArrayProp, useCustomValidity, useDelayedState, TooltipDelayGroupContext, BoundaryElementContext, CardProvider, PortalProvider } from "./_chunks-es/_visual-editing.js";
|
|
3
3
|
import { Arrow, DEFAULT_ARROW_ELEMENT, DEFAULT_BOX_ELEMENT, DEFAULT_BUTTON_ELEMENT, DEFAULT_CARD_ELEMENT, DEFAULT_FLEX_ELEMENT, DEFAULT_GRID_ELEMENT, DEFAULT_HOTKEYS_ELEMENT, DEFAULT_KBD_ELEMENT, DEFAULT_LAYER_ELEMENT, DEFAULT_MENU_DIVIDER_ELEMENT, DEFAULT_MENU_ELEMENT, DEFAULT_MENU_GROUP_ELEMENT, DEFAULT_MENU_ITEM_ELEMENT, DEFAULT_POPOVER_ELEMENT, DEFAULT_SELECTABLE_ELEMENT, DEFAULT_SPINNER_ELEMENT, DEFAULT_STACK_ELEMENT, DEFAULT_TAB_ELEMENT, DEFAULT_TAB_LIST_ELEMENT, DEFAULT_TEXT_ELEMENT, DEFAULT_TEXT_INPUT_ELEMENT, DEFAULT_TOOLTIP_ELEMENT, Hotkeys, KBD, Menu, MenuDivider, MenuGroup, MenuItem, Spinner, Tab, TabList, ThemeColorProvider, ThemeProvider, Tooltip, _getResponsiveProp, useCard, useMatchMedia, useMediaIndex, usePrefersDark, useRootTheme, useTheme, useTheme_v2, useTooltipDelayGroup } from "./_chunks-es/_visual-editing.js";
|
|
4
4
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
5
5
|
import { ChevronDownIcon, CloseIcon, ToggleArrowRightIcon, CheckmarkIcon, RemoveIcon } from "@sanity/icons";
|
|
6
6
|
import { useReducer, useCallback, useRef, useImperativeHandle, useMemo, useEffect, cloneElement, useState, Children, isValidElement, Fragment, useContext, useSyncExternalStore, startTransition, memo, useId, lazy, Suspense, Component } from "react";
|
|
7
7
|
import { c } from "react/compiler-runtime";
|
|
8
|
-
import { breadcrumbs, container as container$1, dialogCard, dialogHeader, dialogContent, dialogScrollerShadowTop, dialogScroller, dialogScrollerShadowBottom, dialogFooter, dialog, dialogContainer, toast, toastLayer, treeItem, vars, label, textOverflow, avatar, avatarArrow, avatarInitials, avatarImage, avatarImageOutline, avatarCounter, avatarStack, badge, checkbox, checkboxInput, checkboxPresentation, code, heading, radio, radioInput, radioPresentation,
|
|
8
|
+
import { breadcrumbs, container as container$1, dialogCard, dialogHeader, dialogContent, dialogScrollerShadowTop, dialogScroller, dialogScrollerShadowBottom, dialogFooter, dialog, dialogContainer, toast, toastLayer, treeItem, vars, label, textOverflow, avatar, avatarArrow, avatarInitials, avatarImage, avatarImageOutline, avatarCounter, avatarStack, badge, checkbox, checkboxInput, checkboxPresentation, code, heading, radio, radioInput, radioPresentation, select, _inputElement, selectPresentation, skeleton, codeSkeleton, headingSkeleton, labelSkeleton, textSkeleton, srOnly, _switch, _switchElement, _switchPresentation, _switchTrack, _switchThumb, textArea, _inputPresentation, BREAKPOINTS, box, root } from "@sanity/ui/css";
|
|
9
9
|
import { px, rem } from "@sanity/ui/css";
|
|
10
10
|
import { motion, AnimatePresence } from "framer-motion";
|
|
11
11
|
import { ResizeObserver } from "@juggle/resize-observer";
|
|
@@ -380,7 +380,7 @@ function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
|
380
380
|
}
|
|
381
381
|
const DEFAULT_DIALOG_CARD_ELEMENT = "div";
|
|
382
382
|
function DialogCard(props) {
|
|
383
|
-
const $ = c(
|
|
383
|
+
const $ = c(61), t0 = props;
|
|
384
384
|
let autoFocus, children, footer, forwardedContentRef, forwardedRef, header, hideCloseButton, id, onClickOutside, onClose, portalProp, rest, t1;
|
|
385
385
|
$[0] !== t0 ? ({
|
|
386
386
|
__unstable_autoFocus: autoFocus,
|
|
@@ -399,7 +399,7 @@ function DialogCard(props) {
|
|
|
399
399
|
} = t0, $[0] = t0, $[1] = autoFocus, $[2] = children, $[3] = footer, $[4] = forwardedContentRef, $[5] = forwardedRef, $[6] = header, $[7] = hideCloseButton, $[8] = id, $[9] = onClickOutside, $[10] = onClose, $[11] = portalProp, $[12] = rest, $[13] = t1) : (autoFocus = $[1], children = $[2], footer = $[3], forwardedContentRef = $[4], forwardedRef = $[5], header = $[6], hideCloseButton = $[7], id = $[8], onClickOutside = $[9], onClose = $[10], portalProp = $[11], rest = $[12], t1 = $[13]);
|
|
400
400
|
const as = t1 === void 0 ? DEFAULT_DIALOG_CARD_ELEMENT : t1, portal = usePortal(), portalElement = portalProp ? portal.elements?.[portalProp] || null : portal.element, boundaryElement = useBoundaryElement().element, ref = useRef(null), contentRef = useRef(null), layer = useLayer(), {
|
|
401
401
|
isTopLayer
|
|
402
|
-
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton, [scrollTop, setScrollTop] = useState(0);
|
|
402
|
+
} = layer, labelId = `${id}_label`, showCloseButton = !!onClose && hideCloseButton === !1, showHeader = !!header || showCloseButton, [scrollTop, setScrollTop] = useState(0), [scrollHeight, setScrollHeight] = useState(0), scrollBottom = scrollHeight - scrollTop;
|
|
403
403
|
let t2;
|
|
404
404
|
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[14] = t2) : t2 = $[14], useImperativeHandle(forwardedRef, t2);
|
|
405
405
|
let t3;
|
|
@@ -428,7 +428,7 @@ function DialogCard(props) {
|
|
|
428
428
|
if (!el)
|
|
429
429
|
return;
|
|
430
430
|
const handleScroll = () => {
|
|
431
|
-
setScrollTop(el.scrollTop);
|
|
431
|
+
setScrollTop(el.scrollTop), setScrollHeight(el.scrollHeight - el.offsetHeight);
|
|
432
432
|
};
|
|
433
433
|
return el.addEventListener("scroll", handleScroll, {
|
|
434
434
|
passive: !0
|
|
@@ -454,21 +454,23 @@ function DialogCard(props) {
|
|
|
454
454
|
let t16;
|
|
455
455
|
$[44] !== children ? (t16 = /* @__PURE__ */ jsx(Box, { className: t15, overflow: "auto", ref: contentRef, children }), $[44] = children, $[45] = t16) : t16 = $[45];
|
|
456
456
|
let t17;
|
|
457
|
-
$[46] !== footer ? (t17 = footer && /* @__PURE__ */ jsx("div", { className: dialogScrollerShadowBottom()
|
|
457
|
+
$[46] !== footer || $[47] !== scrollBottom ? (t17 = footer && /* @__PURE__ */ jsx("div", { className: dialogScrollerShadowBottom(), style: {
|
|
458
|
+
opacity: Math.min(scrollBottom, 32) / 32
|
|
459
|
+
} }), $[46] = footer, $[47] = scrollBottom, $[48] = t17) : t17 = $[48];
|
|
458
460
|
let t18;
|
|
459
|
-
$[
|
|
461
|
+
$[49] !== t14 || $[50] !== t16 || $[51] !== t17 ? (t18 = /* @__PURE__ */ jsxs(Box, { className: t13, flex: 1, position: "relative", tabIndex: -1, children: [
|
|
460
462
|
t14,
|
|
461
463
|
t16,
|
|
462
464
|
t17
|
|
463
|
-
] }), $[
|
|
465
|
+
] }), $[49] = t14, $[50] = t16, $[51] = t17, $[52] = t18) : t18 = $[52];
|
|
464
466
|
let t19;
|
|
465
|
-
$[
|
|
467
|
+
$[53] !== footer ? (t19 = footer && /* @__PURE__ */ jsx(Box, { className: dialogFooter(), position: "relative", children: footer }), $[53] = footer, $[54] = t19) : t19 = $[54];
|
|
466
468
|
let t20;
|
|
467
|
-
return $[
|
|
469
|
+
return $[55] !== as || $[56] !== rest || $[57] !== t12 || $[58] !== t18 || $[59] !== t19 ? (t20 = /* @__PURE__ */ jsxs(Card, { ...rest, as, className: t11, display: "flex", flexDirection: "column", ref, children: [
|
|
468
470
|
t12,
|
|
469
471
|
t18,
|
|
470
472
|
t19
|
|
471
|
-
] }), $[
|
|
473
|
+
] }), $[55] = as, $[56] = rest, $[57] = t12, $[58] = t18, $[59] = t19, $[60] = t20) : t20 = $[60], t20;
|
|
472
474
|
}
|
|
473
475
|
const DialogContext = createGlobalScopedContext("@sanity/ui/context/dialog", {
|
|
474
476
|
version: 0
|
|
@@ -1856,85 +1858,6 @@ function Radio(props) {
|
|
|
1856
1858
|
t9
|
|
1857
1859
|
] }), $[21] = style, $[22] = t3, $[23] = t8, $[24] = t10) : t10 = $[24], t10;
|
|
1858
1860
|
}
|
|
1859
|
-
function BoundaryElementProvider(props) {
|
|
1860
|
-
const $ = c(5), {
|
|
1861
|
-
children,
|
|
1862
|
-
element
|
|
1863
|
-
} = props;
|
|
1864
|
-
let t0, t1;
|
|
1865
|
-
$[0] !== element ? (t1 = {
|
|
1866
|
-
version: 0,
|
|
1867
|
-
element
|
|
1868
|
-
}, $[0] = element, $[1] = t1) : t1 = $[1], t0 = t1;
|
|
1869
|
-
const value = t0;
|
|
1870
|
-
let t2;
|
|
1871
|
-
return $[2] !== children || $[3] !== value ? (t2 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t2) : t2 = $[4], t2;
|
|
1872
|
-
}
|
|
1873
|
-
function RootProvider(props) {
|
|
1874
|
-
const $ = c(10), {
|
|
1875
|
-
boundaryElement: t0,
|
|
1876
|
-
children,
|
|
1877
|
-
portalElement: t1,
|
|
1878
|
-
scheme: t2,
|
|
1879
|
-
tone: t3
|
|
1880
|
-
} = props, boundaryElement = t0 === void 0 ? null : t0, portalElement = t1 === void 0 ? null : t1, scheme = t2 === void 0 ? "light" : t2, tone = t3 === void 0 ? "transparent" : t3;
|
|
1881
|
-
let t4;
|
|
1882
|
-
$[0] !== children || $[1] !== portalElement ? (t4 = /* @__PURE__ */ jsx(PortalProvider, { element: portalElement, children }), $[0] = children, $[1] = portalElement, $[2] = t4) : t4 = $[2];
|
|
1883
|
-
let t5;
|
|
1884
|
-
$[3] !== boundaryElement || $[4] !== t4 ? (t5 = /* @__PURE__ */ jsx(ToastProvider, { children: /* @__PURE__ */ jsx(BoundaryElementProvider, { element: boundaryElement, children: t4 }) }), $[3] = boundaryElement, $[4] = t4, $[5] = t5) : t5 = $[5];
|
|
1885
|
-
let t6;
|
|
1886
|
-
return $[6] !== scheme || $[7] !== t5 || $[8] !== tone ? (t6 = /* @__PURE__ */ jsx(LayerProvider, { children: /* @__PURE__ */ jsx(CardProvider, { scheme, tone, children: t5 }) }), $[6] = scheme, $[7] = t5, $[8] = tone, $[9] = t6) : t6 = $[9], t6;
|
|
1887
|
-
}
|
|
1888
|
-
const DEFAULT_ROOT_ELEMENT = "html";
|
|
1889
|
-
function Root(props) {
|
|
1890
|
-
const $ = c(33), t0 = props;
|
|
1891
|
-
let children, className, forwardedRef, rest, t1, t2, t3, t4;
|
|
1892
|
-
$[0] !== t0 ? ({
|
|
1893
|
-
as: t1,
|
|
1894
|
-
children,
|
|
1895
|
-
className,
|
|
1896
|
-
height: t2,
|
|
1897
|
-
ref: forwardedRef,
|
|
1898
|
-
scheme: t3,
|
|
1899
|
-
tone: t4,
|
|
1900
|
-
...rest
|
|
1901
|
-
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = forwardedRef, $[4] = rest, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4) : (children = $[1], className = $[2], forwardedRef = $[3], rest = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8]);
|
|
1902
|
-
const as = t1 === void 0 ? DEFAULT_ROOT_ELEMENT : t1, height = t2 === void 0 ? "fill" : t2, scheme = t3 === void 0 ? "light" : t3, tone = t4 === void 0 ? "transparent" : t4, ref = useRef(null);
|
|
1903
|
-
let t5;
|
|
1904
|
-
$[9] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[9] = t5) : t5 = $[9], useImperativeHandle(forwardedRef, t5);
|
|
1905
|
-
const [portalElement, setPortalElement] = useState(null), [boundaryElement, setBoundaryElement] = useState(null);
|
|
1906
|
-
let t6;
|
|
1907
|
-
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t6 = (el) => {
|
|
1908
|
-
setBoundaryElement(el), ref.current = el;
|
|
1909
|
-
}, $[10] = t6) : t6 = $[10];
|
|
1910
|
-
const handleRef = t6;
|
|
1911
|
-
let t7;
|
|
1912
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsx("div", { "data-portal": "", ref: setPortalElement }), $[11] = t7) : t7 = $[11];
|
|
1913
|
-
let t8;
|
|
1914
|
-
$[12] !== boundaryElement || $[13] !== children || $[14] !== portalElement || $[15] !== scheme || $[16] !== tone ? (t8 = /* @__PURE__ */ jsxs(RootProvider, { boundaryElement, portalElement, scheme, tone, children: [
|
|
1915
|
-
children,
|
|
1916
|
-
t7
|
|
1917
|
-
] }), $[12] = boundaryElement, $[13] = children, $[14] = portalElement, $[15] = scheme, $[16] = tone, $[17] = t8) : t8 = $[17];
|
|
1918
|
-
let node = t8;
|
|
1919
|
-
if (as === "html") {
|
|
1920
|
-
let t92;
|
|
1921
|
-
$[18] !== height ? (t92 = box({
|
|
1922
|
-
height,
|
|
1923
|
-
margin: 0
|
|
1924
|
-
}), $[18] = height, $[19] = t92) : t92 = $[19];
|
|
1925
|
-
let t102;
|
|
1926
|
-
$[20] !== node || $[21] !== t92 ? (t102 = /* @__PURE__ */ jsx("body", { className: t92, children: node }), $[20] = node, $[21] = t92, $[22] = t102) : t102 = $[22], node = t102;
|
|
1927
|
-
}
|
|
1928
|
-
let t9;
|
|
1929
|
-
$[23] !== className || $[24] !== height || $[25] !== scheme || $[26] !== tone ? (t9 = root({
|
|
1930
|
-
className,
|
|
1931
|
-
height,
|
|
1932
|
-
scheme,
|
|
1933
|
-
tone
|
|
1934
|
-
}), $[23] = className, $[24] = height, $[25] = scheme, $[26] = tone, $[27] = t9) : t9 = $[27];
|
|
1935
|
-
let t10;
|
|
1936
|
-
return $[28] !== as || $[29] !== node || $[30] !== rest || $[31] !== t9 ? (t10 = /* @__PURE__ */ jsx(Box, { as, "data-ui": "Root", ...rest, className: t9, ref: handleRef, children: node }), $[28] = as, $[29] = node, $[30] = rest, $[31] = t9, $[32] = t10) : t10 = $[32], t10;
|
|
1937
|
-
}
|
|
1938
1861
|
const DEFAULT_SELECT_ELEMENT = "select";
|
|
1939
1862
|
function Select(props) {
|
|
1940
1863
|
const $ = c(38), t0 = props;
|
|
@@ -2213,6 +2136,20 @@ function TooltipDelayGroupProvider(props) {
|
|
|
2213
2136
|
let t3;
|
|
2214
2137
|
return $[6] !== children || $[7] !== value ? (t3 = /* @__PURE__ */ jsx(TooltipDelayGroupContext.Provider, { value, children }), $[6] = children, $[7] = value, $[8] = t3) : t3 = $[8], t3;
|
|
2215
2138
|
}
|
|
2139
|
+
function BoundaryElementProvider(props) {
|
|
2140
|
+
const $ = c(5), {
|
|
2141
|
+
children,
|
|
2142
|
+
element
|
|
2143
|
+
} = props;
|
|
2144
|
+
let t0, t1;
|
|
2145
|
+
$[0] !== element ? (t1 = {
|
|
2146
|
+
version: 0,
|
|
2147
|
+
element
|
|
2148
|
+
}, $[0] = element, $[1] = t1) : t1 = $[1], t0 = t1;
|
|
2149
|
+
const value = t0;
|
|
2150
|
+
let t2;
|
|
2151
|
+
return $[2] !== children || $[3] !== value ? (t2 = /* @__PURE__ */ jsx(BoundaryElementContext.Provider, { value, children }), $[2] = children, $[3] = value, $[4] = t2) : t2 = $[4], t2;
|
|
2152
|
+
}
|
|
2216
2153
|
function findMaxBreakpoints(media, width) {
|
|
2217
2154
|
const ret = [];
|
|
2218
2155
|
for (let i = 0; i < media.length; i += 1)
|
|
@@ -2288,6 +2225,72 @@ class ErrorBoundary extends Component {
|
|
|
2288
2225
|
return this.props.children;
|
|
2289
2226
|
}
|
|
2290
2227
|
}
|
|
2228
|
+
function RootProvider(props) {
|
|
2229
|
+
const $ = c(10), {
|
|
2230
|
+
boundaryElement: t0,
|
|
2231
|
+
children,
|
|
2232
|
+
portalElement: t1,
|
|
2233
|
+
scheme: t2,
|
|
2234
|
+
tone: t3
|
|
2235
|
+
} = props, boundaryElement = t0 === void 0 ? null : t0, portalElement = t1 === void 0 ? null : t1, scheme = t2 === void 0 ? "light" : t2, tone = t3 === void 0 ? "transparent" : t3;
|
|
2236
|
+
let t4;
|
|
2237
|
+
$[0] !== children || $[1] !== portalElement ? (t4 = /* @__PURE__ */ jsx(PortalProvider, { element: portalElement, children }), $[0] = children, $[1] = portalElement, $[2] = t4) : t4 = $[2];
|
|
2238
|
+
let t5;
|
|
2239
|
+
$[3] !== boundaryElement || $[4] !== t4 ? (t5 = /* @__PURE__ */ jsx(ToastProvider, { children: /* @__PURE__ */ jsx(BoundaryElementProvider, { element: boundaryElement, children: t4 }) }), $[3] = boundaryElement, $[4] = t4, $[5] = t5) : t5 = $[5];
|
|
2240
|
+
let t6;
|
|
2241
|
+
return $[6] !== scheme || $[7] !== t5 || $[8] !== tone ? (t6 = /* @__PURE__ */ jsx(LayerProvider, { children: /* @__PURE__ */ jsx(CardProvider, { scheme, tone, children: t5 }) }), $[6] = scheme, $[7] = t5, $[8] = tone, $[9] = t6) : t6 = $[9], t6;
|
|
2242
|
+
}
|
|
2243
|
+
const DEFAULT_ROOT_ELEMENT = "html";
|
|
2244
|
+
function Root(props) {
|
|
2245
|
+
const $ = c(35), t0 = props;
|
|
2246
|
+
let children, className, forwardedRef, height, rest, t1, t2, t3, t4;
|
|
2247
|
+
$[0] !== t0 ? ({
|
|
2248
|
+
as: t1,
|
|
2249
|
+
children,
|
|
2250
|
+
className,
|
|
2251
|
+
height,
|
|
2252
|
+
overflow: t2,
|
|
2253
|
+
ref: forwardedRef,
|
|
2254
|
+
scheme: t3,
|
|
2255
|
+
tone: t4,
|
|
2256
|
+
...rest
|
|
2257
|
+
} = t0, $[0] = t0, $[1] = children, $[2] = className, $[3] = forwardedRef, $[4] = height, $[5] = rest, $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4) : (children = $[1], className = $[2], forwardedRef = $[3], height = $[4], rest = $[5], t1 = $[6], t2 = $[7], t3 = $[8], t4 = $[9]);
|
|
2258
|
+
const as = t1 === void 0 ? DEFAULT_ROOT_ELEMENT : t1, overflow = t2 === void 0 ? "hidden" : t2, scheme = t3 === void 0 ? "light" : t3, tone = t4 === void 0 ? "transparent" : t4, ref = useRef(null);
|
|
2259
|
+
let t5;
|
|
2260
|
+
$[10] === Symbol.for("react.memo_cache_sentinel") ? (t5 = () => ref.current, $[10] = t5) : t5 = $[10], useImperativeHandle(forwardedRef, t5);
|
|
2261
|
+
const [portalElement, setPortalElement] = useState(null), [boundaryElement, setBoundaryElement] = useState(null);
|
|
2262
|
+
let t6;
|
|
2263
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t6 = (el) => {
|
|
2264
|
+
setBoundaryElement(el), ref.current = el;
|
|
2265
|
+
}, $[11] = t6) : t6 = $[11];
|
|
2266
|
+
const handleRef = t6;
|
|
2267
|
+
let t7;
|
|
2268
|
+
$[12] === Symbol.for("react.memo_cache_sentinel") ? (t7 = /* @__PURE__ */ jsx("div", { "data-portal": "", ref: setPortalElement }), $[12] = t7) : t7 = $[12];
|
|
2269
|
+
let t8;
|
|
2270
|
+
$[13] !== boundaryElement || $[14] !== children || $[15] !== portalElement || $[16] !== scheme || $[17] !== tone ? (t8 = /* @__PURE__ */ jsxs(RootProvider, { boundaryElement, portalElement, scheme, tone, children: [
|
|
2271
|
+
children,
|
|
2272
|
+
t7
|
|
2273
|
+
] }), $[13] = boundaryElement, $[14] = children, $[15] = portalElement, $[16] = scheme, $[17] = tone, $[18] = t8) : t8 = $[18];
|
|
2274
|
+
let node = t8;
|
|
2275
|
+
if (as === "html") {
|
|
2276
|
+
let t92;
|
|
2277
|
+
$[19] !== height ? (t92 = box({
|
|
2278
|
+
height,
|
|
2279
|
+
margin: 0
|
|
2280
|
+
}), $[19] = height, $[20] = t92) : t92 = $[20];
|
|
2281
|
+
let t102;
|
|
2282
|
+
$[21] !== node || $[22] !== t92 ? (t102 = /* @__PURE__ */ jsx("body", { className: t92, children: node }), $[21] = node, $[22] = t92, $[23] = t102) : t102 = $[23], node = t102;
|
|
2283
|
+
}
|
|
2284
|
+
let t9;
|
|
2285
|
+
$[24] !== className || $[25] !== height || $[26] !== scheme || $[27] !== tone ? (t9 = root({
|
|
2286
|
+
className,
|
|
2287
|
+
height,
|
|
2288
|
+
scheme,
|
|
2289
|
+
tone
|
|
2290
|
+
}), $[24] = className, $[25] = height, $[26] = scheme, $[27] = tone, $[28] = t9) : t9 = $[28];
|
|
2291
|
+
let t10;
|
|
2292
|
+
return $[29] !== as || $[30] !== node || $[31] !== overflow || $[32] !== rest || $[33] !== t9 ? (t10 = /* @__PURE__ */ jsx(Box, { as, "data-ui": "Root", ...rest, className: t9, overflow, ref: handleRef, children: node }), $[29] = as, $[30] = node, $[31] = overflow, $[32] = rest, $[33] = t9, $[34] = t10) : t10 = $[34], t10;
|
|
2293
|
+
}
|
|
2291
2294
|
export {
|
|
2292
2295
|
Arrow,
|
|
2293
2296
|
Autocomplete,
|