@sanity/ui 2.0.0-beta.1 → 2.0.0-beta.11
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 +502 -356
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +511 -569
- 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 +355 -290
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +355 -290
- 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/textInput/__workshop__/plain.tsx +1 -1
- package/src/core/primitives/textInput/__workshop__/states.tsx +10 -2
- 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/input/textInputStyle.ts +33 -2
- 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 +196 -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.test.ts +2 -2
- 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 +278 -252
- 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 *:not(:invalid):disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n --card-icon-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n *:invalid:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n --card-icon-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:not(:invalid):read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n *:invalid: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 *:invalid:not(:disabled):not(:read-only):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 *:invalid:not(:disabled):not(:read-only):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({
|
|
@@ -1542,12 +1570,18 @@ function textInputRepresentationStyle(props) {
|
|
|
1542
1570
|
focusRing: input.text.focusRing
|
|
1543
1571
|
}), $unstableDisableFocusRing ? void 0 : focusRingStyle({
|
|
1544
1572
|
focusRing: input.text.focusRing
|
|
1545
|
-
}), color.input.default.disabled.bg, color.input.default.disabled.fg, focusRingBorderStyle({
|
|
1573
|
+
}), color.input.default.disabled.bg, color.input.default.disabled.fg, color.input.default.disabled.fg, focusRingBorderStyle({
|
|
1546
1574
|
color: color.input.default.disabled.border,
|
|
1547
1575
|
width: input.border.width
|
|
1548
|
-
}), color.input.
|
|
1576
|
+
}), color.input.invalid.disabled.bg, color.input.invalid.disabled.fg, color.input.invalid.disabled.fg, focusRingBorderStyle({
|
|
1577
|
+
color: color.input.invalid.disabled.border,
|
|
1578
|
+
width: input.border.width
|
|
1579
|
+
}), color.input.default.readOnly.bg, color.input.default.readOnly.fg, color.input.invalid.readOnly.bg, color.input.invalid.readOnly.fg, color.input.default.hovered.bg, color.input.default.hovered.fg, color.input.invalid.hovered.bg, color.input.invalid.hovered.fg, focusRingBorderStyle({
|
|
1549
1580
|
color: color.input.default.hovered.border,
|
|
1550
1581
|
width: input.border.width
|
|
1582
|
+
}), focusRingBorderStyle({
|
|
1583
|
+
color: color.input.invalid.hovered.border,
|
|
1584
|
+
width: input.border.width
|
|
1551
1585
|
}));
|
|
1552
1586
|
}
|
|
1553
1587
|
function responsiveMarginStyle(props) {
|
|
@@ -1602,12 +1636,12 @@ function responsiveShadowStyle(props) {
|
|
|
1602
1636
|
} = theme.getTheme_v2(props.theme);
|
|
1603
1637
|
return _responsive(media, props.$shadow, index => shadowStyle(shadow[index], card.shadow.outline));
|
|
1604
1638
|
}
|
|
1605
|
-
var __freeze$
|
|
1606
|
-
var __defProp$
|
|
1607
|
-
var __template$
|
|
1608
|
-
value: __freeze$
|
|
1639
|
+
var __freeze$E = Object.freeze;
|
|
1640
|
+
var __defProp$F = Object.defineProperty;
|
|
1641
|
+
var __template$E = (cooked, raw) => __freeze$E(__defProp$F(cooked, "raw", {
|
|
1642
|
+
value: __freeze$E(raw || cooked.slice())
|
|
1609
1643
|
}));
|
|
1610
|
-
var _a$
|
|
1644
|
+
var _a$E, _b$m, _c$b;
|
|
1611
1645
|
function labelBaseStyle(props) {
|
|
1612
1646
|
const {
|
|
1613
1647
|
$accent,
|
|
@@ -1616,16 +1650,16 @@ function labelBaseStyle(props) {
|
|
|
1616
1650
|
const {
|
|
1617
1651
|
font
|
|
1618
1652
|
} = theme.getTheme_v2(props.theme);
|
|
1619
|
-
return styled.css(_c$b || (_c$b = __template$
|
|
1653
|
+
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
1654
|
}
|
|
1621
|
-
var __freeze$
|
|
1622
|
-
var __defProp$
|
|
1623
|
-
var __template$
|
|
1624
|
-
value: __freeze$
|
|
1655
|
+
var __freeze$D = Object.freeze;
|
|
1656
|
+
var __defProp$E = Object.defineProperty;
|
|
1657
|
+
var __template$D = (cooked, raw) => __freeze$D(__defProp$E(cooked, "raw", {
|
|
1658
|
+
value: __freeze$D(raw || cooked.slice())
|
|
1625
1659
|
}));
|
|
1626
|
-
var _a$
|
|
1627
|
-
const Root$
|
|
1628
|
-
const SpanWithTextOverflow$2 = styled__default.default.span(_a$
|
|
1660
|
+
var _a$D;
|
|
1661
|
+
const Root$C = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
1662
|
+
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
1663
|
const Label = react.forwardRef(function Label2(props, ref) {
|
|
1630
1664
|
const {
|
|
1631
1665
|
accent,
|
|
@@ -1647,7 +1681,7 @@ const Label = react.forwardRef(function Label2(props, ref) {
|
|
|
1647
1681
|
children
|
|
1648
1682
|
});
|
|
1649
1683
|
}
|
|
1650
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
1684
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$C, {
|
|
1651
1685
|
"data-ui": "Label",
|
|
1652
1686
|
...restProps,
|
|
1653
1687
|
$accent: accent,
|
|
@@ -1806,7 +1840,7 @@ function avatarStrokeStyle() {
|
|
|
1806
1840
|
}
|
|
1807
1841
|
};
|
|
1808
1842
|
}
|
|
1809
|
-
const Root$
|
|
1843
|
+
const Root$B = styled__default.default.div(responsiveAvatarSizeStyle, avatarStyle.root);
|
|
1810
1844
|
const Arrow$1 = styled__default.default.div(avatarStyle.arrow);
|
|
1811
1845
|
const BgStroke = styled__default.default.ellipse(avatarStyle.bgStroke);
|
|
1812
1846
|
const Stroke = styled__default.default.ellipse(avatarStyle.stroke);
|
|
@@ -1827,14 +1861,14 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1827
1861
|
arrowPosition: arrowPositionProp,
|
|
1828
1862
|
animateArrowFrom,
|
|
1829
1863
|
status = "online",
|
|
1830
|
-
size: sizeProp =
|
|
1864
|
+
size: sizeProp = 1,
|
|
1831
1865
|
...restProps
|
|
1832
1866
|
} = props;
|
|
1833
|
-
const as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div";
|
|
1834
|
-
const size = useArrayProp(sizeProp);
|
|
1835
1867
|
const {
|
|
1836
1868
|
avatar
|
|
1837
1869
|
} = useTheme_v2();
|
|
1870
|
+
const as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div";
|
|
1871
|
+
const size = useArrayProp(sizeProp);
|
|
1838
1872
|
const avatarSize = avatar.sizes[size[0]] || avatar.sizes[0];
|
|
1839
1873
|
const _sizeRem = avatarSize.size;
|
|
1840
1874
|
const _radius = _sizeRem / 2;
|
|
@@ -1856,8 +1890,13 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1856
1890
|
onImageLoadError(new Error("Avatar: the image failed to load"));
|
|
1857
1891
|
}
|
|
1858
1892
|
}, [onImageLoadError]);
|
|
1859
|
-
const initialsSize = react.useMemo(() => size.map(s =>
|
|
1860
|
-
|
|
1893
|
+
const initialsSize = react.useMemo(() => size.map(s => {
|
|
1894
|
+
if (s === 1) return 1;
|
|
1895
|
+
if (s === 2) return 3;
|
|
1896
|
+
if (s === 3) return 5;
|
|
1897
|
+
return 0;
|
|
1898
|
+
}), [size]);
|
|
1899
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$B, {
|
|
1861
1900
|
as,
|
|
1862
1901
|
"data-as": typeof as === "string" ? as : void 0,
|
|
1863
1902
|
"data-ui": "Avatar",
|
|
@@ -1919,73 +1958,19 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
1919
1958
|
children: /* @__PURE__ */jsxRuntime.jsx(InitialsLabel, {
|
|
1920
1959
|
forwardedAs: "span",
|
|
1921
1960
|
size: initialsSize,
|
|
1961
|
+
weight: "medium",
|
|
1922
1962
|
children: initials
|
|
1923
1963
|
})
|
|
1924
1964
|
})
|
|
1925
1965
|
})]
|
|
1926
1966
|
});
|
|
1927
1967
|
});
|
|
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())
|
|
1968
|
+
var __freeze$C = Object.freeze;
|
|
1969
|
+
var __defProp$D = Object.defineProperty;
|
|
1970
|
+
var __template$C = (cooked, raw) => __freeze$C(__defProp$D(cooked, "raw", {
|
|
1971
|
+
value: __freeze$C(raw || cooked.slice())
|
|
1987
1972
|
}));
|
|
1988
|
-
var _a$
|
|
1973
|
+
var _a$C;
|
|
1989
1974
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1990
1975
|
const {
|
|
1991
1976
|
avatar,
|
|
@@ -2005,23 +1990,28 @@ function _avatarCounterBaseStyle(props) {
|
|
|
2005
1990
|
const {
|
|
2006
1991
|
space
|
|
2007
1992
|
} = theme.getTheme_v2(props.theme);
|
|
2008
|
-
return styled.css(_a$
|
|
1993
|
+
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
1994
|
}
|
|
2010
1995
|
const Root$A = styled__default.default.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
2011
1996
|
const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
|
|
2012
1997
|
const {
|
|
2013
1998
|
count,
|
|
2014
|
-
size: sizeProp =
|
|
1999
|
+
size: sizeProp = 1
|
|
2015
2000
|
} = props;
|
|
2016
2001
|
const size = useArrayProp(sizeProp);
|
|
2017
|
-
const
|
|
2002
|
+
const fontSize = react.useMemo(() => size.map(s => {
|
|
2003
|
+
if (s === 1) return 1;
|
|
2004
|
+
if (s === 2) return 3;
|
|
2005
|
+
if (s === 3) return 5;
|
|
2006
|
+
return 0;
|
|
2007
|
+
}), [size]);
|
|
2018
2008
|
return /* @__PURE__ */jsxRuntime.jsx(Root$A, {
|
|
2019
2009
|
$size: size,
|
|
2020
2010
|
"data-ui": "AvatarCounter",
|
|
2021
2011
|
ref,
|
|
2022
|
-
children: /* @__PURE__ */jsxRuntime.jsx(
|
|
2012
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Label, {
|
|
2023
2013
|
as: "span",
|
|
2024
|
-
size:
|
|
2014
|
+
size: fontSize,
|
|
2025
2015
|
weight: "medium",
|
|
2026
2016
|
children: count
|
|
2027
2017
|
})
|
|
@@ -2031,13 +2021,13 @@ function childrenToElementArray(children) {
|
|
|
2031
2021
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
2032
2022
|
return childrenArray.filter(node => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node === "string");
|
|
2033
2023
|
}
|
|
2034
|
-
var __freeze$
|
|
2035
|
-
var __defProp$
|
|
2036
|
-
var __template$
|
|
2037
|
-
value: __freeze$
|
|
2024
|
+
var __freeze$B = Object.freeze;
|
|
2025
|
+
var __defProp$C = Object.defineProperty;
|
|
2026
|
+
var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
|
|
2027
|
+
value: __freeze$B(raw || cooked.slice())
|
|
2038
2028
|
}));
|
|
2039
|
-
var _a$
|
|
2040
|
-
const BASE_STYLES = styled.css(_a$
|
|
2029
|
+
var _a$B;
|
|
2030
|
+
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
2031
|
function avatarStackStyle() {
|
|
2042
2032
|
return BASE_STYLES;
|
|
2043
2033
|
}
|
|
@@ -2061,7 +2051,7 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2061
2051
|
const {
|
|
2062
2052
|
children: childrenProp,
|
|
2063
2053
|
maxLength: maxLengthProp = 4,
|
|
2064
|
-
size: sizeProp =
|
|
2054
|
+
size: sizeProp = 1,
|
|
2065
2055
|
...restProps
|
|
2066
2056
|
} = props;
|
|
2067
2057
|
const children = childrenToElementArray(childrenProp).filter(child => typeof child !== "string");
|
|
@@ -2078,7 +2068,8 @@ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
|
|
|
2078
2068
|
$size: size,
|
|
2079
2069
|
children: [len === 0 && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2080
2070
|
children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
|
|
2081
|
-
count: len
|
|
2071
|
+
count: len,
|
|
2072
|
+
size
|
|
2082
2073
|
})
|
|
2083
2074
|
}), len !== 0 && extraCount > 1 && /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2084
2075
|
children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
|
|
@@ -2157,6 +2148,61 @@ const Box = react.forwardRef(function Box2(props, ref) {
|
|
|
2157
2148
|
children: props.children
|
|
2158
2149
|
});
|
|
2159
2150
|
});
|
|
2151
|
+
var __freeze$A = Object.freeze;
|
|
2152
|
+
var __defProp$B = Object.defineProperty;
|
|
2153
|
+
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
2154
|
+
value: __freeze$A(raw || cooked.slice())
|
|
2155
|
+
}));
|
|
2156
|
+
var _a$A, _b$l, _c$a;
|
|
2157
|
+
function textBaseStyle(props) {
|
|
2158
|
+
const {
|
|
2159
|
+
$accent,
|
|
2160
|
+
$muted
|
|
2161
|
+
} = props;
|
|
2162
|
+
const {
|
|
2163
|
+
font
|
|
2164
|
+
} = theme.getTheme_v2(props.theme);
|
|
2165
|
+
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);
|
|
2166
|
+
}
|
|
2167
|
+
var __freeze$z = Object.freeze;
|
|
2168
|
+
var __defProp$A = Object.defineProperty;
|
|
2169
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
2170
|
+
value: __freeze$z(raw || cooked.slice())
|
|
2171
|
+
}));
|
|
2172
|
+
var _a$z;
|
|
2173
|
+
const Root$x = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
2174
|
+
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"])));
|
|
2175
|
+
const Text = react.forwardRef(function Text2(props, ref) {
|
|
2176
|
+
const {
|
|
2177
|
+
accent = false,
|
|
2178
|
+
align,
|
|
2179
|
+
children: childrenProp,
|
|
2180
|
+
muted = false,
|
|
2181
|
+
size = 2,
|
|
2182
|
+
textOverflow,
|
|
2183
|
+
weight,
|
|
2184
|
+
...restProps
|
|
2185
|
+
} = props;
|
|
2186
|
+
let children = childrenProp;
|
|
2187
|
+
if (textOverflow === "ellipsis") {
|
|
2188
|
+
children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
|
|
2189
|
+
children
|
|
2190
|
+
});
|
|
2191
|
+
}
|
|
2192
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$x, {
|
|
2193
|
+
"data-ui": "Text",
|
|
2194
|
+
...restProps,
|
|
2195
|
+
$accent: accent,
|
|
2196
|
+
$align: useArrayProp(align),
|
|
2197
|
+
$muted: muted,
|
|
2198
|
+
ref,
|
|
2199
|
+
$size: useArrayProp(size),
|
|
2200
|
+
$weight: weight,
|
|
2201
|
+
children: /* @__PURE__ */jsxRuntime.jsx("span", {
|
|
2202
|
+
children
|
|
2203
|
+
})
|
|
2204
|
+
});
|
|
2205
|
+
});
|
|
2160
2206
|
function badgeStyle(props) {
|
|
2161
2207
|
const {
|
|
2162
2208
|
$tone
|
|
@@ -2172,7 +2218,7 @@ function badgeStyle(props) {
|
|
|
2172
2218
|
}
|
|
2173
2219
|
};
|
|
2174
2220
|
}
|
|
2175
|
-
const Root$
|
|
2221
|
+
const Root$w = styled__default.default(Box)(responsiveRadiusStyle, badgeStyle);
|
|
2176
2222
|
const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
2177
2223
|
const {
|
|
2178
2224
|
children,
|
|
@@ -2184,7 +2230,7 @@ const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
|
2184
2230
|
tone = "default",
|
|
2185
2231
|
...restProps
|
|
2186
2232
|
} = props;
|
|
2187
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2233
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$w, {
|
|
2188
2234
|
"data-ui": "Badge",
|
|
2189
2235
|
...restProps,
|
|
2190
2236
|
$tone: tone,
|
|
@@ -2193,12 +2239,11 @@ const Badge = react.forwardRef(function Badge2(props, ref) {
|
|
|
2193
2239
|
ref,
|
|
2194
2240
|
children: /* @__PURE__ */jsxRuntime.jsx(Text, {
|
|
2195
2241
|
size: fontSize,
|
|
2196
|
-
weight: "medium",
|
|
2197
2242
|
children
|
|
2198
2243
|
})
|
|
2199
2244
|
});
|
|
2200
2245
|
});
|
|
2201
|
-
const Root$
|
|
2246
|
+
const Root$v = styled__default.default(Box)(flexItemStyle, responsiveFlexStyle);
|
|
2202
2247
|
const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
2203
2248
|
const {
|
|
2204
2249
|
align,
|
|
@@ -2209,7 +2254,7 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
|
2209
2254
|
wrap,
|
|
2210
2255
|
...restProps
|
|
2211
2256
|
} = props;
|
|
2212
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2257
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$v, {
|
|
2213
2258
|
"data-ui": "Flex",
|
|
2214
2259
|
...restProps,
|
|
2215
2260
|
$align: useArrayProp(align),
|
|
@@ -2221,16 +2266,16 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
|
2221
2266
|
ref
|
|
2222
2267
|
});
|
|
2223
2268
|
});
|
|
2224
|
-
var __freeze$
|
|
2225
|
-
var __defProp$
|
|
2226
|
-
var __template$
|
|
2227
|
-
value: __freeze$
|
|
2269
|
+
var __freeze$y = Object.freeze;
|
|
2270
|
+
var __defProp$z = Object.defineProperty;
|
|
2271
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
2272
|
+
value: __freeze$y(raw || cooked.slice())
|
|
2228
2273
|
}));
|
|
2229
|
-
var _a$
|
|
2230
|
-
const rotate$1 = styled.keyframes(_a$
|
|
2231
|
-
const Root$
|
|
2274
|
+
var _a$y, _b$k;
|
|
2275
|
+
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"])));
|
|
2276
|
+
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
2277
|
const Spinner = react.forwardRef(function Spinner2(props, ref) {
|
|
2233
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2278
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$u, {
|
|
2234
2279
|
"data-ui": "Spinner",
|
|
2235
2280
|
...props,
|
|
2236
2281
|
ref,
|
|
@@ -2241,6 +2286,7 @@ function _cardColorStyle(base, color) {
|
|
|
2241
2286
|
let checkered = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
2242
2287
|
return {
|
|
2243
2288
|
// from base
|
|
2289
|
+
"--card-backdrop-color": base.backdrop,
|
|
2244
2290
|
"--card-focus-ring-color": base.focusRing,
|
|
2245
2291
|
"--card-shadow-outline-color": base.shadow.outline,
|
|
2246
2292
|
"--card-shadow-umbra-color": base.shadow.umbra,
|
|
@@ -2308,12 +2354,12 @@ function _cardColorStyle(base, color) {
|
|
|
2308
2354
|
"--card-hairline-hard-color": color.border
|
|
2309
2355
|
};
|
|
2310
2356
|
}
|
|
2311
|
-
var __freeze$
|
|
2312
|
-
var __defProp$
|
|
2313
|
-
var __template$
|
|
2314
|
-
value: __freeze$
|
|
2357
|
+
var __freeze$x = Object.freeze;
|
|
2358
|
+
var __defProp$y = Object.defineProperty;
|
|
2359
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
2360
|
+
value: __freeze$x(raw || cooked.slice())
|
|
2315
2361
|
}));
|
|
2316
|
-
var _a$
|
|
2362
|
+
var _a$x, _b$j;
|
|
2317
2363
|
function buttonBaseStyles(props) {
|
|
2318
2364
|
const {
|
|
2319
2365
|
$width
|
|
@@ -2321,7 +2367,7 @@ function buttonBaseStyles(props) {
|
|
|
2321
2367
|
const {
|
|
2322
2368
|
style
|
|
2323
2369
|
} = theme.getTheme_v2(props.theme);
|
|
2324
|
-
return styled.css(_b$j || (_b$j = __template$
|
|
2370
|
+
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
2371
|
}
|
|
2326
2372
|
function combineBoxShadow() {
|
|
2327
2373
|
for (var _len = arguments.length, boxShadows = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -2376,14 +2422,14 @@ function buttonColorStyles(props) {
|
|
|
2376
2422
|
}
|
|
2377
2423
|
}, (_a2 = style == null ? void 0 : style.button) == null ? void 0 : _a2.root].filter(Boolean);
|
|
2378
2424
|
}
|
|
2379
|
-
var __freeze$
|
|
2380
|
-
var __defProp$
|
|
2381
|
-
var __template$
|
|
2382
|
-
value: __freeze$
|
|
2425
|
+
var __freeze$w = Object.freeze;
|
|
2426
|
+
var __defProp$x = Object.defineProperty;
|
|
2427
|
+
var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
|
|
2428
|
+
value: __freeze$w(raw || cooked.slice())
|
|
2383
2429
|
}));
|
|
2384
|
-
var _a$
|
|
2385
|
-
const Root$
|
|
2386
|
-
const LoadingBox = styled__default.default.div(_a$
|
|
2430
|
+
var _a$w;
|
|
2431
|
+
const Root$t = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
|
|
2432
|
+
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
2433
|
const Button = react.forwardRef(function Button2(props, ref) {
|
|
2388
2434
|
const {
|
|
2389
2435
|
children,
|
|
@@ -2435,7 +2481,7 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2435
2481
|
paddingLeft,
|
|
2436
2482
|
paddingRight
|
|
2437
2483
|
}), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
|
|
2438
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2484
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$t, {
|
|
2439
2485
|
"data-ui": "Button",
|
|
2440
2486
|
...restProps,
|
|
2441
2487
|
$mode: mode,
|
|
@@ -2481,12 +2527,12 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
2481
2527
|
})]
|
|
2482
2528
|
});
|
|
2483
2529
|
});
|
|
2484
|
-
var __freeze$
|
|
2485
|
-
var __defProp$
|
|
2486
|
-
var __template$
|
|
2487
|
-
value: __freeze$
|
|
2530
|
+
var __freeze$v = Object.freeze;
|
|
2531
|
+
var __defProp$w = Object.defineProperty;
|
|
2532
|
+
var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
|
|
2533
|
+
value: __freeze$v(raw || cooked.slice())
|
|
2488
2534
|
}));
|
|
2489
|
-
var _a$
|
|
2535
|
+
var _a$v, _b$i, _c$9;
|
|
2490
2536
|
function cardStyle(props) {
|
|
2491
2537
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
2492
2538
|
}
|
|
@@ -2497,7 +2543,7 @@ function cardBaseStyle(props) {
|
|
|
2497
2543
|
const {
|
|
2498
2544
|
space
|
|
2499
2545
|
} = theme.getTheme_v2(props.theme);
|
|
2500
|
-
return styled.css(_b$i || (_b$i = __template$
|
|
2546
|
+
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
2547
|
}
|
|
2502
2548
|
function cardColorStyle(props) {
|
|
2503
2549
|
var _a2;
|
|
@@ -2514,7 +2560,7 @@ function cardColorStyle(props) {
|
|
|
2514
2560
|
width: card.border.width,
|
|
2515
2561
|
color: "var(--card-border-color)"
|
|
2516
2562
|
};
|
|
2517
|
-
return styled.css(_c$9 || (_c$9 = __template$
|
|
2563
|
+
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
2564
|
base: color,
|
|
2519
2565
|
border,
|
|
2520
2566
|
focusRing: card.focusRing
|
|
@@ -2524,7 +2570,7 @@ function cardColorStyle(props) {
|
|
|
2524
2570
|
focusRing: card.focusRing
|
|
2525
2571
|
}) : void 0, (_a2 = style == null ? void 0 : style.card) == null ? void 0 : _a2.root);
|
|
2526
2572
|
}
|
|
2527
|
-
const Root$
|
|
2573
|
+
const Root$s = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
2528
2574
|
const Card = react.forwardRef(function Card2(props, ref) {
|
|
2529
2575
|
const {
|
|
2530
2576
|
__unstable_checkered: checkered = false,
|
|
@@ -2549,7 +2595,7 @@ const Card = react.forwardRef(function Card2(props, ref) {
|
|
|
2549
2595
|
return /* @__PURE__ */jsxRuntime.jsx(ThemeColorProvider, {
|
|
2550
2596
|
scheme,
|
|
2551
2597
|
tone,
|
|
2552
|
-
children: /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2598
|
+
children: /* @__PURE__ */jsxRuntime.jsx(Root$s, {
|
|
2553
2599
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2554
2600
|
"data-scheme": rootTheme.scheme,
|
|
2555
2601
|
"data-ui": "Card",
|
|
@@ -2574,14 +2620,14 @@ const Card = react.forwardRef(function Card2(props, ref) {
|
|
|
2574
2620
|
})
|
|
2575
2621
|
});
|
|
2576
2622
|
});
|
|
2577
|
-
var __freeze$
|
|
2578
|
-
var __defProp$
|
|
2579
|
-
var __template$
|
|
2580
|
-
value: __freeze$
|
|
2623
|
+
var __freeze$u = Object.freeze;
|
|
2624
|
+
var __defProp$v = Object.defineProperty;
|
|
2625
|
+
var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
|
|
2626
|
+
value: __freeze$u(raw || cooked.slice())
|
|
2581
2627
|
}));
|
|
2582
|
-
var _a$
|
|
2628
|
+
var _a$u, _b$h;
|
|
2583
2629
|
function checkboxBaseStyles() {
|
|
2584
|
-
return styled.css(_a$
|
|
2630
|
+
return styled.css(_a$u || (_a$u = __template$u(["\n position: relative;\n display: inline-block;\n "])));
|
|
2585
2631
|
}
|
|
2586
2632
|
function inputElementStyles(props) {
|
|
2587
2633
|
const {
|
|
@@ -2592,7 +2638,7 @@ function inputElementStyles(props) {
|
|
|
2592
2638
|
const {
|
|
2593
2639
|
focusRing
|
|
2594
2640
|
} = input.checkbox;
|
|
2595
|
-
return styled.css(_b$h || (_b$h = __template$
|
|
2641
|
+
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
2642
|
color: color.input.default.enabled.border,
|
|
2597
2643
|
width: input.border.width
|
|
2598
2644
|
}), rem(radius[2]), color.input.default.enabled.bg, color.input.default.enabled.fg, focusRingBorderStyle({
|
|
@@ -2625,7 +2671,7 @@ function inputElementStyles(props) {
|
|
|
2625
2671
|
color: color.input.default.readOnly.border
|
|
2626
2672
|
}), color.input.default.readOnly.fg, color.input.default.readOnly.muted.bg);
|
|
2627
2673
|
}
|
|
2628
|
-
const Root$
|
|
2674
|
+
const Root$r = styled__default.default.div(checkboxBaseStyles);
|
|
2629
2675
|
const Input$5 = styled__default.default.input(inputElementStyles);
|
|
2630
2676
|
const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
2631
2677
|
const {
|
|
@@ -2645,7 +2691,7 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2645
2691
|
ref.current.indeterminate = indeterminate || false;
|
|
2646
2692
|
}
|
|
2647
2693
|
}, [indeterminate, ref]);
|
|
2648
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2694
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$r, {
|
|
2649
2695
|
className,
|
|
2650
2696
|
"data-ui": "Checkbox",
|
|
2651
2697
|
style,
|
|
@@ -2663,12 +2709,12 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
2663
2709
|
})]
|
|
2664
2710
|
});
|
|
2665
2711
|
});
|
|
2666
|
-
var __freeze$
|
|
2667
|
-
var __defProp$
|
|
2668
|
-
var __template$
|
|
2669
|
-
value: __freeze$
|
|
2712
|
+
var __freeze$t = Object.freeze;
|
|
2713
|
+
var __defProp$u = Object.defineProperty;
|
|
2714
|
+
var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
|
|
2715
|
+
value: __freeze$t(raw || cooked.slice())
|
|
2670
2716
|
}));
|
|
2671
|
-
var _a$
|
|
2717
|
+
var _a$t;
|
|
2672
2718
|
function codeSyntaxHighlightingStyle(_ref2) {
|
|
2673
2719
|
let {
|
|
2674
2720
|
theme: theme$1
|
|
@@ -2790,9 +2836,9 @@ function codeSyntaxHighlightingStyle(_ref2) {
|
|
|
2790
2836
|
};
|
|
2791
2837
|
}
|
|
2792
2838
|
function codeBaseStyle() {
|
|
2793
|
-
return styled.css(_a$
|
|
2839
|
+
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
2840
|
}
|
|
2795
|
-
const Root$
|
|
2841
|
+
const Root$q = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle);
|
|
2796
2842
|
const Code = react.forwardRef(function Code2(props, ref) {
|
|
2797
2843
|
const {
|
|
2798
2844
|
children,
|
|
@@ -2803,7 +2849,7 @@ const Code = react.forwardRef(function Code2(props, ref) {
|
|
|
2803
2849
|
} = props;
|
|
2804
2850
|
const language = typeof languageProp === "string" ? languageProp : void 0;
|
|
2805
2851
|
const registered = language ? Refractor__default.default.hasLanguage(language) : false;
|
|
2806
|
-
return /* @__PURE__ */jsxRuntime.jsxs(Root$
|
|
2852
|
+
return /* @__PURE__ */jsxRuntime.jsxs(Root$q, {
|
|
2807
2853
|
"data-ui": "Code",
|
|
2808
2854
|
...restProps,
|
|
2809
2855
|
$size: useArrayProp(size),
|
|
@@ -2834,14 +2880,14 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2834
2880
|
maxWidth: val === "auto" ? "none" : rem(container[val])
|
|
2835
2881
|
}));
|
|
2836
2882
|
}
|
|
2837
|
-
const Root$
|
|
2883
|
+
const Root$p = styled__default.default(Box)(containerBaseStyle, responsiveContainerWidthStyle);
|
|
2838
2884
|
const Container = react.forwardRef(function Container2(props, ref) {
|
|
2839
2885
|
const {
|
|
2840
2886
|
as,
|
|
2841
2887
|
width = 2,
|
|
2842
2888
|
...restProps
|
|
2843
2889
|
} = props;
|
|
2844
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2890
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$p, {
|
|
2845
2891
|
"data-ui": "Container",
|
|
2846
2892
|
...restProps,
|
|
2847
2893
|
$width: useArrayProp(width),
|
|
@@ -2849,7 +2895,7 @@ const Container = react.forwardRef(function Container2(props, ref) {
|
|
|
2849
2895
|
ref
|
|
2850
2896
|
});
|
|
2851
2897
|
});
|
|
2852
|
-
const Root$
|
|
2898
|
+
const Root$o = styled__default.default(Box)(responsiveGridStyle);
|
|
2853
2899
|
const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
2854
2900
|
const {
|
|
2855
2901
|
as,
|
|
@@ -2864,7 +2910,7 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
|
2864
2910
|
children,
|
|
2865
2911
|
...restProps
|
|
2866
2912
|
} = props;
|
|
2867
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2913
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$o, {
|
|
2868
2914
|
"data-as": typeof as === "string" ? as : void 0,
|
|
2869
2915
|
"data-ui": "Grid",
|
|
2870
2916
|
...restProps,
|
|
@@ -2881,12 +2927,12 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
|
2881
2927
|
children
|
|
2882
2928
|
});
|
|
2883
2929
|
});
|
|
2884
|
-
var __freeze$
|
|
2885
|
-
var __defProp$
|
|
2886
|
-
var __template$
|
|
2887
|
-
value: __freeze$
|
|
2930
|
+
var __freeze$s = Object.freeze;
|
|
2931
|
+
var __defProp$t = Object.defineProperty;
|
|
2932
|
+
var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
|
|
2933
|
+
value: __freeze$s(raw || cooked.slice())
|
|
2888
2934
|
}));
|
|
2889
|
-
var _a$
|
|
2935
|
+
var _a$s, _b$g, _c$8;
|
|
2890
2936
|
function headingBaseStyle(props) {
|
|
2891
2937
|
const {
|
|
2892
2938
|
$accent,
|
|
@@ -2895,16 +2941,16 @@ function headingBaseStyle(props) {
|
|
|
2895
2941
|
const {
|
|
2896
2942
|
font
|
|
2897
2943
|
} = theme.getTheme_v2(props.theme);
|
|
2898
|
-
return styled.css(_c$8 || (_c$8 = __template$
|
|
2944
|
+
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
2945
|
}
|
|
2900
|
-
var __freeze$
|
|
2901
|
-
var __defProp$
|
|
2902
|
-
var __template$
|
|
2903
|
-
value: __freeze$
|
|
2946
|
+
var __freeze$r = Object.freeze;
|
|
2947
|
+
var __defProp$s = Object.defineProperty;
|
|
2948
|
+
var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
|
|
2949
|
+
value: __freeze$r(raw || cooked.slice())
|
|
2904
2950
|
}));
|
|
2905
|
-
var _a$
|
|
2906
|
-
const Root$
|
|
2907
|
-
const SpanWithTextOverflow = styled__default.default.span(_a$
|
|
2951
|
+
var _a$r;
|
|
2952
|
+
const Root$n = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
2953
|
+
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
2954
|
const Heading = react.forwardRef(function Heading2(props, ref) {
|
|
2909
2955
|
const {
|
|
2910
2956
|
accent = false,
|
|
@@ -2922,7 +2968,7 @@ const Heading = react.forwardRef(function Heading2(props, ref) {
|
|
|
2922
2968
|
children
|
|
2923
2969
|
});
|
|
2924
2970
|
}
|
|
2925
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
2971
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$n, {
|
|
2926
2972
|
"data-ui": "Heading",
|
|
2927
2973
|
...restProps,
|
|
2928
2974
|
$accent: accent,
|
|
@@ -2963,7 +3009,7 @@ function inlineSpaceStyle(props) {
|
|
|
2963
3009
|
};
|
|
2964
3010
|
});
|
|
2965
3011
|
}
|
|
2966
|
-
const Root$
|
|
3012
|
+
const Root$m = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle);
|
|
2967
3013
|
const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
2968
3014
|
const {
|
|
2969
3015
|
as,
|
|
@@ -2974,7 +3020,7 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
|
2974
3020
|
const children = react.useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsxRuntime.jsx("div", {
|
|
2975
3021
|
children: child
|
|
2976
3022
|
}, idx)), [childrenProp]);
|
|
2977
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3023
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$m, {
|
|
2978
3024
|
"data-ui": "Inline",
|
|
2979
3025
|
...restProps,
|
|
2980
3026
|
$space: useArrayProp(space),
|
|
@@ -2983,16 +3029,16 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
|
2983
3029
|
children
|
|
2984
3030
|
});
|
|
2985
3031
|
});
|
|
2986
|
-
var __freeze$
|
|
2987
|
-
var __defProp$
|
|
2988
|
-
var __template$
|
|
2989
|
-
value: __freeze$
|
|
3032
|
+
var __freeze$q = Object.freeze;
|
|
3033
|
+
var __defProp$r = Object.defineProperty;
|
|
3034
|
+
var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
|
|
3035
|
+
value: __freeze$q(raw || cooked.slice())
|
|
2990
3036
|
}));
|
|
2991
|
-
var _a$
|
|
3037
|
+
var _a$q;
|
|
2992
3038
|
function kbdStyle() {
|
|
2993
|
-
return styled.css(_a$
|
|
3039
|
+
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
3040
|
}
|
|
2995
|
-
const Root$
|
|
3041
|
+
const Root$l = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
|
|
2996
3042
|
const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
2997
3043
|
const {
|
|
2998
3044
|
children,
|
|
@@ -3001,7 +3047,7 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
|
3001
3047
|
radius = 2,
|
|
3002
3048
|
...restProps
|
|
3003
3049
|
} = props;
|
|
3004
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3050
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$l, {
|
|
3005
3051
|
"data-ui": "KBD",
|
|
3006
3052
|
...restProps,
|
|
3007
3053
|
$radius: useArrayProp(radius),
|
|
@@ -3018,6 +3064,45 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
|
3018
3064
|
})
|
|
3019
3065
|
});
|
|
3020
3066
|
});
|
|
3067
|
+
const origin = {
|
|
3068
|
+
name: "@sanity/ui/origin",
|
|
3069
|
+
fn(_ref3) {
|
|
3070
|
+
let {
|
|
3071
|
+
middlewareData,
|
|
3072
|
+
placement,
|
|
3073
|
+
rects
|
|
3074
|
+
} = _ref3;
|
|
3075
|
+
var _a, _b;
|
|
3076
|
+
const [side] = placement.split("-");
|
|
3077
|
+
const floatingWidth = rects.floating.width;
|
|
3078
|
+
const floatingHeight = rects.floating.height;
|
|
3079
|
+
const shiftX = ((_a = middlewareData.shift) == null ? void 0 : _a.x) || 0;
|
|
3080
|
+
const shiftY = ((_b = middlewareData.shift) == null ? void 0 : _b.y) || 0;
|
|
3081
|
+
if (floatingWidth <= 0 || floatingHeight <= 0) {
|
|
3082
|
+
return {};
|
|
3083
|
+
}
|
|
3084
|
+
const isVerticalPlacement = ["bottom", "top"].includes(side);
|
|
3085
|
+
const {
|
|
3086
|
+
originX,
|
|
3087
|
+
originY
|
|
3088
|
+
} = isVerticalPlacement ? {
|
|
3089
|
+
originX: clamp(0.5 - shiftX / floatingWidth, 0, 1),
|
|
3090
|
+
originY: side === "bottom" ? 0 : 1
|
|
3091
|
+
} : {
|
|
3092
|
+
originX: side === "left" ? 1 : 0,
|
|
3093
|
+
originY: clamp(0.5 - shiftY / floatingHeight, 0, 1)
|
|
3094
|
+
};
|
|
3095
|
+
return {
|
|
3096
|
+
data: {
|
|
3097
|
+
originX,
|
|
3098
|
+
originY
|
|
3099
|
+
}
|
|
3100
|
+
};
|
|
3101
|
+
}
|
|
3102
|
+
};
|
|
3103
|
+
function clamp(num, min, max) {
|
|
3104
|
+
return Math.min(Math.max(num, min), max);
|
|
3105
|
+
}
|
|
3021
3106
|
function moveTowardsLength(movingPoint, targetPoint, amount) {
|
|
3022
3107
|
const width = targetPoint.x - movingPoint.x;
|
|
3023
3108
|
const height = targetPoint.y - movingPoint.y;
|
|
@@ -3072,20 +3157,20 @@ function compileCommands(cmds) {
|
|
|
3072
3157
|
return "";
|
|
3073
3158
|
}).join(" ");
|
|
3074
3159
|
}
|
|
3075
|
-
var __freeze$
|
|
3076
|
-
var __defProp$
|
|
3077
|
-
var __template$
|
|
3078
|
-
value: __freeze$
|
|
3160
|
+
var __freeze$p = Object.freeze;
|
|
3161
|
+
var __defProp$q = Object.defineProperty;
|
|
3162
|
+
var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
|
|
3163
|
+
value: __freeze$p(raw || cooked.slice())
|
|
3079
3164
|
}));
|
|
3080
|
-
var _a$
|
|
3081
|
-
const Root$
|
|
3165
|
+
var _a$p, _b$f, _c$7;
|
|
3166
|
+
const Root$k = styled__default.default.div(_ref4 => {
|
|
3082
3167
|
let {
|
|
3083
3168
|
$w: w
|
|
3084
|
-
} =
|
|
3085
|
-
return styled.css(_a$
|
|
3169
|
+
} = _ref4;
|
|
3170
|
+
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
3171
|
});
|
|
3087
|
-
const StrokePath = styled__default.default.path(_b$f || (_b$f = __template$
|
|
3088
|
-
const ShapePath = styled__default.default.path(_c$7 || (_c$7 = __template$
|
|
3172
|
+
const StrokePath = styled__default.default.path(_b$f || (_b$f = __template$p(["\n stroke: var(--card-shadow-outline-color);\n"])));
|
|
3173
|
+
const ShapePath = styled__default.default.path(_c$7 || (_c$7 = __template$p(["\n fill: var(--card-bg-color);\n"])));
|
|
3089
3174
|
const Arrow = react.forwardRef(function Arrow2(props, ref) {
|
|
3090
3175
|
const {
|
|
3091
3176
|
width: w,
|
|
@@ -3121,7 +3206,7 @@ const Arrow = react.forwardRef(function Arrow2(props, ref) {
|
|
|
3121
3206
|
const path = compileCommands(cmds);
|
|
3122
3207
|
const strokePath = "".concat(path);
|
|
3123
3208
|
const fillPath = "".concat(path, " M ").concat(w, " -1 M 0 -1 Z");
|
|
3124
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3209
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$k, {
|
|
3125
3210
|
...restProps,
|
|
3126
3211
|
$w: w,
|
|
3127
3212
|
ref,
|
|
@@ -3179,6 +3264,17 @@ function useBoundaryElement() {
|
|
|
3179
3264
|
}
|
|
3180
3265
|
return value || DEFAULT_VALUE;
|
|
3181
3266
|
}
|
|
3267
|
+
function ConditionalWrapper(_ref5) {
|
|
3268
|
+
let {
|
|
3269
|
+
children,
|
|
3270
|
+
condition,
|
|
3271
|
+
wrapper
|
|
3272
|
+
} = _ref5;
|
|
3273
|
+
if (!condition) {
|
|
3274
|
+
return children;
|
|
3275
|
+
}
|
|
3276
|
+
return wrapper(children);
|
|
3277
|
+
}
|
|
3182
3278
|
function findMaxBreakpoints(media, width) {
|
|
3183
3279
|
const ret = [];
|
|
3184
3280
|
for (let i = 0; i < media.length; i += 1) {
|
|
@@ -3228,8 +3324,8 @@ const ElementQuery = react.forwardRef(function ElementQuery2(props, ref) {
|
|
|
3228
3324
|
children
|
|
3229
3325
|
});
|
|
3230
3326
|
});
|
|
3231
|
-
var __defProp$
|
|
3232
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$
|
|
3327
|
+
var __defProp$p = Object.defineProperty;
|
|
3328
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$p(obj, key, {
|
|
3233
3329
|
enumerable: true,
|
|
3234
3330
|
configurable: true,
|
|
3235
3331
|
writable: true,
|
|
@@ -3458,7 +3554,7 @@ function LayerProvider(props) {
|
|
|
3458
3554
|
children
|
|
3459
3555
|
});
|
|
3460
3556
|
}
|
|
3461
|
-
const Root$
|
|
3557
|
+
const Root$j = styled__default.default.div({
|
|
3462
3558
|
position: "relative"
|
|
3463
3559
|
});
|
|
3464
3560
|
const LayerChildren = react.forwardRef(function LayerChildren2(props, ref) {
|
|
@@ -3494,7 +3590,7 @@ const LayerChildren = react.forwardRef(function LayerChildren2(props, ref) {
|
|
|
3494
3590
|
lastFocusedRef.current = target;
|
|
3495
3591
|
}
|
|
3496
3592
|
}, [forwardedRef, isTopLayer, onFocus]);
|
|
3497
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3593
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$j, {
|
|
3498
3594
|
...restProps,
|
|
3499
3595
|
"data-ui": "Layer",
|
|
3500
3596
|
onFocus: handleFocus,
|
|
@@ -3605,19 +3701,19 @@ function PortalProvider(props) {
|
|
|
3605
3701
|
children
|
|
3606
3702
|
});
|
|
3607
3703
|
}
|
|
3608
|
-
var __freeze$
|
|
3609
|
-
var __defProp$
|
|
3610
|
-
var __template$
|
|
3611
|
-
value: __freeze$
|
|
3704
|
+
var __freeze$o = Object.freeze;
|
|
3705
|
+
var __defProp$o = Object.defineProperty;
|
|
3706
|
+
var __template$o = (cooked, raw) => __freeze$o(__defProp$o(cooked, "raw", {
|
|
3707
|
+
value: __freeze$o(raw || cooked.slice())
|
|
3612
3708
|
}));
|
|
3613
|
-
var _a$
|
|
3614
|
-
const Root$
|
|
3709
|
+
var _a$o;
|
|
3710
|
+
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
3711
|
const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
3616
3712
|
const {
|
|
3617
3713
|
as,
|
|
3618
3714
|
children
|
|
3619
3715
|
} = props;
|
|
3620
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3716
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$i, {
|
|
3621
3717
|
"aria-hidden": true,
|
|
3622
3718
|
as,
|
|
3623
3719
|
"data-ui": "SrOnly",
|
|
@@ -3625,14 +3721,14 @@ const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
|
3625
3721
|
children
|
|
3626
3722
|
});
|
|
3627
3723
|
});
|
|
3628
|
-
var __freeze$
|
|
3629
|
-
var __defProp$
|
|
3630
|
-
var __template$
|
|
3631
|
-
value: __freeze$
|
|
3724
|
+
var __freeze$n = Object.freeze;
|
|
3725
|
+
var __defProp$n = Object.defineProperty;
|
|
3726
|
+
var __template$n = (cooked, raw) => __freeze$n(__defProp$n(cooked, "raw", {
|
|
3727
|
+
value: __freeze$n(raw || cooked.slice())
|
|
3632
3728
|
}));
|
|
3633
|
-
var _a$
|
|
3634
|
-
const Root$
|
|
3635
|
-
const ItemWrapper = styled__default.default.div(_b$e || (_b$e = __template$
|
|
3729
|
+
var _a$n, _b$e;
|
|
3730
|
+
const Root$h = styled__default.default.div(_a$n || (_a$n = __template$n(["\n position: relative;\n"])));
|
|
3731
|
+
const ItemWrapper = styled__default.default.div(_b$e || (_b$e = __template$n(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
|
|
3636
3732
|
const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
|
|
3637
3733
|
const {
|
|
3638
3734
|
as = "div",
|
|
@@ -3738,7 +3834,7 @@ const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
|
|
|
3738
3834
|
const wrapperStyle = react.useMemo(() => ({
|
|
3739
3835
|
height
|
|
3740
3836
|
}), [height]);
|
|
3741
|
-
return /* @__PURE__ */jsxRuntime.jsx(Root$
|
|
3837
|
+
return /* @__PURE__ */jsxRuntime.jsx(Root$h, {
|
|
3742
3838
|
as,
|
|
3743
3839
|
"data-ui": "VirtualList",
|
|
3744
3840
|
...restProps,
|
|
@@ -3856,17 +3952,17 @@ function calcMaxWidth(params) {
|
|
|
3856
3952
|
}
|
|
3857
3953
|
return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
|
|
3858
3954
|
}
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
});
|
|
3955
|
+
var __freeze$m = Object.freeze;
|
|
3956
|
+
var __defProp$m = Object.defineProperty;
|
|
3957
|
+
var __template$m = (cooked, raw) => __freeze$m(__defProp$m(cooked, "raw", {
|
|
3958
|
+
value: __freeze$m(raw || cooked.slice())
|
|
3959
|
+
}));
|
|
3960
|
+
var _a$m;
|
|
3961
|
+
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
3962
|
const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref) {
|
|
3868
3963
|
const {
|
|
3869
3964
|
__unstable_margins: marginsProp,
|
|
3965
|
+
animate,
|
|
3870
3966
|
arrow,
|
|
3871
3967
|
arrowRef,
|
|
3872
3968
|
arrowX,
|
|
@@ -3874,6 +3970,8 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3874
3970
|
children,
|
|
3875
3971
|
padding,
|
|
3876
3972
|
placement,
|
|
3973
|
+
originX,
|
|
3974
|
+
originY,
|
|
3877
3975
|
overflow,
|
|
3878
3976
|
radius,
|
|
3879
3977
|
scheme,
|
|
@@ -3893,20 +3991,22 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3893
3991
|
const x = (xProp != null ? xProp : 0) + margins[3];
|
|
3894
3992
|
const y = (yProp != null ? yProp : 0) + margins[0];
|
|
3895
3993
|
const rootStyle = react.useMemo(() => ({
|
|
3994
|
+
left: x,
|
|
3995
|
+
originX,
|
|
3996
|
+
originY,
|
|
3896
3997
|
position: strategy,
|
|
3897
3998
|
top: y,
|
|
3898
|
-
left: x,
|
|
3899
3999
|
width,
|
|
3900
4000
|
zIndex,
|
|
3901
4001
|
...style
|
|
3902
|
-
}), [strategy, style, width, x, y, zIndex]);
|
|
4002
|
+
}), [originX, originY, strategy, style, width, x, y, zIndex]);
|
|
3903
4003
|
const arrowStyle = react.useMemo(() => ({
|
|
3904
4004
|
left: arrowX !== null ? arrowX : void 0,
|
|
3905
4005
|
top: arrowY !== null ? arrowY : void 0,
|
|
3906
4006
|
right: void 0,
|
|
3907
4007
|
bottom: void 0
|
|
3908
4008
|
}), [arrowX, arrowY]);
|
|
3909
|
-
return /* @__PURE__ */jsxRuntime.jsxs(
|
|
4009
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MotionCard$1, {
|
|
3910
4010
|
"data-ui": "Popover",
|
|
3911
4011
|
...restProps,
|
|
3912
4012
|
"data-placement": placement,
|
|
@@ -3917,6 +4017,7 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3917
4017
|
sizing: "border",
|
|
3918
4018
|
style: rootStyle,
|
|
3919
4019
|
tone,
|
|
4020
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
3920
4021
|
children: [/* @__PURE__ */jsxRuntime.jsx(Flex, {
|
|
3921
4022
|
"data-ui": "Popover__wrapper",
|
|
3922
4023
|
direction: "column",
|
|
@@ -3939,7 +4040,7 @@ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref
|
|
|
3939
4040
|
}));
|
|
3940
4041
|
PopoverCard.displayName = "PopoverCard";
|
|
3941
4042
|
const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
3942
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
4043
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
3943
4044
|
const {
|
|
3944
4045
|
container,
|
|
3945
4046
|
layer
|
|
@@ -3947,6 +4048,7 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
3947
4048
|
const boundaryElementContext = useBoundaryElement();
|
|
3948
4049
|
const {
|
|
3949
4050
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
4051
|
+
animate = false,
|
|
3950
4052
|
arrow: arrowProp = false,
|
|
3951
4053
|
boundaryElement = boundaryElementContext.element,
|
|
3952
4054
|
children: childProp,
|
|
@@ -4034,13 +4136,13 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4034
4136
|
}));
|
|
4035
4137
|
if (constrainSize || matchReferenceWidth) {
|
|
4036
4138
|
ret.push(size({
|
|
4037
|
-
apply(
|
|
4139
|
+
apply(_ref6) {
|
|
4038
4140
|
let {
|
|
4039
4141
|
availableWidth,
|
|
4040
4142
|
availableHeight,
|
|
4041
4143
|
elements,
|
|
4042
4144
|
referenceWidth
|
|
4043
|
-
} =
|
|
4145
|
+
} = _ref6;
|
|
4044
4146
|
referenceWidthRef.current = referenceWidth;
|
|
4045
4147
|
const _currentWidth = widthRef.current;
|
|
4046
4148
|
const _maxWidth = maxWidthRef.current;
|
|
@@ -4074,13 +4176,16 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4074
4176
|
padding: DEFAULT_POPOVER_PADDING
|
|
4075
4177
|
}));
|
|
4076
4178
|
}
|
|
4179
|
+
if (animate) {
|
|
4180
|
+
ret.push(origin);
|
|
4181
|
+
}
|
|
4077
4182
|
ret.push(reactDom$1.hide({
|
|
4078
4183
|
boundary: referenceBoundary || void 0,
|
|
4079
4184
|
padding: DEFAULT_POPOVER_PADDING,
|
|
4080
4185
|
strategy: "referenceHidden"
|
|
4081
4186
|
}));
|
|
4082
4187
|
return ret;
|
|
4083
|
-
}, [arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4188
|
+
}, [animate, arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
|
|
4084
4189
|
const {
|
|
4085
4190
|
x,
|
|
4086
4191
|
y,
|
|
@@ -4097,6 +4202,8 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4097
4202
|
const referenceHidden = (_f = middlewareData.hide) == null ? void 0 : _f.referenceHidden;
|
|
4098
4203
|
const arrowX = (_g = middlewareData.arrow) == null ? void 0 : _g.x;
|
|
4099
4204
|
const arrowY = (_h = middlewareData.arrow) == null ? void 0 : _h.y;
|
|
4205
|
+
const originX = (_i = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _i.originX;
|
|
4206
|
+
const originY = (_j = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _j.originY;
|
|
4100
4207
|
const setArrow = react.useCallback(arrowEl => {
|
|
4101
4208
|
arrowRef.current = arrowEl;
|
|
4102
4209
|
}, []);
|
|
@@ -4139,6 +4246,7 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4139
4246
|
children: /* @__PURE__ */jsxRuntime.jsx(PopoverCard, {
|
|
4140
4247
|
...restProps,
|
|
4141
4248
|
__unstable_margins: margins,
|
|
4249
|
+
animate,
|
|
4142
4250
|
arrow: arrowProp,
|
|
4143
4251
|
arrowRef: setArrow,
|
|
4144
4252
|
arrowX,
|
|
@@ -4151,6 +4259,8 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4151
4259
|
ref: setFloating,
|
|
4152
4260
|
scheme,
|
|
4153
4261
|
shadow,
|
|
4262
|
+
originX,
|
|
4263
|
+
originY,
|
|
4154
4264
|
strategy,
|
|
4155
4265
|
tone,
|
|
4156
4266
|
width: matchReferenceWidth ? referenceWidthRef.current : width,
|
|
@@ -4160,23 +4270,31 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
4160
4270
|
})
|
|
4161
4271
|
});
|
|
4162
4272
|
return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
4163
|
-
children: [
|
|
4164
|
-
|
|
4165
|
-
|
|
4273
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
4274
|
+
condition: animate,
|
|
4275
|
+
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
4276
|
+
children
|
|
4277
|
+
}),
|
|
4278
|
+
children: open && /* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
4279
|
+
condition: !!portal,
|
|
4280
|
+
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(Portal, {
|
|
4281
|
+
__unstable_name: typeof portal === "string" ? portal : void 0,
|
|
4282
|
+
children
|
|
4283
|
+
}),
|
|
4166
4284
|
children: popover
|
|
4167
|
-
})
|
|
4285
|
+
})
|
|
4168
4286
|
}), child]
|
|
4169
4287
|
});
|
|
4170
4288
|
}));
|
|
4171
4289
|
Popover.displayName = "Popover";
|
|
4172
|
-
var __freeze$
|
|
4173
|
-
var __defProp$
|
|
4174
|
-
var __template$
|
|
4175
|
-
value: __freeze$
|
|
4290
|
+
var __freeze$l = Object.freeze;
|
|
4291
|
+
var __defProp$l = Object.defineProperty;
|
|
4292
|
+
var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
|
|
4293
|
+
value: __freeze$l(raw || cooked.slice())
|
|
4176
4294
|
}));
|
|
4177
|
-
var _a$
|
|
4295
|
+
var _a$l, _b$d;
|
|
4178
4296
|
function radioBaseStyle() {
|
|
4179
|
-
return styled.css(_a$
|
|
4297
|
+
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
4298
|
}
|
|
4181
4299
|
function inputElementStyle(props) {
|
|
4182
4300
|
const {
|
|
@@ -4184,7 +4302,7 @@ function inputElementStyle(props) {
|
|
|
4184
4302
|
input
|
|
4185
4303
|
} = theme.getTheme_v2(props.theme);
|
|
4186
4304
|
const dist = (input.radio.size - input.radio.markSize) / 2;
|
|
4187
|
-
return styled.css(_b$d || (_b$d = __template$
|
|
4305
|
+
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
4306
|
color: color.input.default.enabled.border,
|
|
4189
4307
|
width: input.border.width
|
|
4190
4308
|
}), 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 +4347,27 @@ const Radio = react.forwardRef(function Radio2(props, forwardedRef) {
|
|
|
4229
4347
|
}), /* @__PURE__ */jsxRuntime.jsx("span", {})]
|
|
4230
4348
|
});
|
|
4231
4349
|
});
|
|
4232
|
-
var __freeze$
|
|
4233
|
-
var __defProp$
|
|
4234
|
-
var __template$
|
|
4235
|
-
value: __freeze$
|
|
4350
|
+
var __freeze$k = Object.freeze;
|
|
4351
|
+
var __defProp$k = Object.defineProperty;
|
|
4352
|
+
var __template$k = (cooked, raw) => __freeze$k(__defProp$k(cooked, "raw", {
|
|
4353
|
+
value: __freeze$k(raw || cooked.slice())
|
|
4236
4354
|
}));
|
|
4237
|
-
var _a$
|
|
4355
|
+
var _a$k, _b$c, _c$6, _d$5;
|
|
4238
4356
|
function rootStyle() {
|
|
4239
|
-
return styled.css(_a$
|
|
4357
|
+
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
4358
|
}
|
|
4241
4359
|
function inputBaseStyle(props) {
|
|
4242
4360
|
const {
|
|
4243
4361
|
font
|
|
4244
4362
|
} = theme.getTheme_v2(props.theme);
|
|
4245
|
-
return styled.css(_b$c || (_b$c = __template$
|
|
4363
|
+
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
4364
|
}
|
|
4247
4365
|
function inputColorStyle(props) {
|
|
4248
4366
|
const {
|
|
4249
4367
|
color,
|
|
4250
4368
|
input
|
|
4251
4369
|
} = theme.getTheme_v2(props.theme);
|
|
4252
|
-
return styled.css(_c$6 || (_c$6 = __template$
|
|
4370
|
+
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
4371
|
color: color.input.default.enabled.border,
|
|
4254
4372
|
width: input.border.width
|
|
4255
4373
|
}), color.input.default.hovered.bg, color.input.default.hovered.fg, focusRingBorderStyle({
|
|
@@ -4292,7 +4410,7 @@ function iconBoxStyle(props) {
|
|
|
4292
4410
|
const {
|
|
4293
4411
|
color
|
|
4294
4412
|
} = theme.getTheme_v2(props.theme);
|
|
4295
|
-
return styled.css(_d$5 || (_d$5 = __template$
|
|
4413
|
+
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
4414
|
}
|
|
4297
4415
|
const selectStyle = {
|
|
4298
4416
|
root: rootStyle,
|
|
@@ -4309,7 +4427,7 @@ const Select = react.forwardRef(function Select2(props, forwardedRef) {
|
|
|
4309
4427
|
disabled,
|
|
4310
4428
|
fontSize = 2,
|
|
4311
4429
|
padding = 3,
|
|
4312
|
-
radius =
|
|
4430
|
+
radius = 2,
|
|
4313
4431
|
readOnly,
|
|
4314
4432
|
space = 3,
|
|
4315
4433
|
...restProps
|
|
@@ -4376,32 +4494,32 @@ const Stack = react.forwardRef(function Stack2(props, ref) {
|
|
|
4376
4494
|
ref
|
|
4377
4495
|
});
|
|
4378
4496
|
});
|
|
4379
|
-
var __freeze$
|
|
4380
|
-
var __defProp$
|
|
4381
|
-
var __template$
|
|
4382
|
-
value: __freeze$
|
|
4497
|
+
var __freeze$j = Object.freeze;
|
|
4498
|
+
var __defProp$j = Object.defineProperty;
|
|
4499
|
+
var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
|
|
4500
|
+
value: __freeze$j(raw || cooked.slice())
|
|
4383
4501
|
}));
|
|
4384
|
-
var _a$
|
|
4502
|
+
var _a$j, _b$b, _c$5, _d$4, _e$2, _f$2, _g;
|
|
4385
4503
|
function switchBaseStyles() {
|
|
4386
|
-
return styled.css(_a$
|
|
4504
|
+
return styled.css(_a$j || (_a$j = __template$j(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
4387
4505
|
}
|
|
4388
4506
|
function switchInputStyles() {
|
|
4389
|
-
return styled.css(_b$b || (_b$b = __template$
|
|
4507
|
+
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
4508
|
}
|
|
4391
4509
|
function switchRepresentationStyles(props) {
|
|
4392
4510
|
const {
|
|
4393
4511
|
color,
|
|
4394
4512
|
input
|
|
4395
4513
|
} = theme.getTheme_v2(props.theme);
|
|
4396
|
-
return styled.css(_c$5 || (_c$5 = __template$
|
|
4514
|
+
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
4515
|
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);
|
|
4516
|
+
}), 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
4517
|
}
|
|
4400
4518
|
function switchTrackStyles(props) {
|
|
4401
4519
|
const {
|
|
4402
4520
|
input
|
|
4403
4521
|
} = theme.getTheme_v2(props.theme);
|
|
4404
|
-
return styled.css(_d$4 || (_d$4 = __template$
|
|
4522
|
+
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
4523
|
}
|
|
4406
4524
|
function switchThumbStyles(props) {
|
|
4407
4525
|
const {
|
|
@@ -4417,7 +4535,7 @@ function switchThumbStyles(props) {
|
|
|
4417
4535
|
const checkedOffset = trackWidth - trackPadding * 2 - size;
|
|
4418
4536
|
const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
|
|
4419
4537
|
const checked = $indeterminate !== true && props.$checked === true;
|
|
4420
|
-
return styled.css(_g || (_g = __template$
|
|
4538
|
+
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
4539
|
}
|
|
4422
4540
|
const Root$d = styled__default.default.span(switchBaseStyles);
|
|
4423
4541
|
const Input$2 = styled__default.default.input(switchInputStyles);
|
|
@@ -4461,14 +4579,14 @@ const Switch = react.forwardRef(function Switch2(props, forwardedRef) {
|
|
|
4461
4579
|
})]
|
|
4462
4580
|
});
|
|
4463
4581
|
});
|
|
4464
|
-
var __freeze$
|
|
4465
|
-
var __defProp$
|
|
4466
|
-
var __template$
|
|
4467
|
-
value: __freeze$
|
|
4582
|
+
var __freeze$i = Object.freeze;
|
|
4583
|
+
var __defProp$i = Object.defineProperty;
|
|
4584
|
+
var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
|
|
4585
|
+
value: __freeze$i(raw || cooked.slice())
|
|
4468
4586
|
}));
|
|
4469
|
-
var _a$
|
|
4587
|
+
var _a$i;
|
|
4470
4588
|
const Root$c = styled__default.default.span(textInputRootStyle);
|
|
4471
|
-
const InputRoot$1 = styled__default.default.span(_a$
|
|
4589
|
+
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
4590
|
const Input$1 = styled__default.default.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4473
4591
|
const Presentation$1 = styled__default.default.div(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
4474
4592
|
const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
@@ -4512,30 +4630,30 @@ const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
4512
4630
|
})
|
|
4513
4631
|
});
|
|
4514
4632
|
});
|
|
4515
|
-
var __freeze$
|
|
4516
|
-
var __defProp$
|
|
4517
|
-
var __template$
|
|
4518
|
-
value: __freeze$
|
|
4633
|
+
var __freeze$h = Object.freeze;
|
|
4634
|
+
var __defProp$h = Object.defineProperty;
|
|
4635
|
+
var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
|
|
4636
|
+
value: __freeze$h(raw || cooked.slice())
|
|
4519
4637
|
}));
|
|
4520
|
-
var _a$
|
|
4638
|
+
var _a$h, _b$a, _c$4, _d$3, _e$1, _f$1;
|
|
4521
4639
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
4522
4640
|
zIndex: 2
|
|
4523
4641
|
};
|
|
4524
4642
|
const Root$b = styled__default.default(Card).attrs({
|
|
4525
4643
|
forwardedAs: "span"
|
|
4526
4644
|
})(textInputRootStyle);
|
|
4527
|
-
const InputRoot = styled__default.default.span(_a$
|
|
4645
|
+
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
4646
|
const Prefix = styled__default.default(Card).attrs({
|
|
4529
4647
|
forwardedAs: "span"
|
|
4530
|
-
})(_b$a || (_b$a = __template$
|
|
4648
|
+
})(_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
4649
|
const Suffix = styled__default.default(Card).attrs({
|
|
4532
4650
|
forwardedAs: "span"
|
|
4533
|
-
})(_c$4 || (_c$4 = __template$
|
|
4651
|
+
})(_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
4652
|
const Input = styled__default.default.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
4535
4653
|
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$
|
|
4654
|
+
const LeftBox = styled__default.default(Box)(_d$3 || (_d$3 = __template$h(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
|
|
4655
|
+
const RightBox = styled__default.default(Box)(_e$1 || (_e$1 = __template$h(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
4656
|
+
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
4657
|
const TextInputClearButton = styled__default.default(Button)({
|
|
4540
4658
|
"&:not([hidden])": {
|
|
4541
4659
|
display: "block"
|
|
@@ -4703,17 +4821,6 @@ function useDelayedState(initialState) {
|
|
|
4703
4821
|
}, []);
|
|
4704
4822
|
return [state, onStateChange];
|
|
4705
4823
|
}
|
|
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
4824
|
const DEFAULT_TOOLTIP_ARROW_WIDTH = 15;
|
|
4718
4825
|
const DEFAULT_TOOLTIP_ARROW_HEIGHT = 6;
|
|
4719
4826
|
const DEFAULT_TOOLTIP_ARROW_RADIUS = 2;
|
|
@@ -4733,6 +4840,63 @@ const DEFAULT_FALLBACK_PLACEMENTS = {
|
|
|
4733
4840
|
"right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
|
|
4734
4841
|
"right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
|
|
4735
4842
|
};
|
|
4843
|
+
var __freeze$g = Object.freeze;
|
|
4844
|
+
var __defProp$g = Object.defineProperty;
|
|
4845
|
+
var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
|
|
4846
|
+
value: __freeze$g(raw || cooked.slice())
|
|
4847
|
+
}));
|
|
4848
|
+
var _a$g;
|
|
4849
|
+
const MotionCard = styled__default.default(framerMotion.motion(Card))(_a$g || (_a$g = __template$g([""])));
|
|
4850
|
+
const TooltipCard = react.memo(react.forwardRef(function TooltipCard2(props, ref) {
|
|
4851
|
+
const {
|
|
4852
|
+
animate,
|
|
4853
|
+
arrow,
|
|
4854
|
+
arrowRef,
|
|
4855
|
+
arrowX,
|
|
4856
|
+
arrowY,
|
|
4857
|
+
children,
|
|
4858
|
+
originX,
|
|
4859
|
+
originY,
|
|
4860
|
+
padding,
|
|
4861
|
+
placement,
|
|
4862
|
+
radius,
|
|
4863
|
+
scheme,
|
|
4864
|
+
shadow,
|
|
4865
|
+
style,
|
|
4866
|
+
...restProps
|
|
4867
|
+
} = props;
|
|
4868
|
+
const rootStyle = react.useMemo(() => ({
|
|
4869
|
+
originX,
|
|
4870
|
+
originY,
|
|
4871
|
+
...style
|
|
4872
|
+
}), [originX, originY, style]);
|
|
4873
|
+
const arrowStyle = react.useMemo(() => ({
|
|
4874
|
+
left: arrowX !== null ? arrowX : void 0,
|
|
4875
|
+
top: arrowY !== null ? arrowY : void 0,
|
|
4876
|
+
right: void 0,
|
|
4877
|
+
bottom: void 0
|
|
4878
|
+
}), [arrowX, arrowY]);
|
|
4879
|
+
return /* @__PURE__ */jsxRuntime.jsxs(MotionCard, {
|
|
4880
|
+
"data-ui": "Tooltip__card",
|
|
4881
|
+
...restProps,
|
|
4882
|
+
"data-placement": placement,
|
|
4883
|
+
padding,
|
|
4884
|
+
radius,
|
|
4885
|
+
ref,
|
|
4886
|
+
scheme,
|
|
4887
|
+
shadow,
|
|
4888
|
+
style: rootStyle,
|
|
4889
|
+
...(animate ? POPOVER_MOTION_PROPS : {}),
|
|
4890
|
+
children: [children, arrow && /* @__PURE__ */jsxRuntime.jsx(Arrow, {
|
|
4891
|
+
ref: arrowRef,
|
|
4892
|
+
style: arrowStyle,
|
|
4893
|
+
width: DEFAULT_TOOLTIP_ARROW_WIDTH,
|
|
4894
|
+
height: DEFAULT_TOOLTIP_ARROW_HEIGHT,
|
|
4895
|
+
radius: DEFAULT_TOOLTIP_ARROW_RADIUS
|
|
4896
|
+
})]
|
|
4897
|
+
});
|
|
4898
|
+
}));
|
|
4899
|
+
TooltipCard.displayName = "TooltipCard";
|
|
4736
4900
|
const key$4 = Symbol.for("@sanity/ui/context/tooltipDelayGroup");
|
|
4737
4901
|
globalScope[key$4] = globalScope[key$4] || react.createContext(null);
|
|
4738
4902
|
const TooltipDelayGroupContext = globalScope[key$4];
|
|
@@ -4769,26 +4933,27 @@ var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
|
|
|
4769
4933
|
value: __freeze$f(raw || cooked.slice())
|
|
4770
4934
|
}));
|
|
4771
4935
|
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"])),
|
|
4936
|
+
const Root$a = styled__default.default(Layer)(_a$f || (_a$f = __template$f(["\n pointer-events: none;\n max-width: ", "px;\n"])), _ref7 => {
|
|
4773
4937
|
let {
|
|
4774
4938
|
$maxWidth
|
|
4775
|
-
} =
|
|
4939
|
+
} = _ref7;
|
|
4776
4940
|
return $maxWidth;
|
|
4777
4941
|
});
|
|
4778
4942
|
const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
4779
|
-
var _a2, _b, _c, _d, _e;
|
|
4943
|
+
var _a2, _b, _c, _d, _e, _f, _g;
|
|
4780
4944
|
const boundaryElementContext = useBoundaryElement();
|
|
4781
4945
|
const {
|
|
4782
4946
|
layer
|
|
4783
4947
|
} = useTheme_v2();
|
|
4784
4948
|
const {
|
|
4949
|
+
animate = false,
|
|
4785
4950
|
arrow: arrowProp = false,
|
|
4786
4951
|
boundaryElement = boundaryElementContext == null ? void 0 : boundaryElementContext.element,
|
|
4787
4952
|
children: childProp,
|
|
4788
4953
|
content,
|
|
4789
4954
|
disabled,
|
|
4790
4955
|
fallbackPlacements: fallbackPlacementsProp = (_b = props.fallbackPlacements) != null ? _b : DEFAULT_FALLBACK_PLACEMENTS[(_a2 = props.placement) != null ? _a2 : "bottom"],
|
|
4791
|
-
padding =
|
|
4956
|
+
padding = 2,
|
|
4792
4957
|
placement: placementProp = "bottom",
|
|
4793
4958
|
portal: portalProp,
|
|
4794
4959
|
radius = 2,
|
|
@@ -4796,7 +4961,6 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4796
4961
|
shadow = 2,
|
|
4797
4962
|
zOffset = layer.tooltip.zOffset,
|
|
4798
4963
|
delay,
|
|
4799
|
-
animate = false,
|
|
4800
4964
|
...restProps
|
|
4801
4965
|
} = props;
|
|
4802
4966
|
const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
|
|
@@ -4832,8 +4996,11 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4832
4996
|
padding: DEFAULT_TOOLTIP_PADDING
|
|
4833
4997
|
}));
|
|
4834
4998
|
}
|
|
4999
|
+
if (animate) {
|
|
5000
|
+
ret.push(origin);
|
|
5001
|
+
}
|
|
4835
5002
|
return ret;
|
|
4836
|
-
}, [arrowProp, boundaryElement, fallbackPlacements]);
|
|
5003
|
+
}, [animate, arrowProp, boundaryElement, fallbackPlacements]);
|
|
4837
5004
|
const {
|
|
4838
5005
|
floatingStyles,
|
|
4839
5006
|
placement,
|
|
@@ -4847,12 +5014,8 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4847
5014
|
});
|
|
4848
5015
|
const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
|
|
4849
5016
|
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]);
|
|
5017
|
+
const originX = (_f = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _f.originX;
|
|
5018
|
+
const originY = (_g = middlewareData["@sanity/ui/origin"]) == null ? void 0 : _g.originY;
|
|
4856
5019
|
const tooltipId = react.useId();
|
|
4857
5020
|
const [isOpen, setIsOpen] = useDelayedState(false);
|
|
4858
5021
|
const delayGroupContext = useTooltipDelayGroup();
|
|
@@ -4974,53 +5137,33 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
4974
5137
|
}, [childProp, handleBlur, handleClick, handleContextMenu, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
|
|
4975
5138
|
if (!child) return /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {});
|
|
4976
5139
|
if (disabled) return child;
|
|
4977
|
-
const
|
|
5140
|
+
const tooltip = /* @__PURE__ */jsxRuntime.jsx(Root$a, {
|
|
4978
5141
|
"data-ui": "Tooltip",
|
|
4979
5142
|
...restProps,
|
|
4980
5143
|
ref: setFloating,
|
|
4981
5144
|
style: floatingStyles,
|
|
4982
5145
|
zOffset,
|
|
4983
5146
|
$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
|
-
})
|
|
5147
|
+
children: /* @__PURE__ */jsxRuntime.jsx(TooltipCard, {
|
|
5148
|
+
...restProps,
|
|
5149
|
+
animate,
|
|
5150
|
+
arrow: arrowProp,
|
|
5151
|
+
arrowRef: setArrow,
|
|
5152
|
+
arrowX,
|
|
5153
|
+
arrowY,
|
|
5154
|
+
originX,
|
|
5155
|
+
originY,
|
|
5156
|
+
padding,
|
|
5157
|
+
placement,
|
|
5158
|
+
radius,
|
|
5159
|
+
ref: setFloating,
|
|
5160
|
+
scheme,
|
|
5161
|
+
shadow,
|
|
5162
|
+
children: content
|
|
5020
5163
|
})
|
|
5021
5164
|
});
|
|
5022
5165
|
return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
5023
|
-
children: [
|
|
5166
|
+
children: [/* @__PURE__ */jsxRuntime.jsx(ConditionalWrapper, {
|
|
5024
5167
|
condition: animate,
|
|
5025
5168
|
wrapper: children => /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
5026
5169
|
children
|
|
@@ -5031,9 +5174,9 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
5031
5174
|
__unstable_name: typeof portalProp === "string" ? portalProp : void 0,
|
|
5032
5175
|
children
|
|
5033
5176
|
}),
|
|
5034
|
-
children:
|
|
5177
|
+
children: tooltip
|
|
5035
5178
|
})
|
|
5036
|
-
})]
|
|
5179
|
+
}), child]
|
|
5037
5180
|
});
|
|
5038
5181
|
});
|
|
5039
5182
|
var __freeze$e = Object.freeze;
|
|
@@ -5190,10 +5333,10 @@ const InnerAutocomplete = react.forwardRef(function InnerAutocomplete2(props, re
|
|
|
5190
5333
|
query,
|
|
5191
5334
|
value
|
|
5192
5335
|
} = state;
|
|
5193
|
-
const defaultRenderOption = react.useCallback(
|
|
5336
|
+
const defaultRenderOption = react.useCallback(_ref8 => {
|
|
5194
5337
|
let {
|
|
5195
5338
|
value: value2
|
|
5196
|
-
} =
|
|
5339
|
+
} = _ref8;
|
|
5197
5340
|
return /* @__PURE__ */jsxRuntime.jsx(Card, {
|
|
5198
5341
|
"data-as": "button",
|
|
5199
5342
|
padding: paddingProp,
|
|
@@ -5652,10 +5795,10 @@ var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
|
|
|
5652
5795
|
value: __freeze$c(raw || cooked.slice())
|
|
5653
5796
|
}));
|
|
5654
5797
|
var _a$c, _b$7;
|
|
5655
|
-
function dialogStyle(
|
|
5798
|
+
function dialogStyle(_ref9) {
|
|
5656
5799
|
let {
|
|
5657
5800
|
theme: theme$1
|
|
5658
|
-
} =
|
|
5801
|
+
} = _ref9;
|
|
5659
5802
|
const {
|
|
5660
5803
|
color
|
|
5661
5804
|
} = theme.getTheme_v2(theme$1);
|
|
@@ -6323,6 +6466,9 @@ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
|
|
|
6323
6466
|
setOpen(v => !v);
|
|
6324
6467
|
setShouldFocus(null);
|
|
6325
6468
|
}, []);
|
|
6469
|
+
const handleMouseDown = react.useCallback(event => {
|
|
6470
|
+
if (open) event.preventDefault();
|
|
6471
|
+
}, [open]);
|
|
6326
6472
|
const handleButtonKeyDown = react.useCallback(event => {
|
|
6327
6473
|
if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
|
|
6328
6474
|
event.preventDefault();
|
|
@@ -6406,11 +6552,12 @@ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
|
|
|
6406
6552
|
id,
|
|
6407
6553
|
onClick: handleButtonClick,
|
|
6408
6554
|
onKeyDown: handleButtonKeyDown,
|
|
6555
|
+
onMouseDown: handleMouseDown,
|
|
6409
6556
|
"aria-haspopup": true,
|
|
6410
6557
|
"aria-expanded": open,
|
|
6411
6558
|
ref: setButtonRef,
|
|
6412
6559
|
selected: open
|
|
6413
|
-
}) : null, [buttonProp, handleButtonClick, handleButtonKeyDown, id, open, setButtonRef]);
|
|
6560
|
+
}) : null, [buttonProp, handleButtonClick, handleButtonKeyDown, handleMouseDown, id, open, setButtonRef]);
|
|
6414
6561
|
const popoverProps = react.useMemo(() => ({
|
|
6415
6562
|
boundaryElement: deprecated_boundaryElement,
|
|
6416
6563
|
overflow: "auto",
|
|
@@ -6725,15 +6872,15 @@ var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
|
|
|
6725
6872
|
var _a$6, _b$3, _c$1, _d;
|
|
6726
6873
|
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
6874
|
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"])),
|
|
6875
|
+
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
6876
|
let {
|
|
6730
6877
|
$visible
|
|
6731
|
-
} =
|
|
6878
|
+
} = _ref10;
|
|
6732
6879
|
return $visible ? 1 : 0;
|
|
6733
|
-
},
|
|
6880
|
+
}, _ref11 => {
|
|
6734
6881
|
let {
|
|
6735
6882
|
$animated
|
|
6736
|
-
} =
|
|
6883
|
+
} = _ref11;
|
|
6737
6884
|
return $animated ? animation : styled.css(_c$1 || (_c$1 = __template$6(["\n background-color: var(--card-skeleton-color-from);\n "])));
|
|
6738
6885
|
});
|
|
6739
6886
|
const Root$4 = styled__default.default(Box)(responsiveRadiusStyle, skeletonStyle);
|
|
@@ -7118,12 +7265,12 @@ function ToastProvider(props) {
|
|
|
7118
7265
|
paddingY,
|
|
7119
7266
|
children: /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
|
|
7120
7267
|
initial: false,
|
|
7121
|
-
children: state.map(
|
|
7268
|
+
children: state.map(_ref12 => {
|
|
7122
7269
|
let {
|
|
7123
7270
|
dismiss,
|
|
7124
7271
|
id,
|
|
7125
7272
|
params
|
|
7126
|
-
} =
|
|
7273
|
+
} = _ref12;
|
|
7127
7274
|
return /* @__PURE__ */jsxRuntime.jsx(framerMotion.motion.div, {
|
|
7128
7275
|
animate: {
|
|
7129
7276
|
opacity: 1,
|
|
@@ -7617,222 +7764,6 @@ const TreeItem = react.memo(function TreeItem2(props) {
|
|
|
7617
7764
|
})]
|
|
7618
7765
|
});
|
|
7619
7766
|
});
|
|
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
7767
|
exports.Arrow = Arrow;
|
|
7837
7768
|
exports.Autocomplete = Autocomplete;
|
|
7838
7769
|
exports.Avatar = Avatar;
|
|
@@ -7847,6 +7778,7 @@ exports.Card = Card;
|
|
|
7847
7778
|
exports.Checkbox = Checkbox;
|
|
7848
7779
|
exports.Code = Code;
|
|
7849
7780
|
exports.CodeSkeleton = CodeSkeleton;
|
|
7781
|
+
exports.ConditionalWrapper = ConditionalWrapper;
|
|
7850
7782
|
exports.Container = Container;
|
|
7851
7783
|
exports.Dialog = Dialog;
|
|
7852
7784
|
exports.DialogContext = DialogContext;
|
|
@@ -7909,8 +7841,11 @@ exports._raf2 = _raf2;
|
|
|
7909
7841
|
exports._responsive = _responsive;
|
|
7910
7842
|
exports.attemptFocus = attemptFocus;
|
|
7911
7843
|
exports.containsOrEqualsElement = containsOrEqualsElement;
|
|
7844
|
+
exports.createColorTheme = createColorTheme;
|
|
7912
7845
|
exports.focusFirstDescendant = focusFirstDescendant;
|
|
7913
7846
|
exports.focusLastDescendant = focusLastDescendant;
|
|
7847
|
+
exports.hexToRgb = hexToRgb;
|
|
7848
|
+
exports.hslToRgb = hslToRgb;
|
|
7914
7849
|
exports.isFocusable = isFocusable;
|
|
7915
7850
|
exports.isHTMLAnchorElement = isHTMLAnchorElement;
|
|
7916
7851
|
exports.isHTMLButtonElement = isHTMLButtonElement;
|
|
@@ -7918,12 +7853,19 @@ exports.isHTMLElement = isHTMLElement;
|
|
|
7918
7853
|
exports.isHTMLInputElement = isHTMLInputElement;
|
|
7919
7854
|
exports.isHTMLSelectElement = isHTMLSelectElement;
|
|
7920
7855
|
exports.isHTMLTextAreaElement = isHTMLTextAreaElement;
|
|
7856
|
+
exports.multiply = multiply;
|
|
7857
|
+
exports.parseColor = parseColor;
|
|
7921
7858
|
exports.rem = rem;
|
|
7922
7859
|
exports.responsiveCodeFontStyle = responsiveCodeFontStyle;
|
|
7923
7860
|
exports.responsiveHeadingFont = responsiveHeadingFont;
|
|
7924
7861
|
exports.responsiveLabelFont = responsiveLabelFont;
|
|
7925
7862
|
exports.responsiveTextAlignStyle = responsiveTextAlignStyle;
|
|
7926
7863
|
exports.responsiveTextFont = responsiveTextFont;
|
|
7864
|
+
exports.rgbToHex = rgbToHex;
|
|
7865
|
+
exports.rgbToHsl = rgbToHsl;
|
|
7866
|
+
exports.rgba = rgba;
|
|
7867
|
+
exports.screen = screen;
|
|
7868
|
+
exports.studioTheme = studioTheme;
|
|
7927
7869
|
exports.useArrayProp = useArrayProp;
|
|
7928
7870
|
exports.useBoundaryElement = useBoundaryElement;
|
|
7929
7871
|
exports.useClickOutside = useClickOutside;
|