@sanity/ui 4.4.2 → 4.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{arrow-A3jQ7LS0.js → arrow-MMVAW3Ew.js} +2 -2
  2. package/dist/{arrow-A3jQ7LS0.js.map → arrow-MMVAW3Ew.js.map} +1 -1
  3. package/dist/autocomplete.js +5 -5
  4. package/dist/breadcrumbs.js +4 -4
  5. package/dist/{button-dhq4ViVg.js → button-Bp0udHV9.js} +50 -47
  6. package/dist/button-Bp0udHV9.js.map +1 -0
  7. package/dist/button-dnqMFkWg.d.ts.map +1 -1
  8. package/dist/code.d.ts.map +1 -1
  9. package/dist/code.js +12 -6
  10. package/dist/code.js.map +1 -1
  11. package/dist/{flex-BqQXaSxS.js → flex-ohP2jG9d.js} +2 -2
  12. package/dist/{flex-BqQXaSxS.js.map → flex-ohP2jG9d.js.map} +1 -1
  13. package/dist/{grid-Bpb2bIJ6.js → grid-D-gOpN8z.js} +2 -2
  14. package/dist/{grid-Bpb2bIJ6.js.map → grid-D-gOpN8z.js.map} +1 -1
  15. package/dist/{hotkeys-Caqg1W-_.js → hotkeys-BPJuQ-gO.js} +9 -10
  16. package/dist/{hotkeys-Caqg1W-_.js.map → hotkeys-BPJuQ-gO.js.map} +1 -1
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +157 -127
  19. package/dist/index.js.map +1 -1
  20. package/dist/{layer-AWzYcY_j.js → layer-DP8gT1ex.js} +2 -2
  21. package/dist/{layer-AWzYcY_j.js.map → layer-DP8gT1ex.js.map} +1 -1
  22. package/dist/menu.d.ts +3 -3
  23. package/dist/menu.js +30 -19
  24. package/dist/menu.js.map +1 -1
  25. package/dist/{popover-CEDyHcBi.js → popover-BVbv1K3z.js} +4 -4
  26. package/dist/{popover-CEDyHcBi.js.map → popover-BVbv1K3z.js.map} +1 -1
  27. package/dist/popover.js +1 -1
  28. package/dist/responsiveFont-Cyvxxz-G.js +81 -0
  29. package/dist/responsiveFont-Cyvxxz-G.js.map +1 -0
  30. package/dist/{stack-Cv-WM-7p.js → stack-CPdFknrG.js} +22 -16
  31. package/dist/stack-CPdFknrG.js.map +1 -0
  32. package/dist/styles.css +137 -16
  33. package/dist/{textInput-Ddxi4mkC.js → textInput-CTqkq5UQ.js} +38 -17
  34. package/dist/textInput-CTqkq5UQ.js.map +1 -0
  35. package/dist/toast.js +5 -5
  36. package/dist/tooltip.js +3 -3
  37. package/dist/{useLayer-B0i19TTM.js → useLayer-D_TnC6On.js} +43 -28
  38. package/dist/useLayer-D_TnC6On.js.map +1 -0
  39. package/package.json +1 -1
  40. package/dist/button-dhq4ViVg.js.map +0 -1
  41. package/dist/codeFontStyle-B-bhR3hF.js +0 -11
  42. package/dist/codeFontStyle-B-bhR3hF.js.map +0 -1
  43. package/dist/responsiveFont-B08q0jwm.js +0 -57
  44. package/dist/responsiveFont-B08q0jwm.js.map +0 -1
  45. package/dist/stack-Cv-WM-7p.js.map +0 -1
  46. package/dist/textInput-Ddxi4mkC.js.map +0 -1
  47. package/dist/useLayer-B0i19TTM.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,21 +1,20 @@
1
1
  "use client";
2
2
  import { a as _ruleSet, c as EMPTY_RECORD, i as _responsive, n as _getArrayProp, o as rem, r as _getResponsiveSpace, t as _fillCSSObject } from "./helpers-XThPpWje.js";
3
- import { a as textInputFontSizeStyle, c as responsiveInputPaddingStyle, d as attemptFocus, f as focusFirstDescendant, g as _raf2, h as _raf, i as textInputBaseStyle, l as useCustomValidity, m as isFocusable, n as inputRoot, o as textInputRepresentationStyle, p as focusLastDescendant, r as textAreaRoot, s as responsiveInputPaddingIconRightStyle, t as TextInput, u as _hasFocus } from "./textInput-Ddxi4mkC.js";
3
+ import { _ as isFocusable, a as textInputColorStyle, c as textInputRepresentationColorStyle, d as responsiveInputPaddingStyle, f as useCustomValidity, g as focusLastDescendant, h as focusFirstDescendant, i as textInputBaseStyle, l as textInputRepresentationStyle, m as attemptFocus, n as inputRoot, o as textInputFontSizeStyle, p as _hasFocus, r as textAreaRoot, s as textInputFontStyle, t as TextInput, u as responsiveInputPaddingIconRightStyle, v as _raf, y as _raf2 } from "./textInput-CTqkq5UQ.js";
4
4
  import { a as isHTMLElement, c as isHTMLTextAreaElement, i as isHTMLButtonElement, n as containsOrEqualsElement, o as isHTMLInputElement, r as isHTMLAnchorElement, s as isHTMLSelectElement, t as _isEnterToClickElement } from "./element-BYgCE_iK.js";
5
5
  import { t as getTheme_v2 } from "./getTheme_v2-y09KqtEb.js";
