@sanity/ui 1.7.2 → 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 +340 -103
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +340 -103
- 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__/index.ts +5 -0
- package/src/components/menu/__workshop__/menuButton.tsx +1 -1
- package/src/components/menu/__workshop__/shouldFocus.tsx +46 -0
- 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 +10 -5
- 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.esm.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
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;
|
|
2
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
3
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
2
|
import { useMemo, useState, useRef, useEffect, createContext, useContext, useSyncExternalStore, useLayoutEffect, forwardRef, useId, useCallback, cloneElement, isValidElement, createElement, Component, memo, useReducer, Children, Fragment as Fragment$1, startTransition } from 'react';
|
|
5
3
|
import ReactIs, { isElement as isElement$1, isFragment, isValidElementType } from 'react-is';
|
|
@@ -970,7 +968,7 @@ function isHex(str) {
|
|
|
970
968
|
function parseHsl(str) {
|
|
971
969
|
const res = HSL_RE.exec(str);
|
|
972
970
|
if (!res) {
|
|
973
|
-
throw new Error(
|
|
971
|
+
throw new Error('parseHsl: string is not a HSL color: "'.concat(str, '"'));
|
|
974
972
|
}
|
|
975
973
|
return {
|
|
976
974
|
h: parseInt(res[1]),
|
|
@@ -993,7 +991,7 @@ function parseColor(color) {
|
|
|
993
991
|
if (color.startsWith("hsl(")) {
|
|
994
992
|
return hslToRgb(parseHsl(color));
|
|
995
993
|
}
|
|
996
|
-
throw new Error(
|
|
994
|
+
throw new Error('parseColor: unexpected color format: "'.concat(color, '"'));
|
|
997
995
|
}
|
|
998
996
|
function rgba(color, a) {
|
|
999
997
|
const rgb = parseColor(color);
|
|
@@ -3784,7 +3782,13 @@ function responsiveInputPaddingIconRightStyle(props) {
|
|
|
3784
3782
|
$iconRight: true
|
|
3785
3783
|
});
|
|
3786
3784
|
}
|
|
3787
|
-
|
|
3785
|
+
var __freeze$B = Object.freeze;
|
|
3786
|
+
var __defProp$C = Object.defineProperty;
|
|
3787
|
+
var __template$B = (cooked, raw) => __freeze$B(__defProp$C(cooked, "raw", {
|
|
3788
|
+
value: __freeze$B(raw || cooked.slice())
|
|
3789
|
+
}));
|
|
3790
|
+
var _a$B, _b$m, _c$d;
|
|
3791
|
+
const ROOT_STYLE = css(_a$B || (_a$B = __template$B(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
|
|
3788
3792
|
function textInputRootStyle() {
|
|
3789
3793
|
return ROOT_STYLE;
|
|
3790
3794
|
}
|
|
@@ -3797,7 +3801,7 @@ function textInputBaseStyle(props) {
|
|
|
3797
3801
|
} = props;
|
|
3798
3802
|
const font = theme.sanity.fonts.text;
|
|
3799
3803
|
const color = theme.sanity.color.input;
|
|
3800
|
-
return css(
|
|
3804
|
+
return 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);
|
|
3801
3805
|
}
|
|
3802
3806
|
function textInputFontSizeStyle(props) {
|
|
3803
3807
|
const {
|
|
@@ -3828,7 +3832,7 @@ function textInputRepresentationStyle(props) {
|
|
|
3828
3832
|
input
|
|
3829
3833
|
} = theme.sanity;
|
|
3830
3834
|
const color = theme.sanity.color.input;
|
|
3831
|
-
return css(
|
|
3835
|
+
return 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({
|
|
3832
3836
|
color: color.default.enabled.border,
|
|
3833
3837
|
width: input.border.width
|
|
3834
3838
|
}), color.invalid.enabled.bg, color.invalid.enabled.fg, focusRingBorderStyle({
|
|
@@ -3897,6 +3901,12 @@ function responsiveShadowStyle(props) {
|
|
|
3897
3901
|
} = theme.sanity;
|
|
3898
3902
|
return _responsive(media, props.$shadow, shadow => shadowStyle(shadows[shadow]));
|
|
3899
3903
|
}
|
|
3904
|
+
var __freeze$A = Object.freeze;
|
|
3905
|
+
var __defProp$B = Object.defineProperty;
|
|
3906
|
+
var __template$A = (cooked, raw) => __freeze$A(__defProp$B(cooked, "raw", {
|
|
3907
|
+
value: __freeze$A(raw || cooked.slice())
|
|
3908
|
+
}));
|
|
3909
|
+
var _a$A, _b$l, _c$c;
|
|
3900
3910
|
function textBaseStyle(props) {
|
|
3901
3911
|
const {
|
|
3902
3912
|
$accent,
|
|
@@ -3906,10 +3916,16 @@ function textBaseStyle(props) {
|
|
|
3906
3916
|
const {
|
|
3907
3917
|
weights
|
|
3908
3918
|
} = theme.sanity.fonts.text;
|
|
3909
|
-
return css(
|
|
3919
|
+
return 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 && css(_a$A || (_a$A = __template$A(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$l || (_b$l = __template$A(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family, weights.bold);
|
|
3910
3920
|
}
|
|
3921
|
+
var __freeze$z = Object.freeze;
|
|
3922
|
+
var __defProp$A = Object.defineProperty;
|
|
3923
|
+
var __template$z = (cooked, raw) => __freeze$z(__defProp$A(cooked, "raw", {
|
|
3924
|
+
value: __freeze$z(raw || cooked.slice())
|
|
3925
|
+
}));
|
|
3926
|
+
var _a$z;
|
|
3911
3927
|
const Root$E = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
|
|
3912
|
-
const SpanWithTextOverflow$2 = styled.span(
|
|
3928
|
+
const SpanWithTextOverflow$2 = styled.span(_a$z || (_a$z = __template$z(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
|
|
3913
3929
|
const Text = forwardRef(function Text2(props, ref) {
|
|
3914
3930
|
const {
|
|
3915
3931
|
accent = false,
|
|
@@ -4202,6 +4218,12 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
|
|
|
4202
4218
|
})]
|
|
4203
4219
|
});
|
|
4204
4220
|
});
|
|
4221
|
+
var __freeze$y = Object.freeze;
|
|
4222
|
+
var __defProp$z = Object.defineProperty;
|
|
4223
|
+
var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
|
|
4224
|
+
value: __freeze$y(raw || cooked.slice())
|
|
4225
|
+
}));
|
|
4226
|
+
var _a$y;
|
|
4205
4227
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
4206
4228
|
const {
|
|
4207
4229
|
theme
|
|
@@ -4224,7 +4246,7 @@ function _avatarCounterBaseStyle(props) {
|
|
|
4224
4246
|
const {
|
|
4225
4247
|
theme
|
|
4226
4248
|
} = props;
|
|
4227
|
-
return css(
|
|
4249
|
+
return 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]));
|
|
4228
4250
|
}
|
|
4229
4251
|
const Root$C = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
|
|
4230
4252
|
const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
|
|
@@ -4251,7 +4273,13 @@ function childrenToElementArray(children) {
|
|
|
4251
4273
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
4252
4274
|
return childrenArray.filter(node => isElement$1(node) || isFragment(node) || typeof node === "string");
|
|
4253
4275
|
}
|
|
4254
|
-
|
|
4276
|
+
var __freeze$x = Object.freeze;
|
|
4277
|
+
var __defProp$y = Object.defineProperty;
|
|
4278
|
+
var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
|
|
4279
|
+
value: __freeze$x(raw || cooked.slice())
|
|
4280
|
+
}));
|
|
4281
|
+
var _a$x;
|
|
4282
|
+
const BASE_STYLES = 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"])));
|
|
4255
4283
|
function avatarStackStyle() {
|
|
4256
4284
|
return BASE_STYLES;
|
|
4257
4285
|
}
|
|
@@ -4374,6 +4402,12 @@ const Box = forwardRef(function Box2(props, ref) {
|
|
|
4374
4402
|
children: props.children
|
|
4375
4403
|
});
|
|
4376
4404
|
});
|
|
4405
|
+
var __freeze$w = Object.freeze;
|
|
4406
|
+
var __defProp$x = Object.defineProperty;
|
|
4407
|
+
var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
|
|
4408
|
+
value: __freeze$w(raw || cooked.slice())
|
|
4409
|
+
}));
|
|
4410
|
+
var _a$w, _b$k, _c$b;
|
|
4377
4411
|
function labelBaseStyle(props) {
|
|
4378
4412
|
const {
|
|
4379
4413
|
$accent,
|
|
@@ -4383,10 +4417,16 @@ function labelBaseStyle(props) {
|
|
|
4383
4417
|
const {
|
|
4384
4418
|
fonts
|
|
4385
4419
|
} = theme.sanity;
|
|
4386
|
-
return css(
|
|
4420
|
+
return 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 && css(_a$w || (_a$w = __template$w(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$k || (_b$k = __template$w(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
|
|
4387
4421
|
}
|
|
4422
|
+
var __freeze$v = Object.freeze;
|
|
4423
|
+
var __defProp$w = Object.defineProperty;
|
|
4424
|
+
var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
|
|
4425
|
+
value: __freeze$v(raw || cooked.slice())
|
|
4426
|
+
}));
|
|
4427
|
+
var _a$v;
|
|
4388
4428
|
const Root$z = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
|
|
4389
|
-
const SpanWithTextOverflow$1 = styled.span(
|
|
4429
|
+
const SpanWithTextOverflow$1 = styled.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"])));
|
|
4390
4430
|
const Label = forwardRef(function Label2(props, ref) {
|
|
4391
4431
|
const {
|
|
4392
4432
|
accent,
|
|
@@ -4486,8 +4526,14 @@ const Flex = forwardRef(function Flex2(props, ref) {
|
|
|
4486
4526
|
ref
|
|
4487
4527
|
});
|
|
4488
4528
|
});
|
|
4489
|
-
|
|
4490
|
-
|
|
4529
|
+
var __freeze$u = Object.freeze;
|
|
4530
|
+
var __defProp$v = Object.defineProperty;
|
|
4531
|
+
var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
|
|
4532
|
+
value: __freeze$u(raw || cooked.slice())
|
|
4533
|
+
}));
|
|
4534
|
+
var _a$u, _b$j;
|
|
4535
|
+
const rotate$1 = keyframes(_a$u || (_a$u = __template$u(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
4536
|
+
const Root$w = styled(Text)(_b$j || (_b$j = __template$u(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
|
|
4491
4537
|
const Spinner = forwardRef(function Spinner2(props, ref) {
|
|
4492
4538
|
return /* @__PURE__ */jsx(Root$w, {
|
|
4493
4539
|
"data-ui": "Spinner",
|
|
@@ -4525,8 +4571,14 @@ function _colorVarsStyle(base, color) {
|
|
|
4525
4571
|
"--card-hairline-hard-color": color.border
|
|
4526
4572
|
};
|
|
4527
4573
|
}
|
|
4574
|
+
var __freeze$t = Object.freeze;
|
|
4575
|
+
var __defProp$u = Object.defineProperty;
|
|
4576
|
+
var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
|
|
4577
|
+
value: __freeze$t(raw || cooked.slice())
|
|
4578
|
+
}));
|
|
4579
|
+
var _a$t;
|
|
4528
4580
|
function buttonBaseStyles() {
|
|
4529
|
-
return css(
|
|
4581
|
+
return 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 "])));
|
|
4530
4582
|
}
|
|
4531
4583
|
const buttonTheme = {
|
|
4532
4584
|
border: {
|
|
@@ -4534,7 +4586,7 @@ const buttonTheme = {
|
|
|
4534
4586
|
}
|
|
4535
4587
|
};
|
|
4536
4588
|
function buttonColorStyles(props) {
|
|
4537
|
-
var
|
|
4589
|
+
var _a2, _b;
|
|
4538
4590
|
const {
|
|
4539
4591
|
$mode,
|
|
4540
4592
|
theme
|
|
@@ -4572,10 +4624,16 @@ function buttonColorStyles(props) {
|
|
|
4572
4624
|
},
|
|
4573
4625
|
"&[data-selected]": _colorVarsStyle(base, color.pressed)
|
|
4574
4626
|
}
|
|
4575
|
-
}, (_b = (
|
|
4627
|
+
}, (_b = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.button) == null ? void 0 : _b.root].filter(Boolean);
|
|
4576
4628
|
}
|
|
4629
|
+
var __freeze$s = Object.freeze;
|
|
4630
|
+
var __defProp$t = Object.defineProperty;
|
|
4631
|
+
var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
|
|
4632
|
+
value: __freeze$s(raw || cooked.slice())
|
|
4633
|
+
}));
|
|
4634
|
+
var _a$s;
|
|
4577
4635
|
const Root$v = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
|
|
4578
|
-
const LoadingBox = styled.div(
|
|
4636
|
+
const LoadingBox = styled.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"])));
|
|
4579
4637
|
const Button = forwardRef(function Button2(props, ref) {
|
|
4580
4638
|
const {
|
|
4581
4639
|
children,
|
|
@@ -4668,6 +4726,12 @@ const Button = forwardRef(function Button2(props, ref) {
|
|
|
4668
4726
|
})]
|
|
4669
4727
|
});
|
|
4670
4728
|
});
|
|
4729
|
+
var __freeze$r = Object.freeze;
|
|
4730
|
+
var __defProp$s = Object.defineProperty;
|
|
4731
|
+
var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
|
|
4732
|
+
value: __freeze$r(raw || cooked.slice())
|
|
4733
|
+
}));
|
|
4734
|
+
var _a$r, _b$i, _c$a;
|
|
4671
4735
|
function cardStyle(props) {
|
|
4672
4736
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
4673
4737
|
}
|
|
@@ -4677,10 +4741,10 @@ function cardBaseStyle(props) {
|
|
|
4677
4741
|
theme
|
|
4678
4742
|
} = props;
|
|
4679
4743
|
const space = theme.sanity.space;
|
|
4680
|
-
return css(
|
|
4744
|
+
return 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 && 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]));
|
|
4681
4745
|
}
|
|
4682
4746
|
function cardColorStyle(props) {
|
|
4683
|
-
var
|
|
4747
|
+
var _a2, _b2;
|
|
4684
4748
|
const {
|
|
4685
4749
|
$checkered,
|
|
4686
4750
|
$focusRing,
|
|
@@ -4698,7 +4762,7 @@ function cardColorStyle(props) {
|
|
|
4698
4762
|
width: 0,
|
|
4699
4763
|
color: "var(--card-border-color)"
|
|
4700
4764
|
};
|
|
4701
|
-
return css(
|
|
4765
|
+
return 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({
|
|
4702
4766
|
base,
|
|
4703
4767
|
border,
|
|
4704
4768
|
focusRing
|
|
@@ -4706,7 +4770,7 @@ function cardColorStyle(props) {
|
|
|
4706
4770
|
base,
|
|
4707
4771
|
border,
|
|
4708
4772
|
focusRing
|
|
4709
|
-
}) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (
|
|
4773
|
+
}) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
|
|
4710
4774
|
}
|
|
4711
4775
|
const Root$u = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
|
|
4712
4776
|
const Card = forwardRef(function Card2(props, ref) {
|
|
@@ -4758,8 +4822,14 @@ const Card = forwardRef(function Card2(props, ref) {
|
|
|
4758
4822
|
})
|
|
4759
4823
|
});
|
|
4760
4824
|
});
|
|
4825
|
+
var __freeze$q = Object.freeze;
|
|
4826
|
+
var __defProp$r = Object.defineProperty;
|
|
4827
|
+
var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
|
|
4828
|
+
value: __freeze$q(raw || cooked.slice())
|
|
4829
|
+
}));
|
|
4830
|
+
var _a$q, _b$h;
|
|
4761
4831
|
function checkboxBaseStyles() {
|
|
4762
|
-
return css(
|
|
4832
|
+
return css(_a$q || (_a$q = __template$q(["\n position: relative;\n display: inline-block;\n "])));
|
|
4763
4833
|
}
|
|
4764
4834
|
function inputElementStyles(props) {
|
|
4765
4835
|
const {
|
|
@@ -4771,7 +4841,7 @@ function inputElementStyles(props) {
|
|
|
4771
4841
|
input,
|
|
4772
4842
|
radius
|
|
4773
4843
|
} = theme.sanity;
|
|
4774
|
-
return css(
|
|
4844
|
+
return 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({
|
|
4775
4845
|
color: color.default.enabled.border,
|
|
4776
4846
|
width: input.border.width
|
|
4777
4847
|
}), rem(radius[2]), color.default.enabled.bg, focusRingStyle({
|
|
@@ -4828,6 +4898,12 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
|
|
|
4828
4898
|
})]
|
|
4829
4899
|
});
|
|
4830
4900
|
});
|
|
4901
|
+
var __freeze$p = Object.freeze;
|
|
4902
|
+
var __defProp$q = Object.defineProperty;
|
|
4903
|
+
var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
|
|
4904
|
+
value: __freeze$p(raw || cooked.slice())
|
|
4905
|
+
}));
|
|
4906
|
+
var _a$p;
|
|
4831
4907
|
function codeSyntaxHighlightingStyle(_ref20) {
|
|
4832
4908
|
let {
|
|
4833
4909
|
theme
|
|
@@ -4945,7 +5021,7 @@ function codeSyntaxHighlightingStyle(_ref20) {
|
|
|
4945
5021
|
};
|
|
4946
5022
|
}
|
|
4947
5023
|
function codeBaseStyle() {
|
|
4948
|
-
return css(
|
|
5024
|
+
return 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);
|
|
4949
5025
|
}
|
|
4950
5026
|
const Root$s = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
|
|
4951
5027
|
const Code = forwardRef(function Code2(props, ref) {
|
|
@@ -5039,16 +5115,28 @@ const Grid = forwardRef(function Grid2(props, ref) {
|
|
|
5039
5115
|
children
|
|
5040
5116
|
});
|
|
5041
5117
|
});
|
|
5118
|
+
var __freeze$o = Object.freeze;
|
|
5119
|
+
var __defProp$p = Object.defineProperty;
|
|
5120
|
+
var __template$o = (cooked, raw) => __freeze$o(__defProp$p(cooked, "raw", {
|
|
5121
|
+
value: __freeze$o(raw || cooked.slice())
|
|
5122
|
+
}));
|
|
5123
|
+
var _a$o, _b$g, _c$9;
|
|
5042
5124
|
function headingBaseStyle(props) {
|
|
5043
5125
|
const {
|
|
5044
5126
|
$accent,
|
|
5045
5127
|
$muted,
|
|
5046
5128
|
theme
|
|
5047
5129
|
} = props;
|
|
5048
|
-
return css(
|
|
5130
|
+
return 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 && css(_a$o || (_a$o = __template$o(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_b$g || (_b$g = __template$o(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
|
|
5049
5131
|
}
|
|
5132
|
+
var __freeze$n = Object.freeze;
|
|
5133
|
+
var __defProp$o = Object.defineProperty;
|
|
5134
|
+
var __template$n = (cooked, raw) => __freeze$n(__defProp$o(cooked, "raw", {
|
|
5135
|
+
value: __freeze$n(raw || cooked.slice())
|
|
5136
|
+
}));
|
|
5137
|
+
var _a$n;
|
|
5050
5138
|
const Root$p = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
|
|
5051
|
-
const SpanWithTextOverflow = styled.span(
|
|
5139
|
+
const SpanWithTextOverflow = styled.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"])));
|
|
5052
5140
|
const Heading = forwardRef(function Heading2(props, ref) {
|
|
5053
5141
|
const {
|
|
5054
5142
|
accent = false,
|
|
@@ -5126,8 +5214,14 @@ const Inline = forwardRef(function Inline2(props, ref) {
|
|
|
5126
5214
|
children
|
|
5127
5215
|
});
|
|
5128
5216
|
});
|
|
5217
|
+
var __freeze$m = Object.freeze;
|
|
5218
|
+
var __defProp$n = Object.defineProperty;
|
|
5219
|
+
var __template$m = (cooked, raw) => __freeze$m(__defProp$n(cooked, "raw", {
|
|
5220
|
+
value: __freeze$m(raw || cooked.slice())
|
|
5221
|
+
}));
|
|
5222
|
+
var _a$m;
|
|
5129
5223
|
function kbdStyle() {
|
|
5130
|
-
return css(
|
|
5224
|
+
return 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 "])));
|
|
5131
5225
|
}
|
|
5132
5226
|
const Root$n = styled.kbd(responsiveRadiusStyle, kbdStyle);
|
|
5133
5227
|
const KBD = forwardRef(function KBD2(props, ref) {
|
|
@@ -5232,12 +5326,23 @@ const ElementQuery = forwardRef(function ElementQuery2(props, ref) {
|
|
|
5232
5326
|
children
|
|
5233
5327
|
});
|
|
5234
5328
|
});
|
|
5329
|
+
var __defProp$m = Object.defineProperty;
|
|
5330
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp$m(obj, key, {
|
|
5331
|
+
enumerable: true,
|
|
5332
|
+
configurable: true,
|
|
5333
|
+
writable: true,
|
|
5334
|
+
value
|
|
5335
|
+
}) : obj[key] = value;
|
|
5336
|
+
var __publicField = (obj, key, value) => {
|
|
5337
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5338
|
+
return value;
|
|
5339
|
+
};
|
|
5235
5340
|
class ErrorBoundary extends Component {
|
|
5236
5341
|
constructor() {
|
|
5237
5342
|
super(...arguments);
|
|
5238
|
-
this
|
|
5343
|
+
__publicField(this, "state", {
|
|
5239
5344
|
error: null
|
|
5240
|
-
};
|
|
5345
|
+
});
|
|
5241
5346
|
}
|
|
5242
5347
|
static getDerivedStateFromError(error) {
|
|
5243
5348
|
return {
|
|
@@ -5598,7 +5703,13 @@ function PortalProvider(props) {
|
|
|
5598
5703
|
children
|
|
5599
5704
|
});
|
|
5600
5705
|
}
|
|
5601
|
-
|
|
5706
|
+
var __freeze$l = Object.freeze;
|
|
5707
|
+
var __defProp$l = Object.defineProperty;
|
|
5708
|
+
var __template$l = (cooked, raw) => __freeze$l(__defProp$l(cooked, "raw", {
|
|
5709
|
+
value: __freeze$l(raw || cooked.slice())
|
|
5710
|
+
}));
|
|
5711
|
+
var _a$l;
|
|
5712
|
+
const Root$l = styled.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"])));
|
|
5602
5713
|
const SrOnly = forwardRef(function SrOnly2(props, ref) {
|
|
5603
5714
|
const {
|
|
5604
5715
|
as,
|
|
@@ -5612,8 +5723,14 @@ const SrOnly = forwardRef(function SrOnly2(props, ref) {
|
|
|
5612
5723
|
children
|
|
5613
5724
|
});
|
|
5614
5725
|
});
|
|
5615
|
-
|
|
5616
|
-
|
|
5726
|
+
var __freeze$k = Object.freeze;
|
|
5727
|
+
var __defProp$k = Object.defineProperty;
|
|
5728
|
+
var __template$k = (cooked, raw) => __freeze$k(__defProp$k(cooked, "raw", {
|
|
5729
|
+
value: __freeze$k(raw || cooked.slice())
|
|
5730
|
+
}));
|
|
5731
|
+
var _a$k, _b$f;
|
|
5732
|
+
const Root$k = styled.div(_a$k || (_a$k = __template$k(["\n position: relative;\n"])));
|
|
5733
|
+
const ItemWrapper = styled.div(_b$f || (_b$f = __template$k(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
|
|
5617
5734
|
const VirtualList = forwardRef(function VirtualList2(props, ref) {
|
|
5618
5735
|
const {
|
|
5619
5736
|
as = "div",
|
|
@@ -5822,9 +5939,15 @@ function calcMaxWidth(params) {
|
|
|
5822
5939
|
}
|
|
5823
5940
|
return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
|
|
5824
5941
|
}
|
|
5825
|
-
|
|
5826
|
-
|
|
5827
|
-
|
|
5942
|
+
var __freeze$j = Object.freeze;
|
|
5943
|
+
var __defProp$j = Object.defineProperty;
|
|
5944
|
+
var __template$j = (cooked, raw) => __freeze$j(__defProp$j(cooked, "raw", {
|
|
5945
|
+
value: __freeze$j(raw || cooked.slice())
|
|
5946
|
+
}));
|
|
5947
|
+
var _a$j, _b$e, _c$8;
|
|
5948
|
+
const Root$j = styled.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);
|
|
5949
|
+
const BorderPath = styled.path(_b$e || (_b$e = __template$j(["\n fill: var(--card-shadow-outline-color);\n"])));
|
|
5950
|
+
const ShapePath = styled.path(_c$8 || (_c$8 = __template$j(["\n fill: var(--card-bg-color);\n"])));
|
|
5828
5951
|
const PopoverArrow = forwardRef(function PopoverArrow2(props, ref) {
|
|
5829
5952
|
return /* @__PURE__ */jsx(Root$j, {
|
|
5830
5953
|
"data-ui": "Popover__arrow",
|
|
@@ -6154,8 +6277,14 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
|
|
|
6154
6277
|
});
|
|
6155
6278
|
}));
|
|
6156
6279
|
Popover.displayName = "Popover";
|
|
6280
|
+
var __freeze$i = Object.freeze;
|
|
6281
|
+
var __defProp$i = Object.defineProperty;
|
|
6282
|
+
var __template$i = (cooked, raw) => __freeze$i(__defProp$i(cooked, "raw", {
|
|
6283
|
+
value: __freeze$i(raw || cooked.slice())
|
|
6284
|
+
}));
|
|
6285
|
+
var _a$i, _b$d;
|
|
6157
6286
|
function radioBaseStyle() {
|
|
6158
|
-
return css(
|
|
6287
|
+
return 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 "])));
|
|
6159
6288
|
}
|
|
6160
6289
|
function inputElementStyle(props) {
|
|
6161
6290
|
const {
|
|
@@ -6167,7 +6296,7 @@ function inputElementStyle(props) {
|
|
|
6167
6296
|
} = theme.sanity;
|
|
6168
6297
|
const color = theme.sanity.color.input;
|
|
6169
6298
|
const dist = (input.radio.size - input.radio.markSize) / 2;
|
|
6170
|
-
return css(
|
|
6299
|
+
return 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({
|
|
6171
6300
|
color: color.default.enabled.border,
|
|
6172
6301
|
width: input.border.width
|
|
6173
6302
|
}), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.default.enabled.fg, focusRingStyle({
|
|
@@ -6208,15 +6337,21 @@ const Radio = forwardRef(function Radio2(props, forwardedRef) {
|
|
|
6208
6337
|
}), /* @__PURE__ */jsx("span", {})]
|
|
6209
6338
|
});
|
|
6210
6339
|
});
|
|
6340
|
+
var __freeze$h = Object.freeze;
|
|
6341
|
+
var __defProp$h = Object.defineProperty;
|
|
6342
|
+
var __template$h = (cooked, raw) => __freeze$h(__defProp$h(cooked, "raw", {
|
|
6343
|
+
value: __freeze$h(raw || cooked.slice())
|
|
6344
|
+
}));
|
|
6345
|
+
var _a$h, _b$c, _c$7, _d$5;
|
|
6211
6346
|
function rootStyle() {
|
|
6212
|
-
return css(
|
|
6347
|
+
return css(_a$h || (_a$h = __template$h(["\n position: relative;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
6213
6348
|
}
|
|
6214
6349
|
function inputBaseStyle(props) {
|
|
6215
6350
|
const {
|
|
6216
6351
|
theme
|
|
6217
6352
|
} = props;
|
|
6218
6353
|
const font = theme.sanity.fonts.text;
|
|
6219
|
-
return css(
|
|
6354
|
+
return 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);
|
|
6220
6355
|
}
|
|
6221
6356
|
function inputColorStyle(props) {
|
|
6222
6357
|
const {
|
|
@@ -6227,7 +6362,7 @@ function inputColorStyle(props) {
|
|
|
6227
6362
|
input
|
|
6228
6363
|
} = theme.sanity;
|
|
6229
6364
|
const color = theme.sanity.color.input;
|
|
6230
|
-
return css(
|
|
6365
|
+
return 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({
|
|
6231
6366
|
color: color.default.enabled.border,
|
|
6232
6367
|
width: input.border.width
|
|
6233
6368
|
}), color.default.hovered.bg, color.default.hovered.fg, focusRingBorderStyle({
|
|
@@ -6271,7 +6406,7 @@ function iconBoxStyle(props) {
|
|
|
6271
6406
|
theme
|
|
6272
6407
|
} = props;
|
|
6273
6408
|
const color = theme.sanity.color.input;
|
|
6274
|
-
return css(
|
|
6409
|
+
return 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);
|
|
6275
6410
|
}
|
|
6276
6411
|
const selectStyle = {
|
|
6277
6412
|
root: rootStyle,
|
|
@@ -6358,11 +6493,17 @@ const Stack = forwardRef(function Stack2(props, ref) {
|
|
|
6358
6493
|
ref
|
|
6359
6494
|
});
|
|
6360
6495
|
});
|
|
6496
|
+
var __freeze$g = Object.freeze;
|
|
6497
|
+
var __defProp$g = Object.defineProperty;
|
|
6498
|
+
var __template$g = (cooked, raw) => __freeze$g(__defProp$g(cooked, "raw", {
|
|
6499
|
+
value: __freeze$g(raw || cooked.slice())
|
|
6500
|
+
}));
|
|
6501
|
+
var _a$g, _b$b, _c$6, _d$4, _e$2, _f$2, _g;
|
|
6361
6502
|
function switchBaseStyles() {
|
|
6362
|
-
return css(
|
|
6503
|
+
return css(_a$g || (_a$g = __template$g(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
|
|
6363
6504
|
}
|
|
6364
6505
|
function switchInputStyles() {
|
|
6365
|
-
return css(
|
|
6506
|
+
return 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 "])));
|
|
6366
6507
|
}
|
|
6367
6508
|
function switchRepresentationStyles(props) {
|
|
6368
6509
|
const {
|
|
@@ -6373,7 +6514,7 @@ function switchRepresentationStyles(props) {
|
|
|
6373
6514
|
input
|
|
6374
6515
|
} = theme.sanity;
|
|
6375
6516
|
const color = theme.sanity.color.button.default;
|
|
6376
|
-
return css(
|
|
6517
|
+
return 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({
|
|
6377
6518
|
focusRing
|
|
6378
6519
|
}), 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);
|
|
6379
6520
|
}
|
|
@@ -6384,7 +6525,7 @@ function switchTrackStyles(props) {
|
|
|
6384
6525
|
const {
|
|
6385
6526
|
input
|
|
6386
6527
|
} = theme.sanity;
|
|
6387
|
-
return css(
|
|
6528
|
+
return 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));
|
|
6388
6529
|
}
|
|
6389
6530
|
function switchThumbStyles(props) {
|
|
6390
6531
|
const {
|
|
@@ -6401,7 +6542,7 @@ function switchThumbStyles(props) {
|
|
|
6401
6542
|
const checkedOffset = trackWidth - trackPadding * 2 - size;
|
|
6402
6543
|
const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
|
|
6403
6544
|
const checked = $indeterminate !== true && props.$checked === true;
|
|
6404
|
-
return css(
|
|
6545
|
+
return 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 && css(_e$2 || (_e$2 = __template$g(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && css(_f$2 || (_f$2 = __template$g(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
|
|
6405
6546
|
}
|
|
6406
6547
|
const Root$e = styled.span(switchBaseStyles);
|
|
6407
6548
|
const Input$2 = styled.input(switchInputStyles);
|
|
@@ -6445,8 +6586,14 @@ const Switch = forwardRef(function Switch2(props, forwardedRef) {
|
|
|
6445
6586
|
})]
|
|
6446
6587
|
});
|
|
6447
6588
|
});
|
|
6589
|
+
var __freeze$f = Object.freeze;
|
|
6590
|
+
var __defProp$f = Object.defineProperty;
|
|
6591
|
+
var __template$f = (cooked, raw) => __freeze$f(__defProp$f(cooked, "raw", {
|
|
6592
|
+
value: __freeze$f(raw || cooked.slice())
|
|
6593
|
+
}));
|
|
6594
|
+
var _a$f;
|
|
6448
6595
|
const Root$d = styled.span(textInputRootStyle);
|
|
6449
|
-
const InputRoot$1 = styled.span(
|
|
6596
|
+
const InputRoot$1 = styled.span(_a$f || (_a$f = __template$f(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
6450
6597
|
const Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
6451
6598
|
const Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
6452
6599
|
const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
|
|
@@ -6490,24 +6637,30 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
|
|
|
6490
6637
|
})
|
|
6491
6638
|
});
|
|
6492
6639
|
});
|
|
6640
|
+
var __freeze$e = Object.freeze;
|
|
6641
|
+
var __defProp$e = Object.defineProperty;
|
|
6642
|
+
var __template$e = (cooked, raw) => __freeze$e(__defProp$e(cooked, "raw", {
|
|
6643
|
+
value: __freeze$e(raw || cooked.slice())
|
|
6644
|
+
}));
|
|
6645
|
+
var _a$e, _b$a, _c$5, _d$3, _e$1, _f$1;
|
|
6493
6646
|
const CLEAR_BUTTON_BOX_STYLE = {
|
|
6494
6647
|
zIndex: 2
|
|
6495
6648
|
};
|
|
6496
6649
|
const Root$c = styled(Card).attrs({
|
|
6497
6650
|
forwardedAs: "span"
|
|
6498
6651
|
})(textInputRootStyle);
|
|
6499
|
-
const InputRoot = styled.span(
|
|
6652
|
+
const InputRoot = styled.span(_a$e || (_a$e = __template$e(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
|
|
6500
6653
|
const Prefix = styled(Card).attrs({
|
|
6501
6654
|
forwardedAs: "span"
|
|
6502
|
-
})(
|
|
6655
|
+
})(_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"])));
|
|
6503
6656
|
const Suffix = styled(Card).attrs({
|
|
6504
6657
|
forwardedAs: "span"
|
|
6505
|
-
})(
|
|
6658
|
+
})(_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"])));
|
|
6506
6659
|
const Input = styled.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
|
|
6507
6660
|
const Presentation = styled.span(responsiveRadiusStyle, textInputRepresentationStyle);
|
|
6508
|
-
const LeftBox = styled(Box)(
|
|
6509
|
-
const RightBox = styled(Box)(
|
|
6510
|
-
const RightCard = styled(Card)(
|
|
6661
|
+
const LeftBox = styled(Box)(_d$3 || (_d$3 = __template$e(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
|
|
6662
|
+
const RightBox = styled(Box)(_e$1 || (_e$1 = __template$e(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
6663
|
+
const RightCard = styled(Card)(_f$1 || (_f$1 = __template$e(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
|
|
6511
6664
|
const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
|
|
6512
6665
|
const {
|
|
6513
6666
|
border = true,
|
|
@@ -6545,11 +6698,11 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
6545
6698
|
event.stopPropagation();
|
|
6546
6699
|
}, []);
|
|
6547
6700
|
const handleClearClick = useCallback(event => {
|
|
6548
|
-
var
|
|
6701
|
+
var _a2;
|
|
6549
6702
|
event.preventDefault();
|
|
6550
6703
|
event.stopPropagation();
|
|
6551
6704
|
if (onClear) onClear();
|
|
6552
|
-
(
|
|
6705
|
+
(_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
6553
6706
|
}, [onClear, ref]);
|
|
6554
6707
|
const prefixNode = useMemo(() => prefix && /* @__PURE__ */jsx(Prefix, {
|
|
6555
6708
|
borderTop: true,
|
|
@@ -6652,9 +6805,15 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
|
|
|
6652
6805
|
}), suffixNode]
|
|
6653
6806
|
});
|
|
6654
6807
|
});
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6808
|
+
var __freeze$d = Object.freeze;
|
|
6809
|
+
var __defProp$d = Object.defineProperty;
|
|
6810
|
+
var __template$d = (cooked, raw) => __freeze$d(__defProp$d(cooked, "raw", {
|
|
6811
|
+
value: __freeze$d(raw || cooked.slice())
|
|
6812
|
+
}));
|
|
6813
|
+
var _a$d, _b$9, _c$4;
|
|
6814
|
+
const Root$b = styled.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"])));
|
|
6815
|
+
const Border = styled.path(_b$9 || (_b$9 = __template$d(["\n fill: var(--card-shadow-outline-color);\n"])));
|
|
6816
|
+
const Shape = styled.path(_c$4 || (_c$4 = __template$d(["\n fill: var(--card-bg-color);\n"])));
|
|
6658
6817
|
const TooltipArrow = forwardRef(function TooltipArrow2(props, ref) {
|
|
6659
6818
|
const {
|
|
6660
6819
|
...restProps
|
|
@@ -6675,9 +6834,15 @@ const TooltipArrow = forwardRef(function TooltipArrow2(props, ref) {
|
|
|
6675
6834
|
})
|
|
6676
6835
|
});
|
|
6677
6836
|
});
|
|
6678
|
-
|
|
6837
|
+
var __freeze$c = Object.freeze;
|
|
6838
|
+
var __defProp$c = Object.defineProperty;
|
|
6839
|
+
var __template$c = (cooked, raw) => __freeze$c(__defProp$c(cooked, "raw", {
|
|
6840
|
+
value: __freeze$c(raw || cooked.slice())
|
|
6841
|
+
}));
|
|
6842
|
+
var _a$c;
|
|
6843
|
+
const Root$a = styled(Layer)(_a$c || (_a$c = __template$c(["\n pointer-events: none;\n"])));
|
|
6679
6844
|
const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
6680
|
-
var
|
|
6845
|
+
var _a2, _b, _c;
|
|
6681
6846
|
const boundaryElementContext = useBoundaryElement();
|
|
6682
6847
|
const theme = useTheme();
|
|
6683
6848
|
const {
|
|
@@ -6691,7 +6856,7 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
6691
6856
|
portal,
|
|
6692
6857
|
scheme,
|
|
6693
6858
|
shadow = 2,
|
|
6694
|
-
zOffset = (
|
|
6859
|
+
zOffset = (_a2 = theme.sanity.layer) == null ? void 0 : _a2.tooltip.zOffset,
|
|
6695
6860
|
...restProps
|
|
6696
6861
|
} = props;
|
|
6697
6862
|
const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
|
|
@@ -6836,10 +7001,16 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
|
|
|
6836
7001
|
})]
|
|
6837
7002
|
});
|
|
6838
7003
|
});
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
7004
|
+
var __freeze$b = Object.freeze;
|
|
7005
|
+
var __defProp$b = Object.defineProperty;
|
|
7006
|
+
var __template$b = (cooked, raw) => __freeze$b(__defProp$b(cooked, "raw", {
|
|
7007
|
+
value: __freeze$b(raw || cooked.slice())
|
|
7008
|
+
}));
|
|
7009
|
+
var _a$b, _b$8, _c$3, _d$2;
|
|
7010
|
+
const Root$9 = styled.div(_a$b || (_a$b = __template$b(["\n line-height: 0;\n"])));
|
|
7011
|
+
const ListBox = styled(Box)(_b$8 || (_b$8 = __template$b(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
|
|
7012
|
+
const rotate = keyframes(_c$3 || (_c$3 = __template$b(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
|
|
7013
|
+
const AnimatedSpinnerIcon = styled(SpinnerIcon)(_d$2 || (_d$2 = __template$b(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
|
|
6843
7014
|
function AutocompleteOption(props) {
|
|
6844
7015
|
const {
|
|
6845
7016
|
children,
|
|
@@ -7363,8 +7534,14 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
|
|
|
7363
7534
|
});
|
|
7364
7535
|
});
|
|
7365
7536
|
const Autocomplete = InnerAutocomplete;
|
|
7366
|
-
|
|
7367
|
-
|
|
7537
|
+
var __freeze$a = Object.freeze;
|
|
7538
|
+
var __defProp$a = Object.defineProperty;
|
|
7539
|
+
var __template$a = (cooked, raw) => __freeze$a(__defProp$a(cooked, "raw", {
|
|
7540
|
+
value: __freeze$a(raw || cooked.slice())
|
|
7541
|
+
}));
|
|
7542
|
+
var _a$a, _b$7;
|
|
7543
|
+
const Root$8 = styled.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"])));
|
|
7544
|
+
const ExpandButton = styled(Button)(_b$7 || (_b$7 = __template$a(["\n appearance: none;\n margin: -4px;\n"])));
|
|
7368
7545
|
const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
|
|
7369
7546
|
const {
|
|
7370
7547
|
children,
|
|
@@ -7474,19 +7651,25 @@ const DialogContext = globalScope[key$3];
|
|
|
7474
7651
|
function useDialog() {
|
|
7475
7652
|
return useContext(DialogContext);
|
|
7476
7653
|
}
|
|
7654
|
+
var __freeze$9 = Object.freeze;
|
|
7655
|
+
var __defProp$9 = Object.defineProperty;
|
|
7656
|
+
var __template$9 = (cooked, raw) => __freeze$9(__defProp$9(cooked, "raw", {
|
|
7657
|
+
value: __freeze$9(raw || cooked.slice())
|
|
7658
|
+
}));
|
|
7659
|
+
var _a$9, _b$6, _c$2, _d$1, _e, _f;
|
|
7477
7660
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
7478
7661
|
if (!boundaryElement || !portalElement) return true;
|
|
7479
7662
|
return containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
7480
7663
|
}
|
|
7481
7664
|
const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
|
|
7482
|
-
const DialogContainer = styled(Container)(
|
|
7483
|
-
const DialogCardRoot = styled(Card)(
|
|
7484
|
-
const DialogLayout = styled(Flex)(
|
|
7485
|
-
const DialogHeader = styled(Card)(
|
|
7486
|
-
const DialogContent = styled(Box)(
|
|
7487
|
-
const DialogFooter = styled(Box)(
|
|
7665
|
+
const DialogContainer = styled(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"])));
|
|
7666
|
+
const DialogCardRoot = styled(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"])));
|
|
7667
|
+
const DialogLayout = styled(Flex)(_c$2 || (_c$2 = __template$9(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
|
|
7668
|
+
const DialogHeader = styled(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"])));
|
|
7669
|
+
const DialogContent = styled(Box)(_e || (_e = __template$9(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
|
|
7670
|
+
const DialogFooter = styled(Box)(_f || (_f = __template$9(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
|
|
7488
7671
|
const DialogCard = forwardRef(function DialogCard2(props, ref) {
|
|
7489
|
-
var
|
|
7672
|
+
var _a2;
|
|
7490
7673
|
const {
|
|
7491
7674
|
__unstable_autoFocus: autoFocus,
|
|
7492
7675
|
__unstable_hideCloseButton: hideCloseButton,
|
|
@@ -7504,7 +7687,7 @@ const DialogCard = forwardRef(function DialogCard2(props, ref) {
|
|
|
7504
7687
|
width: widthProp
|
|
7505
7688
|
} = props;
|
|
7506
7689
|
const portal = usePortal();
|
|
7507
|
-
const portalElement = portalProp ? ((
|
|
7690
|
+
const portalElement = portalProp ? ((_a2 = portal.elements) == null ? void 0 : _a2[portalProp]) || null : portal.element;
|
|
7508
7691
|
const boundaryElement = useBoundaryElement().element;
|
|
7509
7692
|
const radius = useArrayProp(radiusProp);
|
|
7510
7693
|
const shadow = useArrayProp(shadowProp);
|
|
@@ -7598,7 +7781,7 @@ const DialogCard = forwardRef(function DialogCard2(props, ref) {
|
|
|
7598
7781
|
});
|
|
7599
7782
|
});
|
|
7600
7783
|
const Dialog = forwardRef(function Dialog2(props, ref) {
|
|
7601
|
-
var
|
|
7784
|
+
var _a2, _b2;
|
|
7602
7785
|
const dialog = useDialog();
|
|
7603
7786
|
const theme = useTheme();
|
|
7604
7787
|
const {
|
|
@@ -7620,11 +7803,11 @@ const Dialog = forwardRef(function Dialog2(props, ref) {
|
|
|
7620
7803
|
position: positionProp = dialog.position || "fixed",
|
|
7621
7804
|
scheme,
|
|
7622
7805
|
width: widthProp = 0,
|
|
7623
|
-
zOffset: zOffsetProp = dialog.zOffset || ((
|
|
7806
|
+
zOffset: zOffsetProp = dialog.zOffset || ((_a2 = theme.sanity.layer) == null ? void 0 : _a2.dialog.zOffset),
|
|
7624
7807
|
...restProps
|
|
7625
7808
|
} = props;
|
|
7626
7809
|
const portal = usePortal();
|
|
7627
|
-
const portalElement = portalProp ? ((
|
|
7810
|
+
const portalElement = portalProp ? ((_b2 = portal.elements) == null ? void 0 : _b2[portalProp]) || null : portal.element;
|
|
7628
7811
|
const boundaryElement = useBoundaryElement().element;
|
|
7629
7812
|
const cardRadius = useArrayProp(cardRadiusProp);
|
|
7630
7813
|
const padding = useArrayProp(paddingProp);
|
|
@@ -7728,8 +7911,14 @@ function DialogProvider(props) {
|
|
|
7728
7911
|
children
|
|
7729
7912
|
});
|
|
7730
7913
|
}
|
|
7731
|
-
|
|
7732
|
-
|
|
7914
|
+
var __freeze$8 = Object.freeze;
|
|
7915
|
+
var __defProp$8 = Object.defineProperty;
|
|
7916
|
+
var __template$8 = (cooked, raw) => __freeze$8(__defProp$8(cooked, "raw", {
|
|
7917
|
+
value: __freeze$8(raw || cooked.slice())
|
|
7918
|
+
}));
|
|
7919
|
+
var _a$8, _b$5;
|
|
7920
|
+
const Root$6 = styled.kbd(_a$8 || (_a$8 = __template$8(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
|
|
7921
|
+
const Key = styled(KBD)(_b$5 || (_b$5 = __template$8(["\n &:not([hidden]) {\n display: block;\n }\n"])));
|
|
7733
7922
|
const Hotkeys = forwardRef(function Hotkeys2(props, ref) {
|
|
7734
7923
|
const {
|
|
7735
7924
|
fontSize,
|
|
@@ -7904,9 +8093,9 @@ function useMenuController(props) {
|
|
|
7904
8093
|
setActiveIndex(currentIndex);
|
|
7905
8094
|
}, [setActiveIndex]);
|
|
7906
8095
|
const handleItemMouseLeave = useCallback(() => {
|
|
8096
|
+
setActiveIndex(-2);
|
|
7907
8097
|
rootElement == null ? void 0 : rootElement.focus();
|
|
7908
|
-
|
|
7909
|
-
}, [rootElement, setActiveIndex]);
|
|
8098
|
+
}, [setActiveIndex, rootElement]);
|
|
7910
8099
|
useEffect(() => {
|
|
7911
8100
|
if (!mounted) return;
|
|
7912
8101
|
const rafId = window.requestAnimationFrame(() => {
|
|
@@ -7950,7 +8139,13 @@ function useMenuController(props) {
|
|
|
7950
8139
|
setRootElement
|
|
7951
8140
|
};
|
|
7952
8141
|
}
|
|
7953
|
-
|
|
8142
|
+
var __freeze$7 = Object.freeze;
|
|
8143
|
+
var __defProp$7 = Object.defineProperty;
|
|
8144
|
+
var __template$7 = (cooked, raw) => __freeze$7(__defProp$7(cooked, "raw", {
|
|
8145
|
+
value: __freeze$7(raw || cooked.slice())
|
|
8146
|
+
}));
|
|
8147
|
+
var _a$7;
|
|
8148
|
+
const Root$5 = styled(Box)(_a$7 || (_a$7 = __template$7(["\n outline: none;\n overflow: auto;\n"])));
|
|
7954
8149
|
const Menu = forwardRef(function Menu2(props, ref) {
|
|
7955
8150
|
const {
|
|
7956
8151
|
children,
|
|
@@ -8183,12 +8378,24 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
|
|
|
8183
8378
|
children: button || /* @__PURE__ */jsx(Fragment, {})
|
|
8184
8379
|
});
|
|
8185
8380
|
});
|
|
8186
|
-
|
|
8381
|
+
var __freeze$6 = Object.freeze;
|
|
8382
|
+
var __defProp$6 = Object.defineProperty;
|
|
8383
|
+
var __template$6 = (cooked, raw) => __freeze$6(__defProp$6(cooked, "raw", {
|
|
8384
|
+
value: __freeze$6(raw || cooked.slice())
|
|
8385
|
+
}));
|
|
8386
|
+
var _a$6;
|
|
8387
|
+
const MenuDivider = styled.hr(_a$6 || (_a$6 = __template$6(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
|
|
8388
|
+
var __freeze$5 = Object.freeze;
|
|
8389
|
+
var __defProp$5 = Object.defineProperty;
|
|
8390
|
+
var __template$5 = (cooked, raw) => __freeze$5(__defProp$5(cooked, "raw", {
|
|
8391
|
+
value: __freeze$5(raw || cooked.slice())
|
|
8392
|
+
}));
|
|
8393
|
+
var _a$5, _b$4;
|
|
8187
8394
|
function selectableBaseStyle() {
|
|
8188
|
-
return css(
|
|
8395
|
+
return 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 "])));
|
|
8189
8396
|
}
|
|
8190
8397
|
function selectableColorStyle(props) {
|
|
8191
|
-
var
|
|
8398
|
+
var _a2, _b2;
|
|
8192
8399
|
const {
|
|
8193
8400
|
$tone,
|
|
8194
8401
|
theme
|
|
@@ -8199,7 +8406,7 @@ function selectableColorStyle(props) {
|
|
|
8199
8406
|
selectable
|
|
8200
8407
|
} = theme.sanity.color;
|
|
8201
8408
|
const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
|
|
8202
|
-
return css(
|
|
8409
|
+
return 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);
|
|
8203
8410
|
}
|
|
8204
8411
|
const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
|
|
8205
8412
|
function useMenu() {
|
|
@@ -8461,9 +8668,15 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
|
|
|
8461
8668
|
})]
|
|
8462
8669
|
});
|
|
8463
8670
|
});
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8671
|
+
var __freeze$4 = Object.freeze;
|
|
8672
|
+
var __defProp$4 = Object.defineProperty;
|
|
8673
|
+
var __template$4 = (cooked, raw) => __freeze$4(__defProp$4(cooked, "raw", {
|
|
8674
|
+
value: __freeze$4(raw || cooked.slice())
|
|
8675
|
+
}));
|
|
8676
|
+
var _a$4, _b$3, _c$1, _d;
|
|
8677
|
+
const keyframe = keyframes(_a$4 || (_a$4 = __template$4(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
|
|
8678
|
+
const animation = 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);
|
|
8679
|
+
const skeletonStyle = 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 => {
|
|
8467
8680
|
let {
|
|
8468
8681
|
$visible
|
|
8469
8682
|
} = _ref24;
|
|
@@ -8472,7 +8685,7 @@ const skeletonStyle = css(_templateObject79 || (_templateObject79 = _taggedTempl
|
|
|
8472
8685
|
let {
|
|
8473
8686
|
$animated
|
|
8474
8687
|
} = _ref25;
|
|
8475
|
-
return $animated ? animation : css(
|
|
8688
|
+
return $animated ? animation : css(_c$1 || (_c$1 = __template$4(["\n background-color: var(--card-skeleton-color-from);\n "])));
|
|
8476
8689
|
});
|
|
8477
8690
|
const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
|
|
8478
8691
|
const Skeleton = forwardRef(function Skeleton2(props, ref) {
|
|
@@ -8677,6 +8890,12 @@ const TabPanel = forwardRef(function TabPanel2(props, ref) {
|
|
|
8677
8890
|
children: props.children
|
|
8678
8891
|
});
|
|
8679
8892
|
});
|
|
8893
|
+
var __freeze$3 = Object.freeze;
|
|
8894
|
+
var __defProp$3 = Object.defineProperty;
|
|
8895
|
+
var __template$3 = (cooked, raw) => __freeze$3(__defProp$3(cooked, "raw", {
|
|
8896
|
+
value: __freeze$3(raw || cooked.slice())
|
|
8897
|
+
}));
|
|
8898
|
+
var _a$3, _b$2;
|
|
8680
8899
|
const STATUS_CARD_TONE = {
|
|
8681
8900
|
error: "critical",
|
|
8682
8901
|
warning: "caution",
|
|
@@ -8689,8 +8908,8 @@ const ROLES = {
|
|
|
8689
8908
|
success: "alert",
|
|
8690
8909
|
info: "alert"
|
|
8691
8910
|
};
|
|
8692
|
-
const Root$2 = styled(Card)(
|
|
8693
|
-
const TextBox = styled(Flex)(
|
|
8911
|
+
const Root$2 = styled(Card)(_a$3 || (_a$3 = __template$3(["\n pointer-events: all;\n"])));
|
|
8912
|
+
const TextBox = styled(Flex)(_b$2 || (_b$2 = __template$3(["\n overflow-x: auto;\n"])));
|
|
8694
8913
|
function Toast(props) {
|
|
8695
8914
|
const {
|
|
8696
8915
|
closable,
|
|
@@ -8750,8 +8969,14 @@ function useMounted() {
|
|
|
8750
8969
|
const key$1 = Symbol.for("@sanity/ui/context/toast");
|
|
8751
8970
|
globalScope[key$1] = globalScope[key$1] || createContext(null);
|
|
8752
8971
|
const ToastContext = globalScope[key$1];
|
|
8753
|
-
|
|
8754
|
-
|
|
8972
|
+
var __freeze$2 = Object.freeze;
|
|
8973
|
+
var __defProp$2 = Object.defineProperty;
|
|
8974
|
+
var __template$2 = (cooked, raw) => __freeze$2(__defProp$2(cooked, "raw", {
|
|
8975
|
+
value: __freeze$2(raw || cooked.slice())
|
|
8976
|
+
}));
|
|
8977
|
+
var _a$2, _b$1;
|
|
8978
|
+
const Root$1 = styled(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"])));
|
|
8979
|
+
const ToastContainer = styled.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"])));
|
|
8755
8980
|
let toastId = 0;
|
|
8756
8981
|
function ToastProvider(props) {
|
|
8757
8982
|
const {
|
|
@@ -8768,8 +8993,8 @@ function ToastProvider(props) {
|
|
|
8768
8993
|
const id = params.id || String(toastId++);
|
|
8769
8994
|
const duration = params.duration || 5e3;
|
|
8770
8995
|
const dismiss = () => {
|
|
8771
|
-
var
|
|
8772
|
-
const timeoutId = (
|
|
8996
|
+
var _a2;
|
|
8997
|
+
const timeoutId = (_a2 = toastsRef.current[id]) == null ? void 0 : _a2.timeoutId;
|
|
8773
8998
|
setState(prevState => {
|
|
8774
8999
|
const idx = prevState.findIndex(t => t.id === id);
|
|
8775
9000
|
if (idx > -1) {
|
|
@@ -9117,8 +9342,14 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
|
|
|
9117
9342
|
});
|
|
9118
9343
|
}));
|
|
9119
9344
|
Tree.displayName = "Tree";
|
|
9345
|
+
var __freeze$1 = Object.freeze;
|
|
9346
|
+
var __defProp$1 = Object.defineProperty;
|
|
9347
|
+
var __template$1 = (cooked, raw) => __freeze$1(__defProp$1(cooked, "raw", {
|
|
9348
|
+
value: __freeze$1(raw || cooked.slice())
|
|
9349
|
+
}));
|
|
9350
|
+
var _a$1, _b, _c;
|
|
9120
9351
|
function treeItemRootStyle() {
|
|
9121
|
-
return css(
|
|
9352
|
+
return 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 "])));
|
|
9122
9353
|
}
|
|
9123
9354
|
function treeItemRootColorStyle(props) {
|
|
9124
9355
|
const {
|
|
@@ -9131,7 +9362,7 @@ function treeItemRootColorStyle(props) {
|
|
|
9131
9362
|
selectable
|
|
9132
9363
|
} = theme.sanity.color;
|
|
9133
9364
|
const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
|
|
9134
|
-
return css(
|
|
9365
|
+
return 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));
|
|
9135
9366
|
}
|
|
9136
9367
|
function treeItemBoxStyle(props) {
|
|
9137
9368
|
const {
|
|
@@ -9141,7 +9372,7 @@ function treeItemBoxStyle(props) {
|
|
|
9141
9372
|
const {
|
|
9142
9373
|
space
|
|
9143
9374
|
} = theme.sanity;
|
|
9144
|
-
return css(
|
|
9375
|
+
return css(_c || (_c = __template$1(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
|
|
9145
9376
|
}
|
|
9146
9377
|
function useTree() {
|
|
9147
9378
|
const tree = useContext(TreeContext);
|
|
@@ -9168,11 +9399,17 @@ const TreeGroup = memo(function TreeGroup2(props) {
|
|
|
9168
9399
|
children
|
|
9169
9400
|
});
|
|
9170
9401
|
});
|
|
9402
|
+
var __freeze = Object.freeze;
|
|
9403
|
+
var __defProp = Object.defineProperty;
|
|
9404
|
+
var __template = (cooked, raw) => __freeze(__defProp(cooked, "raw", {
|
|
9405
|
+
value: __freeze(raw || cooked.slice())
|
|
9406
|
+
}));
|
|
9407
|
+
var _a;
|
|
9171
9408
|
const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle));
|
|
9172
9409
|
const TreeItemBox = styled(Box).attrs({
|
|
9173
9410
|
forwardedAs: "a"
|
|
9174
9411
|
})(treeItemBoxStyle);
|
|
9175
|
-
const ToggleArrowText = styled(Text)(
|
|
9412
|
+
const ToggleArrowText = styled(Text)(_a || (_a = __template(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
|
|
9176
9413
|
const TreeItem = memo(function TreeItem2(props) {
|
|
9177
9414
|
const {
|
|
9178
9415
|
children,
|