@sanity/ui 0.37.14-next.6 → 0.37.16

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 (54) hide show
  1. package/lib/dts/src/components/autocomplete/autocomplete.styles.d.ts +1 -1
  2. package/lib/dts/src/components/autocomplete/autocomplete.styles.d.ts.map +1 -1
  3. package/lib/dts/src/components/autocomplete/constants.d.ts.map +1 -1
  4. package/lib/dts/src/constants.d.ts +0 -10
  5. package/lib/dts/src/constants.d.ts.map +1 -1
  6. package/lib/dts/src/primitives/popover/{popoverArrow.d.ts → arrow.d.ts} +1 -1
  7. package/lib/dts/src/primitives/popover/arrow.d.ts.map +1 -0
  8. package/lib/dts/src/primitives/popover/modifiers/getPopoverModifiers.d.ts +4 -0
  9. package/lib/dts/src/primitives/popover/modifiers/getPopoverModifiers.d.ts.map +1 -0
  10. package/lib/dts/src/primitives/popover/modifiers/index.d.ts +2 -0
  11. package/lib/dts/src/primitives/popover/modifiers/index.d.ts.map +1 -0
  12. package/lib/dts/src/primitives/popover/modifiers/types.d.ts +18 -0
  13. package/lib/dts/src/primitives/popover/modifiers/types.d.ts.map +1 -0
  14. package/lib/dts/src/primitives/popover/modifiers/usePopoverModifiers.d.ts +4 -0
  15. package/lib/dts/src/primitives/popover/modifiers/usePopoverModifiers.d.ts.map +1 -0
  16. package/lib/dts/src/primitives/popover/popover.d.ts +5 -6
  17. package/lib/dts/src/primitives/popover/popover.d.ts.map +1 -1
  18. package/lib/dts/src/primitives/textArea/textArea.d.ts.map +1 -1
  19. package/lib/dts/src/primitives/textInput/textInput.d.ts.map +1 -1
  20. package/lib/dts/src/primitives/tooltip/tooltip.d.ts +0 -2
  21. package/lib/dts/src/primitives/tooltip/tooltip.d.ts.map +1 -1
  22. package/lib/dts/src/primitives/tooltip/tooltipArrow.d.ts.map +1 -1
  23. package/lib/dts/src/styles/input/textInputStyle.d.ts +3 -1
  24. package/lib/dts/src/styles/input/textInputStyle.d.ts.map +1 -1
  25. package/lib/sanity-ui.js +465 -490
  26. package/lib/sanity-ui.js.map +1 -1
  27. package/lib/sanity-ui.modern.mjs +584 -566
  28. package/lib/sanity-ui.modern.mjs.map +1 -1
  29. package/lib/sanity-ui.module.js +465 -491
  30. package/lib/sanity-ui.module.js.map +1 -1
  31. package/package.json +6 -5
  32. package/src/components/autocomplete/autocomplete.styles.tsx +5 -0
  33. package/src/components/autocomplete/constants.ts +3 -3
  34. package/src/constants.ts +0 -17
  35. package/src/primitives/popover/__workshop__/PlainStory.tsx +0 -1
  36. package/src/primitives/popover/__workshop__/RightAlignedStory.tsx +0 -1
  37. package/src/primitives/popover/__workshop__/TestStory.tsx +0 -1
  38. package/src/primitives/popover/{popoverArrow.tsx → arrow.tsx} +5 -5
  39. package/src/primitives/popover/modifiers/getPopoverModifiers.ts +137 -0
  40. package/src/primitives/popover/modifiers/index.ts +1 -0
  41. package/src/primitives/popover/modifiers/types.ts +18 -0
  42. package/src/primitives/popover/modifiers/usePopoverModifiers.ts +58 -0
  43. package/src/primitives/popover/popover.tsx +196 -229
  44. package/src/primitives/textArea/textArea.tsx +2 -0
  45. package/src/primitives/textInput/__workshop__/tones.tsx +222 -105
  46. package/src/primitives/textInput/textInput.tsx +5 -1
  47. package/src/primitives/tooltip/__workshop__/props.tsx +4 -5
  48. package/src/primitives/tooltip/tooltip.tsx +92 -159
  49. package/src/primitives/tooltip/tooltipArrow.tsx +10 -25
  50. package/src/styles/input/textInputStyle.ts +7 -5
  51. package/lib/dts/src/primitives/popover/popoverArrow.d.ts.map +0 -1
  52. package/lib/dts/src/primitives/popover/popoverCard.d.ts +0 -33
  53. package/lib/dts/src/primitives/popover/popoverCard.d.ts.map +0 -1
  54. package/src/primitives/popover/popoverCard.tsx +0 -160
@@ -1,13 +1,14 @@
1
1
  import { useId } from '@reach/auto-id';
2
- import React, { useMemo, useState, useRef, useEffect, createContext, useContext, useLayoutEffect, forwardRef, useCallback, cloneElement, isValidElement, createElement, memo, useReducer, Children, Fragment } from 'react';
2
+ import React, { useMemo, useState, useRef, useEffect, createContext, useContext, useLayoutEffect, forwardRef, useCallback, cloneElement, isValidElement, createElement, useReducer, Children, Fragment, memo } from 'react';
3
3
  import ReactIs, { isElement, isFragment, isValidElementType } from 'react-is';
4
4
  import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, keyframes } from 'styled-components';
5
5
  import { ResizeObserver } from '@juggle/resize-observer';
6
6
  import { white as white$1, black as black$1, hues } from '@sanity/color';
7
7
  import { SpinnerIcon, CheckmarkIcon, RemoveIcon, SelectIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
8
8
  import Refractor from 'react-refractor';
9
- import { flip, size as size$1, offset, shift, arrow, useFloating, autoUpdate } from '@floating-ui/react-dom';
9
+ import { usePopper } from 'react-popper';
10
10
  import ReactDOM from 'react-dom';
11
+ import maxSizeModifier from 'popper-max-size-modifier';
11
12
  import { AnimatePresence, motion } from 'framer-motion';
12
13
 
13
14
  function _extends() {
@@ -106,25 +107,8 @@ function _createForOfIteratorHelperLoose(o, allowArrayLike) {
106
107
  throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
107
108
  }
108
109
 
109
- /**
110
- * @internal
111
- */
112
110
  var EMPTY_ARRAY = [];
113
- /**
114
- * @internal
115
- */
116
-
117
111
  var EMPTY_RECORD = {};
118
- /**
119
- * @internal
120
- */
121
-
122
- var FLOATING_STATIC_SIDES = {
123
- top: 'bottom',
124
- right: 'left',
125
- bottom: 'top',
126
- left: 'right'
127
- };
128
112
 
129
113
  /**
130
114
  * @internal
@@ -2939,7 +2923,7 @@ globalScope[key$7] = globalScope[key$7] || /*#__PURE__*/createContext(null);
2939
2923
 
2940
2924
  var ThemeContext = globalScope[key$7];
2941
2925
 
2942
- var _excluded$I = ["color", "layer"];
2926
+ var _excluded$H = ["color", "layer"];
2943
2927
  /**
2944
2928
  * @public
2945
2929
  */
@@ -2958,7 +2942,7 @@ function ThemeProvider(props) {
2958
2942
 
2959
2943
  var rootColor = themeProp.color,
2960
2944
  rootLayer = themeProp.layer,
2961
- restTheme = _objectWithoutPropertiesLoose(themeProp, _excluded$I);
2945
+ restTheme = _objectWithoutPropertiesLoose(themeProp, _excluded$H);
2962
2946
 
2963
2947
  var colorScheme = rootColor[scheme] || rootColor.light;
2964
2948
  var color = colorScheme[tone] || colorScheme["default"];
@@ -3701,18 +3685,19 @@ function responsiveInputPaddingIconRightStyle(props) {
3701
3685
  }));
3702
3686
  }
3703
3687
 
