@sanity/ui 2.0.0-alpha.6 → 2.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1090,22 +1090,22 @@ const defaultTints = {
1090
1090
  "base-shadow-outline-color": {
1091
1091
  type: "colorWithOpacity",
1092
1092
  tint: "500",
1093
- opacity: 0.4
1093
+ opacity: 0.2
1094
1094
  },
1095
1095
  "base-shadow-umbra-color": {
1096
1096
  type: "colorWithOpacity",
1097
1097
  tint: "500",
1098
- opacity: 0.2
1098
+ opacity: 0.1
1099
1099
  },
1100
1100
  "base-shadow-penumbra-color": {
1101
1101
  type: "colorWithOpacity",
1102
1102
  tint: "500",
1103
- opacity: 0.14
1103
+ opacity: 0.07
1104
1104
  },
1105
1105
  "base-shadow-ambient-color": {
1106
1106
  type: "colorWithOpacity",
1107
1107
  tint: "500",
1108
- opacity: 0.12
1108
+ opacity: 0.06
1109
1109
  },
1110
1110
  "skeleton-from": "100",
1111
1111
  "skeleton-to": {
@@ -1650,9 +1650,9 @@ const studioTheme = {
1650
1650
  penumbra: [0, 0, 0, 0],
1651
1651
  ambient: [0, 0, 0, 0]
1652
1652
  }, {
1653
- umbra: [0, 3, 5, -1],
1653
+ umbra: [0, 3, 5, -2],
1654
1654
  penumbra: [0, 6, 10, 0],
1655
- ambient: [0, 1, 18, 0]
1655
+ ambient: [0, 1, 18, 1]
1656
1656
  }, {
1657
1657
  umbra: [0, 7, 8, -4],
1658
1658
  penumbra: [0, 12, 17, 2],
@@ -3179,73 +3179,14 @@ const Box = forwardRef(function Box2(props, ref) {
3179
3179
  children: props.children
3180
3180
  });
3181
3181
  });
3182
- var __freeze$y = Object.freeze;
3183
- var __defProp$z = Object.defineProperty;
3184
- var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
3185
- value: __freeze$y(raw || cooked.slice())
3186
- }));
3187
- var _a$y, _b$k, _c$b;
3188
- function labelBaseStyle(props) {
3189
- const {
3190
- $accent,
3191
- $muted,
3192
- theme
3193
- } = props;
3194
- const {
3195
- fonts
3196
- } = theme.sanity;
3197
- return css(_c$b || (_c$b = __template$y(["\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 & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$y || (_a$y = __template$y(["\n color: ", "};\n "])), cssVars.default["text-accent"]), $muted && css(_b$k || (_b$k = __template$y(["\n color: ", ";\n "])), cssVars.mutable["muted-fg-color"]), fonts.code.family);
3198
- }
3199
- var __freeze$x = Object.freeze;
3200
- var __defProp$y = Object.defineProperty;
3201
- var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
3202
- value: __freeze$x(raw || cooked.slice())
3203
- }));
3204
- var _a$x;
3205
- const Root$z = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
3206
- const SpanWithTextOverflow$1 = styled.span(_a$x || (_a$x = __template$x(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
3207
- const Label = forwardRef(function Label2(props, ref) {
3208
- const {
3209
- accent,
3210
- align,
3211
- children: childrenProp,
3212
- muted = false,
3213
- size = 2,
3214
- textOverflow,
3215
- weight,
3216
- ...restProps
3217
- } = props;
3218
- let children = childrenProp;
3219
- if (textOverflow === "ellipsis") {
3220
- children = /* @__PURE__ */jsx(SpanWithTextOverflow$1, {
3221
- children
3222
- });
3223
- } else {
3224
- children = /* @__PURE__ */jsx("span", {
3225
- children
3226
- });
3227
- }
3228
- return /* @__PURE__ */jsx(Root$z, {
3229
- "data-ui": "Label",
3230
- ...restProps,
3231
- $accent: accent,
3232
- $align: useArrayProp(align),
3233
- $muted: muted,
3234
- $size: useArrayProp(size),
3235
- $weight: weight,
3236
- ref,
3237
- children
3238
- });
3239
- });
3240
3182
  function badgeStyle(props) {
3241
3183
  const {
3242
3184
  $mode,
3243
3185
  $tone
3244
3186
  } = props;
3245
3187
  return {
3246
- // backgroundColor: color.enabled.bg,
3247
3188
  backgroundColor: $mode === "outline" ? cssVars[$tone]["bg-base"] : cssVars[$tone]["bg-tint"],
3248
- color: cssVars[$tone]["text-secondary"],
3189
+ [mutableCardVariables["fg-color"]]: cssVars[$tone]["text-secondary"],
3249
3190
  boxShadow: $mode === "outline" ? "inset 0 0 0 1px ".concat(cssVars[$tone]["border-base"]) : void 0,
3250
3191
  cursor: "default",
3251
3192
  "&:not([hidden])": {
@@ -3253,7 +3194,7 @@ function badgeStyle(props) {
3253
3194
  }
3254
3195
  };
3255
3196
  }
3256
- const Root$y = styled(Box)(responsiveRadiusStyle, badgeStyle);
3197
+ const Root$z = styled(Box)(responsiveRadiusStyle, badgeStyle);
3257
3198
  const Badge = forwardRef(function Badge2(props, ref) {
3258
3199
  const {
3259
3200
  children,
@@ -3264,7 +3205,7 @@ const Badge = forwardRef(function Badge2(props, ref) {
3264
3205
  tone = "default",
3265
3206
  ...restProps
3266
3207
  } = props;
3267
- return /* @__PURE__ */jsx(Root$y, {
3208
+ return /* @__PURE__ */jsx(Root$z, {
3268
3209
  "data-ui": "Badge",
3269
3210
  ...restProps,
3270
3211
  $mode: mode,
@@ -3272,13 +3213,14 @@ const Badge = forwardRef(function Badge2(props, ref) {
3272
3213
  $radius: useArrayProp(radius),
3273
3214
  padding: useArrayProp(padding),
3274
3215
  ref,
3275
- children: /* @__PURE__ */jsx(Label, {
3216
+ children: /* @__PURE__ */jsx(Text, {
3276
3217
  size: fontSize,
3218
+ weight: "medium",
3277
3219
  children
3278
3220
  })
3279
3221
  });
3280
3222
  });
3281
- const Root$x = styled(Box)(flexItemStyle, responsiveFlexStyle);
3223
+ const Root$y = styled(Box)(flexItemStyle, responsiveFlexStyle);
3282
3224
  const Flex = forwardRef(function Flex2(props, ref) {
3283
3225
  const {
3284
3226
  align,
@@ -3292,7 +3234,7 @@ const Flex = forwardRef(function Flex2(props, ref) {
3292
3234
  return (
3293
3235
  // @ts-expect-error -- some dollar prefixed typings aren't inferred correctly https://github.com/styled-components/styled-components/issues/4062
3294
3236
  /* @__PURE__ */
3295
- jsx(Root$x, {
3237
+ jsx(Root$y, {
3296
3238
  "data-ui": "Flex",
3297
3239
  ...restProps,
3298
3240
  $align: useArrayProp(align),
@@ -3305,30 +3247,30 @@ const Flex = forwardRef(function Flex2(props, ref) {
3305
3247
  })
3306
3248
  );
3307
3249
  });
3308
- var __freeze$w = Object.freeze;
3309
- var __defProp$x = Object.defineProperty;
3310
- var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
3311
- value: __freeze$w(raw || cooked.slice())
3250
+ var __freeze$y = Object.freeze;
3251
+ var __defProp$z = Object.defineProperty;
3252
+ var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
3253
+ value: __freeze$y(raw || cooked.slice())
3312
3254
  }));
3313
- var _a$w, _b$j;
3314
- const rotate$1 = keyframes(_a$w || (_a$w = __template$w(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
3315
- const Root$w = styled(Text)(_b$j || (_b$j = __template$w(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
3255
+ var _a$y, _b$k;
3256
+ const rotate$1 = keyframes(_a$y || (_a$y = __template$y(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
3257
+ const Root$x = styled(Text)(_b$k || (_b$k = __template$y(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
3316
3258
  const Spinner = forwardRef(function Spinner2(props, ref) {
3317
- return /* @__PURE__ */jsx(Root$w, {
3259
+ return /* @__PURE__ */jsx(Root$x, {
3318
3260
  "data-ui": "Spinner",
3319
3261
  ...props,
3320
3262
  ref,
3321
3263
  children: /* @__PURE__ */jsx(SpinnerIcon, {})
3322
3264
  });
3323
3265
  });
3324
- var __freeze$v = Object.freeze;
3325
- var __defProp$w = Object.defineProperty;
3326
- var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
3327
- value: __freeze$v(raw || cooked.slice())
3266
+ var __freeze$x = Object.freeze;
3267
+ var __defProp$y = Object.defineProperty;
3268
+ var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
3269
+ value: __freeze$x(raw || cooked.slice())
3328
3270
  }));
3329
- var _a$v;
3271
+ var _a$x;
3330
3272
  function buttonBaseStyles() {
3331
- return css(_a$v || (_a$v = __template$v(["\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 "])));
3273
+ return css(_a$x || (_a$x = __template$x(["\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 "])));
3332
3274
  }
3333
3275
  const buttonTheme = {
3334
3276
  border: {
@@ -3424,14 +3366,14 @@ function buttonColorStyles(props) {
3424
3366
  }
3425
3367
  }, (_b = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.button) == null ? void 0 : _b.root].filter(Boolean);
3426
3368
  }
3427
- var __freeze$u = Object.freeze;
3428
- var __defProp$v = Object.defineProperty;
3429
- var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
3430
- value: __freeze$u(raw || cooked.slice())
3369
+ var __freeze$w = Object.freeze;
3370
+ var __defProp$x = Object.defineProperty;
3371
+ var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
3372
+ value: __freeze$w(raw || cooked.slice())
3431
3373
  }));
3432
- var _a$u;
3433
- const Root$v = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
3434
- const LoadingBox = styled.div(_a$u || (_a$u = __template$u(["\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: ", ";\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])), cssVars.mutable["bg-color"]);
3374
+ var _a$w;
3375
+ const Root$w = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
3376
+ const LoadingBox = styled.div(_a$w || (_a$w = __template$w(["\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: ", ";\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])), cssVars.mutable["bg-color"]);
3435
3377
  const Button = forwardRef(function Button2(props, ref) {
3436
3378
  const {
3437
3379
  children,
@@ -3480,7 +3422,7 @@ const Button = forwardRef(function Button2(props, ref) {
3480
3422
  paddingLeft,
3481
3423
  paddingRight
3482
3424
  }), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
3483
- return /* @__PURE__ */jsxs(Root$v, {
3425
+ return /* @__PURE__ */jsxs(Root$w, {
3484
3426
  "data-ui": "Button",
3485
3427
  ...restProps,
3486
3428
  $mode: mode,
@@ -3532,8 +3474,8 @@ function _colorVarStyleDisabled() {
3532
3474
  [getToneCssVar("default", "text-accent")]: cssVars.default["text-secondary"],
3533
3475
  [getToneCssVar("default", "text-code")]: cssVars.default["text-secondary"],
3534
3476
  [getToneCssVar("default", "text-primary")]: cssVars.default["text-secondary"],
3535
- [mutableCardVariables["fg-color"]]: cssVars.primary["text-inactive"],
3536
- [mutableCardVariables["muted-fg-color"]]: cssVars.primary["text-inactive"],
3477
+ [mutableCardVariables["fg-color"]]: cssVars.primary["text-secondary"],
3478
+ [mutableCardVariables["muted-fg-color"]]: cssVars.primary["text-secondary"],
3537
3479
  [mutableCardVariables["icon-color"]]: cssVars.primary["border-base"],
3538
3480
  [mutableCardVariables["accent-color"]]: cssVars.primary["base-bg-card"],
3539
3481
  [mutableCardVariables["bg-color"]]: cssVars.primary["bg-tint"],
@@ -3551,7 +3493,8 @@ function _colorVarStyleSelected() {
3551
3493
  }
3552
3494
  function _colorVarStyleHover() {
3553
3495
  return {
3554
- [mutableCardVariables["bg-color"]]: cssVars.default["bg-base-hover"]
3496
+ [mutableCardVariables["bg-color"]]: cssVars.default["bg-base-hover"],
3497
+ [getToneCssVar("default", "bg-tint")]: cssVars.default["bg-base-active"]
3555
3498
  };
3556
3499
  }
3557
3500
  function _colorVarStyleActive() {
@@ -3559,10 +3502,10 @@ function _colorVarStyleActive() {
3559
3502
  [mutableCardVariables["bg-color"]]: cssVars.default["bg-base-active"]
3560
3503
  };
3561
3504
  }
3562
- function _selectableVarStyle() {
3505
+ function _selectableVarStyle(tone) {
3563
3506
  return {
3564
3507
  [mutableCardVariables["bg-color"]]: "inherit",
3565
- [mutableCardVariables["fg-color"]]: cssVars.default["text-secondary"]
3508
+ [mutableCardVariables["fg-color"]]: tone === "default" ? cssVars.default["text-primary"] : cssVars.default["text-secondary"]
3566
3509
  };
3567
3510
  }
3568
3511
  function _selectableVarStyleDisabled() {
@@ -3571,12 +3514,12 @@ function _selectableVarStyleDisabled() {
3571
3514
  [mutableCardVariables["bg-color"]]: void 0
3572
3515
  };
3573
3516
  }
3574
- var __freeze$t = Object.freeze;
3575
- var __defProp$u = Object.defineProperty;
3576
- var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
3577
- value: __freeze$t(raw || cooked.slice())
3517
+ var __freeze$v = Object.freeze;
3518
+ var __defProp$w = Object.defineProperty;
3519
+ var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
3520
+ value: __freeze$v(raw || cooked.slice())
3578
3521
  }));
3579
- var _a$t, _b$i, _c$a;
3522
+ var _a$v, _b$j, _c$b;
3580
3523
  function cardStyle(props) {
3581
3524
  return [cardBaseStyle(props), cardColorStyle(props)];
3582
3525
  }
@@ -3586,7 +3529,7 @@ function cardBaseStyle(props) {
3586
3529
  theme
3587
3530
  } = props;
3588
3531
  const space = theme.sanity.space;
3589
- return css(_b$i || (_b$i = __template$t(["\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(_a$t || (_a$t = __template$t(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: ", ";\n "])), space[3], space[3], cssVars.mutable["bg-image"]));
3532
+ return css(_b$j || (_b$j = __template$v(["\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(_a$v || (_a$v = __template$v(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: ", ";\n "])), space[3], space[3], cssVars.mutable["bg-image"]));
3590
3533
  }
3591
3534
  function cardColorStyle(props) {
3592
3535
  var _a2, _b2;
@@ -3605,7 +3548,7 @@ function cardColorStyle(props) {
3605
3548
  width: 0,
3606
3549
  color: cssVars.positive["border-accent"]
3607
3550
  };
3608
- return css(_c$a || (_c$a = __template$t(["\n /* A new css vars context is created, allowing for override of the default tone and changing the scheme */\n ", "\n color-scheme: ", ";\n ", "\n\n background-color: ", ";\n 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 &[data-hovered],\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 &[data-hovered],\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 "])), $updateCssVars && createCssVars($scheme, theme.sanity.color.tones, $tone), $scheme === "dark" ? "dark" : "light", $checkered && "--card-bg-image: repeating-conic-gradient(".concat(cssVars.default["base-bg-card"], " 0% 25%, ").concat(cssVars.default["bg-tint"], " 0% 50%)"), cssVars.mutable["bg-color"], cssVars.default["text-primary"], _colorVarStyleDisabled($checkered), _colorVarStyleActive(), _colorVarStyleSelected(), _colorVarStyleHover(), _colorVarStyleActive(), $focusRing ? focusRingStyle({
3551
+ return css(_c$b || (_c$b = __template$v(["\n /* A new css vars context is created, allowing for override of the default tone and changing the scheme */\n ", "\n color-scheme: ", ";\n ", "\n\n background-color: ", ";\n 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 &[data-hovered],\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 &[data-hovered],\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 "])), $updateCssVars && createCssVars($scheme, theme.sanity.color.tones, $tone), $scheme === "dark" ? "dark" : "light", $checkered && "--card-bg-image: repeating-conic-gradient(".concat(cssVars.default["base-bg-card"], " 0% 25%, ").concat(cssVars.default["bg-tint"], " 0% 50%)"), cssVars.mutable["bg-color"], cssVars.default["text-primary"], _colorVarStyleDisabled($checkered), _colorVarStyleActive(), _colorVarStyleSelected(), _colorVarStyleHover(), _colorVarStyleActive(), $focusRing ? focusRingStyle({
3609
3552
  border,
3610
3553
  focusRing
3611
3554
  }) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, _colorVarStyleDisabled($checkered), _colorVarStyleActive(), _colorVarStyleSelected(), _colorVarStyleHover(), _colorVarStyleActive(), $focusRing ? focusRingStyle({
@@ -3613,7 +3556,7 @@ function cardColorStyle(props) {
3613
3556
  focusRing
3614
3557
  }) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
3615
3558
  }
3616
- const Root$u = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
3559
+ const Root$v = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
3617
3560
  const Wrapper = _ref5 => {
3618
3561
  let {
3619
3562
  shouldAddContext,
@@ -3658,7 +3601,7 @@ const Card = forwardRef(function Card2(props, ref) {
3658
3601
  shouldAddContext,
3659
3602
  scheme,
3660
3603
  tone,
3661
- children: /* @__PURE__ */jsx(Root$u, {
3604
+ children: /* @__PURE__ */jsx(Root$v, {
3662
3605
  "data-as": typeof as === "string" ? as : void 0,
3663
3606
  "data-scheme": scheme,
3664
3607
  "data-ui": "Card",
@@ -3685,14 +3628,14 @@ const Card = forwardRef(function Card2(props, ref) {
3685
3628
  })
3686
3629
  });
3687
3630
  });
3688
- var __freeze$s = Object.freeze;
3689
- var __defProp$t = Object.defineProperty;
3690
- var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
3691
- value: __freeze$s(raw || cooked.slice())
3631
+ var __freeze$u = Object.freeze;
3632
+ var __defProp$v = Object.defineProperty;
3633
+ var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
3634
+ value: __freeze$u(raw || cooked.slice())
3692
3635
  }));
3693
- var _a$s, _b$h;
3636
+ var _a$u, _b$i;
3694
3637
  function checkboxBaseStyles() {
3695
- return css(_a$s || (_a$s = __template$s(["\n position: relative;\n display: inline-block;\n "])));
3638
+ return css(_a$u || (_a$u = __template$u(["\n position: relative;\n display: inline-block;\n "])));
3696
3639
  }
3697
3640
  function inputElementStyles(props) {
3698
3641
  const {
@@ -3705,7 +3648,7 @@ function inputElementStyles(props) {
3705
3648
  const {
3706
3649
  focusRing
3707
3650
  } = input.checkbox;
3708
- return css(_b$h || (_b$h = __template$s(["\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: 1.2 !important;\n }\n }\n }\n &:checked + span {\n background: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ", ";\n }\n\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &[data-error]&:checked + span {\n background-color: ", ";\n color: ", ";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n &:disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &:disabled&:checked + span {\n background-color: ", ";\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
3651
+ return css(_b$i || (_b$i = __template$u(["\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: 1.2 !important;\n }\n }\n }\n &:checked + span {\n background: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n /* focus */\n &:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n /* focus when checked - uses a different offset */\n &:not(:disabled):focus:focus-visible&:checked + span {\n box-shadow: ", ";\n }\n\n &[data-error] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &[data-error]&:checked + span {\n background-color: ", ";\n color: ", ";\n }\n &[data-error]&:checked&:not(:disabled):focus:focus-visible + span {\n box-shadow: ", ";\n }\n\n &:disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n &:disabled&:checked + span {\n background-color: ", ";\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &[data-read-only]&:checked + span {\n background-color: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
3709
3652
  color: cssVars.default["border-base"],
3710
3653
  width: input.border.width
3711
3654
  }), rem(radius[2]), cssVars.default["bg-base"], cssVars.default["text-secondary"], focusRingBorderStyle({
@@ -3738,7 +3681,7 @@ function inputElementStyles(props) {
3738
3681
  color: cssVars.default["border-base"]
3739
3682
  }), cssVars.default["text-secondary"], cssVars.default["border-base"]);
3740
3683
  }
3741
- const Root$t = styled.div(checkboxBaseStyles);
3684
+ const Root$u = styled.div(checkboxBaseStyles);
3742
3685
  const Input$5 = styled.input(inputElementStyles);
3743
3686
  const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
3744
3687
  const {
@@ -3758,7 +3701,7 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
3758
3701
  ref.current.indeterminate = indeterminate || false;
3759
3702
  }
3760
3703
  }, [indeterminate, ref]);
3761
- return /* @__PURE__ */jsxs(Root$t, {
3704
+ return /* @__PURE__ */jsxs(Root$u, {
3762
3705
  className,
3763
3706
  "data-ui": "Checkbox",
3764
3707
  style,
@@ -3776,12 +3719,12 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
3776
3719
  })]
3777
3720
  });
3778
3721
  });
3779
- var __freeze$r = Object.freeze;
3780
- var __defProp$s = Object.defineProperty;
3781
- var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
3782
- value: __freeze$r(raw || cooked.slice())
3722
+ var __freeze$t = Object.freeze;
3723
+ var __defProp$u = Object.defineProperty;
3724
+ var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
3725
+ value: __freeze$t(raw || cooked.slice())
3783
3726
  }));
3784
- var _a$r;
3727
+ var _a$t;
3785
3728
  function codeSyntaxHighlightingStyle(scheme) {
3786
3729
  const dark = scheme === "dark";
3787
3730
  const mainShade = dark ? 400 : 600;
@@ -3898,9 +3841,9 @@ function codeSyntaxHighlightingStyle(scheme) {
3898
3841
  };
3899
3842
  }
3900
3843
  function codeBaseStyle(props) {
3901
- return css(_a$r || (_a$r = __template$r(["\n 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 & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), cssVars.default["text-code"], codeSyntaxHighlightingStyle(props.$scheme));
3844
+ return css(_a$t || (_a$t = __template$t(["\n 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 & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), cssVars.default["text-code"], codeSyntaxHighlightingStyle(props.$scheme));
3902
3845
  }
3903
- const Root$s = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
3846
+ const Root$t = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
3904
3847
  const Code = forwardRef(function Code2(props, ref) {
3905
3848
  const {
3906
3849
  children,
@@ -3914,7 +3857,7 @@ const Code = forwardRef(function Code2(props, ref) {
3914
3857
  const {
3915
3858
  scheme
3916
3859
  } = useToneContext();
3917
- return /* @__PURE__ */jsxs(Root$s, {
3860
+ return /* @__PURE__ */jsxs(Root$t, {
3918
3861
  "data-ui": "Code",
3919
3862
  ...restProps,
3920
3863
  $size: useArrayProp(size),
@@ -3949,14 +3892,14 @@ function responsiveContainerWidthStyle(props) {
3949
3892
  maxWidth: val === "auto" ? "none" : rem(container[val])
3950
3893
  }));
3951
3894
  }
3952
- const Root$r = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
3895
+ const Root$s = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
3953
3896
  const Container = forwardRef(function Container2(props, ref) {
3954
3897
  const {
3955
3898
  as,
3956
3899
  width = 2,
3957
3900
  ...restProps
3958
3901
  } = props;
3959
- return /* @__PURE__ */jsx(Root$r, {
3902
+ return /* @__PURE__ */jsx(Root$s, {
3960
3903
  "data-ui": "Container",
3961
3904
  ...restProps,
3962
3905
  $width: useArrayProp(width),
@@ -3964,7 +3907,7 @@ const Container = forwardRef(function Container2(props, ref) {
3964
3907
  ref
3965
3908
  });
3966
3909
  });
3967
- const Root$q = styled(Box)(responsiveGridStyle);
3910
+ const Root$r = styled(Box)(responsiveGridStyle);
3968
3911
  const Grid = forwardRef(function Grid2(props, ref) {
3969
3912
  const {
3970
3913
  as,
@@ -3979,7 +3922,7 @@ const Grid = forwardRef(function Grid2(props, ref) {
3979
3922
  children,
3980
3923
  ...restProps
3981
3924
  } = props;
3982
- return /* @__PURE__ */jsx(Root$q, {
3925
+ return /* @__PURE__ */jsx(Root$r, {
3983
3926
  "data-as": typeof as === "string" ? as : void 0,
3984
3927
  "data-ui": "Grid",
3985
3928
  ...restProps,
@@ -3996,28 +3939,28 @@ const Grid = forwardRef(function Grid2(props, ref) {
3996
3939
  children
3997
3940
  });
3998
3941
  });
3999
- var __freeze$q = Object.freeze;
4000
- var __defProp$r = Object.defineProperty;
4001
- var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
4002
- value: __freeze$q(raw || cooked.slice())
3942
+ var __freeze$s = Object.freeze;
3943
+ var __defProp$t = Object.defineProperty;
3944
+ var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
3945
+ value: __freeze$s(raw || cooked.slice())
4003
3946
  }));
4004
- var _a$q, _b$g, _c$9;
3947
+ var _a$s, _b$h, _c$a;
4005
3948
  function headingBaseStyle(props) {
4006
3949
  const {
4007
3950
  $accent,
4008
3951
  $muted,
4009
3952
  theme
4010
3953
  } = props;
4011
- return css(_c$9 || (_c$9 = __template$q(["\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: ", ";\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 3px ", ";\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$q || (_a$q = __template$q(["\n color: ", "};\n "])), cssVars.default["text-accent"]), $muted && css(_b$g || (_b$g = __template$q(["\n color: ", ";\n "])), cssVars.mutable["muted-fg-color"]), theme.sanity.fonts.code.family, cssVars.default["text-link"], cssVars.mutable["bg-color"], cssVars.positive["border-accent"]);
3954
+ return css(_c$a || (_c$a = __template$s(["\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: ", ";\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow:\n 0 0 0 1px ", ",\n 0 0 0 3px ", ";\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$s || (_a$s = __template$s(["\n color: ", "};\n "])), cssVars.default["text-accent"]), $muted && css(_b$h || (_b$h = __template$s(["\n color: ", ";\n "])), cssVars.mutable["muted-fg-color"]), theme.sanity.fonts.code.family, cssVars.default["text-link"], cssVars.mutable["bg-color"], cssVars.positive["border-accent"]);
4012
3955
  }
4013
- var __freeze$p = Object.freeze;
4014
- var __defProp$q = Object.defineProperty;
4015
- var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
4016
- value: __freeze$p(raw || cooked.slice())
3956
+ var __freeze$r = Object.freeze;
3957
+ var __defProp$s = Object.defineProperty;
3958
+ var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
3959
+ value: __freeze$r(raw || cooked.slice())
4017
3960
  }));
4018
- var _a$p;
4019
- const Root$p = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
4020
- const SpanWithTextOverflow = styled.span(_a$p || (_a$p = __template$p(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
3961
+ var _a$r;
3962
+ const Root$q = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
3963
+ const SpanWithTextOverflow$1 = styled.span(_a$r || (_a$r = __template$r(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
4021
3964
  const Heading = forwardRef(function Heading2(props, ref) {
4022
3965
  const {
4023
3966
  accent = false,
@@ -4031,11 +3974,11 @@ const Heading = forwardRef(function Heading2(props, ref) {
4031
3974
  } = props;
4032
3975
  let children = childrenProp;
4033
3976
  if (textOverflow === "ellipsis") {
4034
- children = /* @__PURE__ */jsx(SpanWithTextOverflow, {
3977
+ children = /* @__PURE__ */jsx(SpanWithTextOverflow$1, {
4035
3978
  children
4036
3979
  });
4037
3980
  }
4038
- return /* @__PURE__ */jsx(Root$p, {
3981
+ return /* @__PURE__ */jsx(Root$q, {
4039
3982
  "data-ui": "Heading",
4040
3983
  ...restProps,
4041
3984
  $accent: accent,
@@ -4075,7 +4018,7 @@ function inlineSpaceStyle(props) {
4075
4018
  };
4076
4019
  });
4077
4020
  }
4078
- const Root$o = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
4021
+ const Root$p = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
4079
4022
  const Inline = forwardRef(function Inline2(props, ref) {
4080
4023
  const {
4081
4024
  as,
@@ -4086,7 +4029,7 @@ const Inline = forwardRef(function Inline2(props, ref) {
4086
4029
  const children = useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsx("div", {
4087
4030
  children: child
4088
4031
  }, idx)), [childrenProp]);
4089
- return /* @__PURE__ */jsx(Root$o, {
4032
+ return /* @__PURE__ */jsx(Root$p, {
4090
4033
  "data-ui": "Inline",
4091
4034
  ...restProps,
4092
4035
  $space: useArrayProp(space),
@@ -4095,16 +4038,16 @@ const Inline = forwardRef(function Inline2(props, ref) {
4095
4038
  children
4096
4039
  });
4097
4040
  });
4098
- var __freeze$o = Object.freeze;
4099
- var __defProp$p = Object.defineProperty;
4100
- var __template$o = (cooked, raw) => __freeze$o(__defProp$p(cooked, "raw", {
4101
- value: __freeze$o(raw || cooked.slice())
4041
+ var __freeze$q = Object.freeze;
4042
+ var __defProp$r = Object.defineProperty;
4043
+ var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
4044
+ value: __freeze$q(raw || cooked.slice())
4102
4045
  }));
4103
- var _a$o;
4046
+ var _a$q;
4104
4047
  function kbdStyle() {
4105
- return css(_a$o || (_a$o = __template$o(["\n background: ", ";\n font: inherit;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])), cssVars.default["bg-tint"]);
4048
+ return css(_a$q || (_a$q = __template$q(["\n background: ", ";\n font: inherit;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])), cssVars.default["bg-tint"]);
4106
4049
  }
4107
- const Root$n = styled.kbd(responsiveRadiusStyle, kbdStyle);
4050
+ const Root$o = styled.kbd(responsiveRadiusStyle, kbdStyle);
4108
4051
  const KBD = forwardRef(function KBD2(props, ref) {
4109
4052
  const {
4110
4053
  children,
@@ -4113,7 +4056,7 @@ const KBD = forwardRef(function KBD2(props, ref) {
4113
4056
  radius = 2,
4114
4057
  ...restProps
4115
4058
  } = props;
4116
- return /* @__PURE__ */jsx(Root$n, {
4059
+ return /* @__PURE__ */jsx(Root$o, {
4117
4060
  "data-ui": "KBD",
4118
4061
  ...restProps,
4119
4062
  $radius: useArrayProp(radius),
@@ -4131,6 +4074,64 @@ const KBD = forwardRef(function KBD2(props, ref) {
4131
4074
  })
4132
4075
  });
4133
4076
  });
4077
+ var __freeze$p = Object.freeze;
4078
+ var __defProp$q = Object.defineProperty;
4079
+ var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
4080
+ value: __freeze$p(raw || cooked.slice())
4081
+ }));
4082
+ var _a$p, _b$g, _c$9;
4083
+ function labelBaseStyle(props) {
4084
+ const {
4085
+ $accent,
4086
+ $muted,
4087
+ theme
4088
+ } = props;
4089
+ const {
4090
+ fonts
4091
+ } = theme.sanity;
4092
+ return css(_c$9 || (_c$9 = __template$p(["\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 & svg {\n /* Certain popular CSS libraries changes the defaults for SVG display */\n /* Make sure SVGs are rendered as inline elements */\n display: inline;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_a$p || (_a$p = __template$p(["\n color: ", "};\n "])), cssVars.default["text-accent"]), $muted && css(_b$g || (_b$g = __template$p(["\n color: ", ";\n "])), cssVars.mutable["muted-fg-color"]), fonts.code.family);
4093
+ }
4094
+ var __freeze$o = Object.freeze;
4095
+ var __defProp$p = Object.defineProperty;
4096
+ var __template$o = (cooked, raw) => __freeze$o(__defProp$p(cooked, "raw", {
4097
+ value: __freeze$o(raw || cooked.slice())
4098
+ }));
4099
+ var _a$o;
4100
+ const Root$n = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
4101
+ const SpanWithTextOverflow = styled.span(_a$o || (_a$o = __template$o(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n overflow: clip;\n"])));
4102
+ const Label = forwardRef(function Label2(props, ref) {
4103
+ const {
4104
+ accent,
4105
+ align,
4106
+ children: childrenProp,
4107
+ muted = false,
4108
+ size = 2,
4109
+ textOverflow,
4110
+ weight,
4111
+ ...restProps
4112
+ } = props;
4113
+ let children = childrenProp;
4114
+ if (textOverflow === "ellipsis") {
4115
+ children = /* @__PURE__ */jsx(SpanWithTextOverflow, {
4116
+ children
4117
+ });
4118
+ } else {
4119
+ children = /* @__PURE__ */jsx("span", {
4120
+ children
4121
+ });
4122
+ }
4123
+ return /* @__PURE__ */jsx(Root$n, {
4124
+ "data-ui": "Label",
4125
+ ...restProps,
4126
+ $accent: accent,
4127
+ $align: useArrayProp(align),
4128
+ $muted: muted,
4129
+ $size: useArrayProp(size),
4130
+ $weight: weight,
4131
+ ref,
4132
+ children
4133
+ });
4134
+ });
4134
4135
  const key$7 = Symbol.for("@sanity/ui/context/boundaryElement");
4135
4136
  globalScope[key$7] = globalScope[key$7] || createContext(null);
4136
4137
  const BoundaryElementContext = globalScope[key$7];
@@ -7422,7 +7423,7 @@ function selectableColorStyle(props) {
7422
7423
  $tone,
7423
7424
  $scheme
7424
7425
  } = props;
7425
- return css(_b$4 || (_b$4 = __template$7(["\n ", "\n ", "\n\n background-color: ", ";\n color: ", ";\n outline: none;\n\n /* &:is(button) - Looks like a button in default mode */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n ", "\n "])), $tone !== "default" && createCssVars($scheme, theme.sanity.color.tones, $tone), _selectableVarStyle(), cssVars.mutable["bg-color"], cssVars[$tone]["text-secondary"], _selectableVarStyleDisabled(), _colorVarStyleActive(), _colorVarStyleSelected(), _colorVarStyleHover(), _colorVarStyleActive(), _selectableVarStyleDisabled(), _colorVarStyleActive(), _colorVarStyleSelected(), _colorVarStyleHover(), _colorVarStyleActive(), (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
7426
+ return css(_b$4 || (_b$4 = __template$7(["\n ", "\n ", "\n\n background-color: ", ";\n color: ", ";\n outline: none;\n\n /* &:is(button) - Looks like a button in default mode */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[data-hovered],\n &:hover {\n ", "\n }\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n ", "\n "])), $tone !== "default" && createCssVars($scheme, theme.sanity.color.tones, $tone), _selectableVarStyle($tone), cssVars.mutable["bg-color"], cssVars[$tone]["text-secondary"], _selectableVarStyleDisabled(), _colorVarStyleHover(), _colorVarStyleHover(), _colorVarStyleHover(), _colorVarStyleHover(), _selectableVarStyleDisabled(), _colorVarStyleHover(), _colorVarStyleHover(), _colorVarStyleHover(), _colorVarStyleHover(), (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
7426
7427
  }
7427
7428
  const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
7428
7429
  function useMenu() {
@@ -7439,7 +7440,7 @@ function MenuGroup(props) {
7439
7440
  const {
7440
7441
  as = "button",
7441
7442
  children,
7442
- fontSize,
7443
+ fontSize = 1,
7443
7444
  icon,
7444
7445
  onClick,
7445
7446
  padding = 3,
@@ -7549,28 +7550,24 @@ function MenuGroup(props) {
7549
7550
  ref: setRootElement,
7550
7551
  tabIndex: -1,
7551
7552
  type: as === "button" ? "button" : void 0,
7552
- children: /* @__PURE__ */jsx(Box, {
7553
+ children: /* @__PURE__ */jsxs(Flex, {
7554
+ gap: space,
7553
7555
  padding,
7554
- children: /* @__PURE__ */jsxs(Flex, {
7555
- children: [icon && /* @__PURE__ */jsxs(Text, {
7556
+ children: [icon && /* @__PURE__ */jsxs(Text, {
7557
+ size: fontSize,
7558
+ children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
7559
+ }), /* @__PURE__ */jsx(Box, {
7560
+ flex: 1,
7561
+ children: /* @__PURE__ */jsx(Text, {
7556
7562
  size: fontSize,
7557
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
7558
- }), /* @__PURE__ */jsx(Box, {
7559
- flex: 1,
7560
- marginLeft: icon ? space : void 0,
7561
- children: /* @__PURE__ */jsx(Text, {
7562
- size: fontSize,
7563
- textOverflow: "ellipsis",
7564
- children: text
7565
- })
7566
- }), /* @__PURE__ */jsx(Box, {
7567
- marginLeft: space,
7568
- children: /* @__PURE__ */jsx(Text, {
7569
- size: fontSize,
7570
- children: /* @__PURE__ */jsx(ChevronRightIcon, {})
7571
- })
7572
- })]
7573
- })
7563
+ textOverflow: "ellipsis",
7564
+ weight: "medium",
7565
+ children: text
7566
+ })
7567
+ }), /* @__PURE__ */jsx(Text, {
7568
+ size: fontSize,
7569
+ children: /* @__PURE__ */jsx(ChevronRightIcon, {})
7570
+ })]
7574
7571
  })
7575
7572
  })
7576
7573
  });
@@ -7643,7 +7640,7 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
7643
7640
  forwardedAs: as,
7644
7641
  $radius: useArrayProp(radius),
7645
7642
  $padding: useArrayProp(0),
7646
- $tone: tone,
7643
+ $tone: disabled ? "default" : tone,
7647
7644
  $scheme: scheme,
7648
7645
  disabled,
7649
7646
  onClick: handleClick,
@@ -7653,38 +7650,33 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
7653
7650
  role: "menuitem",
7654
7651
  tabIndex: -1,
7655
7652
  type: as === "button" ? "button" : void 0,
7656
- children: [(icon || text || iconRight) && /* @__PURE__ */jsx(Box, {
7653
+ children: [(icon || text || iconRight) && /* @__PURE__ */jsxs(Flex, {
7657
7654
  as: "span",
7655
+ gap: space,
7656
+ align: "center",
7658
7657
  ...paddingProps,
7659
- children: /* @__PURE__ */jsxs(Flex, {
7660
- as: "span",
7661
- children: [icon && /* @__PURE__ */jsxs(Text, {
7662
- size: fontSize,
7663
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
7664
- }), text && /* @__PURE__ */jsx(Box, {
7665
- flex: 1,
7666
- marginLeft: icon ? space : void 0,
7667
- marginRight: iconRight ? space : void 0,
7668
- children: /* @__PURE__ */jsx(Text, {
7669
- size: fontSize,
7670
- textOverflow: "ellipsis",
7671
- children: text
7672
- })
7673
- }), hotkeys && /* @__PURE__ */jsx(Box, {
7674
- marginLeft: space,
7675
- style: {
7676
- marginTop: -4,
7677
- marginBottom: -4
7678
- },
7679
- children: /* @__PURE__ */jsx(Hotkeys, {
7680
- fontSize,
7681
- keys: hotkeys
7682
- })
7683
- }), iconRight && /* @__PURE__ */jsxs(Text, {
7658
+ children: [icon && /* @__PURE__ */jsxs(Text, {
7659
+ size: fontSize,
7660
+ children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
7661
+ }), text && /* @__PURE__ */jsx(Box, {
7662
+ flex: 1,
7663
+ children: /* @__PURE__ */jsx(Text, {
7684
7664
  size: fontSize,
7685
- children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
7686
- })]
7687
- })
7665
+ textOverflow: "ellipsis",
7666
+ weight: "medium",
7667
+ children: text
7668
+ })
7669
+ }), hotkeys && /* @__PURE__ */jsx(Hotkeys, {
7670
+ fontSize,
7671
+ keys: hotkeys,
7672
+ style: {
7673
+ marginTop: -4,
7674
+ marginBottom: -4
7675
+ }
7676
+ }), iconRight && /* @__PURE__ */jsxs(Text, {
7677
+ size: fontSize,
7678
+ children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
7679
+ })]
7688
7680
  }), children && /* @__PURE__ */jsx(Box, {
7689
7681
  as: "span",
7690
7682
  ...paddingProps,