@sanity/ui 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,4 @@
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, _templateObject89;
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
2
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  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';
@@ -7,7 +7,7 @@ import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css,
7
7
  import { white as white$1, black as black$1, hues } from '@sanity/color';
8
8
  import { SpinnerIcon, CheckmarkIcon, RemoveIcon, SelectIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
9
9
  import Refractor from 'react-refractor';
10
- import { detectOverflow, flip, offset, shift, arrow, hide, autoUpdate, useFloating } from '@floating-ui/react-dom';
10
+ import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from '@floating-ui/react-dom';
11
11
  import { createPortal } from 'react-dom';
12
12
  import { AnimatePresence, motion } from 'framer-motion';
13
13
  const EMPTY_ARRAY = [];
@@ -5802,6 +5802,26 @@ function size(options) {
5802
5802
  }
5803
5803
  };
5804
5804
  }
5805
+ function calcCurrentWidth(params) {
5806
+ const {
5807
+ mediaIndex,
5808
+ theme,
5809
+ width
5810
+ } = params;
5811
+ const w = width[mediaIndex];
5812
+ const currentWidth = w === void 0 ? width[width.length - 1] : w;
5813
+ return typeof currentWidth === "number" ? theme.sanity.container[currentWidth] : void 0;
5814
+ }
5815
+ function calcMaxWidth(params) {
5816
+ const {
5817
+ boundaryWidth,
5818
+ currentWidth
5819
+ } = params;
5820
+ if (currentWidth === void 0 && boundaryWidth === void 0) {
5821
+ return void 0;
5822
+ }
5823
+ return Math.min(currentWidth != null ? currentWidth : Infinity, (boundaryWidth || Infinity) - DEFAULT_POPOVER_PADDING * 2);
5824
+ }
5805
5825
  const Root$j = styled.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\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);
5806
5826
  const BorderPath = styled.path(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
5807
5827
  const ShapePath = styled.path(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
@@ -5824,22 +5844,14 @@ const PopoverArrow = forwardRef(function PopoverArrow2(props, ref) {
5824
5844
  })
5825
5845
  });
5826
5846
  });
5827
- function popoverCardStyle(props) {
5828
- const {
5829
- $boundaryWidth
5830
- } = props;
5831
- return {
5832
- "&:not([hidden])": {
5833
- display: "flex"
5834
- },
5835
- flexDirection: "column",
5836
- width: "max-content",
5837
- minWidth: "min-content",
5838
- maxWidth: typeof $boundaryWidth === "number" ? "".concat($boundaryWidth - DEFAULT_POPOVER_PADDING * 2, "px") : void 0
5839
- };
5840
- }
5841
- const Root$i = memo(styled(Card)(popoverCardStyle));
5842
- const PopoverContainer = memo(styled(Container)(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n max-height: inherit;\n max-width: inherit;\n"]))));
5847
+ const Root$i = styled(Card)({
5848
+ "&:not([hidden])": {
5849
+ display: "flex"
5850
+ },
5851
+ flexDirection: "column",
5852
+ width: "max-content",
5853
+ minWidth: "min-content"
5854
+ });
5843
5855
  const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5844
5856
  const {
5845
5857
  __unstable_margins: marginsProp,
@@ -5847,7 +5859,6 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5847
5859
  arrowRef,
5848
5860
  arrowX,
5849
5861
  arrowY,
5850
- boundaryWidth,
5851
5862
  children,
5852
5863
  padding,
5853
5864
  placement,
@@ -5858,7 +5869,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5858
5869
  strategy,
5859
5870
  style,
5860
5871
  tone,
5861
- width = "auto",
5872
+ width,
5862
5873
  x: xProp,
5863
5874
  y: yProp,
5864
5875
  ...restProps
@@ -5873,9 +5884,10 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5873
5884
  position: strategy,
5874
5885
  top: y,
5875
5886
  left: x,
5887
+ width,
5876
5888
  zIndex,
5877
5889
  ...style
5878
- }), [strategy, style, x, y, zIndex]);
5890
+ }), [strategy, style, width, x, y, zIndex]);
5879
5891
  const staticSide = placement && FLOATING_STATIC_SIDES[placement.split("-")[0]];
