@sanity/ui 1.0.0-beta.30 → 1.0.0-beta.32

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.
Files changed (28) hide show
  1. package/dist/sanity-ui.esm.js +163 -95
  2. package/dist/sanity-ui.esm.js.map +1 -1
  3. package/dist/sanity-ui.js +162 -94
  4. package/dist/sanity-ui.js.map +1 -1
  5. package/dist/types/src/index.d.ts +0 -6
  6. package/package.json +4 -4
  7. package/src/__workshop__/constants.ts +31 -22
  8. package/src/components/autocomplete/autocomplete.styles.tsx +1 -10
  9. package/src/components/autocomplete/autocomplete.tsx +13 -3
  10. package/src/components/menu/__workshop__/closableMenuButton.tsx +6 -2
  11. package/src/components/menu/__workshop__/constrainedInBoundary.tsx +5 -11
  12. package/src/components/menu/__workshop__/disableFocusOnClose.tsx +7 -2
  13. package/src/components/menu/__workshop__/groups.tsx +16 -3
  14. package/src/components/menu/__workshop__/menuButton.tsx +11 -1
  15. package/src/components/menu/__workshop__/menuGroupRight.tsx +8 -1
  16. package/src/components/menu/__workshop__/onCloseMenuButton.tsx +6 -2
  17. package/src/components/menu/__workshop__/selectedItem.tsx +16 -2
  18. package/src/components/menu/__workshop__/withoutArrow.tsx +12 -10
  19. package/src/primitives/card/styles.ts +3 -1
  20. package/src/primitives/popover/__workshop__/{RightAlignedStory.tsx → AlignedStory.tsx} +19 -7
  21. package/src/primitives/popover/__workshop__/PlainStory.tsx +24 -21
  22. package/src/primitives/popover/__workshop__/TestStory.tsx +2 -0
  23. package/src/primitives/popover/__workshop__/index.ts +3 -3
  24. package/src/primitives/popover/constants.ts +10 -0
  25. package/src/primitives/popover/floating-ui/size.ts +67 -0
  26. package/src/primitives/popover/popover.tsx +43 -50
  27. package/src/primitives/popover/popoverArrow.tsx +10 -9
  28. package/src/primitives/popover/popoverCard.tsx +39 -29
@@ -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, _templateObject90;
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;
2
2
 
3
3
  const _excluded = ["color", "layer"],
4
4
  _excluded2 = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"],
@@ -21,8 +21,8 @@ const _excluded = ["color", "layer"],
21
21
  _excluded19 = ["children", "style"],
22
22
  _excluded20 = ["children", "zOffset"],
23
23
  _excluded21 = ["as", "gap", "getItemKey", "items", "onChange", "renderItem"],
24
- _excluded22 = ["__unstable_margins", "arrow", "arrowRef", "arrowX", "arrowY", "availableHeight", "availableWidth", "boundaryWidth", "children", "padding", "placement", "overflow", "radius", "referenceWidth", "scheme", "shadow", "strategy", "tone", "width", "x", "y"],
25
- _excluded23 = ["__unstable_margins", "allowedAutoPlacements", "arrow", "boundaryElement", "children", "constrainSize", "content", "disabled", "fallbackPlacements", "matchReferenceWidth", "open", "overflow", "padding", "placement", "portal", "preventOverflow", "radius", "referenceElement", "scheme", "shadow", "tether", "tetherOffset", "tone", "width", "zOffset"],
24
+ _excluded22 = ["__unstable_margins", "arrow", "arrowRef", "arrowX", "arrowY", "availableHeight", "availableWidth", "boundaryWidth", "children", "padding", "placement", "overflow", "radius", "referenceWidth", "scheme", "shadow", "strategy", "style", "tone", "width", "x", "y"],
25
+ _excluded23 = ["__unstable_margins", "arrow", "boundaryElement", "children", "constrainSize", "content", "disabled", "fallbackPlacements", "matchReferenceWidth", "open", "overflow", "padding", "placement", "portal", "preventOverflow", "radius", "referenceElement", "scheme", "shadow", "tone", "width", "zOffset"],
26
26
  _excluded24 = ["className", "disabled", "style", "customValidity", "readOnly"],
