@sanity/ui 2.0.0-beta.3 → 2.0.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.mjs +1 -0
- package/dist/index.d.ts +69 -30
- package/dist/index.esm.js +422 -303
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +422 -302
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- 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/middleware/origin.ts +47 -0
- package/src/core/primitives/popover/popover.tsx +67 -13
- package/src/core/primitives/popover/popoverCard.tsx +26 -15
- package/src/core/primitives/tooltip/tooltip.tsx +46 -56
- package/src/core/primitives/tooltip/tooltipCard.tsx +104 -0
- 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/dist/index.esm.js
CHANGED
|
@@ -6,8 +6,8 @@ import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css,
|
|
|
6
6
|
import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
|
|
7
7
|
import Refractor from 'react-refractor';
|
|
8
8
|
import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from '@floating-ui/react-dom';
|
|
9
|
+
import { motion, AnimatePresence } from 'framer-motion';
|
|
9
10
|
import { createPortal } from 'react-dom';
|
|
10
|
-
import { AnimatePresence, motion } from 'framer-motion';
|
|
11
11
|
const createColorTheme = createColorTheme$1;
|
|
12
12
|
const hexToRgb = hexToRgb$1;
|
|
13
13
|
const hslToRgb = hslToRgb$1;
|
|
@@ -20,6 +20,24 @@ const screen = screen$1;
|
|
|
20
20
|
const studioTheme = buildTheme();
|
|
21
21
|
const EMPTY_ARRAY = [];
|
|
22
22
|
const EMPTY_RECORD = {};
|
|
23
|
+
const POPOVER_MOTION_PROPS = {
|
|
24
|
+
initial: {
|
|
25
|
+
opacity: 0.5,
|
|
26
|
+
scale: 0.97
|
|
27
|
+
},
|
|
28
|
+
animate: {
|
|
29
|
+
opacity: 1,
|
|
30
|
+
scale: 1
|
|
31
|
+
},
|
|
32
|
+
exit: {
|
|
33
|
+
opacity: 0,
|
|
34
|
+
scale: 0.97
|
|
35
|
+
},
|
|
36
|
+
transition: {
|
|
37
|
+
duration: 0.4,
|
|
38
|
+
type: "spring"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
23
41
|
function _fillCSSObject(keys, value) {
|
|
24
42
|
return keys.reduce((style, key) => {
|
|
25
43
|
style[key] = value;
|
|
@@ -1478,13 +1496,13 @@ function responsiveInputPaddingIconRightStyle(props) {
|
|
|
1478
1496
|
$iconRight: true
|
|
1479
1497
|
});
|
|
1480
1498
|
}
|
|
1481
|
-
var __freeze$
|
|
1482
|
-
var __defProp$
|
|
1483
|
-
var __template$
|
|
1484
|
-
value: __freeze$
|
|
1499
|
+
var __freeze$F = Object.freeze;
|
|
1500
|
+
var __defProp$G = Object.defineProperty;
|
|
1501
|
+
var __template$F = (cooked, raw) => __freeze$F(__defProp$G(cooked, "raw", {
|
|
1502
|
+
value: __freeze$F(raw || cooked.slice())
|
|
1485
1503
|
}));
|
|
1486
|
-
var _a$
|
|
1487
|
-
const ROOT_STYLE = css(_a$
|
|
1504
|
+
var _a$F, _b$n, _c$c;
|
|
1505
|
+
const ROOT_STYLE = css(_a$F || (_a$F = __template$F(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
|
|
1488
1506
|
function textInputRootStyle() {
|
|
1489
1507
|
return ROOT_STYLE;
|
|
1490
1508
|
}
|
|
@@ -1498,7 +1516,7 @@ function textInputBaseStyle(props) {
|
|
|
1498
1516
|
color,
|
|
1499
1517
|
font
|
|
1500
1518
|
} = getTheme_v2(props.theme);
|
|
1501
|
-
return css(_b$n || (_b$n = __template$
|
|
1519
|
+
return 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);
|
|
1502
1520
|
}
|
|
1503
1521
|
function textInputFontSizeStyle(props) {
|
|
1504
1522
|
const {
|
|
@@ -1525,7 +1543,7 @@ function textInputRepresentationStyle(props) {
|
|
|
1525
1543
|
color,
|
|
1526
1544
|
input
|
|
1527
1545
|
} = getTheme_v2(props.theme);
|
|
1528
|
-
return css(_c$c || (_c$c = __template$
|
|
1546
|
+
return 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({
|
|
1529
1547
|
color: color.input.default.enabled.border,
|
|
1530
1548
|
width: input.border.width
|
|
1531
1549
|
}), color.input.invalid.enabled.bg, color.input.invalid.enabled.fg, focusRingBorderStyle({
|
|
@@ -1599,12 +1617,12 @@ function responsiveShadowStyle(props) {
|
|
|
1599
1617
|
} = getTheme_v2(props.theme);
|
|
1600
1618
|
return _responsive(media, props.$shadow, index => shadowStyle(shadow[index], card.shadow.outline));
|
|
1601
1619
|
}
|
|
1602
|
-
var __freeze$
|
|
1603
|
-
var __defProp$
|
|
1604
|
-
var __template$
|
|
1605
|
-
value: __freeze$
|
|
1620
|
+
var __freeze$E = Object.freeze;
|
|
1621
|
+
var __defProp$F = Object.defineProperty;
|
|
1622
|
+
var __template$E = (cooked, raw) => __freeze$E(__defProp$F(cooked, "raw", {
|
|
1623
|
+
value: __freeze$E(raw || cooked.slice())
|
|
1606
1624
|
}));
|
|
1607
|
-
var _a$
|
|
1625
|
+
var _a$E, _b$m, _c$b;
|
|
1608
1626
|
function labelBaseStyle(props) {
|
|
1609
1627
|
const {
|
|
1610
1628
|
$accent,
|
|
@@ -1613,16 +1631,16 @@ function labelBaseStyle(props) {
|
|
|
1613
1631
|
const {
|
|
1614
1632
|
font
|
|
1615
1633
|
} = getTheme_v2(props.theme);
|
|
1616
|
-
return css(_c$b || (_c$b = __template$
|
|
1634
|
+
return 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 && css(_a$E || (_a$E = __template$E(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$m || (_b$m = __template$E(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
1617
1635
|
}
|
|
1618
|
-
var __freeze$
|
|
1619
|
-
var __defProp$
|
|
1620
|
-
var __template$
|
|
1621
|
-
value: __freeze$
|
|
1636
|
+
var __freeze$D = Object.freeze;
|
|
1637
|
+
var __defProp$E = Object.defineProperty;
|
|
1638
|
+
var __template$D = (cooked, raw) => __freeze$D(__defProp$E(cooked, "raw", {
|
|
1639
|
+
value: __freeze$D(raw || cooked.slice())
|
|
1622
1640
|
}));
|
|
1623
|
-
var _a$
|
|
1624
|
-
const Root$
|
|
1625
|
-
const SpanWithTextOverflow$2 = styled.span(_a$
|
|
1641
|
+
var _a$D;
|
|
1642
|
+
const Root$C = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
1643
|
+
const SpanWithTextOverflow$2 = styled.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"])));
|
|
1626
1644
|
const Label = forwardRef(function Label2(props, ref) {
|
|
1627
1645
|
const {
|
|
1628
1646
|
accent,
|
|
@@ -1644,7 +1662,7 @@ const Label = forwardRef(function Label2(props, ref) {
|
|
|
1644
1662
|
children
|
|
1645
1663
|
});
|
|
1646
1664
|
}
|
|
1647
|
-
return /* @__PURE__ */jsx(Root$
|
|
1665
|
+
return /* @__PURE__ */jsx(Root$C, {
|
|
1648
1666
|
"data-ui": "Label",
|
|
1649
1667
|
...restProps,
|
|
1650
1668
|
$accent: accent,
|
|
@@ -1803,7 +1821,7 @@ function avatarStrokeStyle() {
|
|
|
1803
1821
|
}
|
|
1804
1822
|
};
|
|
1805
1823
|
}
|
|
1806
|
-
const Root$
|
|
1824
|
+
const Root$B = styled.div(responsiveAvatarSizeStyle, avatarStyle.root);
|
|
1807
1825
|
const Arrow$1 = styled.div(avatarStyle.arrow);
|
|
1808
1826
|
const BgStroke = styled.ellipse(avatarStyle.bgStroke);
|
|
1809
1827
|
const Stroke = styled.ellipse(avatarStyle.stroke);
|
|
@@ -1859,7 +1877,7 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
|
|
|
1859
1877
|
if (s === 3) return 5;
|
|
1860
1878
|
return 0;
|
|
1861
1879
|
}), [size]);
|
|
1862
|
-
return /* @__PURE__ */jsxs(Root$
|
|
1880
|
+
return /* @__PURE__ */jsxs(Root$B, {
|
|
1863
1881
|
as,
|
|
1864
1882
|
"data-as": typeof as === "string" ? as : void 0,
|
|
1865
1883
|
"data-ui": "Avatar",
|
|
@@ -1928,12 +1946,12 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
|
|
|
1928
1946
|
})]
|
|
1929
1947
|
});
|
|
1930
1948
|
});
|
|
1931
|
-
var __freeze$
|
|
1932
|
-
var __defProp$
|
|
1933
|
-
var __template$
|
|
1934
|
-
value: __freeze$
|
|
1949
|
+
var __freeze$C = Object.freeze;
|
|
1950
|
+
var __defProp$D = Object.defineProperty;
|
|
1951
|
+
var __template$C = (cooked, raw) => __freeze$C(__defProp$D(cooked, "raw", {
|
|
1952
|
+
value: __freeze$C(raw || cooked.slice())
|
|
1935
1953
|
}));
|
|
1936
|
-
var _a$
|
|
1954
|
+
var _a$C;
|
|
1937
1955
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1938
1956
|
const {
|
|
1939
1957
|
avatar,
|
|
@@ -1953,9 +1971,9 @@ function _avatarCounterBaseStyle(props) {
|
|
|
1953
1971
|
const {
|
|
1954
1972
|
space
|
|
1955
1973
|
} = getTheme_v2(props.theme);
|
|
1956
|
-
return css(_a$
|
|
1974
|
+
return 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]));
|
|
1957
1975
|
}
|
|
1958
|
-
const Root$
|
|
1976
|
+
const Root$A = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
1959
1977
|
const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
|
|
1960
1978
|
const {
|
|
1961
1979
|
count,
|
|
@@ -1968,7 +1986,7 @@ const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
|
|
|
1968
1986
|
if (s === 3) return 5;
|
|
1969
1987
|
return 0;
|
|
1970
1988
|
}), [size]);
|
|
1971
|
-
return /* @__PURE__ */jsx(Root$
|
|
1989
|
+
return /* @__PURE__ */jsx(Root$A, {
|
|
1972
1990
|
$size: size,
|
|
1973
1991
|
"data-ui": "AvatarCounter",
|
|
1974
1992
|
ref,
|
|
@@ -1984,13 +2002,13 @@ function childrenToElementArray(children) {
|
|
|
1984
2002
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
1985
2003
|
return childrenArray.filter(node => isElement$1(node) || isFragment(node) || typeof node === "string");
|
|
1986
2004
|
}
|
|
1987
|
-
var __freeze$
|
|
1988
|
-
var __defProp$
|
|
1989
|
-
var __template$
|
|
1990
|
-
value: __freeze$
|
|
2005
|
+
var __freeze$B = Object.freeze;
|
|
2006
|
+
var __defProp$C = Object.defineProperty;
|
|
2007
|
+
var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
|
|
2008
|
+
value: __freeze$B(raw || cooked.slice())
|
|
1991
2009
|
}));
|
|
1992
|
-
var _a$
|
|
1993
|
-
const BASE_STYLES = css(_a$
|
|
2010
|
+
var _a$B;
|
|
2011
|
+
const BASE_STYLES = 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"])));
|
|
1994
2012
|
function avatarStackStyle() {
|
|
1995
2013
|
return BASE_STYLES;
|
|
1996
2014
|
}
|
|
@@ -2009,7 +2027,7 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
2009
2027
|
};
|
|
2010
2028
|
});
|
|
2011
2029
|
}
|
|
2012
|
-
const Root$
|
|
2030
|
+
const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
|
|
2013
2031
|
const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
|
|
2014
2032
|
const {
|
|
2015
2033
|
children: childrenProp,
|
|
@@ -2024,7 +2042,7 @@ const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
|
|
|
2024
2042
|
const visibleCount = maxLength - 1;
|
|
2025
2043
|
const extraCount = len - visibleCount;
|
|
2026
2044
|
const visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
|
|
2027
|
-
return /* @__PURE__ */jsxs(Root$
|
|
2045
|
+
return /* @__PURE__ */jsxs(Root$z, {
|
|
2028
2046
|
"data-ui": "AvatarStack",
|
|
2029
2047
|
...restProps,
|
|
2030
2048
|
ref,
|
|
@@ -2046,7 +2064,7 @@ const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
|
|
|
2046
2064
|
}, String(childIndex)))]
|
|
2047
2065
|
});
|
|
2048
2066
|
});
|
|
2049
|
-
const Root$
|
|
2067
|
+
const Root$y = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
|
|
2050
2068
|
const Box = forwardRef(function Box2(props, ref) {
|
|
2051
2069
|
const {
|
|
2052
2070
|
as: asProp = "div",
|
|
@@ -2077,7 +2095,7 @@ const Box = forwardRef(function Box2(props, ref) {
|
|
|
2077
2095
|
sizing,
|
|
2078
2096
|
...restProps
|
|
2079
2097
|
} = props;
|
|
2080
|
-
return /* @__PURE__ */jsx(Root$
|
|
2098
|
+
return /* @__PURE__ */jsx(Root$y, {
|
|
2081
2099
|
"data-as": typeof asProp === "string" ? asProp : void 0,
|
|
2082
2100
|
"data-ui": "Box",
|
|
2083
2101
|
...restProps,
|
|
@@ -2111,12 +2129,12 @@ const Box = forwardRef(function Box2(props, ref) {
|
|
|
2111
2129
|
children: props.children
|
|
2112
2130
|
});
|
|
2113
2131
|
});
|
|
2114
|
-
var __freeze$
|
|
2115
|
-
var __defProp$
|
|
2116
|
-
var __template$
|
|
2117
|
-
value: __freeze$
|
|
2132
|
+
var __freeze$A = Object.freeze;
|
|
2133
|
+
var __defProp$B = Object.defineProperty;
|
|
2134
|
+
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
2135
|
+
value: __freeze$A(raw || cooked.slice())
|
|
2118
2136
|
}));
|
|
2119
|
-
var _a$
|
|
2137
|
+
var _a$A, _b$l, _c$a;
|
|
2120
2138
|
function textBaseStyle(props) {
|
|
2121
2139
|
const {
|
|
2122
2140
|
$accent,
|
|
@@ -2125,16 +2143,16 @@ function textBaseStyle(props) {
|
|
|
2125
2143
|
const {
|
|
2126
2144
|
font
|
|
2127
2145
|
} = getTheme_v2(props.theme);
|
|
2128
|
-
return css(_c$a || (_c$a = __template$
|
|
2146
|
+
return 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 && css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family, font.text.weights.bold);
|
|
2129
2147
|
}
|
|
2130
|
-
var __freeze$
|
|
2131
|
-
var __defProp$
|
|
2132
|
-
var __template$
|
|
2133
|
-
value: __freeze$
|
|
2148
|
+
var __freeze$z = Object.freeze;
|
|
2149
|
+
var __defProp$A = Object.defineProperty;
|
|
2150
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
2151
|
+
value: __freeze$z(raw || cooked.slice())
|
|
2134
2152
|
}));
|
|
2135
|
-
var _a$
|
|
2136
|
-
const Root$
|
|
2137
|
-
const SpanWithTextOverflow$1 = styled.span(_a$
|
|
2153
|
+
var _a$z;
|
|
2154
|
+
const Root$x = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
2155
|
+
const SpanWithTextOverflow$1 = styled.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"])));
|
|
2138
2156
|
const Text = forwardRef(function Text2(props, ref) {
|
|
2139
2157
|
const {
|
|
2140
2158
|
accent = false,
|
|
@@ -2152,7 +2170,7 @@ const Text = forwardRef(function Text2(props, ref) {
|
|
|
2152
2170
|
children
|
|
2153
2171
|
});
|
|
2154
2172
|
}
|
|
2155
|
-
return /* @__PURE__ */jsx(Root$
|
|
2173
|
+
return /* @__PURE__ */jsx(Root$x, {
|
|
2156
2174
|
"data-ui": "Text",
|
|
2157
2175
|
...restProps,
|
|
2158
2176
|
$accent: accent,
|
|
@@ -2181,7 +2199,7 @@ function badgeStyle(props) {
|
|
|
2181
2199
|
}
|
|
2182
2200
|
};
|
|
2183
2201
|
}
|
|
2184
|
-
const Root$
|
|
2202
|
+
const Root$w = styled(Box)(responsiveRadiusStyle, badgeStyle);
|
|
2185
2203
|
const Badge = forwardRef(function Badge2(props, ref) {
|
|
2186
2204
|
const {
|
|
2187
2205
|
children,
|
|
@@ -2193,7 +2211,7 @@ const Badge = forwardRef(function Badge2(props, ref) {
|
|
|
2193
2211
|
tone = "default",
|
|
2194
2212
|
...restProps
|
|
2195
2213
|
} = props;
|
|
2196
|
-
return /* @__PURE__ */jsx(Root$
|
|
2214
|
+
return /* @__PURE__ */jsx(Root$w, {
|
|
2197
2215
|
"data-ui": "Badge",
|
|
2198
2216
|
...restProps,
|
|
2199
2217
|
$tone: tone,
|
|
@@ -2207,7 +2225,7 @@ const Badge = forwardRef(function Badge2(props, ref) {
|
|
|
2207
2225
|
})
|
|
2208
2226
|
});
|
|
2209
2227
|
});
|
|
2210
|
-
const Root$
|
|
2228
|
+
const Root$v = styled(Box)(flexItemStyle, responsiveFlexStyle);
|
|
2211
2229
|
const Flex = forwardRef(function Flex2(props, ref) {
|
|
2212
2230
|
const {
|
|
2213
2231
|
align,
|
|
@@ -2218,7 +2236,7 @@ const Flex = forwardRef(function Flex2(props, ref) {
|
|
|
2218
2236
|
wrap,
|
|
2219
2237
|
...restProps
|
|
2220
2238
|
} = props;
|
|
2221
|
-
return /* @__PURE__ */jsx(Root$
|
|
2239
|
+
return /* @__PURE__ */jsx(Root$v, {
|
|
2222
2240
|
"data-ui": "Flex",
|
|
2223
2241
|
...restProps,
|
|
2224
2242
|
$align: useArrayProp(align),
|
|
@@ -2230,16 +2248,16 @@ const Flex = forwardRef(function Flex2(props, ref) {
|
|
|
2230
2248
|
ref
|
|
2231
2249
|
});
|
|
2232
2250
|
});
|
|
2233
|
-
var __freeze$
|
|
2234
|
-
var __defProp$
|
|
2235
|
-
var __template$
|
|
2236
|
-
value: __freeze$
|
|
2251
|
+
var __freeze$y = Object.freeze;
|
|
2252
|
+
var __defProp$z = Object.defineProperty;
|
|
2253
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
2254
|
+
value: __freeze$y(raw || cooked.slice())
|
|
2237
2255
|
}));
|
|
2238
|
-
var _a$
|
|
2239
|
-
const rotate$1 = keyframes(_a$
|
|
2240
|
-
const Root$
|
|
2256
|
+
var _a$y, _b$k;
|
|
2257
|
+
const rotate$1 = keyframes(_a$y || (_a$y = __template$y(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
2258
|
+
const Root$u = styled(Text)(_b$k || (_b$k = __template$y(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
|
|
2241
2259
|
const Spinner = forwardRef(function Spinner2(props, ref) {
|
|
2242
|
-
return /* @__PURE__ */jsx(Root$
|
|
2260
|
+
return /* @__PURE__ */jsx(Root$u, {
|
|
2243
2261
|
"data-ui": "Spinner",
|
|
2244
2262
|
...props,
|
|
2245
2263
|
ref,
|
|
@@ -2317,12 +2335,12 @@ function _cardColorStyle(base, color) {
|
|
|
2317
2335
|
"--card-hairline-hard-color": color.border
|
|
2318
2336
|
};
|
|
2319
2337
|
}
|
|
2320
|
-
var __freeze$
|
|
2321
|
-
var __defProp$
|
|
2322
|
-
var __template$
|
|
2323
|
-
value: __freeze$
|
|
2338
|
+
var __freeze$x = Object.freeze;
|
|
2339
|
+
var __defProp$y = Object.defineProperty;
|
|
2340
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
2341
|
+
value: __freeze$x(raw || cooked.slice())
|
|
2324
2342
|
}));
|
|
2325
|
-
var _a$
|
|
2343
|
+
var _a$x, _b$j;
|
|
2326
2344
|
function buttonBaseStyles(props) {
|
|
2327
2345
|
const {
|
|
2328
2346
|
$width
|
|
@@ -2330,7 +2348,7 @@ function buttonBaseStyles(props) {
|
|
|
2330
2348
|
const {
|
|
2331
2349
|
style
|
|
2332
2350
|
} = getTheme_v2(props.theme);
|
|
2333
|
-
return css(_b$j || (_b$j = __template$
|
|
2351
|
+
return 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" && css(_a$x || (_a$x = __template$x(["\n width: -moz-available;\n width: -webkit-fill-available;\n width: stretch;\n "]))));
|
|
2334
2352
|
}
|
|
2335
2353
|
function combineBoxShadow() {
|
|
2336
2354
|
for (var _len = arguments.length, boxShadows = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -2385,14 +2403,14 @@ function buttonColorStyles(props) {
|
|
|
2385
2403
|
}
|
|
2386
2404
|
}, (_a2 = style == null ? void 0 : style.button) == null ? void 0 : _a2.root].filter(Boolean);
|
|
2387
2405
|
}
|
|
2388
|
-
var __freeze$
|
|
2389
|
-
var __defProp$
|
|
2390
|
-
var __template$
|
|
2391
|
-
value: __freeze$
|
|
2406
|
+
var __freeze$w = Object.freeze;
|
|
2407
|
+
var __defProp$x = Object.defineProperty;
|
|
2408
|
+
var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
|
|
2409
|
+
value: __freeze$w(raw || cooked.slice())
|
|
2392
2410
|
}));
|
|
2393
|
-
var _a$
|
|
2394
|
-
const Root$
|
|
2395
|
-
const LoadingBox = styled.div(_a$
|
|
2411
|
+
var _a$w;
|
|
2412
|
+
const Root$t = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
|
|
2413
|
+
const LoadingBox = styled.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"])));
|
|
2396
2414
|
const Button = forwardRef(function Button2(props, ref) {
|
|
2397
2415
|
const {
|
|
2398
2416
|
children,
|
|
@@ -2444,7 +2462,7 @@ const Button = forwardRef(function Button2(props, ref) {
|
|
|
2444
2462
|
paddingLeft,
|
|
2445
2463
|
paddingRight
|
|
2446
2464
|
}), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
|
|
2447
|
-
return /* @__PURE__ */jsxs(Root$
|
|
2465
|
+
return /* @__PURE__ */jsxs(Root$t, {
|
|
2448
2466
|
"data-ui": "Button",
|
|
2449
2467
|
...restProps,
|
|
2450
2468
|
$mode: mode,
|
|
@@ -2490,12 +2508,12 @@ const Button = forwardRef(function Button2(props, ref) {
|
|
|
2490
2508
|
})]
|
|
2491
2509
|
});
|
|
2492
2510
|
});
|
|
2493
|
-
var __freeze$
|
|
2494
|
-
var __defProp$
|
|
2495
|
-
var __template$
|
|
2496
|
-
value: __freeze$
|
|
2511
|
+
var __freeze$v = Object.freeze;
|
|
2512
|
+
var __defProp$w = Object.defineProperty;
|
|
2513
|
+
var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
|
|
2514
|
+
value: __freeze$v(raw || cooked.slice())
|
|
2497
2515
|
}));
|
|
2498
|
-
var _a$
|
|
2516
|
+
var _a$v, _b$i, _c$9;
|
|
2499
2517
|
function cardStyle(props) {
|
|
2500
2518
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
2501
2519
|
}
|
|
@@ -2506,7 +2524,7 @@ function cardBaseStyle(props) {
|
|
|
2506
2524
|
const {
|
|
2507
2525
|
space
|
|
2508
2526
|
} = getTheme_v2(props.theme);
|
|
2509
|
-
return css(_b$i || (_b$i = __template$
|
|
2527
|
+
return 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 && 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]));
|
|
2510
2528
|
}
|
|
2511
2529
|
function cardColorStyle(props) {
|
|
2512
2530
|
var _a2;
|
|
@@ -2523,7 +2541,7 @@ function cardColorStyle(props) {
|
|
|
2523
2541
|
width: card.border.width,
|
|
2524
2542
|
color: "var(--card-border-color)"
|
|
2525
2543
|
};
|
|
2526
|
-
return css(_c$9 || (_c$9 = __template$
|
|
2544
|
+
return 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({
|
|
2527
2545
|
base: color,
|
|
2528
2546
|
border,
|
|
2529
2547
|
focusRing: card.focusRing
|
|
@@ -2533,7 +2551,7 @@ function cardColorStyle(props) {
|
|
|
2533
2551
|
focusRing: card.focusRing
|
|
2534
2552
|
}) : void 0, (_a2 = style == null ? void 0 : style.card) == null ? void 0 : _a2.root);
|
|
2535
2553
|
}
|
|
2536
|
-
const Root$
|
|
2554
|
+
const Root$s = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
2537
2555
|
const Card = forwardRef(function Card2(props, ref) {
|
|
2538
2556
|
const {
|
|
2539
2557
|
__unstable_checkered: checkered = false,
|
|
@@ -2558,7 +2576,7 @@ const Card = forwardRef(function Card2(props, ref) {
|
|
|
2558
2576
|
return /* @__PURE__ */jsx(ThemeColorProvider, {
|
|
2559
2577
|
scheme,
|
|
2560
2578
|
tone,
|
|
2561
|
-
children: /* @__PURE__ */jsx(Root$
|
|
2579
|
+
children: /* @__PURE__ */jsx(Root$s, {
|
|
2562
2580
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2563
2581
|
"data-scheme": rootTheme.scheme,
|
|
2564
2582
|
"data-ui": "Card",
|
|
@@ -2583,14 +2601,14 @@ const Card = forwardRef(function Card2(props, ref) {
|
|
|
2583
2601
|
})
|
|
2584
2602
|
});
|
|
2585
2603
|
});
|
|
2586
|
-
var __freeze$
|
|
2587
|
-
var __defProp$
|
|
2588
|
-
var __template$
|
|
2589
|
-
value: __freeze$
|
|
2604
|
+
var __freeze$u = Object.freeze;
|
|
2605
|
+
var __defProp$v = Object.defineProperty;
|
|
2606
|
+
var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
|
|
2607
|
+
value: __freeze$u(raw || cooked.slice())
|
|
2590
2608
|
}));
|
|
2591
|
-
var _a$
|
|
2609
|
+
var _a$u, _b$h;
|
|
2592
2610
|
function checkboxBaseStyles() {
|
|
2593
|
-
return css(_a$
|
|
2611
|
+
return css(_a$u || (_a$u = __template$u(["\n position: relative;\n display: inline-block;\n "])));
|
|
2594
2612
|
}
|
|
2595
2613
|
function inputElementStyles(props) {
|
|
2596
2614
|
const {
|
|
@@ -2601,7 +2619,7 @@ function inputElementStyles(props) {
|
|
|
2601
2619
|
const {
|
|
2602
2620
|
focusRing
|
|
2603
2621
|
} = input.checkbox;
|
|
2604
|
-
return css(_b$h || (_b$h = __template$
|
|
2622
|
+
return 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({
|
|
2605
2623
|
color: color.input.default.enabled.border,
|
|
2606
2624
|
width: input.border.width
|
|
2607
2625
|
}), rem(radius[2]), color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
@@ -2634,7 +2652,7 @@ function inputElementStyles(props) {
|
|
|
2634
2652
|
color: color.input.default.readOnly.border
|
|
2635
2653
|
}), color.input.default.readOnly.fg, color.input.default.readOnly.muted.bg);
|
|
2636
2654
|
}
|
|
2637
|
-
const Root$
|
|
2655
|
+
const Root$r = styled.div(checkboxBaseStyles);
|
|
2638
2656
|
const Input$5 = styled.input(inputElementStyles);
|
|
2639
2657
|
const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
|
|
2640
2658
|
const {
|
|
@@ -2654,7 +2672,7 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2654
2672
|
ref.current.indeterminate = indeterminate || false;
|
|
2655
2673
|
}
|
|
2656
2674
|
}, [indeterminate, ref]);
|
|
2657
|
-
return /* @__PURE__ */jsxs(Root$
|
|
2675
|
+
return /* @__PURE__ */jsxs(Root$r, {
|
|
2658
2676
|
className,
|
|
2659
2677
|
"data-ui": "Checkbox",
|
|
2660
2678
|
style,
|
|
@@ -2672,12 +2690,12 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2672
2690
|
})]
|
|
2673
2691
|
});
|
|
2674
2692
|
});
|
|
2675
|
-
var __freeze$
|
|
2676
|
-
var __defProp$
|
|
2677
|
-
var __template$
|
|
2678
|
-
value: __freeze$
|
|
2693
|
+
var __freeze$t = Object.freeze;
|
|
2694
|
+
var __defProp$u = Object.defineProperty;
|
|
2695
|
+
var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
|
|
2696
|
+
value: __freeze$t(raw || cooked.slice())
|
|
2679
2697
|
}));
|
|
2680
|
-
var _a$
|
|
2698
|
+
var _a$t;
|
|
2681
2699
|
function codeSyntaxHighlightingStyle(_ref2) {
|
|
2682
2700
|
let {
|
|
2683
2701
|
theme
|
|
@@ -2799,9 +2817,9 @@ function codeSyntaxHighlightingStyle(_ref2) {
|
|
|
2799
2817
|
};
|
|
2800
2818
|
}
|
|
2801
2819
|
function codeBaseStyle() {
|
|
2802
|
-
return css(_a$
|
|
2820
|
+
return 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);
|
|
2803
2821
|
}
|
|
2804
|
-
const Root$
|
|
2822
|
+
const Root$q = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
|
|
2805
2823
|
const Code = forwardRef(function Code2(props, ref) {
|
|
2806
2824
|
const {
|
|
2807
2825
|
children,
|
|
@@ -2812,7 +2830,7 @@ const Code = forwardRef(function Code2(props, ref) {
|
|
|
2812
2830
|
} = props;
|
|
2813
2831
|
const language = typeof languageProp === "string" ? languageProp : void 0;
|
|
2814
2832
|
const registered = language ? Refractor.hasLanguage(language) : false;
|
|
2815
|
-
return /* @__PURE__ */jsxs(Root$
|
|
2833
|
+
return /* @__PURE__ */jsxs(Root$q, {
|
|
2816
2834
|
"data-ui": "Code",
|
|
2817
2835
|
...restProps,
|
|
2818
2836
|
$size: useArrayProp(size),
|
|
@@ -2843,14 +2861,14 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2843
2861
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
2844
2862
|
}));
|
|
2845
2863
|
}
|
|
2846
|
-
const Root$
|
|
2864
|
+
const Root$p = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
|
|
2847
2865
|
const Container = forwardRef(function Container2(props, ref) {
|
|
2848
2866
|
const {
|
|
2849
2867
|
as,
|
|
2850
2868
|
width = 2,
|
|
2851
2869
|
...restProps
|
|
2852
2870
|
} = props;
|
|
2853
|
-
return /* @__PURE__ */jsx(Root$
|
|
2871
|
+
return /* @__PURE__ */jsx(Root$p, {
|
|
2854
2872
|
"data-ui": "Container",
|
|
2855
2873
|
...restProps,
|
|
2856
2874
|
$width: useArrayProp(width),
|
|
@@ -2858,7 +2876,7 @@ const Container = forwardRef(function Container2(props, ref) {
|
|
|
2858
2876
|
ref
|
|
2859
2877
|
});
|
|
2860
2878
|
});
|
|
2861
|
-
const Root$
|
|
2879
|
+
const Root$o = styled(Box)(responsiveGridStyle);
|
|
2862
2880
|
const Grid = forwardRef(function Grid2(props, ref) {
|
|
2863
2881
|
const {
|
|
2864
2882
|
as,
|
|
@@ -2873,7 +2891,7 @@ const Grid = forwardRef(function Grid2(props, ref) {
|
|
|
2873
2891
|
children,
|
|
2874
2892
|
...restProps
|
|
2875
2893
|
} = props;
|
|
2876
|
-
return /* @__PURE__ */jsx(Root$
|
|
2894
|
+
return /* @__PURE__ */jsx(Root$o, {
|
|
2877
2895
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2878
2896
|
"data-ui": "Grid",
|
|
2879
2897
|
...restProps,
|
|
@@ -2890,12 +2908,12 @@ const Grid = forwardRef(function Grid2(props, ref) {
|
|
|
2890
2908
|
children
|
|
2891
2909
|
});
|
|
2892
2910
|
});
|
|
2893
|
-
var __freeze$
|
|
2894
|
-
var __defProp$
|
|
2895
|
-
var __template$
|
|
2896
|
-
value: __freeze$
|
|
2911
|
+
var __freeze$s = Object.freeze;
|
|
2912
|
+
var __defProp$t = Object.defineProperty;
|
|
2913
|
+
var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
|
|
2914
|
+
value: __freeze$s(raw || cooked.slice())
|
|
2897
2915
|
}));
|
|
2898
|
-
var _a$
|
|
2916
|
+
var _a$s, _b$g, _c$8;
|
|
2899
2917
|
function headingBaseStyle(props) {
|
|
2900
2918
|
const {
|
|
2901
2919
|
$accent,
|
|
@@ -2904,16 +2922,16 @@ function headingBaseStyle(props) {
|
|
|
2904
2922
|
const {
|
|
2905
2923
|
font
|
|
2906
2924
|
} = getTheme_v2(props.theme);
|
|
2907
|
-
return css(_c$8 || (_c$8 = __template$
|
|
2925
|
+
return 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 && css(_a$s || (_a$s = __template$s(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$g || (_b$g = __template$s(["\n color: var(--card-muted-fg-color);\n "]))), font.code.family);
|
|
2908
2926
|
}
|
|
2909
|
-
var __freeze$
|
|
2910
|
-
var __defProp$
|
|
2911
|
-
var __template$
|
|
2912
|
-
value: __freeze$
|
|
2927
|
+
var __freeze$r = Object.freeze;
|
|
2928
|
+
var __defProp$s = Object.defineProperty;
|
|
2929
|
+
var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
|
|
2930
|
+
value: __freeze$r(raw || cooked.slice())
|
|
2913
2931
|
}));
|
|
2914
|
-
var _a$
|
|
2915
|
-
const Root$
|
|
2916
|
-
const SpanWithTextOverflow = styled.span(_a$
|
|
2932
|
+
var _a$r;
|
|
2933
|
+
const Root$n = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
2934
|
+
const SpanWithTextOverflow = styled.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"])));
|
|
2917
2935
|
const Heading = forwardRef(function Heading2(props, ref) {
|
|
2918
2936
|
const {
|
|
2919
2937
|
accent = false,
|
|
@@ -2931,7 +2949,7 @@ const Heading = forwardRef(function Heading2(props, ref) {
|
|
|
2931
2949
|
children
|
|
2932
2950
|
});
|
|
2933
2951
|
}
|
|
2934
|
-
return /* @__PURE__ */jsx(Root$
|
|
2952
|
+
return /* @__PURE__ */jsx(Root$n, {
|
|
2935
2953
|
"data-ui": "Heading",
|
|
2936
2954
|
...restProps,
|
|
2937
2955
|
$accent: accent,
|
|
@@ -2972,7 +2990,7 @@ function inlineSpaceStyle(props) {
|
|
|
2972
2990
|
};
|
|
2973
2991
|
});
|
|
2974
2992
|
}
|
|
2975
|
-
const Root$
|
|
2993
|
+
const Root$m = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
|
|
2976
2994
|
const Inline = forwardRef(function Inline2(props, ref) {
|
|
2977
2995
|
const {
|
|
2978
2996
|
as,
|
|
@@ -2983,7 +3001,7 @@ const Inline = forwardRef(function Inline2(props, ref) {
|
|
|
2983
3001
|
const children = useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsx("div", {
|
|
2984
3002
|
children: child
|
|
2985
3003
|
}, idx)), [childrenProp]);
|
|
2986
|
-
return /* @__PURE__ */jsx(Root$
|
|
3004
|
+
return /* @__PURE__ */jsx(Root$m, {
|
|
2987
3005
|
"data-ui": "Inline",
|
|
2988
3006
|
...restProps,
|
|
2989
3007
|
$space: useArrayProp(space),
|
|
@@ -2992,16 +3010,16 @@ const Inline = forwardRef(function Inline2(props, ref) {
|
|
|
2992
3010
|
children
|
|
2993
3011
|
});
|
|
2994
3012
|
});
|
|
2995
|
-
var __freeze$
|
|
2996
|
-
var __defProp$
|
|
2997
|
-
var __template$
|
|
2998
|
-
value: __freeze$
|
|
3013
|
+
var __freeze$q = Object.freeze;
|
|
3014
|
+
var __defProp$r = Object.defineProperty;
|
|
3015
|
+
var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
|
|
3016
|
+
value: __freeze$q(raw || cooked.slice())
|
|
2999
3017
|
}));
|
|
3000
|
-
var _a$
|
|
3018
|
+
var _a$q;
|
|
3001
3019
|
function kbdStyle() {
|
|
3002
|
-
return css(_a$
|
|
3020
|
+
return 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 "])));
|
|
3003
3021
|
}
|
|
3004
|
-
const Root$
|
|
3022
|
+
const Root$l = styled.kbd(responsiveRadiusStyle, kbdStyle);
|
|
3005
3023
|
const KBD = forwardRef(function KBD2(props, ref) {
|
|
3006
3024
|
const {
|
|
3007
3025
|
children,
|
|
@@ -3010,7 +3028,7 @@ const KBD = forwardRef(function KBD2(props, ref) {
|
|
|
3010
3028
|
radius = 2,
|
|
3011
3029
|
...restProps
|
|
3012
3030
|
} = props;
|
|
3013
|
-
return /* @__PURE__ */jsx(Root$
|
|
3031
|
+
return /* @__PURE__ */jsx(Root$l, {
|
|
3014
3032
|
"data-ui": "KBD",
|
|
3015
3033
|
...restProps,
|
|
3016
3034
|
$radius: useArrayProp(radius),
|
|
@@ -3027,6 +3045,45 @@ const KBD = forwardRef(function KBD2(props, ref) {
|
|
|
3027
3045
|
})
|
|
3028
3046
|
});
|
|
3029
3047
|
});
|
|
3048
|
+
const origin = {
|
|
3049
|
+
name: "@sanity/ui/origin",
|
|
3050
|
+
fn(_ref3) {
|
|
3051
|
+
let {
|
|
3052
|
+
middlewareData,
|
|
3053
|
+
placement,
|
|
3054
|
+
rects
|
|
3055
|
+
} = _ref3;
|
|
3056
|
+
var _a, _b;
|
|
3057
|
+
const [side] = placement.split("-");
|
|
3058
|
+
const floatingWidth = rects.floating.width;
|
|
3059
|
+
const floatingHeight = rects.floating.height;
|
|
3060
|
+
const shiftX = ((_a = middlewareData.shift) == null ? void 0 : _a.x) || 0;
|
|
3061
|
+
const shiftY = ((_b = middlewareData.shift) == null ? void 0 : _b.y) || 0;
|
|
3062
|
+
if (floatingWidth <= 0 || floatingHeight <= 0) {
|
|
3063
|
+
return {};
|
|
3064
|
+
}
|
|
3065
|
+
const isVerticalPlacement = ["bottom", "top"].includes(side);
|
|
3066
|
+
const {
|
|
3067
|
+
originX,
|
|
3068
|
+
originY
|
|
3069
|
+
} = isVerticalPlacement ? {
|
|
3070
|
+
originX: clamp(0.5 - shiftX / floatingWidth, 0, 1),
|
|
3071
|
+
originY: side === "bottom" ? 0 : 1
|
|
3072
|
+
} : {
|
|
3073
|
+
originX: side === "left" ? 1 : 0,
|
|
3074
|
+
originY: clamp(0.5 - shiftY / floatingHeight, 0, 1)
|
|
3075
|
+
};
|
|
3076
|
+
return {
|
|
3077
|
+
data: {
|
|
3078
|
+
originX,
|
|
3079
|
+
originY
|
|
3080
|
+
}
|
|
3081
|
+
};
|
|
3082
|
+
}
|
|
3083
|
+
};
|
|
3084
|
+
function clamp(num, min, max) {
|
|
3085
|
+
return Math.min(Math.max(num, min), max);
|
|
3086
|
+
}
|
|
3030
3087
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3031
3088
|
const width = targetPoint.x - movingPoint.x;
|
|
3032
3089
|
const height = targetPoint.y - movingPoint.y;
|
|
@@ -3081,20 +3138,20 @@ function compileCommands(cmds) {
|
|
|
3081
3138
|
return "";
|
|
3082
3139
|
}).join(" ");
|
|
3083
3140
|
}
|
|
3084
|
-
var __freeze$
|
|
3085
|
-
var __defProp$
|
|
3086
|
-
var __template$
|
|
3087
|
-
value: __freeze$
|
|
3141
|
+
var __freeze$p = Object.freeze;
|
|
3142
|
+
var __defProp$q = Object.defineProperty;
|
|
3143
|
+
var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
|
|
3144
|
+
value: __freeze$p(raw || cooked.slice())
|
|
3088
3145
|
}));
|
|
3089
|
-
var _a$
|
|
3090
|
-
const Root$
|
|
3146
|
+
var _a$p, _b$f, _c$7;
|
|
3147
|
+
const Root$k = styled.div(_ref4 => {
|
|
3091
3148
|
let {
|
|
3092
3149
|
$w: w
|
|
3093
|
-
} =
|
|
3094
|
-
return css(_a$
|
|
3150
|
+
} = _ref4;
|
|
3151
|
+
return 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);
|
|
3095
3152
|
});
|
|
3096
|
-
const StrokePath = styled.path(_b$f || (_b$f = __template$
|
|
3097
|
-
const ShapePath = styled.path(_c$7 || (_c$7 = __template$
|
|
3153
|
+
const StrokePath = styled.path(_b$f || (_b$f = __template$p(["\n stroke: var(--card-shadow-outline-color);\n"])));
|
|
3154
|
+
const ShapePath = styled.path(_c$7 || (_c$7 = __template$p(["\n fill: var(--card-bg-color);\n"])));
|
|
3098
3155
|
const Arrow = forwardRef(function Arrow2(props, ref) {
|
|
3099
3156
|
const {
|
|
3100
3157
|
width: w,
|
|
@@ -3130,7 +3187,7 @@ const Arrow = forwardRef(function Arrow2(props, ref) {
|
|
|
3130
3187
|
const path = compileCommands(cmds);
|
|
3131
3188
|
const strokePath = "".concat(path);
|
|
3132
3189
|
const fillPath = "".concat(path, " M ").concat(w, " -1 M 0 -1 Z");
|
|
3133
|
-
return /* @__PURE__ */jsx(Root$
|
|
3190
|
+
return /* @__PURE__ */jsx(Root$k, {
|
|
3134
3191
|
...restProps,
|
|
3135
3192
|
$w: w,
|
|
3136
3193
|
ref,
|
|
@@ -3188,6 +3245,17 @@ function useBoundaryElement() {
|
|
|
3188
3245
|
}
|
|
3189
3246
|
return value || DEFAULT_VALUE;
|
|
3190
3247
|
}
|
|
3248
|
+
function ConditionalWrapper(_ref5) {
|
|
3249
|
+
let {
|
|
3250
|
+
children,
|
|
3251
|
+
condition,
|
|
3252
|
+
wrapper
|
|
3253
|
+
} = _ref5;
|
|
3254
|
+
if (!condition) {
|
|
3255
|
+
return children;
|
|
3256
|
+
}
|
|
3257
|
+
return wrapper(children);
|
|
3258
|
+
}
|
|
3191
3259
|
function findMaxBreakpoints(media, width) {
|
|
3192
3260
|
const ret = [];
|
|
3193
3261
|
for (let i = 0; i < media.length; i += 1) {
|
|
@@ -3237,8 +3305,8 @@ const ElementQuery = forwardRef(function ElementQuery2(props, ref) {
|
|
|
3237
3305
|
children
|
|
3238
3306
|
});
|
|
3239
3307
|
});
|
|
3240
|
-
var __defProp$
|
|
3241
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$
|
|
3308
|
+
var __defProp$p = Object.defineProperty;
|
|
3309
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$p(obj, key, {
|
|
3242
3310
|
enumerable: true,
|
|
3243
3311
|
configurable: true,
|
|
3244
3312
|
writable: true,
|
|
@@ -3467,7 +3535,7 @@ function LayerProvider(props) {
|
|
|
3467
3535
|
children
|
|
3468
3536
|
});
|
|
3469
3537
|
}
|
|
3470
|
-
const Root$
|
|
3538
|
+
const Root$j = styled.div({
|
|
3471
3539
|
position: "relative"
|
|
3472
3540
|
});
|
|
3473
3541
|
const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
|
|
@@ -3503,7 +3571,7 @@ const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
|
|
|
3503
3571
|
lastFocusedRef.current = target;
|
|
3504
3572
|
}
|
|
3505
3573
|
}, [forwardedRef, isTopLayer, onFocus]);
|
|
3506
|
-
return /* @__PURE__ */jsx(Root$
|
|
3574
|
+
return /* @__PURE__ */jsx(Root$j, {
|
|
3507
3575
|
...restProps,
|
|
3508
3576
|
"data-ui": "Layer",
|
|
3509
3577
|
onFocus: handleFocus,
|
|
@@ -3614,19 +3682,19 @@ function PortalProvider(props) {
|
|
|
3614
3682
|
children
|
|
3615
3683
|
});
|
|
3616
3684
|
}
|
|
3617
|
-
var __freeze$
|
|
3618
|
-
var __defProp$
|
|
3619
|
-
var __template$
|
|
3620
|
-
value: __freeze$
|
|
3685
|
+
var __freeze$o = Object.freeze;
|
|
3686
|
+
var __defProp$o = Object.defineProperty;
|
|
3687
|
+
var __template$o = (cooked, raw) => __freeze$o(__defProp$o(cooked, "raw", {
|
|
3688
|
+
value: __freeze$o(raw || cooked.slice())
|
|
3621
3689
|
}));
|
|
3622
|
-
var _a$
|
|
3623
|
-
const Root$
|
|
3690
|
+
var _a$o;
|
|
3691
|
+
const Root$i = styled.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"])));
|
|
3624
3692
|
const SrOnly = forwardRef(function SrOnly2(props, ref) {
|
|
3625
3693
|
const {
|
|
3626
3694
|
as,
|
|
3627
3695
|
children
|
|
3628
3696
|
} = props;
|
|
3629
|
-
return /* @__PURE__ */jsx(Root$
|
|
3697
|
+
return /* @__PURE__ */jsx(Root$i, {
|
|
3630
3698
|
"aria-hidden": true,
|
|
3631
3699
|
as,
|
|
3632
3700
|
"data-ui": "SrOnly",
|
|
@@ -3634,14 +3702,14 @@ const SrOnly = forwardRef(function SrOnly2(props, ref) {
|
|
|
3634
3702
|
children
|
|
3635
3703
|
});
|
|
3636
3704
|
});
|
|
3637
|
-
var __freeze$
|
|
3638
|
-
var __defProp$
|
|
3639
|
-
var __template$
|
|
3640
|
-
value: __freeze$
|
|
3705
|
+
var __freeze$n = Object.freeze;
|
|
3706
|
+
var __defProp$n = Object.defineProperty;
|
|
3707
|
+
var __template$n = (cooked, raw) => __freeze$n(__defProp$n(cooked, "raw", {
|
|
3708
|
+
value: __freeze$n(raw || cooked.slice())
|
|
3641
3709
|
}));
|
|
3642
|
-
var _a$
|
|
3643
|
-
const Root$
|
|
3644
|
-
const ItemWrapper = styled.div(_b$e || (_b$e = __template$
|
|
3710
|
+
var _a$n, _b$e;
|
|
3711
|
+
const Root$h = styled.div(_a$n || (_a$n = __template$n(["\n position: relative;\n"])));
|
|
3712
|
+
const ItemWrapper = styled.div(_b$e || (_b$e = __template$n(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
|
|
3645
3713
|
const VirtualList = forwardRef(function VirtualList2(props, ref) {
|
|
3646
3714
|
const {
|
|
3647
3715
|
as = "div",
|
|
@@ -3747,7 +3815,7 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
|
|
|
3747
3815
|
const wrapperStyle = useMemo(() => ({
|
|
3748
3816
|
height
|
|
3749
3817
|
}), [height]);
|
|
3750
|
-
return /* @__PURE__ */jsx(Root$
|
|
3818
|
+
return /* @__PURE__ */jsx(Root$h, {
|
|
3751
3819
|
as,
|
|
3752
3820
|
"data-ui": "VirtualList",
|
|
3753
3821
|
...restProps,
|
|
@@ -3865,17 +3933,17 @@ function calcMaxWidth(params) {
|
|
|
3865
3933
|
}
|
|
3866
3934
|
return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
|
|
3867
3935
|
}
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
});
|
|
3936
|
+
var __freeze$m = Object.freeze;
|
|
3937
|
+
var __defProp$m = Object.defineProperty;
|
|
3938
|
+
var __template$m = (cooked, raw) => __freeze$m(__defProp$m(cooked, "raw", {
|
|
3939
|
+
value: __freeze$m(raw || cooked.slice())
|
|
3940
|
+
}));
|
|
3941
|
+
var _a$m;
|
|
3942
|
+
const MotionCard$1 = styled(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"])));
|
|
3876
3943
|
const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
3877
3944
|
const {
|
|
3878
3945
|
__unstable_margins: marginsProp,
|
|
3946
|
+
animate,
|
|
3879
3947
|
arrow,
|
|
3880
3948
|
arrowRef,
|
|
3881
3949
|
arrowX,
|
|
@@ -3883,6 +3951,8 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3883
3951
|
children,
|
|
3884
3952
|
padding,
|
|
3885
3953
|
placement,
|
|
3954
|
+
originX,
|
|
3955
|
+
originY,
|
|
3886
3956
|
overflow,
|
|
3887
3957
|
radius,
|
|
3888
3958
|
scheme,
|
|
@@ -3902,20 +3972,22 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3902
3972
|
const x = (xProp != null ? xProp : 0) + margins[3];
|
|
3903
3973
|
const y = (yProp != null ? yProp : 0) + margins[0];
|
|
3904
3974
|
const rootStyle = useMemo(() => ({
|
|
3975
|
+
left: x,
|
|
3976
|
+
originX,
|
|
3977
|
+
originY,
|
|
3905
3978
|
position: strategy,
|
|
3906
3979
|
top: y,
|
|
3907
|
-
left: x,
|
|
3908
3980
|
width,
|
|
3909
3981
|
zIndex,
|
|
3910
3982
|
...style
|
|
3911
|
-
}), [strategy, style, width, x, y, zIndex]);
|
|
3983
|
+
}), [originX, originY, strategy, style, width, x, y, zIndex]);
|
|
3912
3984
|
const arrowStyle = useMemo(() => ({
|
|
3913
3985
|
left: arrowX !== null ? arrowX : void 0,
|
|
3914
3986
|
top: arrowY !== null ? arrowY : void 0,
|
|
3915
3987
|
right: void 0,
|
|
3916
3988
|
bottom: void 0
|
|
3917
3989
|
}), [arrowX, arrowY]);
|
|
3918
|
-
return /* @__PURE__ */jsxs(
|
|
3990
|
+
return /* @__PURE__ */jsxs(MotionCard$1, {
|
|
3919
3991
|
"data-ui": "Popover",
|
|
3920
3992
|
...restProps,
|
|
3921
3993
|
"data-placement": placement,
|
|
@@ -3926,6 +3998,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3926
3998
|
sizing: "border",
|
|
3927
3999
|
style: rootStyle,
|
|
3928
4000
|
tone,
|
|
4001
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
3929
4002
|
children: [/* @__PURE__ */jsx(Flex, {
|
|
3930
4003
|
"data-ui": "Popover__wrapper",
|
|
3931
4004
|
direction: "column",
|
|
@@ -3948,7 +4021,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
|
|
|
3948
4021
|
}));
|
|
3949
4022
|
PopoverCard.displayName = "PopoverCard";
|
|
3950
4023
|
const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
3951
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4024
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
3952
4025
|
const {
|
|
3953
4026
|
container,
|
|
3954
4027
|
layer
|
|
@@ -3956,6 +4029,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
3956
4029
|
const boundaryElementContext = useBoundaryElement();
|
|
3957
4030
|
const {
|
|
3958
4031
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
4032
|
+
animate = false,
|
|
3959
4033
|
arrow: arrowProp = false,
|
|
3960
4034
|
boundaryElement = boundaryElementContext.element,
|
|
3961
4035
|
children: childProp,
|
|
@@ -4043,13 +4117,13 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4043
4117
|
}));
|
|
4044
4118
|
if (constrainSize || matchReferenceWidth) {
|
|
4045
4119
|
ret.push(size({
|
|
4046
|
-
apply(
|
|
4120
|
+
apply(_ref6) {
|
|
4047
4121
|
let {
|
|
4048
4122
|
availableWidth,
|
|
4049
4123
|
availableHeight,
|
|
4050
4124
|
elements,
|
|
4051
4125
|
referenceWidth
|
|
4052
|
-
} =
|
|
4126
|
+
} = _ref6;
|
|
4053
4127
|
referenceWidthRef.current = referenceWidth;
|
|
4054
4128
|
const _currentWidth = widthRef.current;
|
|
4055
4129
|
const _maxWidth = maxWidthRef.current;
|
|
@@ -4083,13 +4157,16 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4083
4157
|
padding: DEFAULT_POPOVER_PADDING
|
|
4084
4158
|
}));
|
|
4085
4159
|
}
|
|
4160
|
+
if (animate) {
|
|
4161
|
+
ret.push(origin);
|
|
4162
|
+
}
|
|
4086
4163
|
ret.push(hide({
|
|
4087
4164
|
boundary: referenceBoundary || void 0,
|
|
4088
4165
|
padding: DEFAULT_POPOVER_PADDING,
|
|
4089
4166
|
strategy: "referenceHidden"
|
|
4090
4167
|
}));
|
|
4091
4168
|
return ret;
|
|
4092
|
-
}, [arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4169
|
+
}, [animate, arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4093
4170
|
const {
|
|
4094
4171
|
x,
|
|
4095
4172
|
y,
|
|
@@ -4106,6 +4183,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4106
4183
|
const referenceHidden = (_f = middlewareData.hide) == null ? void 0 : _f.referenceHidden;
|
|
4107
4184
|
const arrowX = (_g = middlewareData.arrow) == null ? void 0 : _g.x;
|
|
4108
4185
|
const arrowY = (_h = middlewareData.arrow) == null ? void 0 : _h.y;
|
|
4186
|
+
const originX = (_i = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _i.originX;
|
|
4187
|
+
const originY = (_j = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _j.originY;
|
|
4109
4188
|
const setArrow = useCallback(arrowEl => {
|
|
4110
4189
|
arrowRef.current = arrowEl;
|
|
4111
4190
|
}, []);
|
|
@@ -4148,6 +4227,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4148
4227
|
children: /* @__PURE__ */jsx(PopoverCard, {
|
|
4149
4228
|
...restProps,
|
|
4150
4229
|
__unstable_margins: margins,
|
|
4230
|
+
animate,
|
|
4151
4231
|
arrow: arrowProp,
|
|
4152
4232
|
arrowRef: setArrow,
|
|
4153
4233
|
arrowX,
|
|
@@ -4160,6 +4240,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4160
4240
|
ref: setFloating,
|
|
4161
4241
|
scheme,
|
|
4162
4242
|
shadow,
|
|
4243
|
+
originX,
|
|
4244
|
+
originY,
|
|
4163
4245
|
strategy,
|
|
4164
4246
|
tone,
|
|
4165
4247
|
width: matchReferenceWidth ? referenceWidthRef.current : width,
|
|
@@ -4169,23 +4251,31 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
4169
4251
|
})
|
|
4170
4252
|
});
|
|
4171
4253
|
return /* @__PURE__ */jsxs(Fragment, {
|
|
4172
|
-
children: [
|
|
4173
|
-
|
|
4174
|
-
|
|
4254
|
+
children: [/* @__PURE__ */jsx(ConditionalWrapper, {
|
|
4255
|
+
condition: animate,
|
|
4256
|
+
wrapper: children => /* @__PURE__ */jsx(AnimatePresence, {
|
|
4257
|
+
children
|
|
4258
|
+
}),
|
|
4259
|
+
children: open && /* @__PURE__ */jsx(ConditionalWrapper, {
|
|
4260
|
+
condition: !!portal,
|
|
4261
|
+
wrapper: children => /* @__PURE__ */jsx(Portal, {
|
|
4262
|
+
__unstable_name: typeof portal === "string" ? portal : void 0,
|
|
4263
|
+
children
|
|
4264
|
+
}),
|
|
4175
4265
|
children: popover
|
|
4176
|
-
})
|
|
4266
|
+
})
|
|
4177
4267
|
}), child]
|
|
4178
4268
|
});
|
|
4179
4269
|
}));
|
|
4180
4270
|
Popover.displayName = "Popover";
|
|
4181
|
-
var __freeze$
|
|
4182
|
-
var __defProp$
|
|
4183
|
-
var __template$
|
|
4184
|
-
value: __freeze$
|
|
4271
|
+
var __freeze$l = Object.freeze;
|
|
4272
|
+
var __defProp$l = Object.defineProperty;
|
|
4273
|
+
var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
|
|
4274
|
+
value: __freeze$l(raw || cooked.slice())
|
|
4185
4275
|
}));
|
|
4186
|
-
var _a$
|
|
4276
|
+
var _a$l, _b$d;
|
|
4187
4277
|
function radioBaseStyle() {
|
|
4188
|
-
return css(_a$
|
|
4278
|
+
return 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 "])));
|
|
4189
4279
|
}
|
|
4190
4280
|
function inputElementStyle(props) {
|
|
4191
4281
|
const {
|
|
@@ -4193,7 +4283,7 @@ function inputElementStyle(props) {
|
|
|
4193
4283
|
input
|
|
4194
4284
|
} = getTheme_v2(props.theme);
|
|
4195
4285
|
const dist = (input.radio.size - input.radio.markSize) / 2;
|
|
4196
|
-
return css(_b$d || (_b$d = __template$
|
|
4286
|
+
return 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({
|
|
4197
4287
|
color: color.input.default.enabled.border,
|
|
4198
4288
|
width: input.border.width
|
|
4199
4289
|
}), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.input.default.enabled.fg, focusRingStyle({
|
|
@@ -4238,27 +4328,27 @@ const Radio = forwardRef(function Radio2(props, forwardedRef) {
|
|
|
4238
4328
|
}), /* @__PURE__ */jsx("span", {})]
|
|
4239
4329
|
});
|
|
4240
4330
|
});
|
|
4241
|
-
var __freeze$
|
|
4242
|
-
var __defProp$
|
|
4243
|
-
var __template$
|
|
4244
|
-
value: __freeze$
|
|
4331
|
+
var __freeze$k = Object.freeze;
|
|
4332
|
+
var __defProp$k = Object.defineProperty;
|
|
4333
|
+
var __template$k = (cooked, raw) => __freeze$k(__defProp$k(cooked, "raw", {
|
|
4334
|
+
value: __freeze$k(raw || cooked.slice())
|
|
4245
4335
|
}));
|
|
4246
|
-
var _a$
|
|
4336
|
+
var _a$k, _b$c, _c$6, _d$5;
|
|
4247
4337
|
function rootStyle() {
|
|
4248
|
-
return css(_a$
|
|
4338
|
+
return 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 "])));
|
|
4249
4339
|
}
|
|
4250
4340
|
function inputBaseStyle(props) {
|
|
4251
4341
|
const {
|
|
4252
4342
|
font
|
|
4253
4343
|
} = getTheme_v2(props.theme);
|
|
4254
|
-
return css(_b$c || (_b$c = __template$
|
|
4344
|
+
return 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);
|
|
4255
4345
|
}
|
|
4256
4346
|
function inputColorStyle(props) {
|
|
4257
4347
|
const {
|
|
4258
4348
|
color,
|
|
4259
4349
|
input
|
|
4260
4350
|
} = getTheme_v2(props.theme);
|
|
4261
|
-
return css(_c$6 || (_c$6 = __template$
|
|
4351
|
+
return 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({
|
|
4262
4352
|
color: color.input.default.enabled.border,
|
|
4263
4353
|
width: input.border.width
|
|
4264
4354
|
}), color.input.default.hovered.bg, color.input.default.hovered.fg, focusRingBorderStyle({
|
|
@@ -4301,7 +4391,7 @@ function iconBoxStyle(props) {
|
|
|
4301
4391
|
const {
|
|
4302
4392
|
color
|
|
4303
4393
|
} = getTheme_v2(props.theme);
|
|
4304
|
-
return css(_d$5 || (_d$5 = __template$
|
|
4394
|
+
return 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);
|
|
4305
4395
|
}
|
|
4306
4396
|
const selectStyle = {
|
|
4307
4397
|
root: rootStyle,
|
|
@@ -4385,24 +4475,24 @@ const Stack = forwardRef(function Stack2(props, ref) {
|
|
|
4385
4475
|
ref
|
|
4386
4476
|
});
|
|
4387
4477
|
});
|
|
4388
|
-
var __freeze$
|
|
4389
|
-
var __defProp$
|
|
4390
|
-
var __template$
|
|
4391
|
-
value: __freeze$
|
|
4478
|
+
var __freeze$j = Object.freeze;
|
|
4479
|
+
var __defProp$j = Object.defineProperty;
|
|
4480
|
+
var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
|
|
4481
|
+
value: __freeze$j(raw || cooked.slice())
|
|
4392
4482
|
}));
|
|
4393
|
-
var _a$
|
|
4483
|
+
var _a$j, _b$b, _c$5, _d$4, _e$2, _f$2, _g;
|
|
4394
4484
|
function switchBaseStyles() {
|
|
4395
|
-
return css(_a$
|
|
4485
|
+
return css(_a$j || (_a$j = __template$j(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
4396
4486
|
}
|
|
4397
4487
|
function switchInputStyles() {
|
|
4398
|
-
return css(_b$b || (_b$b = __template$
|
|
4488
|
+
return 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 "])));
|
|
4399
4489
|
}
|
|
4400
4490
|
function switchRepresentationStyles(props) {
|
|
4401
4491
|
const {
|
|
4402
4492
|
color,
|
|
4403
4493
|
input
|
|
4404
4494
|
} = getTheme_v2(props.theme);
|
|
4405
|
-
return css(_c$5 || (_c$5 = __template$
|
|
4495
|
+
return 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 "])), color.input.default.enabled.border, color.input.default.enabled.bg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
|
|
4406
4496
|
focusRing: input.switch.focusRing
|
|
4407
4497
|
}), 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);
|
|
4408
4498
|
}
|
|
@@ -4410,7 +4500,7 @@ function switchTrackStyles(props) {
|
|
|
4410
4500
|
const {
|
|
4411
4501
|
input
|
|
4412
4502
|
} = getTheme_v2(props.theme);
|
|
4413
|
-
return css(_d$4 || (_d$4 = __template$
|
|
4503
|
+
return 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));
|
|
4414
4504
|
}
|
|
4415
4505
|
function switchThumbStyles(props) {
|
|
4416
4506
|
const {
|
|
@@ -4426,7 +4516,7 @@ function switchThumbStyles(props) {
|
|
|
4426
4516
|
const checkedOffset = trackWidth - trackPadding * 2 - size;
|
|
4427
4517
|
const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
|
|
4428
4518
|
const checked = $indeterminate !== true && props.$checked === true;
|
|
4429
|
-
return css(_g || (_g = __template$
|
|
4519
|
+
return 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.1);\n\n ", "\n\n ", "\n "])), rem(trackPadding), rem(trackPadding), rem(size), rem(size), rem(size / 2), input.switch.transitionDurationMs, input.switch.transitionTimingFunction, checked && css(_e$2 || (_e$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && css(_f$2 || (_f$2 = __template$j(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
|
|
4430
4520
|
}
|
|
4431
4521
|
const Root$d = styled.span(switchBaseStyles);
|
|
4432
4522
|
const Input$2 = styled.input(switchInputStyles);
|
|
@@ -4470,14 +4560,14 @@ const Switch = forwardRef(function Switch2(props, forwardedRef) {
|
|
|
4470
4560
|
})]
|
|
4471
4561
|
});
|
|
4472
4562
|
});
|
|
4473
|
-
var __freeze$
|
|
4474
|
-
var __defProp$
|
|
4475
|
-
var __template$
|
|
4476
|
-
value: __freeze$
|
|
4563
|
+
var __freeze$i = Object.freeze;
|
|
4564
|
+
var __defProp$i = Object.defineProperty;
|
|
4565
|
+
var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
|
|
4566
|
+
value: __freeze$i(raw || cooked.slice())
|
|
4477
4567
|
}));
|
|
4478
|
-
var _a$
|
|
4568
|
+
var _a$i;
|
|
4479
4569
|
const Root$c = styled.span(textInputRootStyle);
|
|
4480
|
-
const InputRoot$1 = styled.span(_a$
|
|
4570
|
+
const InputRoot$1 = styled.span(_a$i || (_a$i = __template$i(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4481
4571
|
const Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4482
4572
|
const Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4483
4573
|
const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
|
|
@@ -4521,30 +4611,30 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
4521
4611
|
})
|
|
4522
4612
|
});
|
|
4523
4613
|
});
|
|
4524
|
-
var __freeze$
|
|
4525
|
-
var __defProp$
|
|
4526
|
-
var __template$
|
|
4527
|
-
value: __freeze$
|
|
4614
|
+
var __freeze$h = Object.freeze;
|
|
4615
|
+
var __defProp$h = Object.defineProperty;
|
|
4616
|
+
var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
|
|
4617
|
+
value: __freeze$h(raw || cooked.slice())
|
|
4528
4618
|
}));
|
|
4529
|
-
var _a$
|
|
4619
|
+
var _a$h, _b$a, _c$4, _d$3, _e$1, _f$1;
|
|
4530
4620
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
4531
4621
|
zIndex: 2
|
|
4532
4622
|
};
|
|
4533
4623
|
const Root$b = styled(Card).attrs({
|
|
4534
4624
|
forwardedAs: "span"
|
|
4535
4625
|
})(textInputRootStyle);
|
|
4536
|
-
const InputRoot = styled.span(_a$
|
|
4626
|
+
const InputRoot = styled.span(_a$h || (_a$h = __template$h(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
4537
4627
|
const Prefix = styled(Card).attrs({
|
|
4538
4628
|
forwardedAs: "span"
|
|
4539
|
-
})(_b$a || (_b$a = __template$
|
|
4629
|
+
})(_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"])));
|
|
4540
4630
|
const Suffix = styled(Card).attrs({
|
|
4541
4631
|
forwardedAs: "span"
|
|
4542
|
-
})(_c$4 || (_c$4 = __template$
|
|
4632
|
+
})(_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"])));
|
|
4543
4633
|
const Input = styled.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4544
4634
|
const Presentation = styled.span(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4545
|
-
const LeftBox = styled(Box)(_d$3 || (_d$3 = __template$
|
|
4546
|
-
const RightBox = styled(Box)(_e$1 || (_e$1 = __template$
|
|
4547
|
-
const RightCard = styled(Card)(_f$1 || (_f$1 = __template$
|
|
4635
|
+
const LeftBox = styled(Box)(_d$3 || (_d$3 = __template$h(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
|
|
4636
|
+
const RightBox = styled(Box)(_e$1 || (_e$1 = __template$h(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4637
|
+
const RightCard = styled(Card)(_f$1 || (_f$1 = __template$h(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4548
4638
|
const TextInputClearButton = styled(Button)({
|
|
4549
4639
|
"&:not([hidden])": {
|
|
4550
4640
|
display: "block"
|
|
@@ -4712,17 +4802,6 @@ function useDelayedState(initialState) {
|
|
|
4712
4802
|
}, []);
|
|
4713
4803
|
return [state, onStateChange];
|
|
4714
4804
|
}
|
|
4715
|
-
function ConditionalWrapper(_ref5) {
|
|
4716
|
-
let {
|
|
4717
|
-
children,
|
|
4718
|
-
condition,
|
|
4719
|
-
wrapper
|
|
4720
|
-
} = _ref5;
|
|
4721
|
-
if (!condition) {
|
|
4722
|
-
return children;
|
|
4723
|
-
}
|
|
4724
|
-
return wrapper(children);
|
|
4725
|
-
}
|
|
4726
4805
|
const DEFAULT_TOOLTIP_ARROW_WIDTH = 15;
|
|
4727
4806
|
const DEFAULT_TOOLTIP_ARROW_HEIGHT = 6;
|
|
4728
4807
|
const DEFAULT_TOOLTIP_ARROW_RADIUS = 2;
|
|
@@ -4742,6 +4821,63 @@ const DEFAULT_FALLBACK_PLACEMENTS = {
|
|
|
4742
4821
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4743
4822
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4744
4823
|
};
|
|
4824
|
+
var __freeze$g = Object.freeze;
|
|
4825
|
+
var __defProp$g = Object.defineProperty;
|
|
4826
|
+
var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
|
|
4827
|
+
value: __freeze$g(raw || cooked.slice())
|
|
4828
|
+
}));
|
|
4829
|
+
var _a$g;
|
|
4830
|
+
const MotionCard = styled(motion(Card))(_a$g || (_a$g = __template$g([""])));
|
|
4831
|
+
const TooltipCard = memo(forwardRef(function TooltipCard2(props, ref) {
|
|
4832
|
+
const {
|
|
4833
|
+
animate,
|
|
4834
|
+
arrow,
|
|
4835
|
+
arrowRef,
|
|
4836
|
+
arrowX,
|
|
4837
|
+
arrowY,
|
|
4838
|
+
children,
|
|
4839
|
+
originX,
|
|
4840
|
+
originY,
|
|
4841
|
+
padding,
|
|
4842
|
+
placement,
|
|
4843
|
+
radius,
|
|
4844
|
+
scheme,
|
|
4845
|
+
shadow,
|
|
4846
|
+
style,
|
|
4847
|
+
...restProps
|
|
4848
|
+
} = props;
|
|
4849
|
+
const rootStyle = useMemo(() => ({
|
|
4850
|
+
originX,
|
|
4851
|
+
originY,
|
|
4852
|
+
...style
|
|
4853
|
+
}), [originX, originY, style]);
|
|
4854
|
+
const arrowStyle = useMemo(() => ({
|
|
4855
|
+
left: arrowX !== null ? arrowX : void 0,
|
|
4856
|
+
top: arrowY !== null ? arrowY : void 0,
|
|
4857
|
+
right: void 0,
|
|
4858
|
+
bottom: void 0
|
|
4859
|
+
}), [arrowX, arrowY]);
|
|
4860
|
+
return /* @__PURE__ */jsxs(MotionCard, {
|
|
4861
|
+
"data-ui": "Tooltip__card",
|
|
4862
|
+
...restProps,
|
|
4863
|
+
"data-placement": placement,
|
|
4864
|
+
padding,
|
|
4865
|
+
radius,
|
|
4866
|
+
ref,
|
|
4867
|
+
scheme,
|
|
4868
|
+
shadow,
|
|
4869
|
+
style: rootStyle,
|
|
4870
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
4871
|
+
children: [children, arrow && /* @__PURE__ */jsx(Arrow, {
|
|
4872
|
+
ref: arrowRef,
|
|
4873
|
+
style: arrowStyle,
|
|
4874
|
+
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
4875
|
+
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
4876
|
+
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
4877
|
+
})]
|
|
4878
|
+
});
|
|
4879
|
+
}));
|
|
4880
|
+
TooltipCard.displayName = "TooltipCard";
|
|
4745
4881
|
const key$4 = Symbol.for("@sanity/ui/context/tooltipDelayGroup");
|
|
4746
4882
|
globalScope[key$4] = globalScope[key$4] || createContext(null);
|
|
4747
4883
|
const TooltipDelayGroupContext = globalScope[key$4];
|
|
@@ -4778,19 +4914,20 @@ var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
|
|
|
4778
4914
|
value: __freeze$f(raw || cooked.slice())
|
|
4779
4915
|
}));
|
|
4780
4916
|
var _a$f;
|
|
4781
|
-
const Root$a = styled(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])),
|
|
4917
|
+
const Root$a = styled(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])), _ref7 => {
|
|
4782
4918
|
let {
|
|
4783
4919
|
$maxWidth
|
|
4784
|
-
} =
|
|
4920
|
+
} = _ref7;
|
|
4785
4921
|
return $maxWidth;
|
|
4786
4922
|
});
|
|
4787
4923
|
const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
4788
|
-
var _a2, _b, _c, _d, _e;
|
|
4924
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
4789
4925
|
const boundaryElementContext = useBoundaryElement();
|
|
4790
4926
|
const {
|
|
4791
4927
|
layer
|
|
4792
4928
|
} = useTheme_v2();
|
|
4793
4929
|
const {
|
|
4930
|
+
animate = false,
|
|
4794
4931
|
arrow: arrowProp = false,
|
|
4795
4932
|
boundaryElement = boundaryElementContext == null ? void 0 : boundaryElementContext.element,
|
|
4796
4933
|
children: childProp,
|
|
@@ -4805,7 +4942,6 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4805
4942
|
shadow = 2,
|
|
4806
4943
|
zOffset = layer.tooltip.zOffset,
|
|
4807
4944
|
delay,
|
|
4808
|
-
animate = false,
|
|
4809
4945
|
...restProps
|
|
4810
4946
|
} = props;
|
|
4811
4947
|
const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
|
|
@@ -4841,8 +4977,11 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4841
4977
|
padding: DEFAULT_TOOLTIP_PADDING
|
|
4842
4978
|
}));
|
|
4843
4979
|
}
|
|
4980
|
+
if (animate) {
|
|
4981
|
+
ret.push(origin);
|
|
4982
|
+
}
|
|
4844
4983
|
return ret;
|
|
4845
|
-
}, [arrowProp, boundaryElement, fallbackPlacements]);
|
|
4984
|
+
}, [animate, arrowProp, boundaryElement, fallbackPlacements]);
|
|
4846
4985
|
const {
|
|
4847
4986
|
floatingStyles,
|
|
4848
4987
|
placement,
|
|
@@ -4856,12 +4995,8 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4856
4995
|
});
|
|
4857
4996
|
const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
|
|
4858
4997
|
const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
|
|
4859
|
-
const
|
|
4860
|
-
|
|
4861
|
-
top: arrowY !== null ? arrowY : void 0,
|
|
4862
|
-
right: void 0,
|
|
4863
|
-
bottom: void 0
|
|
4864
|
-
}), [arrowX, arrowY]);
|
|
4998
|
+
const originX = (_f = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _f.originX;
|
|
4999
|
+
const originY = (_g = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _g.originY;
|
|
4865
5000
|
const tooltipId = useId();
|
|
4866
5001
|
const [isOpen, setIsOpen] = useDelayedState(false);
|
|
4867
5002
|
const delayGroupContext = useTooltipDelayGroup();
|
|
@@ -4983,53 +5118,33 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
4983
5118
|
}, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
|
|
4984
5119
|
if (!child) return /* @__PURE__ */jsx(Fragment, {});
|
|
4985
5120
|
if (disabled) return child;
|
|
4986
|
-
const
|
|
5121
|
+
const tooltip = /* @__PURE__ */jsx(Root$a, {
|
|
4987
5122
|
"data-ui": "Tooltip",
|
|
4988
5123
|
...restProps,
|
|
4989
5124
|
ref: setFloating,
|
|
4990
5125
|
style: floatingStyles,
|
|
4991
5126
|
zOffset,
|
|
4992
5127
|
$maxWidth: tooltipWidth,
|
|
4993
|
-
children: /* @__PURE__ */jsx(
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
duration: 0.3,
|
|
5010
|
-
type: "spring"
|
|
5011
|
-
},
|
|
5012
|
-
children
|
|
5013
|
-
}),
|
|
5014
|
-
children: /* @__PURE__ */jsxs(Card, {
|
|
5015
|
-
"data-ui": "Tooltip__card",
|
|
5016
|
-
"data-placement": placement,
|
|
5017
|
-
padding,
|
|
5018
|
-
radius,
|
|
5019
|
-
scheme,
|
|
5020
|
-
shadow,
|
|
5021
|
-
children: [content, arrowProp && /* @__PURE__ */jsx(Arrow, {
|
|
5022
|
-
ref: setArrow,
|
|
5023
|
-
style: arrowStyle,
|
|
5024
|
-
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
5025
|
-
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
5026
|
-
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
5027
|
-
})]
|
|
5028
|
-
})
|
|
5128
|
+
children: /* @__PURE__ */jsx(TooltipCard, {
|
|
5129
|
+
...restProps,
|
|
5130
|
+
animate,
|
|
5131
|
+
arrow: arrowProp,
|
|
5132
|
+
arrowRef: setArrow,
|
|
5133
|
+
arrowX,
|
|
5134
|
+
arrowY,
|
|
5135
|
+
originX,
|
|
5136
|
+
originY,
|
|
5137
|
+
padding,
|
|
5138
|
+
placement,
|
|
5139
|
+
radius,
|
|
5140
|
+
ref: setFloating,
|
|
5141
|
+
scheme,
|
|
5142
|
+
shadow,
|
|
5143
|
+
children: content
|
|
5029
5144
|
})
|
|
5030
5145
|
});
|
|
5031
5146
|
return /* @__PURE__ */jsxs(Fragment, {
|
|
5032
|
-
children: [
|
|
5147
|
+
children: [/* @__PURE__ */jsx(ConditionalWrapper, {
|
|
5033
5148
|
condition: animate,
|
|
5034
5149
|
wrapper: children => /* @__PURE__ */jsx(AnimatePresence, {
|
|
5035
5150
|
children
|
|
@@ -5040,9 +5155,9 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
5040
5155
|
__unstable_name: typeof portalProp === "string" ? portalProp : void 0,
|
|
5041
5156
|
children
|
|
5042
5157
|
}),
|
|
5043
|
-
children:
|
|
5158
|
+
children: tooltip
|
|
5044
5159
|
})
|
|
5045
|
-
})]
|
|
5160
|
+
}), child]
|
|
5046
5161
|
});
|
|
5047
5162
|
});
|
|
5048
5163
|
var __freeze$e = Object.freeze;
|
|
@@ -5199,10 +5314,10 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
|
|
|
5199
5314
|
query,
|
|
5200
5315
|
value
|
|
5201
5316
|
} = state;
|
|
5202
|
-
const defaultRenderOption = useCallback(
|
|
5317
|
+
const defaultRenderOption = useCallback(_ref8 => {
|
|
5203
5318
|
let {
|
|
5204
5319
|
value: value2
|
|
5205
|
-
} =
|
|
5320
|
+
} = _ref8;
|
|
5206
5321
|
return /* @__PURE__ */jsx(Card, {
|
|
5207
5322
|
"data-as": "button",
|
|
5208
5323
|
padding: paddingProp,
|
|
@@ -5661,10 +5776,10 @@ var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
|
|
|
5661
5776
|
value: __freeze$c(raw || cooked.slice())
|
|
5662
5777
|
}));
|
|
5663
5778
|
var _a$c, _b$7;
|
|
5664
|
-
function dialogStyle(
|
|
5779
|
+
function dialogStyle(_ref9) {
|
|
5665
5780
|
let {
|
|
5666
5781
|
theme
|
|
5667
|
-
} =
|
|
5782
|
+
} = _ref9;
|
|
5668
5783
|
const {
|
|
5669
5784
|
color
|
|
5670
5785
|
} = getTheme_v2(theme);
|
|
@@ -6332,6 +6447,9 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
|
|
|
6332
6447
|
setOpen(v => !v);
|
|
6333
6448
|
setShouldFocus(null);
|
|
6334
6449
|
}, []);
|
|
6450
|
+
const handleMouseDown = useCallback(event => {
|
|
6451
|
+
if (open) event.preventDefault();
|
|
6452
|
+
}, [open]);
|
|
6335
6453
|
const handleButtonKeyDown = useCallback(event => {
|
|
6336
6454
|
if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
|
|
6337
6455
|
event.preventDefault();
|
|
@@ -6415,11 +6533,12 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
|
|
|
6415
6533
|
id,
|
|
6416
6534
|
onClick: handleButtonClick,
|
|
6417
6535
|
onKeyDown: handleButtonKeyDown,
|
|
6536
|
+
onMouseDown: handleMouseDown,
|
|
6418
6537
|
"aria-haspopup": true,
|
|
6419
6538
|
"aria-expanded": open,
|
|
6420
6539
|
ref: setButtonRef,
|
|
6421
6540
|
selected: open
|
|
6422
|
-
}) : null, [buttonProp, handleButtonClick, handleButtonKeyDown, id, open, setButtonRef]);
|
|
6541
|
+
}) : null, [buttonProp, handleButtonClick, handleButtonKeyDown, handleMouseDown, id, open, setButtonRef]);
|
|
6423
6542
|
const popoverProps = useMemo(() => ({
|
|
6424
6543
|
boundaryElement: deprecated_boundaryElement,
|
|
6425
6544
|
overflow: "auto",
|
|
@@ -6734,15 +6853,15 @@ var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
|
|
|
6734
6853
|
var _a$6, _b$3, _c$1, _d;
|
|
6735
6854
|
const keyframe = keyframes(_a$6 || (_a$6 = __template$6(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
|
|
6736
6855
|
const animation = 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);
|
|
6737
|
-
const skeletonStyle = 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"])),
|
|
6856
|
+
const skeletonStyle = 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 => {
|
|
6738
6857
|
let {
|
|
6739
6858
|
$visible
|
|
6740
|
-
} =
|
|
6859
|
+
} = _ref10;
|
|
6741
6860
|
return $visible ? 1 : 0;
|
|
6742
|
-
},
|
|
6861
|
+
}, _ref11 => {
|
|
6743
6862
|
let {
|
|
6744
6863
|
$animated
|
|
6745
|
-
} =
|
|
6864
|
+
} = _ref11;
|
|
6746
6865
|
return $animated ? animation : css(_c$1 || (_c$1 = __template$6(["\n background-color: var(--card-skeleton-color-from);\n "])));
|
|
6747
6866
|
});
|
|
6748
6867
|
const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
|
|
@@ -7127,12 +7246,12 @@ function ToastProvider(props) {
|
|
|
7127
7246
|
paddingY,
|
|
7128
7247
|
children: /* @__PURE__ */jsx(AnimatePresence, {
|
|
7129
7248
|
initial: false,
|
|
7130
|
-
children: state.map(
|
|
7249
|
+
children: state.map(_ref12 => {
|
|
7131
7250
|
let {
|
|
7132
7251
|
dismiss,
|
|
7133
7252
|
id,
|
|
7134
7253
|
params
|
|
7135
|
-
} =
|
|
7254
|
+
} = _ref12;
|
|
7136
7255
|
return /* @__PURE__ */jsx(motion.div, {
|
|
7137
7256
|
animate: {
|
|
7138
7257
|
opacity: 1,
|
|
@@ -7626,5 +7745,5 @@ const TreeItem = memo(function TreeItem2(props) {
|
|
|
7626
7745
|
})]
|
|
7627
7746
|
});
|
|
7628
7747
|
});
|
|
7629
|
-
export { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
7748
|
+
export { Arrow, Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, ConditionalWrapper, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, TooltipDelayGroupContext, TooltipDelayGroupProvider, Tree, TreeItem, VirtualList, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, containsOrEqualsElement, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMediaIndex, usePortal, usePrefersDark, usePrefersReducedMotion, useRootTheme, useTheme, useTheme_v2, useToast, useTooltipDelayGroup, useTree };
|
|
7630
7749
|
//# sourceMappingURL=index.esm.js.map
|