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

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 +165 -95
  2. package/dist/sanity-ui.esm.js.map +1 -1
  3. package/dist/sanity-ui.js +164 -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 +42 -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,15 @@ 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,
6301
+ height: "max-content",
6302
+ minHeight: "min-content"
6219
6303
  };
6220
6304
  }
6221
6305
 
@@ -6239,8 +6323,9 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6239
6323
  scheme,
6240
6324
  shadow,
6241
6325
  strategy,
6326
+ style,
6242
6327
  tone,
6243
- width,
6328
+ width = "auto",
6244
6329
  x: xProp,
6245
6330
  y: yProp
6246
6331
  } = props,
@@ -6249,33 +6334,29 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6249
6334
  const {
6250
6335
  zIndex
6251
6336
  } = useLayer();
6252
- const margins = useMemo(() => marginsProp || [0, 0, 0, 0], [marginsProp]);
6337
+ const margins = useMemo(() => marginsProp || DEFAULT_POPOVER_MARGINS, [marginsProp]);
6253
6338
  const referenceWidth = referenceWidthProp ? referenceWidthProp - margins[1] - margins[3] : void 0;
6254
6339
  const x = (xProp != null ? xProp : 0) + margins[3];
6255
6340
  const y = (yProp != null ? yProp : 0) + margins[0];
