@sanity/ui 2.0.13-alpha.1 → 2.0.13-alpha.2
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/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +127 -127
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +1 -1
- package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
- package/src/core/components/dialog/dialog.tsx +1 -1
- package/src/core/components/hotkeys/hotkeys.tsx +1 -1
- package/src/core/components/menu/menu.tsx +1 -1
- package/src/core/components/menu/menuDivider.ts +1 -1
- package/src/core/components/skeleton/skeleton.tsx +1 -1
- package/src/core/components/skeleton/textSkeleton.tsx +1 -1
- package/src/core/components/tab/tab.tsx +1 -1
- package/src/core/components/tab/tabList.tsx +1 -1
- package/src/core/components/toast/toast.tsx +1 -1
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +1 -1
- package/src/core/primitives/_selectable/selectable.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +1 -1
- package/src/core/primitives/avatar/avatarCounter.tsx +1 -1
- package/src/core/primitives/avatar/avatarStack.tsx +1 -1
- package/src/core/primitives/badge/badge.tsx +1 -1
- package/src/core/primitives/box/box.tsx +1 -1
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/button.tsx +1 -1
- package/src/core/primitives/card/__workshop__/selected.tsx +1 -1
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/card.tsx +1 -1
- package/src/core/primitives/checkbox/checkbox.tsx +1 -1
- package/src/core/primitives/code/code.tsx +1 -1
- package/src/core/primitives/container/container.tsx +1 -1
- package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +1 -1
- package/src/core/primitives/grid/grid.tsx +1 -1
- 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/popover/popoverCard.tsx +1 -1
- package/src/core/primitives/radio/radio.tsx +1 -1
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/spinner/spinner.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +1 -1
- package/src/core/primitives/switch/switch.tsx +1 -1
- package/src/core/primitives/text/__workshop__/colored.tsx +1 -1
- package/src/core/primitives/text/text.tsx +1 -1
- package/src/core/primitives/textArea/textArea.tsx +1 -1
- package/src/core/primitives/textInput/textInput.tsx +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +1 -1
- package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
- package/src/core/utils/arrow/arrow.tsx +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
- package/src/core/utils/layer/layer.tsx +1 -1
- package/src/core/utils/srOnly/srOnly.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: !0 });
|
|
3
|
-
var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), react = require("react"), ReactIs = require("react-is"),
|
|
3
|
+
var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), react = require("react"), ReactIs = require("react-is"), styled = require("styled-components");
|
|
4
4
|
require("@sanity/color");
|
|
5
5
|
var getScopedTheme = require("./_chunks-cjs/getScopedTheme.js"), icons = require("@sanity/icons"), Refractor = require("react-refractor"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), reactDom = require("react-dom");
|
|
6
6
|
function _interopDefaultCompat(e) {
|
|
7
7
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
8
8
|
}
|
|
9
|
-
var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs), Refractor__default = /* @__PURE__ */ _interopDefaultCompat(Refractor);
|
|
9
|
+
var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs), styled__default = /* @__PURE__ */ _interopDefaultCompat(styled), Refractor__default = /* @__PURE__ */ _interopDefaultCompat(Refractor);
|
|
10
10
|
const createColorTheme = theme.createColorTheme, hexToRgb = theme.hexToRgb, hslToRgb = theme.hslToRgb, multiply = theme.multiply, parseColor = theme.parseColor, rgbToHex = theme.rgbToHex, rgbToHsl = theme.rgbToHsl, rgba = theme.rgba, screen = theme.screen, studioTheme = theme.buildTheme(), EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_CONTENT_OPACITY_PROPERTY = "--motion-content-opacity", POPOVER_MOTION_PROPS = {
|
|
11
11
|
initial: {
|
|
12
12
|
opacity: 0.5,
|
|
@@ -531,7 +531,7 @@ function ThemeProvider(props) {
|
|
|
531
531
|
scheme,
|
|
532
532
|
tone
|
|
533
533
|
} : null, [rootTheme, scheme, tone]), theme2 = react.useMemo(() => rootTheme ? getScopedTheme.getScopedTheme(rootTheme, scheme, tone) : null, [scheme, rootTheme, tone]);
|
|
534
|
-
return theme2 ? theme2.sanity.v2 ? /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
534
|
+
return theme2 ? theme2.sanity.v2 ? /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsxRuntime.jsx(styled.ThemeProvider, { theme: theme2, children }) }) : /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme.sanity.v2" property in theme' }) : /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
|
|
535
535
|
}
|
|
536
536
|
function useRootTheme() {
|
|
537
537
|
const value = react.useContext(ThemeContext);
|
|
@@ -544,10 +544,10 @@ function ThemeColorProvider(props) {
|
|
|
544
544
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { scheme: scheme || root.scheme, theme: root.theme, tone, children });
|
|
545
545
|
}
|
|
546
546
|
function useTheme() {
|
|
547
|
-
return
|
|
547
|
+
return styled.useTheme();
|
|
548
548
|
}
|
|
549
549
|
function useTheme_v2() {
|
|
550
|
-
return getScopedTheme.getTheme_v2(
|
|
550
|
+
return getScopedTheme.getTheme_v2(styled.useTheme());
|
|
551
551
|
}
|
|
552
552
|
const MEDIA_STORE_CACHE = /* @__PURE__ */ new WeakMap();
|
|
553
553
|
function _getMediaQuery(media, index) {
|
|
@@ -936,7 +936,7 @@ function responsiveInputPaddingStyle(props) {
|
|
|
936
936
|
function responsiveInputPaddingIconRightStyle(props) {
|
|
937
937
|
return responsiveInputPaddingStyle({ ...props, $iconRight: !0 });
|
|
938
938
|
}
|
|
939
|
-
const ROOT_STYLE =
|
|
939
|
+
const ROOT_STYLE = styled.css`
|
|
940
940
|
&:not([hidden]) {
|
|
941
941
|
display: flex;
|
|
942
942
|
}
|
|
@@ -948,7 +948,7 @@ function textInputRootStyle() {
|
|
|
948
948
|
}
|
|
949
949
|
function textInputBaseStyle(props) {
|
|
950
950
|
const { $scheme, $tone, $weight } = props, { color, font } = props.theme.sanity.v2;
|
|
951
|
-
return
|
|
951
|
+
return styled.css`
|
|
952
952
|
appearance: none;
|
|
953
953
|
background: none;
|
|
954
954
|
border: 0;
|
|
@@ -1026,7 +1026,7 @@ function textInputFontSizeStyle(props) {
|
|
|
1026
1026
|
}
|
|
1027
1027
|
function textInputRepresentationStyle(props) {
|
|
1028
1028
|
const { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = props.theme.sanity.v2;
|
|
1029
|
-
return
|
|
1029
|
+
return styled.css`
|
|
1030
1030
|
--input-box-shadow: none;
|
|
1031
1031
|
|
|
1032
1032
|
position: absolute;
|
|
@@ -1202,14 +1202,14 @@ function responsiveShadowStyle(props) {
|
|
|
1202
1202
|
}
|
|
1203
1203
|
function labelBaseStyle(props) {
|
|
1204
1204
|
const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
|
|
1205
|
-
return
|
|
1205
|
+
return styled.css`
|
|
1206
1206
|
text-transform: uppercase;
|
|
1207
1207
|
|
|
1208
|
-
${$accent &&
|
|
1208
|
+
${$accent && styled.css`
|
|
1209
1209
|
color: var(--card-accent-fg-color);
|
|
1210
1210
|
`}
|
|
1211
1211
|
|
|
1212
|
-
${$muted &&
|
|
1212
|
+
${$muted && styled.css`
|
|
1213
1213
|
color: var(--card-muted-fg-color);
|
|
1214
1214
|
`}
|
|
1215
1215
|
|
|
@@ -1234,7 +1234,7 @@ function labelBaseStyle(props) {
|
|
|
1234
1234
|
}
|
|
1235
1235
|
`;
|
|
1236
1236
|
}
|
|
1237
|
-
const Root$C =
|
|
1237
|
+
const Root$C = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), SpanWithTextOverflow$2 = styled__default.default.span`
|
|
1238
1238
|
display: block;
|
|
1239
1239
|
white-space: nowrap;
|
|
1240
1240
|
text-overflow: ellipsis;
|
|
@@ -1400,12 +1400,12 @@ function avatarStrokeStyle() {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
};
|
|
1402
1402
|
}
|
|
1403
|
-
const Root$B =
|
|
1403
|
+
const Root$B = styled__default.default.div(
|
|
1404
1404
|
responsiveAvatarSizeStyle,
|
|
1405
1405
|
avatarStyle.root
|
|
1406
|
-
), Arrow$1 =
|
|
1406
|
+
), Arrow$1 = styled__default.default.div(avatarStyle.arrow), BgStroke = styled__default.default.ellipse(avatarStyle.bgStroke), Stroke = styled__default.default.ellipse(avatarStyle.stroke), Initials = styled__default.default.div(avatarStyle.initials), InitialsLabel = styled__default.default(Label)({
|
|
1407
1407
|
color: "inherit"
|
|
1408
|
-
}), Image =
|
|
1408
|
+
}), Image = styled__default.default.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
|
|
1409
1409
|
const {
|
|
1410
1410
|
__unstable_hideInnerStroke,
|
|
1411
1411
|
as: asProp,
|
|
@@ -1508,7 +1508,7 @@ function _responsiveAvatarCounterSizeStyle(props) {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
function _avatarCounterBaseStyle(props) {
|
|
1510
1510
|
const { space } = props.theme.sanity.v2;
|
|
1511
|
-
return
|
|
1511
|
+
return styled.css`
|
|
1512
1512
|
align-items: center;
|
|
1513
1513
|
justify-content: center;
|
|
1514
1514
|
box-sizing: border-box;
|
|
@@ -1526,7 +1526,7 @@ function _avatarCounterBaseStyle(props) {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
`;
|
|
1528
1528
|
}
|
|
1529
|
-
const Root$A =
|
|
1529
|
+
const Root$A = styled__default.default.div(
|
|
1530
1530
|
_responsiveAvatarCounterSizeStyle,
|
|
1531
1531
|
_avatarCounterBaseStyle
|
|
1532
1532
|
), AvatarCounter = react.forwardRef(function(props, ref) {
|
|
@@ -1541,7 +1541,7 @@ function childrenToElementArray(children) {
|
|
|
1541
1541
|
(node) => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node == "string"
|
|
1542
1542
|
);
|
|
1543
1543
|
}
|
|
1544
|
-
const BASE_STYLES =
|
|
1544
|
+
const BASE_STYLES = styled.css`
|
|
1545
1545
|
white-space: nowrap;
|
|
1546
1546
|
|
|
1547
1547
|
& > div {
|
|
@@ -1566,7 +1566,7 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1566
1566
|
} : EMPTY_RECORD;
|
|
1567
1567
|
});
|
|
1568
1568
|
}
|
|
1569
|
-
const Root$z =
|
|
1569
|
+
const Root$z = styled__default.default.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
|
|
1570
1570
|
const {
|
|
1571
1571
|
children: childrenProp,
|
|
1572
1572
|
maxLength: maxLengthProp = 4,
|
|
@@ -1580,7 +1580,7 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1580
1580
|
len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) }),
|
|
1581
1581
|
visibleChildren.map((child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, { size: size2 }) }, String(childIndex)))
|
|
1582
1582
|
] });
|
|
1583
|
-
}), Root$y =
|
|
1583
|
+
}), Root$y = styled__default.default.div(
|
|
1584
1584
|
boxStyle,
|
|
1585
1585
|
flexItemStyle,
|
|
1586
1586
|
responsiveBoxStyle,
|
|
@@ -1656,14 +1656,14 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1656
1656
|
});
|
|
1657
1657
|
function textBaseStyle(props) {
|
|
1658
1658
|
const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
|
|
1659
|
-
return
|
|
1659
|
+
return styled.css`
|
|
1660
1660
|
color: var(--card-fg-color);
|
|
1661
1661
|
|
|
1662
|
-
${$accent &&
|
|
1662
|
+
${$accent && styled.css`
|
|
1663
1663
|
color: var(--card-accent-fg-color);
|
|
1664
1664
|
`}
|
|
1665
1665
|
|
|
1666
|
-
${$muted &&
|
|
1666
|
+
${$muted && styled.css`
|
|
1667
1667
|
color: var(--card-muted-fg-color);
|
|
1668
1668
|
`}
|
|
1669
1669
|
|
|
@@ -1717,11 +1717,11 @@ function textBaseStyle(props) {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
`;
|
|
1719
1719
|
}
|
|
1720
|
-
const Root$x =
|
|
1720
|
+
const Root$x = styled__default.default.div(
|
|
1721
1721
|
responsiveTextFont,
|
|
1722
1722
|
responsiveTextAlignStyle,
|
|
1723
1723
|
textBaseStyle
|
|
1724
|
-
), SpanWithTextOverflow$1 =
|
|
1724
|
+
), SpanWithTextOverflow$1 = styled__default.default.span`
|
|
1725
1725
|
display: block;
|
|
1726
1726
|
white-space: nowrap;
|
|
1727
1727
|
text-overflow: ellipsis;
|
|
@@ -1767,7 +1767,7 @@ function badgeStyle(props) {
|
|
|
1767
1767
|
}
|
|
1768
1768
|
};
|
|
1769
1769
|
}
|
|
1770
|
-
const Root$w =
|
|
1770
|
+
const Root$w = styled__default.default(Box)(
|
|
1771
1771
|
responsiveRadiusStyle,
|
|
1772
1772
|
badgeStyle
|
|
1773
1773
|
), Badge = react.forwardRef(function(props, ref) {
|
|
@@ -1793,7 +1793,7 @@ const Root$w = styledComponents.styled(Box)(
|
|
|
1793
1793
|
children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children })
|
|
1794
1794
|
}
|
|
1795
1795
|
);
|
|
1796
|
-
}), Root$v =
|
|
1796
|
+
}), Root$v = styled__default.default(Box)(
|
|
1797
1797
|
flexItemStyle,
|
|
1798
1798
|
responsiveFlexStyle
|
|
1799
1799
|
), Flex = react.forwardRef(function(props, ref) {
|
|
@@ -1812,7 +1812,7 @@ const Root$w = styledComponents.styled(Box)(
|
|
|
1812
1812
|
ref
|
|
1813
1813
|
}
|
|
1814
1814
|
);
|
|
1815
|
-
}), rotate$1 =
|
|
1815
|
+
}), rotate$1 = styled.keyframes`
|
|
1816
1816
|
from {
|
|
1817
1817
|
transform: rotate(0deg);
|
|
1818
1818
|
}
|
|
@@ -1820,7 +1820,7 @@ const Root$w = styledComponents.styled(Box)(
|
|
|
1820
1820
|
to {
|
|
1821
1821
|
transform: rotate(360deg);
|
|
1822
1822
|
}
|
|
1823
|
-
`, Root$u =
|
|
1823
|
+
`, Root$u = styled__default.default(Text)`
|
|
1824
1824
|
& > span > svg {
|
|
1825
1825
|
animation: ${rotate$1} 500ms linear infinite;
|
|
1826
1826
|
}
|
|
@@ -1900,7 +1900,7 @@ function _cardColorStyle(base, color, checkered = !1) {
|
|
|
1900
1900
|
}
|
|
1901
1901
|
function buttonBaseStyles(props) {
|
|
1902
1902
|
const { $width } = props, { style } = props.theme.sanity.v2;
|
|
1903
|
-
return
|
|
1903
|
+
return styled.css`
|
|
1904
1904
|
${style == null ? void 0 : style.button};
|
|
1905
1905
|
|
|
1906
1906
|
-webkit-font-smoothing: inherit;
|
|
@@ -1921,7 +1921,7 @@ function buttonBaseStyles(props) {
|
|
|
1921
1921
|
position: relative;
|
|
1922
1922
|
vertical-align: top;
|
|
1923
1923
|
|
|
1924
|
-
${$width === "fill" &&
|
|
1924
|
+
${$width === "fill" && styled.css`
|
|
1925
1925
|
width: -moz-available;
|
|
1926
1926
|
width: -webkit-fill-available;
|
|
1927
1927
|
width: stretch;
|
|
@@ -1985,7 +1985,7 @@ function buttonColorStyles(props) {
|
|
|
1985
1985
|
(_a = style == null ? void 0 : style.button) == null ? void 0 : _a.root
|
|
1986
1986
|
].filter(Boolean);
|
|
1987
1987
|
}
|
|
1988
|
-
const Root$t =
|
|
1988
|
+
const Root$t = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styled__default.default.div`
|
|
1989
1989
|
position: absolute;
|
|
1990
1990
|
top: 0;
|
|
1991
1991
|
left: 0;
|
|
@@ -2085,8 +2085,8 @@ function cardStyle(props) {
|
|
|
2085
2085
|
}
|
|
2086
2086
|
function cardBaseStyle(props) {
|
|
2087
2087
|
const { $checkered } = props, { space } = props.theme.sanity.v2;
|
|
2088
|
-
return
|
|
2089
|
-
${$checkered &&
|
|
2088
|
+
return styled.css`
|
|
2089
|
+
${$checkered && styled.css`
|
|
2090
2090
|
background-size: ${space[3]}px ${space[3]}px;
|
|
2091
2091
|
background-position: 50% 50%;
|
|
2092
2092
|
background-image: var(--card-bg-image);
|
|
@@ -2119,7 +2119,7 @@ function cardBaseStyle(props) {
|
|
|
2119
2119
|
function cardColorStyle(props) {
|
|
2120
2120
|
var _a;
|
|
2121
2121
|
const { $checkered, $focusRing } = props, { card, color, style } = props.theme.sanity.v2, border2 = { width: card.border.width, color: "var(--card-border-color)" };
|
|
2122
|
-
return
|
|
2122
|
+
return styled.css`
|
|
2123
2123
|
color-scheme: ${color._dark ? "dark" : "light"};
|
|
2124
2124
|
|
|
2125
2125
|
${_cardColorStyle(color, color, $checkered)}
|
|
@@ -2206,7 +2206,7 @@ function cardColorStyle(props) {
|
|
|
2206
2206
|
${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
|
|
2207
2207
|
`;
|
|
2208
2208
|
}
|
|
2209
|
-
const Root$s =
|
|
2209
|
+
const Root$s = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
|
|
2210
2210
|
const {
|
|
2211
2211
|
__unstable_checkered: checkered = !1,
|
|
2212
2212
|
__unstable_focusRing: focusRing = !1,
|
|
@@ -2252,14 +2252,14 @@ const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRad
|
|
|
2252
2252
|
) });
|
|
2253
2253
|
});
|
|
2254
2254
|
function checkboxBaseStyles() {
|
|
2255
|
-
return
|
|
2255
|
+
return styled.css`
|
|
2256
2256
|
position: relative;
|
|
2257
2257
|
display: inline-block;
|
|
2258
2258
|
`;
|
|
2259
2259
|
}
|
|
2260
2260
|
function inputElementStyles(props) {
|
|
2261
2261
|
const { color, input, radius } = props.theme.sanity.v2, { focusRing } = input.checkbox;
|
|
2262
|
-
return
|
|
2262
|
+
return styled.css`
|
|
2263
2263
|
position: absolute;
|
|
2264
2264
|
top: 0;
|
|
2265
2265
|
left: 0;
|
|
@@ -2370,7 +2370,7 @@ function inputElementStyles(props) {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
`;
|
|
2372
2372
|
}
|
|
2373
|
-
const Root$r =
|
|
2373
|
+
const Root$r = styled__default.default.div(checkboxBaseStyles), Input$5 = styled__default.default.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
|
|
2374
2374
|
const {
|
|
2375
2375
|
checked,
|
|
2376
2376
|
className,
|
|
@@ -2445,7 +2445,7 @@ function codeSyntaxHighlightingStyle({ theme: theme2 }) {
|
|
|
2445
2445
|
};
|
|
2446
2446
|
}
|
|
2447
2447
|
function codeBaseStyle() {
|
|
2448
|
-
return
|
|
2448
|
+
return styled.css`
|
|
2449
2449
|
color: var(--card-code-fg-color);
|
|
2450
2450
|
|
|
2451
2451
|
& code {
|
|
@@ -2473,7 +2473,7 @@ function codeBaseStyle() {
|
|
|
2473
2473
|
}
|
|
2474
2474
|
`;
|
|
2475
2475
|
}
|
|
2476
|
-
const Root$q =
|
|
2476
|
+
const Root$q = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
|
|
2477
2477
|
const { children, language: languageProp, size: size2 = 2, weight, ...restProps } = props, language = typeof languageProp == "string" ? languageProp : void 0, registered = language ? Refractor__default.default.hasLanguage(language) : !1;
|
|
2478
2478
|
return /* @__PURE__ */ jsxRuntime.jsxs(Root$q, { "data-ui": "Code", ...restProps, $size: useArrayProp(size2), $weight: weight, ref, children: [
|
|
2479
2479
|
!(language && registered) && /* @__PURE__ */ jsxRuntime.jsx("code", { children }),
|
|
@@ -2492,7 +2492,7 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2492
2492
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
2493
2493
|
}));
|
|
2494
2494
|
}
|
|
2495
|
-
const Root$p =
|
|
2495
|
+
const Root$p = styled__default.default(Box)(
|
|
2496
2496
|
containerBaseStyle,
|
|
2497
2497
|
responsiveContainerWidthStyle
|
|
2498
2498
|
), Container = react.forwardRef(function(props, ref) {
|
|
@@ -2507,7 +2507,7 @@ const Root$p = styledComponents.styled(Box)(
|
|
|
2507
2507
|
ref
|
|
2508
2508
|
}
|
|
2509
2509
|
);
|
|
2510
|
-
}), Root$o =
|
|
2510
|
+
}), Root$o = styled__default.default(Box)(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
|
|
2511
2511
|
const { as, autoRows, autoCols, autoFlow, columns, gap, gapX, gapY, rows, children, ...restProps } = props;
|
|
2512
2512
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2513
2513
|
Root$o,
|
|
@@ -2531,12 +2531,12 @@ const Root$p = styledComponents.styled(Box)(
|
|
|
2531
2531
|
});
|
|
2532
2532
|
function headingBaseStyle(props) {
|
|
2533
2533
|
const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
|
|
2534
|
-
return
|
|
2535
|
-
${$accent &&
|
|
2534
|
+
return styled.css`
|
|
2535
|
+
${$accent && styled.css`
|
|
2536
2536
|
color: var(--card-accent-fg-color);
|
|
2537
2537
|
`}
|
|
2538
2538
|
|
|
2539
|
-
${$muted &&
|
|
2539
|
+
${$muted && styled.css`
|
|
2540
2540
|
color: var(--card-muted-fg-color);
|
|
2541
2541
|
`}
|
|
2542
2542
|
|
|
@@ -2583,7 +2583,7 @@ function headingBaseStyle(props) {
|
|
|
2583
2583
|
}
|
|
2584
2584
|
`;
|
|
2585
2585
|
}
|
|
2586
|
-
const Root$n =
|
|
2586
|
+
const Root$n = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), SpanWithTextOverflow = styled__default.default.span`
|
|
2587
2587
|
display: block;
|
|
2588
2588
|
white-space: nowrap;
|
|
2589
2589
|
text-overflow: ellipsis;
|
|
@@ -2638,7 +2638,7 @@ function inlineSpaceStyle(props) {
|
|
|
2638
2638
|
};
|
|
2639
2639
|
});
|
|
2640
2640
|
}
|
|
2641
|
-
const Root$m =
|
|
2641
|
+
const Root$m = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
|
|
2642
2642
|
const { as, children: childrenProp, space, ...restProps } = props, children = react.useMemo(
|
|
2643
2643
|
() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: child }, idx)),
|
|
2644
2644
|
[childrenProp]
|
|
@@ -2656,7 +2656,7 @@ const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle),
|
|
|
2656
2656
|
);
|
|
2657
2657
|
});
|
|
2658
2658
|
function kbdStyle() {
|
|
2659
|
-
return
|
|
2659
|
+
return styled.css`
|
|
2660
2660
|
--card-bg-color: var(--card-kbd-bg-color);
|
|
2661
2661
|
--card-border-color: var(--card-kbd-border-color);
|
|
2662
2662
|
--card-fg-color: var(--card-kbd-fg-color);
|
|
@@ -2672,7 +2672,7 @@ function kbdStyle() {
|
|
|
2672
2672
|
}
|
|
2673
2673
|
`;
|
|
2674
2674
|
}
|
|
2675
|
-
const Root$l =
|
|
2675
|
+
const Root$l = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
|
|
2676
2676
|
const { children, fontSize: fontSize2 = 0, padding = 1, radius = 2, ...restProps } = props;
|
|
2677
2677
|
return /* @__PURE__ */ jsxRuntime.jsx(Root$l, { "data-ui": "KBD", ...restProps, $radius: useArrayProp(radius), ref, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }) }) });
|
|
2678
2678
|
}), origin = {
|
|
@@ -2733,8 +2733,8 @@ function getRoundedCommands(points) {
|
|
|
2733
2733
|
function compileCommands(cmds) {
|
|
2734
2734
|
return cmds.map((n, idx) => n.type === "point" ? `${idx === 0 ? "M" : "L"} ${n.x} ${n.y}` : n.type === "curve" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : "").join(" ");
|
|
2735
2735
|
}
|
|
2736
|
-
const Root$k =
|
|
2737
|
-
({ $w: w }) =>
|
|
2736
|
+
const Root$k = styled__default.default.div(
|
|
2737
|
+
({ $w: w }) => styled.css`
|
|
2738
2738
|
position: absolute;
|
|
2739
2739
|
width: ${w}px;
|
|
2740
2740
|
height: ${w}px;
|
|
@@ -2781,9 +2781,9 @@ const Root$k = styledComponents.styled.div(
|
|
|
2781
2781
|
}
|
|
2782
2782
|
}
|
|
2783
2783
|
`
|
|
2784
|
-
), StrokePath =
|
|
2784
|
+
), StrokePath = styled__default.default.path`
|
|
2785
2785
|
stroke: var(--card-shadow-outline-color);
|
|
2786
|
-
`, ShapePath =
|
|
2786
|
+
`, ShapePath = styled__default.default.path`
|
|
2787
2787
|
fill: var(--card-bg-color);
|
|
2788
2788
|
`, Arrow = react.forwardRef(function(props, ref) {
|
|
2789
2789
|
const { width: w, height: h, radius = 0, ...restProps } = props, { card } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [
|
|
@@ -3027,7 +3027,7 @@ function LayerProvider(props) {
|
|
|
3027
3027
|
);
|
|
3028
3028
|
return /* @__PURE__ */ jsxRuntime.jsx(LayerContext.Provider, { value, children });
|
|
3029
3029
|
}
|
|
3030
|
-
const Root$j =
|
|
3030
|
+
const Root$j = styled__default.default.div({ position: "relative" }), LayerChildren = react.forwardRef(function(props, ref) {
|
|
3031
3031
|
const { children, onActivate, onFocus, style = EMPTY_RECORD, ...restProps } = props, { zIndex, isTopLayer } = useLayer(), lastFocusedRef = react.useRef(null), forwardedRef = useForwardedRef(ref), isTopLayerRef = react.useRef(isTopLayer);
|
|
3032
3032
|
react.useEffect(() => {
|
|
3033
3033
|
isTopLayerRef.current !== isTopLayer && isTopLayer && (onActivate == null || onActivate({ activeElement: lastFocusedRef.current })), isTopLayerRef.current = isTopLayer;
|
|
@@ -3098,7 +3098,7 @@ function PortalProvider(props) {
|
|
|
3098
3098
|
}), [boundaryElement, element, elements]);
|
|
3099
3099
|
return /* @__PURE__ */ jsxRuntime.jsx(PortalContext.Provider, { value, children });
|
|
3100
3100
|
}
|
|
3101
|
-
const Root$i =
|
|
3101
|
+
const Root$i = styled__default.default.div`
|
|
3102
3102
|
display: block;
|
|
3103
3103
|
width: 0;
|
|
3104
3104
|
height: 0;
|
|
@@ -3108,9 +3108,9 @@ const Root$i = styledComponents.styled.div`
|
|
|
3108
3108
|
`, SrOnly = react.forwardRef(function(props, ref) {
|
|
3109
3109
|
const { as, children } = props;
|
|
3110
3110
|
return /* @__PURE__ */ jsxRuntime.jsx(Root$i, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children });
|
|
3111
|
-
}), Root$h =
|
|
3111
|
+
}), Root$h = styled__default.default.div`
|
|
3112
3112
|
position: relative;
|
|
3113
|
-
`, ItemWrapper =
|
|
3113
|
+
`, ItemWrapper = styled__default.default.div`
|
|
3114
3114
|
position: absolute;
|
|
3115
3115
|
left: 0;
|
|
3116
3116
|
right: 0;
|
|
@@ -3211,7 +3211,7 @@ function calcMaxWidth(params) {
|
|
|
3211
3211
|
(boundaryWidth || 1 / 0) - DEFAULT_POPOVER_PADDING * 2
|
|
3212
3212
|
);
|
|
3213
3213
|
}
|
|
3214
|
-
const MotionCard$1 =
|
|
3214
|
+
const MotionCard$1 = styled__default.default(framerMotion.motion(Card))`
|
|
3215
3215
|
&:not([hidden]) {
|
|
3216
3216
|
display: flex;
|
|
3217
3217
|
}
|
|
@@ -3485,7 +3485,7 @@ const Popover = react.memo(
|
|
|
3485
3485
|
);
|
|
3486
3486
|
Popover.displayName = "Popover";
|
|
3487
3487
|
function radioBaseStyle() {
|
|
3488
|
-
return
|
|
3488
|
+
return styled.css`
|
|
3489
3489
|
position: relative;
|
|
3490
3490
|
|
|
3491
3491
|
&:not([hidden]) {
|
|
@@ -3499,7 +3499,7 @@ function radioBaseStyle() {
|
|
|
3499
3499
|
}
|
|
3500
3500
|
function inputElementStyle(props) {
|
|
3501
3501
|
const { color, input } = props.theme.sanity.v2, dist = (input.radio.size - input.radio.markSize) / 2;
|
|
3502
|
-
return
|
|
3502
|
+
return styled.css`
|
|
3503
3503
|
appearance: none;
|
|
3504
3504
|
position: absolute;
|
|
3505
3505
|
top: 0;
|
|
@@ -3592,7 +3592,7 @@ function inputElementStyle(props) {
|
|
|
3592
3592
|
}
|
|
3593
3593
|
`;
|
|
3594
3594
|
}
|
|
3595
|
-
const Root$g =
|
|
3595
|
+
const Root$g = styled__default.default.div(radioBaseStyle), Input$4 = styled__default.default.input(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
|
|
3596
3596
|
const { className, disabled, style, customValidity, readOnly, ...restProps } = props, ref = useForwardedRef(forwardedRef);
|
|
3597
3597
|
return useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxRuntime.jsxs(Root$g, { className, "data-ui": "Radio", style, children: [
|
|
3598
3598
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3611,7 +3611,7 @@ const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComp
|
|
|
3611
3611
|
] });
|
|
3612
3612
|
});
|
|
3613
3613
|
function rootStyle() {
|
|
3614
|
-
return
|
|
3614
|
+
return styled.css`
|
|
3615
3615
|
position: relative;
|
|
3616
3616
|
width: -moz-available;
|
|
3617
3617
|
width: -webkit-fill-available;
|
|
@@ -3624,7 +3624,7 @@ function rootStyle() {
|
|
|
3624
3624
|
}
|
|
3625
3625
|
function inputBaseStyle(props) {
|
|
3626
3626
|
const { font } = props.theme.sanity.v2;
|
|
3627
|
-
return
|
|
3627
|
+
return styled.css`
|
|
3628
3628
|
-webkit-font-smoothing: antialiased;
|
|
3629
3629
|
appearance: none;
|
|
3630
3630
|
border: 0;
|
|
@@ -3641,7 +3641,7 @@ function inputBaseStyle(props) {
|
|
|
3641
3641
|
}
|
|
3642
3642
|
function inputColorStyle(props) {
|
|
3643
3643
|
const { color, input } = props.theme.sanity.v2;
|
|
3644
|
-
return
|
|
3644
|
+
return styled.css`
|
|
3645
3645
|
/* enabled */
|
|
3646
3646
|
background-color: ${color.input.default.enabled.bg};
|
|
3647
3647
|
color: ${color.input.default.enabled.fg};
|
|
@@ -3713,7 +3713,7 @@ function inputStyle() {
|
|
|
3713
3713
|
}
|
|
3714
3714
|
function iconBoxStyle(props) {
|
|
3715
3715
|
const { color } = props.theme.sanity.v2;
|
|
3716
|
-
return
|
|
3716
|
+
return styled.css`
|
|
3717
3717
|
pointer-events: none;
|
|
3718
3718
|
position: absolute;
|
|
3719
3719
|
top: 0;
|
|
@@ -3744,7 +3744,7 @@ const selectStyle = {
|
|
|
3744
3744
|
root: rootStyle,
|
|
3745
3745
|
input: inputStyle,
|
|
3746
3746
|
iconBox: iconBoxStyle
|
|
3747
|
-
}, Root$f =
|
|
3747
|
+
}, Root$f = styled__default.default.div(selectStyle.root), Input$3 = styled__default.default.select(selectStyle.input), IconBox = styled__default.default(Box)(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
|
|
3748
3748
|
const {
|
|
3749
3749
|
children,
|
|
3750
3750
|
customValidity,
|
|
@@ -3793,7 +3793,7 @@ function responsiveStackSpaceStyle(props) {
|
|
|
3793
3793
|
gridGap: rem(space[spaceIndex])
|
|
3794
3794
|
}));
|
|
3795
3795
|
}
|
|
3796
|
-
const Root$e =
|
|
3796
|
+
const Root$e = styled__default.default(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
|
|
3797
3797
|
const { as, space, ...restProps } = props;
|
|
3798
3798
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3799
3799
|
Root$e,
|
|
@@ -3808,7 +3808,7 @@ const Root$e = styledComponents.styled(Box)(stackBaseStyle, responsiveStackSpace
|
|
|
3808
3808
|
);
|
|
3809
3809
|
});
|
|
3810
3810
|
function switchBaseStyles() {
|
|
3811
|
-
return
|
|
3811
|
+
return styled.css`
|
|
3812
3812
|
position: relative;
|
|
3813
3813
|
&:not([hidden]) {
|
|
3814
3814
|
display: inline-block;
|
|
@@ -3816,7 +3816,7 @@ function switchBaseStyles() {
|
|
|
3816
3816
|
`;
|
|
3817
3817
|
}
|
|
3818
3818
|
function switchInputStyles() {
|
|
3819
|
-
return
|
|
3819
|
+
return styled.css`
|
|
3820
3820
|
position: absolute;
|
|
3821
3821
|
top: 0;
|
|
3822
3822
|
right: 0;
|
|
@@ -3835,7 +3835,7 @@ function switchInputStyles() {
|
|
|
3835
3835
|
}
|
|
3836
3836
|
function switchRepresentationStyles(props) {
|
|
3837
3837
|
const { color, input } = props.theme.sanity.v2;
|
|
3838
|
-
return
|
|
3838
|
+
return styled.css`
|
|
3839
3839
|
--switch-bg-color: ${color.input.default.enabled.border};
|
|
3840
3840
|
--switch-fg-color: ${color.input.default.enabled.bg};
|
|
3841
3841
|
--switch-box-shadow: none;
|
|
@@ -3908,7 +3908,7 @@ function switchRepresentationStyles(props) {
|
|
|
3908
3908
|
}
|
|
3909
3909
|
function switchTrackStyles(props) {
|
|
3910
3910
|
const { input } = props.theme.sanity.v2;
|
|
3911
|
-
return
|
|
3911
|
+
return styled.css`
|
|
3912
3912
|
&:not([hidden]) {
|
|
3913
3913
|
display: block;
|
|
3914
3914
|
}
|
|
@@ -3923,7 +3923,7 @@ function switchTrackStyles(props) {
|
|
|
3923
3923
|
}
|
|
3924
3924
|
function switchThumbStyles(props) {
|
|
3925
3925
|
const { $indeterminate } = props, { input } = props.theme.sanity.v2, trackWidth = input.switch.width, trackHeight = input.switch.height, trackPadding = input.switch.padding, size2 = trackHeight - input.switch.padding * 2, checkedOffset = trackWidth - trackPadding * 2 - size2, indeterminateOffset = trackWidth / 2 - size2 / 2 - trackPadding, checked = $indeterminate !== !0 && props.$checked === !0;
|
|
3926
|
-
return
|
|
3926
|
+
return styled.css`
|
|
3927
3927
|
&:not([hidden]) {
|
|
3928
3928
|
display: block;
|
|
3929
3929
|
}
|
|
@@ -3940,16 +3940,16 @@ function switchThumbStyles(props) {
|
|
|
3940
3940
|
transform: translate3d(0, 0, 0);
|
|
3941
3941
|
box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
|
|
3942
3942
|
|
|
3943
|
-
${checked &&
|
|
3943
|
+
${checked && styled.css`
|
|
3944
3944
|
transform: translate3d(${checkedOffset}px, 0, 0);
|
|
3945
3945
|
`}
|
|
3946
3946
|
|
|
3947
|
-
${$indeterminate &&
|
|
3947
|
+
${$indeterminate && styled.css`
|
|
3948
3948
|
transform: translate3d(${indeterminateOffset}px, 0, 0);
|
|
3949
3949
|
`}
|
|
3950
3950
|
`;
|
|
3951
3951
|
}
|
|
3952
|
-
const Root$d =
|
|
3952
|
+
const Root$d = styled__default.default.span(switchBaseStyles), Input$2 = styled__default.default.input(switchInputStyles), Representation = styled__default.default.span(switchRepresentationStyles), Track = styled__default.default.span(switchTrackStyles), Thumb = styled__default.default.span(switchThumbStyles), Switch = react.forwardRef(function(props, forwardedRef) {
|
|
3953
3953
|
const { checked, className, disabled, indeterminate, readOnly, style, ...restProps } = props, ref = useForwardedRef(forwardedRef);
|
|
3954
3954
|
return react.useEffect(() => {
|
|
3955
3955
|
ref.current && (ref.current.indeterminate = indeterminate || !1);
|
|
@@ -3970,16 +3970,16 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
3970
3970
|
/* @__PURE__ */ jsxRuntime.jsx(Thumb, { $checked: checked, $indeterminate: indeterminate })
|
|
3971
3971
|
] })
|
|
3972
3972
|
] });
|
|
3973
|
-
}), Root$c =
|
|
3973
|
+
}), Root$c = styled__default.default.span(textInputRootStyle), InputRoot$1 = styled__default.default.span`
|
|
3974
3974
|
flex: 1;
|
|
3975
3975
|
min-width: 0;
|
|
3976
3976
|
display: block;
|
|
3977
3977
|
position: relative;
|
|
3978
|
-
`, Input$1 =
|
|
3978
|
+
`, Input$1 = styled__default.default.textarea(
|
|
3979
3979
|
responsiveInputPaddingStyle,
|
|
3980
3980
|
textInputBaseStyle,
|
|
3981
3981
|
textInputFontSizeStyle
|
|
3982
|
-
), Presentation$1 =
|
|
3982
|
+
), Presentation$1 = styled__default.default.div(
|
|
3983
3983
|
responsiveRadiusStyle,
|
|
3984
3984
|
textInputRepresentationStyle
|
|
3985
3985
|
), TextArea = react.forwardRef(function(props, forwardedRef) {
|
|
@@ -4023,12 +4023,12 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4023
4023
|
}
|
|
4024
4024
|
)
|
|
4025
4025
|
] }) });
|
|
4026
|
-
}), CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Root$b =
|
|
4026
|
+
}), CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Root$b = styled__default.default(Card).attrs({ forwardedAs: "span" })(textInputRootStyle), InputRoot = styled__default.default.span`
|
|
4027
4027
|
flex: 1;
|
|
4028
4028
|
min-width: 0;
|
|
4029
4029
|
display: block;
|
|
4030
4030
|
position: relative;
|
|
4031
|
-
`, Prefix =
|
|
4031
|
+
`, Prefix = styled__default.default(Card).attrs({ forwardedAs: "span" })`
|
|
4032
4032
|
border-top-right-radius: 0;
|
|
4033
4033
|
border-bottom-right-radius: 0;
|
|
4034
4034
|
|
|
@@ -4036,7 +4036,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4036
4036
|
display: block;
|
|
4037
4037
|
margin: -1px;
|
|
4038
4038
|
}
|
|
4039
|
-
`, Suffix =
|
|
4039
|
+
`, Suffix = styled__default.default(Card).attrs({ forwardedAs: "span" })`
|
|
4040
4040
|
border-top-left-radius: 0;
|
|
4041
4041
|
border-bottom-left-radius: 0;
|
|
4042
4042
|
|
|
@@ -4044,27 +4044,27 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
|
|
|
4044
4044
|
display: block;
|
|
4045
4045
|
margin: -1px;
|
|
4046
4046
|
}
|
|
4047
|
-
`, Input =
|
|
4047
|
+
`, Input = styled__default.default.input(
|
|
4048
4048
|
responsiveInputPaddingStyle,
|
|
4049
4049
|
textInputBaseStyle,
|
|
4050
4050
|
textInputFontSizeStyle
|
|
4051
|
-
), Presentation =
|
|
4051
|
+
), Presentation = styled__default.default.span(
|
|
4052
4052
|
responsiveRadiusStyle,
|
|
4053
4053
|
textInputRepresentationStyle
|
|
4054
|
-
), LeftBox =
|
|
4054
|
+
), LeftBox = styled__default.default(Box)`
|
|
4055
4055
|
position: absolute;
|
|
4056
4056
|
top: 0;
|
|
4057
4057
|
left: 0;
|
|
4058
|
-
`, RightBox =
|
|
4058
|
+
`, RightBox = styled__default.default(Box)`
|
|
4059
4059
|
position: absolute;
|
|
4060
4060
|
top: 0;
|
|
4061
4061
|
right: 0;
|
|
4062
|
-
`, RightCard =
|
|
4062
|
+
`, RightCard = styled__default.default(Card)`
|
|
4063
4063
|
background-color: transparent;
|
|
4064
4064
|
position: absolute;
|
|
4065
4065
|
top: 0;
|
|
4066
4066
|
right: 0;
|
|
4067
|
-
`, TextInputClearButton =
|
|
4067
|
+
`, TextInputClearButton = styled__default.default(Button)({
|
|
4068
4068
|
"&:not([hidden])": {
|
|
4069
4069
|
display: "block"
|
|
4070
4070
|
}
|
|
@@ -4244,7 +4244,7 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
|
|
|
4244
4244
|
right: ["right-end", "right-start", "left", "top", "bottom"],
|
|
4245
4245
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4246
4246
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4247
|
-
}, MotionCard =
|
|
4247
|
+
}, MotionCard = styled__default.default(framerMotion.motion(Card))`
|
|
4248
4248
|
& > * {
|
|
4249
4249
|
opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
4250
4250
|
will-change: opacity;
|
|
@@ -4336,7 +4336,7 @@ function TooltipDelayGroupProvider(props) {
|
|
|
4336
4336
|
);
|
|
4337
4337
|
return /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children });
|
|
4338
4338
|
}
|
|
4339
|
-
const Root$a =
|
|
4339
|
+
const Root$a = styled__default.default(Layer)`
|
|
4340
4340
|
pointer-events: none;
|
|
4341
4341
|
max-width: ${({ $maxWidth }) => $maxWidth}px;
|
|
4342
4342
|
`, Tooltip = react.forwardRef(function(props, ref) {
|
|
@@ -4544,15 +4544,15 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4544
4544
|
),
|
|
4545
4545
|
child
|
|
4546
4546
|
] });
|
|
4547
|
-
}), Root$9 =
|
|
4547
|
+
}), Root$9 = styled__default.default.div`
|
|
4548
4548
|
line-height: 0;
|
|
4549
|
-
`, ListBox =
|
|
4549
|
+
`, ListBox = styled__default.default(Box)`
|
|
4550
4550
|
& > ul {
|
|
4551
4551
|
list-style: none;
|
|
4552
4552
|
padding: 0;
|
|
4553
4553
|
margin: 0;
|
|
4554
4554
|
}
|
|
4555
|
-
`, rotate =
|
|
4555
|
+
`, rotate = styled.keyframes`
|
|
4556
4556
|
from {
|
|
4557
4557
|
transform: rotate(0deg);
|
|
4558
4558
|
}
|
|
@@ -4560,7 +4560,7 @@ const Root$a = styledComponents.styled(Layer)`
|
|
|
4560
4560
|
to {
|
|
4561
4561
|
transform: rotate(360deg);
|
|
4562
4562
|
}
|
|
4563
|
-
`, AnimatedSpinnerIcon =
|
|
4563
|
+
`, AnimatedSpinnerIcon = styled__default.default(icons.SpinnerIcon)`
|
|
4564
4564
|
animation: ${rotate} 500ms linear infinite;
|
|
4565
4565
|
`;
|
|
4566
4566
|
function AutocompleteOption(props) {
|
|
@@ -4943,7 +4943,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
4943
4943
|
]
|
|
4944
4944
|
}
|
|
4945
4945
|
);
|
|
4946
|
-
}), Autocomplete = InnerAutocomplete, Root$8 =
|
|
4946
|
+
}), Autocomplete = InnerAutocomplete, Root$8 = styled__default.default.ol`
|
|
4947
4947
|
margin: 0;
|
|
4948
4948
|
padding: 0;
|
|
4949
4949
|
display: flex;
|
|
@@ -4951,7 +4951,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
4951
4951
|
align-items: center;
|
|
4952
4952
|
white-space: nowrap;
|
|
4953
4953
|
line-height: 0;
|
|
4954
|
-
`, ExpandButton =
|
|
4954
|
+
`, ExpandButton = styled__default.default(Button)`
|
|
4955
4955
|
appearance: none;
|
|
4956
4956
|
margin: -4px;
|
|
4957
4957
|
`, Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
@@ -5021,7 +5021,7 @@ function responsiveDialogPositionStyle(props) {
|
|
|
5021
5021
|
return _responsive(media, props.$position, (position) => ({ "&&": { position } }));
|
|
5022
5022
|
}
|
|
5023
5023
|
function animationDialogStyle(props) {
|
|
5024
|
-
return props.$animate ?
|
|
5024
|
+
return props.$animate ? styled.css`
|
|
5025
5025
|
@keyframes zoomIn {
|
|
5026
5026
|
from {
|
|
5027
5027
|
opacity: 0;
|
|
@@ -5046,7 +5046,7 @@ function animationDialogStyle(props) {
|
|
|
5046
5046
|
& > [data-ui='DialogCard'] {
|
|
5047
5047
|
animation: zoomIn 200ms ease-out;
|
|
5048
5048
|
}
|
|
5049
|
-
` :
|
|
5049
|
+
` : styled.css``;
|
|
5050
5050
|
}
|
|
5051
5051
|
const key$3 = Symbol.for("@sanity/ui/context/dialog");
|
|
5052
5052
|
globalScope[key$3] = globalScope[key$3] || react.createContext({ version: 0 });
|
|
@@ -5057,7 +5057,7 @@ function useDialog() {
|
|
|
5057
5057
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
5058
5058
|
return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
5059
5059
|
}
|
|
5060
|
-
const Root$7 =
|
|
5060
|
+
const Root$7 = styled__default.default(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styled__default.default(Container)`
|
|
5061
5061
|
&:not([hidden]) {
|
|
5062
5062
|
display: flex;
|
|
5063
5063
|
}
|
|
@@ -5066,7 +5066,7 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5066
5066
|
flex-direction: column;
|
|
5067
5067
|
align-items: center;
|
|
5068
5068
|
justify-content: center;
|
|
5069
|
-
`, DialogCardRoot =
|
|
5069
|
+
`, DialogCardRoot = styled__default.default(Card)`
|
|
5070
5070
|
&:not([hidden]) {
|
|
5071
5071
|
display: flex;
|
|
5072
5072
|
}
|
|
@@ -5075,19 +5075,19 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5075
5075
|
max-height: 100%;
|
|
5076
5076
|
overflow: hidden;
|
|
5077
5077
|
overflow: clip;
|
|
5078
|
-
`, DialogLayout =
|
|
5078
|
+
`, DialogLayout = styled__default.default(Flex)`
|
|
5079
5079
|
flex: 1;
|
|
5080
5080
|
min-height: 0;
|
|
5081
5081
|
width: 100%;
|
|
5082
|
-
`, DialogHeader =
|
|
5082
|
+
`, DialogHeader = styled__default.default(Box)`
|
|
5083
5083
|
position: relative;
|
|
5084
5084
|
z-index: 2;
|
|
5085
|
-
`, DialogContent =
|
|
5085
|
+
`, DialogContent = styled__default.default(Box)`
|
|
5086
5086
|
position: relative;
|
|
5087
5087
|
z-index: 1;
|
|
5088
5088
|
overflow: auto;
|
|
5089
5089
|
outline: none;
|
|
5090
|
-
`, DialogFooter =
|
|
5090
|
+
`, DialogFooter = styled__default.default(Box)`
|
|
5091
5091
|
position: relative;
|
|
5092
5092
|
z-index: 3;
|
|
5093
5093
|
`, DialogCard = react.forwardRef(function(props, ref) {
|
|
@@ -5269,14 +5269,14 @@ function DialogProvider(props) {
|
|
|
5269
5269
|
);
|
|
5270
5270
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children });
|
|
5271
5271
|
}
|
|
5272
|
-
const Root$6 =
|
|
5272
|
+
const Root$6 = styled__default.default.kbd`
|
|
5273
5273
|
font: inherit;
|
|
5274
5274
|
padding: 1px;
|
|
5275
5275
|
|
|
5276
5276
|
&:not([hidden]) {
|
|
5277
5277
|
display: block;
|
|
5278
5278
|
}
|
|
5279
|
-
`, Key =
|
|
5279
|
+
`, Key = styled__default.default(KBD)`
|
|
5280
5280
|
&:not([hidden]) {
|
|
5281
5281
|
display: block;
|
|
5282
5282
|
}
|
|
@@ -5441,7 +5441,7 @@ function useMenuController(props) {
|
|
|
5441
5441
|
setRootElement
|
|
5442
5442
|
};
|
|
5443
5443
|
}
|
|
5444
|
-
const Root$5 =
|
|
5444
|
+
const Root$5 = styled__default.default(Box)`
|
|
5445
5445
|
outline: none;
|
|
5446
5446
|
overflow: auto;
|
|
5447
5447
|
`, Menu = react.forwardRef(function(props, ref) {
|
|
@@ -5665,14 +5665,14 @@ const Root$5 = styledComponents.styled(Box)`
|
|
|
5665
5665
|
]
|
|
5666
5666
|
);
|
|
5667
5667
|
return /* @__PURE__ */ jsxRuntime.jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}) });
|
|
5668
|
-
}), MenuDivider =
|
|
5668
|
+
}), MenuDivider = styled__default.default.hr`
|
|
5669
5669
|
height: 1px;
|
|
5670
5670
|
border: 0;
|
|
5671
5671
|
background: var(--card-hairline-soft-color);
|
|
5672
5672
|
margin: 0;
|
|
5673
5673
|
`;
|
|
5674
5674
|
function selectableBaseStyle() {
|
|
5675
|
-
return
|
|
5675
|
+
return styled.css`
|
|
5676
5676
|
background-color: inherit;
|
|
5677
5677
|
color: inherit;
|
|
5678
5678
|
|
|
@@ -5697,7 +5697,7 @@ function selectableBaseStyle() {
|
|
|
5697
5697
|
function selectableColorStyle(props) {
|
|
5698
5698
|
var _a;
|
|
5699
5699
|
const { $tone } = props, { color, style } = props.theme.sanity.v2, tone = color.selectable[$tone];
|
|
5700
|
-
return
|
|
5700
|
+
return styled.css`
|
|
5701
5701
|
${_cardColorStyle(color, tone.enabled)}
|
|
5702
5702
|
|
|
5703
5703
|
background-color: var(--card-bg-color);
|
|
@@ -5767,7 +5767,7 @@ function selectableColorStyle(props) {
|
|
|
5767
5767
|
${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
|
|
5768
5768
|
`;
|
|
5769
5769
|
}
|
|
5770
|
-
const Selectable =
|
|
5770
|
+
const Selectable = styled__default.default(Box)(
|
|
5771
5771
|
responsiveRadiusStyle,
|
|
5772
5772
|
selectableBaseStyle,
|
|
5773
5773
|
selectableColorStyle
|
|
@@ -5980,14 +5980,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
5980
5980
|
]
|
|
5981
5981
|
}
|
|
5982
5982
|
);
|
|
5983
|
-
}), keyframe =
|
|
5983
|
+
}), keyframe = styled.keyframes`
|
|
5984
5984
|
0% {
|
|
5985
5985
|
background-position: 100%;
|
|
5986
5986
|
}
|
|
5987
5987
|
100% {
|
|
5988
5988
|
background-position: -100%;
|
|
5989
5989
|
}
|
|
5990
|
-
`, animation =
|
|
5990
|
+
`, animation = styled.css`
|
|
5991
5991
|
background-image: linear-gradient(
|
|
5992
5992
|
to right,
|
|
5993
5993
|
var(--card-skeleton-color-from),
|
|
@@ -6003,12 +6003,12 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6003
6003
|
animation-timing-function: ease-in-out;
|
|
6004
6004
|
animation-iteration-count: infinite;
|
|
6005
6005
|
animation-duration: 2000ms;
|
|
6006
|
-
`, skeletonStyle =
|
|
6006
|
+
`, skeletonStyle = styled.css`
|
|
6007
6007
|
opacity: ${({ $visible }) => $visible ? 1 : 0};
|
|
6008
6008
|
transition: opacity 200ms ease-in;
|
|
6009
6009
|
|
|
6010
6010
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
6011
|
-
${({ $animated }) => $animated ? animation :
|
|
6011
|
+
${({ $animated }) => $animated ? animation : styled.css`
|
|
6012
6012
|
background-color: var(--card-skeleton-color-from);
|
|
6013
6013
|
`}
|
|
6014
6014
|
}
|
|
@@ -6016,7 +6016,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6016
6016
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
6017
6017
|
background-color: var(--card-skeleton-color-from);
|
|
6018
6018
|
}
|
|
6019
|
-
`, Root$4 =
|
|
6019
|
+
`, Root$4 = styled__default.default(Box)(
|
|
6020
6020
|
responsiveRadiusStyle,
|
|
6021
6021
|
skeletonStyle
|
|
6022
6022
|
), Skeleton = react.forwardRef(function(props, ref) {
|
|
@@ -6040,7 +6040,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6040
6040
|
ref
|
|
6041
6041
|
}
|
|
6042
6042
|
);
|
|
6043
|
-
}), Root$3 =
|
|
6043
|
+
}), Root$3 = styled__default.default(Skeleton)((props) => {
|
|
6044
6044
|
const { $size, $style } = props, { font, media } = props.theme.sanity.v2, fontStyle = font[$style];
|
|
6045
6045
|
return _responsive(media, $size, (sizeIndex) => {
|
|
6046
6046
|
const fontSize2 = fontStyle.sizes[sizeIndex];
|
|
@@ -6058,7 +6058,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6058
6058
|
}), CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
6059
6059
|
const { size: size2 = 2, ...restProps } = props, $size = useArrayProp(size2);
|
|
6060
6060
|
return /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "code" });
|
|
6061
|
-
}), CustomButton =
|
|
6061
|
+
}), CustomButton = styled__default.default(Button)`
|
|
6062
6062
|
max-width: 100%;
|
|
6063
6063
|
`, Tab = react.forwardRef(function(props, forwardedRef) {
|
|
6064
6064
|
const {
|
|
@@ -6110,7 +6110,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6110
6110
|
function _isReactElement(node) {
|
|
6111
6111
|
return !!node;
|
|
6112
6112
|
}
|
|
6113
|
-
const CustomInline =
|
|
6113
|
+
const CustomInline = styled__default.default(Inline)`
|
|
6114
6114
|
& > div {
|
|
6115
6115
|
display: inline-block;
|
|
6116
6116
|
vertical-align: middle;
|
|
@@ -6172,13 +6172,13 @@ const CustomInline = styledComponents.styled(Inline)`
|
|
|
6172
6172
|
warning: "alert",
|
|
6173
6173
|
success: "alert",
|
|
6174
6174
|
info: "alert"
|
|
6175
|
-
}, Root$2 =
|
|
6175
|
+
}, Root$2 = styled__default.default(Card)`
|
|
6176
6176
|
pointer-events: all;
|
|
6177
6177
|
& > * {
|
|
6178
6178
|
opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
6179
6179
|
will-change: opacity;
|
|
6180
6180
|
}
|
|
6181
|
-
`, TextBox =
|
|
6181
|
+
`, TextBox = styled__default.default(Flex)`
|
|
6182
6182
|
overflow-x: auto;
|
|
6183
6183
|
`;
|
|
6184
6184
|
function Toast(props) {
|
|
@@ -6224,14 +6224,14 @@ function useMounted() {
|
|
|
6224
6224
|
const subscribe = () => () => {
|
|
6225
6225
|
}, key$1 = Symbol.for("@sanity/ui/context/toast");
|
|
6226
6226
|
globalScope[key$1] = globalScope[key$1] || react.createContext(null);
|
|
6227
|
-
const ToastContext = globalScope[key$1], Root$1 =
|
|
6227
|
+
const ToastContext = globalScope[key$1], Root$1 = styled__default.default(Layer)`
|
|
6228
6228
|
position: fixed;
|
|
6229
6229
|
top: 0;
|
|
6230
6230
|
left: 0;
|
|
6231
6231
|
right: 0;
|
|
6232
6232
|
bottom: 0;
|
|
6233
6233
|
pointer-events: none;
|
|
6234
|
-
`, ToastContainer =
|
|
6234
|
+
`, ToastContainer = styled__default.default.div`
|
|
6235
6235
|
box-sizing: border-box;
|
|
6236
6236
|
position: absolute;
|
|
6237
6237
|
right: 0;
|
|
@@ -6508,7 +6508,7 @@ const TreeContext = globalScope[key], Tree = react.memo(
|
|
|
6508
6508
|
);
|
|
6509
6509
|
Tree.displayName = "Tree";
|
|
6510
6510
|
function treeItemRootStyle() {
|
|
6511
|
-
return
|
|
6511
|
+
return styled.css`
|
|
6512
6512
|
&[role='none'] > [role='treeitem'] {
|
|
6513
6513
|
outline: none;
|
|
6514
6514
|
cursor: default;
|
|
@@ -6541,7 +6541,7 @@ function treeItemRootStyle() {
|
|
|
6541
6541
|
}
|
|
6542
6542
|
function treeItemRootColorStyle(props) {
|
|
6543
6543
|
const $tone = "default", { color } = props.theme.sanity.v2, tone = color.selectable[$tone];
|
|
6544
|
-
return
|
|
6544
|
+
return styled.css`
|
|
6545
6545
|
&[role='none'] {
|
|
6546
6546
|
& > [role='treeitem'] {
|
|
6547
6547
|
${_cardColorStyle(color, tone.enabled)}
|
|
@@ -6585,7 +6585,7 @@ function treeItemRootColorStyle(props) {
|
|
|
6585
6585
|
}
|
|
6586
6586
|
function treeItemBoxStyle(props) {
|
|
6587
6587
|
const { $level } = props, { space } = props.theme.sanity.v2;
|
|
6588
|
-
return
|
|
6588
|
+
return styled.css`
|
|
6589
6589
|
padding-left: ${rem(space[2] * $level)};
|
|
6590
6590
|
|
|
6591
6591
|
&[data-as='a'] {
|
|
@@ -6614,7 +6614,7 @@ const TreeGroup = react.memo(function(props) {
|
|
|
6614
6614
|
children
|
|
6615
6615
|
}
|
|
6616
6616
|
);
|
|
6617
|
-
}), Root = react.memo(
|
|
6617
|
+
}), Root = react.memo(styled__default.default.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styled__default.default(Box).attrs({ forwardedAs: "a" })(treeItemBoxStyle), ToggleArrowText = styled__default.default(Text)`
|
|
6618
6618
|
& > svg {
|
|
6619
6619
|
transition: transform 100ms;
|
|
6620
6620
|
}
|