@sanity/ui 1.7.3 → 1.7.4
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/README.md +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.esm.js +338 -101
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +338 -101
- package/dist/index.js.map +1 -1
- package/package.json +33 -33
- package/src/__workshop__/constants.ts +2 -2
- package/src/components/autocomplete/__mocks__/apiStore.ts +2 -2
- package/src/components/autocomplete/__workshop__/async.tsx +2 -2
- package/src/components/autocomplete/__workshop__/constrainedHeight.tsx +2 -2
- package/src/components/autocomplete/__workshop__/custom.tsx +1 -1
- package/src/components/autocomplete/__workshop__/fullscreen.tsx +6 -6
- package/src/components/autocomplete/autocomplete.tsx +20 -20
- package/src/components/autocomplete/autocompleteOption.tsx +1 -1
- package/src/components/autocomplete/autocompleteReducer.ts +1 -1
- package/src/components/breadcrumbs/breadcrumbs.tsx +2 -2
- package/src/components/dialog/dialog.tsx +11 -11
- package/src/components/dialog/dialogProvider.tsx +1 -1
- package/src/components/dialog/styles.ts +1 -1
- package/src/components/hotkeys/hotkeys.tsx +1 -1
- package/src/components/menu/__workshop__/asComponent.tsx +1 -1
- package/src/components/menu/__workshop__/menuButton.tsx +1 -1
- package/src/components/menu/menu.test.tsx +3 -3
- package/src/components/menu/menu.tsx +7 -7
- package/src/components/menu/menuButton.tsx +7 -7
- package/src/components/menu/menuGroup.tsx +4 -4
- package/src/components/menu/menuItem.tsx +4 -4
- package/src/components/menu/useMenuController.ts +3 -3
- package/src/components/skeleton/skeleton.tsx +2 -2
- package/src/components/skeleton/textSkeleton.tsx +25 -19
- package/src/components/tab/tab.tsx +2 -2
- package/src/components/tab/tabList.tsx +3 -3
- package/src/components/tab/tabPanel.tsx +1 -1
- package/src/components/toast/toast.test.tsx +2 -1
- package/src/components/toast/toast.tsx +1 -1
- package/src/components/toast/toastProvider.tsx +1 -1
- package/src/components/tree/__workshop__/basic.perf.ts +1 -1
- package/src/components/tree/helpers.ts +2 -2
- package/src/components/tree/style.ts +1 -1
- package/src/components/tree/tree.tsx +9 -9
- package/src/components/tree/treeGroup.tsx +1 -1
- package/src/components/tree/treeItem.tsx +4 -4
- package/src/hooks/useArrayProp.ts +2 -2
- package/src/hooks/useClickOutside.ts +2 -2
- package/src/hooks/useCustomValidity.ts +1 -1
- package/src/hooks/useMediaIndex/useMediaIndex.test.tsx +4 -4
- package/src/hooks/usePrefersDark.hydration.test.tsx +2 -1
- package/src/hooks/usePrefersReducedMotion.hydration.test.tsx +2 -1
- package/src/lib/globalScope.ts +1 -0
- package/src/primitives/_selectable/selectable.tsx +1 -1
- package/src/primitives/_selectable/style.ts +1 -1
- package/src/primitives/avatar/avatar.tsx +3 -3
- package/src/primitives/avatar/avatarCounter.tsx +5 -3
- package/src/primitives/avatar/avatarStack.tsx +2 -2
- package/src/primitives/avatar/styles.ts +1 -1
- package/src/primitives/badge/badge.tsx +2 -2
- package/src/primitives/box/box.tsx +2 -2
- package/src/primitives/button/button.tsx +2 -2
- package/src/primitives/button/styles.ts +1 -1
- package/src/primitives/card/__workshop__/asComponent.tsx +1 -1
- package/src/primitives/card/__workshop__/selected.tsx +19 -15
- package/src/primitives/card/card.tsx +1 -1
- package/src/primitives/card/styles.ts +1 -1
- package/src/primitives/checkbox/checkbox.tsx +1 -1
- package/src/primitives/code/code.tsx +2 -1
- package/src/primitives/container/container.tsx +2 -2
- package/src/primitives/container/styles.ts +1 -1
- package/src/primitives/flex/flex.tsx +2 -2
- package/src/primitives/grid/grid.tsx +1 -1
- package/src/primitives/heading/heading.tsx +1 -1
- package/src/primitives/heading/styles.ts +4 -2
- package/src/primitives/helpers.ts +2 -2
- package/src/primitives/inline/inline.tsx +2 -2
- package/src/primitives/kbd/kbd.tsx +1 -1
- package/src/primitives/label/label.tsx +1 -1
- package/src/primitives/label/styles.ts +1 -1
- package/src/primitives/popover/__workshop__/RecursiveStory.tsx +1 -1
- package/src/primitives/popover/__workshop__/TestStory.tsx +1 -1
- package/src/primitives/popover/helpers.ts +1 -1
- package/src/primitives/popover/popover.tsx +11 -11
- package/src/primitives/popover/popoverArrow.tsx +1 -1
- package/src/primitives/popover/popoverCard.tsx +4 -4
- package/src/primitives/radio/radio.tsx +1 -1
- package/src/primitives/select/select.tsx +1 -1
- package/src/primitives/select/styles.ts +2 -2
- package/src/primitives/spinner/spinner.tsx +1 -1
- package/src/primitives/stack/stack.tsx +1 -1
- package/src/primitives/stack/styles.ts +1 -1
- package/src/primitives/switch/__workshop__/props.tsx +1 -1
- package/src/primitives/switch/styles.ts +1 -1
- package/src/primitives/switch/switch.tsx +1 -1
- package/src/primitives/text/__workshop__/colored.tsx +9 -8
- package/src/primitives/text/styles.ts +4 -2
- package/src/primitives/text/text.tsx +2 -2
- package/src/primitives/textArea/textArea.tsx +3 -3
- package/src/primitives/textInput/__workshop__/plain.tsx +2 -2
- package/src/primitives/textInput/textInput.tsx +11 -11
- package/src/primitives/tooltip/tooltip.tsx +8 -7
- package/src/primitives/tooltip/tooltipArrow.tsx +1 -1
- package/src/styles/border/borderStyle.ts +5 -5
- package/src/styles/colorVars/colorVarsStyle.ts +1 -1
- package/src/styles/flex/flexItemStyle.ts +1 -1
- package/src/styles/flex/flexStyle.ts +3 -3
- package/src/styles/font/responsiveFont.ts +1 -1
- package/src/styles/font/textAlignStyle.ts +1 -1
- package/src/styles/helpers.ts +3 -3
- package/src/styles/input/responsiveInputPaddingStyle.ts +4 -4
- package/src/styles/input/textInputStyle.ts +2 -2
- package/src/styles/margin/marginStyle.ts +1 -1
- package/src/styles/padding/paddingStyle.ts +1 -1
- package/src/theme/__workshop__/color.tsx +1 -0
- package/src/theme/lib/theme/color/button/createButtonModes.ts +1 -1
- package/src/theme/lib/theme/color/button/createButtonTones.ts +1 -1
- package/src/theme/lib/theme/color/card/createCardStates.ts +1 -1
- package/src/theme/lib/theme/color/factory.ts +2 -2
- package/src/theme/lib/theme/color/input/createInputModes.ts +1 -1
- package/src/theme/lib/theme/color/muted/createMuted.ts +1 -1
- package/src/theme/lib/theme/color/selectable/createSelectableTones.ts +2 -2
- package/src/theme/lib/theme/color/solid/createSolidTones.ts +1 -1
- package/src/theme/lib/theme/color/spot/createSpot.ts +1 -1
- package/src/theme/lib/theme/shadow.ts +1 -1
- package/src/theme/lib/theme/theme.ts +1 -1
- package/src/theme/theme.test.tsx +2 -1
- package/src/theme/themeProvider.tsx +1 -1
- package/src/theme/useRootTheme.ts +1 -0
- package/src/utils/boundaryElement/boundaryElement.test.tsx +2 -1
- package/src/utils/elementQuery/elementQuery.tsx +2 -2
- package/src/utils/layer/layer.test.tsx +2 -1
- package/src/utils/layer/layer.tsx +3 -3
- package/src/utils/layer/layerProvider.tsx +2 -2
- package/src/utils/portal/portal.test.tsx +2 -1
- package/src/utils/srOnly/srOnly.tsx +1 -1
- package/src/utils/virtualList/__workshop__/changingProps.tsx +1 -1
- package/src/utils/virtualList/virtualList.tsx +2 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71, _templateObject72, _templateObject73, _templateObject74, _templateObject75, _templateObject76, _templateObject77, _templateObject78, _templateObject79, _templateObject80, _templateObject81, _templateObject82, _templateObject83, _templateObject84, _templateObject85, _templateObject86, _templateObject87, _templateObject88;
|
|
4
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
5
3
|
Object.defineProperty(exports, '__esModule', {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
@@ -983,7 +981,7 @@ function isHex(str) {
|
|
|
983
981
|
function parseHsl(str) {
|
|
984
982
|
const res = HSL_RE.exec(str);
|
|
985
983
|
if (!res) {
|
|
986
|
-
throw new Error(
|
|
984
|
+
throw new Error('parseHsl: string is not a HSL color: "'.concat(str, '"'));
|
|
987
985
|
}
|
|
988
986
|
return {
|
|
989
987
|
h: parseInt(res[1]),
|
|
@@ -1006,7 +1004,7 @@ function parseColor(color) {
|
|
|
1006
1004
|
if (color.startsWith("hsl(")) {
|
|
1007
1005
|
return hslToRgb(parseHsl(color));
|
|
1008
1006
|
}
|
|
1009
|
-
throw new Error(
|
|
1007
|
+
throw new Error('parseColor: unexpected color format: "'.concat(color, '"'));
|
|
1010
1008
|
}
|
|
1011
1009
|
function rgba(color, a) {
|
|
1012
1010
|
const rgb = parseColor(color);
|
|
@@ -3797,7 +3795,13 @@ function responsiveInputPaddingIconRightStyle(props) {
|
|
|
3797
3795
|
$iconRight: true
|
|
3798
3796
|
});
|
|
3799
3797
|
}
|
|
3800
|
-
|
|
3798
|
+
var __freeze$B = Object.freeze;
|
|
3799
|
+
var __defProp$C = Object.defineProperty;
|
|
3800
|
+
var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
|
|
3801
|
+
value: __freeze$B(raw || cooked.slice())
|
|
3802
|
+
}));
|
|
3803
|
+
var _a$B, _b$m, _c$d;
|
|
3804
|
+
const ROOT_STYLE = styled.css(_a$B || (_a$B = __template$B(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
|
|
3801
3805
|
function textInputRootStyle() {
|
|
3802
3806
|
return ROOT_STYLE;
|
|
3803
3807
|
}
|
|
@@ -3810,7 +3814,7 @@ function textInputBaseStyle(props) {
|
|
|
3810
3814
|
} = props;
|
|
3811
3815
|
const font = theme.sanity.fonts.text;
|
|
3812
3816
|
const color = theme.sanity.color.input;
|
|
3813
|
-
return styled.css(
|
|
3817
|
+
return styled.css(_b$m || (_b$m = __template$B(["\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.family, $weight && font.weights[$weight] || font.weights.regular, $scheme, $tone, color.default.enabled.fg, color.default.enabled.placeholder, color.default.enabled.fg, color.default.enabled.placeholder, color.default.disabled.fg, color.default.disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color.default.readOnly.fg, color.default.readOnly.placeholder);
|
|
3814
3818
|
}
|
|
3815
3819
|
function textInputFontSizeStyle(props) {
|
|
3816
3820
|
const {
|
|
@@ -3841,7 +3845,7 @@ function textInputRepresentationStyle(props) {
|
|
|
3841
3845
|
input
|
|
3842
3846
|
} = theme.sanity;
|
|
3843
3847
|
const color = theme.sanity.color.input;
|
|
3844
|
-
return styled.css(
|
|
3848
|
+
return styled.css(_c$d || (_c$d = __template$B(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
|
|
3845
3849
|
color: color.default.enabled.border,
|
|
3846
3850
|
width: input.border.width
|
|
3847
3851
|
}), color.invalid.enabled.bg, color.invalid.enabled.fg, focusRingBorderStyle({
|
|
@@ -3910,6 +3914,12 @@ function responsiveShadowStyle(props) {
|
|
|
3910
3914
|
} = theme.sanity;
|
|
3911
3915
|
return _responsive(media, props.$shadow, shadow => shadowStyle(shadows[shadow]));
|
|
3912
3916
|
}
|
|
3917
|
+
var __freeze$A = Object.freeze;
|
|
3918
|
+
var __defProp$B = Object.defineProperty;
|
|
3919
|
+
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
3920
|
+
value: __freeze$A(raw || cooked.slice())
|
|
3921
|
+
}));
|
|
3922
|
+
var _a$A, _b$l, _c$c;
|
|
3913
3923
|
function textBaseStyle(props) {
|
|
3914
3924
|
const {
|
|
3915
3925
|
$accent,
|
|
@@ -3919,10 +3929,16 @@ function textBaseStyle(props) {
|
|
|
3919
3929
|
const {
|
|
3920
3930
|
weights
|
|
3921
3931
|
} = theme.sanity.fonts.text;
|
|
3922
|
-
return styled.css(
|
|
3932
|
+
return styled.css(_c$c || (_c$c = __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 }\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 "]))), theme.sanity.fonts.code.family, weights.bold);
|
|
3923
3933
|
}
|
|
3934
|
+
var __freeze$z = Object.freeze;
|
|
3935
|
+
var __defProp$A = Object.defineProperty;
|
|
3936
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
3937
|
+
value: __freeze$z(raw || cooked.slice())
|
|
3938
|
+
}));
|
|
3939
|
+
var _a$z;
|
|
3924
3940
|
const Root$E = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
3925
|
-
const SpanWithTextOverflow$2 = styled__default.default.span(
|
|
3941
|
+
const SpanWithTextOverflow$2 = 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"])));
|
|
3926
3942
|
const Text = react.forwardRef(function Text2(props, ref) {
|
|
3927
3943
|
const {
|
|
3928
3944
|
accent = false,
|
|
@@ -4215,6 +4231,12 @@ const Avatar = react.forwardRef(function Avatar2(props, ref) {
|
|
|
4215
4231
|
})]
|
|
4216
4232
|
});
|
|
4217
4233
|
});
|
|
4234
|
+
var __freeze$y = Object.freeze;
|
|
4235
|
+
var __defProp$z = Object.defineProperty;
|
|
4236
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
4237
|
+
value: __freeze$y(raw || cooked.slice())
|
|
4238
|
+
}));
|
|
4239
|
+
var _a$y;
|
|
4218
4240
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
4219
4241
|
const {
|
|
4220
4242
|
theme
|
|
@@ -4237,7 +4259,7 @@ function _avatarCounterBaseStyle(props) {
|
|
|
4237
4259
|
const {
|
|
4238
4260
|
theme
|
|
4239
4261
|
} = props;
|
|
4240
|
-
return styled.css(
|
|
4262
|
+
return styled.css(_a$y || (_a$y = __template$y(["\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 1.5px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(theme.sanity.space[2]));
|
|
4241
4263
|
}
|
|
4242
4264
|
const Root$C = styled__default.default.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
4243
4265
|
const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
|
|
@@ -4264,7 +4286,13 @@ function childrenToElementArray(children) {
|
|
|
4264
4286
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
4265
4287
|
return childrenArray.filter(node => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node === "string");
|
|
4266
4288
|
}
|
|
4267
|
-
|
|
4289
|
+
var __freeze$x = Object.freeze;
|
|
4290
|
+
var __defProp$y = Object.defineProperty;
|
|
4291
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
4292
|
+
value: __freeze$x(raw || cooked.slice())
|
|
4293
|
+
}));
|
|
4294
|
+
var _a$x;
|
|
4295
|
+
const BASE_STYLES = styled.css(_a$x || (_a$x = __template$x(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
|
|
4268
4296
|
function avatarStackStyle() {
|
|
4269
4297
|
return BASE_STYLES;
|
|
4270
4298
|
}
|
|
@@ -4387,6 +4415,12 @@ const Box = react.forwardRef(function Box2(props, ref) {
|
|
|
4387
4415
|
children: props.children
|
|
4388
4416
|
});
|
|
4389
4417
|
});
|
|
4418
|
+
var __freeze$w = Object.freeze;
|
|
4419
|
+
var __defProp$x = Object.defineProperty;
|
|
4420
|
+
var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
|
|
4421
|
+
value: __freeze$w(raw || cooked.slice())
|
|
4422
|
+
}));
|
|
4423
|
+
var _a$w, _b$k, _c$b;
|
|
4390
4424
|
function labelBaseStyle(props) {
|
|
4391
4425
|
const {
|
|
4392
4426
|
$accent,
|
|
@@ -4396,10 +4430,16 @@ function labelBaseStyle(props) {
|
|
|
4396
4430
|
const {
|
|
4397
4431
|
fonts
|
|
4398
4432
|
} = theme.sanity;
|
|
4399
|
-
return styled.css(
|
|
4433
|
+
return styled.css(_c$b || (_c$b = __template$w(["\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$w || (_a$w = __template$w(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$k || (_b$k = __template$w(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
|
|
4400
4434
|
}
|
|
4435
|
+
var __freeze$v = Object.freeze;
|
|
4436
|
+
var __defProp$w = Object.defineProperty;
|
|
4437
|
+
var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
|
|
4438
|
+
value: __freeze$v(raw || cooked.slice())
|
|
4439
|
+
}));
|
|
4440
|
+
var _a$v;
|
|
4401
4441
|
const Root$z = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
4402
|
-
const SpanWithTextOverflow$1 = styled__default.default.span(
|
|
4442
|
+
const SpanWithTextOverflow$1 = styled__default.default.span(_a$v || (_a$v = __template$v(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
4403
4443
|
const Label = react.forwardRef(function Label2(props, ref) {
|
|
4404
4444
|
const {
|
|
4405
4445
|
accent,
|
|
@@ -4499,8 +4539,14 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
|
|
|
4499
4539
|
ref
|
|
4500
4540
|
});
|
|
4501
4541
|
});
|
|
4502
|
-
|
|
4503
|
-
|
|
4542
|
+
var __freeze$u = Object.freeze;
|
|
4543
|
+
var __defProp$v = Object.defineProperty;
|
|
4544
|
+
var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
|
|
4545
|
+
value: __freeze$u(raw || cooked.slice())
|
|
4546
|
+
}));
|
|
4547
|
+
var _a$u, _b$j;
|
|
4548
|
+
const rotate$1 = styled.keyframes(_a$u || (_a$u = __template$u(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
4549
|
+
const Root$w = styled__default.default(Text)(_b$j || (_b$j = __template$u(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
|
|
4504
4550
|
const Spinner = react.forwardRef(function Spinner2(props, ref) {
|
|
4505
4551
|
return /* @__PURE__ */jsxRuntime.jsx(Root$w, {
|
|
4506
4552
|
"data-ui": "Spinner",
|
|
@@ -4538,8 +4584,14 @@ function _colorVarsStyle(base, color) {
|
|
|
4538
4584
|
"--card-hairline-hard-color": color.border
|
|
4539
4585
|
};
|
|
4540
4586
|
}
|
|
4587
|
+
var __freeze$t = Object.freeze;
|
|
4588
|
+
var __defProp$u = Object.defineProperty;
|
|
4589
|
+
var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
|
|
4590
|
+
value: __freeze$t(raw || cooked.slice())
|
|
4591
|
+
}));
|
|
4592
|
+
var _a$t;
|
|
4541
4593
|
function buttonBaseStyles() {
|
|
4542
|
-
return styled.css(
|
|
4594
|
+
return styled.css(_a$t || (_a$t = __template$t(["\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\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 "])));
|
|
4543
4595
|
}
|
|
4544
4596
|
const buttonTheme = {
|
|
4545
4597
|
border: {
|
|
@@ -4547,7 +4599,7 @@ const buttonTheme = {
|
|
|
4547
4599
|
}
|
|
4548
4600
|
};
|
|
4549
4601
|
function buttonColorStyles(props) {
|
|
4550
|
-
var
|
|
4602
|
+
var _a2, _b;
|
|
4551
4603
|
const {
|
|
4552
4604
|
$mode,
|
|
4553
4605
|
theme
|
|
@@ -4585,10 +4637,16 @@ function buttonColorStyles(props) {
|
|
|
4585
4637
|
},
|
|
4586
4638
|
"&[data-selected]": _colorVarsStyle(base, color.pressed)
|
|
4587
4639
|
}
|
|
4588
|
-
}, (_b = (
|
|
4640
|
+
}, (_b = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.button) == null ? void 0 : _b.root].filter(Boolean);
|
|
4589
4641
|
}
|
|
4642
|
+
var __freeze$s = Object.freeze;
|
|
4643
|
+
var __defProp$t = Object.defineProperty;
|
|
4644
|
+
var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
|
|
4645
|
+
value: __freeze$s(raw || cooked.slice())
|
|
4646
|
+
}));
|
|
4647
|
+
var _a$s;
|
|
4590
4648
|
const Root$v = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
|
|
4591
|
-
const LoadingBox = styled__default.default.div(
|
|
4649
|
+
const LoadingBox = styled__default.default.div(_a$s || (_a$s = __template$s(["\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"])));
|
|
4592
4650
|
const Button = react.forwardRef(function Button2(props, ref) {
|
|
4593
4651
|
const {
|
|
4594
4652
|
children,
|
|
@@ -4681,6 +4739,12 @@ const Button = react.forwardRef(function Button2(props, ref) {
|
|
|
4681
4739
|
})]
|
|
4682
4740
|
});
|
|
4683
4741
|
});
|
|
4742
|
+
var __freeze$r = Object.freeze;
|
|
4743
|
+
var __defProp$s = Object.defineProperty;
|
|
4744
|
+
var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
|
|
4745
|
+
value: __freeze$r(raw || cooked.slice())
|
|
4746
|
+
}));
|
|
4747
|
+
var _a$r, _b$i, _c$a;
|
|
4684
4748
|
function cardStyle(props) {
|
|
4685
4749
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
4686
4750
|
}
|
|
@@ -4690,10 +4754,10 @@ function cardBaseStyle(props) {
|
|
|
4690
4754
|
theme
|
|
4691
4755
|
} = props;
|
|
4692
4756
|
const space = theme.sanity.space;
|
|
4693
|
-
return styled.css(
|
|
4757
|
+
return styled.css(_b$i || (_b$i = __template$r(["\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: 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$r || (_a$r = __template$r(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
|
|
4694
4758
|
}
|
|
4695
4759
|
function cardColorStyle(props) {
|
|
4696
|
-
var
|
|
4760
|
+
var _a2, _b2;
|
|
4697
4761
|
const {
|
|
4698
4762
|
$checkered,
|
|
4699
4763
|
$focusRing,
|
|
@@ -4711,7 +4775,7 @@ function cardColorStyle(props) {
|
|
|
4711
4775
|
width: 0,
|
|
4712
4776
|
color: "var(--card-border-color)"
|
|
4713
4777
|
};
|
|
4714
|
-
return styled.css(
|
|
4778
|
+
return styled.css(_c$a || (_c$a = __template$r(["\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 {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(: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 {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n ", "\n "])), dark ? "dark" : "light", _colorVarsStyle(base, card.enabled, $checkered), _colorVarsStyle(base, card.disabled, $checkered), _colorVarsStyle(base, card.pressed, $checkered), _colorVarsStyle(base, card.selected, $checkered), _colorVarsStyle(base, card.hovered, $checkered), _colorVarsStyle(base, card.pressed, $checkered), $focusRing ? focusRingStyle({
|
|
4715
4779
|
base,
|
|
4716
4780
|
border,
|
|
4717
4781
|
focusRing
|
|
@@ -4719,7 +4783,7 @@ function cardColorStyle(props) {
|
|
|
4719
4783
|
base,
|
|
4720
4784
|
border,
|
|
4721
4785
|
focusRing
|
|
4722
|
-
}) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (
|
|
4786
|
+
}) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
|
|
4723
4787
|
}
|
|
4724
4788
|
const Root$u = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
4725
4789
|
const Card = react.forwardRef(function Card2(props, ref) {
|
|
@@ -4771,8 +4835,14 @@ const Card = react.forwardRef(function Card2(props, ref) {
|
|
|
4771
4835
|
})
|
|
4772
4836
|
});
|
|
4773
4837
|
});
|
|
4838
|
+
var __freeze$q = Object.freeze;
|
|
4839
|
+
var __defProp$r = Object.defineProperty;
|
|
4840
|
+
var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
|
|
4841
|
+
value: __freeze$q(raw || cooked.slice())
|
|
4842
|
+
}));
|
|
4843
|
+
var _a$q, _b$h;
|
|
4774
4844
|
function checkboxBaseStyles() {
|
|
4775
|
-
return styled.css(
|
|
4845
|
+
return styled.css(_a$q || (_a$q = __template$q(["\n position: relative;\n display: inline-block;\n "])));
|
|
4776
4846
|
}
|
|
4777
4847
|
function inputElementStyles(props) {
|
|
4778
4848
|
const {
|
|
@@ -4784,7 +4854,7 @@ function inputElementStyles(props) {
|
|
|
4784
4854
|
input,
|
|
4785
4855
|
radius
|
|
4786
4856
|
} = theme.sanity;
|
|
4787
|
-
return styled.css(
|
|
4857
|
+
return styled.css(_b$h || (_b$h = __template$q(["\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: 2 !important;\n }\n }\n }\n\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 > svg:first-child {\n opacity: 1;\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:not([data-read-only]):disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
|
|
4788
4858
|
color: color.default.enabled.border,
|
|
4789
4859
|
width: input.border.width
|
|
4790
4860
|
}), rem(radius[2]), color.default.enabled.bg, focusRingStyle({
|
|
@@ -4841,6 +4911,12 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
4841
4911
|
})]
|
|
4842
4912
|
});
|
|
4843
4913
|
});
|
|
4914
|
+
var __freeze$p = Object.freeze;
|
|
4915
|
+
var __defProp$q = Object.defineProperty;
|
|
4916
|
+
var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
|
|
4917
|
+
value: __freeze$p(raw || cooked.slice())
|
|
4918
|
+
}));
|
|
4919
|
+
var _a$p;
|
|
4844
4920
|
function codeSyntaxHighlightingStyle(_ref20) {
|
|
4845
4921
|
let {
|
|
4846
4922
|
theme
|
|
@@ -4958,7 +5034,7 @@ function codeSyntaxHighlightingStyle(_ref20) {
|
|
|
4958
5034
|
};
|
|
4959
5035
|
}
|
|
4960
5036
|
function codeBaseStyle() {
|
|
4961
|
-
return styled.css(
|
|
5037
|
+
return styled.css(_a$p || (_a$p = __template$p(["\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);
|
|
4962
5038
|
}
|
|
4963
5039
|
const Root$s = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle);
|
|
4964
5040
|
const Code = react.forwardRef(function Code2(props, ref) {
|
|
@@ -5052,16 +5128,28 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
|
|
|
5052
5128
|
children
|
|
5053
5129
|
});
|
|
5054
5130
|
});
|
|
5131
|
+
var __freeze$o = Object.freeze;
|
|
5132
|
+
var __defProp$p = Object.defineProperty;
|
|
5133
|
+
var __template$o = (cooked, raw) => __freeze$o(__defProp$p(cooked, "raw", {
|
|
5134
|
+
value: __freeze$o(raw || cooked.slice())
|
|
5135
|
+
}));
|
|
5136
|
+
var _a$o, _b$g, _c$9;
|
|
5055
5137
|
function headingBaseStyle(props) {
|
|
5056
5138
|
const {
|
|
5057
5139
|
$accent,
|
|
5058
5140
|
$muted,
|
|
5059
5141
|
theme
|
|
5060
5142
|
} = props;
|
|
5061
|
-
return styled.css(
|
|
5143
|
+
return styled.css(_c$9 || (_c$9 = __template$o(["\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$o || (_a$o = __template$o(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$g || (_b$g = __template$o(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
|
|
5062
5144
|
}
|
|
5145
|
+
var __freeze$n = Object.freeze;
|
|
5146
|
+
var __defProp$o = Object.defineProperty;
|
|
5147
|
+
var __template$n = (cooked, raw) => __freeze$n(__defProp$o(cooked, "raw", {
|
|
5148
|
+
value: __freeze$n(raw || cooked.slice())
|
|
5149
|
+
}));
|
|
5150
|
+
var _a$n;
|
|
5063
5151
|
const Root$p = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
5064
|
-
const SpanWithTextOverflow = styled__default.default.span(
|
|
5152
|
+
const SpanWithTextOverflow = styled__default.default.span(_a$n || (_a$n = __template$n(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
5065
5153
|
const Heading = react.forwardRef(function Heading2(props, ref) {
|
|
5066
5154
|
const {
|
|
5067
5155
|
accent = false,
|
|
@@ -5139,8 +5227,14 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
|
|
|
5139
5227
|
children
|
|
5140
5228
|
});
|
|
5141
5229
|
});
|
|
5230
|
+
var __freeze$m = Object.freeze;
|
|
5231
|
+
var __defProp$n = Object.defineProperty;
|
|
5232
|
+
var __template$m = (cooked, raw) => __freeze$m(__defProp$n(cooked, "raw", {
|
|
5233
|
+
value: __freeze$m(raw || cooked.slice())
|
|
5234
|
+
}));
|
|
5235
|
+
var _a$m;
|
|
5142
5236
|
function kbdStyle() {
|
|
5143
|
-
return styled.css(
|
|
5237
|
+
return styled.css(_a$m || (_a$m = __template$m(["\n background: var(--card-bg-color);\n font: inherit;\n box-shadow: inset 0 0 0 1px var(--card-hairline-hard-color);\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
5144
5238
|
}
|
|
5145
5239
|
const Root$n = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
|
|
5146
5240
|
const KBD = react.forwardRef(function KBD2(props, ref) {
|
|
@@ -5245,12 +5339,23 @@ const ElementQuery = react.forwardRef(function ElementQuery2(props, ref) {
|
|
|
5245
5339
|
children
|
|
5246
5340
|
});
|
|
5247
5341
|
});
|
|
5342
|
+
var __defProp$m = Object.defineProperty;
|
|
5343
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$m(obj, key, {
|
|
5344
|
+
enumerable: true,
|
|
5345
|
+
configurable: true,
|
|
5346
|
+
writable: true,
|
|
5347
|
+
value
|
|
5348
|
+
}) : obj[key] = value;
|
|
5349
|
+
var __publicField = (obj, key, value) => {
|
|
5350
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5351
|
+
return value;
|
|
5352
|
+
};
|
|
5248
5353
|
class ErrorBoundary extends react.Component {
|
|
5249
5354
|
constructor() {
|
|
5250
5355
|
super(...arguments);
|
|
5251
|
-
this
|
|
5356
|
+
__publicField(this, "state", {
|
|
5252
5357
|
error: null
|
|
5253
|
-
};
|
|
5358
|
+
});
|
|
5254
5359
|
}
|
|
5255
5360
|
static getDerivedStateFromError(error) {
|
|
5256
5361
|
return {
|
|
@@ -5611,7 +5716,13 @@ function PortalProvider(props) {
|
|
|
5611
5716
|
children
|
|
5612
5717
|
});
|
|
5613
5718
|
}
|
|
5614
|
-
|
|
5719
|
+
var __freeze$l = Object.freeze;
|
|
5720
|
+
var __defProp$l = Object.defineProperty;
|
|
5721
|
+
var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
|
|
5722
|
+
value: __freeze$l(raw || cooked.slice())
|
|
5723
|
+
}));
|
|
5724
|
+
var _a$l;
|
|
5725
|
+
const Root$l = styled__default.default.div(_a$l || (_a$l = __template$l(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
5615
5726
|
const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
5616
5727
|
const {
|
|
5617
5728
|
as,
|
|
@@ -5625,8 +5736,14 @@ const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
|
|
|
5625
5736
|
children
|
|
5626
5737
|
});
|
|
5627
5738
|
});
|
|
5628
|
-
|
|
5629
|
-
|
|
5739
|
+
var __freeze$k = Object.freeze;
|
|
5740
|
+
var __defProp$k = Object.defineProperty;
|
|
5741
|
+
var __template$k = (cooked, raw) => __freeze$k(__defProp$k(cooked, "raw", {
|
|
5742
|
+
value: __freeze$k(raw || cooked.slice())
|
|
5743
|
+
}));
|
|
5744
|
+
var _a$k, _b$f;
|
|
5745
|
+
const Root$k = styled__default.default.div(_a$k || (_a$k = __template$k(["\n position: relative;\n"])));
|
|
5746
|
+
const ItemWrapper = styled__default.default.div(_b$f || (_b$f = __template$k(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
|
|
5630
5747
|
const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
|
|
5631
5748
|
const {
|
|
5632
5749
|
as = "div",
|
|
@@ -5835,9 +5952,15 @@ function calcMaxWidth(params) {
|
|
|
5835
5952
|
}
|
|
5836
5953
|
return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
|
|
5837
5954
|
}
|
|
5838
|
-
|
|
5839
|
-
|
|
5840
|
-
|
|
5955
|
+
var __freeze$j = Object.freeze;
|
|
5956
|
+
var __defProp$j = Object.defineProperty;
|
|
5957
|
+
var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
|
|
5958
|
+
value: __freeze$j(raw || cooked.slice())
|
|
5959
|
+
}));
|
|
5960
|
+
var _a$j, _b$e, _c$8;
|
|
5961
|
+
const Root$j = styled__default.default.div(_a$j || (_a$j = __template$j(["\n position: absolute;\n pointer-events: none;\n width: ", "px;\n height: ", "px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: ", "px ", "px;\n }\n\n [data-placement^='top'] > & {\n bottom: -", "px;\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"])), DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH);
|
|
5962
|
+
const BorderPath = styled__default.default.path(_b$e || (_b$e = __template$j(["\n fill: var(--card-shadow-outline-color);\n"])));
|
|
5963
|
+
const ShapePath = styled__default.default.path(_c$8 || (_c$8 = __template$j(["\n fill: var(--card-bg-color);\n"])));
|
|
5841
5964
|
const PopoverArrow = react.forwardRef(function PopoverArrow2(props, ref) {
|
|
5842
5965
|
return /* @__PURE__ */jsxRuntime.jsx(Root$j, {
|
|
5843
5966
|
"data-ui": "Popover__arrow",
|
|
@@ -6167,8 +6290,14 @@ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
|
|
|
6167
6290
|
});
|
|
6168
6291
|
}));
|
|
6169
6292
|
Popover.displayName = "Popover";
|
|
6293
|
+
var __freeze$i = Object.freeze;
|
|
6294
|
+
var __defProp$i = Object.defineProperty;
|
|
6295
|
+
var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
|
|
6296
|
+
value: __freeze$i(raw || cooked.slice())
|
|
6297
|
+
}));
|
|
6298
|
+
var _a$i, _b$d;
|
|
6170
6299
|
function radioBaseStyle() {
|
|
6171
|
-
return styled.css(
|
|
6300
|
+
return styled.css(_a$i || (_a$i = __template$i(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));
|
|
6172
6301
|
}
|
|
6173
6302
|
function inputElementStyle(props) {
|
|
6174
6303
|
const {
|
|
@@ -6180,7 +6309,7 @@ function inputElementStyle(props) {
|
|
|
6180
6309
|
} = theme.sanity;
|
|
6181
6310
|
const color = theme.sanity.color.input;
|
|
6182
6311
|
const dist = (input.radio.size - input.radio.markSize) / 2;
|
|
6183
|
-
return styled.css(
|
|
6312
|
+
return styled.css(_b$d || (_b$d = __template$i(["\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 /* 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.default.enabled.bg, focusRingBorderStyle({
|
|
6184
6313
|
color: color.default.enabled.border,
|
|
6185
6314
|
width: input.border.width
|
|
6186
6315
|
}), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.default.enabled.fg, focusRingStyle({
|
|
@@ -6221,15 +6350,21 @@ const Radio = react.forwardRef(function Radio2(props, forwardedRef) {
|
|
|
6221
6350
|
}), /* @__PURE__ */jsxRuntime.jsx("span", {})]
|
|
6222
6351
|
});
|
|
6223
6352
|
});
|
|
6353
|
+
var __freeze$h = Object.freeze;
|
|
6354
|
+
var __defProp$h = Object.defineProperty;
|
|
6355
|
+
var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
|
|
6356
|
+
value: __freeze$h(raw || cooked.slice())
|
|
6357
|
+
}));
|
|
6358
|
+
var _a$h, _b$c, _c$7, _d$5;
|
|
6224
6359
|
function rootStyle() {
|
|
6225
|
-
return styled.css(
|
|
6360
|
+
return styled.css(_a$h || (_a$h = __template$h(["\n position: relative;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
6226
6361
|
}
|
|
6227
6362
|
function inputBaseStyle(props) {
|
|
6228
6363
|
const {
|
|
6229
6364
|
theme
|
|
6230
6365
|
} = props;
|
|
6231
6366
|
const font = theme.sanity.fonts.text;
|
|
6232
|
-
return styled.css(
|
|
6367
|
+
return styled.css(_b$c || (_b$c = __template$h(["\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.family);
|
|
6233
6368
|
}
|
|
6234
6369
|
function inputColorStyle(props) {
|
|
6235
6370
|
const {
|
|
@@ -6240,7 +6375,7 @@ function inputColorStyle(props) {
|
|
|
6240
6375
|
input
|
|
6241
6376
|
} = theme.sanity;
|
|
6242
6377
|
const color = theme.sanity.color.input;
|
|
6243
|
-
return styled.css(
|
|
6378
|
+
return styled.css(_c$7 || (_c$7 = __template$h(["\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.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
|
|
6244
6379
|
color: color.default.enabled.border,
|
|
6245
6380
|
width: input.border.width
|
|
6246
6381
|
}), color.default.hovered.bg, color.default.hovered.fg, focusRingBorderStyle({
|
|
@@ -6284,7 +6419,7 @@ function iconBoxStyle(props) {
|
|
|
6284
6419
|
theme
|
|
6285
6420
|
} = props;
|
|
6286
6421
|
const color = theme.sanity.color.input;
|
|
6287
|
-
return styled.css(
|
|
6422
|
+
return styled.css(_d$5 || (_d$5 = __template$h(["\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.default.enabled.fg, color.default.hovered.fg, color.default.disabled.fg, color.default.readOnly.fg);
|
|
6288
6423
|
}
|
|
6289
6424
|
const selectStyle = {
|
|
6290
6425
|
root: rootStyle,
|
|
@@ -6371,11 +6506,17 @@ const Stack = react.forwardRef(function Stack2(props, ref) {
|
|
|
6371
6506
|
ref
|
|
6372
6507
|
});
|
|
6373
6508
|
});
|
|
6509
|
+
var __freeze$g = Object.freeze;
|
|
6510
|
+
var __defProp$g = Object.defineProperty;
|
|
6511
|
+
var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
|
|
6512
|
+
value: __freeze$g(raw || cooked.slice())
|
|
6513
|
+
}));
|
|
6514
|
+
var _a$g, _b$b, _c$6, _d$4, _e$2, _f$2, _g;
|
|
6374
6515
|
function switchBaseStyles() {
|
|
6375
|
-
return styled.css(
|
|
6516
|
+
return styled.css(_a$g || (_a$g = __template$g(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
6376
6517
|
}
|
|
6377
6518
|
function switchInputStyles() {
|
|
6378
|
-
return styled.css(
|
|
6519
|
+
return styled.css(_b$b || (_b$b = __template$g(["\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 "])));
|
|
6379
6520
|
}
|
|
6380
6521
|
function switchRepresentationStyles(props) {
|
|
6381
6522
|
const {
|
|
@@ -6386,7 +6527,7 @@ function switchRepresentationStyles(props) {
|
|
|
6386
6527
|
input
|
|
6387
6528
|
} = theme.sanity;
|
|
6388
6529
|
const color = theme.sanity.color.button.default;
|
|
6389
|
-
return styled.css(
|
|
6530
|
+
return styled.css(_c$6 || (_c$6 = __template$g(["\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 "])), color.default.enabled.bg, color.default.enabled.fg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
|
|
6390
6531
|
focusRing
|
|
6391
6532
|
}), color.positive.enabled.bg, color.positive.enabled.fg, color.default.hovered.bg, color.default.hovered.fg, color.positive.hovered.bg, color.positive.hovered.fg, color.default.disabled.bg, color.default.disabled.fg);
|
|
6392
6533
|
}
|
|
@@ -6397,7 +6538,7 @@ function switchTrackStyles(props) {
|
|
|
6397
6538
|
const {
|
|
6398
6539
|
input
|
|
6399
6540
|
} = theme.sanity;
|
|
6400
|
-
return styled.css(
|
|
6541
|
+
return styled.css(_d$4 || (_d$4 = __template$g(["\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));
|
|
6401
6542
|
}
|
|
6402
6543
|
function switchThumbStyles(props) {
|
|
6403
6544
|
const {
|
|
@@ -6414,7 +6555,7 @@ function switchThumbStyles(props) {
|
|
|
6414
6555
|
const checkedOffset = trackWidth - trackPadding * 2 - size;
|
|
6415
6556
|
const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
|
|
6416
6557
|
const checked = $indeterminate !== true && props.$checked === true;
|
|
6417
|
-
return styled.css(
|
|
6558
|
+
return styled.css(_g || (_g = __template$g(["\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\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$g(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && styled.css(_f$2 || (_f$2 = __template$g(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
|
|
6418
6559
|
}
|
|
6419
6560
|
const Root$e = styled__default.default.span(switchBaseStyles);
|
|
6420
6561
|
const Input$2 = styled__default.default.input(switchInputStyles);
|
|
@@ -6458,8 +6599,14 @@ const Switch = react.forwardRef(function Switch2(props, forwardedRef) {
|
|
|
6458
6599
|
})]
|
|
6459
6600
|
});
|
|
6460
6601
|
});
|
|
6602
|
+
var __freeze$f = Object.freeze;
|
|
6603
|
+
var __defProp$f = Object.defineProperty;
|
|
6604
|
+
var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
|
|
6605
|
+
value: __freeze$f(raw || cooked.slice())
|
|
6606
|
+
}));
|
|
6607
|
+
var _a$f;
|
|
6461
6608
|
const Root$d = styled__default.default.span(textInputRootStyle);
|
|
6462
|
-
const InputRoot$1 = styled__default.default.span(
|
|
6609
|
+
const InputRoot$1 = styled__default.default.span(_a$f || (_a$f = __template$f(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
6463
6610
|
const Input$1 = styled__default.default.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
6464
6611
|
const Presentation$1 = styled__default.default.div(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
6465
6612
|
const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
@@ -6503,24 +6650,30 @@ const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
6503
6650
|
})
|
|
6504
6651
|
});
|
|
6505
6652
|
});
|
|
6653
|
+
var __freeze$e = Object.freeze;
|
|
6654
|
+
var __defProp$e = Object.defineProperty;
|
|
6655
|
+
var __template$e = (cooked, raw) => __freeze$e(__defProp$e(cooked, "raw", {
|
|
6656
|
+
value: __freeze$e(raw || cooked.slice())
|
|
6657
|
+
}));
|
|
6658
|
+
var _a$e, _b$a, _c$5, _d$3, _e$1, _f$1;
|
|
6506
6659
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
6507
6660
|
zIndex: 2
|
|
6508
6661
|
};
|
|
6509
6662
|
const Root$c = styled__default.default(Card).attrs({
|
|
6510
6663
|
forwardedAs: "span"
|
|
6511
6664
|
})(textInputRootStyle);
|
|
6512
|
-
const InputRoot = styled__default.default.span(
|
|
6665
|
+
const InputRoot = styled__default.default.span(_a$e || (_a$e = __template$e(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
6513
6666
|
const Prefix = styled__default.default(Card).attrs({
|
|
6514
6667
|
forwardedAs: "span"
|
|
6515
|
-
})(
|
|
6668
|
+
})(_b$a || (_b$a = __template$e(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
|
|
6516
6669
|
const Suffix = styled__default.default(Card).attrs({
|
|
6517
6670
|
forwardedAs: "span"
|
|
6518
|
-
})(
|
|
6671
|
+
})(_c$5 || (_c$5 = __template$e(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
|
|
6519
6672
|
const Input = styled__default.default.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
6520
6673
|
const Presentation = styled__default.default.span(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
6521
|
-
const LeftBox = styled__default.default(Box)(
|
|
6522
|
-
const RightBox = styled__default.default(Box)(
|
|
6523
|
-
const RightCard = styled__default.default(Card)(
|
|
6674
|
+
const LeftBox = styled__default.default(Box)(_d$3 || (_d$3 = __template$e(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
|
|
6675
|
+
const RightBox = styled__default.default(Box)(_e$1 || (_e$1 = __template$e(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
6676
|
+
const RightCard = styled__default.default(Card)(_f$1 || (_f$1 = __template$e(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
6524
6677
|
const TextInput = react.forwardRef(function TextInput2(props, forwardedRef) {
|
|
6525
6678
|
const {
|
|
6526
6679
|
border = true,
|
|
@@ -6558,11 +6711,11 @@ const TextInput = react.forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
6558
6711
|
event.stopPropagation();
|
|
6559
6712
|
}, []);
|
|
6560
6713
|
const handleClearClick = react.useCallback(event => {
|
|
6561
|
-
var
|
|
6714
|
+
var _a2;
|
|
6562
6715
|
event.preventDefault();
|
|
6563
6716
|
event.stopPropagation();
|
|
6564
6717
|
if (onClear) onClear();
|
|
6565
|
-
(
|
|
6718
|
+
(_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
6566
6719
|
}, [onClear, ref]);
|
|
6567
6720
|
const prefixNode = react.useMemo(() => prefix && /* @__PURE__ */jsxRuntime.jsx(Prefix, {
|
|
6568
6721
|
borderTop: true,
|
|
@@ -6665,9 +6818,15 @@ const TextInput = react.forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
6665
6818
|
}), suffixNode]
|
|
6666
6819
|
});
|
|
6667
6820
|
});
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6821
|
+
var __freeze$d = Object.freeze;
|
|
6822
|
+
var __defProp$d = Object.defineProperty;
|
|
6823
|
+
var __template$d = (cooked, raw) => __freeze$d(__defProp$d(cooked, "raw", {
|
|
6824
|
+
value: __freeze$d(raw || cooked.slice())
|
|
6825
|
+
}));
|
|
6826
|
+
var _a$d, _b$9, _c$4;
|
|
6827
|
+
const Root$b = styled__default.default.div(_a$d || (_a$d = __template$d(["\n position: absolute;\n pointer-events: none;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: 7.5px 7.5px;\n }\n\n /* position: absolute;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n &:not([hidden]) {\n display: block;\n }\n transform-origin: 7.5px 7.5px;\n } */\n\n [data-placement^='top'] > & {\n bottom: -27px;\n }\n\n [data-placement^='right'] > & {\n left: -27px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -27px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -27px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])));
|
|
6828
|
+
const Border = styled__default.default.path(_b$9 || (_b$9 = __template$d(["\n fill: var(--card-shadow-outline-color);\n"])));
|
|
6829
|
+
const Shape = styled__default.default.path(_c$4 || (_c$4 = __template$d(["\n fill: var(--card-bg-color);\n"])));
|
|
6671
6830
|
const TooltipArrow = react.forwardRef(function TooltipArrow2(props, ref) {
|
|
6672
6831
|
const {
|
|
6673
6832
|
...restProps
|
|
@@ -6688,9 +6847,15 @@ const TooltipArrow = react.forwardRef(function TooltipArrow2(props, ref) {
|
|
|
6688
6847
|
})
|
|
6689
6848
|
});
|
|
6690
6849
|
});
|
|
6691
|
-
|
|
6850
|
+
var __freeze$c = Object.freeze;
|
|
6851
|
+
var __defProp$c = Object.defineProperty;
|
|
6852
|
+
var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
|
|
6853
|
+
value: __freeze$c(raw || cooked.slice())
|
|
6854
|
+
}));
|
|
6855
|
+
var _a$c;
|
|
6856
|
+
const Root$a = styled__default.default(Layer)(_a$c || (_a$c = __template$c(["\n pointer-events: none;\n"])));
|
|
6692
6857
|
const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
6693
|
-
var
|
|
6858
|
+
var _a2, _b, _c;
|
|
6694
6859
|
const boundaryElementContext = useBoundaryElement();
|
|
6695
6860
|
const theme = useTheme();
|
|
6696
6861
|
const {
|
|
@@ -6704,7 +6869,7 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
6704
6869
|
portal,
|
|
6705
6870
|
scheme,
|
|
6706
6871
|
shadow = 2,
|
|
6707
|
-
zOffset = (
|
|
6872
|
+
zOffset = (_a2 = theme.sanity.layer) == null ? void 0 : _a2.tooltip.zOffset,
|
|
6708
6873
|
...restProps
|
|
6709
6874
|
} = props;
|
|
6710
6875
|
const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
|
|
@@ -6849,10 +7014,16 @@ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
|
|
|
6849
7014
|
})]
|
|
6850
7015
|
});
|
|
6851
7016
|
});
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
7017
|
+
var __freeze$b = Object.freeze;
|
|
7018
|
+
var __defProp$b = Object.defineProperty;
|
|
7019
|
+
var __template$b = (cooked, raw) => __freeze$b(__defProp$b(cooked, "raw", {
|
|
7020
|
+
value: __freeze$b(raw || cooked.slice())
|
|
7021
|
+
}));
|
|
7022
|
+
var _a$b, _b$8, _c$3, _d$2;
|
|
7023
|
+
const Root$9 = styled__default.default.div(_a$b || (_a$b = __template$b(["\n line-height: 0;\n"])));
|
|
7024
|
+
const ListBox = styled__default.default(Box)(_b$8 || (_b$8 = __template$b(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
|
|
7025
|
+
const rotate = styled.keyframes(_c$3 || (_c$3 = __template$b(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
7026
|
+
const AnimatedSpinnerIcon = styled__default.default(icons.SpinnerIcon)(_d$2 || (_d$2 = __template$b(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
|
|
6856
7027
|
function AutocompleteOption(props) {
|
|
6857
7028
|
const {
|
|
6858
7029
|
children,
|
|
@@ -7376,8 +7547,14 @@ const InnerAutocomplete = react.forwardRef(function InnerAutocomplete2(props, re
|
|
|
7376
7547
|
});
|
|
7377
7548
|
});
|
|
7378
7549
|
const Autocomplete = InnerAutocomplete;
|
|
7379
|
-
|
|
7380
|
-
|
|
7550
|
+
var __freeze$a = Object.freeze;
|
|
7551
|
+
var __defProp$a = Object.defineProperty;
|
|
7552
|
+
var __template$a = (cooked, raw) => __freeze$a(__defProp$a(cooked, "raw", {
|
|
7553
|
+
value: __freeze$a(raw || cooked.slice())
|
|
7554
|
+
}));
|
|
7555
|
+
var _a$a, _b$7;
|
|
7556
|
+
const Root$8 = styled__default.default.ol(_a$a || (_a$a = __template$a(["\n margin: 0;\n padding: 0;\n display: flex;\n list-style: none;\n align-items: center;\n white-space: nowrap;\n line-height: 0;\n"])));
|
|
7557
|
+
const ExpandButton = styled__default.default(Button)(_b$7 || (_b$7 = __template$a(["\n appearance: none;\n margin: -4px;\n"])));
|
|
7381
7558
|
const Breadcrumbs = react.forwardRef(function Breadcrumbs2(props, ref) {
|
|
7382
7559
|
const {
|
|
7383
7560
|
children,
|
|
@@ -7487,19 +7664,25 @@ const DialogContext = globalScope[key$3];
|
|
|
7487
7664
|
function useDialog() {
|
|
7488
7665
|
return react.useContext(DialogContext);
|
|
7489
7666
|
}
|
|
7667
|
+
var __freeze$9 = Object.freeze;
|
|
7668
|
+
var __defProp$9 = Object.defineProperty;
|
|
7669
|
+
var __template$9 = (cooked, raw) => __freeze$9(__defProp$9(cooked, "raw", {
|
|
7670
|
+
value: __freeze$9(raw || cooked.slice())
|
|
7671
|
+
}));
|
|
7672
|
+
var _a$9, _b$6, _c$2, _d$1, _e, _f;
|
|
7490
7673
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
7491
7674
|
if (!boundaryElement || !portalElement) return true;
|
|
7492
7675
|
return containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
7493
7676
|
}
|
|
7494
7677
|
const Root$7 = styled__default.default(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
|
|
7495
|
-
const DialogContainer = styled__default.default(Container)(
|
|
7496
|
-
const DialogCardRoot = styled__default.default(Card)(
|
|
7497
|
-
const DialogLayout = styled__default.default(Flex)(
|
|
7498
|
-
const DialogHeader = styled__default.default(Card)(
|
|
7499
|
-
const DialogContent = styled__default.default(Box)(
|
|
7500
|
-
const DialogFooter = styled__default.default(Box)(
|
|
7678
|
+
const DialogContainer = styled__default.default(Container)(_a$9 || (_a$9 = __template$9(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
|
|
7679
|
+
const DialogCardRoot = styled__default.default(Card)(_b$6 || (_b$6 = __template$9(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n min-height: 0;\n max-height: 100%;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
7680
|
+
const DialogLayout = styled__default.default(Flex)(_c$2 || (_c$2 = __template$9(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
|
|
7681
|
+
const DialogHeader = styled__default.default(Card)(_d$1 || (_d$1 = __template$9(["\n position: relative;\n z-index: 2;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n bottom: -1px;\n border-bottom: 1px solid var(--card-hairline-soft-color);\n }\n"])));
|
|
7682
|
+
const DialogContent = styled__default.default(Box)(_e || (_e = __template$9(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
|
|
7683
|
+
const DialogFooter = styled__default.default(Box)(_f || (_f = __template$9(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
|
|
7501
7684
|
const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
|
|
7502
|
-
var
|
|
7685
|
+
var _a2;
|
|
7503
7686
|
const {
|
|
7504
7687
|
__unstable_autoFocus: autoFocus,
|
|
7505
7688
|
__unstable_hideCloseButton: hideCloseButton,
|
|
@@ -7517,7 +7700,7 @@ const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
|
|
|
7517
7700
|
width: widthProp
|
|
7518
7701
|
} = props;
|
|
7519
7702
|
const portal = usePortal();
|
|
7520
|
-
const portalElement = portalProp ? ((
|
|
7703
|
+
const portalElement = portalProp ? ((_a2 = portal.elements) == null ? void 0 : _a2[portalProp]) || null : portal.element;
|
|
7521
7704
|
const boundaryElement = useBoundaryElement().element;
|
|
7522
7705
|
const radius = useArrayProp(radiusProp);
|
|
7523
7706
|
const shadow = useArrayProp(shadowProp);
|
|
@@ -7611,7 +7794,7 @@ const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
|
|
|
7611
7794
|
});
|
|
7612
7795
|
});
|
|
7613
7796
|
const Dialog = react.forwardRef(function Dialog2(props, ref) {
|
|
7614
|
-
var
|
|
7797
|
+
var _a2, _b2;
|
|
7615
7798
|
const dialog = useDialog();
|
|
7616
7799
|
const theme = useTheme();
|
|
7617
7800
|
const {
|
|
@@ -7633,11 +7816,11 @@ const Dialog = react.forwardRef(function Dialog2(props, ref) {
|
|
|
7633
7816
|
position: positionProp = dialog.position || "fixed",
|
|
7634
7817
|
scheme,
|
|
7635
7818
|
width: widthProp = 0,
|
|
7636
|
-
zOffset: zOffsetProp = dialog.zOffset || ((
|
|
7819
|
+
zOffset: zOffsetProp = dialog.zOffset || ((_a2 = theme.sanity.layer) == null ? void 0 : _a2.dialog.zOffset),
|
|
7637
7820
|
...restProps
|
|
7638
7821
|
} = props;
|
|
7639
7822
|
const portal = usePortal();
|
|
7640
|
-
const portalElement = portalProp ? ((
|
|
7823
|
+
const portalElement = portalProp ? ((_b2 = portal.elements) == null ? void 0 : _b2[portalProp]) || null : portal.element;
|
|
7641
7824
|
const boundaryElement = useBoundaryElement().element;
|
|
7642
7825
|
const cardRadius = useArrayProp(cardRadiusProp);
|
|
7643
7826
|
const padding = useArrayProp(paddingProp);
|
|
@@ -7741,8 +7924,14 @@ function DialogProvider(props) {
|
|
|
7741
7924
|
children
|
|
7742
7925
|
});
|
|
7743
7926
|
}
|
|
7744
|
-
|
|
7745
|
-
|
|
7927
|
+
var __freeze$8 = Object.freeze;
|
|
7928
|
+
var __defProp$8 = Object.defineProperty;
|
|
7929
|
+
var __template$8 = (cooked, raw) => __freeze$8(__defProp$8(cooked, "raw", {
|
|
7930
|
+
value: __freeze$8(raw || cooked.slice())
|
|
7931
|
+
}));
|
|
7932
|
+
var _a$8, _b$5;
|
|
7933
|
+
const Root$6 = styled__default.default.kbd(_a$8 || (_a$8 = __template$8(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
|
|
7934
|
+
const Key = styled__default.default(KBD)(_b$5 || (_b$5 = __template$8(["\n &:not([hidden]) {\n display: block;\n }\n"])));
|
|
7746
7935
|
const Hotkeys = react.forwardRef(function Hotkeys2(props, ref) {
|
|
7747
7936
|
const {
|
|
7748
7937
|
fontSize,
|
|
@@ -7963,7 +8152,13 @@ function useMenuController(props) {
|
|
|
7963
8152
|
setRootElement
|
|
7964
8153
|
};
|
|
7965
8154
|
}
|
|
7966
|
-
|
|
8155
|
+
var __freeze$7 = Object.freeze;
|
|
8156
|
+
var __defProp$7 = Object.defineProperty;
|
|
8157
|
+
var __template$7 = (cooked, raw) => __freeze$7(__defProp$7(cooked, "raw", {
|
|
8158
|
+
value: __freeze$7(raw || cooked.slice())
|
|
8159
|
+
}));
|
|
8160
|
+
var _a$7;
|
|
8161
|
+
const Root$5 = styled__default.default(Box)(_a$7 || (_a$7 = __template$7(["\n outline: none;\n overflow: auto;\n"])));
|
|
7967
8162
|
const Menu = react.forwardRef(function Menu2(props, ref) {
|
|
7968
8163
|
const {
|
|
7969
8164
|
children,
|
|
@@ -8196,12 +8391,24 @@ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
|
|
|
8196
8391
|
children: button || /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {})
|
|
8197
8392
|
});
|
|
8198
8393
|
});
|
|
8199
|
-
|
|
8394
|
+
var __freeze$6 = Object.freeze;
|
|
8395
|
+
var __defProp$6 = Object.defineProperty;
|
|
8396
|
+
var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
|
|
8397
|
+
value: __freeze$6(raw || cooked.slice())
|
|
8398
|
+
}));
|
|
8399
|
+
var _a$6;
|
|
8400
|
+
const MenuDivider = styled__default.default.hr(_a$6 || (_a$6 = __template$6(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
|
|
8401
|
+
var __freeze$5 = Object.freeze;
|
|
8402
|
+
var __defProp$5 = Object.defineProperty;
|
|
8403
|
+
var __template$5 = (cooked, raw) => __freeze$5(__defProp$5(cooked, "raw", {
|
|
8404
|
+
value: __freeze$5(raw || cooked.slice())
|
|
8405
|
+
}));
|
|
8406
|
+
var _a$5, _b$4;
|
|
8200
8407
|
function selectableBaseStyle() {
|
|
8201
|
-
return styled.css(
|
|
8408
|
+
return styled.css(_a$5 || (_a$5 = __template$5(["\n background-color: inherit;\n color: inherit;\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: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n text-decoration: none;\n }\n "])));
|
|
8202
8409
|
}
|
|
8203
8410
|
function selectableColorStyle(props) {
|
|
8204
|
-
var
|
|
8411
|
+
var _a2, _b2;
|
|
8205
8412
|
const {
|
|
8206
8413
|
$tone,
|
|
8207
8414
|
theme
|
|
@@ -8212,7 +8419,7 @@ function selectableColorStyle(props) {
|
|
|
8212
8419
|
selectable
|
|
8213
8420
|
} = theme.sanity.color;
|
|
8214
8421
|
const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
|
|
8215
|
-
return styled.css(
|
|
8422
|
+
return styled.css(_b$4 || (_b$4 = __template$5(["\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\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-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n ", "\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
|
|
8216
8423
|
}
|
|
8217
8424
|
const Selectable = styled__default.default(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
|
|
8218
8425
|
function useMenu() {
|
|
@@ -8474,9 +8681,15 @@ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
|
|
|
8474
8681
|
})]
|
|
8475
8682
|
});
|
|
8476
8683
|
});
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8684
|
+
var __freeze$4 = Object.freeze;
|
|
8685
|
+
var __defProp$4 = Object.defineProperty;
|
|
8686
|
+
var __template$4 = (cooked, raw) => __freeze$4(__defProp$4(cooked, "raw", {
|
|
8687
|
+
value: __freeze$4(raw || cooked.slice())
|
|
8688
|
+
}));
|
|
8689
|
+
var _a$4, _b$3, _c$1, _d;
|
|
8690
|
+
const keyframe = styled.keyframes(_a$4 || (_a$4 = __template$4(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
|
|
8691
|
+
const animation = styled.css(_b$3 || (_b$3 = __template$4(["\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);
|
|
8692
|
+
const skeletonStyle = styled.css(_d || (_d = __template$4(["\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"])), _ref24 => {
|
|
8480
8693
|
let {
|
|
8481
8694
|
$visible
|
|
8482
8695
|
} = _ref24;
|
|
@@ -8485,7 +8698,7 @@ const skeletonStyle = styled.css(_templateObject79 || (_templateObject79 = _tagg
|
|
|
8485
8698
|
let {
|
|
8486
8699
|
$animated
|
|
8487
8700
|
} = _ref25;
|
|
8488
|
-
return $animated ? animation : styled.css(
|
|
8701
|
+
return $animated ? animation : styled.css(_c$1 || (_c$1 = __template$4(["\n background-color: var(--card-skeleton-color-from);\n "])));
|
|
8489
8702
|
});
|
|
8490
8703
|
const Root$4 = styled__default.default(Box)(responsiveRadiusStyle, skeletonStyle);
|
|
8491
8704
|
const Skeleton = react.forwardRef(function Skeleton2(props, ref) {
|
|
@@ -8690,6 +8903,12 @@ const TabPanel = react.forwardRef(function TabPanel2(props, ref) {
|
|
|
8690
8903
|
children: props.children
|
|
8691
8904
|
});
|
|
8692
8905
|
});
|
|
8906
|
+
var __freeze$3 = Object.freeze;
|
|
8907
|
+
var __defProp$3 = Object.defineProperty;
|
|
8908
|
+
var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", {
|
|
8909
|
+
value: __freeze$3(raw || cooked.slice())
|
|
8910
|
+
}));
|
|
8911
|
+
var _a$3, _b$2;
|
|
8693
8912
|
const STATUS_CARD_TONE = {
|
|
8694
8913
|
error: "critical",
|
|
8695
8914
|
warning: "caution",
|
|
@@ -8702,8 +8921,8 @@ const ROLES = {
|
|
|
8702
8921
|
success: "alert",
|
|
8703
8922
|
info: "alert"
|
|
8704
8923
|
};
|
|
8705
|
-
const Root$2 = styled__default.default(Card)(
|
|
8706
|
-
const TextBox = styled__default.default(Flex)(
|
|
8924
|
+
const Root$2 = styled__default.default(Card)(_a$3 || (_a$3 = __template$3(["\n pointer-events: all;\n"])));
|
|
8925
|
+
const TextBox = styled__default.default(Flex)(_b$2 || (_b$2 = __template$3(["\n overflow-x: auto;\n"])));
|
|
8707
8926
|
function Toast(props) {
|
|
8708
8927
|
const {
|
|
8709
8928
|
closable,
|
|
@@ -8763,8 +8982,14 @@ function useMounted() {
|
|
|
8763
8982
|
const key$1 = Symbol.for("@sanity/ui/context/toast");
|
|
8764
8983
|
globalScope[key$1] = globalScope[key$1] || react.createContext(null);
|
|
8765
8984
|
const ToastContext = globalScope[key$1];
|
|
8766
|
-
|
|
8767
|
-
|
|
8985
|
+
var __freeze$2 = Object.freeze;
|
|
8986
|
+
var __defProp$2 = Object.defineProperty;
|
|
8987
|
+
var __template$2 = (cooked, raw) => __freeze$2(__defProp$2(cooked, "raw", {
|
|
8988
|
+
value: __freeze$2(raw || cooked.slice())
|
|
8989
|
+
}));
|
|
8990
|
+
var _a$2, _b$1;
|
|
8991
|
+
const Root$1 = styled__default.default(Layer)(_a$2 || (_a$2 = __template$2(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n"])));
|
|
8992
|
+
const ToastContainer = styled__default.default.div(_b$1 || (_b$1 = __template$2(["\n box-sizing: border-box;\n position: absolute;\n right: 0;\n bottom: 0;\n max-width: 420px;\n width: 100%;\n"])));
|
|
8768
8993
|
let toastId = 0;
|
|
8769
8994
|
function ToastProvider(props) {
|
|
8770
8995
|
const {
|
|
@@ -8781,8 +9006,8 @@ function ToastProvider(props) {
|
|
|
8781
9006
|
const id = params.id || String(toastId++);
|
|
8782
9007
|
const duration = params.duration || 5e3;
|
|
8783
9008
|
const dismiss = () => {
|
|
8784
|
-
var
|
|
8785
|
-
const timeoutId = (
|
|
9009
|
+
var _a2;
|
|
9010
|
+
const timeoutId = (_a2 = toastsRef.current[id]) == null ? void 0 : _a2.timeoutId;
|
|
8786
9011
|
setState(prevState => {
|
|
8787
9012
|
const idx = prevState.findIndex(t => t.id === id);
|
|
8788
9013
|
if (idx > -1) {
|
|
@@ -9130,8 +9355,14 @@ const Tree = react.memo(react.forwardRef(function Tree2(props, ref) {
|
|
|
9130
9355
|
});
|
|
9131
9356
|
}));
|
|
9132
9357
|
Tree.displayName = "Tree";
|
|
9358
|
+
var __freeze$1 = Object.freeze;
|
|
9359
|
+
var __defProp$1 = Object.defineProperty;
|
|
9360
|
+
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", {
|
|
9361
|
+
value: __freeze$1(raw || cooked.slice())
|
|
9362
|
+
}));
|
|
9363
|
+
var _a$1, _b, _c;
|
|
9133
9364
|
function treeItemRootStyle() {
|
|
9134
|
-
return styled.css(
|
|
9365
|
+
return styled.css(_a$1 || (_a$1 = __template$1(["\n &[role='none'] > [role='treeitem'] {\n outline: none;\n cursor: default;\n border-radius: 3px;\n\n &:focus {\n position: relative;\n }\n }\n\n &[role='treeitem'] {\n outline: none;\n\n & > div {\n cursor: default;\n border-radius: 3px;\n }\n\n &:focus > div {\n position: relative;\n }\n }\n "])));
|
|
9135
9366
|
}
|
|
9136
9367
|
function treeItemRootColorStyle(props) {
|
|
9137
9368
|
const {
|
|
@@ -9144,7 +9375,7 @@ function treeItemRootColorStyle(props) {
|
|
|
9144
9375
|
selectable
|
|
9145
9376
|
} = theme.sanity.color;
|
|
9146
9377
|
const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
|
|
9147
|
-
return styled.css(
|
|
9378
|
+
return styled.css(_b || (_b = __template$1(['\n /* <div role="none"><a data-ui="TreeItem__box" role="treeitem" tabIndex="0"></div> */\n &[role=\'none\'] {\n & > [role=\'treeitem\'] {\n ', "\n\n background-color: var(--card-bg-color);\n color: var(--treeitem-fg-color);\n }\n\n &[data-selected] > [role='treeitem'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) > [role='treeitem']:not(:focus):hover {\n ", "\n }\n\n & > [role='treeitem']:focus {\n ", '\n }\n }\n }\n\n /* <div role="treeitem" tabIndex="0"><div data-ui="TreeItem__box"></div> */\n &[role=\'treeitem\'] {\n & > [data-ui=\'TreeItem__box\'] {\n ', "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n }\n\n &[data-selected] > [data-ui='TreeItem__box'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {\n ", "\n }\n\n &:focus > [data-ui='TreeItem__box'] {\n ", "\n }\n }\n }\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected));
|
|
9148
9379
|
}
|
|
9149
9380
|
function treeItemBoxStyle(props) {
|
|
9150
9381
|
const {
|
|
@@ -9154,7 +9385,7 @@ function treeItemBoxStyle(props) {
|
|
|
9154
9385
|
const {
|
|
9155
9386
|
space
|
|
9156
9387
|
} = theme.sanity;
|
|
9157
|
-
return styled.css(
|
|
9388
|
+
return styled.css(_c || (_c = __template$1(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
|
|
9158
9389
|
}
|
|
9159
9390
|
function useTree() {
|
|
9160
9391
|
const tree = react.useContext(TreeContext);
|
|
@@ -9181,11 +9412,17 @@ const TreeGroup = react.memo(function TreeGroup2(props) {
|
|
|
9181
9412
|
children
|
|
9182
9413
|
});
|
|
9183
9414
|
});
|
|
9415
|
+
var __freeze = Object.freeze;
|
|
9416
|
+
var __defProp = Object.defineProperty;
|
|
9417
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", {
|
|
9418
|
+
value: __freeze(raw || cooked.slice())
|
|
9419
|
+
}));
|
|
9420
|
+
var _a;
|
|
9184
9421
|
const Root = react.memo(styled__default.default.li(treeItemRootStyle, treeItemRootColorStyle));
|
|
9185
9422
|
const TreeItemBox = styled__default.default(Box).attrs({
|
|
9186
9423
|
forwardedAs: "a"
|
|
9187
9424
|
})(treeItemBoxStyle);
|
|
9188
|
-
const ToggleArrowText = styled__default.default(Text)(
|
|
9425
|
+
const ToggleArrowText = styled__default.default(Text)(_a || (_a = __template(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
|
|
9189
9426
|
const TreeItem = react.memo(function TreeItem2(props) {
|
|
9190
9427
|
const {
|
|
9191
9428
|
children,
|