6
- import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-B0i19TTM.js";
7
- import { t as Flex } from "./flex-BqQXaSxS.js";
8
- import { a as responsiveTextAlignStyle, i as responsiveTextFont, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-Cv-WM-7p.js";
9
- import { t as responsiveFont } from "./responsiveFont-B08q0jwm.js";
10
- import { n as Spinner, t as Button } from "./button-dhq4ViVg.js";
6
+ import { _ as useTheme_v2, a as useMatchMedia, b as responsivePaddingStyle, c as ThemeColorProvider, d as createGlobalScopedContext, g as useTheme, h as _cardColorStyle, i as usePrefersReducedMotion, l as useRootTheme, m as focusRingStyle, n as LayerProvider, o as useMediaIndex, p as focusRingBorderStyle, s as Card, t as useLayer, u as ThemeProvider, v as responsiveRadiusStyle, y as Box } from "./useLayer-D_TnC6On.js";
7
+ import { t as Flex } from "./flex-ohP2jG9d.js";
8
+ import { a as fontColorStyle, i as responsiveTextAlignStyle, n as Text, r as SpanWithTextOverflow, t as Stack } from "./stack-CPdFknrG.js";
9
+ import { i as responsiveFont, n as _fontWeight, r as _responsiveFontSize, t as _fontBase } from "./responsiveFont-Cyvxxz-G.js";
10
+ import { n as Spinner, t as Button } from "./button-Bp0udHV9.js";
11
11
  import { t as _elementSizeObserver } from "./elementSizeObserver-pevZfdGa.js";
12
- import { a as resolvePortalElement, i as PortalContext, n as Portal, o as useBoundaryElement, r as usePortal, s as BoundaryElementContext, t as Arrow } from "./arrow-A3jQ7LS0.js";
12
+ import { a as resolvePortalElement, i as PortalContext, n as Portal, o as useBoundaryElement, r as usePortal, s as BoundaryElementContext, t as Arrow } from "./arrow-MMVAW3Ew.js";
13
13
  import { t as useClickOutsideEvent } from "./useClickOutsideEvent-CC1zgOmv.js";
14
- import { t as responsiveCodeFontStyle } from "./codeFontStyle-B-bhR3hF.js";
15
14
  import { a as rgba$1, c as hslToRgb$1, i as multiply$1, l as rgbToHex$1, n as buildTheme, o as parseColor$1, r as screen$1, s as hexToRgb$1, t as createColorTheme$1, u as rgbToHsl$1 } from "./factory-BzXTX8_Q.js";
16
- import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-Caqg1W-_.js";
17
- import { t as Layer } from "./layer-AWzYcY_j.js";
18
- import { t as Grid } from "./grid-Bpb2bIJ6.js";
15
+ import { i as useGlobalKeyDown, n as KBD, r as Inline, t as Hotkeys } from "./hotkeys-BPJuQ-gO.js";
16
+ import { t as Layer } from "./layer-DP8gT1ex.js";
17
+ import { t as Grid } from "./grid-D-gOpN8z.js";
19
18
  import { c } from "react/compiler-runtime";
20
19
  import { ChevronDownIcon } from "@sanity/icons/ChevronDown";
21
20
  import { clsx } from "clsx/lite";
@@ -706,7 +705,7 @@ function Tree(props) {
706
705
  }
707
706
  function treeItemRootColorStyle(props) {
708
707
  let { color } = getTheme_v2(props.theme), tone = color.selectable.default;
709
- return css`&[role='none']{& > [role='treeitem']{${_cardColorStyle(color, tone.enabled)}}&[data-selected] > [role='treeitem']{${_cardColorStyle(color, tone.pressed)}}@media (hover:hover){&:not([data-selected]) > [role='treeitem']:not(:focus):hover{${_cardColorStyle(color, tone.hovered)}}& > [role='treeitem']:focus{${_cardColorStyle(color, tone.selected)}}}}&[role='treeitem']{& > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.enabled)}}&[data-selected] > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.pressed)}}@media (hover:hover){&:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover{${_cardColorStyle(color, tone.hovered)}}&:focus > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.selected)}}}}`;
708
+ return css`&[role='none'] > [role='treeitem'],&[role='treeitem'] > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.enabled)}}&[role='none'][data-selected] > [role='treeitem'],&[role='treeitem'][data-selected] > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.pressed)}}@media (hover:hover){&[role='none']:not([data-selected]) > [role='treeitem']:not(:focus):hover,&[role='treeitem']:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover{${_cardColorStyle(color, tone.hovered)}}&[role='none'] > [role='treeitem']:focus,&[role='treeitem']:focus > [data-ui='TreeItem__box']{${_cardColorStyle(color, tone.selected)}}}`;
710
709
  }
711
710
  function treeItemBoxStyle(props) {
712
711
  let { $level } = props, { space } = getTheme_v2(props.theme);
@@ -979,21 +978,20 @@ function usePrefersDark(t0) {
979
978
  function _temp$3() {
980
979
  return !1;
981
980
  }
982
- /**
983
- * Get responsive CSS for the `label` font style.
984
- * @internal
985
- */
986
- function responsiveLabelFont(props) {
987
- return responsiveFont("label", props);
988
- }
989
981
  function labelBaseStyle(props) {
990
- let { $accent, $muted } = props, { font } = getTheme_v2(props.theme);
991
- return css`text-transform:uppercase;${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}`;
992
- }
993
- const StyledLabel = /* @__PURE__ */ styled.div.withConfig({
982
+ let { font } = getTheme_v2(props.theme);
983
+ return css`${_fontBase("label", props)} text-transform:uppercase;& code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}`;
984
+ }
985
+ const StyledLabel = /* @__PURE__ */ styled(/* @__PURE__ */ styled(/* @__PURE__ */ styled.div.withConfig({
986
+ displayName: "LabelBase",
987
+ componentId: "sc-juabwe-0"
988
+ })(labelBaseStyle)).withConfig({
989
+ displayName: "LabelSize",
990
+ componentId: "sc-juabwe-1"
991
+ })((props) => _responsiveFontSize("label", props))).withConfig({
994
992
  displayName: "StyledLabel",
995
- componentId: "sc-ws9v9t-0"
996
- })(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
993
+ componentId: "sc-juabwe-2"
994
+ })((props) => _fontWeight("label", props), responsiveTextAlignStyle, fontColorStyle);
997
995
  function LabelComponent(props) {
998
996
  let $ = c(27), accent, align, childrenProp, ref, restProps, t0, t1, textOverflow, weight;
999
997
  $[0] === props ? (accent = $[1], align = $[2], childrenProp = $[3], ref = $[4], restProps = $[5], t0 = $[6], t1 = $[7], textOverflow = $[8], weight = $[9]) : ({accent, align, children: childrenProp, muted: t0, ref, size: t1, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = accent, $[2] = align, $[3] = childrenProp, $[4] = ref, $[5] = restProps, $[6] = t0, $[7] = t1, $[8] = textOverflow, $[9] = weight);
@@ -1028,34 +1026,20 @@ function LabelComponent(props) {
1028
1026
  * @public
1029
1027
  */
1030
1028
  const Label = LabelComponent;
1031
- function avatarRootStyle(props) {
1032
- let { $color } = props, { avatar } = getTheme_v2(props.theme);
1029
+ function avatarColorStyle(props) {
1030
+ let { $color } = props;
1033
1031
  return {
1034
1032
  "--avatar-bg-color": `var(--card-avatar-${$color}-bg-color)`,
1035
- "--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)`,
1036
- width: "var(--avatar-size)",
1037
- height: "var(--avatar-size)",
1038
- borderRadius: "calc(var(--avatar-size) / 2)",
1039
- backgroundColor: "var(--avatar-bg-color)",
1040
- position: "relative",
1041
- boxSizing: "border-box",
1042
- userSelect: "none",
1043
- boxShadow: "0 0 0 1px var(--card-bg-color)",
1044
- "&[data-status=\"inactive\"]": { opacity: "0.5" },
1045
- "&[data-as=\"button\"]": {
1046
- WebkitFontSmoothing: "inherit",
1047
- appearance: "none",
1048
- margin: 0,
1049
- padding: 0,
1050
- border: 0,
1051
- font: "inherit",
1052
- color: "inherit",
1053
- outline: "none",
1054
- "&:focus": { boxShadow: focusRingStyle({ focusRing: avatar.focusRing }) },
1055
- "&:focus:not(:focus-visible)": { boxShadow: "none" }
1056
- }
1033
+ "--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)`
1057
1034
  };
1058
1035
  }
1036
+ function avatarRootStyle(props) {
1037
+ let { avatar } = getTheme_v2(props.theme);
1038
+ return { "&[data-as=\"button\"]": {
1039
+ "&:focus": { boxShadow: focusRingStyle({ focusRing: avatar.focusRing }) },
1040
+ "&:focus:not(:focus-visible)": { boxShadow: "none" }
1041
+ } };
1042
+ }
1059
1043
  /**
1060
1044
  * Sets `--avatar-size` per breakpoint: the root, the image and the stroke
1061
1045
  * overlay (`avatar.css.ts`) size themselves from it, so `size` arrays stay
@@ -1068,14 +1052,14 @@ function responsiveAvatarSizeStyle(props) {
1068
1052
  return { "--avatar-size": rem(avatarSize.size) };
1069
1053
  });
1070
1054
  }
1071
- var avatarArrow = "_1jezl1b0", avatarStack = "_1jezl1b5";
1072
- const StyledAvatar = /* @__PURE__ */ styled.div.withConfig({
1055
+ var avatarArrow = "_1jezl1b1", avatarCounter = "_1jezl1b7", avatarRoot = "_1jezl1b0", avatarStack = "_1jezl1b6";
1056
+ const StyledAvatar = /* @__PURE__ */ styled(/* @__PURE__ */ styled.div.attrs({ className: avatarRoot }).withConfig({
1057
+ displayName: "AvatarBase",
1058
+ componentId: "sc-943qen-0"
1059
+ })(avatarRootStyle)).withConfig({
1073
1060
  displayName: "StyledAvatar",
1074
- componentId: "sc-atqa3-0"
1075
- })(responsiveAvatarSizeStyle, avatarRootStyle), InitialsLabel = /* @__PURE__ */ styled(Label).withConfig({
1076
- displayName: "InitialsLabel",
1077
- componentId: "sc-atqa3-1"
1078
- })({ color: "inherit" });
1061
+ componentId: "sc-943qen-1"
1062
+ })(responsiveAvatarSizeStyle, avatarColorStyle);
1079
1063
  function AvatarComponent(props) {
1080
1064
  let $ = c(42), __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, ref, restProps, src, t0, t1, t2, title;
1081
1065
  $[0] === props ? (__unstable_hideInnerStroke = $[1], animateArrowFrom = $[2], arrowPositionProp = $[3], asProp = $[4], initials = $[5], onImageLoadError = $[6], ref = $[7], restProps = $[8], src = $[9], t0 = $[10], t1 = $[11], t2 = $[12], title = $[13]) : ({__unstable_hideInnerStroke, as: asProp, color: t0, src, title, initials, onImageLoadError, arrowPosition: arrowPositionProp, animateArrowFrom, ref, status: t1, size: t2, ...restProps} = props, $[0] = props, $[1] = __unstable_hideInnerStroke, $[2] = animateArrowFrom, $[3] = arrowPositionProp, $[4] = asProp, $[5] = initials, $[6] = onImageLoadError, $[7] = ref, $[8] = restProps, $[9] = src, $[10] = t0, $[11] = t1, $[12] = t2, $[13] = title);
@@ -1108,24 +1092,24 @@ function AvatarComponent(props) {
1108
1092
  let t9;
1109
1093
  $[22] !== __unstable_hideInnerStroke || $[23] !== avatarSize || $[24] !== handleImageError || $[25] !== imageFailed || $[26] !== src ? (t9 = !imageFailed && src && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("img", {
1110
1094
  alt: "",
1111
- className: "_1jezl1b1",
1095
+ className: "_1jezl1b2",
1112
1096
  draggable: !1,
1113
1097
  height: avatarSize.size,
1114
1098
  onError: handleImageError,
1115
1099
  src,
1116
1100
  width: avatarSize.size
1117
1101
  }), /* @__PURE__ */ jsxs("svg", {
1118
- className: "_1jezl1b2",
1102
+ className: "_1jezl1b3",
1119
1103
  viewBox: "0 0 2 2",
1120
1104
  fill: "none",
1121
1105
  children: [!__unstable_hideInnerStroke && /* @__PURE__ */ jsx("circle", {
1122
- className: "_1jezl1b3",
1106
+ className: "_1jezl1b4",
1123
1107
  cx: "1",
1124
1108
  cy: "1",
1125
1109
  r: "1",
1126
1110
  vectorEffect: "non-scaling-stroke"
1127
1111
  }), /* @__PURE__ */ jsx("circle", {
1128
- className: "_1jezl1b4",
1112
+ className: "_1jezl1b5",
1129
1113
  cx: "1",
1130
1114
  cy: "1",
1131
1115
  r: "1",
@@ -1133,9 +1117,9 @@ function AvatarComponent(props) {
1133
1117
  })]
1134
1118
  })] }), $[22] = __unstable_hideInnerStroke, $[23] = avatarSize, $[24] = handleImageError, $[25] = imageFailed, $[26] = src, $[27] = t9) : t9 = $[27];
1135
1119
  let t10 = (imageFailed || !src) && initials && /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx("div", {
1136
- className: "_1jezl1b6",
1137
- children: /* @__PURE__ */ jsx(InitialsLabel, {
1138
- forwardedAs: "span",
1120
+ className: "_1jezl1b8",
1121
+ children: /* @__PURE__ */ jsx(Label, {
1122
+ as: "span",
1139
1123
  size: size.map(_temp$2),
1140
1124
  weight: "medium",
1141
1125
  children: initials
@@ -1180,14 +1164,14 @@ function _responsiveAvatarCounterSizeStyle(props) {
1180
1164
  } : EMPTY_RECORD;
1181
1165
  });
1182
1166
  }
1183
- function _avatarCounterBaseStyle(props) {
1167
+ function _avatarCounterPaddingStyle(props) {
1184
1168
  let { space } = getTheme_v2(props.theme);
1185
- return css`align-items:center;justify-content:center;box-sizing:border-box;user-select:none;color:inherit;color:var(--card-fg-color);background:var(--card-bg-color);box-shadow:0 0 0 1px var(--card-bg-color),inset 0 0 0 1px var(--card-hairline-hard-color);padding:0 ${rem(space[2])};&:not([hidden]){display:flex;}`;
1169
+ return css`padding:0 ${rem(space[2])};`;
1186
1170
  }
1187
- const StyledAvatarCounter = /* @__PURE__ */ styled.div.withConfig({
1171
+ const StyledAvatarCounter = /* @__PURE__ */ styled.div.attrs({ className: avatarCounter }).withConfig({
1188
1172
  displayName: "StyledAvatarCounter",
1189
- componentId: "sc-rwjooy-0"
1190
- })(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
1173
+ componentId: "sc-nxxvbb-0"
1174
+ })(_responsiveAvatarCounterSizeStyle, _avatarCounterPaddingStyle);
1191
1175
  /**
1192
1176
  * @public
1193
1177
  */
@@ -1261,23 +1245,21 @@ function AvatarStack(props) {
1261
1245
  ]
1262
1246
  }), $[35] = T0, $[36] = t2, $[37] = t3, $[38] = t4, $[39] = t5, $[40] = t6, $[41] = t7, $[42] = t8, $[43] = t9, $[44] = t10) : t10 = $[44], t10;
1263
1247
  }
1264
- function badgeStyle(props) {
1248
+ const badgeBaseStyle = css`background-color:var(--card-bg-color);cursor:default;&:not([hidden]){display:inline-block;vertical-align:top;}`;
1249
+ function badgeToneStyle(props) {
1265
1250
  let { $tone } = props;
1266
1251
  return {
1267
1252
  "--card-bg-color": `var(--card-badge-${$tone}-bg-color)`,
1268
- "--card-fg-color": `var(--card-badge-${$tone}-fg-color)`,
1269
- backgroundColor: "var(--card-bg-color)",
1270
- cursor: "default",
1271
- "&:not([hidden])": {
1272
- display: "inline-block",
1273
- verticalAlign: "top"
1274
- }
1253
+ "--card-fg-color": `var(--card-badge-${$tone}-fg-color)`
1275
1254
  };
1276
1255
  }
1277
- const StyledBadge = /* @__PURE__ */ styled(Box).withConfig({
1256
+ const BadgeBase = styled(Box).withConfig({
1257
+ displayName: "BadgeBase",
1258
+ componentId: "sc-1b0zh7-0"
1259
+ })`${badgeBaseStyle}`, StyledBadge = /* @__PURE__ */ styled(BadgeBase).withConfig({
1278
1260
  displayName: "StyledBadge",
1279
- componentId: "sc-zj5mk0-0"
1280
- })(responsiveRadiusStyle, badgeStyle), Badge = function Badge(props) {
1261
+ componentId: "sc-1b0zh7-1"
1262
+ })(responsiveRadiusStyle, badgeToneStyle), Badge = function Badge(props) {
1281
1263
  let $ = c(22), children, ref, restProps, t0, t1, t2, t3;
1282
1264
  $[0] === props ? (children = $[1], ref = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7]) : ({children, fontSize: t0, padding: t1, radius: t2, ref, tone: t3, ...restProps} = props, $[0] = props, $[1] = children, $[2] = ref, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3);
1283
1265
  let fontSize = t0 === void 0 ? 1 : t0, padding = t1 === void 0 ? 1 : t1, radius = t2 === void 0 ? "full" : t2, tone = t3 === void 0 ? "default" : t3, t4;
@@ -1301,17 +1283,21 @@ const StyledBadge = /* @__PURE__ */ styled(Box).withConfig({
1301
1283
  }), $[15] = ref, $[16] = restProps, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = tone, $[21] = t7) : t7 = $[21], t7;
1302
1284
  };
1303
1285
  function inputElementStyles(props) {
1304
- let { color, input, radius } = getTheme_v2(props.theme), { focusRing } = input.checkbox;
1305
- return css`position:absolute;top:0;left:0;width:100%;height:100%;outline:none;opacity:0;z-index:1;padding:0;margin:0;& + span{position:relative;display:block;height:${rem(input.checkbox.size)};width:${rem(input.checkbox.size)};box-sizing:border-box;box-shadow:${focusRingBorderStyle({
1286
+ let { input, radius } = getTheme_v2(props.theme), { focusRing } = input.checkbox;
1287
+ return css`position:absolute;top:0;left:0;width:100%;height:100%;outline:none;opacity:0;z-index:1;padding:0;margin:0;& + span{position:relative;display:block;height:${rem(input.checkbox.size)};width:${rem(input.checkbox.size)};box-sizing:border-box;border-radius:${rem(radius[2])};line-height:1;& > svg{display:block;position:absolute;opacity:0;height:100%;width:100%;& > path{vector-effect:non-scaling-stroke;stroke-width:1.5px !important;}}}&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({ focusRing })};}&:not(:disabled):focus:focus-visible&:checked + span{box-shadow:${focusRingStyle({ focusRing: {
1288
+ width: 1,
1289
+ offset: 1
1290
+ } })};}&:checked + span > svg:first-child{opacity:1;}&:indeterminate + span > svg:last-child{opacity:1;}`;
1291
+ }
1292
+ function inputElementColorStyles(props) {
1293
+ let { color, input } = getTheme_v2(props.theme);
1294
+ return css`& + span{box-shadow:${focusRingBorderStyle({
1306
1295
  color: color.input.default.enabled.border,
1307
1296
  width: input.border.width
1308
- })};border-radius:${rem(radius[2])};line-height:1;background-color:${color.input.default.enabled.bg};& > svg{display:block;position:absolute;opacity:0;height:100%;width:100%;& > path{vector-effect:non-scaling-stroke;stroke-width:1.5px !important;}}}&:checked + span{background:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
1297
+ })};background-color:${color.input.default.enabled.bg};}&:checked + span{background:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
1309
1298
  color: color.input.default.enabled.fg,
1310
1299
  width: input.border.width
1311
- })};color:${color.input.default.enabled.bg};}&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({ focusRing })};}&:not(:disabled):focus:focus-visible&:checked + span{box-shadow:${focusRingStyle({ focusRing: {
1312
- width: 1,
1313
- offset: 1
1314
- } })};}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
1300
+ })};color:${color.input.default.enabled.bg};}&[data-error] + span{background-color:${color.input.invalid.enabled.border};box-shadow:${focusRingBorderStyle({
1315
1301
  width: input.border.width,
1316
1302
  color: color.input.invalid.enabled.muted.bg
1317
1303
  })};color:${color.input.default.disabled.fg};}&[data-error]&:checked + span{background-color:${color.input.invalid.enabled.muted.bg};color:${color.input.default.enabled.bg};}&[data-error]&:checked&:not(:disabled):focus:focus-visible + span{box-shadow:${focusRingStyle({
@@ -1329,13 +1315,16 @@ function inputElementStyles(props) {
1329
1315
  })};color:${color.input.default.disabled.fg};}&:disabled&:checked + span{background-color:${color.input.default.disabled.muted.bg};}&[data-read-only] + span{background-color:${color.input.default.readOnly.bg};box-shadow:${focusRingBorderStyle({
1330
1316
  width: input.border.width,
1331
1317
  color: color.input.default.readOnly.border
1332
- })};color:${color.input.default.readOnly.fg};}&[data-read-only]&:checked + span{background-color:${color.input.default.readOnly.muted.bg};}&:checked + span > svg:first-child{opacity:1;}&:indeterminate + span > svg:last-child{opacity:1;}`;
1318
+ })};color:${color.input.default.readOnly.fg};}&[data-read-only]&:checked + span{background-color:${color.input.default.readOnly.muted.bg};}`;
1333
1319
  }