3704
- var _templateObject$C, _templateObject2$m, _templateObject3$d;
3705
- var ROOT_STYLE = css(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
3688
+ var _templateObject$D, _templateObject2$n, _templateObject3$e;
3689
+ var ROOT_STYLE = css(_templateObject$D || (_templateObject$D = _taggedTemplateLiteralLoose(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
3706
3690
  function textInputRootStyle() {
3707
3691
  return ROOT_STYLE;
3708
3692
  }
3709
3693
  function textInputBaseStyle(props) {
3710
3694
  var theme = props.theme,
3695
+ $scheme = props.$scheme,
3711
3696
  $tone = props.$tone,
3712
3697
  $weight = props.$weight;
3713
3698
  var font = theme.sanity.fonts.text;
3714
3699
  var color = theme.sanity.color.input;
3715
- return css(_templateObject2$m || (_templateObject2$m = _taggedTemplateLiteralLoose(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $tone, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].disabled.fg, color["default"].disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color["default"].readOnly.fg, color["default"].readOnly.placeholder);
3700
+ return css(_templateObject2$n || (_templateObject2$n = _taggedTemplateLiteralLoose(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $scheme, $tone, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].enabled.fg, color["default"].enabled.placeholder, color["default"].disabled.fg, color["default"].disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color["default"].readOnly.fg, color["default"].readOnly.placeholder);
3716
3701
  }
3717
3702
  function textInputFontSizeStyle(props) {
3718
3703
  var theme = props.theme;
@@ -3731,13 +3716,14 @@ function textInputRepresentationStyle(props) {
3731
3716
  var $border = props.$border,
3732
3717
  $hasPrefix = props.$hasPrefix,
3733
3718
  $hasSuffix = props.$hasSuffix,
3719
+ $scheme = props.$scheme,
3734
3720
  $tone = props.$tone,
3735
3721
  theme = props.theme;
3736
3722
  var _theme$sanity2 = theme.sanity,
3737
3723
  focusRing = _theme$sanity2.focusRing,
3738
3724
  input = _theme$sanity2.input;
3739
3725
  var color = theme.sanity.color.input;
3740
- return css(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + & {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n --input-box-shadow: ", ";\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n --input-box-shadow: ", ";\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n --input-box-shadow: ", ";\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + & {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : undefined, $hasPrefix ? 0 : undefined, $hasSuffix ? 0 : undefined, $hasSuffix ? 0 : undefined, $tone, color["default"].enabled.bg, color["default"].enabled.fg, $border ? focusRingBorderStyle({
3726
+ return css(_templateObject3$e || (_templateObject3$e = _taggedTemplateLiteralLoose(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + & {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n --input-box-shadow: ", ";\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n --input-box-shadow: ", ";\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n --input-box-shadow: ", ";\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + & {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : undefined, $hasPrefix ? 0 : undefined, $hasSuffix ? 0 : undefined, $hasSuffix ? 0 : undefined, $scheme, $tone, color["default"].enabled.bg, color["default"].enabled.fg, $border ? focusRingBorderStyle({
3741
3727
  color: color["default"].enabled.border,
3742
3728
  width: input.border.width
3743
3729
  }) : undefined, color.invalid.enabled.bg, color.invalid.enabled.fg, $border ? focusRingBorderStyle({
@@ -3805,20 +3791,20 @@ function responsiveShadowStyle(props) {
3805
3791
  });
3806
3792
  }
3807
3793
 
3808
- var _templateObject$B, _templateObject2$l, _templateObject3$c;
3794
+ var _templateObject$C, _templateObject2$m, _templateObject3$d;
3809
3795
  function textBaseStyle(props) {
3810
3796
  var $accent = props.$accent,
3811
3797
  $muted = props.$muted,
3812
3798
  theme = props.theme;
3813
3799
  var weights = theme.sanity.fonts.text.weights;
3814
- return css(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family, weights.bold);
3800
+ return css(_templateObject$C || (_templateObject$C = _taggedTemplateLiteralLoose(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject2$m || (_templateObject2$m = _taggedTemplateLiteralLoose(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject3$d || (_templateObject3$d = _taggedTemplateLiteralLoose(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family, weights.bold);
3815
3801
  }
3816
3802
 
3817
- var _excluded$H = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"];
3803
+ var _excluded$G = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"];
3818
3804
 
3819
- var _templateObject$A;
3805
+ var _templateObject$B;
3820
3806
  var Root$E = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
3821
- var SpanWithTextOverflow$2 = styled.span(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
3807
+ var SpanWithTextOverflow$2 = styled.span(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
3822
3808
  /**
3823
3809
  * @public
3824
3810
  */
@@ -3834,7 +3820,7 @@ var Text = /*#__PURE__*/forwardRef(function Text(props, ref) {
3834
3820
  size = _props$size === void 0 ? 2 : _props$size,
3835
3821
  textOverflow = props.textOverflow,
3836
3822
  weight = props.weight,
3837
- restProps = _objectWithoutPropertiesLoose(props, _excluded$H);
3823
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$G);
3838
3824
 
3839
3825
  var children = childrenProp;
3840
3826
 
@@ -3994,7 +3980,7 @@ function avatarStrokeStyle() {
3994
3980
  };
3995
3981
  }
3996
3982
 
3997
- var _excluded$G = ["as", "color", "src", "title", "initials", "onImageLoadError", "arrowPosition", "animateArrowFrom", "status", "size"];
3983
+ var _excluded$F = ["as", "color", "src", "title", "initials", "onImageLoadError", "arrowPosition", "animateArrowFrom", "status", "size"];
3998
3984
  var Root$D = styled.div(responsiveAvatarSizeStyle, avatarStyle.root);
3999
3985
  var Arrow = styled.div(avatarStyle.arrow);
4000
3986
  var BgStroke = styled.ellipse(avatarStyle.bgStroke);
@@ -4018,7 +4004,7 @@ var Avatar = /*#__PURE__*/forwardRef(function Avatar(props, ref) {
4018
4004
  status = _props$status === void 0 ? 'online' : _props$status,
4019
4005
  _props$size = props.size,
4020
4006
  sizeProp = _props$size === void 0 ? 0 : _props$size,
4021
- restProps = _objectWithoutPropertiesLoose(props, _excluded$G);
4007
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$F);
4022
4008
 
4023
4009
  var as = ReactIs.isValidElementType(asProp) ? asProp : 'div';
4024
4010
  var size = useArrayProp(sizeProp);
@@ -4123,7 +4109,7 @@ var Avatar = /*#__PURE__*/forwardRef(function Avatar(props, ref) {
4123
4109
  }, /*#__PURE__*/React.createElement("strong", null, initials)))));
4124
4110
  });
4125
4111
 
4126
- var _templateObject$z;
4112
+ var _templateObject$A;
4127
4113
 
4128
4114
  function _responsiveAvatarCounterSizeStyle(props) {
4129
4115
  var theme = props.theme;
@@ -4143,7 +4129,7 @@ function _responsiveAvatarCounterSizeStyle(props) {
4143
4129
 
4144
4130
  function _avatarCounterBaseStyle(props) {
4145
4131
  var theme = props.theme;
4146
- return css(_templateObject$z || (_templateObject$z = _taggedTemplateLiteralLoose(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow: 0 0 0 1px var(--card-bg-color), inset 0 0 0 1.5px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(theme.sanity.space[2]));
4132
+ return css(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow: 0 0 0 1px var(--card-bg-color), inset 0 0 0 1.5px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(theme.sanity.space[2]));
4147
4133
  }
4148
4134
 
4149
4135
  var Root$C = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
@@ -4178,10 +4164,10 @@ function childrenToElementArray(children) {
4178
4164
  });
4179
4165
  }
4180
4166
 
4181
- var _excluded$F = ["children", "maxLength", "size"];
4167
+ var _excluded$E = ["children", "maxLength", "size"];
4182
4168
 
4183
- var _templateObject$y;
4184
- var BASE_STYLES = css(_templateObject$y || (_templateObject$y = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
4169
+ var _templateObject$z;
4170
+ var BASE_STYLES = css(_templateObject$z || (_templateObject$z = _taggedTemplateLiteralLoose(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
4185
4171
 
4186
4172
  function avatarStackStyle() {
4187
4173
  return BASE_STYLES;
@@ -4214,7 +4200,7 @@ var AvatarStack = /*#__PURE__*/forwardRef(function AvatarStack(props, ref) {
4214
4200
  maxLengthProp = _props$maxLength === void 0 ? 4 : _props$maxLength,
4215
4201
  _props$size = props.size,
4216
4202
  sizeProp = _props$size === void 0 ? 0 : _props$size,
4217
- restProps = _objectWithoutPropertiesLoose(props, _excluded$F);
4203
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$E);
4218
4204
 
4219
4205
  var children = childrenToElementArray(childrenProp).filter(function (child) {
4220
4206
  return typeof child !== 'string';
@@ -4244,7 +4230,7 @@ var AvatarStack = /*#__PURE__*/forwardRef(function AvatarStack(props, ref) {
4244
4230
  }));
4245
4231
  });
4246
4232
 
4247
- var _excluded$E = ["as", "column", "columnStart", "columnEnd", "display", "flex", "height", "margin", "marginX", "marginY", "marginTop", "marginRight", "marginBottom", "marginLeft", "overflow", "padding", "paddingX", "paddingY", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "row", "rowStart", "rowEnd", "sizing"];
4233
+ var _excluded$D = ["as", "column", "columnStart", "columnEnd", "display", "flex", "height", "margin", "marginX", "marginY", "marginTop", "marginRight", "marginBottom", "marginLeft", "overflow", "padding", "paddingX", "paddingY", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "row", "rowStart", "rowEnd", "sizing"];
4248
4234
  var Root$A = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
4249
4235
  /**
4250
4236
  * @public
@@ -4281,7 +4267,7 @@ var Box = /*#__PURE__*/forwardRef(function Box(props, ref) {
4281
4267
  rowStart = props.rowStart,
4282
4268
  rowEnd = props.rowEnd,
4283
4269
  sizing = props.sizing,
4284
- restProps = _objectWithoutPropertiesLoose(props, _excluded$E);
4270
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$D);
4285
4271
 
4286
4272
  return /*#__PURE__*/React.createElement(Root$A, _extends({
4287
4273
  "data-as": typeof asProp === 'string' ? asProp : undefined,
@@ -4317,20 +4303,20 @@ var Box = /*#__PURE__*/forwardRef(function Box(props, ref) {
4317
4303
  }), props.children);
4318
4304
  });
4319
4305
 
4320
- var _templateObject$x, _templateObject2$k, _templateObject3$b;
4306
+ var _templateObject$y, _templateObject2$l, _templateObject3$c;
4321
4307
  function labelBaseStyle(props) {
4322
4308
  var $accent = props.$accent,
4323
4309
  $muted = props.$muted,
4324
4310
  theme = props.theme;
4325
4311
  var fonts = theme.sanity.fonts;
4326
- return css(_templateObject$x || (_templateObject$x = _taggedTemplateLiteralLoose(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject2$k || (_templateObject2$k = _taggedTemplateLiteralLoose(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
4312
+ return css(_templateObject$y || (_templateObject$y = _taggedTemplateLiteralLoose(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject2$l || (_templateObject2$l = _taggedTemplateLiteralLoose(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject3$c || (_templateObject3$c = _taggedTemplateLiteralLoose(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
4327
4313
  }
4328
4314
 
4329
- var _excluded$D = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"];
4315
+ var _excluded$C = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"];
4330
4316
 
4331
- var _templateObject$w;
4317
+ var _templateObject$x;
4332
4318
  var Root$z = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
4333
- var SpanWithTextOverflow$1 = styled.span(_templateObject$w || (_templateObject$w = _taggedTemplateLiteralLoose(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
4319
+ var SpanWithTextOverflow$1 = styled.span(_templateObject$x || (_templateObject$x = _taggedTemplateLiteralLoose(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
4334
4320
  /**
4335
4321
  * @public
4336
4322
  */
@@ -4345,7 +4331,7 @@ var Label = /*#__PURE__*/forwardRef(function Label(props, ref) {
4345
4331
  size = _props$size === void 0 ? 2 : _props$size,
4346
4332
  textOverflow = props.textOverflow,
4347
4333
  weight = props.weight,
4348
- restProps = _objectWithoutPropertiesLoose(props, _excluded$D);
4334
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$C);
4349
4335
 
4350
4336
  var children = childrenProp;
4351
4337
 
@@ -4384,7 +4370,7 @@ function badgeStyle(props) {
4384
4370
  };
4385
4371
  }
4386
4372
 
4387
- var _excluded$C = ["children", "fontSize", "mode", "padding", "radius", "tone"];
4373
+ var _excluded$B = ["children", "fontSize", "mode", "padding", "radius", "tone"];
4388
4374
  var Root$y = styled(Box)(responsiveRadiusStyle, badgeStyle);
4389
4375
  /**
4390
4376
  * @public
@@ -4401,7 +4387,7 @@ var Badge = /*#__PURE__*/forwardRef(function Badge(props, ref) {
4401
4387
  radius = _props$radius === void 0 ? 2 : _props$radius,
4402
4388
  _props$tone = props.tone,
4403
4389
  tone = _props$tone === void 0 ? 'default' : _props$tone,
4404
- restProps = _objectWithoutPropertiesLoose(props, _excluded$C);
4390
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$B);
4405
4391
 
4406
4392
  return /*#__PURE__*/React.createElement(Root$y, _extends({
4407
4393
  "data-ui": "Badge"
@@ -4416,7 +4402,7 @@ var Badge = /*#__PURE__*/forwardRef(function Badge(props, ref) {
4416
4402
  }, children));
4417
4403
  });
4418
4404
 
4419
- var _excluded$B = ["align", "as", "direction", "gap", "justify", "wrap"];
4405
+ var _excluded$A = ["align", "as", "direction", "gap", "justify", "wrap"];
4420
4406
  var Root$x = styled(Box)(flexItemStyle, responsiveFlexStyle);
4421
4407
  /**
4422
4408
  * @public
@@ -4430,7 +4416,7 @@ var Flex = /*#__PURE__*/forwardRef(function Flex(props, ref) {
4430
4416
  gap = props.gap,
4431
4417
  justify = props.justify,
4432
4418
  wrap = props.wrap,
4433
- restProps = _objectWithoutPropertiesLoose(props, _excluded$B);
4419
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$A);
4434
4420
 
4435
4421
  return /*#__PURE__*/React.createElement(Root$x, _extends({
4436
4422
  "data-ui": "Flex"
@@ -4445,9 +4431,9 @@ var Flex = /*#__PURE__*/forwardRef(function Flex(props, ref) {
4445
4431
  }));
4446
4432
  });
4447
4433
 
4448
- var _templateObject$v, _templateObject2$j;
4449
- var rotate$1 = keyframes(_templateObject$v || (_templateObject$v = _taggedTemplateLiteralLoose(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
4450
- var Root$w = styled(Text)(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
4434
+ var _templateObject$w, _templateObject2$k;
4435
+ var rotate$1 = keyframes(_templateObject$w || (_templateObject$w = _taggedTemplateLiteralLoose(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
4436
+ var Root$w = styled(Text)(_templateObject2$k || (_templateObject2$k = _taggedTemplateLiteralLoose(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
4451
4437
  /**
4452
4438
  * @public
4453
4439
  */
@@ -4497,13 +4483,13 @@ function _colorVarsStyle(base, color, checkered) {
4497
4483
  };
4498
4484
  }
4499
4485
 
4500
- var _templateObject$u;
4486
+ var _templateObject$v;
4501
4487
  /**
4502
4488
  * @internal
4503
4489
  */
4504
4490
 
4505
4491
  function buttonBaseStyles() {
4506
- return css(_templateObject$u || (_templateObject$u = _taggedTemplateLiteralLoose(["\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])));
4492
+ return css(_templateObject$v || (_templateObject$v = _taggedTemplateLiteralLoose(["\n -webkit-font-smoothing: inherit;\n appearance: none;\n display: inline-flex;\n align-items: center;\n font: inherit;\n border: 0;\n outline: none;\n user-select: none;\n text-decoration: none;\n border: 0;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n white-space: nowrap;\n text-align: left;\n position: relative;\n\n & > span {\n display: block;\n flex: 1;\n min-width: 0;\n border-radius: inherit;\n }\n\n &::-moz-focus-inner {\n border: 0;\n padding: 0;\n }\n "])));
4507
4493
  }
4508
4494
  var buttonTheme = {
4509
4495
  border: {
@@ -4552,11 +4538,11 @@ function buttonColorStyles(props) {
4552
4538
  }, (_theme$sanity$styles = theme.sanity.styles) == null ? void 0 : (_theme$sanity$styles$ = _theme$sanity$styles.button) == null ? void 0 : _theme$sanity$styles$.root].filter(Boolean);
4553
4539
  }
4554
4540
 
4555
- var _excluded$A = ["children", "disabled", "fontSize", "icon", "iconRight", "justify", "loading", "mode", "padding", "paddingX", "paddingY", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight", "radius", "selected", "space", "text", "textAlign", "tone", "type"];
4541
+ var _excluded$z = ["children", "disabled", "fontSize", "icon", "iconRight", "justify", "loading", "mode", "padding", "paddingX", "paddingY", "paddingTop", "paddingBottom", "paddingLeft", "paddingRight", "radius", "selected", "space", "text", "textAlign", "tone", "type"];
4556
4542
 
4557
- var _templateObject$t;
4543
+ var _templateObject$u;
4558
4544
  var Root$v = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
4559
- var LoadingBox = styled.div(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])));
4545
+ var LoadingBox = styled.div(_templateObject$u || (_templateObject$u = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])));
4560
4546
  /**
4561
4547
  * @public
4562
4548
  */
@@ -4591,7 +4577,7 @@ var Button = /*#__PURE__*/forwardRef(function Button(props, ref) {
4591
4577
  tone = _props$tone === void 0 ? 'default' : _props$tone,
4592
4578
  _props$type = props.type,
4593
4579
  type = _props$type === void 0 ? 'button' : _props$type,
4594
- restProps = _objectWithoutPropertiesLoose(props, _excluded$A);
4580
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$z);
4595
4581
 
4596
4582
  var justify = useArrayProp(justifyProp);
4597
4583
  var padding = useArrayProp(paddingProp);
@@ -4650,7 +4636,7 @@ var Button = /*#__PURE__*/forwardRef(function Button(props, ref) {
4650
4636
  }, boxProps), children));
4651
4637
  });
4652
4638
 
4653
- var _templateObject$s, _templateObject2$i, _templateObject3$a;
4639
+ var _templateObject$t, _templateObject2$j, _templateObject3$b;
4654
4640
  function cardStyle(props) {
4655
4641
  return [cardBaseStyle(props), cardColorStyle(props)];
4656
4642
  }
@@ -4658,7 +4644,7 @@ function cardBaseStyle(props) {
4658
4644
  var $checkered = props.$checkered,
4659
4645
  theme = props.theme;
4660
4646
  var space = theme.sanity.space;
4661
- return css(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n ", "\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n "])), $checkered && css(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteralLoose(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
4647
+ return css(_templateObject$t || (_templateObject$t = _taggedTemplateLiteralLoose(["\n ", "\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n outline: none;\n text-decoration: none;\n }\n\n /* &:is(pre) */\n &[data-as='pre'] {\n font: inherit;\n }\n "])), $checkered && css(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
4662
4648
  }
4663
4649
  function cardColorStyle(props) {
4664
4650
  var _theme$sanity$styles, _theme$sanity$styles$;
@@ -4674,7 +4660,7 @@ function cardColorStyle(props) {
4674
4660
  width: 0,
4675
4661
  color: 'var(--card-border-color)'
4676
4662
  };
4677
- return css(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteralLoose(["\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({
4663
+ return css(_templateObject3$b || (_templateObject3$b = _taggedTemplateLiteralLoose(["\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({
4678
4664
  base: base,
4679
4665
  border: border,
4680
4666
  focusRing: focusRing
@@ -4685,7 +4671,7 @@ function cardColorStyle(props) {
4685
4671
  }) : undefined, $focusRing ? focusRingBorderStyle(border) : undefined, (_theme$sanity$styles = theme.sanity.styles) == null ? void 0 : (_theme$sanity$styles$ = _theme$sanity$styles.card) == null ? void 0 : _theme$sanity$styles$.root);
4686
4672
  }
4687
4673
 
4688
- var _excluded$z = ["__unstable_checkered", "__unstable_focusRing", "as", "border", "borderTop", "borderRight", "borderBottom", "borderLeft", "pressed", "radius", "scheme", "selected", "shadow", "tone"];
4674
+ var _excluded$y = ["__unstable_checkered", "__unstable_focusRing", "as", "border", "borderTop", "borderRight", "borderBottom", "borderLeft", "pressed", "radius", "scheme", "selected", "shadow", "tone"];
4689
4675
  var Root$u = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
4690
4676
  /**
4691
4677
  * @public
@@ -4710,7 +4696,7 @@ var Card = /*#__PURE__*/forwardRef(function Card(props, ref) {
4710
4696
  shadow = props.shadow,
4711
4697
  _props$tone = props.tone,
4712
4698
  toneProp = _props$tone === void 0 ? 'default' : _props$tone,
4713
- restProps = _objectWithoutPropertiesLoose(props, _excluded$z);
4699
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$y);
4714
4700
 
4715
4701
  var as = isValidElementType(asProp) ? asProp : 'div';
4716
4702
  var rootTheme = useRootTheme();
@@ -4743,9 +4729,9 @@ var Card = /*#__PURE__*/forwardRef(function Card(props, ref) {
4743
4729
  })));
4744
4730
  });
4745
4731
 
4746
- var _templateObject$r, _templateObject2$h;
4732
+ var _templateObject$s, _templateObject2$i;
4747
4733
  function checkboxBaseStyles() {
4748
- return css(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-block;\n "])));
4734
+ return css(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n position: relative;\n display: inline-block;\n "])));
4749
4735
  }
4750
4736
  function inputElementStyles(props) {
4751
4737
  var theme = props.theme;
@@ -4754,7 +4740,7 @@ function inputElementStyles(props) {
4754
4740
  focusRing = _theme$sanity.focusRing,
4755
4741
  input = _theme$sanity.input,
4756
4742
  radius = _theme$sanity.radius;
4757
- return css(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 2 !important;\n }\n }\n }\n\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:not([data-read-only]):disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
4743
+ return css(_templateObject2$i || (_templateObject2$i = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 2 !important;\n }\n }\n }\n\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:not([data-read-only]):disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
4758
4744
  color: color["default"].enabled.border,
4759
4745
  width: input.border.width
4760
4746
  }), rem(radius[2]), color["default"].enabled.bg, focusRingStyle({
@@ -4775,7 +4761,7 @@ function inputElementStyles(props) {
4775
4761
  }), color["default"].disabled.fg);
4776
4762
  }
4777
4763
 
4778
- var _excluded$y = ["checked", "className", "disabled", "indeterminate", "customValidity", "readOnly", "style"];
4764
+ var _excluded$x = ["checked", "className", "disabled", "indeterminate", "customValidity", "readOnly", "style"];
4779
4765
  var Root$t = styled.div(checkboxBaseStyles);
4780
4766
  var Input$5 = styled.input(inputElementStyles);
4781
4767
  /**
@@ -4790,7 +4776,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, forwardedRef) {
4790
4776
  customValidity = props.customValidity,
4791
4777
  readOnly = props.readOnly,
4792
4778
  style = props.style,
4793
- restProps = _objectWithoutPropertiesLoose(props, _excluded$y);
4779
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$x);
4794
4780
 
4795
4781
  var ref = useForwardedRef(forwardedRef);
4796
4782
  useCustomValidity(ref, customValidity);
@@ -4815,7 +4801,7 @@ var Checkbox = /*#__PURE__*/forwardRef(function Checkbox(props, forwardedRef) {
4815
4801
  })), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(CheckmarkIcon, null), /*#__PURE__*/React.createElement(RemoveIcon, null)));
4816
4802
  });
4817
4803
 
4818
- var _templateObject$q;
4804
+ var _templateObject$r;
4819
4805
 
4820
4806
  function codeSyntaxHighlightingStyle(_ref) {
4821
4807
  var theme = _ref.theme;
@@ -4933,10 +4919,10 @@ function codeSyntaxHighlightingStyle(_ref) {
4933
4919
  }
4934
4920
 
4935
4921
  function codeBaseStyle() {
4936
- return css(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ", "\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), codeSyntaxHighlightingStyle);
4922
+ return css(_templateObject$r || (_templateObject$r = _taggedTemplateLiteralLoose(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ", "\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), codeSyntaxHighlightingStyle);
4937
4923
  }
4938
4924
 
4939
- var _excluded$x = ["children", "language", "size", "weight"];
4925
+ var _excluded$w = ["children", "language", "size", "weight"];
4940
4926
  var Root$s = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
4941
4927
  /**
4942
4928
  * @public
@@ -4948,7 +4934,7 @@ var Code = /*#__PURE__*/forwardRef(function Code(props, ref) {
4948
4934
  _props$size = props.size,
4949
4935
  size = _props$size === void 0 ? 2 : _props$size,
4950
4936
  weight = props.weight,
4951
- restProps = _objectWithoutPropertiesLoose(props, _excluded$x);
4937
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$w);
4952
4938
 
4953
4939
  var language = typeof languageProp === 'string' ? languageProp : undefined;
4954
4940
  var registered = language ? Refractor.hasLanguage(language) : false;
@@ -4984,7 +4970,7 @@ function responsiveContainerWidthStyle(props) {
4984
4970
  });
4985
4971
  }
4986
4972
 
4987
- var _excluded$w = ["as", "width"];
4973
+ var _excluded$v = ["as", "width"];
4988
4974
  var Root$r = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
4989
4975
  /**
4990
4976
  * @public
@@ -4994,7 +4980,7 @@ var Container = /*#__PURE__*/forwardRef(function Container(props, ref) {
4994
4980
  var as = props.as,
4995
4981
  _props$width = props.width,
4996
4982
  width = _props$width === void 0 ? 2 : _props$width,
4997
- restProps = _objectWithoutPropertiesLoose(props, _excluded$w);
4983
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$v);
4998
4984
 
4999
4985
  return /*#__PURE__*/React.createElement(Root$r, _extends({
5000
4986
  "data-ui": "Container"
@@ -5005,7 +4991,7 @@ var Container = /*#__PURE__*/forwardRef(function Container(props, ref) {
5005
4991
  }));
5006
4992
  });
5007
4993
 
5008
- var _excluded$v = ["as", "autoRows", "autoCols", "autoFlow", "columns", "gap", "gapX", "gapY", "rows", "children"];
4994
+ var _excluded$u = ["as", "autoRows", "autoCols", "autoFlow", "columns", "gap", "gapX", "gapY", "rows", "children"];
5009
4995
  var Root$q = styled(Box)(responsiveGridStyle);
5010
4996
  /**
5011
4997
  * @public
@@ -5022,7 +5008,7 @@ var Grid = /*#__PURE__*/forwardRef(function Grid(props, ref) {
5022
5008
  gapY = props.gapY,
5023
5009
  rows = props.rows,
5024
5010
  children = props.children,
5025
- restProps = _objectWithoutPropertiesLoose(props, _excluded$v);
5011
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$u);
5026
5012
 
5027
5013
  return /*#__PURE__*/React.createElement(Root$q, _extends({
5028
5014
  "data-as": typeof as === 'string' ? as : undefined,
@@ -5041,19 +5027,19 @@ var Grid = /*#__PURE__*/forwardRef(function Grid(props, ref) {
5041
5027
  }), children);
5042
5028
  });
5043
5029
 
5044
- var _templateObject$p, _templateObject2$g, _templateObject3$9;
5030
+ var _templateObject$q, _templateObject2$h, _templateObject3$a;
5045
5031
  function headingBaseStyle(props) {
5046
5032
  var $accent = props.$accent,
5047
5033
  $muted = props.$muted,
5048
5034
  theme = props.theme;
5049
- return css(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
5035
+ return css(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject2$h || (_templateObject2$h = _taggedTemplateLiteralLoose(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject3$a || (_templateObject3$a = _taggedTemplateLiteralLoose(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
5050
5036
  }
5051
5037
 
5052
- var _excluded$u = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"];
5038
+ var _excluded$t = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"];
5053
5039
 
5054
- var _templateObject$o;
5040
+ var _templateObject$p;
5055
5041
  var Root$p = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
5056
- var SpanWithTextOverflow = styled.span(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
5042
+ var SpanWithTextOverflow = styled.span(_templateObject$p || (_templateObject$p = _taggedTemplateLiteralLoose(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
5057
5043
  /**
5058
5044
  * @public
5059
5045
  */
@@ -5069,7 +5055,7 @@ var Heading = /*#__PURE__*/forwardRef(function Heading(props, ref) {
5069
5055
  size = _props$size === void 0 ? 2 : _props$size,
5070
5056
  textOverflow = props.textOverflow,
5071
5057
  weight = props.weight,
5072
- restProps = _objectWithoutPropertiesLoose(props, _excluded$u);
5058
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$t);
5073
5059
 
5074
5060
  var children = childrenProp;
5075
5061
 
@@ -5114,7 +5100,7 @@ function inlineSpaceStyle(props) {
5114
5100
  });
5115
5101
  }
5116
5102
 
5117
- var _excluded$t = ["as", "children", "space"];
5103
+ var _excluded$s = ["as", "children", "space"];
5118
5104
  var Root$o = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
5119
5105
  /**
5120
5106
  * @public
@@ -5124,7 +5110,7 @@ var Inline = /*#__PURE__*/forwardRef(function Inline(props, ref) {
5124
5110
  var as = props.as,
5125
5111
  childrenProp = props.children,
5126
5112
  space = props.space,
5127
- restProps = _objectWithoutPropertiesLoose(props, _excluded$t);
5113
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$s);
5128
5114
 
5129
5115
  var children = useMemo(function () {
5130
5116
  return childrenToElementArray(childrenProp).filter(Boolean).map(function (child, idx) {
@@ -5142,12 +5128,12 @@ var Inline = /*#__PURE__*/forwardRef(function Inline(props, ref) {
5142
5128
  }), children);
5143
5129
  });
5144
5130
 
5145
- var _excluded$s = ["children", "fontSize", "padding", "radius"];
5131
+ var _excluded$r = ["children", "fontSize", "padding", "radius"];
5146
5132
 
5147
- var _templateObject$n;
5133
+ var _templateObject$o;
5148
5134
 
5149
5135
  function kbdStyle() {
5150
- return css(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n background: var(--card-bg-color);\n font: inherit;\n box-shadow: inset 0 0 0 1px var(--card-hairline-hard-color);\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
5136
+ return css(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n background: var(--card-bg-color);\n font: inherit;\n box-shadow: inset 0 0 0 1px var(--card-hairline-hard-color);\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
5151
5137
  }
5152
5138
 
5153
5139
  var Root$n = styled.kbd(responsiveRadiusStyle, kbdStyle);
@@ -5163,7 +5149,7 @@ var KBD = /*#__PURE__*/forwardRef(function KBD(props, ref) {
5163
5149
  padding = _props$padding === void 0 ? 1 : _props$padding,
5164
5150
  _props$radius = props.radius,
5165
5151
  radius = _props$radius === void 0 ? 2 : _props$radius,
5166
- restProps = _objectWithoutPropertiesLoose(props, _excluded$s);
5152
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$r);
5167
5153
 
5168
5154
  return /*#__PURE__*/React.createElement(Root$n, _extends({
5169
5155
  "data-ui": "KBD"
@@ -5249,7 +5235,7 @@ function findMinBreakpoints(media, width) {
5249
5235
  return ret;
5250
5236
  }
5251
5237
 
5252
- var _excluded$r = ["children", "media"];
5238
+ var _excluded$q = ["children", "media"];
5253
5239
  /**
5254
5240
  * DO NOT USE IN PRODUCTION.
5255
5241
  * @beta
@@ -5261,7 +5247,7 @@ var ElementQuery = /*#__PURE__*/forwardRef(function ElementQuery(props, ref) {
5261
5247
  var children = props.children,
5262
5248
  _props$media = props.media,
5263
5249
  media = _props$media === void 0 ? theme.sanity.media : _props$media,
5264
- restProps = _objectWithoutPropertiesLoose(props, _excluded$r);
5250
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$q);
5265
5251
 
5266
5252
  var forwardedRef = useForwardedRef(ref);
5267
5253
 
@@ -5418,16 +5404,16 @@ function LayerProvider(props) {
5418
5404
  }, children);
5419
5405
  }
5420
5406
 
5421
- var _excluded$q = ["children", "style"],
5407
+ var _excluded$p = ["children", "style"],
5422
5408
  _excluded2$1 = ["children", "zOffset"];
5423
5409
 
5424
- var _templateObject$m;
5425
- var Root$m = styled.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
5410
+ var _templateObject$n;
5411
+ var Root$m = styled.div(_templateObject$n || (_templateObject$n = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
5426
5412
  var LayerChildren = /*#__PURE__*/forwardRef(function LayerChildren(props, ref) {
5427
5413
  var children = props.children,
5428
5414
  _props$style = props.style,
5429
5415
  style = _props$style === void 0 ? EMPTY_RECORD : _props$style,
5430
- restProps = _objectWithoutPropertiesLoose(props, _excluded$q);
5416
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$p);
5431
5417
 
5432
5418
  var _useLayer = useLayer(),
5433
5419
  zIndex = _useLayer.zIndex;
@@ -5575,8 +5561,8 @@ function PortalProvider(props) {
5575
5561
  }, children);
5576
5562
  }
5577
5563
 
5578
- var _templateObject$l;
5579
- var Root$l = styled.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n"])));
5564
+ var _templateObject$m;
5565
+ var Root$l = styled.div(_templateObject$m || (_templateObject$m = _taggedTemplateLiteralLoose(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n"])));
5580
5566
  /**
5581
5567
  * @public
5582
5568
  */
@@ -5758,11 +5744,11 @@ function _isScrollable(el) {
5758
5744
  return style.overflowX.includes('auto') || style.overflowX.includes('scroll') || style.overflowY.includes('auto') || style.overflowY.includes('scroll');
5759
5745
  }
5760
5746
 
5761
- var _excluded$p = ["as", "gap", "getItemKey", "items", "onChange", "renderItem"];
5747
+ var _excluded$o = ["as", "gap", "getItemKey", "items", "onChange", "renderItem"];
5762
5748
 
5763
- var _templateObject$k, _templateObject2$f;
5764
- var Root$k = styled.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
5765
- var ItemWrapper = styled.div(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
5749
+ var _templateObject$l, _templateObject2$g;
5750
+ var Root$k = styled.div(_templateObject$l || (_templateObject$l = _taggedTemplateLiteralLoose(["\n position: relative;\n"])));
5751
+ var ItemWrapper = styled.div(_templateObject2$g || (_templateObject2$g = _taggedTemplateLiteralLoose(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
5766
5752
  /**
5767
5753
  * @beta
5768
5754
  */
@@ -5777,7 +5763,7 @@ var VirtualList = /*#__PURE__*/forwardRef(function VirtualList(props, ref) {
5777
5763
  items = _props$items === void 0 ? [] : _props$items,
5778
5764
  onChange = props.onChange,
5779
5765
  renderItem = props.renderItem,
5780
- restProps = _objectWithoutPropertiesLoose(props, _excluded$p);
5766
+ restProps = _objectWithoutPropertiesLoose(props, _excluded$o);
5781
5767
 
5782
5768
  var space = useTheme().sanity.space;
5783
5769
  var forwardedRef = useForwardedRef(ref);
@@ -5906,13 +5892,13 @@ var VirtualList = /*#__PURE__*/forwardRef(function VirtualList(props, ref) {
5906
5892
  }, children));
5907
5893
  });
5908
5894
 
5909
- var _templateObject$j, _templateObject2$e, _templateObject3$8;
5910
- var Root$j = styled.div(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\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"])));
5911
- var BorderPath = styled.path(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteralLoose(["\n fill: var(--card-shadow-outline-color);\n"])));
5912
- var ShapePath = styled.path(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n fill: var(--card-bg-color);\n"])));
5895
+ var _templateObject$k, _templateObject2$f, _templateObject3$9;
5896
+ var Root$j = styled.div(_templateObject$k || (_templateObject$k = _taggedTemplateLiteralLoose(["\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-popper-placement^='top'] > div > & {\n bottom: -27px;\n }\n\n [data-popper-placement^='right'] > div > & {\n left: -27px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-popper-placement^='left'] > div > & {\n right: -27px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-popper-placement^='bottom'] > div > & {\n top: -27px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])));
5897
+ var BorderPath = styled.path(_templateObject2$f || (_templateObject2$f = _taggedTemplateLiteralLoose(["\n fill: var(--card-shadow-outline-color);\n"])));
5898
+ var ShapePath = styled.path(_templateObject3$9 || (_templateObject3$9 = _taggedTemplateLiteralLoose(["\n fill: var(--card-bg-color);\n"])));
5913
5899
  var PopoverArrow = /*#__PURE__*/forwardRef(function PopoverArrow(props, ref) {
5914
5900
  return /*#__PURE__*/React.createElement(Root$j, _extends({
5915
- "data-ui": "Popover__arrow"
5901
+ "data-ui": "PopoverArrow"
5916
5902
  }, props, {
5917
5903
  ref: ref
5918
5904
  }), /*#__PURE__*/React.createElement("svg", {
@@ -5928,309 +5914,325 @@ var PopoverArrow = /*#__PURE__*/forwardRef(function PopoverArrow(props, ref) {
5928
5914
  })));
5929
5915
  });
5930
5916
 
5931
- var _excluded$o = ["__unstable_margins", "arrow", "arrowRef", "arrowX", "arrowY", "availableHeight", "availableWidth", "boundaryWidth", "children", "padding", "placement", "overflow", "radius", "referenceWidth", "scheme", "shadow", "strategy", "tone", "width", "x", "y"];
5917
+ /*
5932
5918
 
5933
- function popoverCardStyle(props) {
5934
- var $boundaryWidth = props.$boundaryWidth;
5935
- return {
5936
- maxWidth: $boundaryWidth ? $boundaryWidth - 16 + "px" : 'calc(100% - 16px)'
5937
- };
5938
- }
5939
-
5940
- var Root$i = /*#__PURE__*/memo(styled(Card)(popoverCardStyle));
5941
- /**
5942
- * @internal
5943
- */
5944
-
5945
- var PopoverCard = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function PopoverCard(props, ref) {
5946
- var marginsProp = props.__unstable_margins,
5947
- arrow = props.arrow,
5948
- arrowRef = props.arrowRef,
5949
- arrowX = props.arrowX,
5950
- arrowY = props.arrowY,
5951
- availableHeight = props.availableHeight,
5952
- availableWidth = props.availableWidth,
5953
- boundaryWidth = props.boundaryWidth,
5954
- children = props.children,
5955
- padding = props.padding,
5956
- placement = props.placement,
5957
- overflow = props.overflow,
5958
- radius = props.radius,
5959
- referenceWidthProp = props.referenceWidth,
5960
- scheme = props.scheme,
5961
- shadow = props.shadow,
5962
- strategy = props.strategy,
5963
- tone = props.tone,
5964
- width = props.width,
5965
- xProp = props.x,
5966
- yProp = props.y,
5967
- restProps = _objectWithoutPropertiesLoose(props, _excluded$o);
5968
-
5969
- var _useLayer = useLayer(),
5970
- zIndex = _useLayer.zIndex; // top right bottom left
5919
+ The order of popper phases:
5971
5920
 
5921
+ - beforeRead
5922
+ - read
5923
+ - afterRead
5924
+ - beforeMain
5925
+ - main
5926
+ - afterMain
5927
+ - beforeWrite
5928
+ - write
5929
+ - afterWrite
5972
5930
 
5973
- var margins = useMemo(function () {
5974
- return marginsProp || [0, 0, 0, 0];
5975
- }, [marginsProp]); // translate according to margins
5976
-
5977
- var referenceWidth = referenceWidthProp ? referenceWidthProp - margins[1] - margins[3] : undefined;
5978
- var x = (xProp != null ? xProp : 0) + margins[3];
5979
- var y = (yProp != null ? yProp : 0) + margins[0];
5980
- var maxWidth = availableWidth ? Math.min(availableWidth - 8, referenceWidth || Infinity) : undefined;
5981
- var rootStyle = useMemo(function () {
5982
- return {
5983
- position: strategy,
5984
- top: y,
5985
- left: x,
5986
- zIndex: zIndex,
5987
- width: referenceWidth,
5988
- maxWidth: referenceWidth ? undefined : maxWidth
5989
- };
5990
- }, [referenceWidth, maxWidth, strategy, x, y, zIndex]);
5991
- var wrapperStyle = useMemo(function () {
5992
- return {
5993
- minHeight: 25,
5994
- maxHeight: availableHeight ? availableHeight - 8 : undefined
5995
- };
5996
- }, [availableHeight]);
5997
- var staticSide = placement && FLOATING_STATIC_SIDES[placement.split('-')[0]];
5998
- var arrowStyle = useMemo(function () {
5999
- var style = {
6000
- left: arrowX !== null ? arrowX : undefined,
6001
- top: arrowY !== null ? arrowY : undefined,
6002
- right: undefined,
6003
- bottom: undefined
6004
- };
6005
- if (staticSide) style[staticSide] = -27;
6006
- return style;
6007
- }, [arrowX, arrowY, staticSide]);
6008
- return /*#__PURE__*/React.createElement(Root$i, _extends({}, restProps, {
6009
- "$boundaryWidth": boundaryWidth,
6010
- "data-placement": placement,
6011
- "data-ui": "Popover",
6012
- radius: radius,
6013
- ref: ref,
6014
- scheme: scheme,
6015
- shadow: shadow,
6016
- style: rootStyle,
6017
- tone: tone,
6018
- "$width": width
6019
- }), /*#__PURE__*/React.createElement(Box, {
6020
- "data-ui": "Popover__wrapper",
6021
- overflow: overflow,
6022
- padding: padding,
6023
- sizing: "border",
6024
- style: wrapperStyle
6025
- }, children), arrow && /*#__PURE__*/React.createElement(PopoverArrow, {
6026
- ref: arrowRef,
6027
- style: arrowStyle
6028
- }));
6029
- }));
6030
- PopoverCard.displayName = 'PopoverCard';
5931
+ */
6031
5932
 
6032
- var _excluded$n = ["__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"];
5933
+ function getPopoverModifiers(props) {
5934
+ var allowedAutoPlacements = props.allowedAutoPlacements,
5935
+ arrow = props.arrow,
5936
+ arrowElement = props.arrowElement,
5937
+ boundaryElement = props.boundaryElement,
5938
+ constrainSize = props.constrainSize,
5939
+ distance = props.distance,
5940
+ fallbackPlacements = props.fallbackPlacements,
5941
+ margins = props.margins,
5942
+ matchReferenceWidth = props.matchReferenceWidth,
5943
+ open = props.open,
5944
+ preventOverflow = props.preventOverflow,
5945
+ skidding = props.skidding,
5946
+ tether = props.tether,
5947
+ tetherOffset = props.tetherOffset; // NOTE: For later viewers:
5948
+ // Prior to adding this change, the popover would get `maxWidth: 0` the 2nd time it
5949
+ // was opened, when used with `constrainSize`. I was looking for a way to "reset"
5950
+ // the size of the popover as measured by Popper.js, and this seems to be a workaround.
5951
+
5952
+ if (!open) {
5953
+ return [];
5954
+ }
6033
5955
 
6034
- function size(scope) {
6035
- return size$1({
6036
- apply: function apply(args) {
6037
- if (scope.constrainSize) {
6038
- scope.setAvailableWidth(args.availableWidth);
6039
- scope.setAvailableHeight(args.availableHeight);
5956
+ var detectOverflowOptions = {
5957
+ altAxis: !constrainSize,
5958
+ boundary: boundaryElement || undefined,
5959
+ padding: 8,
5960
+ tether: tether,
5961
+ tetherOffset: tetherOffset
5962
+ };
5963
+ return [constrainSize && _extends({}, maxSizeModifier, {
5964
+ options: detectOverflowOptions
5965
+ }), constrainSize && {
5966
+ name: 'applyMaxSize',
5967
+ enabled: true,
5968
+ phase: 'beforeWrite',
5969
+ requires: ['maxSize'],
5970
+ fn: function fn(_ref) {
5971
+ var state = _ref.state;
5972
+ var _state$modifiersData$ = state.modifiersData.maxSize,
5973
+ width = _state$modifiersData$.width,
5974
+ height = _state$modifiersData$.height;
5975
+ state.styles.popper = _extends({}, state.styles.popper, {
5976
+ maxWidth: width + "px",
5977
+ maxHeight: height + "px"
5978
+ });
5979
+ }
5980
+ }, arrow && {
5981
+ name: 'arrow',
5982
+ options: {
5983
+ element: arrowElement,
5984
+ padding: 4
5985
+ }
5986
+ }, (constrainSize || preventOverflow) && {
5987
+ name: 'preventOverflow',
5988
+ options: detectOverflowOptions
5989
+ }, {
5990
+ name: 'offset',
5991
+ options: {
5992
+ offset: [skidding, distance]
5993
+ }
5994
+ }, margins && {
5995
+ name: 'margins',
5996
+ enabled: true,
5997
+ phase: 'beforeRead',
5998
+ fn: function fn(_ref2) {
5999
+ var state = _ref2.state;
6000
+ var rects = state.rects;
6001
+
6002
+ if (rects.reference) {
6003
+ rects.reference.x += margins[3];
6004
+ rects.reference.y += margins[1];
6005
+ rects.reference.width -= margins[1] + margins[3];
6006
+ rects.reference.height -= margins[0] + margins[2];
6040
6007
  }
6008
+ }
6009
+ }, {
6010
+ name: 'flip',
6011
+ options: {
6012
+ allowedAutoPlacements: allowedAutoPlacements,
6013
+ boundary: boundaryElement || undefined,
6014
+ fallbackPlacements: fallbackPlacements,
6015
+ padding: 8
6016
+ }
6017
+ }, matchReferenceWidth && {
6018
+ name: 'matchWidth',
6019
+ enabled: true,
6020
+ phase: 'beforeWrite',
6021
+ requires: ['computeStyles'],
6022
+ fn: function fn(_ref3) {
6023
+ var state = _ref3.state;
6024
+ var width = state.rects.reference.width;
6025
+ state.styles.popper.width = width + "px";
6026
+ },
6027
+ effect: function effect(_ref4) {
6028
+ var state = _ref4.state;
6029
+ var refElement = state.elements.reference;
6041
6030
 
6042
- if (scope.matchReferenceWidth) {
6043
- scope.setReferenceWidth(args.rects.reference.width);
6031
+ if (refElement instanceof HTMLElement) {
6032
+ state.elements.popper.style.width = refElement.offsetWidth - (margins ? margins[1] + margins[3] : 0) + "px";
6044
6033
  }
6045
- },
6046
- boundary: scope.boundaryElement || undefined
6047
- });
6034
+ }
6035
+ }].filter(Boolean);
6048
6036
  }
6049
6037
 
6050
- var Popover = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Popover(props, ref) {
6051
- var _theme$sanity$layer, _useElementSize, _middlewareData$arrow, _middlewareData$arrow2;
6038
+ function usePopoverModifiers(props) {
6039
+ var allowedAutoPlacements = props.allowedAutoPlacements,
6040
+ arrow = props.arrow,
6041
+ arrowElement = props.arrowElement,
6042
+ boundaryElement = props.boundaryElement,
6043
+ constrainSize = props.constrainSize,
6044
+ distance = props.distance,
6045
+ fallbackPlacements = props.fallbackPlacements,
6046
+ margins = props.margins,
6047
+ matchReferenceWidth = props.matchReferenceWidth,
6048
+ open = props.open,
6049
+ preventOverflow = props.preventOverflow,
6050
+ skidding = props.skidding,
6051
+ tether = props.tether,
6052
+ tetherOffset = props.tetherOffset;
6053
+ return useMemo(function () {
6054
+ return getPopoverModifiers({
6055
+ allowedAutoPlacements: allowedAutoPlacements,
6056
+ arrow: arrow,
6057
+ arrowElement: arrowElement,
6058
+ boundaryElement: boundaryElement,
6059
+ constrainSize: constrainSize,
6060
+ distance: distance,
6061
+ fallbackPlacements: fallbackPlacements,
6062
+ margins: margins,
6063
+ matchReferenceWidth: matchReferenceWidth,
6064
+ open: open,
6065
+ preventOverflow: preventOverflow,
6066
+ skidding: skidding,
6067
+ tether: tether,
6068
+ tetherOffset: tetherOffset
6069
+ });
6070
+ }, [allowedAutoPlacements, arrow, arrowElement, boundaryElement, constrainSize, distance, fallbackPlacements, margins, matchReferenceWidth, open, preventOverflow, skidding, tether, tetherOffset]);
6071
+ }
6072
+
6073
+ var _excluded$n = ["__unstable_margins", "allowedAutoPlacements", "arrow", "boundaryElement", "children", "content", "constrainSize", "disabled", "fallbackPlacements", "open", "padding", "placement", "portal", "preventOverflow", "radius", "referenceElement", "matchReferenceWidth", "shadow", "scheme", "style", "tether", "tetherOffset", "tone", "width", "zOffset"];
6074
+
6075
+ var _templateObject$j, _templateObject2$e, _templateObject3$8;
6076
+ var Root$i = styled(Layer)(function (_ref) {
6077
+ var $preventOverflow = _ref.$preventOverflow;
6078
+ return css(_templateObject$j || (_templateObject$j = _taggedTemplateLiteralLoose(["\n pointer-events: none;\n display: flex;\n flex-direction: column;\n max-width: calc(100% - 16px);\n\n & > * {\n min-height: 0;\n }\n\n /* Hide the popover when the reference element is out of bounds */\n ", "\n "])), $preventOverflow && css(_templateObject2$e || (_templateObject2$e = _taggedTemplateLiteralLoose(["\n &[data-popper-reference-hidden='true'] {\n display: none;\n }\n "]))));
6079
+ });
6080
+ var PopoverCard = styled(Card)(function (_ref2) {
6081
+ var $constrainSize = _ref2.$constrainSize;
6082
+ return css(_templateObject3$8 || (_templateObject3$8 = _taggedTemplateLiteralLoose(["\n flex: 1;\n max-height: ", ";\n pointer-events: all;\n\n && {\n display: flex;\n }\n\n flex-direction: column;\n\n & > * {\n min-height: 0;\n }\n\n ", "\n "])), $constrainSize && '100%', responsiveContainerWidthStyle);
6083
+ });
6084
+ /**
6085
+ * @public
6086
+ */
6087
+
6088
+ var Popover = /*#__PURE__*/forwardRef(function Popover(props, ref) {
6089
+ var _theme$sanity$layer;
6052
6090
 
6053
- var theme = useTheme();
6054
6091
  var boundaryElementContext = useBoundaryElement();
6092
+ var theme = useTheme();
6055
6093
 
6056
6094
  var margins = props.__unstable_margins,
6095
+ allowedAutoPlacements = props.allowedAutoPlacements,
6057
6096
  _props$arrow = props.arrow,
6058
- arrowProp = _props$arrow === void 0 ? true : _props$arrow,
6097
+ arrow = _props$arrow === void 0 ? true : _props$arrow,
6059
6098
  _props$boundaryElemen = props.boundaryElement,
6060
- boundaryElement = _props$boundaryElemen === void 0 ? boundaryElementContext.element : _props$boundaryElemen,
6061
- childProp = props.children,
6062
- _props$constrainSize = props.constrainSize,
6063
- constrainSize = _props$constrainSize === void 0 ? false : _props$constrainSize,
6099
+ boundaryElementProp = _props$boundaryElemen === void 0 ? boundaryElementContext.element : _props$boundaryElemen,
6100
+ child = props.children,
6064
6101
  content = props.content,
6102
+ constrainSize = props.constrainSize,
6065
6103
  disabled = props.disabled,
6066
6104
  fallbackPlacements = props.fallbackPlacements,
6067
- matchReferenceWidthProp = props.matchReferenceWidth,
6068
- open = props.open,
6069
- _props$overflow = props.overflow,
6070
- overflow = _props$overflow === void 0 ? props.constrainSize ? 'auto' : undefined : _props$overflow,
6071
- paddingProp = props.padding,
6105
+ _props$open = props.open,
6106
+ open = _props$open === void 0 ? false : _props$open,
6107
+ padding = props.padding,
6072
6108
  _props$placement = props.placement,
6073
- placementProp = _props$placement === void 0 ? 'bottom' : _props$placement,
6074
- portal = props.portal,
6075
- _props$preventOverflo = props.preventOverflow,
6076
- preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
6109
+ placement = _props$placement === void 0 ? 'bottom' : _props$placement,
6110
+ _props$portal = props.portal,
6111
+ portalProp = _props$portal === void 0 ? false : _props$portal,
6112
+ preventOverflow = props.preventOverflow,
6077
6113
  _props$radius = props.radius,
6078
- radiusProp = _props$radius === void 0 ? 3 : _props$radius,
6079
- referenceElement = props.referenceElement,
6080
- scheme = props.scheme,
6114
+ radius = _props$radius === void 0 ? 3 : _props$radius,
6115
+ referenceElementProp = props.referenceElement,
6116
+ matchReferenceWidth = props.matchReferenceWidth,
6081
6117
  _props$shadow = props.shadow,
6082
- shadowProp = _props$shadow === void 0 ? 3 : _props$shadow,
6118
+ shadow = _props$shadow === void 0 ? 3 : _props$shadow,
6119
+ scheme = props.scheme,
6120
+ _props$style = props.style,
6121
+ style = _props$style === void 0 ? EMPTY_RECORD : _props$style,
6122
+ tether = props.tether,
6123
+ tetherOffset = props.tetherOffset,
6083
6124
  _props$tone = props.tone,
6084
6125
  tone = _props$tone === void 0 ? 'inherit' : _props$tone,
6085
6126
  _props$width = props.width,
6086
- widthProp = _props$width === void 0 ? undefined : _props$width,
6127
+ widthProp = _props$width === void 0 ? 0 : _props$width,
6087
6128
  _props$zOffset = props.zOffset,
6088
- zOffsetProp = _props$zOffset === void 0 ? (_theme$sanity$layer = theme.sanity.layer) == null ? void 0 : _theme$sanity$layer.popover.zOffset : _props$zOffset,
6129
+ zOffset = _props$zOffset === void 0 ? (_theme$sanity$layer = theme.sanity.layer) == null ? void 0 : _theme$sanity$layer.popover.zOffset : _props$zOffset,
6089
6130
  restProps = _objectWithoutPropertiesLoose(props, _excluded$n);
6090
6131
 
6091
- var boundarySize = (_useElementSize = useElementSize(boundaryElement)) == null ? void 0 : _useElementSize.border;
6092
- var padding = useArrayProp(paddingProp);
6093
- var radius = useArrayProp(radiusProp);
6094
- var shadow = useArrayProp(shadowProp);
6095
- var width = useArrayProp(widthProp);
6096
- var zOffset = useArrayProp(zOffsetProp);
6097
-
6098
- var _useState = useState(undefined),
6099
- availableWidth = _useState[0],
6100
- setAvailableWidth = _useState[1];
6101
-
6102
- var _useState2 = useState(undefined),
6103
- availableHeight = _useState2[0],
6104
- setAvailableHeight = _useState2[1];
6105
-
6106
- var _useState3 = useState(undefined),
6107
- referenceWidth = _useState3[0],
6108
- setReferenceWidth = _useState3[1];
6109
-
6110
6132
  var forwardedRef = useForwardedRef(ref);
6111
- var arrowRef = useRef(null);
6112
- var rootBoundary = 'viewport';
6113
- var middleware = useMemo(function () {
6114
- var ret = []; // Flip the floating element when leaving the boundary box
6115
-
6116
- if (constrainSize || preventOverflow) {
6117
- ret.push(flip({
6118
- boundary: boundaryElement || undefined,
6119
- fallbackPlacements: fallbackPlacements,
6120
- padding: 8,
6121
- rootBoundary: rootBoundary
6122
- }));
6123
- } // Track sizes
6124
-
6125
-
6126
- ret.push(size({
6127
- boundaryElement: boundaryElement,
6128
- constrainSize: constrainSize,
6129
- matchReferenceWidth: matchReferenceWidthProp,
6130
- setAvailableHeight: setAvailableHeight,
6131
- setAvailableWidth: setAvailableWidth,
6132
- setReferenceWidth: setReferenceWidth
6133
- })); // Define distance between reference and floating element
6134
-
6135
- ret.push(offset({
6136
- mainAxis: arrowProp ? 4 : 0
6137
- })); // Shift the popover so its sits with the boundary eleement
6138
-
6139
- if (preventOverflow) {
6140
- ret.push(shift({
6141
- boundary: boundaryElement || undefined,
6142
- rootBoundary: rootBoundary,
6143
- padding: 8
6144
- }));
6145
- } // Place arrow
6146
-
6133
+ var portal = usePortal();
6147
6134
 
6148
- if (arrowProp) {
6149
- ret.push(arrow({
6150
- element: arrowRef,
6151
- padding: 4
6152
- }));
6153
- }
6135
+ var _useState = useState(null),
6136
+ referenceElement = _useState[0],
6137
+ setReferenceElement = _useState[1];
6154
6138
 
6155
- return ret;
6156
- }, [arrowProp, boundaryElement, constrainSize, fallbackPlacements, matchReferenceWidthProp, preventOverflow]);
6139
+ var _useState2 = useState(null),
6140
+ popperElement = _useState2[0],
6141
+ setPopperElement = _useState2[1];
6157
6142
 
6158
- var _useFloating = useFloating({
6159
- middleware: middleware,
6160
- placement: placementProp,
6161
- whileElementsMounted: autoUpdate
6162
- }),
6163
- x = _useFloating.x,
6164
- y = _useFloating.y,
6165
- placement = _useFloating.placement,
6166
- reference = _useFloating.reference,
6167
- floating = _useFloating.floating,
6168
- middlewareData = _useFloating.middlewareData,
6169
- strategy = _useFloating.strategy;
6170
-
6171
- var arrowX = (_middlewareData$arrow = middlewareData.arrow) == null ? void 0 : _middlewareData$arrow.x;
6172
- var arrowY = (_middlewareData$arrow2 = middlewareData.arrow) == null ? void 0 : _middlewareData$arrow2.y;
6173
- var setArrow = useCallback(function (arrowEl) {
6174
- arrowRef.current = arrowEl;
6175
- }, []);
6176
- var setFloating = useCallback(function (node) {
6177
- forwardedRef.current = node;
6178
- floating(node);
6179
- }, [floating, forwardedRef]);
6180
- var setReference = useCallback(function (node) {
6181
- reference(node);
6182
- var childRef = childProp == null ? void 0 : childProp.ref;
6143
+ var _useState3 = useState(null),
6144
+ arrowElement = _useState3[0],
6145
+ setArrowElement = _useState3[1];
6146
+
6147
+ var popperReferenceElement = referenceElementProp || referenceElement;
6148
+ var width = useArrayProp(matchReferenceWidth ? 'auto' : widthProp);
6149
+ var modifiers = usePopoverModifiers({
6150
+ allowedAutoPlacements: allowedAutoPlacements,
6151
+ arrow: arrow,
6152
+ arrowElement: arrowElement,
6153
+ boundaryElement: boundaryElementProp || portal.boundaryElement,
6154
+ constrainSize: constrainSize,
6155
+ distance: arrow ? 4 : 0,
6156
+ fallbackPlacements: fallbackPlacements,
6157
+ margins: margins,
6158
+ matchReferenceWidth: matchReferenceWidth,
6159
+ open: open,
6160
+ preventOverflow: preventOverflow,
6161
+ skidding: 0,
6162
+ tether: tether,
6163
+ tetherOffset: tetherOffset
6164
+ });
6165
+ var popper = usePopper(popperReferenceElement, popperElement, {
6166
+ placement: placement,
6167
+ modifiers: modifiers
6168
+ });
6169
+ var attributes = popper.attributes,
6170
+ forceUpdate = popper.forceUpdate,
6171
+ styles = popper.styles;
6172
+ var setRef = useCallback(function (el) {
6173
+ var childRef = child.ref;
6174
+ setReferenceElement(el);
6183
6175
 
6184
6176
  if (typeof childRef === 'function') {
6185
- childRef(node);
6177
+ childRef(el);
6186
6178
  } else if (childRef) {
6187
- childRef.current = node;
6179
+ childRef.current = el;
6188
6180
  }
6189
- }, [childProp, reference]);
6190
- var child = useMemo(function () {
6191
- if (!childProp || referenceElement) return null;
6192
- return /*#__PURE__*/cloneElement(childProp, {
6193
- ref: setReference
6194
- });
6195
- }, [childProp, referenceElement, setReference]);
6181
+ }, [child]);
6182
+ var setRootRef = useCallback(function (el) {
6183
+ setPopperElement(el);
6184
+ forwardedRef.current = el;
6185
+ }, [forwardedRef]);
6186
+ var popoverStyle = useMemo(function () {
6187
+ return _extends({}, style, styles.popper);
6188
+ }, [style, styles]);
6189
+ var updateTimeoutRef = useRef(null);
6196
6190
  useEffect(function () {
6197
- if (referenceElement) reference(referenceElement);
6198
- }, [reference, referenceElement]);
6191
+ if (updateTimeoutRef.current) {
6192
+ clearTimeout(updateTimeoutRef.current);
6193
+ updateTimeoutRef.current = null;
6194
+ }
6195
+
6196
+ updateTimeoutRef.current = setTimeout(function () {
6197
+ if (forceUpdate) {
6198
+ try {
6199
+ forceUpdate();
6200
+ } catch (_) {// ignore caught error
6201
+ }
6202
+ }
6203
+ }, 0);
6204
+ }, [content, forceUpdate, open, popperReferenceElement]);
6199
6205
 
6200
6206
  if (disabled) {
6201
- return childProp || /*#__PURE__*/React.createElement(React.Fragment, null);
6207
+ return child || /*#__PURE__*/React.createElement(React.Fragment, null);
6202
6208
  }
6203
6209
 
6204
- var popover = /*#__PURE__*/React.createElement(LayerProvider, {
6210
+ var node = /*#__PURE__*/React.createElement(Root$i, _extends({
6211
+ "data-ui": "Popover"
6212
+ }, restProps, {
6213
+ "$preventOverflow": preventOverflow,
6214
+ ref: setRootRef,
6215
+ style: popoverStyle,
6205
6216
  zOffset: zOffset
6206
- }, /*#__PURE__*/React.createElement(PopoverCard, _extends({}, restProps, {
6207
- __unstable_margins: margins,
6208
- arrow: arrowProp,
6209
- arrowRef: setArrow,
6210
- arrowX: arrowX,
6211
- arrowY: arrowY,
6212
- availableWidth: constrainSize ? availableWidth : undefined,
6213
- availableHeight: constrainSize ? availableHeight : undefined,
6214
- boundaryWidth: boundarySize == null ? void 0 : boundarySize.width,
6215
- overflow: overflow,
6217
+ }, attributes.popper), /*#__PURE__*/React.createElement(PopoverCard, {
6218
+ "$constrainSize": constrainSize,
6219
+ "$width": width,
6220
+ "data-ui": "PopoverCard",
6216
6221
  padding: padding,
6217
- placement: placement,
6218
6222
  radius: radius,
6219
- ref: setFloating,
6220
- referenceWidth: matchReferenceWidthProp ? referenceWidth : undefined,
6221
6223
  scheme: scheme,
6222
6224
  shadow: shadow,
6223
- strategy: strategy,
6224
- tone: tone,
6225
- x: x,
6226
- y: y,
6227
- width: width
6225
+ tone: tone
6226
+ }, arrow && /*#__PURE__*/React.createElement(PopoverArrow, {
6227
+ ref: setArrowElement,
6228
+ style: styles.arrow
6228
6229
  }), content));
6229
- return /*#__PURE__*/React.createElement(React.Fragment, null, open && /*#__PURE__*/React.createElement(React.Fragment, null, portal ? /*#__PURE__*/React.createElement(Portal, {
6230
- __unstable_name: typeof portal === 'string' ? portal : undefined
6231
- }, popover) : popover), child);
6232
- }));
6233
- Popover.displayName = 'Popover';
6230
+ return /*#__PURE__*/React.createElement(React.Fragment, null, child && !referenceElementProp ? /*#__PURE__*/cloneElement(child, {
6231
+ ref: setRef
6232
+ }) : child || /*#__PURE__*/React.createElement(React.Fragment, null), open && /*#__PURE__*/React.createElement(React.Fragment, null, portalProp && /*#__PURE__*/React.createElement(Portal, {
6233
+ __unstable_name: typeof portalProp === 'string' ? portalProp : undefined
6234
+ }, node), !portalProp && node));
6235
+ });
6234
6236
 
6235
6237
  var _templateObject$i, _templateObject2$d;
6236
6238
  function radioBaseStyle() {
@@ -6580,6 +6582,7 @@ var TextArea = /*#__PURE__*/forwardRef(function TextArea(props, forwardedRef) {
6580
6582
  }, restProps, {
6581
6583
  "$fontSize": useArrayProp(fontSize),
6582
6584
  "$padding": useArrayProp(padding),
6585
+ "$scheme": rootTheme.scheme,
6583
6586
  "$space": useArrayProp(0),
6584
6587
  "$tone": rootTheme.tone,
6585
6588
  "$weight": weight,
@@ -6588,6 +6591,7 @@ var TextArea = /*#__PURE__*/forwardRef(function TextArea(props, forwardedRef) {
6588
6591
  })), /*#__PURE__*/React.createElement(Presentation$1, {
6589
6592
  "$border": border,
6590
6593
  "$radius": useArrayProp(radius),
6594
+ "$scheme": rootTheme.scheme,
6591
6595
  "$tone": rootTheme.tone,
6592
6596
  "data-tone": rootTheme.tone
6593
6597
  })));
@@ -6689,7 +6693,9 @@ var TextInput = /*#__PURE__*/forwardRef(function TextInput(props, forwardedRef)
6689
6693
  "$hasPrefix": $hasPrefix,
6690
6694
  "$hasSuffix": $hasSuffix,
6691
6695
  "$radius": radius,
6696
+ "$scheme": rootTheme.scheme,
6692
6697
  "$tone": rootTheme.tone,
6698
+ "data-scheme": rootTheme.scheme,
6693
6699
  "data-tone": rootTheme.tone
6694
6700
  }, icon && /*#__PURE__*/React.createElement(LeftBox, {
6695
6701
  padding: padding
@@ -6700,7 +6706,7 @@ var TextInput = /*#__PURE__*/forwardRef(function TextInput(props, forwardedRef)
6700
6706
  }, /*#__PURE__*/React.createElement(Text, {
6701
6707
  size: fontSize
6702
6708
  }, /*#__PURE__*/isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && /*#__PURE__*/createElement(iconRight))));
6703
- }, [border, fontSize, icon, iconRight, padding, radius, rootTheme.tone, $hasClearButton, $hasPrefix, $hasSuffix]); // Render clear button (memoized)
6709
+ }, [border, fontSize, icon, iconRight, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]); // Render clear button (memoized)
6704
6710
 
6705
6711
  var clearButtonBoxPadding = useMemo(function () {
6706
6712
  return padding.map(function (v) {
@@ -6755,12 +6761,14 @@ var TextInput = /*#__PURE__*/forwardRef(function TextInput(props, forwardedRef)
6755
6761
  tone: rootTheme.tone
6756
6762
  }, prefixNode, /*#__PURE__*/React.createElement(InputRoot, null, /*#__PURE__*/React.createElement(Input, _extends({
6757
6763
  "data-as": "input",
6764
+ "data-scheme": rootTheme.scheme,
6758
6765
  "data-tone": rootTheme.tone
6759
6766
  }, restProps, {
6760
6767
  "$fontSize": fontSize,
6761
6768
  "$iconLeft": $hasIcon,
6762
6769
  "$iconRight": $hasIconRight || $hasClearButton,
6763
6770
  "$padding": padding,
6771
+ "$scheme": rootTheme.scheme,
6764
6772
  "$space": space,
6765
6773
  "$tone": rootTheme.tone,
6766
6774
  "$weight": weight,
@@ -6772,15 +6780,13 @@ var TextInput = /*#__PURE__*/forwardRef(function TextInput(props, forwardedRef)
6772
6780
  });
6773
6781
 
6774
6782
  var _templateObject$d, _templateObject2$9, _templateObject3$4;
6775
- var Root$b = styled.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n position: absolute;\n pointer-events: none;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: 7.5px 7.5px;\n }\n\n /* position: absolute;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n &:not([hidden]) {\n display: block;\n }\n transform-origin: 7.5px 7.5px;\n } */\n\n [data-placement^='top'] > & {\n bottom: -27px;\n }\n\n [data-placement^='right'] > & {\n left: -27px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -27px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -27px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])));
6783
+ var Root$b = styled.div(_templateObject$d || (_templateObject$d = _taggedTemplateLiteralLoose(["\n position: absolute;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n &:not([hidden]) {\n display: block;\n }\n transform-origin: 7.5px 7.5px;\n }\n\n [data-popper-placement^='top'] > div > & {\n bottom: -15px;\n }\n\n [data-popper-placement^='right'] > div > & {\n left: -15px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-popper-placement^='left'] > div > & {\n right: -15px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-popper-placement^='bottom'] > div > & {\n top: -15px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])));
6776
6784
  var Border = styled.path(_templateObject2$9 || (_templateObject2$9 = _taggedTemplateLiteralLoose(["\n fill: var(--card-shadow-outline-color);\n"])));
6777
6785
  var Shape = styled.path(_templateObject3$4 || (_templateObject3$4 = _taggedTemplateLiteralLoose(["\n fill: var(--card-bg-color);\n"])));
6778
6786
  var TooltipArrow = /*#__PURE__*/forwardRef(function TooltipArrow(props, ref) {
6779
6787
  var restProps = _extends({}, props);
6780
6788
 
6781
- return /*#__PURE__*/React.createElement(Root$b, _extends({
6782
- "data-ui": "Tooltip__arrow"
6783
- }, restProps, {
6789
+ return /*#__PURE__*/React.createElement(Root$b, _extends({}, restProps, {
6784
6790
  ref: ref
6785
6791
  }), /*#__PURE__*/React.createElement("svg", {
6786
6792
  width: "15",
@@ -6793,7 +6799,7 @@ var TooltipArrow = /*#__PURE__*/forwardRef(function TooltipArrow(props, ref) {
6793
6799
  })));
6794
6800
  });
6795
6801
 
6796
- var _excluded$g = ["boundaryElement", "children", "content", "disabled", "fallbackPlacements", "placement", "portal", "scheme", "shadow", "zOffset"];
6802
+ var _excluded$g = ["allowedAutoPlacements", "boundaryElement", "children", "content", "disabled", "fallbackPlacements", "placement", "portal", "scheme", "zOffset"];
6797
6803
 
6798
6804
  var _templateObject$c;
6799
6805
  var Root$a = styled(Layer)(_templateObject$c || (_templateObject$c = _taggedTemplateLiteralLoose(["\n pointer-events: none;\n"])));
@@ -6802,23 +6808,22 @@ var Root$a = styled(Layer)(_templateObject$c || (_templateObject$c = _taggedTemp
6802
6808
  */
6803
6809
 
6804
6810
  var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
6805
- var _theme$sanity$layer, _middlewareData$arrow, _middlewareData$arrow2;
6811
+ var _theme$sanity$layer;
6806
6812
 
6807
6813
  var boundaryElementContext = useBoundaryElement();
6808
6814
  var theme = useTheme();
6809
6815
 
6810
- var _props$boundaryElemen = props.boundaryElement,
6816
+ var allowedAutoPlacements = props.allowedAutoPlacements,
6817
+ _props$boundaryElemen = props.boundaryElement,
6811
6818
  boundaryElement = _props$boundaryElemen === void 0 ? boundaryElementContext == null ? void 0 : boundaryElementContext.element : _props$boundaryElemen,
6812
- childProp = props.children,
6819
+ children = props.children,
6813
6820
  content = props.content,
6814
6821
  disabled = props.disabled,
6815
6822
  fallbackPlacementsProp = props.fallbackPlacements,
6816
6823
  _props$placement = props.placement,
6817
- placementProp = _props$placement === void 0 ? 'bottom' : _props$placement,
6824
+ placement = _props$placement === void 0 ? 'bottom' : _props$placement,
6818
6825
  portal = props.portal,
6819
6826
  scheme = props.scheme,
6820
- _props$shadow = props.shadow,
6821
- shadow = _props$shadow === void 0 ? 2 : _props$shadow,
6822
6827
  _props$zOffset = props.zOffset,
6823
6828
  zOffset = _props$zOffset === void 0 ? (_theme$sanity$layer = theme.sanity.layer) == null ? void 0 : _theme$sanity$layer.tooltip.zOffset : _props$zOffset,
6824
6829
  restProps = _objectWithoutPropertiesLoose(props, _excluded$g);
@@ -6830,73 +6835,47 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
6830
6835
  referenceElement = _useState[0],
6831
6836
  setReferenceElement = _useState[1];
6832
6837
 
6833
- var arrowRef = useRef(null);
6834
- var rootBoundary = 'viewport';
6835
- var middleware = useMemo(function () {
6836
- var ret = []; // Flip the floating element when leaving the boundary box
6837
-
6838
- ret.push(flip({
6839
- boundary: boundaryElement || undefined,
6840
- fallbackPlacements: fallbackPlacements,
6841
- padding: 4,
6842
- rootBoundary: rootBoundary
6843
- })); // Define distance between reference and floating element
6844
-
6845
- ret.push(offset({
6846
- mainAxis: 3
6847
- })); // Shift the tooltip so its sits with the boundary eleement
6848
-
6849
- ret.push(shift({
6850
- boundary: boundaryElement || undefined,
6851
- rootBoundary: rootBoundary,
6852
- padding: 4
6853
- })); // Place arrow
6838
+ var _useState2 = useState(null),
6839
+ popperElement = _useState2[0],
6840
+ setPopperElement = _useState2[1];
6854
6841
 
6855
- ret.push(arrow({
6856
- element: arrowRef,
6857
- padding: 2
6858
- }));
6859
- return ret;
6860
- }, [boundaryElement, fallbackPlacements]);
6842
+ var _useState3 = useState(null),
6843
+ arrowElement = _useState3[0],
6844
+ setArrowElement = _useState3[1];
6861
6845
 
6862
- var _useFloating = useFloating({
6863
- middleware: middleware,
6864
- placement: placementProp,
6865
- whileElementsMounted: autoUpdate
6866
- }),
6867
- x = _useFloating.x,
6868
- y = _useFloating.y,
6869
- placement = _useFloating.placement,
6870
- reference = _useFloating.reference,
6871
- floating = _useFloating.floating,
6872
- middlewareData = _useFloating.middlewareData,
6873
- update = _useFloating.update,
6874
- strategy = _useFloating.strategy;
6875
-
6876
- var rootStyle = useMemo(function () {
6877
- return {
6878
- position: strategy,
6879
- top: y != null ? y : 0,
6880
- left: x != null ? x : 0
6881
- };
6882
- }, [strategy, x, y]);
6883
- var staticSide = placement && FLOATING_STATIC_SIDES[placement.split('-')[0]];
6884
- var arrowX = (_middlewareData$arrow = middlewareData.arrow) == null ? void 0 : _middlewareData$arrow.x;
6885
- var arrowY = (_middlewareData$arrow2 = middlewareData.arrow) == null ? void 0 : _middlewareData$arrow2.y;
6886
- var arrowStyle = useMemo(function () {
6887
- var style = {
6888
- left: arrowX !== null ? arrowX : undefined,
6889
- top: arrowY !== null ? arrowY : undefined,
6890
- right: undefined,
6891
- bottom: undefined
6892
- };
6893
- if (staticSide) style[staticSide] = -15;
6894
- return style;
6895
- }, [arrowX, arrowY, staticSide]);
6846
+ var popper = usePopper(referenceElement, popperElement, {
6847
+ placement: placement,
6848
+ modifiers: [{
6849
+ name: 'arrow',
6850
+ options: {
6851
+ element: arrowElement,
6852
+ padding: 4
6853
+ }
6854
+ }, {
6855
+ name: 'preventOverflow',
6856
+ options: {
6857
+ altAxis: true,
6858
+ boundary: boundaryElement || undefined,
6859
+ padding: 4
6860
+ }
6861
+ }, {
6862
+ name: 'offset',
6863
+ options: {
6864
+ offset: [0, 3]
6865
+ }
6866
+ }, {
6867
+ name: 'flip',
6868
+ options: {
6869
+ allowedAutoPlacements: allowedAutoPlacements,
6870
+ fallbackPlacements: fallbackPlacements
6871
+ }
6872
+ }]
6873
+ });
6874
+ var forceUpdate = popper.forceUpdate;
6896
6875
 
6897
- var _useState2 = useState(false),
6898
- isOpen = _useState2[0],
6899
- setIsOpen = _useState2[1];
6876
+ var _useState4 = useState(false),
6877
+ isOpen = _useState4[0],
6878
+ setIsOpen = _useState4[1];
6900
6879
 
6901
6880
  var handleBlur = useCallback(function () {
6902
6881
  return setIsOpen(false);
@@ -6930,7 +6909,23 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
6930
6909
  return function () {
6931
6910
  window.removeEventListener('mousemove', handleWindowMouseMove);
6932
6911
  };
6933
- }, [isOpen, referenceElement]); // Close when `disabled` changes to `true`
6912
+ }, [isOpen, referenceElement]);
6913
+ var updateTimeoutRef = useRef(null);
6914
+ useEffect(function () {
6915
+ if (updateTimeoutRef.current) {
6916
+ clearTimeout(updateTimeoutRef.current);
6917
+ updateTimeoutRef.current = null;
6918
+ }
6919
+
6920
+ updateTimeoutRef.current = setTimeout(function () {
6921
+ if (forceUpdate) {
6922
+ try {
6923
+ forceUpdate();
6924
+ } catch (_) {// ignore caught error
6925
+ }
6926
+ }
6927
+ }, 0);
6928
+ }, [forceUpdate, content]); // Close when `disabled` changes to `true`
6934
6929
 
6935
6930
  useEffect(function () {
6936
6931
  if (disabled) setIsOpen(false);
@@ -6938,61 +6933,40 @@ var Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
6938
6933
 
6939
6934
  useEffect(function () {
6940
6935
  if (!content) setIsOpen(false);
6941
- }, [content]); // Update reference
6936
+ }, [content]);
6942
6937
 
6943
- useEffect(function () {
6944
- return reference(referenceElement);
6945
- }, [reference, referenceElement]);
6946
- var setArrow = useCallback(function (arrowEl) {
6947
- arrowRef.current = arrowEl;
6948
- update();
6949
- }, [update]);
6950
- var setFloating = useCallback(function (node) {
6951
- forwardedRef.current = node;
6952
- floating(node);
6953
- }, [floating, forwardedRef]);
6954
- var childRef = childProp == null ? void 0 : childProp.ref;
6955
- var setReference = useCallback(function (node) {
6956
- if (typeof childRef === 'function') {
6957
- childRef(node);
6958
- } else if (childRef) {
6959
- childRef.current = node;
6960
- } // childRef.current = node
6961
-
6962
-
6963
- setReferenceElement(node);
6964
- }, [childRef]);
6965
- var child = useMemo(function () {
6966
- if (!childProp) return null;
6967
- return /*#__PURE__*/cloneElement(childProp, {
6968
- onBlur: handleBlur,
6969
- onFocus: handleFocus,
6970
- onMouseEnter: handleMouseEnter,
6971
- onMouseLeave: handleMouseLeave,
6972
- ref: setReference
6973
- });
6974
- }, [childProp, handleBlur, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
6975
- if (!child) return /*#__PURE__*/React.createElement(React.Fragment, null);
6976
- if (disabled) return child;
6977
- var root = /*#__PURE__*/React.createElement(Root$a, _extends({
6938
+ var setRef = function setRef(el) {
6939
+ setPopperElement(el);
6940
+ forwardedRef.current = el;
6941
+ };
6942
+
6943
+ if (!children) return /*#__PURE__*/React.createElement(React.Fragment, null);
6944
+ if (disabled) return children;
6945
+ var referenceProps = {
6946
+ onBlur: handleBlur,
6947
+ onFocus: handleFocus,
6948
+ onMouseEnter: handleMouseEnter,
6949
+ onMouseLeave: handleMouseLeave,
6950
+ ref: setReferenceElement
6951
+ };
6952
+ var referenceNode = /*#__PURE__*/cloneElement(children, referenceProps);
6953
+ var popperNode = /*#__PURE__*/React.createElement(Root$a, _extends({
6978
6954
  "data-ui": "Tooltip"
6979
- }, restProps, {
6980
- ref: setFloating,
6981
- style: rootStyle,
6955
+ }, restProps, popper.attributes.popper, {
6956
+ ref: setRef,
6957
+ style: popper.styles.popper,
6982
6958
  zOffset: zOffset
6983
6959
  }), /*#__PURE__*/React.createElement(Card, {
6984
- "data-ui": "Tooltip__card",
6985
- "data-placement": placement,
6986
6960
  radius: 2,
6987
6961
  scheme: scheme,
6988
- shadow: shadow
6962
+ shadow: 3
6989
6963
  }, content, /*#__PURE__*/React.createElement(TooltipArrow, {
6990
- ref: setArrow,
6991
- style: arrowStyle
6964
+ ref: setArrowElement,
6965
+ style: popper.styles.arrow
6992
6966
  })));
6993
- return /*#__PURE__*/React.createElement(React.Fragment, null, child, isOpen && /*#__PURE__*/React.createElement(React.Fragment, null, portal ? /*#__PURE__*/React.createElement(Portal, {
6967
+ return /*#__PURE__*/React.createElement(React.Fragment, null, referenceNode, isOpen && /*#__PURE__*/React.createElement(React.Fragment, null, portal && /*#__PURE__*/React.createElement(Portal, {
6994
6968
  __unstable_name: typeof portal === 'string' ? portal : undefined
6995
- }, root) : root));
6969
+ }, popperNode), !portal && popperNode));
6996
6970
  });
6997
6971
 
6998
6972
  var _templateObject$b, _templateObject2$8, _templateObject3$3, _templateObject4$2, _templateObject5$1;
@@ -7010,7 +6984,7 @@ var ListBox = styled(Box)(_templateObject2$8 || (_templateObject2$8 = _taggedTem
7010
6984
  * @internal
7011
6985
  */
7012
6986
 
7013
- var ResultsPopover = styled(Popover)(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["\n &[data-popper-reference-hidden='true'] {\n display: none;\n }\n"])));
6987
+ var ResultsPopover = styled(Popover)(_templateObject3$3 || (_templateObject3$3 = _taggedTemplateLiteralLoose(["\n & > div {\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n\n &[data-popper-reference-hidden='true'] {\n display: none;\n }\n"])));
7014
6988
  var rotate = keyframes(_templateObject4$2 || (_templateObject4$2 = _taggedTemplateLiteralLoose(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
7015
6989
  /**
7016
6990
  * @internal
@@ -7126,17 +7100,17 @@ var AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = ['Control', 'Shift', 'Alt', 'Enter', 'Hom
7126
7100
  * @internal
7127
7101
  */
7128
7102
 
7129
- var AUTOCOMPLETE_POPOVER_MARGINS = [0, 1, 0, 0];
7103
+ var AUTOCOMPLETE_POPOVER_MARGINS = [0, 1, 1, 1];
7130
7104
  /**
7131
7105
  * @internal
7132
7106
  */
7133
7107
 
7134
- var AUTOCOMPLETE_POPOVER_PLACEMENT = 'bottom';
7108
+ var AUTOCOMPLETE_POPOVER_PLACEMENT = 'bottom-start';
7135
7109
  /**
7136
7110
  * @internal
7137
7111
  */
7138
7112
 
7139
- var AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ['bottom', 'top'];
7113
+ var AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ['top-start'];
7140
7114
 
7141
7115
  var _excluded$f = ["border", "customValidity", "disabled", "filterOption", "fontSize", "icon", "id", "listBox", "loading", "onBlur", "onChange", "onFocus", "onQueryChange", "onSelect", "openButton", "options", "padding", "popover", "prefix", "radius", "readOnly", "relatedElements", "renderOption", "renderPopover", "renderValue", "suffix", "value"];
7142
7116