5880
5892
  const arrowStyle = useMemo(() => {
5881
5893
  const style2 = {
@@ -5888,10 +5900,9 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5888
5900
  return style2;
5889
5901
  }, [arrowX, arrowY, staticSide]);
5890
5902
  return /* @__PURE__ */jsxs(Root$i, {
5903
+ "data-ui": "Popover",
5891
5904
  ...restProps,
5892
- $boundaryWidth: boundaryWidth,
5893
5905
  "data-placement": placement,
5894
- "data-ui": "Popover",
5895
5906
  radius,
5896
5907
  ref,
5897
5908
  scheme,
@@ -5899,14 +5910,17 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5899
5910
  sizing: "border",
5900
5911
  style: rootStyle,
5901
5912
  tone,
5902
- children: [/* @__PURE__ */jsx(PopoverContainer, {
5913
+ children: [/* @__PURE__ */jsx(Flex, {
5903
5914
  "data-ui": "Popover__wrapper",
5915
+ direction: "column",
5904
5916
  flex: 1,
5905
5917
  overflow,
5906
- padding,
5907
- sizing: "border",
5908
- width,
5909
- children
5918
+ children: /* @__PURE__ */jsx(Flex, {
5919
+ direction: "column",
5920
+ flex: 1,
5921
+ padding,
5922
+ children
5923
+ })
5910
5924
  }), arrow && /* @__PURE__ */jsx(PopoverArrow, {
5911
5925
  ref: arrowRef,
5912
5926
  style: arrowStyle
@@ -5915,7 +5929,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5915
5929
  }));
5916
5930
  PopoverCard.displayName = "PopoverCard";
5917
5931
  const Popover = memo(forwardRef(function Popover2(props, ref) {
5918
- var _a, _b, _c, _d, _e;
5932
+ var _a, _b, _c, _d, _e, _f, _g;
5919
5933
  const theme = useTheme();
5920
5934
  const boundaryElementContext = useBoundaryElement();
5921
5935
  const {
@@ -5927,7 +5941,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5927
5941
  content,
5928
5942
  disabled,
5929
5943
  fallbackPlacements,
5930
- matchReferenceWidth: matchReferenceWidthProp,
5944
+ matchReferenceWidth,
5945
+ floatingBoundary = (_a = props.boundaryElement) != null ? _a : boundaryElementContext.element,
5931
5946
  open,
5932
5947
  overflow = "hidden",
5933
5948
  padding: paddingProp,
@@ -5935,28 +5950,65 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5935
5950
  portal,
5936
5951
  preventOverflow = true,
5937
5952
  radius: radiusProp = 3,
5953
+ referenceBoundary = (_b = props.boundaryElement) != null ? _b : boundaryElementContext.element,
5938
5954
  referenceElement,
5939
5955
  scheme,
5940
5956
  shadow: shadowProp = 3,
5941
5957
  tone = "inherit",
5942
5958
  width: widthProp = "auto",
5943
- zOffset: zOffsetProp = (_a = theme.sanity.layer) == null ? void 0 : _a.popover.zOffset,
5959
+ zOffset: zOffsetProp = (_c = theme.sanity.layer) == null ? void 0 : _c.popover.zOffset,
5960
+ updateRef,
5944
5961
  ...restProps
5945
5962
  } = props;
5946
- const boundarySize = (_b = useElementSize(boundaryElement)) == null ? void 0 : _b.border;
5963
+ const boundarySize = (_d = useElementSize(boundaryElement)) == null ? void 0 : _d.border;
5947
5964
  const padding = useArrayProp(paddingProp);
5948
5965
  const radius = useArrayProp(radiusProp);
5949
5966
  const shadow = useArrayProp(shadowProp);
5950
- const width = useArrayProp(widthProp);
5967
+ const widthArrayProp = useArrayProp(widthProp);
5951
5968
  const zOffset = useArrayProp(zOffsetProp);
5952
5969
  const forwardedRef = useForwardedRef(ref);
5953
5970
  const arrowRef = useRef(null);
5954
5971
  const rootBoundary = "viewport";
5972
+ const mediaIndex = useMediaIndex();
5973
+ const boundaryWidth = constrainSize || preventOverflow ? boundarySize == null ? void 0 : boundarySize.width : void 0;
5974
+ const width = calcCurrentWidth({
5975
+ mediaIndex,
5976
+ theme,
5977
+ width: widthArrayProp
5978
+ });
5979
+ const widthRef = useRef(width);
5980
+ useEffect(() => {
5981
+ widthRef.current = width;
5982
+ }, [width]);
5983
+ const maxWidth = calcMaxWidth({
5984
+ boundaryWidth,
5985
+ currentWidth: width
5986
+ });
5987
+ const maxWidthRef = useRef(maxWidth);
5988
+ useEffect(() => {
5989
+ maxWidthRef.current = maxWidth;
5990
+ }, [maxWidth]);
5991
+ const referenceWidthRef = useRef();
5992
+ useEffect(() => {
5993
+ const floatingElement = forwardedRef.current;
5994
+ if (!open || !floatingElement) return;
5995
+ const referenceWidth = referenceWidthRef.current;
5996
+ if (matchReferenceWidth) {
5997
+ if (referenceWidth !== void 0) {
5998
+ floatingElement.style.width = "".concat(referenceWidth, "px");
5999
+ }
6000
+ } else if (width !== void 0) {
6001
+ floatingElement.style.width = "".concat(width, "px");
6002
+ }
6003
+ if (typeof maxWidth === "number") {
6004
+ floatingElement.style.maxWidth = "".concat(maxWidth, "px");
6005
+ }
6006
+ }, [width, forwardedRef, matchReferenceWidth, maxWidth, open]);
5955
6007
  const middleware = useMemo(() => {
5956
6008
  const ret = [];
5957
6009
  if (constrainSize || preventOverflow) {
5958
6010
  ret.push(flip({
5959
- boundary: boundaryElement || void 0,
6011
+ boundary: floatingBoundary || void 0,
5960
6012
  fallbackPlacements,
5961
6013
  padding: DEFAULT_POPOVER_PADDING,
5962
6014
  rootBoundary
@@ -5965,7 +6017,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5965
6017
  ret.push(offset({
5966
6018
  mainAxis: arrowProp ? DEFAULT_POPOVER_DISTANCE : 0
5967
6019
  }));
5968
- if (constrainSize || matchReferenceWidthProp) {
6020
+ if (constrainSize || matchReferenceWidth) {
5969
6021
  ret.push(size({
5970
6022
  apply(_ref21) {
5971
6023
  let {
@@ -5974,24 +6026,29 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5974
6026
  elements,
5975
6027
  referenceWidth
5976
6028
  } = _ref21;
5977
- if (matchReferenceWidthProp) {
6029
+ referenceWidthRef.current = referenceWidth;
6030
+ const _currentWidth = widthRef.current;
6031
+ const _maxWidth = maxWidthRef.current;
6032
+ if (matchReferenceWidth) {
5978
6033
  elements.floating.style.width = "".concat(referenceWidth, "px");
6034
+ } else if (_currentWidth !== void 0) {
6035
+ elements.floating.style.width = "".concat(_currentWidth, "px");
5979
6036
  }
5980
6037
  if (constrainSize) {
5981
- elements.floating.style.maxWidth = "".concat(availableWidth, "px");
6038
+ elements.floating.style.maxWidth = "".concat(Math.min(availableWidth, _maxWidth != null ? _maxWidth : Infinity), "px");
5982
6039
  elements.floating.style.maxHeight = "".concat(availableHeight, "px");
5983
6040
  }
5984
6041
  },
5985
- boundaryElement,
6042
+ boundaryElement: floatingBoundary || void 0,
5986
6043
  constrainSize,
5987
6044
  margins,
5988
- matchReferenceWidth: matchReferenceWidthProp,
6045
+ matchReferenceWidth,
5989
6046
  padding: DEFAULT_POPOVER_PADDING
5990
6047
  }));
5991
6048
  }
5992
6049
  if (preventOverflow) {
5993
6050
  ret.push(shift({
5994
- boundary: boundaryElement || void 0,
6051
+ boundary: floatingBoundary || void 0,
5995
6052
  rootBoundary,
5996
6053
  padding: DEFAULT_POPOVER_PADDING
5997
6054
  }));
@@ -6003,45 +6060,44 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6003
6060
  }));
6004
6061
  }
6005
6062
  ret.push(hide({
6006
- boundary: boundaryElement || void 0,
6063
+ boundary: referenceBoundary || void 0,
6007
6064
  padding: DEFAULT_POPOVER_PADDING,
6008
6065
  strategy: "referenceHidden"
6009
6066
  }));
6010
6067
  return ret;
6011
- }, [arrowProp, boundaryElement, constrainSize, fallbackPlacements, margins, matchReferenceWidthProp, preventOverflow]);
6012
- const floatingProps = useMemo(() => ({
6013
- middleware,
6014
- placement: placementProp,
6015
- whileElementsMounted: autoUpdate
6016
- }), [middleware, placementProp]);
6068
+ }, [arrowProp, constrainSize, fallbackPlacements, floatingBoundary, margins, matchReferenceWidth, preventOverflow, referenceBoundary]);
6017
6069
  const {
6018
6070
  x,
6019
6071
  y,
6020
- placement,
6021
- reference: referenceRef,
6022
- floating: floatingRef,
6023
6072
  middlewareData,
6024
- strategy
6025
- } = useFloating(floatingProps);
6026
- const referenceHidden = (_c = middlewareData.hide) == null ? void 0 : _c.referenceHidden;
6027
- const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
6028
- const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
6073
+ placement,
6074
+ refs,
6075
+ strategy,
6076
+ update
6077
+ } = useFloating({
6078
+ middleware,
6079
+ placement: placementProp,
6080
+ whileElementsMounted: autoUpdate
6081
+ });
6082
+ const referenceHidden = (_e = middlewareData.hide) == null ? void 0 : _e.referenceHidden;
6083
+ const arrowX = (_f = middlewareData.arrow) == null ? void 0 : _f.x;
6084
+ const arrowY = (_g = middlewareData.arrow) == null ? void 0 : _g.y;
6029
6085
  const setArrow = useCallback(arrowEl => {
6030
6086
  arrowRef.current = arrowEl;
6031
6087
  }, []);
6032
6088
  const setFloating = useCallback(node => {
6033
6089
  forwardedRef.current = node;
6034
- floatingRef(node);
6035
- }, [floatingRef, forwardedRef]);
6090
+ refs.setFloating(node);
6091
+ }, [forwardedRef, refs]);
6036
6092
  const setReference = useCallback(node => {
6037
- referenceRef(node);
6093
+ refs.setReference(node);
6038
6094
  const childRef = childProp == null ? void 0 : childProp.ref;
6039
6095
  if (typeof childRef === "function") {
6040
6096
  childRef(node);
6041
6097
  } else if (childRef) {
6042
6098
  childRef.current = node;
6043
6099
  }
6044
- }, [childProp, referenceRef]);
6100
+ }, [childProp, refs]);
6045
6101
  const child = useMemo(() => {
6046
6102
  if (!childProp || referenceElement) return null;
6047
6103
  return cloneElement(childProp, {
@@ -6049,8 +6105,17 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6049
6105
  });
6050
6106
  }, [childProp, referenceElement, setReference]);
6051
6107
  useEffect(() => {
6052
- referenceRef(referenceElement || null);
6053
- }, [referenceRef, referenceElement]);
6108
+ if (updateRef) {
6109
+ if (typeof updateRef === "function") {
6110
+ updateRef(update);
6111
+ } else if (updateRef) {
6112
+ updateRef.current = update;
6113
+ }
6114
+ }
6115
+ }, [update, updateRef]);
6116
+ useEffect(() => {
6117
+ refs.setReference(referenceElement || null);
6118
+ }, [referenceElement, refs]);
6054
6119
  if (disabled) {
6055
6120
  return childProp || /* @__PURE__ */jsx(Fragment, {});
6056
6121
  }
@@ -6063,7 +6128,6 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6063
6128
  arrowRef: setArrow,
6064
6129
  arrowX,
6065
6130
  arrowY,
6066
- boundaryWidth: preventOverflow ? boundarySize == null ? void 0 : boundarySize.width : void 0,
6067
6131
  hidden: referenceHidden,
6068
6132
  overflow,
6069
6133
  padding,
@@ -6074,9 +6138,9 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6074
6138
  shadow,
6075
6139
  strategy,
6076
6140
  tone,
6141
+ width: matchReferenceWidth ? referenceWidthRef.current : width,
6077
6142
  x,
6078
6143
  y,
6079
- width,
6080
6144
  children: content
6081
6145
  })
6082
6146
  });