27
27
  _excluded25 = ["children", "customValidity", "disabled", "fontSize", "padding", "radius", "readOnly", "space"],
28
28
  _excluded26 = ["as", "space"],
@@ -71,7 +71,7 @@ import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css,
71
71
  import { white as white$1, black as black$1, hues } from '@sanity/color';
72
72
  import { SpinnerIcon, CheckmarkIcon, RemoveIcon, SelectIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
73
73
  import Refractor from 'react-refractor';
74
- import { flip, offset, shift, arrow, useFloating, autoUpdate, size as size$2 } from '@floating-ui/react-dom';
74
+ import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from '@floating-ui/react-dom';
75
75
  import { createPortal } from 'react-dom';
76
76
  import { AnimatePresence, motion } from 'framer-motion';
77
77
  const EMPTY_ARRAY = [];
@@ -5113,13 +5113,14 @@ function cardColorStyle(props) {
5113
5113
  } = theme.sanity;
5114
5114
  const {
5115
5115
  base,
5116
- card
5116
+ card,
5117
+ dark
5117
5118
  } = theme.sanity.color;
5118
5119
  const border = {
5119
5120
  width: 0,
5120
5121
  color: "var(--card-border-color)"
5121
5122
  };
5122
- return css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\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 &: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 &: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 "])), _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({
5123
+ return css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\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 &: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 &: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({
5123
5124
  base,
5124
5125
  border,
5125
5126
  focusRing
@@ -6187,7 +6188,82 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
6187
6188
  })
6188
6189
  }));
6189
6190
  });
