@sanity/ui 2.0.0-beta.1 → 2.0.0-beta.10
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/LICENSE +1 -1
- package/README.md +6 -3
- package/dist/index.cjs.mjs +11 -36
- package/dist/index.d.ts +248 -268
- package/dist/index.esm.js +494 -354
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +503 -567
- package/dist/index.js.map +1 -1
- package/dist/theme.cjs.mjs +1 -1
- package/dist/theme.d.ts +81 -114
- package/dist/theme.esm.js +299 -252
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +299 -252
- package/dist/theme.js.map +1 -1
- package/package.json +6 -3
- package/src/core/__workshop__/constants.ts +3 -2
- package/src/core/_compat.ts +236 -87
- package/src/core/components/menu/__workshop__/selectedItem.tsx +7 -2
- package/src/core/components/menu/menuButton.tsx +12 -1
- package/src/core/constants.ts +18 -0
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +6 -3
- package/src/core/middleware/origin.ts +47 -0
- package/src/core/primitives/avatar/__workshop__/asButton.tsx +1 -1
- package/src/core/primitives/avatar/__workshop__/stack.tsx +1 -1
- package/src/core/primitives/avatar/avatar.tsx +14 -4
- package/src/core/primitives/avatar/avatarCounter.tsx +16 -5
- package/src/core/primitives/avatar/avatarStack.tsx +2 -2
- package/src/core/primitives/badge/badge.tsx +1 -3
- package/src/core/primitives/kbd/kbd.tsx +2 -0
- package/src/core/primitives/popover/popover.tsx +67 -13
- package/src/core/primitives/popover/popoverCard.tsx +26 -15
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/switch/styles.ts +6 -1
- package/src/core/primitives/tooltip/tooltip.tsx +47 -57
- package/src/core/primitives/tooltip/tooltipCard.tsx +104 -0
- package/src/core/styles/card/_cardColorStyle.ts +2 -0
- package/src/core/styles/margin/marginsStyle.test.ts +2 -2
- package/src/core/styles/padding/paddingStyle.test.ts +2 -2
- package/src/core/theme/__workshop__/build/Root.tsx +20 -3
- package/src/core/theme/__workshop__/build/story.tsx +16 -10
- package/src/core/theme/__workshop__/canvas.tsx +7 -7
- package/src/core/theme/__workshop__/debug/story.tsx +159 -0
- package/src/core/theme/__workshop__/index.ts +5 -0
- package/src/core/theme/theme.test.tsx +2 -2
- package/src/core/types/avatar.ts +1 -1
- package/src/core/types/button.ts +1 -2
- package/src/core/{primitives/tooltip → utils/conditionalWrapper}/conditionalWrapper.tsx +3 -0
- package/src/core/utils/conditionalWrapper/index.ts +1 -0
- package/src/core/utils/index.ts +1 -0
- package/src/theme/build/_deprecated/color/factory.ts +3 -3
- package/src/theme/build/buildColorTheme.ts +16 -16
- package/src/theme/build/colorToken/colorToken.ts +19 -0
- package/src/theme/build/colorToken/compileColorToken.ts +21 -0
- package/src/theme/build/colorToken/index.ts +2 -0
- package/src/theme/build/colorToken/types.ts +6 -0
- package/src/theme/build/renderColorTheme.ts +14 -15
- package/src/theme/build/renderColorValue.ts +9 -2
- package/src/theme/config/system.ts +12 -10
- package/src/theme/config/tokens/color/types.ts +12 -1
- package/src/theme/config/tokens/parseTokenKey.ts +1 -0
- package/src/theme/config/tokens/parseTokenValue.test.ts +13 -16
- package/src/theme/config/tokens/parseTokenValue.ts +45 -14
- package/src/theme/config/tokens/types.ts +3 -2
- package/src/theme/defaults/colorTokens.ts +219 -211
- package/src/theme/defaults/config.ts +2 -1
- package/src/theme/defaults/fonts.ts +13 -5
- package/src/theme/index.ts +0 -7
- package/src/theme/system/color/_constants.ts +5 -2
- package/src/theme/system/color/_system.ts +2 -1
- package/src/theme/system/color/avatar.ts +2 -12
- package/src/theme/system/color/button.ts +4 -20
- package/src/theme/system/color/input.ts +3 -11
- package/src/theme/system/color/selectable.ts +3 -14
- package/src/theme/system/shadow.ts +0 -6
- package/src/theme/system/styles.ts +0 -6
- package/src/theme/system/theme.ts +2 -0
- package/src/theme/system/v0/avatar.ts +1 -1
- package/src/theme/system/v0/color/button.ts +4 -4
- package/src/theme/system/v0/color/card.ts +2 -2
- package/src/theme/system/v0/color/input.ts +3 -3
- package/src/theme/system/v0/color/muted.ts +2 -2
- package/src/theme/system/v0/color/solid.ts +2 -2
- package/src/theme/versioning/themeColor_v0_v2.ts +2 -2
- package/src/theme/versioning/v2_v0.ts +2 -2
- package/src/theme/build/colorToken.ts +0 -39
package/dist/index.js
CHANGED
|
@@ -11,8 +11,8 @@ var styled = require('styled-components');
|
|
|
11
11
|
var icons = require('@sanity/icons');
|
|
12
12
|
var Refractor = require('react-refractor');
|
|
13
13
|
var reactDom$1 = require('@floating-ui/react-dom');
|
|
14
|
-
var reactDom = require('react-dom');
|
|
15
14
|
var framerMotion = require('framer-motion');
|
|
15
|
+
var reactDom = require('react-dom');
|
|
16
16
|
function _interopDefaultCompat(e) {
|
|
17
17
|
return e && typeof e === 'object' && 'default' in e ? e : {
|
|
18
18
|
default: e
|
|
@@ -21,8 +21,36 @@ function _interopDefaultCompat(e) {
|
|
|
21
21
|
var ReactIs__default = /*#__PURE__*/_interopDefaultCompat(ReactIs);
|
|
22
22
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
23
23
|
var Refractor__default = /*#__PURE__*/_interopDefaultCompat(Refractor);
|
|
24
|
+
const createColorTheme = theme.createColorTheme;
|
|
25
|
+
const hexToRgb = theme.hexToRgb;
|
|
26
|
+
const hslToRgb = theme.hslToRgb;
|
|
27
|
+
const multiply = theme.multiply;
|
|
28
|
+
const parseColor = theme.parseColor;
|
|
29
|
+
const rgbToHex = theme.rgbToHex;
|
|
30
|
+
const rgbToHsl = theme.rgbToHsl;
|
|
31
|
+
const rgba = theme.rgba;
|
|
32
|
+
const screen = theme.screen;
|
|
33
|
+
const studioTheme = theme.buildTheme();
|
|
24
34
|
const EMPTY_ARRAY = [];
|
|
25
35
|
const EMPTY_RECORD = {};
|
|
36
|
+
const POPOVER_MOTION_PROPS = {
|
|
37
|
+
initial: {
|
|
38
|
+
opacity: 0.5,
|
|
39
|
+
scale: 0.97
|
|
40
|
+
},
|
|
41
|
+
animate: {
|
|
42
|
+
opacity: 1,
|
|
43
|
+
scale: 1
|
|
44
|
+
},
|
|
45
|
+
exit: {
|
|
46
|
+
opacity: 0,
|
|
47
|
+
scale: 0.97
|
|
48
|
+
},
|
|
49
|
+
transition: {
|
|
50
|
+
duration: 0.4,
|
|
51
|
+
type: "spring"
|
|
52
|
+
}
|
|
53
|
+
};
|
|
26
54
|
function _fillCSSObject(keys, value) {
|
|
27
55
|
return keys.reduce((style, key) => {
|
|
28
56
|
style[key] = value;
|
|
@@ -1481,13 +1509,13 @@ function responsiveInputPaddingIconRightStyle(props) {
|
|
|
1481
1509
|
$iconRight: true
|
|
1482
1510
|
});
|
|
1483
1511
|
}
|
|
1484
|
-
var __freeze$
|
|
1485
|
-
var __defProp$
|
|
1486
|
-
var __template$
|
|
1487
|
-
value: __freeze$
|
|
1512
|
+
var __freeze$F = Object.freeze;
|
|
1513
|
+
var __defProp$G = Object.defineProperty;
|
|
1514
|
+
var __template$F = (cooked, raw) => __freeze$F(__defProp$G(cooked, "raw", {
|
|
1515
|
+
value: __freeze$F(raw || cooked.slice())
|
|
1488
1516
|
}));
|
|
1489
|
-
var _a$
|
|
1490
|
-
const ROOT_STYLE = styled.css(_a$
|
|
1517
|
+
var _a$F, _b$n, _c$c;
|
|
1518
|
+
const ROOT_STYLE = styled.css(_a$F || (_a$F = __template$F(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
|
|
1491
1519
|
function textInputRootStyle() {
|
|
1492
1520
|
return ROOT_STYLE;
|
|
1493
1521
|
}
|
|
@@ -1501,7 +1529,7 @@ function textInputBaseStyle(props) {
|
|
|
1501
1529
|
color,
|
|
1502
1530
|
font
|
|
1503
1531
|
} = theme.getTheme_v2(props.theme);
|
|
1504
|
-
return styled.css(_b$n || (_b$n = __template$
|
|
1532
|
+
return styled.css(_b$n || (_b$n = __template$F(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.text.family, $weight && font.text.weights[$weight] || font.text.weights.regular, $scheme, $tone, color.input.default.enabled.fg, color.input.default.enabled.placeholder, color.input.default.enabled.fg, color.input.default.enabled.placeholder, color.input.default.disabled.fg, color.input.default.disabled.placeholder, color.input.invalid.enabled.fg, color.input.invalid.enabled.placeholder, color.input.default.readOnly.fg, color.input.default.readOnly.placeholder);
|
|
1505
1533
|
}
|
|
1506
1534
|
function textInputFontSizeStyle(props) {
|
|
1507
1535
|
const {
|
|
@@ -1528,7 +1556,7 @@ function textInputRepresentationStyle(props) {
|
|
|
1528
1556
|
color,
|
|
1529
1557
|
input
|
|
1530
1558
|
} = theme.getTheme_v2(props.theme);
|
|
1531
|
-
return styled.css(_c$c || (_c$c = __template$
|
|
1559
|
+
return styled.css(_c$c || (_c$c = __template$F(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
1532
1560
|
color: color.input.default.enabled.border,
|
|
1533
1561
|
width: input.border.width
|
|
1534
1562
|
}), color.input.invalid.enabled.bg, color.input.invalid.enabled.fg, focusRingBorderStyle({
|
|
@@ -1602,12 +1630,12 @@ function responsiveShadowStyle(props) {
|
|
|
1602
1630
|
} = theme.getTheme_v2(props.theme);
|
|
1603
1631
|
return _responsive(media, props.$shadow, index => shadowStyle(shadow[index], card.shadow.outline));
|
|
1604
1632
|
}
|
|
1605
|
-
var __freeze$
|
|
1606
|
-
var __defProp$
|
|
1607
|
-
var __template$
|
|
1608
|
-
value: __freeze$
|
|
1633
|
+
var __freeze$E = Object.freeze;
|
|
1634
|
+
var __defProp$F = Object.defineProperty;
|
|
1635
|
+
var __template$E = (cooked, raw) => __freeze$E(__defProp$F(cooked, "raw", {
|
|
1636
|
+
value: __freeze$E(raw || cooked.slice())
|
|
1609
1637
|
}));
|
|
1610
|
-
var _a$
|
|
1638
|
+
var _a$E, _b$m, _c$b;
|
|
1611
1639
|
function labelBaseStyle(props) {
|
|
1612
1640
|
const {
|
|
1613
1641
|
$accent,
|
|
@@ -1616,16 +1644,16 @@ function labelBaseStyle(props) {
|
|
|
1616
1644
|
const {
|
|
1617
1645
|
font
|
|
1618
1646
|
} = theme.getTheme_v2(props.theme);
|
|
1619
|
-
return styled.css(_c$b || (_c$b = __template$
|
|
1647
|
+
return styled.css(_c$b || (_c$b = __template$E(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && styled.css(_a$E || (_a$E = __template$E(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$m || (_b$m = __template$E(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
1620
1648
|
}
|
|
1621
|
-
var __freeze$
|
|
1622
|
-
var __defProp$
|
|
1623
|
-
var __template$
|
|
1624
|
-
value: __freeze$
|
|
1649
|
+
var __freeze$D = Object.freeze;
|
|
1650
|
+
var __defProp$E = Object.defineProperty;
|
|
1651
|
+
var __template$D = (cooked, raw) => __freeze$D(__defProp$E(cooked, "raw", {
|
|
1652
|
+
value: __freeze$D(raw || cooked.slice())
|
|
1625
1653
|
}));
|
|
1626
|
-
var _a$
|
|
1627
|
-
const Root$
|
|
1628
|
-
const SpanWithTextOverflow$2 = styled__default.default.span(_a$
|
|
1654
|
+
var _a$D;
|
|
1655
|
+
const Root$C = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
1656
|
+
const SpanWithTextOverflow$2 = styled__default.default.span(_a$D || (_a$D = __template$D(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
1629
1657
|
const Label = react.forwardRef(function Label2(props, ref) {
|
|
1630
1658
|
const {
|
|
1631
1659
|
accent,
|
|
@@ -1647,7 +1675,7 @@ const Label = react.forwardRef(function Label2(props, ref) {
|
|
|
1647
1675
|
children
|
|
1648
1676
|
});
|
|
1649
1677
|
}
|
|
1650
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
1678
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$C, {
|
|
1651
1679
|
"data-ui": "Label",
|
|
1652
1680
|
...restProps,
|
|
1653
1681
|
$accent: accent,
|
|
@@ -1806,7 +1834,7 @@ function avatarStrokeStyle() {
|
|
|
1806
1834
|
}
|
|
1807
1835
|
};
|
|
1808
1836
|
}
|
|
1809
|
-
const Root$
|
|
1837
|
+
const Root$B = styled__default.default.div(responsiveAvatarSizeStyle, avatarStyle.root);
|
|
1810
1838
|
const Arrow$1 = styled__default.default.div(avatarStyle.arrow);
|
|
1811
1839
|
const BgStroke = styled__default.default.ellipse(avatarStyle.bgStroke);
|
|
1812
1840
|
const Stroke = styled__default.default.ellipse(avatarStyle.stroke);
|
|
@@ -1827,14 +1855,14 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1827
1855
|
arrowPosition: arrowPositionProp,
|
|
1828
1856
|
animateArrowFrom,
|
|
1829
1857
|
status = "online",
|
|
1830
|
-
size: sizeProp =
|
|
1858
|
+
size: sizeProp = 1,
|
|
1831
1859
|
...restProps
|
|
1832
1860
|
} = props;
|
|
1833
|
-
const as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div";
|
|
1834
|
-
const size = useArrayProp(sizeProp);
|
|
1835
1861
|
const {
|
|
1836
1862
|
avatar
|
|
1837
1863
|
} = useTheme_v2();
|
|
1864
|
+
const as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div";
|
|
1865
|
+
const size = useArrayProp(sizeProp);
|
|
1838
1866
|
const avatarSize = avatar.sizes[size[0]] || avatar.sizes[0];
|
|
1839
1867
|
const _sizeRem = avatarSize.size;
|
|
1840
1868
|
const _radius = _sizeRem / 2;
|
|
@@ -1856,8 +1884,13 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1856
1884
|
onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
1857
1885
|
}
|
|
1858
1886
|
}, [onImageLoadError]);
|
|
1859
|
-
const initialsSize = react.useMemo(() => size.map(s =>
|
|
1860
|
-
|
|
1887
|
+
const initialsSize = react.useMemo(() => size.map(s => {
|
|
1888
|
+
if (s === 1) return 1;
|
|
1889
|
+
if (s === 2) return 3;
|
|
1890
|
+
if (s === 3) return 5;
|
|
1891
|
+
return 0;
|
|
1892
|
+
}), [size]);
|
|
1893
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$B, {
|
|
1861
1894
|
as,
|
|
1862
1895
|
"data-as": typeof as === "string" ? as : void 0,
|
|
1863
1896
|
"data-ui": "Avatar",
|
|
@@ -1919,73 +1952,19 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1919
1952
|
children: /* @__PURE__ */jsxRuntime.jsx(InitialsLabel, {
|
|
1920
1953
|
forwardedAs: "span",
|
|
1921
1954
|
size: initialsSize,
|
|
1955
|
+
weight: "medium",
|
|
1922
1956
|
children: initials
|
|
1923
1957
|
})
|
|
1924
1958
|
})
|
|
1925
1959
|
})]
|
|
1926
1960
|
});
|
|
1927
1961
|
});
|
|
1928
|
-
var __freeze$
|
|
1929
|
-
var __defProp$
|
|
1930
|
-
var __template$
|
|
1931
|
-
value: __freeze$
|
|
1932
|
-
}));
|
|
1933
|
-
var _a$A, _b$l, _c$a;
|
|
1934
|
-
function textBaseStyle(props) {
|
|
1935
|
-
const {
|
|
1936
|
-
$accent,
|
|
1937
|
-
$muted
|
|
1938
|
-
} = props;
|
|
1939
|
-
const {
|
|
1940
|
-
font
|
|
1941
|
-
} = theme.getTheme_v2(props.theme);
|
|
1942
|
-
return styled.css(_c$a || (_c$a = __template$A(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n\n & path {\n vector-effect: non-scaling-stroke !important;\n }\n }\n "])), $accent && styled.css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family, font.text.weights.bold);
|
|
1943
|
-
}
|
|
1944
|
-
var __freeze$z = Object.freeze;
|
|
1945
|
-
var __defProp$A = Object.defineProperty;
|
|
1946
|
-
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
1947
|
-
value: __freeze$z(raw || cooked.slice())
|
|
1948
|
-
}));
|
|
1949
|
-
var _a$z;
|
|
1950
|
-
const Root$B = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
1951
|
-
const SpanWithTextOverflow$1 = styled__default.default.span(_a$z || (_a$z = __template$z(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
1952
|
-
const Text = react.forwardRef(function Text2(props, ref) {
|
|
1953
|
-
const {
|
|
1954
|
-
accent = false,
|
|
1955
|
-
align,
|
|
1956
|
-
children: childrenProp,
|
|
1957
|
-
muted = false,
|
|
1958
|
-
size = 2,
|
|
1959
|
-
textOverflow,
|
|
1960
|
-
weight,
|
|
1961
|
-
...restProps
|
|
1962
|
-
} = props;
|
|
1963
|
-
let children = childrenProp;
|
|
1964
|
-
if (textOverflow === "ellipsis") {
|
|
1965
|
-
children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
|
|
1966
|
-
children
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$B, {
|
|
1970
|
-
"data-ui": "Text",
|
|
1971
|
-
...restProps,
|
|
1972
|
-
$accent: accent,
|
|
1973
|
-
$align: useArrayProp(align),
|
|
1974
|
-
$muted: muted,
|
|
1975
|
-
ref,
|
|
1976
|
-
$size: useArrayProp(size),
|
|
1977
|
-
$weight: weight,
|
|
1978
|
-
children: /* @__PURE__ */jsxRuntime.jsx("span", {
|
|
1979
|
-
children
|
|
1980
|
-
})
|
|
1981
|
-
});
|
|
1982
|
-
});
|
|
1983
|
-
var __freeze$y = Object.freeze;
|
|
1984
|
-
var __defProp$z = Object.defineProperty;
|
|
1985
|
-
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
1986
|
-
value: __freeze$y(raw || cooked.slice())
|
|
1962
|
+
var __freeze$C = Object.freeze;
|
|
1963
|
+
var __defProp$D = Object.defineProperty;
|
|
1964
|
+
var __template$C = (cooked, raw) => __freeze$C(__defProp$D(cooked, "raw", {
|
|
1965
|
+
value: __freeze$C(raw || cooked.slice())
|
|
1987
1966
|
}));
|
|
1988
|
-
var _a$
|
|
1967
|
+
var _a$C;
|
|
1989
1968
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1990
1969
|
const {
|
|
1991
1970
|
avatar,
|
|
@@ -2005,23 +1984,28 @@ function _avatarCounterBaseStyle(props) {
|
|
|
2005
1984
|
const {
|
|
2006
1985
|
space
|
|
2007
1986
|
} = theme.getTheme_v2(props.theme);
|
|
2008
|
-
return styled.css(_a$
|
|
1987
|
+
return styled.css(_a$C || (_a$C = __template$C(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n inset 0 0 0 1px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(space[2]));
|
|
2009
1988
|
}
|
|
2010
1989
|
const Root$A = styled__default.default.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
2011
1990
|
const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
|
|
2012
1991
|
const {
|
|
2013
1992
|
count,
|
|
2014
|
-
size: sizeProp =
|
|
1993
|
+
size: sizeProp = 1
|
|
2015
1994
|
} = props;
|
|
2016
1995
|
const size = useArrayProp(sizeProp);
|
|
2017
|
-
const
|
|
1996
|
+
const fontSize = react.useMemo(() => size.map(s => {
|
|
1997
|
+
if (s === 1) return 1;
|
|
1998
|
+
if (s === 2) return 3;
|
|
1999
|
+
if (s === 3) return 5;
|
|
2000
|
+
return 0;
|
|
2001
|
+
}), [size]);
|
|
2018
2002
|
return /* @__PURE__ */jsxRuntime.jsx(Root$A, {
|
|
2019
2003
|
$size: size,
|
|
2020
2004
|
"data-ui": "AvatarCounter",
|
|
2021
2005
|
ref,
|
|
2022
|
-
children: /* @__PURE__ */jsxRuntime.jsx(
|
|
2006
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Label, {
|
|
2023
2007
|
as: "span",
|
|
2024
|
-
size:
|
|
2008
|
+
size: fontSize,
|
|
2025
2009
|
weight: "medium",
|
|
2026
2010
|
children: count
|
|
2027
2011
|
})
|
|
@@ -2031,13 +2015,13 @@ function childrenToElementArray(children) {
|
|
|
2031
2015
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
2032
2016
|
return childrenArray.filter(node => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node === "string");
|
|
2033
2017
|
}
|
|
2034
|
-
var __freeze$
|
|
2035
|
-
var __defProp$
|
|
2036
|
-
var __template$
|
|
2037
|
-
value: __freeze$
|
|
2018
|
+
var __freeze$B = Object.freeze;
|
|
2019
|
+
var __defProp$C = Object.defineProperty;
|
|
2020
|
+
var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
|
|
2021
|
+
value: __freeze$B(raw || cooked.slice())
|
|
2038
2022
|
}));
|
|
2039
|
-
var _a$
|
|
2040
|
-
const BASE_STYLES = styled.css(_a$
|
|
2023
|
+
var _a$B;
|
|
2024
|
+
const BASE_STYLES = styled.css(_a$B || (_a$B = __template$B(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
|
|
2041
2025
|
function avatarStackStyle() {
|
|
2042
2026
|
return BASE_STYLES;
|
|
2043
2027
|
}
|
|
@@ -2061,7 +2045,7 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2061
2045
|
const {
|
|
2062
2046
|
children: childrenProp,
|
|
2063
2047
|
maxLength: maxLengthProp = 4,
|
|
2064
|
-
size: sizeProp =
|
|
2048
|
+
size: sizeProp = 1,
|
|
2065
2049
|
...restProps
|
|
2066
2050
|
} = props;
|
|
2067
2051
|
const children = childrenToElementArray(childrenProp).filter(child => typeof child !== "string");
|
|
@@ -2078,7 +2062,8 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2078
2062
|
$size: size,
|
|
2079
2063
|
children: [len === 0 && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2080
2064
|
children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
|
|
2081
|
-
count: len
|
|
2065
|
+
count: len,
|
|
2066
|
+
size
|
|
2082
2067
|
})
|
|
2083
2068
|
}), len !== 0 && extraCount > 1 && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2084
2069
|
children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
|
|
@@ -2157,6 +2142,61 @@ const Box = react.forwardRef(function Box2(props, ref) {
|
|
|
2157
2142
|
children: props.children
|
|
2158
2143
|
});
|
|
2159
2144
|
});
|
|
2145
|
+
var __freeze$A = Object.freeze;
|
|
2146
|
+
var __defProp$B = Object.defineProperty;
|
|
2147
|
+
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
2148
|
+
value: __freeze$A(raw || cooked.slice())
|
|
2149
|
+
}));
|
|
2150
|
+
var _a$A, _b$l, _c$a;
|
|
2151
|
+
function textBaseStyle(props) {
|
|
2152
|
+
const {
|
|
2153
|
+
$accent,
|
|
2154
|
+
$muted
|
|
2155
|
+
} = props;
|
|
2156
|
+
const {
|
|
2157
|
+
font
|
|
2158
|
+
} = theme.getTheme_v2(props.theme);
|
|
2159
|
+
return styled.css(_c$a || (_c$a = __template$A(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n color: var(--card-icon-color);\n\n & path {\n vector-effect: non-scaling-stroke !important;\n }\n }\n "])), $accent && styled.css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family, font.text.weights.bold);
|
|
2160
|
+
}
|
|
2161
|
+
var __freeze$z = Object.freeze;
|
|
2162
|
+
var __defProp$A = Object.defineProperty;
|
|
2163
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
2164
|
+
value: __freeze$z(raw || cooked.slice())
|
|
2165
|
+
}));
|
|
2166
|
+
var _a$z;
|
|
2167
|
+
const Root$x = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
2168
|
+
const SpanWithTextOverflow$1 = styled__default.default.span(_a$z || (_a$z = __template$z(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
2169
|
+
const Text = react.forwardRef(function Text2(props, ref) {
|
|
2170
|
+
const {
|
|
2171
|
+
accent = false,
|
|
2172
|
+
align,
|
|
2173
|
+
children: childrenProp,
|
|
2174
|
+
muted = false,
|
|
2175
|
+
size = 2,
|
|
2176
|
+
textOverflow,
|
|
2177
|
+
weight,
|
|
2178
|
+
...restProps
|
|
2179
|
+
} = props;
|
|
2180
|
+
let children = childrenProp;
|
|
2181
|
+
if (textOverflow === "ellipsis") {
|
|
2182
|
+
children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
|
|
2183
|
+
children
|
|
2184
|
+
});
|
|
2185
|
+
}
|
|
2186
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$x, {
|
|
2187
|
+
"data-ui": "Text",
|
|
2188
|
+
...restProps,
|
|
2189
|
+
$accent: accent,
|
|
2190
|
+
$align: useArrayProp(align),
|
|
2191
|
+
$muted: muted,
|
|
2192
|
+
ref,
|
|
2193
|
+
$size: useArrayProp(size),
|
|
2194
|
+
$weight: weight,
|
|
2195
|
+
children: /* @__PURE__ */jsxRuntime.jsx("span", {
|
|
2196
|
+
children
|
|
2197
|
+
})
|
|
2198
|
+
});
|
|
2199
|
+
});
|
|
2160
2200
|
function badgeStyle(props) {
|
|
2161
2201
|
const {
|
|
2162
2202
|
$tone
|
|
@@ -2172,7 +2212,7 @@ function badgeStyle(props) {
|
|
|
2172
2212
|
}
|
|
2173
2213
|
};
|
|
2174
2214
|
}
|
|
2175
|
-
const Root$
|
|
2215
|
+
const Root$w = styled__default.default(Box)(responsiveRadiusStyle, badgeStyle);
|
|
2176
2216
|
const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
2177
2217
|
const {
|
|
2178
2218
|
children,
|
|
@@ -2184,7 +2224,7 @@ const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
|
2184
2224
|
tone = "default",
|
|
2185
2225
|
...restProps
|
|
2186
2226
|
} = props;
|
|
2187
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2227
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$w, {
|
|
2188
2228
|
"data-ui": "Badge",
|
|
2189
2229
|
...restProps,
|
|
2190
2230
|
$tone: tone,
|
|
@@ -2193,12 +2233,11 @@ const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
|
2193
2233
|
ref,
|
|
2194
2234
|
children: /* @__PURE__ */jsxRuntime.jsx(Text, {
|
|
2195
2235
|
size: fontSize,
|
|
2196
|
-
weight: "medium",
|
|
2197
2236
|
children
|
|
2198
2237
|
})
|
|
2199
2238
|
});
|
|
2200
2239
|
});
|
|
2201
|
-
const Root$
|
|
2240
|
+
const Root$v = styled__default.default(Box)(flexItemStyle, responsiveFlexStyle);
|
|
2202
2241
|
const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
2203
2242
|
const {
|
|
2204
2243
|
align,
|
|
@@ -2209,7 +2248,7 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
|
2209
2248
|
wrap,
|
|
2210
2249
|
...restProps
|
|
2211
2250
|
} = props;
|
|
2212
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2251
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$v, {
|
|
2213
2252
|
"data-ui": "Flex",
|
|
2214
2253
|
...restProps,
|
|
2215
2254
|
$align: useArrayProp(align),
|
|
@@ -2221,16 +2260,16 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
|
2221
2260
|
ref
|
|
2222
2261
|
});
|
|
2223
2262
|
});
|
|
2224
|
-
var __freeze$
|
|
2225
|
-
var __defProp$
|
|
2226
|
-
var __template$
|
|
2227
|
-
value: __freeze$
|
|
2263
|
+
var __freeze$y = Object.freeze;
|
|
2264
|
+
var __defProp$z = Object.defineProperty;
|
|
2265
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
2266
|
+
value: __freeze$y(raw || cooked.slice())
|
|
2228
2267
|
}));
|
|
2229
|
-
var _a$
|
|
2230
|
-
const rotate$1 = styled.keyframes(_a$
|
|
2231
|
-
const Root$
|
|
2268
|
+
var _a$y, _b$k;
|
|
2269
|
+
const rotate$1 = styled.keyframes(_a$y || (_a$y = __template$y(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
2270
|
+
const Root$u = styled__default.default(Text)(_b$k || (_b$k = __template$y(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
|
|
2232
2271
|
const Spinner = react.forwardRef(function Spinner2(props, ref) {
|
|
2233
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2272
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$u, {
|
|
2234
2273
|
"data-ui": "Spinner",
|
|
2235
2274
|
...props,
|
|
2236
2275
|
ref,
|
|
@@ -2241,6 +2280,7 @@ function _cardColorStyle(base, color) {
|
|
|
2241
2280
|
let checkered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
2242
2281
|
return {
|
|
2243
2282
|
// from base
|
|
2283
|
+
"--card-backdrop-color": base.backdrop,
|
|
2244
2284
|
"--card-focus-ring-color": base.focusRing,
|
|
2245
2285
|
"--card-shadow-outline-color": base.shadow.outline,
|
|
2246
2286
|
"--card-shadow-umbra-color": base.shadow.umbra,
|
|
@@ -2308,12 +2348,12 @@ function _cardColorStyle(base, color) {
|
|
|
2308
2348
|
"--card-hairline-hard-color": color.border
|
|
2309
2349
|
};
|
|
2310
2350
|
}
|
|
2311
|
-
var __freeze$
|
|
2312
|
-
var __defProp$
|
|
2313
|
-
var __template$
|
|
2314
|
-
value: __freeze$
|
|
2351
|
+
var __freeze$x = Object.freeze;
|
|
2352
|
+
var __defProp$y = Object.defineProperty;
|
|
2353
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
2354
|
+
value: __freeze$x(raw || cooked.slice())
|
|
2315
2355
|
}));
|
|
2316
|
-
var _a$
|
|
2356
|
+
var _a$x, _b$j;
|
|
2317
2357
|
function buttonBaseStyles(props) {
|
|
2318
2358
|
const {
|
|
2319
2359
|
$width
|
|
@@ -2321,7 +2361,7 @@ function buttonBaseStyles(props) {
|
|
|
2321
2361
|
const {
|
|
2322
2362
|
style
|
|
2323
2363
|
} = theme.getTheme_v2(props.theme);
|
|
2324
|
-
return styled.css(_b$j || (_b$j = __template$
|
|
2364
|
+
return styled.css(_b$j || (_b$j = __template$x(["\n ", ";\n\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n vertical-align: top;\n\n ", "\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])), style == null ? void 0 : style.button, $width === "fill" && styled.css(_a$x || (_a$x = __template$x(["\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n "]))));
|
|
2325
2365
|
}
|
|
2326
2366
|
function combineBoxShadow() {
|
|
2327
2367
|
for (var _len = arguments.length, boxShadows = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -2376,14 +2416,14 @@ function buttonColorStyles(props) {
|
|
|
2376
2416
|
}
|
|
2377
2417
|
}, (_a2 = style == null ? void 0 : style.button) == null ? void 0 : _a2.root].filter(Boolean);
|
|
2378
2418
|
}
|
|
2379
|
-
var __freeze$
|
|
2380
|
-
var __defProp$
|
|
2381
|
-
var __template$
|
|
2382
|
-
value: __freeze$
|
|
2419
|
+
var __freeze$w = Object.freeze;
|
|
2420
|
+
var __defProp$x = Object.defineProperty;
|
|
2421
|
+
var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
|
|
2422
|
+
value: __freeze$w(raw || cooked.slice())
|
|
2383
2423
|
}));
|
|
2384
|
-
var _a$
|
|
2385
|
-
const Root$
|
|
2386
|
-
const LoadingBox = styled__default.default.div(_a$
|
|
2424
|
+
var _a$w;
|
|
2425
|
+
const Root$t = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
|
|
2426
|
+
const LoadingBox = styled__default.default.div(_a$w || (_a$w = __template$w(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])));
|
|
2387
2427
|
const Button = react.forwardRef(function Button2(props, ref) {
|
|
2388
2428
|
const {
|
|
2389
2429
|
children,
|
|
@@ -2435,7 +2475,7 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2435
2475
|
paddingLeft,
|
|
2436
2476
|
paddingRight
|
|
2437
2477
|
}), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
|
|
2438
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2478
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$t, {
|
|
2439
2479
|
"data-ui": "Button",
|
|
2440
2480
|
...restProps,
|
|
2441
2481
|
$mode: mode,
|
|
@@ -2481,12 +2521,12 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2481
2521
|
})]
|
|
2482
2522
|
});
|
|
2483
2523
|
});
|
|
2484
|
-
var __freeze$
|
|
2485
|
-
var __defProp$
|
|
2486
|
-
var __template$
|
|
2487
|
-
value: __freeze$
|
|
2524
|
+
var __freeze$v = Object.freeze;
|
|
2525
|
+
var __defProp$w = Object.defineProperty;
|
|
2526
|
+
var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
|
|
2527
|
+
value: __freeze$v(raw || cooked.slice())
|
|
2488
2528
|
}));
|
|
2489
|
-
var _a$
|
|
2529
|
+
var _a$v, _b$i, _c$9;
|
|
2490
2530
|
function cardStyle(props) {
|
|
2491
2531
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
2492
2532
|
}
|
|
@@ -2497,7 +2537,7 @@ function cardBaseStyle(props) {
|
|
|
2497
2537
|
const {
|
|
2498
2538
|
space
|
|
2499
2539
|
} = theme.getTheme_v2(props.theme);
|
|
2500
|
-
return styled.css(_b$i || (_b$i = __template$
|
|
2540
|
+
return styled.css(_b$i || (_b$i = __template$v(["\n ", "\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n "])), $checkered && styled.css(_a$v || (_a$v = __template$v(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
|
|
2501
2541
|
}
|
|
2502
2542
|
function cardColorStyle(props) {
|
|
2503
2543
|
var _a2;
|
|
@@ -2514,7 +2554,7 @@ function cardColorStyle(props) {
|
|
|
2514
2554
|
width: card.border.width,
|
|
2515
2555
|
color: "var(--card-border-color)"
|
|
2516
2556
|
};
|
|
2517
|
-
return styled.css(_c$9 || (_c$9 = __template$
|
|
2557
|
+
return styled.css(_c$9 || (_c$9 = __template$v(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus-visible {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n ", "\n "])), color._dark ? "dark" : "light", _cardColorStyle(color, color, $checkered), _cardColorStyle(color, color.selectable.default.disabled, $checkered), _cardColorStyle(color, color.selectable.default.pressed, $checkered), _cardColorStyle(color, color.selectable.default.selected, $checkered), _cardColorStyle(color, color.selectable.default.hovered, $checkered), _cardColorStyle(color, color.selectable.default.pressed, $checkered), $focusRing ? focusRingStyle({
|
|
2518
2558
|
base: color,
|
|
2519
2559
|
border,
|
|
2520
2560
|
focusRing: card.focusRing
|
|
@@ -2524,7 +2564,7 @@ function cardColorStyle(props) {
|
|
|
2524
2564
|
focusRing: card.focusRing
|
|
2525
2565
|
}) : void 0, (_a2 = style == null ? void 0 : style.card) == null ? void 0 : _a2.root);
|
|
2526
2566
|
}
|
|
2527
|
-
const Root$
|
|
2567
|
+
const Root$s = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
2528
2568
|
const Card = react.forwardRef(function Card2(props, ref) {
|
|
2529
2569
|
const {
|
|
2530
2570
|
__unstable_checkered: checkered = false,
|
|
@@ -2549,7 +2589,7 @@ const Card = react.forwardRef(function Card2(props, ref) {
|
|
|
2549
2589
|
return /* @__PURE__ */jsxRuntime.jsx(ThemeColorProvider, {
|
|
2550
2590
|
scheme,
|
|
2551
2591
|
tone,
|
|
2552
|
-
children: /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2592
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Root$s, {
|
|
2553
2593
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2554
2594
|
"data-scheme": rootTheme.scheme,
|
|
2555
2595
|
"data-ui": "Card",
|
|
@@ -2574,14 +2614,14 @@ const Card = react.forwardRef(function Card2(props, ref) {
|
|
|
2574
2614
|
})
|
|
2575
2615
|
});
|
|
2576
2616
|
});
|
|
2577
|
-
var __freeze$
|
|
2578
|
-
var __defProp$
|
|
2579
|
-
var __template$
|
|
2580
|
-
value: __freeze$
|
|
2617
|
+
var __freeze$u = Object.freeze;
|
|
2618
|
+
var __defProp$v = Object.defineProperty;
|
|
2619
|
+
var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
|
|
2620
|
+
value: __freeze$u(raw || cooked.slice())
|
|
2581
2621
|
}));
|
|
2582
|
-
var _a$
|
|
2622
|
+
var _a$u, _b$h;
|
|
2583
2623
|
function checkboxBaseStyles() {
|
|
2584
|
-
return styled.css(_a$
|
|
2624
|
+
return styled.css(_a$u || (_a$u = __template$u(["\n position: relative;\n display: inline-block;\n "])));
|
|
2585
2625
|
}
|
|
2586
2626
|
function inputElementStyles(props) {
|
|
2587
2627
|
const {
|
|
@@ -2592,7 +2632,7 @@ function inputElementStyles(props) {
|
|
|
2592
2632
|
const {
|
|
2593
2633
|
focusRing
|
|
2594
2634
|
} = input.checkbox;
|
|
2595
|
-
return styled.css(_b$h || (_b$h = __template$
|
|
2635
|
+
return styled.css(_b$h || (_b$h = __template$u(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 1.5px !important;\n }\n }\n }\n\n &:checked + span {\n background: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ", ";\n }\n\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &[data-error]&:checked + span {\n background-color: ", ";\n color: ", ";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n &:disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &:disabled&:checked + span {\n background-color: ", ";\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
|
|
2596
2636
|
color: color.input.default.enabled.border,
|
|
2597
2637
|
width: input.border.width
|
|
2598
2638
|
}), rem(radius[2]), color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
@@ -2625,7 +2665,7 @@ function inputElementStyles(props) {
|
|
|
2625
2665
|
color: color.input.default.readOnly.border
|
|
2626
2666
|
}), color.input.default.readOnly.fg, color.input.default.readOnly.muted.bg);
|
|
2627
2667
|
}
|
|
2628
|
-
const Root$
|
|
2668
|
+
const Root$r = styled__default.default.div(checkboxBaseStyles);
|
|
2629
2669
|
const Input$5 = styled__default.default.input(inputElementStyles);
|
|
2630
2670
|
const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
2631
2671
|
const {
|
|
@@ -2645,7 +2685,7 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2645
2685
|
ref.current.indeterminate = indeterminate || false;
|
|
2646
2686
|
}
|
|
2647
2687
|
}, [indeterminate, ref]);
|
|
2648
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2688
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$r, {
|
|
2649
2689
|
className,
|
|
2650
2690
|
"data-ui": "Checkbox",
|
|
2651
2691
|
style,
|
|
@@ -2663,12 +2703,12 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2663
2703
|
})]
|
|
2664
2704
|
});
|
|
2665
2705
|
});
|
|
2666
|
-
var __freeze$
|
|
2667
|
-
var __defProp$
|
|
2668
|
-
var __template$
|
|
2669
|
-
value: __freeze$
|
|
2706
|
+
var __freeze$t = Object.freeze;
|
|
2707
|
+
var __defProp$u = Object.defineProperty;
|
|
2708
|
+
var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
|
|
2709
|
+
value: __freeze$t(raw || cooked.slice())
|
|
2670
2710
|
}));
|
|
2671
|
-
var _a$
|
|
2711
|
+
var _a$t;
|
|
2672
2712
|
function codeSyntaxHighlightingStyle(_ref2) {
|
|
2673
2713
|
let {
|
|
2674
2714
|
theme: theme$1
|
|
@@ -2790,9 +2830,9 @@ function codeSyntaxHighlightingStyle(_ref2) {
|
|
|
2790
2830
|
};
|
|
2791
2831
|
}
|
|
2792
2832
|
function codeBaseStyle() {
|
|
2793
|
-
return styled.css(_a$
|
|
2833
|
+
return styled.css(_a$t || (_a$t = __template$t(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ", "\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), codeSyntaxHighlightingStyle);
|
|
2794
2834
|
}
|
|
2795
|
-
const Root$
|
|
2835
|
+
const Root$q = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle);
|
|
2796
2836
|
const Code = react.forwardRef(function Code2(props, ref) {
|
|
2797
2837
|
const {
|
|
2798
2838
|
children,
|
|
@@ -2803,7 +2843,7 @@ const Code = react.forwardRef(function Code2(props, ref) {
|
|
|
2803
2843
|
} = props;
|
|
2804
2844
|
const language = typeof languageProp === "string" ? languageProp : void 0;
|
|
2805
2845
|
const registered = language ? Refractor__default.default.hasLanguage(language) : false;
|
|
2806
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2846
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$q, {
|
|
2807
2847
|
"data-ui": "Code",
|
|
2808
2848
|
...restProps,
|
|
2809
2849
|
$size: useArrayProp(size),
|
|
@@ -2834,14 +2874,14 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2834
2874
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
2835
2875
|
}));
|
|
2836
2876
|
}
|
|
2837
|
-
const Root$
|
|
2877
|
+
const Root$p = styled__default.default(Box)(containerBaseStyle, responsiveContainerWidthStyle);
|
|
2838
2878
|
const Container = react.forwardRef(function Container2(props, ref) {
|
|
2839
2879
|
const {
|
|
2840
2880
|
as,
|
|
2841
2881
|
width = 2,
|
|
2842
2882
|
...restProps
|
|
2843
2883
|
} = props;
|
|
2844
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2884
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$p, {
|
|
2845
2885
|
"data-ui": "Container",
|
|
2846
2886
|
...restProps,
|
|
2847
2887
|
$width: useArrayProp(width),
|
|
@@ -2849,7 +2889,7 @@ const Container = react.forwardRef(function Container2(props, ref) {
|
|
|
2849
2889
|
ref
|
|
2850
2890
|
});
|
|
2851
2891
|
});
|
|
2852
|
-
const Root$
|
|
2892
|
+
const Root$o = styled__default.default(Box)(responsiveGridStyle);
|
|
2853
2893
|
const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
2854
2894
|
const {
|
|
2855
2895
|
as,
|
|
@@ -2864,7 +2904,7 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
|
2864
2904
|
children,
|
|
2865
2905
|
...restProps
|
|
2866
2906
|
} = props;
|
|
2867
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2907
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$o, {
|
|
2868
2908
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2869
2909
|
"data-ui": "Grid",
|
|
2870
2910
|
...restProps,
|
|
@@ -2881,12 +2921,12 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
|
2881
2921
|
children
|
|
2882
2922
|
});
|
|
2883
2923
|
});
|
|
2884
|
-
var __freeze$
|
|
2885
|
-
var __defProp$
|
|
2886
|
-
var __template$
|
|
2887
|
-
value: __freeze$
|
|
2924
|
+
var __freeze$s = Object.freeze;
|
|
2925
|
+
var __defProp$t = Object.defineProperty;
|
|
2926
|
+
var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
|
|
2927
|
+
value: __freeze$s(raw || cooked.slice())
|
|
2888
2928
|
}));
|
|
2889
|
-
var _a$
|
|
2929
|
+
var _a$s, _b$g, _c$8;
|
|
2890
2930
|
function headingBaseStyle(props) {
|
|
2891
2931
|
const {
|
|
2892
2932
|
$accent,
|
|
@@ -2895,16 +2935,16 @@ function headingBaseStyle(props) {
|
|
|
2895
2935
|
const {
|
|
2896
2936
|
font
|
|
2897
2937
|
} = theme.getTheme_v2(props.theme);
|
|
2898
|
-
return styled.css(_c$8 || (_c$8 = __template$
|
|
2938
|
+
return styled.css(_c$8 || (_c$8 = __template$s(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && styled.css(_a$s || (_a$s = __template$s(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$g || (_b$g = __template$s(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
2899
2939
|
}
|
|
2900
|
-
var __freeze$
|
|
2901
|
-
var __defProp$
|
|
2902
|
-
var __template$
|
|
2903
|
-
value: __freeze$
|
|
2940
|
+
var __freeze$r = Object.freeze;
|
|
2941
|
+
var __defProp$s = Object.defineProperty;
|
|
2942
|
+
var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
|
|
2943
|
+
value: __freeze$r(raw || cooked.slice())
|
|
2904
2944
|
}));
|
|
2905
|
-
var _a$
|
|
2906
|
-
const Root$
|
|
2907
|
-
const SpanWithTextOverflow = styled__default.default.span(_a$
|
|
2945
|
+
var _a$r;
|
|
2946
|
+
const Root$n = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
2947
|
+
const SpanWithTextOverflow = styled__default.default.span(_a$r || (_a$r = __template$r(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
2908
2948
|
const Heading = react.forwardRef(function Heading2(props, ref) {
|
|
2909
2949
|
const {
|
|
2910
2950
|
accent = false,
|
|
@@ -2922,7 +2962,7 @@ const Heading = react.forwardRef(function Heading2(props, ref) {
|
|
|
2922
2962
|
children
|
|
2923
2963
|
});
|
|
2924
2964
|
}
|
|
2925
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2965
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$n, {
|
|
2926
2966
|
"data-ui": "Heading",
|
|
2927
2967
|
...restProps,
|
|
2928
2968
|
$accent: accent,
|
|
@@ -2963,7 +3003,7 @@ function inlineSpaceStyle(props) {
|
|
|
2963
3003
|
};
|
|
2964
3004
|
});
|
|
2965
3005
|
}
|
|
2966
|
-
const Root$
|
|
3006
|
+
const Root$m = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle);
|
|
2967
3007
|
const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
2968
3008
|
const {
|
|
2969
3009
|
as,
|
|
@@ -2974,7 +3014,7 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
|
2974
3014
|
const children = react.useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2975
3015
|
children: child
|
|
2976
3016
|
}, idx)), [childrenProp]);
|
|
2977
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3017
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$m, {
|
|
2978
3018
|
"data-ui": "Inline",
|
|
2979
3019
|
...restProps,
|
|
2980
3020
|
$space: useArrayProp(space),
|
|
@@ -2983,16 +3023,16 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
|
2983
3023
|
children
|
|
2984
3024
|
});
|
|
2985
3025
|
});
|
|
2986
|
-
var __freeze$
|
|
2987
|
-
var __defProp$
|
|
2988
|
-
var __template$
|
|
2989
|
-
value: __freeze$
|
|
3026
|
+
var __freeze$q = Object.freeze;
|
|
3027
|
+
var __defProp$r = Object.defineProperty;
|
|
3028
|
+
var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
|
|
3029
|
+
value: __freeze$q(raw || cooked.slice())
|
|
2990
3030
|
}));
|
|
2991
|
-
var _a$
|
|
3031
|
+
var _a$q;
|
|
2992
3032
|
function kbdStyle() {
|
|
2993
|
-
return styled.css(_a$
|
|
3033
|
+
return styled.css(_a$q || (_a$q = __template$q(["\n --card-bg-color: var(--card-kbd-bg-color);\n --card-border-color: var(--card-kbd-border-color);\n --card-fg-color: var(--card-kbd-fg-color);\n\n box-shadow: inset 0 0 0 1px var(--card-border-color);\n background: var(--card-bg-color);\n font: inherit;\n\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
2994
3034
|
}
|
|
2995
|
-
const Root$
|
|
3035
|
+
const Root$l = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
|
|
2996
3036
|
const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
2997
3037
|
const {
|
|
2998
3038
|
children,
|
|
@@ -3001,7 +3041,7 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
|
3001
3041
|
radius = 2,
|
|
3002
3042
|
...restProps
|
|
3003
3043
|
} = props;
|
|
3004
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3044
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$l, {
|
|
3005
3045
|
"data-ui": "KBD",
|
|
3006
3046
|
...restProps,
|
|
3007
3047
|
$radius: useArrayProp(radius),
|
|
@@ -3018,6 +3058,45 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
|
3018
3058
|
})
|
|
3019
3059
|
});
|
|
3020
3060
|
});
|
|
3061
|
+
const origin = {
|
|
3062
|
+
name: "@sanity/ui/origin",
|
|
3063
|
+
fn(_ref3) {
|
|
3064
|
+
let {
|
|
3065
|
+
middlewareData,
|
|
3066
|
+
placement,
|
|
3067
|
+
rects
|
|
3068
|
+
} = _ref3;
|
|
3069
|
+
var _a, _b;
|
|
3070
|
+
const [side] = placement.split("-");
|
|
3071
|
+
const floatingWidth = rects.floating.width;
|
|
3072
|
+
const floatingHeight = rects.floating.height;
|
|
3073
|
+
const shiftX = ((_a = middlewareData.shift) == null ? void 0 : _a.x) || 0;
|
|
3074
|
+
const shiftY = ((_b = middlewareData.shift) == null ? void 0 : _b.y) || 0;
|
|
3075
|
+
if (floatingWidth <= 0 || floatingHeight <= 0) {
|
|
3076
|
+
return {};
|
|
3077
|
+
}
|
|
3078
|
+
const isVerticalPlacement = ["bottom", "top"].includes(side);
|
|
3079
|
+
const {
|
|
3080
|
+
originX,
|
|
3081
|
+
originY
|
|
3082
|
+
} = isVerticalPlacement ? {
|
|
3083
|
+
originX: clamp(0.5 - shiftX / floatingWidth, 0, 1),
|
|
3084
|
+
originY: side === "bottom" ? 0 : 1
|
|
3085
|
+
} : {
|
|
3086
|
+
originX: side === "left" ? 1 : 0,
|
|
3087
|
+
originY: clamp(0.5 - shiftY / floatingHeight, 0, 1)
|
|
3088
|
+
};
|
|
3089
|
+
return {
|
|
3090
|
+
data: {
|
|
3091
|
+
originX,
|
|
3092
|
+
originY
|
|
3093
|
+
}
|
|
3094
|
+
};
|
|
3095
|
+
}
|
|
3096
|
+
};
|
|
3097
|
+
function clamp(num, min, max) {
|
|
3098
|
+
return Math.min(Math.max(num, min), max);
|
|
3099
|
+
}
|
|
3021
3100
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3022
3101
|
const width = targetPoint.x - movingPoint.x;
|
|
3023
3102
|
const height = targetPoint.y - movingPoint.y;
|
|
@@ -3072,20 +3151,20 @@ function compileCommands(cmds) {
|
|
|
3072
3151
|
return "";
|
|
3073
3152
|
}).join(" ");
|
|
3074
3153
|
}
|
|
3075
|
-
var __freeze$
|
|
3076
|
-
var __defProp$
|
|
3077
|
-
var __template$
|
|
3078
|
-
value: __freeze$
|
|
3154
|
+
var __freeze$p = Object.freeze;
|
|
3155
|
+
var __defProp$q = Object.defineProperty;
|
|
3156
|
+
var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
|
|
3157
|
+
value: __freeze$p(raw || cooked.slice())
|
|
3079
3158
|
}));
|
|
3080
|
-
var _a$
|
|
3081
|
-
const Root$
|
|
3159
|
+
var _a$p, _b$f, _c$7;
|
|
3160
|
+
const Root$k = styled__default.default.div(_ref4 => {
|
|
3082
3161
|
let {
|
|
3083
3162
|
$w: w
|
|
3084
|
-
} =
|
|
3085
|
-
return styled.css(_a$
|
|
3163
|
+
} = _ref4;
|
|
3164
|
+
return styled.css(_a$p || (_a$p = __template$p(["\n position: absolute;\n width: ", "px;\n height: ", "px;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n line-height: 0;\n transform-origin: ", "px ", "px;\n }\n\n [data-placement^='top'] > & {\n bottom: -", "px;\n\n & > svg {\n transform: rotate(0);\n }\n }\n\n [data-placement^='right'] > & {\n left: -", "px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -", "px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -", "px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n "])), w, w, w / 2, w / 2, w, w, w, w);
|
|
3086
3165
|
});
|
|
3087
|
-
const StrokePath = styled__default.default.path(_b$f || (_b$f = __template$
|
|
3088
|
-
const ShapePath = styled__default.default.path(_c$7 || (_c$7 = __template$
|
|
3166
|
+
const StrokePath = styled__default.default.path(_b$f || (_b$f = __template$p(["\n stroke: var(--card-shadow-outline-color);\n"])));
|
|
3167
|
+
const ShapePath = styled__default.default.path(_c$7 || (_c$7 = __template$p(["\n fill: var(--card-bg-color);\n"])));
|
|
3089
3168
|
const Arrow = react.forwardRef(function Arrow2(props, ref) {
|
|
3090
3169
|
const {
|
|
3091
3170
|
width: w,
|
|
@@ -3121,7 +3200,7 @@ const Arrow = react.forwardRef(function Arrow2(props, ref) {
|
|
|
3121
3200
|
const path = compileCommands(cmds);
|
|
3122
3201
|
const strokePath = "".concat(path);
|
|
3123
3202
|
const fillPath = "".concat(path, " M ").concat(w, " -1 M 0 -1 Z");
|
|
3124
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3203
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$k, {
|
|
3125
3204
|
...restProps,
|
|
3126
3205
|
$w: w,
|
|
3127
3206
|
ref,
|
|
@@ -3179,6 +3258,17 @@ function useBoundaryElement() {
|
|
|
3179
3258
|
}
|
|
3180
3259
|
return value || DEFAULT_VALUE;
|
|
3181
3260
|
}
|
|
3261
|
+
function ConditionalWrapper(_ref5) {
|
|
3262
|
+
let {
|
|
3263
|
+
children,
|
|
3264
|
+
condition,
|
|
3265
|
+
wrapper
|
|
3266
|
+
} = _ref5;
|
|
3267
|
+
if (!condition) {
|
|
3268
|
+
return children;
|
|
3269
|
+
}
|
|
3270
|
+
return wrapper(children);
|
|
3271
|
+
}
|
|
3182
3272
|
function findMaxBreakpoints(media, width) {
|
|
3183
3273
|
const ret = [];
|
|
3184
3274
|
for (let i = 0; i < media.length; i += 1) {
|
|
@@ -3228,8 +3318,8 @@ const ElementQuery = react.forwardRef(function ElementQuery2(props, ref) {
|
|
|
3228
3318
|
children
|
|
3229
3319
|
});
|
|
3230
3320
|
});
|
|
3231
|
-
var __defProp$
|
|
3232
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$
|
|
3321
|
+
var __defProp$p = Object.defineProperty;
|
|
3322
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$p(obj, key, {
|
|
3233
3323
|
enumerable: true,
|
|
3234
3324
|
configurable: true,
|
|
3235
3325
|
writable: true,
|
|
@@ -3458,7 +3548,7 @@ function LayerProvider(props) {
|
|
|
3458
3548
|
children
|
|
3459
3549
|
});
|
|
3460
3550
|
}
|
|
3461
|
-
const Root$
|
|
3551
|
+
const Root$j = styled__default.default.div({
|
|
3462
3552
|
position: "relative"
|
|
3463
3553
|
});
|
|
3464
3554
|
const LayerChildren = react.forwardRef(function LayerChildren2(props, ref) {
|
|
@@ -3494,7 +3584,7 @@ const LayerChildren = react.forwardRef(function LayerChildren2(props, ref) {
|
|
|
3494
3584
|
lastFocusedRef.current = target;
|
|
3495
3585
|
}
|
|
3496
3586
|
}, [forwardedRef, isTopLayer, onFocus]);
|
|
3497
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3587
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$j, {
|
|
3498
3588
|
...restProps,
|
|
3499
3589
|
"data-ui": "Layer",
|
|
3500
3590
|
onFocus: handleFocus,
|
|
@@ -3605,19 +3695,19 @@ function PortalProvider(props) {
|
|
|
3605
3695
|
children
|
|
3606
3696
|
});
|
|
3607
3697
|
}
|
|
3608
|
-
var __freeze$
|
|
3609
|
-
var __defProp$
|
|
3610
|
-
var __template$
|
|
3611
|
-
value: __freeze$
|
|
3698
|
+
var __freeze$o = Object.freeze;
|
|
3699
|
+
var __defProp$o = Object.defineProperty;
|
|
3700
|
+
var __template$o = (cooked, raw) => __freeze$o(__defProp$o(cooked, "raw", {
|
|
3701
|
+
value: __freeze$o(raw || cooked.slice())
|
|
3612
3702
|
}));
|
|
3613
|
-
var _a$
|
|
3614
|
-
const Root$
|
|
3703
|
+
var _a$o;
|
|
3704
|
+
const Root$i = styled__default.default.div(_a$o || (_a$o = __template$o(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
3615
3705
|
const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
3616
3706
|
const {
|
|
3617
3707
|
as,
|
|
3618
3708
|
children
|
|
3619
3709
|
} = props;
|
|
3620
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3710
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$i, {
|
|
3621
3711
|
"aria-hidden": true,
|
|
3622
3712
|
as,
|
|
3623
3713
|
"data-ui": "SrOnly",
|
|
@@ -3625,14 +3715,14 @@ const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
|
3625
3715
|
children
|
|
3626
3716
|
});
|
|
3627
3717
|
});
|
|
3628
|
-
var __freeze$
|
|
3629
|
-
var __defProp$
|
|
3630
|
-
var __template$
|
|
3631
|
-
value: __freeze$
|
|
3718
|
+
var __freeze$n = Object.freeze;
|
|
3719
|
+
var __defProp$n = Object.defineProperty;
|
|
3720
|
+
var __template$n = (cooked, raw) => __freeze$n(__defProp$n(cooked, "raw", {
|
|
3721
|
+
value: __freeze$n(raw || cooked.slice())
|
|
3632
3722
|
}));
|
|
3633
|
-
var _a$
|
|
3634
|
-
const Root$
|
|
3635
|
-
const ItemWrapper = styled__default.default.div(_b$e || (_b$e = __template$
|
|
3723
|
+
var _a$n, _b$e;
|
|
3724
|
+
const Root$h = styled__default.default.div(_a$n || (_a$n = __template$n(["\n position: relative;\n"])));
|
|
3725
|
+
const ItemWrapper = styled__default.default.div(_b$e || (_b$e = __template$n(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
|
|
3636
3726
|
const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
|
|
3637
3727
|
const {
|
|
3638
3728
|
as = "div",
|
|
@@ -3738,7 +3828,7 @@ const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
|
|
|
3738
3828
|
const wrapperStyle = react.useMemo(() => ({
|
|
3739
3829
|
height
|
|
3740
3830
|
}), [height]);
|
|
3741
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3831
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$h, {
|
|
3742
3832
|
as,
|
|
3743
3833
|
"data-ui": "VirtualList",
|
|
3744
3834
|
...restProps,
|
|
@@ -3856,17 +3946,17 @@ function calcMaxWidth(params) {
|
|
|
3856
3946
|
}
|
|
3857
3947
|
return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
|
|
3858
3948
|
}
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
});
|
|
3949
|
+
var __freeze$m = Object.freeze;
|
|
3950
|
+
var __defProp$m = Object.defineProperty;
|
|
3951
|
+
var __template$m = (cooked, raw) => __freeze$m(__defProp$m(cooked, "raw", {
|
|
3952
|
+
value: __freeze$m(raw || cooked.slice())
|
|
3953
|
+
}));
|
|
3954
|
+
var _a$m;
|
|
3955
|
+
const MotionCard$1 = styled__default.default(framerMotion.motion(Card))(_a$m || (_a$m = __template$m(["\n &:not([hidden]) {\n display: flex;\n }\n flex-direction: column;\n width: max-content;\n min-width: min-content;\n"])));
|
|
3867
3956
|
const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref) {
|
|
3868
3957
|
const {
|
|
3869
3958
|
__unstable_margins: marginsProp,
|
|
3959
|
+
animate,
|
|
3870
3960
|
arrow,
|
|
3871
3961
|
arrowRef,
|
|
3872
3962
|
arrowX,
|
|
@@ -3874,6 +3964,8 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3874
3964
|
children,
|
|
3875
3965
|
padding,
|
|
3876
3966
|
placement,
|
|
3967
|
+
originX,
|
|
3968
|
+
originY,
|
|
3877
3969
|
overflow,
|
|
3878
3970
|
radius,
|
|
3879
3971
|
scheme,
|
|
@@ -3893,20 +3985,22 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3893
3985
|
const x = (xProp != null ? xProp : 0) + margins[3];
|
|
3894
3986
|
const y = (yProp != null ? yProp : 0) + margins[0];
|
|
3895
3987
|
const rootStyle = react.useMemo(() => ({
|
|
3988
|
+
left: x,
|
|
3989
|
+
originX,
|
|
3990
|
+
originY,
|
|
3896
3991
|
position: strategy,
|
|
3897
3992
|
top: y,
|
|
3898
|
-
left: x,
|
|
3899
3993
|
width,
|
|
3900
3994
|
zIndex,
|
|
3901
3995
|
...style
|
|
3902
|
-
}), [strategy, style, width, x, y, zIndex]);
|
|
3996
|
+
}), [originX, originY, strategy, style, width, x, y, zIndex]);
|
|
3903
3997
|
const arrowStyle = react.useMemo(() => ({
|
|
3904
3998
|
left: arrowX !== null ? arrowX : void 0,
|
|
3905
3999
|
top: arrowY !== null ? arrowY : void 0,
|
|
3906
4000
|
right: void 0,
|
|
3907
4001
|
bottom: void 0
|
|
3908
4002
|
}), [arrowX, arrowY]);
|
|
3909
|
-
return /* @__PURE__ */jsxRuntime.jsxs(
|
|
4003
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MotionCard$1, {
|
|
3910
4004
|
"data-ui": "Popover",
|
|
3911
4005
|
...restProps,
|
|
3912
4006
|
"data-placement": placement,
|
|
@@ -3917,6 +4011,7 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3917
4011
|
sizing: "border",
|
|
3918
4012
|
style: rootStyle,
|
|
3919
4013
|
tone,
|
|
4014
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
3920
4015
|
children: [/* @__PURE__ */jsxRuntime.jsx(Flex, {
|
|
3921
4016
|
"data-ui": "Popover__wrapper",
|
|
3922
4017
|
direction: "column",
|
|
@@ -3939,7 +4034,7 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3939
4034
|
}));
|
|
3940
4035
|
PopoverCard.displayName = "PopoverCard";
|
|
3941
4036
|
const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
3942
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4037
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
3943
4038
|
const {
|
|
3944
4039
|
container,
|
|
3945
4040
|
layer
|
|
@@ -3947,6 +4042,7 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
3947
4042
|
const boundaryElementContext = useBoundaryElement();
|
|
3948
4043
|
const {
|
|
3949
4044
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
4045
|
+
animate = false,
|
|
3950
4046
|
arrow: arrowProp = false,
|
|
3951
4047
|
boundaryElement = boundaryElementContext.element,
|
|
3952
4048
|
children: childProp,
|
|
@@ -4034,13 +4130,13 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4034
4130
|
}));
|
|
4035
4131
|
if (constrainSize || matchReferenceWidth) {
|
|
4036
4132
|
ret.push(size({
|
|
4037
|
-
apply(
|
|
4133
|
+
apply(_ref6) {
|
|
4038
4134
|
let {
|
|
4039
4135
|
availableWidth,
|
|
4040
4136
|
availableHeight,
|
|
4041
4137
|
elements,
|
|
4042
4138
|
referenceWidth
|
|
4043
|
-
} =
|
|
4139
|
+
} = _ref6;
|
|
4044
4140
|
referenceWidthRef.current = referenceWidth;
|
|
4045
4141
|
const _currentWidth = widthRef.current;
|
|
4046
4142
|
const _maxWidth = maxWidthRef.current;
|
|
@@ -4074,13 +4170,16 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4074
4170
|
padding: DEFAULT_POPOVER_PADDING
|
|
4075
4171
|
}));
|
|
4076
4172
|
}
|
|
4173
|
+
if (animate) {
|
|
4174
|
+
ret.push(origin);
|
|
4175
|
+
}
|
|
4077
4176
|
ret.push(reactDom$1.hide({
|
|
4078
4177
|
boundary: referenceBoundary || void 0,
|
|
4079
4178
|
padding: DEFAULT_POPOVER_PADDING,
|
|
4080
4179
|
strategy: "referenceHidden"
|
|
4081
4180
|
}));
|
|
4082
4181
|
return ret;
|
|
4083
|
-
}, [arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4182
|
+
}, [animate, arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4084
4183
|
const {
|
|
4085
4184
|
x,
|
|
4086
4185
|
y,
|
|
@@ -4097,6 +4196,8 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4097
4196
|
const referenceHidden = (_f = middlewareData.hide) == null ? void 0 : _f.referenceHidden;
|
|
4098
4197
|
const arrowX = (_g = middlewareData.arrow) == null ? void 0 : _g.x;
|
|
4099
4198
|
const arrowY = (_h = middlewareData.arrow) == null ? void 0 : _h.y;
|
|
4199
|
+
const originX = (_i = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _i.originX;
|
|
4200
|
+
const originY = (_j = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _j.originY;
|
|
4100
4201
|
const setArrow = react.useCallback(arrowEl => {
|
|
4101
4202
|
arrowRef.current = arrowEl;
|
|
4102
4203
|
}, []);
|
|
@@ -4139,6 +4240,7 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4139
4240
|
children: /* @__PURE__ */jsxRuntime.jsx(PopoverCard, {
|
|
4140
4241
|
...restProps,
|
|
4141
4242
|
__unstable_margins: margins,
|
|
4243
|
+
animate,
|
|
4142
4244
|
arrow: arrowProp,
|
|
4143
4245
|
arrowRef: setArrow,
|
|
4144
4246
|
arrowX,
|
|
@@ -4151,6 +4253,8 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4151
4253
|
ref: setFloating,
|
|
4152
4254
|
scheme,
|
|
4153
4255
|
shadow,
|
|
4256
|
+
originX,
|
|
4257
|
+
originY,
|
|
4154
4258
|
strategy,
|
|
4155
4259
|
tone,
|
|
4156
4260
|
width: matchReferenceWidth ? referenceWidthRef.current : width,
|
|
@@ -4160,23 +4264,31 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4160
4264
|
})
|
|
4161
4265
|
});
|
|
4162
4266
|
return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4163
|
-
children: [
|
|
4164
|
-
|
|
4165
|
-
|
|
4267
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
4268
|
+
condition: animate,
|
|
4269
|
+
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
4270
|
+
children
|
|
4271
|
+
}),
|
|
4272
|
+
children: open && /* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
4273
|
+
condition: !!portal,
|
|
4274
|
+
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(Portal, {
|
|
4275
|
+
__unstable_name: typeof portal === "string" ? portal : void 0,
|
|
4276
|
+
children
|
|
4277
|
+
}),
|
|
4166
4278
|
children: popover
|
|
4167
|
-
})
|
|
4279
|
+
})
|
|
4168
4280
|
}), child]
|
|
4169
4281
|
});
|
|
4170
4282
|
}));
|
|
4171
4283
|
Popover.displayName = "Popover";
|
|
4172
|
-
var __freeze$
|
|
4173
|
-
var __defProp$
|
|
4174
|
-
var __template$
|
|
4175
|
-
value: __freeze$
|
|
4284
|
+
var __freeze$l = Object.freeze;
|
|
4285
|
+
var __defProp$l = Object.defineProperty;
|
|
4286
|
+
var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
|
|
4287
|
+
value: __freeze$l(raw || cooked.slice())
|
|
4176
4288
|
}));
|
|
4177
|
-
var _a$
|
|
4289
|
+
var _a$l, _b$d;
|
|
4178
4290
|
function radioBaseStyle() {
|
|
4179
|
-
return styled.css(_a$
|
|
4291
|
+
return styled.css(_a$l || (_a$l = __template$l(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));
|
|
4180
4292
|
}
|
|
4181
4293
|
function inputElementStyle(props) {
|
|
4182
4294
|
const {
|
|
@@ -4184,7 +4296,7 @@ function inputElementStyle(props) {
|
|
|
4184
4296
|
input
|
|
4185
4297
|
} = theme.getTheme_v2(props.theme);
|
|
4186
4298
|
const dist = (input.radio.size - input.radio.markSize) / 2;
|
|
4187
|
-
return styled.css(_b$d || (_b$d = __template$
|
|
4299
|
+
return styled.css(_b$d || (_b$d = __template$l(["\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n z-index: 1;\n padding: 0;\n margin: 0;\n border-radius: ", ";\n border: none;\n\n /* enabled */\n & + span {\n display: block;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n\n &::after {\n content: '';\n position: absolute;\n top: ", ";\n left: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n opacity: 0;\n }\n }\n\n /* focused */\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span::after {\n opacity: 1;\n }\n\n /* customValidity */\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n &::after {\n background: ", ";\n }\n }\n\n /* read only */\n &[data-read-only] + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n\n /* disabled */\n &:not([data-read-only]):disabled + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n "])), rem(input.radio.size / 2), rem(input.radio.size), rem(input.radio.size), rem(input.radio.size / 2), color.input.default.enabled.bg, focusRingBorderStyle({
|
|
4188
4300
|
color: color.input.default.enabled.border,
|
|
4189
4301
|
width: input.border.width
|
|
4190
4302
|
}), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.input.default.enabled.fg, focusRingStyle({
|
|
@@ -4229,27 +4341,27 @@ const Radio = react.forwardRef(function Radio2(props, forwardedRef) {
|
|
|
4229
4341
|
}), /* @__PURE__ */jsxRuntime.jsx("span", {})]
|
|
4230
4342
|
});
|
|
4231
4343
|
});
|
|
4232
|
-
var __freeze$
|
|
4233
|
-
var __defProp$
|
|
4234
|
-
var __template$
|
|
4235
|
-
value: __freeze$
|
|
4344
|
+
var __freeze$k = Object.freeze;
|
|
4345
|
+
var __defProp$k = Object.defineProperty;
|
|
4346
|
+
var __template$k = (cooked, raw) => __freeze$k(__defProp$k(cooked, "raw", {
|
|
4347
|
+
value: __freeze$k(raw || cooked.slice())
|
|
4236
4348
|
}));
|
|
4237
|
-
var _a$
|
|
4349
|
+
var _a$k, _b$c, _c$6, _d$5;
|
|
4238
4350
|
function rootStyle() {
|
|
4239
|
-
return styled.css(_a$
|
|
4351
|
+
return styled.css(_a$k || (_a$k = __template$k(["\n position: relative;\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
4240
4352
|
}
|
|
4241
4353
|
function inputBaseStyle(props) {
|
|
4242
4354
|
const {
|
|
4243
4355
|
font
|
|
4244
4356
|
} = theme.getTheme_v2(props.theme);
|
|
4245
|
-
return styled.css(_b$c || (_b$c = __template$
|
|
4357
|
+
return styled.css(_b$c || (_b$c = __template$k(["\n -webkit-font-smoothing: antialiased;\n appearance: none;\n border: 0;\n font-family: ", ";\n color: inherit;\n width: 100%;\n outline: none;\n margin: 0;\n\n &:disabled {\n opacity: 1;\n }\n "])), font.text.family);
|
|
4246
4358
|
}
|
|
4247
4359
|
function inputColorStyle(props) {
|
|
4248
4360
|
const {
|
|
4249
4361
|
color,
|
|
4250
4362
|
input
|
|
4251
4363
|
} = theme.getTheme_v2(props.theme);
|
|
4252
|
-
return styled.css(_c$6 || (_c$6 = __template$
|
|
4364
|
+
return styled.css(_c$6 || (_c$6 = __template$k(["\n /* enabled */\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ", ";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n "])), color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
4253
4365
|
color: color.input.default.enabled.border,
|
|
4254
4366
|
width: input.border.width
|
|
4255
4367
|
}), color.input.default.hovered.bg, color.input.default.hovered.fg, focusRingBorderStyle({
|
|
@@ -4292,7 +4404,7 @@ function iconBoxStyle(props) {
|
|
|
4292
4404
|
const {
|
|
4293
4405
|
color
|
|
4294
4406
|
} = theme.getTheme_v2(props.theme);
|
|
4295
|
-
return styled.css(_d$5 || (_d$5 = __template$
|
|
4407
|
+
return styled.css(_d$5 || (_d$5 = __template$k(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n\n /* enabled */\n --card-fg-color: ", ";\n\n /* hover */\n @media (hover: hover) {\n select:not(disabled):not(:read-only):hover + && {\n --card-fg-color: ", ";\n }\n }\n\n /* disabled */\n select:disabled + && {\n --card-fg-color: ", ";\n }\n\n /* read-only */\n select[data-read-only] + && {\n --card-fg-color: ", ";\n }\n "])), color.input.default.enabled.fg, color.input.default.hovered.fg, color.input.default.disabled.fg, color.input.default.readOnly.fg);
|
|
4296
4408
|
}
|
|
4297
4409
|
const selectStyle = {
|
|
4298
4410
|
root: rootStyle,
|
|
@@ -4309,7 +4421,7 @@ const Select = react.forwardRef(function Select2(props, forwardedRef) {
|
|
|
4309
4421
|
disabled,
|
|
4310
4422
|
fontSize = 2,
|
|
4311
4423
|
padding = 3,
|
|
4312
|
-
radius =
|
|
4424
|
+
radius = 2,
|
|
4313
4425
|
readOnly,
|
|
4314
4426
|
space = 3,
|
|
4315
4427
|
...restProps
|
|
@@ -4376,32 +4488,32 @@ const Stack = react.forwardRef(function Stack2(props, ref) {
|
|
|
4376
4488
|
ref
|
|
4377
4489
|
});
|
|
4378
4490
|
});
|
|
4379
|
-
var __freeze$
|
|
4380
|
-
var __defProp$
|
|
4381
|
-
var __template$
|
|
4382
|
-
value: __freeze$
|
|
4491
|
+
var __freeze$j = Object.freeze;
|
|
4492
|
+
var __defProp$j = Object.defineProperty;
|
|
4493
|
+
var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
|
|
4494
|
+
value: __freeze$j(raw || cooked.slice())
|
|
4383
4495
|
}));
|
|
4384
|
-
var _a$
|
|
4496
|
+
var _a$j, _b$b, _c$5, _d$4, _e$2, _f$2, _g;
|
|
4385
4497
|
function switchBaseStyles() {
|
|
4386
|
-
return styled.css(_a$
|
|
4498
|
+
return styled.css(_a$j || (_a$j = __template$j(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
4387
4499
|
}
|
|
4388
4500
|
function switchInputStyles() {
|
|
4389
|
-
return styled.css(_b$b || (_b$b = __template$
|
|
4501
|
+
return styled.css(_b$b || (_b$b = __template$j(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n padding: 0;\n margin: 0;\n\n /* Place the input element above the representation element */\n z-index: 1;\n "])));
|
|
4390
4502
|
}
|
|
4391
4503
|
function switchRepresentationStyles(props) {
|
|
4392
4504
|
const {
|
|
4393
4505
|
color,
|
|
4394
4506
|
input
|
|
4395
4507
|
} = theme.getTheme_v2(props.theme);
|
|
4396
|
-
return styled.css(_c$5 || (_c$5 = __template$
|
|
4508
|
+
return styled.css(_c$5 || (_c$5 = __template$j(["\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ", ";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input[data-read-only]:disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input:checked[data-read-only]:disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n "])), color.input.default.enabled.border, color.input.default.enabled.bg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
|
|
4397
4509
|
focusRing: input.switch.focusRing
|
|
4398
|
-
}), color.input.default.enabled.fg, color.input.default.enabled.bg, color.input.default.hovered.border, color.input.default.hovered.bg, color.input.default.enabled.fg, color.input.default.enabled.bg, color.input.default.disabled.border, color.input.default.disabled.bg, color.input.default.readOnly.border, color.input.default.readOnly.bg);
|
|
4510
|
+
}), color.input.default.enabled.fg, color.input.default.enabled.bg, color.input.default.hovered.border, color.input.default.hovered.bg, color.input.default.enabled.fg, color.input.default.enabled.bg, color.input.default.disabled.border, color.input.default.disabled.bg, color.input.default.readOnly.border, color.input.default.readOnly.bg, color.input.default.readOnly.fg, color.input.default.readOnly.bg);
|
|
4399
4511
|
}
|
|
4400
4512
|
function switchTrackStyles(props) {
|
|
4401
4513
|
const {
|
|
4402
4514
|
input
|
|
4403
4515
|
} = theme.getTheme_v2(props.theme);
|
|
4404
|
-
return styled.css(_d$4 || (_d$4 = __template$
|
|
4516
|
+
return styled.css(_d$4 || (_d$4 = __template$j(["\n &:not([hidden]) {\n display: block;\n }\n background-color: var(--switch-bg-color);\n position: absolute;\n left: 0;\n top: 0;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n "])), rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2));
|
|
4405
4517
|
}
|
|
4406
4518
|
function switchThumbStyles(props) {
|
|
4407
4519
|
const {
|
|
@@ -4417,7 +4529,7 @@ function switchThumbStyles(props) {
|
|
|
4417
4529
|
const checkedOffset = trackWidth - trackPadding * 2 - size;
|
|
4418
4530
|
const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
|
|
4419
4531
|
const checked = $indeterminate !== true && props.$checked === true;
|
|
4420
|
-
return styled.css(_g || (_g = __template$
|
|
4532
|
+
return styled.css(_g || (_g = __template$j(["\n &:not([hidden]) {\n display: block;\n }\n position: absolute;\n left: ", ";\n top: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n transition-property: transform;\n transition-duration: ", "ms;\n transition-timing-function: ", ";\n background: var(--switch-fg-color);\n transform: translate3d(0, 0, 0);\n box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);\n\n ", "\n\n ", "\n "])), rem(trackPadding), rem(trackPadding), rem(size), rem(size), rem(size / 2), input.switch.transitionDurationMs, input.switch.transitionTimingFunction, checked && styled.css(_e$2 || (_e$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && styled.css(_f$2 || (_f$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
|
|
4421
4533
|
}
|
|
4422
4534
|
const Root$d = styled__default.default.span(switchBaseStyles);
|
|
4423
4535
|
const Input$2 = styled__default.default.input(switchInputStyles);
|
|
@@ -4461,14 +4573,14 @@ const Switch = react.forwardRef(function Switch2(props, forwardedRef) {
|
|
|
4461
4573
|
})]
|
|
4462
4574
|
});
|
|
4463
4575
|
});
|
|
4464
|
-
var __freeze$
|
|
4465
|
-
var __defProp$
|
|
4466
|
-
var __template$
|
|
4467
|
-
value: __freeze$
|
|
4576
|
+
var __freeze$i = Object.freeze;
|
|
4577
|
+
var __defProp$i = Object.defineProperty;
|
|
4578
|
+
var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
|
|
4579
|
+
value: __freeze$i(raw || cooked.slice())
|
|
4468
4580
|
}));
|
|
4469
|
-
var _a$
|
|
4581
|
+
var _a$i;
|
|
4470
4582
|
const Root$c = styled__default.default.span(textInputRootStyle);
|
|
4471
|
-
const InputRoot$1 = styled__default.default.span(_a$
|
|
4583
|
+
const InputRoot$1 = styled__default.default.span(_a$i || (_a$i = __template$i(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4472
4584
|
const Input$1 = styled__default.default.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4473
4585
|
const Presentation$1 = styled__default.default.div(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4474
4586
|
const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
@@ -4512,30 +4624,30 @@ const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
4512
4624
|
})
|
|
4513
4625
|
});
|
|
4514
4626
|
});
|
|
4515
|
-
var __freeze$
|
|
4516
|
-
var __defProp$
|
|
4517
|
-
var __template$
|
|
4518
|
-
value: __freeze$
|
|
4627
|
+
var __freeze$h = Object.freeze;
|
|
4628
|
+
var __defProp$h = Object.defineProperty;
|
|
4629
|
+
var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
|
|
4630
|
+
value: __freeze$h(raw || cooked.slice())
|
|
4519
4631
|
}));
|
|
4520
|
-
var _a$
|
|
4632
|
+
var _a$h, _b$a, _c$4, _d$3, _e$1, _f$1;
|
|
4521
4633
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
4522
4634
|
zIndex: 2
|
|
4523
4635
|
};
|
|
4524
4636
|
const Root$b = styled__default.default(Card).attrs({
|
|
4525
4637
|
forwardedAs: "span"
|
|
4526
4638
|
})(textInputRootStyle);
|
|
4527
|
-
const InputRoot = styled__default.default.span(_a$
|
|
4639
|
+
const InputRoot = styled__default.default.span(_a$h || (_a$h = __template$h(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4528
4640
|
const Prefix = styled__default.default(Card).attrs({
|
|
4529
4641
|
forwardedAs: "span"
|
|
4530
|
-
})(_b$a || (_b$a = __template$
|
|
4642
|
+
})(_b$a || (_b$a = __template$h(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
|
|
4531
4643
|
const Suffix = styled__default.default(Card).attrs({
|
|
4532
4644
|
forwardedAs: "span"
|
|
4533
|
-
})(_c$4 || (_c$4 = __template$
|
|
4645
|
+
})(_c$4 || (_c$4 = __template$h(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
|
|
4534
4646
|
const Input = styled__default.default.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4535
4647
|
const Presentation = styled__default.default.span(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4536
|
-
const LeftBox = styled__default.default(Box)(_d$3 || (_d$3 = __template$
|
|
4537
|
-
const RightBox = styled__default.default(Box)(_e$1 || (_e$1 = __template$
|
|
4538
|
-
const RightCard = styled__default.default(Card)(_f$1 || (_f$1 = __template$
|
|
4648
|
+
const LeftBox = styled__default.default(Box)(_d$3 || (_d$3 = __template$h(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
|
|
4649
|
+
const RightBox = styled__default.default(Box)(_e$1 || (_e$1 = __template$h(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4650
|
+
const RightCard = styled__default.default(Card)(_f$1 || (_f$1 = __template$h(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4539
4651
|
const TextInputClearButton = styled__default.default(Button)({
|
|
4540
4652
|
"&:not([hidden])": {
|
|
4541
4653
|
display: "block"
|
|
@@ -4703,17 +4815,6 @@ function useDelayedState(initialState) {
|
|
|
4703
4815
|
}, []);
|
|
4704
4816
|
return [state, onStateChange];
|
|
4705
4817
|
}
|
|
4706
|
-
function ConditionalWrapper(_ref5) {
|
|
4707
|
-
let {
|
|
4708
|
-
children,
|
|
4709
|
-
condition,
|
|
4710
|
-
wrapper
|
|
4711
|
-
} = _ref5;
|
|
4712
|
-
if (!condition) {
|
|
4713
|
-
return children;
|
|
4714
|
-
}
|
|
4715
|
-
return wrapper(children);
|
|
4716
|
-
}
|
|
4717
4818
|
const DEFAULT_TOOLTIP_ARROW_WIDTH = 15;
|
|
4718
4819
|
const DEFAULT_TOOLTIP_ARROW_HEIGHT = 6;
|
|
4719
4820
|
const DEFAULT_TOOLTIP_ARROW_RADIUS = 2;
|
|
@@ -4733,6 +4834,63 @@ const DEFAULT_FALLBACK_PLACEMENTS = {
|
|
|
4733
4834
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4734
4835
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4735
4836
|
};
|
|
4837
|
+
var __freeze$g = Object.freeze;
|
|
4838
|
+
var __defProp$g = Object.defineProperty;
|
|
4839
|
+
var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
|
|
4840
|
+
value: __freeze$g(raw || cooked.slice())
|
|
4841
|
+
}));
|
|
4842
|
+
var _a$g;
|
|
4843
|
+
const MotionCard = styled__default.default(framerMotion.motion(Card))(_a$g || (_a$g = __template$g([""])));
|
|
4844
|
+
const TooltipCard = react.memo(react.forwardRef(function TooltipCard2(props, ref) {
|
|
4845
|
+
const {
|
|
4846
|
+
animate,
|
|
4847
|
+
arrow,
|
|
4848
|
+
arrowRef,
|
|
4849
|
+
arrowX,
|
|
4850
|
+
arrowY,
|
|
4851
|
+
children,
|
|
4852
|
+
originX,
|
|
4853
|
+
originY,
|
|
4854
|
+
padding,
|
|
4855
|
+
placement,
|
|
4856
|
+
radius,
|
|
4857
|
+
scheme,
|
|
4858
|
+
shadow,
|
|
4859
|
+
style,
|
|
4860
|
+
...restProps
|
|
4861
|
+
} = props;
|
|
4862
|
+
const rootStyle = react.useMemo(() => ({
|
|
4863
|
+
originX,
|
|
4864
|
+
originY,
|
|
4865
|
+
...style
|
|
4866
|
+
}), [originX, originY, style]);
|
|
4867
|
+
const arrowStyle = react.useMemo(() => ({
|
|
4868
|
+
left: arrowX !== null ? arrowX : void 0,
|
|
4869
|
+
top: arrowY !== null ? arrowY : void 0,
|
|
4870
|
+
right: void 0,
|
|
4871
|
+
bottom: void 0
|
|
4872
|
+
}), [arrowX, arrowY]);
|
|
4873
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MotionCard, {
|
|
4874
|
+
"data-ui": "Tooltip__card",
|
|
4875
|
+
...restProps,
|
|
4876
|
+
"data-placement": placement,
|
|
4877
|
+
padding,
|
|
4878
|
+
radius,
|
|
4879
|
+
ref,
|
|
4880
|
+
scheme,
|
|
4881
|
+
shadow,
|
|
4882
|
+
style: rootStyle,
|
|
4883
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
4884
|
+
children: [children, arrow && /* @__PURE__ */jsxRuntime.jsx(Arrow, {
|
|
4885
|
+
ref: arrowRef,
|
|
4886
|
+
style: arrowStyle,
|
|
4887
|
+
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
4888
|
+
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
4889
|
+
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
4890
|
+
})]
|
|
4891
|
+
});
|
|
4892
|
+
}));
|
|
4893
|
+
TooltipCard.displayName = "TooltipCard";
|
|
4736
4894
|
const key$4 = Symbol.for("@sanity/ui/context/tooltipDelayGroup");
|
|
4737
4895
|
globalScope[key$4] = globalScope[key$4] || react.createContext(null);
|
|
4738
4896
|
const TooltipDelayGroupContext = globalScope[key$4];
|
|
@@ -4769,26 +4927,27 @@ var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
|
|
|
4769
4927
|
value: __freeze$f(raw || cooked.slice())
|
|
4770
4928
|
}));
|
|
4771
4929
|
var _a$f;
|
|
4772
|
-
const Root$a = styled__default.default(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])),
|
|
4930
|
+
const Root$a = styled__default.default(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])), _ref7 => {
|
|
4773
4931
|
let {
|
|
4774
4932
|
$maxWidth
|
|
4775
|
-
} =
|
|
4933
|
+
} = _ref7;
|
|
4776
4934
|
return $maxWidth;
|
|
4777
4935
|
});
|
|
4778
4936
|
const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
4779
|
-
var _a2, _b, _c, _d, _e;
|
|
4937
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
4780
4938
|
const boundaryElementContext = useBoundaryElement();
|
|
4781
4939
|
const {
|
|
4782
4940
|
layer
|
|
4783
4941
|
} = useTheme_v2();
|
|
4784
4942
|
const {
|
|
4943
|
+
animate = false,
|
|
4785
4944
|
arrow: arrowProp = false,
|
|
4786
4945
|
boundaryElement = boundaryElementContext == null ? void 0 : boundaryElementContext.element,
|
|
4787
4946
|
children: childProp,
|
|
4788
4947
|
content,
|
|
4789
4948
|
disabled,
|
|
4790
4949
|
fallbackPlacements: fallbackPlacementsProp = (_b = props.fallbackPlacements) != null ? _b : DEFAULT_FALLBACK_PLACEMENTS[(_a2 = props.placement) != null ? _a2 : "bottom"],
|
|
4791
|
-
padding =
|
|
4950
|
+
padding = 2,
|
|
4792
4951
|
placement: placementProp = "bottom",
|
|
4793
4952
|
portal: portalProp,
|
|
4794
4953
|
radius = 2,
|
|
@@ -4796,7 +4955,6 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4796
4955
|
shadow = 2,
|
|
4797
4956
|
zOffset = layer.tooltip.zOffset,
|
|
4798
4957
|
delay,
|
|
4799
|
-
animate = false,
|
|
4800
4958
|
...restProps
|
|
4801
4959
|
} = props;
|
|
4802
4960
|
const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
|
|
@@ -4832,8 +4990,11 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4832
4990
|
padding: DEFAULT_TOOLTIP_PADDING
|
|
4833
4991
|
}));
|
|
4834
4992
|
}
|
|
4993
|
+
if (animate) {
|
|
4994
|
+
ret.push(origin);
|
|
4995
|
+
}
|
|
4835
4996
|
return ret;
|
|
4836
|
-
}, [arrowProp, boundaryElement, fallbackPlacements]);
|
|
4997
|
+
}, [animate, arrowProp, boundaryElement, fallbackPlacements]);
|
|
4837
4998
|
const {
|
|
4838
4999
|
floatingStyles,
|
|
4839
5000
|
placement,
|
|
@@ -4847,12 +5008,8 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4847
5008
|
});
|
|
4848
5009
|
const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
|
|
4849
5010
|
const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
|
|
4850
|
-
const
|
|
4851
|
-
|
|
4852
|
-
top: arrowY !== null ? arrowY : void 0,
|
|
4853
|
-
right: void 0,
|
|
4854
|
-
bottom: void 0
|
|
4855
|
-
}), [arrowX, arrowY]);
|
|
5011
|
+
const originX = (_f = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _f.originX;
|
|
5012
|
+
const originY = (_g = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _g.originY;
|
|
4856
5013
|
const tooltipId = react.useId();
|
|
4857
5014
|
const [isOpen, setIsOpen] = useDelayedState(false);
|
|
4858
5015
|
const delayGroupContext = useTooltipDelayGroup();
|
|
@@ -4974,53 +5131,33 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4974
5131
|
}, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
|
|
4975
5132
|
if (!child) return /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
4976
5133
|
if (disabled) return child;
|
|
4977
|
-
const
|
|
5134
|
+
const tooltip = /* @__PURE__ */jsxRuntime.jsx(Root$a, {
|
|
4978
5135
|
"data-ui": "Tooltip",
|
|
4979
5136
|
...restProps,
|
|
4980
5137
|
ref: setFloating,
|
|
4981
5138
|
style: floatingStyles,
|
|
4982
5139
|
zOffset,
|
|
4983
5140
|
$maxWidth: tooltipWidth,
|
|
4984
|
-
children: /* @__PURE__ */jsxRuntime.jsx(
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
duration: 0.3,
|
|
5001
|
-
type: "spring"
|
|
5002
|
-
},
|
|
5003
|
-
children
|
|
5004
|
-
}),
|
|
5005
|
-
children: /* @__PURE__ */jsxRuntime.jsxs(Card, {
|
|
5006
|
-
"data-ui": "Tooltip__card",
|
|
5007
|
-
"data-placement": placement,
|
|
5008
|
-
padding,
|
|
5009
|
-
radius,
|
|
5010
|
-
scheme,
|
|
5011
|
-
shadow,
|
|
5012
|
-
children: [content, arrowProp && /* @__PURE__ */jsxRuntime.jsx(Arrow, {
|
|
5013
|
-
ref: setArrow,
|
|
5014
|
-
style: arrowStyle,
|
|
5015
|
-
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
5016
|
-
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
5017
|
-
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
5018
|
-
})]
|
|
5019
|
-
})
|
|
5141
|
+
children: /* @__PURE__ */jsxRuntime.jsx(TooltipCard, {
|
|
5142
|
+
...restProps,
|
|
5143
|
+
animate,
|
|
5144
|
+
arrow: arrowProp,
|
|
5145
|
+
arrowRef: setArrow,
|
|
5146
|
+
arrowX,
|
|
5147
|
+
arrowY,
|
|
5148
|
+
originX,
|
|
5149
|
+
originY,
|
|
5150
|
+
padding,
|
|
5151
|
+
placement,
|
|
5152
|
+
radius,
|
|
5153
|
+
ref: setFloating,
|
|
5154
|
+
scheme,
|
|
5155
|
+
shadow,
|
|
5156
|
+
children: content
|
|
5020
5157
|
})
|
|
5021
5158
|
});
|
|
5022
5159
|
return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5023
|
-
children: [
|
|
5160
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
5024
5161
|
condition: animate,
|
|
5025
5162
|
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
5026
5163
|
children
|
|
@@ -5031,9 +5168,9 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
5031
5168
|
__unstable_name: typeof portalProp === "string" ? portalProp : void 0,
|
|
5032
5169
|
children
|
|
5033
5170
|
}),
|
|
5034
|
-
children:
|
|
5171
|
+
children: tooltip
|
|
5035
5172
|
})
|
|
5036
|
-
})]
|
|
5173
|
+
}), child]
|
|
5037
5174
|
});
|
|
5038
5175
|
});
|
|
5039
5176
|
var __freeze$e = Object.freeze;
|
|
@@ -5190,10 +5327,10 @@ const InnerAutocomplete = react.forwardRef(function InnerAutocomplete2(props, re
|
|
|
5190
5327
|
query,
|
|
5191
5328
|
value
|
|
5192
5329
|
} = state;
|
|
5193
|
-
const defaultRenderOption = react.useCallback(
|
|
5330
|
+
const defaultRenderOption = react.useCallback(_ref8 => {
|
|
5194
5331
|
let {
|
|
5195
5332
|
value: value2
|
|
5196
|
-
} =
|
|
5333
|
+
} = _ref8;
|
|
5197
5334
|
return /* @__PURE__ */jsxRuntime.jsx(Card, {
|
|
5198
5335
|
"data-as": "button",
|
|
5199
5336
|
padding: paddingProp,
|
|
@@ -5652,10 +5789,10 @@ var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
|
|
|
5652
5789
|
value: __freeze$c(raw || cooked.slice())
|
|
5653
5790
|
}));
|
|
5654
5791
|
var _a$c, _b$7;
|
|
5655
|
-
function dialogStyle(
|
|
5792
|
+
function dialogStyle(_ref9) {
|
|
5656
5793
|
let {
|
|
5657
5794
|
theme: theme$1
|
|
5658
|
-
} =
|
|
5795
|
+
} = _ref9;
|
|
5659
5796
|
const {
|
|
5660
5797
|
color
|
|
5661
5798
|
} = theme.getTheme_v2(theme$1);
|
|
@@ -6323,6 +6460,9 @@ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
|
|
|
6323
6460
|
setOpen(v => !v);
|
|
6324
6461
|
setShouldFocus(null);
|
|
6325
6462
|
}, []);
|
|
6463
|
+
const handleMouseDown = react.useCallback(event => {
|
|
6464
|
+
if (open) event.preventDefault();
|
|
6465
|
+
}, [open]);
|
|
6326
6466
|
const handleButtonKeyDown = react.useCallback(event => {
|
|
6327
6467
|
if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
|
|
6328
6468
|
event.preventDefault();
|
|
@@ -6406,11 +6546,12 @@ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
|
|
|
6406
6546
|
id,
|
|
6407
6547
|
onClick: handleButtonClick,
|
|
6408
6548
|
onKeyDown: handleButtonKeyDown,
|
|
6549
|
+
onMouseDown: handleMouseDown,
|
|
6409
6550
|
"aria-haspopup": true,
|
|
6410
6551
|
"aria-expanded": open,
|
|
6411
6552
|
ref: setButtonRef,
|
|
6412
6553
|
selected: open
|
|
6413
|
-
}) : null, [buttonProp, handleButtonClick, handleButtonKeyDown, id, open, setButtonRef]);
|
|
6554
|
+
}) : null, [buttonProp, handleButtonClick, handleButtonKeyDown, handleMouseDown, id, open, setButtonRef]);
|
|
6414
6555
|
const popoverProps = react.useMemo(() => ({
|
|
6415
6556
|
boundaryElement: deprecated_boundaryElement,
|
|
6416
6557
|
overflow: "auto",
|
|
@@ -6725,15 +6866,15 @@ var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
|
|
|
6725
6866
|
var _a$6, _b$3, _c$1, _d;
|
|
6726
6867
|
const keyframe = styled.keyframes(_a$6 || (_a$6 = __template$6(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
|
|
6727
6868
|
const animation = styled.css(_b$3 || (_b$3 = __template$6(["\n background-image: linear-gradient(\n to right,\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-to),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from)\n );\n background-position: 100%;\n background-size: 200% 100%;\n background-attachment: fixed;\n animation-name: ", ";\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n animation-duration: 2000ms;\n"])), keyframe);
|
|
6728
|
-
const skeletonStyle = styled.css(_d || (_d = __template$6(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])),
|
|
6869
|
+
const skeletonStyle = styled.css(_d || (_d = __template$6(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])), _ref10 => {
|
|
6729
6870
|
let {
|
|
6730
6871
|
$visible
|
|
6731
|
-
} =
|
|
6872
|
+
} = _ref10;
|
|
6732
6873
|
return $visible ? 1 : 0;
|
|
6733
|
-
},
|
|
6874
|
+
}, _ref11 => {
|
|
6734
6875
|
let {
|
|
6735
6876
|
$animated
|
|
6736
|
-
} =
|
|
6877
|
+
} = _ref11;
|
|
6737
6878
|
return $animated ? animation : styled.css(_c$1 || (_c$1 = __template$6(["\n background-color: var(--card-skeleton-color-from);\n "])));
|
|
6738
6879
|
});
|
|
6739
6880
|
const Root$4 = styled__default.default(Box)(responsiveRadiusStyle, skeletonStyle);
|
|
@@ -7118,12 +7259,12 @@ function ToastProvider(props) {
|
|
|
7118
7259
|
paddingY,
|
|
7119
7260
|
children: /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
7120
7261
|
initial: false,
|
|
7121
|
-
children: state.map(
|
|
7262
|
+
children: state.map(_ref12 => {
|
|
7122
7263
|
let {
|
|
7123
7264
|
dismiss,
|
|
7124
7265
|
id,
|
|
7125
7266
|
params
|
|
7126
|
-
} =
|
|
7267
|
+
} = _ref12;
|
|
7127
7268
|
return /* @__PURE__ */jsxRuntime.jsx(framerMotion.motion.div, {
|
|
7128
7269
|
animate: {
|
|
7129
7270
|
opacity: 1,
|
|
@@ -7617,222 +7758,6 @@ const TreeItem = react.memo(function TreeItem2(props) {
|
|
|
7617
7758
|
})]
|
|
7618
7759
|
});
|
|
7619
7760
|
});
|
|
7620
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_BLEND_KEYS', {
|
|
7621
|
-
enumerable: true,
|
|
7622
|
-
get: function () {
|
|
7623
|
-
return theme.COLOR_CONFIG_BLEND_KEYS;
|
|
7624
|
-
}
|
|
7625
|
-
});
|
|
7626
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_CARD_KEYS', {
|
|
7627
|
-
enumerable: true,
|
|
7628
|
-
get: function () {
|
|
7629
|
-
return theme.COLOR_CONFIG_CARD_KEYS;
|
|
7630
|
-
}
|
|
7631
|
-
});
|
|
7632
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_CARD_TONES', {
|
|
7633
|
-
enumerable: true,
|
|
7634
|
-
get: function () {
|
|
7635
|
-
return theme.COLOR_CONFIG_CARD_TONES;
|
|
7636
|
-
}
|
|
7637
|
-
});
|
|
7638
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_STATE_KEYS', {
|
|
7639
|
-
enumerable: true,
|
|
7640
|
-
get: function () {
|
|
7641
|
-
return theme.COLOR_CONFIG_STATE_KEYS;
|
|
7642
|
-
}
|
|
7643
|
-
});
|
|
7644
|
-
Object.defineProperty(exports, 'COLOR_CONFIG_STATE_TONES', {
|
|
7645
|
-
enumerable: true,
|
|
7646
|
-
get: function () {
|
|
7647
|
-
return theme.COLOR_CONFIG_STATE_TONES;
|
|
7648
|
-
}
|
|
7649
|
-
});
|
|
7650
|
-
Object.defineProperty(exports, 'THEME_COLOR_BLEND_MODES', {
|
|
7651
|
-
enumerable: true,
|
|
7652
|
-
get: function () {
|
|
7653
|
-
return theme.THEME_COLOR_BLEND_MODES;
|
|
7654
|
-
}
|
|
7655
|
-
});
|
|
7656
|
-
Object.defineProperty(exports, 'THEME_COLOR_BUTTON_MODES', {
|
|
7657
|
-
enumerable: true,
|
|
7658
|
-
get: function () {
|
|
7659
|
-
return theme.THEME_COLOR_BUTTON_MODES;
|
|
7660
|
-
}
|
|
7661
|
-
});
|
|
7662
|
-
Object.defineProperty(exports, 'THEME_COLOR_CARD_TONES', {
|
|
7663
|
-
enumerable: true,
|
|
7664
|
-
get: function () {
|
|
7665
|
-
return theme.THEME_COLOR_CARD_TONES;
|
|
7666
|
-
}
|
|
7667
|
-
});
|
|
7668
|
-
Object.defineProperty(exports, 'THEME_COLOR_STATES', {
|
|
7669
|
-
enumerable: true,
|
|
7670
|
-
get: function () {
|
|
7671
|
-
return theme.THEME_COLOR_STATES;
|
|
7672
|
-
}
|
|
7673
|
-
});
|
|
7674
|
-
Object.defineProperty(exports, 'THEME_COLOR_STATE_TONES', {
|
|
7675
|
-
enumerable: true,
|
|
7676
|
-
get: function () {
|
|
7677
|
-
return theme.THEME_COLOR_STATE_TONES;
|
|
7678
|
-
}
|
|
7679
|
-
});
|
|
7680
|
-
Object.defineProperty(exports, 'buildTheme', {
|
|
7681
|
-
enumerable: true,
|
|
7682
|
-
get: function () {
|
|
7683
|
-
return theme.buildTheme;
|
|
7684
|
-
}
|
|
7685
|
-
});
|
|
7686
|
-
Object.defineProperty(exports, 'createColorTheme', {
|
|
7687
|
-
enumerable: true,
|
|
7688
|
-
get: function () {
|
|
7689
|
-
return theme.createColorTheme;
|
|
7690
|
-
}
|
|
7691
|
-
});
|
|
7692
|
-
Object.defineProperty(exports, 'hexToRgb', {
|
|
7693
|
-
enumerable: true,
|
|
7694
|
-
get: function () {
|
|
7695
|
-
return theme.hexToRgb;
|
|
7696
|
-
}
|
|
7697
|
-
});
|
|
7698
|
-
Object.defineProperty(exports, 'hslToRgb', {
|
|
7699
|
-
enumerable: true,
|
|
7700
|
-
get: function () {
|
|
7701
|
-
return theme.hslToRgb;
|
|
7702
|
-
}
|
|
7703
|
-
});
|
|
7704
|
-
Object.defineProperty(exports, 'isColorBlendModeValue', {
|
|
7705
|
-
enumerable: true,
|
|
7706
|
-
get: function () {
|
|
7707
|
-
return theme.isColorBlendModeValue;
|
|
7708
|
-
}
|
|
7709
|
-
});
|
|
7710
|
-
Object.defineProperty(exports, 'isColorButtonMode', {
|
|
7711
|
-
enumerable: true,
|
|
7712
|
-
get: function () {
|
|
7713
|
-
return theme.isColorButtonMode;
|
|
7714
|
-
}
|
|
7715
|
-
});
|
|
7716
|
-
Object.defineProperty(exports, 'isColorConfigBaseKey', {
|
|
7717
|
-
enumerable: true,
|
|
7718
|
-
get: function () {
|
|
7719
|
-
return theme.isColorConfigBaseKey;
|
|
7720
|
-
}
|
|
7721
|
-
});
|
|
7722
|
-
Object.defineProperty(exports, 'isColorConfigBaseTone', {
|
|
7723
|
-
enumerable: true,
|
|
7724
|
-
get: function () {
|
|
7725
|
-
return theme.isColorConfigBaseTone;
|
|
7726
|
-
}
|
|
7727
|
-
});
|
|
7728
|
-
Object.defineProperty(exports, 'isColorConfigBlendKey', {
|
|
7729
|
-
enumerable: true,
|
|
7730
|
-
get: function () {
|
|
7731
|
-
return theme.isColorConfigBlendKey;
|
|
7732
|
-
}
|
|
7733
|
-
});
|
|
7734
|
-
Object.defineProperty(exports, 'isColorConfigStateKey', {
|
|
7735
|
-
enumerable: true,
|
|
7736
|
-
get: function () {
|
|
7737
|
-
return theme.isColorConfigStateKey;
|
|
7738
|
-
}
|
|
7739
|
-
});
|
|
7740
|
-
Object.defineProperty(exports, 'isColorConfigStateTone', {
|
|
7741
|
-
enumerable: true,
|
|
7742
|
-
get: function () {
|
|
7743
|
-
return theme.isColorConfigStateTone;
|
|
7744
|
-
}
|
|
7745
|
-
});
|
|
7746
|
-
Object.defineProperty(exports, 'isColorHueKey', {
|
|
7747
|
-
enumerable: true,
|
|
7748
|
-
get: function () {
|
|
7749
|
-
return theme.isColorHueKey;
|
|
7750
|
-
}
|
|
7751
|
-
});
|
|
7752
|
-
Object.defineProperty(exports, 'isColorOpacityValue', {
|
|
7753
|
-
enumerable: true,
|
|
7754
|
-
get: function () {
|
|
7755
|
-
return theme.isColorOpacityValue;
|
|
7756
|
-
}
|
|
7757
|
-
});
|
|
7758
|
-
Object.defineProperty(exports, 'isColorTintKey', {
|
|
7759
|
-
enumerable: true,
|
|
7760
|
-
get: function () {
|
|
7761
|
-
return theme.isColorTintKey;
|
|
7762
|
-
}
|
|
7763
|
-
});
|
|
7764
|
-
Object.defineProperty(exports, 'isColorTokenValue', {
|
|
7765
|
-
enumerable: true,
|
|
7766
|
-
get: function () {
|
|
7767
|
-
return theme.isColorTokenValue;
|
|
7768
|
-
}
|
|
7769
|
-
});
|
|
7770
|
-
Object.defineProperty(exports, 'isColorValue', {
|
|
7771
|
-
enumerable: true,
|
|
7772
|
-
get: function () {
|
|
7773
|
-
return theme.isColorValue;
|
|
7774
|
-
}
|
|
7775
|
-
});
|
|
7776
|
-
Object.defineProperty(exports, 'multiply', {
|
|
7777
|
-
enumerable: true,
|
|
7778
|
-
get: function () {
|
|
7779
|
-
return theme.multiply;
|
|
7780
|
-
}
|
|
7781
|
-
});
|
|
7782
|
-
Object.defineProperty(exports, 'parseColor', {
|
|
7783
|
-
enumerable: true,
|
|
7784
|
-
get: function () {
|
|
7785
|
-
return theme.parseColor;
|
|
7786
|
-
}
|
|
7787
|
-
});
|
|
7788
|
-
Object.defineProperty(exports, 'parseTokenKey', {
|
|
7789
|
-
enumerable: true,
|
|
7790
|
-
get: function () {
|
|
7791
|
-
return theme.parseTokenKey;
|
|
7792
|
-
}
|
|
7793
|
-
});
|
|
7794
|
-
Object.defineProperty(exports, 'parseTokenValue', {
|
|
7795
|
-
enumerable: true,
|
|
7796
|
-
get: function () {
|
|
7797
|
-
return theme.parseTokenValue;
|
|
7798
|
-
}
|
|
7799
|
-
});
|
|
7800
|
-
Object.defineProperty(exports, 'rgbToHex', {
|
|
7801
|
-
enumerable: true,
|
|
7802
|
-
get: function () {
|
|
7803
|
-
return theme.rgbToHex;
|
|
7804
|
-
}
|
|
7805
|
-
});
|
|
7806
|
-
Object.defineProperty(exports, 'rgbToHsl', {
|
|
7807
|
-
enumerable: true,
|
|
7808
|
-
get: function () {
|
|
7809
|
-
return theme.rgbToHsl;
|
|
7810
|
-
}
|
|
7811
|
-
});
|
|
7812
|
-
Object.defineProperty(exports, 'rgba', {
|
|
7813
|
-
enumerable: true,
|
|
7814
|
-
get: function () {
|
|
7815
|
-
return theme.rgba;
|
|
7816
|
-
}
|
|
7817
|
-
});
|
|
7818
|
-
Object.defineProperty(exports, 'rgbaToRGBA', {
|
|
7819
|
-
enumerable: true,
|
|
7820
|
-
get: function () {
|
|
7821
|
-
return theme.rgbaToRGBA;
|
|
7822
|
-
}
|
|
7823
|
-
});
|
|
7824
|
-
Object.defineProperty(exports, 'screen', {
|
|
7825
|
-
enumerable: true,
|
|
7826
|
-
get: function () {
|
|
7827
|
-
return theme.screen;
|
|
7828
|
-
}
|
|
7829
|
-
});
|
|
7830
|
-
Object.defineProperty(exports, 'studioTheme', {
|
|
7831
|
-
enumerable: true,
|
|
7832
|
-
get: function () {
|
|
7833
|
-
return theme.defaultTheme;
|
|
7834
|
-
}
|
|
7835
|
-
});
|
|
7836
7761
|
exports.Arrow = Arrow;
|
|
7837
7762
|
exports.Autocomplete = Autocomplete;
|
|
7838
7763
|
exports.Avatar = Avatar;
|
|
@@ -7847,6 +7772,7 @@ exports.Card = Card;
|
|
|
7847
7772
|
exports.Checkbox = Checkbox;
|
|
7848
7773
|
exports.Code = Code;
|
|
7849
7774
|
exports.CodeSkeleton = CodeSkeleton;
|
|
7775
|
+
exports.ConditionalWrapper = ConditionalWrapper;
|
|
7850
7776
|
exports.Container = Container;
|
|
7851
7777
|
exports.Dialog = Dialog;
|
|
7852
7778
|
exports.DialogContext = DialogContext;
|
|
@@ -7909,8 +7835,11 @@ exports._raf2 = _raf2;
|
|
|
7909
7835
|
exports._responsive = _responsive;
|
|
7910
7836
|
exports.attemptFocus = attemptFocus;
|
|
7911
7837
|
exports.containsOrEqualsElement = containsOrEqualsElement;
|
|
7838
|
+
exports.createColorTheme = createColorTheme;
|
|
7912
7839
|
exports.focusFirstDescendant = focusFirstDescendant;
|
|
7913
7840
|
exports.focusLastDescendant = focusLastDescendant;
|
|
7841
|
+
exports.hexToRgb = hexToRgb;
|
|
7842
|
+
exports.hslToRgb = hslToRgb;
|
|
7914
7843
|
exports.isFocusable = isFocusable;
|
|
7915
7844
|
exports.isHTMLAnchorElement = isHTMLAnchorElement;
|
|
7916
7845
|
exports.isHTMLButtonElement = isHTMLButtonElement;
|
|
@@ -7918,12 +7847,19 @@ exports.isHTMLElement = isHTMLElement;
|
|
|
7918
7847
|
exports.isHTMLInputElement = isHTMLInputElement;
|
|
7919
7848
|
exports.isHTMLSelectElement = isHTMLSelectElement;
|
|
7920
7849
|
exports.isHTMLTextAreaElement = isHTMLTextAreaElement;
|
|
7850
|
+
exports.multiply = multiply;
|
|
7851
|
+
exports.parseColor = parseColor;
|
|
7921
7852
|
exports.rem = rem;
|
|
7922
7853
|
exports.responsiveCodeFontStyle = responsiveCodeFontStyle;
|
|
7923
7854
|
exports.responsiveHeadingFont = responsiveHeadingFont;
|
|
7924
7855
|
exports.responsiveLabelFont = responsiveLabelFont;
|
|
7925
7856
|
exports.responsiveTextAlignStyle = responsiveTextAlignStyle;
|
|
7926
7857
|
exports.responsiveTextFont = responsiveTextFont;
|
|
7858
|
+
exports.rgbToHex = rgbToHex;
|
|
7859
|
+
exports.rgbToHsl = rgbToHsl;
|
|
7860
|
+
exports.rgba = rgba;
|
|
7861
|
+
exports.screen = screen;
|
|
7862
|
+
exports.studioTheme = studioTheme;
|
|
7927
7863
|
exports.useArrayProp = useArrayProp;
|
|
7928
7864
|
exports.useBoundaryElement = useBoundaryElement;
|
|
7929
7865
|
exports.useClickOutside = useClickOutside;
|