@@ -6091,7 +6155,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6091
6155
  }));
6092
6156
  Popover.displayName = "Popover";
6093
6157
  function radioBaseStyle() {
6094
- return css(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));
6158
+ return css(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));
6095
6159
  }
6096
6160
  function inputElementStyle(props) {
6097
6161
  const {
@@ -6103,7 +6167,7 @@ function inputElementStyle(props) {
6103
6167
  } = theme.sanity;
6104
6168
  const color = theme.sanity.color.input;
6105
6169
  const dist = (input.radio.size - input.radio.markSize) / 2;
6106
- return css(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\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({
6170
+ return css(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\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({
6107
6171
  color: color.default.enabled.border,
6108
6172
  width: input.border.width
6109
6173
  }), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.default.enabled.fg, focusRingStyle({
@@ -6145,14 +6209,14 @@ const Radio = forwardRef(function Radio2(props, forwardedRef) {
6145
6209
  });
6146
6210
  });
6147
6211
  function rootStyle() {
6148
- return css(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n position: relative;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6212
+ return css(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n position: relative;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6149
6213
  }
6150
6214
  function inputBaseStyle(props) {
6151
6215
  const {
6152
6216
  theme
6153
6217
  } = props;
6154
6218
  const font = theme.sanity.fonts.text;
6155
- return css(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\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);
6219
+ return css(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\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);
6156
6220
  }
6157
6221
  function inputColorStyle(props) {
6158
6222
  const {
@@ -6163,7 +6227,7 @@ function inputColorStyle(props) {
6163
6227
  input
6164
6228
  } = theme.sanity;
6165
6229
  const color = theme.sanity.color.input;
6166
- return css(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\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({
6230
+ return css(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\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({
6167
6231
  color: color.default.enabled.border,
6168
6232
  width: input.border.width
6169
6233
  }), color.default.hovered.bg, color.default.hovered.fg, focusRingBorderStyle({
@@ -6207,7 +6271,7 @@ function iconBoxStyle(props) {
6207
6271
  theme
6208
6272
  } = props;
6209
6273
  const color = theme.sanity.color.input;
6210
- return css(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\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);
6274
+ return css(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\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);
6211
6275
  }
6212
6276
  const selectStyle = {
6213
6277
  root: rootStyle,
@@ -6295,10 +6359,10 @@ const Stack = forwardRef(function Stack2(props, ref) {
6295
6359
  });
6296
6360
  });
6297
6361
  function switchBaseStyles() {
6298
- return css(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6362
+ return css(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6299
6363
  }
6300
6364
  function switchInputStyles() {
6301
- return css(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\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 "])));
6365
+ return css(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\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 "])));
6302
6366
  }
6303
6367
  function switchRepresentationStyles(props) {
6304
6368
  const {
@@ -6309,7 +6373,7 @@ function switchRepresentationStyles(props) {
6309
6373
  input
6310
6374
  } = theme.sanity;
6311
6375
  const color = theme.sanity.color.button.default;
6312
- return css(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\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({
6376
+ return css(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\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({
6313
6377
  focusRing
6314
6378
  }), 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);
6315
6379
  }
@@ -6320,7 +6384,7 @@ function switchTrackStyles(props) {
6320
6384
  const {
6321
6385
  input
6322
6386
  } = theme.sanity;
6323
- return css(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\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));
6387
+ return css(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\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));
6324
6388
  }
6325
6389
  function switchThumbStyles(props) {
6326
6390
  const {
@@ -6337,7 +6401,7 @@ function switchThumbStyles(props) {
6337
6401
  const checkedOffset = trackWidth - trackPadding * 2 - size;
6338
6402
  const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
6339
6403
  const checked = $indeterminate !== true && props.$checked === true;
6340
- return css(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\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(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && css(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
6404
+ return css(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\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(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && css(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
6341
6405
  }
6342
6406
  const Root$e = styled.span(switchBaseStyles);
6343
6407
  const Input$2 = styled.input(switchInputStyles);
@@ -6382,7 +6446,7 @@ const Switch = forwardRef(function Switch2(props, forwardedRef) {
6382
6446
  });
6383
6447
  });
6384
6448
  const Root$d = styled.span(textInputRootStyle);
6385
- const InputRoot$1 = styled.span(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6449
+ const InputRoot$1 = styled.span(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6386
6450
  const Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6387
6451
  const Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle);
6388
6452
  const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
@@ -6432,18 +6496,18 @@ const CLEAR_BUTTON_BOX_STYLE = {
6432
6496
  const Root$c = styled(Card).attrs({
6433
6497
  forwardedAs: "span"
6434
6498
  })(textInputRootStyle);
6435
- const InputRoot = styled.span(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6499
+ const InputRoot = styled.span(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6436
6500
  const Prefix = styled(Card).attrs({
6437
6501
  forwardedAs: "span"
6438
- })(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6502
+ })(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6439
6503
  const Suffix = styled(Card).attrs({
6440
6504
  forwardedAs: "span"
6441
- })(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6505
+ })(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6442
6506
  const Input = styled.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6443
6507
  const Presentation = styled.span(responsiveRadiusStyle, textInputRepresentationStyle);
6444
- const LeftBox = styled(Box)(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
6445
- const RightBox = styled(Box)(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
6446
- const RightCard = styled(Card)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
6508
+ const LeftBox = styled(Box)(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
6509
+ const RightBox = styled(Box)(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
6510
+ const RightCard = styled(Card)(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
6447
6511
  const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6448
6512
  const {
6449
6513
  border = true,
@@ -6588,9 +6652,9 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6588
6652
  }), suffixNode]
6589
6653
  });
6590
6654
  });
6591
- const Root$b = styled.div(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\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"])));
6592
- const Border = styled.path(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
6593
- const Shape = styled.path(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
6655
+ const Root$b = styled.div(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\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"])));
6656
+ const Border = styled.path(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
6657
+ const Shape = styled.path(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
6594
6658
  const TooltipArrow = forwardRef(function TooltipArrow2(props, ref) {
6595
6659
  const {
6596
6660
  ...restProps
@@ -6611,7 +6675,7 @@ const TooltipArrow = forwardRef(function TooltipArrow2(props, ref) {
6611
6675
  })
6612
6676
  });
6613
6677
  });
6614
- const Root$a = styled(Layer)(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["\n pointer-events: none;\n"])));
6678
+ const Root$a = styled(Layer)(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n pointer-events: none;\n"])));
6615
6679
  const Tooltip = forwardRef(function Tooltip2(props, ref) {
6616
6680
  var _a, _b, _c;
6617
6681
  const boundaryElementContext = useBoundaryElement();
@@ -6661,9 +6725,8 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6661
6725
  x,
6662
6726
  y,
6663
6727
  placement,
6664
- reference,
6665
- floating,
6666
6728
  middlewareData,
6729
+ refs,
6667
6730
  update,
6668
6731
  strategy
6669
6732
  } = useFloating({
@@ -6715,15 +6778,15 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6715
6778
  useEffect(() => {
6716
6779
  if (!content) setIsOpen(false);
6717
6780
  }, [content]);
6718
- useEffect(() => reference(referenceElement), [reference, referenceElement]);
6781
+ useEffect(() => refs.setReference(referenceElement), [referenceElement, refs]);
6719
6782
  const setArrow = useCallback(arrowEl => {
6720
6783
  arrowRef.current = arrowEl;
6721
6784
  update();
6722
6785
  }, [update]);
6723
6786
  const setFloating = useCallback(node => {
6724
6787
  forwardedRef.current = node;
6725
- floating(node);
6726
- }, [floating, forwardedRef]);
6788
+ refs.setFloating(node);
6789
+ }, [forwardedRef, refs]);
6727
6790
  const childRef = childProp == null ? void 0 : childProp.ref;
6728
6791
  const setReference = useCallback(node => {
6729
6792
  if (typeof childRef === "function") {
@@ -6773,10 +6836,10 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6773
6836
  })]
6774
6837
  });
6775
6838
  });
6776
- const Root$9 = styled.div(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n line-height: 0;\n"])));
6777
- const ListBox = styled(Box)(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
6778
- const rotate = keyframes(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
6779
- const AnimatedSpinnerIcon = styled(SpinnerIcon)(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
6839
+ const Root$9 = styled.div(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["\n line-height: 0;\n"])));
6840
+ const ListBox = styled(Box)(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
6841
+ const rotate = keyframes(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
6842
+ const AnimatedSpinnerIcon = styled(SpinnerIcon)(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
6780
6843
  function AutocompleteOption(props) {
6781
6844
  const {
6782
6845
  children,
@@ -7300,8 +7363,8 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7300
7363
  });
7301
7364
  });
7302
7365
  const Autocomplete = InnerAutocomplete;
7303
- const Root$8 = styled.ol(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["\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"])));
7304
- const ExpandButton = styled(Button)(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\n appearance: none;\n margin: -4px;\n"])));
7366
+ const Root$8 = styled.ol(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\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"])));
7367
+ const ExpandButton = styled(Button)(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["\n appearance: none;\n margin: -4px;\n"])));
7305
7368
  const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7306
7369
  const {
7307
7370
  children,
@@ -7416,12 +7479,12 @@ function isTargetWithinScope(boundaryElement, portalElement, target) {
7416
7479
  return containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
7417
7480
  }
7418
7481
  const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
7419
- const DialogContainer = styled(Container)(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["\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"])));
7420
- const DialogCardRoot = styled(Card)(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["\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"])));
7421
- const DialogLayout = styled(Flex)(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
7422
- const DialogHeader = styled(Card)(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["\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"])));
7423
- const DialogContent = styled(Box)(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
7424
- const DialogFooter = styled(Box)(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
7482
+ const DialogContainer = styled(Container)(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\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"])));
7483
+ const DialogCardRoot = styled(Card)(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["\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"])));
7484
+ const DialogLayout = styled(Flex)(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
7485
+ const DialogHeader = styled(Card)(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\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"])));
7486
+ const DialogContent = styled(Box)(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
7487
+ const DialogFooter = styled(Box)(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
7425
7488
  const DialogCard = forwardRef(function DialogCard2(props, ref) {
7426
7489
  var _a;
7427
7490
  const {
@@ -7665,8 +7728,8 @@ function DialogProvider(props) {
7665
7728
  children
7666
7729
  });
7667
7730
  }
7668
- const Root$6 = styled.kbd(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
7669
- const Key = styled(KBD)(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n"])));
7731
+ const Root$6 = styled.kbd(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
7732
+ const Key = styled(KBD)(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n"])));
7670
7733
  const Hotkeys = forwardRef(function Hotkeys2(props, ref) {
7671
7734
  const {
7672
7735
  fontSize,
@@ -7887,7 +7950,7 @@ function useMenuController(props) {
7887
7950
  setRootElement
7888
7951
  };
7889
7952
  }
7890
- const Root$5 = styled(Box)(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
7953
+ const Root$5 = styled(Box)(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
7891
7954
  const Menu = forwardRef(function Menu2(props, ref) {
7892
7955
  const {
7893
7956
  children,
@@ -8120,9 +8183,9 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
8120
8183
  children: button || /* @__PURE__ */jsx(Fragment, {})
8121
8184
  });
8122
8185
  });
8123
- const MenuDivider = styled.hr(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
8186
+ const MenuDivider = styled.hr(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
8124
8187
  function selectableBaseStyle() {
8125
- return css(_templateObject76 || (_templateObject76 = _taggedTemplateLiteral(["\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 "])));
8188
+ return css(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["\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 "])));
8126
8189
  }
8127
8190
  function selectableColorStyle(props) {
8128
8191
  var _a, _b;
@@ -8136,7 +8199,7 @@ function selectableColorStyle(props) {
8136
8199
  selectable
8137
8200
  } = theme.sanity.color;
8138
8201
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
8139
- return css(_templateObject77 || (_templateObject77 = _taggedTemplateLiteral(["\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), (_b = (_a = theme.sanity.styles) == null ? void 0 : _a.card) == null ? void 0 : _b.root);
8202
+ return css(_templateObject76 || (_templateObject76 = _taggedTemplateLiteral(["\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), (_b = (_a = theme.sanity.styles) == null ? void 0 : _a.card) == null ? void 0 : _b.root);
8140
8203
  }
8141
8204
  const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
8142
8205
  function useMenu() {
@@ -8398,9 +8461,9 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8398
8461
  })]
8399
8462
  });
8400
8463
  });
8401
- const keyframe = keyframes(_templateObject78 || (_templateObject78 = _taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
8402
- const animation = css(_templateObject79 || (_templateObject79 = _taggedTemplateLiteral(["\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);
8403
- const skeletonStyle = css(_templateObject80 || (_templateObject80 = _taggedTemplateLiteral(["\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 => {
8464
+ const keyframe = keyframes(_templateObject77 || (_templateObject77 = _taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
8465
+ const animation = css(_templateObject78 || (_templateObject78 = _taggedTemplateLiteral(["\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);
8466
+ const skeletonStyle = css(_templateObject79 || (_templateObject79 = _taggedTemplateLiteral(["\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 => {
8404
8467
  let {
8405
8468
  $visible
8406
8469
  } = _ref24;
@@ -8409,7 +8472,7 @@ const skeletonStyle = css(_templateObject80 || (_templateObject80 = _taggedTempl
8409
8472
  let {
8410
8473
  $animated
8411
8474
  } = _ref25;
8412
- return $animated ? animation : css(_templateObject81 || (_templateObject81 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8475
+ return $animated ? animation : css(_templateObject80 || (_templateObject80 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8413
8476
  });
8414
8477
  const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
8415
8478
  const Skeleton = forwardRef(function Skeleton2(props, ref) {
@@ -8626,8 +8689,8 @@ const ROLES = {
8626
8689
  success: "alert",
8627
8690
  info: "alert"
8628
8691
  };
8629
- const Root$2 = styled(Card)(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n pointer-events: all;\n"])));
8630
- const TextBox = styled(Flex)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n overflow-x: auto;\n"])));
8692
+ const Root$2 = styled(Card)(_templateObject81 || (_templateObject81 = _taggedTemplateLiteral(["\n pointer-events: all;\n"])));
8693
+ const TextBox = styled(Flex)(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n overflow-x: auto;\n"])));
8631
8694
  function Toast(props) {
8632
8695
  const {
8633
8696
  closable,
@@ -8687,8 +8750,8 @@ function useMounted() {
8687
8750
  const key$1 = Symbol.for("@sanity/ui/context/toast");
8688
8751
  globalScope[key$1] = globalScope[key$1] || createContext(null);
8689
8752
  const ToastContext = globalScope[key$1];
8690
- const Root$1 = styled(Layer)(_templateObject84 || (_templateObject84 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n"])));
8691
- const ToastContainer = styled.div(_templateObject85 || (_templateObject85 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: absolute;\n right: 0;\n bottom: 0;\n max-width: 420px;\n width: 100%;\n"])));
8753
+ const Root$1 = styled(Layer)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n"])));
8754
+ const ToastContainer = styled.div(_templateObject84 || (_templateObject84 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: absolute;\n right: 0;\n bottom: 0;\n max-width: 420px;\n width: 100%;\n"])));
8692
8755
  let toastId = 0;
8693
8756
  function ToastProvider(props) {
8694
8757
  const {
@@ -9049,7 +9112,7 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
9049
9112
  }));
9050
9113
  Tree.displayName = "Tree";
9051
9114
  function treeItemRootStyle() {
9052
- return css(_templateObject86 || (_templateObject86 = _taggedTemplateLiteral(["\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 "])));
9115
+ return css(_templateObject85 || (_templateObject85 = _taggedTemplateLiteral(["\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 "])));
9053
9116
  }
9054
9117
  function treeItemRootColorStyle(props) {
9055
9118
  const {
@@ -9062,7 +9125,7 @@ function treeItemRootColorStyle(props) {
9062
9125
  selectable
9063
9126
  } = theme.sanity.color;
9064
9127
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
9065
- return css(_templateObject87 || (_templateObject87 = _taggedTemplateLiteral(["\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));
9128
+ return css(_templateObject86 || (_templateObject86 = _taggedTemplateLiteral(["\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));
9066
9129
  }
9067
9130
  function treeItemBoxStyle(props) {
9068
9131
  const {
@@ -9072,7 +9135,7 @@ function treeItemBoxStyle(props) {
9072
9135
  const {
9073
9136
  space
9074
9137
  } = theme.sanity;
9075
- return css(_templateObject88 || (_templateObject88 = _taggedTemplateLiteral(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
9138
+ return css(_templateObject87 || (_templateObject87 = _taggedTemplateLiteral(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
9076
9139
  }
9077
9140
  function useTree() {
9078
9141
  const tree = useContext(TreeContext);
@@ -9103,7 +9166,7 @@ const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle));
9103
9166
  const TreeItemBox = styled(Box).attrs({
9104
9167
  forwardedAs: "a"
9105
9168
  })(treeItemBoxStyle);
9106
- const ToggleArrowText = styled(Text)(_templateObject89 || (_templateObject89 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
9169
+ const ToggleArrowText = styled(Text)(_templateObject88 || (_templateObject88 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
9107
9170
  const TreeItem = memo(function TreeItem2(props) {
9108
9171
  const {
9109
9172
  children,