1334
1320
  var checkbox = "ycv36y0";
1335
- const Input$3 = /* @__PURE__ */ styled.input.withConfig({
1321
+ const Input$3 = /* @__PURE__ */ styled(/* @__PURE__ */ styled.input.withConfig({
1322
+ displayName: "InputBase",
1323
+ componentId: "sc-13r9vw-0"
1324
+ })(inputElementStyles)).withConfig({
1336
1325
  displayName: "Input",
1337
- componentId: "sc-lvzyx-0"
1338
- })(inputElementStyles);
1326
+ componentId: "sc-13r9vw-1"
1327
+ })(inputElementColorStyles);
1339
1328
  /**
1340
1329
  * Checkboxes allow the user to select one or more items from a set.
1341
1330
  *
@@ -1374,21 +1363,20 @@ function Checkbox(props) {
1374
1363
  children: [t7, t8]
1375
1364
  }), $[24] = style, $[25] = t3, $[26] = t7, $[27] = t9) : t9 = $[27], t9;
1376
1365
  }
1377
- /**
1378
- * Get responsive CSS for the `heading` font style.
1379
- * @internal
1380
- */
1381
- function responsiveHeadingFont(props) {
1382
- return responsiveFont("heading", props);
1383
- }
1384
1366
  function headingBaseStyle(props) {
1385
- let { $accent, $muted } = props, { font } = getTheme_v2(props.theme);
1386
- return css`${$accent && css`color:var(--card-accent-fg-color);`} ${$muted && css`color:var(--card-muted-fg-color);`} & code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.heading.weights.bold};}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}`;
1387
- }
1388
- const StyledHeading = /* @__PURE__ */ styled.div.withConfig({
1367
+ let { font } = getTheme_v2(props.theme);
1368
+ return css`& code{font-family:${font.code.family};border-radius:1px;}& a{text-decoration:none;border-radius:1px;color:var(--card-link-color);outline:none;@media (hover:hover){&:hover{text-decoration:underline;}}&:focus{box-shadow:0 0 0 1px var(--card-bg-color),0 0 0 3px var(--card-focus-ring-color);}&:focus:not(:focus-visible){box-shadow:none;}}& strong{font-weight:${font.heading.weights.bold};}& svg{display:inline;max-width:unset;}& [data-sanity-icon]{vertical-align:baseline;}${_fontBase("heading", props)}`;
1369
+ }
1370
+ const StyledHeading = /* @__PURE__ */ styled(/* @__PURE__ */ styled(/* @__PURE__ */ styled.div.withConfig({
1371
+ displayName: "HeadingBase",
1372
+ componentId: "sc-oiepxi-0"
1373
+ })(headingBaseStyle)).withConfig({
1374
+ displayName: "HeadingSize",
1375
+ componentId: "sc-oiepxi-1"
1376
+ })((props) => _responsiveFontSize("heading", props))).withConfig({
1389
1377
  displayName: "StyledHeading",
1390
- componentId: "sc-r76jut-0"
1391
- })(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
1378
+ componentId: "sc-oiepxi-2"
1379
+ })(fontColorStyle, responsiveTextAlignStyle, (props) => _fontWeight("heading", props));
1392
1380
  function HeadingComponent(props) {
1393
1381
  let $ = c(27), align, childrenProp, ref, restProps, t0, t1, t2, textOverflow, weight;
1394
1382
  $[0] === props ? (align = $[1], childrenProp = $[2], ref = $[3], restProps = $[4], t0 = $[5], t1 = $[6], t2 = $[7], textOverflow = $[8], weight = $[9]) : ({accent: t0, align, children: childrenProp, muted: t1, ref, size: t2, textOverflow, weight, ...restProps} = props, $[0] = props, $[1] = align, $[2] = childrenProp, $[3] = ref, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = t2, $[8] = textOverflow, $[9] = weight);
@@ -1479,13 +1467,10 @@ function Radio(props) {
1479
1467
  children: [t5, t6]
1480
1468
  }), $[18] = style, $[19] = t1, $[20] = t5, $[21] = t7) : t7 = $[21], t7;