6256
- const maxWidth = availableWidth ? Math.min(availableWidth - 8, referenceWidth || Infinity) : void 0;
6257
- const rootStyle = useMemo(() => ({
6341
+ const rootStyle = useMemo(() => _objectSpread({
6258
6342
  position: strategy,
6259
6343
  top: y,
6260
6344
  left: x,
6261
6345
  zIndex,
6262
6346
  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]);
6347
+ maxWidth: availableWidth,
6348
+ maxHeight: availableHeight
6349
+ }, style), [availableHeight, availableWidth, referenceWidth, strategy, style, x, y, zIndex]);
6269
6350
  const staticSide = placement && FLOATING_STATIC_SIDES[placement.split("-")[0]];
6270
6351
  const arrowStyle = useMemo(() => {
6271
- const style = {
6352
+ const style2 = {
6272
6353
  left: arrowX !== null ? arrowX : void 0,
6273
6354
  top: arrowY !== null ? arrowY : void 0,
6274
6355
  right: void 0,
6275
6356
  bottom: void 0
6276
6357
  };
6277
- if (staticSide) style[staticSide] = -27;
6278
- return style;
6358
+ if (staticSide) style2[staticSide] = 0 - DEFAULT_POPOVER_ARROW_WIDTH;
6359
+ return style2;
6279
6360
  }, [arrowX, arrowY, staticSide]);
6280
6361
  return /* @__PURE__ */jsxs(Root$i, _objectSpread(_objectSpread({}, restProps), {}, {
6281
6362
  $boundaryWidth: boundaryWidth,
@@ -6287,13 +6368,13 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6287
6368
  shadow,
6288
6369
  style: rootStyle,
6289
6370
  tone,
6290
- $width: width,
6291
- children: [/* @__PURE__ */jsx(Box, {
6371
+ children: [/* @__PURE__ */jsx(Container, {
6292
6372
  "data-ui": "Popover__wrapper",
6373
+ flex: 1,
6293
6374
  overflow,
6294
6375
  padding,
6295
6376
  sizing: "border",
6296
- style: wrapperStyle,
6377
+ width,
6297
6378
  children
6298
6379
  }), arrow && /* @__PURE__ */jsx(PopoverArrow, {
6299
6380
  ref: arrowRef,
@@ -6302,33 +6383,14 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
6302
6383
  }));
6303
6384
  }));
6304
6385
  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
6386
  const Popover = memo(forwardRef(function Popover2(props, ref) {
6324
- var _a, _b, _c, _d;
6387
+ var _a, _b, _c, _d, _e;
6325
6388
 
6326
6389
  const theme = useTheme();
6327
6390
  const boundaryElementContext = useBoundaryElement();
6328
6391
 
6329
6392
  const {
6330
6393
  __unstable_margins: margins,
6331
- allowedAutoPlacements,
6332
6394
  arrow: arrowProp = true,
6333
6395
  boundaryElement = boundaryElementContext.element,
6334
6396
  children: childProp,
@@ -6338,7 +6400,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6338
6400
  fallbackPlacements,
6339
6401
  matchReferenceWidth: matchReferenceWidthProp,
6340
6402
  open,
6341
- overflow = props.constrainSize ? "auto" : void 0,
6403
+ overflow = props.constrainSize ? "auto" : "hidden",
6342
6404
  padding: paddingProp,
6343
6405
  placement: placementProp = "bottom",
6344
6406
  portal,
@@ -6347,10 +6409,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6347
6409
  referenceElement,
6348
6410
  scheme,
6349
6411
  shadow: shadowProp = 3,
6350
- tether,
6351
- tetherOffset,
6352
6412
  tone = "inherit",
6353
- width: widthProp = void 0,
6413
+ width: widthProp = "auto",
6354
6414
  zOffset: zOffsetProp = (_a = theme.sanity.layer) == null ? void 0 : _a.popover.zOffset
6355
6415
  } = props,
6356
6416
  restProps = _objectWithoutProperties(props, _excluded23);
@@ -6374,38 +6434,47 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6374
6434
  ret.push(flip({
6375
6435
  boundary: boundaryElement || void 0,
6376
6436
  fallbackPlacements,
6377
- padding: 8,
6437
+ padding: DEFAULT_POPOVER_PADDING,
6378
6438
  rootBoundary
6379
6439
  }));
6380
6440
  }
6381
6441
 
6382
- ret.push(size({
6383
- boundaryElement,
6384
- constrainSize,
6385
- matchReferenceWidth: matchReferenceWidthProp,
6386
- setAvailableHeight,
6387
- setAvailableWidth,
6388
- setReferenceWidth
6389
- }));
6442
+ if (constrainSize || matchReferenceWidthProp) {
6443
+ ret.push(size({
6444
+ boundaryElement,
6445
+ constrainSize,
6446
+ matchReferenceWidth: matchReferenceWidthProp,
6447
+ padding: DEFAULT_POPOVER_PADDING,
6448
+ setAvailableHeight,
6449
+ setAvailableWidth,
6450
+ setReferenceWidth
6451
+ }));
6452
+ }
6453
+
6390
6454
  ret.push(offset({
6391
- mainAxis: arrowProp ? 4 : 0
6455
+ mainAxis: arrowProp ? DEFAULT_POPOVER_DISTANCE : 0
6392
6456
  }));
6393
6457
 
6394
6458
  if (preventOverflow) {
6395
6459
  ret.push(shift({
6396
6460
  boundary: boundaryElement || void 0,
6397
6461
  rootBoundary,
6398
- padding: 8
6462
+ padding: DEFAULT_POPOVER_PADDING
6399
6463
  }));
6400
6464
  }
6401
6465
 
6402
6466
  if (arrowProp) {
6403
6467
  ret.push(arrow({
6404
6468
  element: arrowRef,
6405
- padding: 4
6469
+ padding: DEFAULT_POPOVER_PADDING
6406
6470
  }));
6407
6471
  }
6408
6472
 
6473
+ ret.push(hide({
6474
+ boundary: boundaryElement || void 0,
6475
+ padding: DEFAULT_POPOVER_PADDING,
6476
+ strategy: "referenceHidden"
6477
+ }));
6409
6478
  return ret;
6410
6479
  }, [arrowProp, boundaryElement, constrainSize, fallbackPlacements, matchReferenceWidthProp, preventOverflow]);
6411
6480
  const {
@@ -6421,8 +6490,9 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6421
6490
  placement: placementProp,
6422
6491
  whileElementsMounted: autoUpdate
6423
6492
  });
6424
- const arrowX = (_c = middlewareData.arrow) == null ? void 0 : _c.x;
6425
- const arrowY = (_d = middlewareData.arrow) == null ? void 0 : _d.y;
6493
+ const referenceHidden = (_c = middlewareData.hide) == null ? void 0 : _c.referenceHidden;
6494
+ const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
6495
+ const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
6426
6496
  const setArrow = useCallback(arrowEl => {
6427
6497
  arrowRef.current = arrowEl;
6428
6498
  }, []);
@@ -6464,7 +6534,8 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6464
6534
  arrowY,
6465
6535
  availableWidth: constrainSize ? availableWidth : void 0,
6466
6536
  availableHeight: constrainSize ? availableHeight : void 0,
6467
- boundaryWidth: boundarySize == null ? void 0 : boundarySize.width,
6537
+ boundaryWidth: preventOverflow ? boundarySize == null ? void 0 : boundarySize.width : void 0,
6538
+ hidden: referenceHidden,
6468
6539
  overflow,
6469
6540
  padding,
6470
6541
  placement,
@@ -7208,9 +7279,8 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
7208
7279
  });
7209
7280
  const Root$9 = styled.div(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n line-height: 0;\n"])));
7210
7281
  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);
7282
+ const rotate = keyframes(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
7283
+ const AnimatedSpinnerIcon = styled(SpinnerIcon)(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
7214
7284
 
7215
7285
  function AutocompleteOption(props) {
7216
7286
  const {
@@ -7742,7 +7812,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7742
7812
  return null;
7743
7813
  }
7744
7814
 
7745
- return /* @__PURE__ */jsx(ResultsPopover, _objectSpread({
7815
+ return /* @__PURE__ */jsx(Popover, _objectSpread({
7746
7816
  __unstable_margins: AUTOCOMPLETE_POPOVER_MARGINS,
7747
7817
  arrow: false,
7748
7818
  constrainSize: true,
@@ -7769,8 +7839,8 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7769
7839
  });
7770
7840
  });
7771
7841
  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"])));
7842
+ 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"])));
7843
+ const ExpandButton = styled(Button)(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\n appearance: none;\n margin: -4px;\n"])));
7774
7844
  const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7775
7845
  const {
7776
7846
  children,
@@ -7889,12 +7959,12 @@ function useDialog() {
7889
7959
  }
7890
7960
 
7891
7961
  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"])));
7962
+ 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"])));
7963
+ 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"])));
7964
+ const DialogLayout = styled(Flex)(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
7965
+ 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"])));
7966
+ const DialogContent = styled(Box)(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
7967
+ 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
7968
  const DialogCard = forwardRef(function DialogCard2(props, ref) {
7899
7969
  const {
7900
7970
  __unstable_autoFocus: autoFocus,
@@ -8106,8 +8176,8 @@ function DialogProvider(props) {
8106
8176
  });
8107
8177
  }
8108
8178
 
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"])));
8179
+ const Root$6 = styled.kbd(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
8180
+ const Key = styled(KBD)(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n"])));
8111
8181
  const Hotkeys = forwardRef(function Hotkeys2(props, ref) {
8112
8182
  const {
8113
8183
  fontSize,
@@ -8378,7 +8448,7 @@ function useMenuController(props) {
8378
8448
  };
8379
8449
  }
8380
8450
 
8381
- const Root$5 = styled(Box)(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
8451
+ const Root$5 = styled(Box)(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
8382
8452
  const Menu = forwardRef(function Menu2(props, ref) {
8383
8453
  const {
8384
8454
  children,
@@ -8612,10 +8682,10 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
8612
8682
  children: button || /* @__PURE__ */jsx(Fragment, {})
8613
8683
  }));
8614
8684
  });
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"])));
8685
+ 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
8686
 
8617
8687
  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 "])));
8688
+ 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
8689
  }
8620
8690
 
8621
8691
  function selectableColorStyle(props) {
@@ -8631,7 +8701,7 @@ function selectableColorStyle(props) {
8631
8701
  selectable
8632
8702
  } = theme.sanity.color;
8633
8703
  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);
8704
+ 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
8705
  }
8636
8706
 
8637
8707
  const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
@@ -8903,9 +8973,9 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8903
8973
  }))]
8904
8974
  }));
8905
8975
  });
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 => {
8976
+ const keyframe = keyframes(_templateObject78 || (_templateObject78 = _taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
8977
+ 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);
8978
+ 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
8979
  let {
8910
8980
  $visible
8911
8981
  } = _ref23;
@@ -8914,7 +8984,7 @@ const skeletonStyle = css(_templateObject81 || (_templateObject81 = _taggedTempl
8914
8984
  let {
8915
8985
  $animated
8916
8986
  } = _ref24;
8917
- return $animated ? animation : css(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8987
+ return $animated ? animation : css(_templateObject81 || (_templateObject81 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8918
8988
  });
8919
8989
  const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
8920
8990
  const Skeleton = forwardRef(function Skeleton2(props, ref) {
@@ -9142,8 +9212,8 @@ const ROLES = {
9142
9212
  success: "alert",
9143
9213
  info: "alert"
9144
9214
  };
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"])));
9215
+ const Root$2 = styled(Card)(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n pointer-events: all;\n"])));
9216
+ const TextBox = styled(Flex)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n overflow-x: auto;\n"])));
9147
9217
 
9148
9218
  function Toast(props) {
9149
9219
  const {
@@ -9201,8 +9271,8 @@ function Toast(props) {
9201
9271
  const key$1 = Symbol.for("@sanity/ui/context/toast");
9202
9272
  globalScope[key$1] = globalScope[key$1] || createContext(null);
9203
9273
  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"])));
9274
+ 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"])));
9275
+ 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
9276
  let toastId = 0;
9207
9277
 
9208
9278
  function ToastProvider(props) {
@@ -9619,7 +9689,7 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
9619
9689
  Tree.displayName = "Tree";
9620
9690
 
9621
9691
  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 "])));
9692
+ 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
9693
  }
9624
9694
 
9625
9695
  function treeItemRootColorStyle(props) {
@@ -9633,7 +9703,7 @@ function treeItemRootColorStyle(props) {
9633
9703
  selectable
9634
9704
  } = theme.sanity.color;
9635
9705
  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));
9706
+ 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
9707
  }
9638
9708
 
9639
9709
  function treeItemBoxStyle(props) {
@@ -9644,7 +9714,7 @@ function treeItemBoxStyle(props) {
9644
9714
  const {
9645
9715
  space
9646
9716
  } = 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));
9717
+ return css(_templateObject88 || (_templateObject88 = _taggedTemplateLiteral(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
9648
9718
  }
9649
9719
 
9650
9720
  function useTree() {
@@ -9680,7 +9750,7 @@ const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle));
9680
9750
  const TreeItemBox = styled(Box).attrs({
9681
9751
  forwardedAs: "a"
9682
9752
  })(treeItemBoxStyle);
9683
- const ToggleArrowText = styled(Text)(_templateObject90 || (_templateObject90 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
9753
+ const ToggleArrowText = styled(Text)(_templateObject89 || (_templateObject89 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
9684
9754
  const TreeItem = memo(function TreeItem2(props) {
9685
9755
  const {
9686
9756
  children,