6190
- const Root$j = styled.div(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n position: absolute;\n pointer-events: none;\n width: 27px;\n height: 27px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: 13.5px 13.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"])));
6191
+ const DEFAULT_POPOVER_DISTANCE = 4;
6192
+ const DEFAULT_POPOVER_PADDING = 4;
6193
+ const DEFAULT_POPOVER_ARROW_WIDTH = 27;
6194
+ const DEFAULT_POPOVER_ARROW_HEIGHT = 11;
6195
+ const DEFAULT_POPOVER_MARGINS = [0, 0, 0, 0];
6196
+
6197
+ function size(scope) {
6198
+ const {
6199
+ padding = 0
6200
+ } = scope;
6201
+ return {
6202
+ name: "@sanity/ui/size",
6203
+
6204
+ async fn(args) {
6205
+ const {
6206
+ placement,
6207
+ rects
6208
+ } = args;
6209
+ const {
6210
+ floating,
6211
+ reference
6212
+ } = rects;
6213
+ const overflow = await detectOverflow(args, {
6214
+ altBoundary: true,
6215
+ boundary: scope.boundaryElement || void 0,
6216
+ elementContext: "floating",
6217
+ padding,
6218
+ rootBoundary: "viewport"
6219
+ });
6220
+ let maxWidth = Infinity;
6221
+ let maxHeight = Infinity;
6222
+
6223
+ if (placement.includes("top")) {
6224
+ maxWidth = floating.width - (overflow.left + overflow.right);
6225
+ maxHeight = floating.height - overflow.top - padding;
6226
+ }
6227
+
6228
+ if (placement.includes("right")) {
6229
+ maxWidth = floating.width - overflow.right - padding;
6230
+ maxHeight = floating.height - (overflow.top + overflow.bottom);
6231
+ }
6232
+
6233
+ if (placement.includes("bottom")) {
6234
+ maxWidth = floating.width - (overflow.left + overflow.right);
6235
+ maxHeight = floating.height - overflow.bottom - padding;
6236
+ }
6237
+
6238
+ if (placement.includes("left")) {
6239
+ maxWidth = floating.width - overflow.left - padding;
6240
+ maxHeight = floating.height - (overflow.top + overflow.bottom);
6241
+ }
6242
+
6243
+ if (scope.constrainSize) {
6244
+ scope.setAvailableWidth(maxWidth);
6245
+ scope.setAvailableHeight(maxHeight);
6246
+ }
6247
+
6248
+ if (scope.matchReferenceWidth) {
6249
+ scope.setReferenceWidth(reference.width);
6250
+ }
6251
+
6252
+ if (!floating.width || !floating.height) {
6253
+ return {
6254
+ reset: {
6255
+ rects: true
6256
+ }
6257
+ };
6258
+ }
6259
+
6260
+ return {};
6261
+ }
6262
+
6263
+ };
6264
+ }
6265
+
6266
+ const Root$j = styled.div(_templateObject33 || (_templateObject33 = _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);
6191
6267
  const BorderPath = styled.path(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
6192
6268
  const ShapePath = styled.path(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
6193
6269
  const PopoverArrow = forwardRef(function PopoverArrow2(props, ref) {
@@ -6196,8 +6272,8 @@ const PopoverArrow = forwardRef(function PopoverArrow2(props, ref) {
6196
6272
  }, props), {}, {
6197
6273
  ref,
6198
6274
  children: /* @__PURE__ */jsxs("svg", {
6199
- width: "27",
6200
- height: "11",
6275
+ width: DEFAULT_POPOVER_ARROW_WIDTH,
6276
+ height: DEFAULT_POPOVER_ARROW_HEIGHT,
6201
6277
  viewBox: "0 0 27 11",
6202
6278
  fill: "none",
6203
6279
  xmlns: "http://www.w3.org/2000/svg",
@@ -6215,7 +6291,13 @@ function popoverCardStyle(props) {
6215
6291
  $boundaryWidth
6216
6292
  } = props;
6217
6293
  return {
6218
- maxWidth: $boundaryWidth ? "".concat($boundaryWidth - 16, "px") : "calc(100% - 16px)"
6294
+ "&:not([hidden])": {
6295
+ display: "flex"
6296
+ },
6297
+ flexDirection: "column",
6298
+ width: "max-content",
6299
+ minWidth: "min-content",
6300
+ maxWidth: typeof $boundaryWidth === "number" ? "".concat($boundaryWidth - DEFAULT_POPOVER_PADDING * 2, "px") : void 0
6219
6301
  };
6220
6302
  }
6221
6303
 
@@ -6239,8 +6321,9 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6239
6321
  scheme,
6240
6322
  shadow,
6241
6323
  strategy,
6324
+ style,
6242
6325
  tone,
6243
- width,
6326
+ width = "auto",
6244
6327
  x: xProp,
6245
6328
  y: yProp
6246
6329
  } = props,
@@ -6249,33 +6332,29 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6249
6332
  const {
6250
6333
  zIndex
6251
6334
  } = useLayer();
6252
- const margins = useMemo(() => marginsProp || [0, 0, 0, 0], [marginsProp]);
6335
+ const margins = useMemo(() => marginsProp || DEFAULT_POPOVER_MARGINS, [marginsProp]);
6253
6336
  const referenceWidth = referenceWidthProp ? referenceWidthProp - margins[1] - margins[3] : void 0;
6254
6337
  const x = (xProp != null ? xProp : 0) + margins[3];
6255
6338
  const y = (yProp != null ? yProp : 0) + margins[0];
6256
- const maxWidth = availableWidth ? Math.min(availableWidth - 8, referenceWidth || Infinity) : void 0;
6257
- const rootStyle = useMemo(() => ({
6339
+ const rootStyle = useMemo(() => _objectSpread({
6258
6340
  position: strategy,
6259
6341
  top: y,
6260
6342
  left: x,
6261
6343
  zIndex,
6262
6344
  width: referenceWidth,
6263
- maxWidth: referenceWidth ? void 0 : maxWidth
6264
- }), [referenceWidth, maxWidth, strategy, x, y, zIndex]);
6265
- const wrapperStyle = useMemo(() => ({
6266
- minHeight: 25,
6267
- maxHeight: availableHeight ? availableHeight - 8 : void 0
6268
- }), [availableHeight]);
6345
+ maxWidth: availableWidth,
6346
+ maxHeight: availableHeight
6347
+ }, style), [availableHeight, availableWidth, referenceWidth, strategy, style, x, y, zIndex]);
6269
6348
  const staticSide = placement && FLOATING_STATIC_SIDES[placement.split("-")[0]];
6270
6349
  const arrowStyle = useMemo(() => {
6271
- const style = {
6350
+ const style2 = {
6272
6351
  left: arrowX !== null ? arrowX : void 0,
6273
6352
  top: arrowY !== null ? arrowY : void 0,
6274
6353
  right: void 0,
6275
6354
  bottom: void 0
6276
6355
  };
6277
- if (staticSide) style[staticSide] = -27;
6278
- return style;
6356
+ if (staticSide) style2[staticSide] = 0 - DEFAULT_POPOVER_ARROW_WIDTH;
6357
+ return style2;
6279
6358
  }, [arrowX, arrowY, staticSide]);
6280
6359
  return /* @__PURE__ */jsxs(Root$i, _objectSpread(_objectSpread({}, restProps), {}, {
6281
6360
  $boundaryWidth: boundaryWidth,
@@ -6287,13 +6366,13 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6287
6366
  shadow,
6288
6367
  style: rootStyle,
6289
6368
  tone,
6290
- $width: width,
6291
- children: [/* @__PURE__ */jsx(Box, {
6369
+ children: [/* @__PURE__ */jsx(Container, {
6292
6370
  "data-ui": "Popover__wrapper",
6371
+ flex: 1,
6293
6372
  overflow,
6294
6373
  padding,
6295
6374
  sizing: "border",
6296
- style: wrapperStyle,
6375
+ width,
6297
6376
  children
6298
6377
  }), arrow && /* @__PURE__ */jsx(PopoverArrow, {
6299
6378
  ref: arrowRef,
@@ -6302,33 +6381,14 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6302
6381
  }));
6303
6382
  }));
6304
6383
  PopoverCard.displayName = "PopoverCard";
6305
-
6306
- function size(scope) {
6307
- return size$2({
6308
- apply(args) {
6309
- if (scope.constrainSize) {
6310
- scope.setAvailableWidth(args.availableWidth);
6311
- scope.setAvailableHeight(args.availableHeight);
6312
- }
6313
-
6314
- if (scope.matchReferenceWidth) {
6315
- scope.setReferenceWidth(args.rects.reference.width);
6316
- }
6317
- },
6318
-
6319
- boundary: scope.boundaryElement || void 0
6320
- });
6321
- }
6322
-
6323
6384
  const Popover = memo(forwardRef(function Popover2(props, ref) {
6324
- var _a, _b, _c, _d;
6385
+ var _a, _b, _c, _d, _e;
6325
6386
 
6326
6387
  const theme = useTheme();
6327
6388
  const boundaryElementContext = useBoundaryElement();
6328
6389
 
6329
6390
  const {
6330
6391
  __unstable_margins: margins,
6331
- allowedAutoPlacements,
6332
6392
  arrow: arrowProp = true,
6333
6393
  boundaryElement = boundaryElementContext.element,
6334
6394
  children: childProp,
@@ -6338,7 +6398,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6338
6398
  fallbackPlacements,
6339
6399
  matchReferenceWidth: matchReferenceWidthProp,
6340
6400
  open,
6341
- overflow = props.constrainSize ? "auto" : void 0,
6401
+ overflow = props.constrainSize ? "auto" : "hidden",
6342
6402
  padding: paddingProp,
6343
6403
  placement: placementProp = "bottom",
6344
6404
  portal,
@@ -6347,10 +6407,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6347
6407
  referenceElement,
6348
6408
  scheme,
6349
6409
  shadow: shadowProp = 3,
6350
- tether,
6351
- tetherOffset,
6352
6410
  tone = "inherit",
6353
- width: widthProp = void 0,
6411
+ width: widthProp = "auto",
6354
6412
  zOffset: zOffsetProp = (_a = theme.sanity.layer) == null ? void 0 : _a.popover.zOffset
6355
6413
  } = props,
6356
6414
  restProps = _objectWithoutProperties(props, _excluded23);
@@ -6374,38 +6432,47 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6374
6432
  ret.push(flip({
6375
6433
  boundary: boundaryElement || void 0,
6376
6434
  fallbackPlacements,
6377
- padding: 8,
6435
+ padding: DEFAULT_POPOVER_PADDING,
6378
6436
  rootBoundary
6379
6437
  }));
6380
6438
  }
6381
6439
 
6382
- ret.push(size({
6383
- boundaryElement,
6384
- constrainSize,
6385
- matchReferenceWidth: matchReferenceWidthProp,
6386
- setAvailableHeight,
6387
- setAvailableWidth,
6388
- setReferenceWidth
6389
- }));
6440
+ if (constrainSize || matchReferenceWidthProp) {
6441
+ ret.push(size({
6442
+ boundaryElement,
6443
+ constrainSize,
6444
+ matchReferenceWidth: matchReferenceWidthProp,
6445
+ padding: DEFAULT_POPOVER_PADDING,
6446
+ setAvailableHeight,
6447
+ setAvailableWidth,
6448
+ setReferenceWidth
6449
+ }));
6450
+ }
6451
+
6390
6452
  ret.push(offset({
6391
- mainAxis: arrowProp ? 4 : 0
6453
+ mainAxis: arrowProp ? DEFAULT_POPOVER_DISTANCE : 0
6392
6454
  }));
6393
6455
 
6394
6456
  if (preventOverflow) {
6395
6457
  ret.push(shift({
6396
6458
  boundary: boundaryElement || void 0,
6397
6459
  rootBoundary,
6398
- padding: 8
6460
+ padding: DEFAULT_POPOVER_PADDING
6399
6461
  }));
6400
6462
  }
6401
6463
 
6402
6464
  if (arrowProp) {
6403
6465
  ret.push(arrow({
6404
6466
  element: arrowRef,
6405
- padding: 4
6467
+ padding: DEFAULT_POPOVER_PADDING
6406
6468
  }));
6407
6469
  }
6408
6470
 
6471
+ ret.push(hide({
6472
+ boundary: boundaryElement || void 0,
6473
+ padding: DEFAULT_POPOVER_PADDING,
6474
+ strategy: "referenceHidden"
6475
+ }));
6409
6476
  return ret;
6410
6477
  }, [arrowProp, boundaryElement, constrainSize, fallbackPlacements, matchReferenceWidthProp, preventOverflow]);
6411
6478
  const {
@@ -6421,8 +6488,9 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6421
6488
  placement: placementProp,
6422
6489
  whileElementsMounted: autoUpdate
6423
6490
  });
6424
- const arrowX = (_c = middlewareData.arrow) == null ? void 0 : _c.x;
6425
- const arrowY = (_d = middlewareData.arrow) == null ? void 0 : _d.y;
6491
+ const referenceHidden = (_c = middlewareData.hide) == null ? void 0 : _c.referenceHidden;
6492
+ const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
6493
+ const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
6426
6494
  const setArrow = useCallback(arrowEl => {
6427
6495
  arrowRef.current = arrowEl;
6428
6496
  }, []);
@@ -6464,7 +6532,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6464
6532
  arrowY,
6465
6533
  availableWidth: constrainSize ? availableWidth : void 0,
6466
6534
  availableHeight: constrainSize ? availableHeight : void 0,
6467
- boundaryWidth: boundarySize == null ? void 0 : boundarySize.width,
6535
+ boundaryWidth: preventOverflow ? boundarySize == null ? void 0 : boundarySize.width : void 0,
6536
+ hidden: referenceHidden,
6468
6537
  overflow,
6469
6538
  padding,
6470
6539
  placement,
@@ -7208,9 +7277,8 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7208
7277
  });
7209
7278
  const Root$9 = styled.div(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n line-height: 0;\n"])));
7210
7279
  const ListBox = styled(Box)(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
7211
- const ResultsPopover = styled(Popover)(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n &[data-popper-reference-hidden='true'] {\n display: none;\n }\n"])));
7212
- const rotate = keyframes(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
7213
- const AnimatedSpinnerIcon = styled(SpinnerIcon)(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
7280
+ const rotate = keyframes(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
7281
+ const AnimatedSpinnerIcon = styled(SpinnerIcon)(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
7214
7282
 
7215
7283
  function AutocompleteOption(props) {
7216
7284
  const {
@@ -7742,7 +7810,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7742
7810
  return null;
7743
7811
  }
7744
7812
 
7745
- return /* @__PURE__ */jsx(ResultsPopover, _objectSpread({
7813
+ return /* @__PURE__ */jsx(Popover, _objectSpread({
7746
7814
  __unstable_margins: AUTOCOMPLETE_POPOVER_MARGINS,
7747
7815
  arrow: false,
7748
7816
  constrainSize: true,
@@ -7769,8 +7837,8 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7769
7837
  });
7770
7838
  });
7771
7839
  const Autocomplete = InnerAutocomplete;
7772
- const Root$8 = styled.ol(_templateObject65 || (_templateObject65 = _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"])));
7773
- const ExpandButton = styled(Button)(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["\n appearance: none;\n margin: -4px;\n"])));
7840
+ 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"])));
7841
+ const ExpandButton = styled(Button)(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\n appearance: none;\n margin: -4px;\n"])));
7774
7842
  const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7775
7843
  const {
7776
7844
  children,
@@ -7889,12 +7957,12 @@ function useDialog() {
7889
7957
  }
7890
7958
 
7891
7959
  const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
7892
- const DialogContainer = styled(Container)(_templateObject67 || (_templateObject67 = _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"])));
7893
- const DialogCardRoot = styled(Card)(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n min-height: 0;\n max-height: 100%;\n overflow: hidden;\n"])));
7894
- const DialogLayout = styled(Flex)(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
7895
- const DialogHeader = styled(Card)(_templateObject70 || (_templateObject70 = _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"])));
7896
- const DialogContent = styled(Box)(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
7897
- const DialogFooter = styled(Box)(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
7960
+ 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"])));
7961
+ 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"])));
7962
+ const DialogLayout = styled(Flex)(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
7963
+ 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"])));
7964
+ const DialogContent = styled(Box)(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
7965
+ 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"])));
7898
7966
  const DialogCard = forwardRef(function DialogCard2(props, ref) {
7899
7967
  const {
7900
7968
  __unstable_autoFocus: autoFocus,
@@ -8106,8 +8174,8 @@ function DialogProvider(props) {
8106
8174
  });
8107
8175
  }
8108
8176
 
8109
- const Root$6 = styled.kbd(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
8110
- const Key = styled(KBD)(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n"])));
8177
+ const Root$6 = styled.kbd(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
8178
+ const Key = styled(KBD)(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n"])));
8111
8179
  const Hotkeys = forwardRef(function Hotkeys2(props, ref) {
8112
8180
  const {
8113
8181
  fontSize,
@@ -8378,7 +8446,7 @@ function useMenuController(props) {
8378
8446
  };
8379
8447
  }
8380
8448
 
8381
- const Root$5 = styled(Box)(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
8449
+ const Root$5 = styled(Box)(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
8382
8450
  const Menu = forwardRef(function Menu2(props, ref) {
8383
8451
  const {
8384
8452
  children,
@@ -8612,10 +8680,10 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
8612
8680
  children: button || /* @__PURE__ */jsx(Fragment, {})
8613
8681
  }));
8614
8682
  });
8615
- const MenuDivider = styled.hr(_templateObject76 || (_templateObject76 = _taggedTemplateLiteral(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
8683
+ const MenuDivider = styled.hr(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
8616
8684
 
8617
8685
  function selectableBaseStyle() {
8618
- return css(_templateObject77 || (_templateObject77 = _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 "])));
8686
+ 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 "])));
8619
8687
  }
8620
8688
 
8621
8689
  function selectableColorStyle(props) {
@@ -8631,7 +8699,7 @@ function selectableColorStyle(props) {
8631
8699
  selectable
8632
8700
  } = theme.sanity.color;
8633
8701
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
8634
- return css(_templateObject78 || (_templateObject78 = _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 &: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 &: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);
8702
+ 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 &: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 &: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);
8635
8703
  }
8636
8704
 
8637
8705
  const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
@@ -8903,9 +8971,9 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8903
8971
  }))]
8904
8972
  }));
8905
8973
  });
8906
- const keyframe = keyframes(_templateObject79 || (_templateObject79 = _taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
8907
- const animation = css(_templateObject80 || (_templateObject80 = _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);
8908
- const skeletonStyle = css(_templateObject81 || (_templateObject81 = _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"])), _ref23 => {
8974
+ const keyframe = keyframes(_templateObject78 || (_templateObject78 = _taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
8975
+ 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);
8976
+ 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"])), _ref23 => {
8909
8977
  let {
8910
8978
  $visible
8911
8979
  } = _ref23;
@@ -8914,7 +8982,7 @@ const skeletonStyle = css(_templateObject81 || (_templateObject81 = _taggedTempl
8914
8982
  let {
8915
8983
  $animated
8916
8984
  } = _ref24;
8917
- return $animated ? animation : css(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8985
+ return $animated ? animation : css(_templateObject81 || (_templateObject81 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8918
8986
  });
8919
8987
  const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
8920
8988
  const Skeleton = forwardRef(function Skeleton2(props, ref) {
@@ -9142,8 +9210,8 @@ const ROLES = {
9142
9210
  success: "alert",
9143
9211
  info: "alert"
9144
9212
  };
9145
- const Root$2 = styled(Card)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n pointer-events: all;\n"])));
9146
- const TextBox = styled(Flex)(_templateObject84 || (_templateObject84 = _taggedTemplateLiteral(["\n overflow-x: auto;\n"])));
9213
+ const Root$2 = styled(Card)(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n pointer-events: all;\n"])));
9214
+ const TextBox = styled(Flex)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n overflow-x: auto;\n"])));
9147
9215
 
9148
9216
  function Toast(props) {
9149
9217
  const {
@@ -9201,8 +9269,8 @@ function Toast(props) {
9201
9269
  const key$1 = Symbol.for("@sanity/ui/context/toast");
9202
9270
  globalScope[key$1] = globalScope[key$1] || createContext(null);
9203
9271
  const ToastContext = globalScope[key$1];
9204
- const Root$1 = styled(Layer)(_templateObject85 || (_templateObject85 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n"])));
9205
- const ToastContainer = styled.div(_templateObject86 || (_templateObject86 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: absolute;\n right: 0;\n bottom: 0;\n max-width: 420px;\n width: 100%;\n"])));
9272
+ 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"])));
9273
+ 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"])));
9206
9274
  let toastId = 0;
9207
9275
 
9208
9276
  function ToastProvider(props) {
@@ -9619,7 +9687,7 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
9619
9687
  Tree.displayName = "Tree";
9620
9688
 
9621
9689
  function treeItemRootStyle() {
9622
- return css(_templateObject87 || (_templateObject87 = _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 "])));
9690
+ 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 "])));
9623
9691
  }
9624
9692
 
9625
9693
  function treeItemRootColorStyle(props) {
@@ -9633,7 +9701,7 @@ function treeItemRootColorStyle(props) {
9633
9701
  selectable
9634
9702
  } = theme.sanity.color;
9635
9703
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
9636
- return css(_templateObject88 || (_templateObject88 = _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));
9704
+ 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));
9637
9705
  }
9638
9706
 
9639
9707
  function treeItemBoxStyle(props) {
@@ -9644,7 +9712,7 @@ function treeItemBoxStyle(props) {
9644
9712
  const {
9645
9713
  space
9646
9714
  } = theme.sanity;
9647
- return css(_templateObject89 || (_templateObject89 = _taggedTemplateLiteral(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
9715
+ return css(_templateObject88 || (_templateObject88 = _taggedTemplateLiteral(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
9648
9716
  }
9649
9717
 
9650
9718
  function useTree() {
@@ -9680,7 +9748,7 @@ const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle));
9680
9748
  const TreeItemBox = styled(Box).attrs({
9681
9749
  forwardedAs: "a"
9682
9750
  })(treeItemBoxStyle);
9683
- const ToggleArrowText = styled(Text)(_templateObject90 || (_templateObject90 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
9751
+ const ToggleArrowText = styled(Text)(_templateObject89 || (_templateObject89 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
9684
9752
  const TreeItem = memo(function TreeItem2(props) {
9685
9753
  const {
9686
9754
  children,