1481
1469
  }
1482
- function inputBaseStyle(props) {
1483
- let { font } = getTheme_v2(props.theme);
1484
- return css`-webkit-font-smoothing:antialiased;appearance:none;border:0;font-family:${font.text.family};color:inherit;width:100%;outline:none;margin:0;&:disabled{opacity:1;}`;
1485
- }
1470
+ const INPUT_BASE_STYLE = css`-webkit-font-smoothing:antialiased;appearance:none;border:0;color:inherit;width:100%;outline:none;margin:0;&:disabled{opacity:1;}`;
1486
1471
  function inputColorStyle(props) {
1487
- let { color, input } = getTheme_v2(props.theme);
1488
- return css`background-color:${color.input.default.enabled.bg};color:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
1472
+ let { color, font, input } = getTheme_v2(props.theme);
1473
+ return css`font-family:${font.text.family};background-color:${color.input.default.enabled.bg};color:${color.input.default.enabled.fg};box-shadow:${focusRingBorderStyle({
1489
1474
  color: color.input.default.enabled.border,
1490
1475
  width: input.border.width
1491
1476
  })};@media (hover:hover){&:not(:disabled):hover{background-color:${color.input.default.hovered.bg};color:${color.input.default.hovered.fg};box-shadow:${focusRingBorderStyle({
@@ -1515,7 +1500,7 @@ function inputTextSizeStyle(props) {
1515
1500
  let { $fontSize } = props, { font, media } = getTheme_v2(props.theme);
1516
1501
  return _responsive(media, $fontSize, (sizeIndex) => textSize(font.text.sizes[sizeIndex] || font.text.sizes[2]));
1517
1502
  }
1518
- const INPUT_RULES = _ruleSet(responsiveRadiusStyle, inputBaseStyle, inputColorStyle, inputTextSizeStyle, responsiveInputPaddingIconRightStyle);
1503
+ const INPUT_RULES = _ruleSet(responsiveRadiusStyle, inputTextSizeStyle, responsiveInputPaddingIconRightStyle);
1519
1504
  function inputStyle() {
1520
1505
  return INPUT_RULES;
1521
1506
  }
@@ -1524,16 +1509,24 @@ function iconBoxStyle(props) {
1524
1509
  return css`pointer-events:none;position:absolute;top:0;right:0;--card-fg-color:${color.input.default.enabled.fg};@media (hover:hover){select:not(disabled):not(:read-only):hover + &&{--card-fg-color:${color.input.default.hovered.fg};}}select:disabled + &&{--card-fg-color:${color.input.default.disabled.fg};}select[data-read-only] + &&{--card-fg-color:${color.input.default.readOnly.fg};}`;
1525
1510
  }
1526
1511
  const selectStyle = {
1512
+ inputBase: INPUT_BASE_STYLE,
1513
+ inputColor: inputColorStyle,
1527
1514
  input: inputStyle,
1528
1515
  iconBox: iconBoxStyle
1529
1516
  };
1530
1517
  var select = "_14ngdrn0";
1531
- const Input$1 = /* @__PURE__ */ styled.select.withConfig({
1518
+ const InputBase$1 = styled.select.withConfig({
1519
+ displayName: "InputBase",
1520
+ componentId: "sc-0h3t7m-0"
1521
+ })`${selectStyle.inputBase}`, InputColor = /* @__PURE__ */ styled(InputBase$1).withConfig({
1522
+ displayName: "InputColor",
1523
+ componentId: "sc-0h3t7m-1"
1524
+ })(selectStyle.inputColor), Input$1 = /* @__PURE__ */ styled(InputColor).withConfig({
1532
1525
  displayName: "Input",
1533
- componentId: "sc-af8su9-0"
1526
+ componentId: "sc-0h3t7m-2"
1534
1527
  })(selectStyle.input), IconBox = /* @__PURE__ */ styled(Box).withConfig({
1535
1528
  displayName: "IconBox",
1536
- componentId: "sc-af8su9-1"
1529
+ componentId: "sc-0h3t7m-3"
1537
1530
  })(selectStyle.iconBox);
1538
1531
  /**
1539
1532
  * The `Select` component provides control of options.
@@ -1587,26 +1580,26 @@ function Select(props) {
1587
1580
  }
1588
1581
  function switchRepresentationStyles(props) {
1589
1582
  let { color, input } = getTheme_v2(props.theme);
1590
- return css`--switch-bg-color:${color.input.default.enabled.border};--switch-fg-color:${color.input.default.enabled.bg};--switch-box-shadow:none;&:not([hidden]){display:block;}position:relative;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};pointer-events:none;&:after{content:'';display:block;position:absolute;top:0;left:0;right:0;bottom:0;z-index:1;box-shadow:var(--switch-box-shadow);border-radius:inherit;}input:focus + &&{--switch-box-shadow:${focusRingStyle({ focusRing: input.switch.focusRing })};}input:focus:not(:focus-visible) + &&{--switch-box-shadow:none;}input:checked + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}@media (hover:hover){input:not(:disabled):hover + &&{--switch-bg-color:${color.input.default.hovered.border};--switch-fg-color:${color.input.default.hovered.bg};}input:not(:disabled):checked:hover + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}}input:not([data-read-only]):disabled + &&{--switch-bg-color:${color.input.default.disabled.border};--switch-fg-color:${color.input.default.disabled.bg};}input[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.border};--switch-fg-color:${color.input.default.readOnly.bg};}input:checked[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.fg};--switch-fg-color:${color.input.default.readOnly.bg};}`;
1583
+ return css`--switch-bg-color:${color.input.default.enabled.border};--switch-fg-color:${color.input.default.enabled.bg};width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};input:focus + &&{--switch-box-shadow:${focusRingStyle({ focusRing: input.switch.focusRing })};}input:focus:not(:focus-visible) + &&{--switch-box-shadow:none;}input:checked + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}@media (hover:hover){input:not(:disabled):hover + &&{--switch-bg-color:${color.input.default.hovered.border};--switch-fg-color:${color.input.default.hovered.bg};}input:not(:disabled):checked:hover + &&{--switch-bg-color:${color.input.default.enabled.fg};--switch-fg-color:${color.input.default.enabled.bg};}}input:not([data-read-only]):disabled + &&{--switch-bg-color:${color.input.default.disabled.border};--switch-fg-color:${color.input.default.disabled.bg};}input[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.border};--switch-fg-color:${color.input.default.readOnly.bg};}input:checked[data-read-only]:disabled + &&{--switch-bg-color:${color.input.default.readOnly.fg};--switch-fg-color:${color.input.default.readOnly.bg};}`;
1591
1584
  }
1592
1585
  function switchTrackStyles(props) {
1593
1586
  let { input } = getTheme_v2(props.theme);
1594
- return css`&:not([hidden]){display:block;}background-color:var(--switch-bg-color);position:absolute;left:0;top:0;width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};`;
1587
+ return css`width:${rem(input.switch.width)};height:${rem(input.switch.height)};border-radius:${rem(input.switch.height / 2)};`;
1595
1588
  }
1596
1589
  function switchThumbStyles(props) {
1597
1590
  let { $indeterminate } = props, { input } = getTheme_v2(props.theme), trackWidth = input.switch.width, trackHeight = input.switch.height, trackPadding = input.switch.padding, size = trackHeight - input.switch.padding * 2, checkedOffset = trackWidth - trackPadding * 2 - size, indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding, checked = $indeterminate !== !0 && props.$checked === !0;
1598
- return css`&:not([hidden]){display:block;}position:absolute;left:${rem(trackPadding)};top:${rem(trackPadding)};height:${rem(size)};width:${rem(size)};border-radius:${rem(size / 2)};transition-property:transform;transition-duration:${input.switch.transitionDurationMs}ms;transition-timing-function:${input.switch.transitionTimingFunction};background:var(--switch-fg-color);transform:translate3d(0,0,0);box-shadow:0px 1px 0px 0px rgba(0,0,0,0.05);${checked && css`transform:translate3d(${checkedOffset}px,0,0);`} ${$indeterminate && css`transform:translate3d(${indeterminateOffset}px,0,0);`}`;
1591
+ return css`left:${rem(trackPadding)};top:${rem(trackPadding)};height:${rem(size)};width:${rem(size)};border-radius:${rem(size / 2)};transition-duration:${input.switch.transitionDurationMs}ms;transition-timing-function:${input.switch.transitionTimingFunction};transform:translate3d(0,0,0);${checked && css`transform:translate3d(${checkedOffset}px,0,0);`} ${$indeterminate && css`transform:translate3d(${indeterminateOffset}px,0,0);`}`;
1599
1592
  }
1600
- var switchInput = "cn60s71", switchRoot = "cn60s70";
1601
- const Representation = /* @__PURE__ */ styled.span.withConfig({
1593
+ var switchInput = "cn60s71", switchRepresentation = "cn60s72", switchRoot = "cn60s70", switchThumb = "cn60s74", switchTrack = "cn60s73";
1594
+ const Representation = /* @__PURE__ */ styled.span.attrs({ className: switchRepresentation }).withConfig({
1602
1595
  displayName: "Representation",
1603
- componentId: "sc-mmkhq5-0"
1604
- })(switchRepresentationStyles), Track = /* @__PURE__ */ styled.span.withConfig({
1596
+ componentId: "sc-fbcjg3-0"
1597
+ })(switchRepresentationStyles), Track = /* @__PURE__ */ styled.span.attrs({ className: switchTrack }).withConfig({
1605
1598
  displayName: "Track",
1606
- componentId: "sc-mmkhq5-1"
1607
- })(switchTrackStyles), Thumb = /* @__PURE__ */ styled.span.withConfig({
1599
+ componentId: "sc-fbcjg3-1"
1600
+ })(switchTrackStyles), Thumb = /* @__PURE__ */ styled.span.attrs({ className: switchThumb }).withConfig({
1608
1601
  displayName: "Thumb",
1609
- componentId: "sc-mmkhq5-2"
1602
+ componentId: "sc-fbcjg3-2"
1610
1603
  })(switchThumbStyles);
1611
1604
  /**
1612
1605
  * The `Switch` component allows the user to toggle a setting on and off.
@@ -1657,12 +1650,21 @@ function Switch(props) {
1657
1650
  children: [t7, t9]
1658
1651
  }), $[24] = style, $[25] = t3, $[26] = t7, $[27] = t9, $[28] = t10) : t10 = $[28], t10;
1659
1652
  }
1660
- const Input = /* @__PURE__ */ styled.textarea.withConfig({
1653
+ const InputBase = styled.textarea.withConfig({
1654
+ displayName: "InputBase",
1655
+ componentId: "sc-qld3n1-0"
1656
+ })`${textInputBaseStyle}`, Input = /* @__PURE__ */ styled(/* @__PURE__ */ styled(InputBase).withConfig({
1657
+ displayName: "InputColor",
1658
+ componentId: "sc-qld3n1-1"
1659
+ })(textInputColorStyle)).withConfig({
1661
1660
  displayName: "Input",
1662
- componentId: "sc-vu8ycr-0"
1663
- })(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled.div.withConfig({
1661
+ componentId: "sc-qld3n1-2"
1662
+ })(responsiveInputPaddingStyle, textInputFontStyle, textInputFontSizeStyle), Presentation = /* @__PURE__ */ styled(/* @__PURE__ */ styled.div.withConfig({
1663
+ displayName: "PresentationColor",
1664
+ componentId: "sc-qld3n1-3"
1665
+ })(textInputRepresentationColorStyle)).withConfig({
1664
1666
  displayName: "Presentation",
1665
- componentId: "sc-vu8ycr-1"
1667
+ componentId: "sc-qld3n1-4"
1666
1668
  })(responsiveRadiusStyle, textInputRepresentationStyle);
1667
1669
  /**
1668
1670
  * A multiline text input.
@@ -1721,6 +1723,34 @@ function TextArea(props) {
1721
1723
  }), $[33] = t12, $[34] = t15, $[35] = t16) : t16 = $[35], t16;
1722
1724
  }
1723
1725
  /**
1726
+ * Get responsive CSS for the `code` font style.
1727
+ * @internal
1728
+ */
1729
+ function responsiveCodeFontStyle(props) {
1730
+ return responsiveFont("code", props);
1731
+ }
1732
+ /**
1733
+ * Get responsive CSS for the `heading` font style.
1734
+ * @internal
1735
+ */
1736
+ function responsiveHeadingFont(props) {
1737
+ return responsiveFont("heading", props);
1738
+ }
1739
+ /**
1740
+ * Get responsive CSS for the `label` font style.
1741
+ * @internal
1742
+ */
1743
+ function responsiveLabelFont(props) {
1744
+ return responsiveFont("label", props);
1745
+ }
1746
+ /**
1747
+ * Get responsive CSS for the `text` font style.
1748
+ * @internal
1749
+ */
1750
+ function responsiveTextFont(props) {
1751
+ return responsiveFont("text", props);
1752
+ }
1753
+ /**
1724
1754
  * @public
1725
1755
  */
1726
1756
  function BoundaryElementProvider(props) {