@sanity/ui 2.0.0-alpha.1 → 2.0.0-alpha.11

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.js CHANGED
@@ -734,7 +734,7 @@ var ResizeObserverController = function () {
734
734
  };
735
735
  return ResizeObserverController;
736
736
  }();
737
- var ResizeObserver = function () {
737
+ var ResizeObserver$1 = function () {
738
738
  function ResizeObserver(callback) {
739
739
  if (arguments.length === 0) {
740
740
  throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
@@ -770,7 +770,7 @@ var ResizeObserver = function () {
770
770
  };
771
771
  return ResizeObserver;
772
772
  }();
773
- const _ResizeObserver = typeof document !== "undefined" && typeof window !== "undefined" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver;
773
+ const _ResizeObserver = typeof document !== "undefined" && typeof window !== "undefined" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver$1;
774
774
  const _elementSizeObserver = _createElementSizeObserver();
775
775
  function _createElementRectValueListener() {
776
776
  return {
@@ -887,6 +887,15 @@ function hexToRgb(hex) {
887
887
  b: parseInt(hex.slice(5, 7), 16)
888
888
  };
889
889
  }
890
+ function rgbaToRGBA(rgba) {
891
+ const values = rgba.replace(/rgba\(|\)/g, "").split(",");
892
+ return {
893
+ r: parseInt(values[0]),
894
+ g: parseInt(values[1]),
895
+ b: parseInt(values[2]),
896
+ a: parseFloat(values[3])
897
+ };
898
+ }
890
899
  function rgbToHex(_ref2) {
891
900
  let {
892
901
  r,
@@ -1004,6 +1013,9 @@ function parseColor(color) {
1004
1013
  if (color.startsWith("hsl(")) {
1005
1014
  return hslToRgb(parseHsl(color));
1006
1015
  }
1016
+ if (color.startsWith("rgba(")) {
1017
+ return rgbaToRGBA(color);
1018
+ }
1007
1019
  throw new Error('parseColor: unexpected color format: "'.concat(color, '"'));
1008
1020
  }
1009
1021
  function rgba(color, a) {
@@ -2170,123 +2182,25 @@ function multiply(bg, fg) {
2170
2182
  const b = parseColor(bg);
2171
2183
  const s = parseColor(fg);
2172
2184
  const hex = rgbToHex(multiply$1(b, s));
2185
+ if (s.a) {
2186
+ return rgba(hex, s.a);
2187
+ }
2173
2188
  return hex;
2174
2189
  }
2175
2190
  function screen(bg, fg) {
2176
2191
  const b = parseColor(bg);
2177
2192
  const s = parseColor(fg);
2178
2193
  const hex = rgbToHex(screen$1(b, s));
2194
+ if (s.a) {
2195
+ return rgba(hex, s.a);
2196
+ }
2179
2197
  return hex;
2180
2198
  }
2181
- const defaultTints = {
2182
- light: {
2183
- text_primary: "900",
2184
- text_secondary: "600",
2185
- text_inactive: "500",
2186
- bg_base: color$1.white,
2187
- bg_base_hover: "50",
2188
- bg_base_active: "100",
2189
- bg_accent: "500",
2190
- bg_accent_hover: "600",
2191
- bg_accent_active: "700",
2192
- bg_tint: "50",
2193
- icon_default: "500",
2194
- icon_inverted: color$1.white,
2195
- border_base: "100",
2196
- border_accent: "500",
2197
- border_accent_inverted: color$1.white
2198
- },
2199
- dark: {
2200
- text_primary: "50",
2201
- text_secondary: "300",
2202
- text_inactive: "400",
2203
- bg_base: color$1.black,
2204
- bg_base_hover: "900",
2205
- bg_base_active: "800",
2206
- bg_accent: "500",
2207
- bg_accent_hover: "400",
2208
- bg_accent_active: "300",
2209
- bg_tint: "900",
2210
- icon_default: "300",
2211
- icon_inverted: color$1.hues.gray[900],
2212
- border_base: "800",
2213
- border_accent: "300",
2214
- border_accent_inverted: color$1.hues.gray[900]
2215
- }
2216
- };
2217
- const colorTints = {
2218
- light: {
2219
- default: {
2220
- ...defaultTints.light,
2221
- bg_accent: "900",
2222
- bg_accent_hover: "950",
2223
- bg_accent_active: color$1.black,
2224
- border_accent: "600"
2225
- },
2226
- primary: {
2227
- ...defaultTints.light,
2228
- bg_accent: "900",
2229
- bg_accent_hover: "950",
2230
- bg_accent_active: color$1.black,
2231
- border_accent: "600"
2232
- },
2233
- positive: {
2234
- ...defaultTints.light,
2235
- bg_base_hover: color$1.hues.gray[50],
2236
- bg_base_active: "50",
2237
- bg_accent: "400",
2238
- bg_accent_hover: "500",
2239
- bg_accent_active: "600",
2240
- border_accent: "400"
2241
- },
2242
- transparent: defaultTints.light,
2243
- caution: defaultTints.light,
2244
- critical: defaultTints.light
2245
- },
2246
- dark: {
2247
- default: {
2248
- ...defaultTints.dark,
2249
- text_primary: color$1.white,
2250
- bg_accent: color$1.white,
2251
- bg_accent_hover: "50",
2252
- bg_accent_active: "100"
2253
- },
2254
- primary: {
2255
- ...defaultTints.dark,
2256
- text_primary: color$1.white,
2257
- bg_accent: color$1.white,
2258
- bg_accent_hover: "50",
2259
- bg_accent_active: "100"
2260
- },
2261
- positive: {
2262
- ...defaultTints.dark,
2263
- bg_base_hover: color$1.hues.gray[900],
2264
- bg_base_active: "900",
2265
- bg_accent: "400",
2266
- bg_accent_hover: "300",
2267
- bg_accent_active: "200",
2268
- border_accent: "400"
2269
- },
2270
- transparent: defaultTints.dark,
2271
- caution: defaultTints.dark,
2272
- critical: defaultTints.dark
2273
- }
2274
- };
2275
- const getColorValue = (tints, dark, tone, key) => {
2276
- const value = colorTints[dark ? "dark" : "light"][tone][key];
2277
- if (typeof value === "string") {
2278
- return tints[value];
2279
- }
2280
- return value;
2281
- };
2282
- const getColorHex = (tints, dark, tone, key) => {
2283
- return getColorValue(tints, dark, tone, key).hex;
2284
- };
2285
2199
  const tones = {
2286
2200
  default: color$1.hues.gray,
2287
2201
  transparent: color$1.hues.gray,
2288
- primary: color$1.hues.gray,
2289
- positive: color$1.hues.cyan,
2202
+ primary: color$1.hues.blue,
2203
+ positive: color$1.hues.green,
2290
2204
  caution: color$1.hues.yellow,
2291
2205
  critical: color$1.hues.red
2292
2206
  };
@@ -2302,9 +2216,9 @@ const color = createColorTheme({
2302
2216
  const skeletonFrom2 = dark ? tints2[900].hex : tints2[100].hex;
2303
2217
  return {
2304
2218
  fg: dark ? color$1.white.hex : color$1.black.hex,
2305
- bg: getColorHex(tones["default"], dark, "default", "bg_base"),
2306
- border: getColorHex(tones["default"], dark, "default", "border_base"),
2307
- focusRing: getColorHex(tones["positive"], dark, "positive", "border_accent"),
2219
+ bg: dark ? color$1.black.hex : color$1.white.hex,
2220
+ border: tints2[dark ? 800 : 200].hex,
2221
+ focusRing: color$1.hues.blue[dark ? 500 : 500].hex,
2308
2222
  shadow: {
2309
2223
  outline: rgba(tints2[500].hex, 0.4),
2310
2224
  umbra: dark ? rgba(tints2[950].hex, 0.4) : rgba(tints2[500].hex, 0.2),
@@ -2341,9 +2255,9 @@ const color = createColorTheme({
2341
2255
  const skeletonFrom = tints[dark ? 800 : 200].hex;
2342
2256
  return {
2343
2257
  fg: tints[dark ? 100 : 900].hex,
2344
- bg: getColorHex(tints, dark, name, "bg_base"),
2345
- border: getColorHex(tints, dark, name, "border_base"),
2346
- focusRing: getColorHex(tints, dark, name, "border_accent"),
2258
+ bg: tints[dark ? 950 : 50].hex,
2259
+ border: tints[dark ? 800 : 200].hex,
2260
+ focusRing: tints[500].hex,
2347
2261
  shadow: {
2348
2262
  outline: rgba(tints[500].hex, 0.4),
2349
2263
  umbra: dark ? rgba(tints[900].hex, 0.4) : rgba(tints[500].hex, 0.2),
@@ -2371,14 +2285,15 @@ const color = createColorTheme({
2371
2285
  let tints = tones[tone === "default" ? name : tone] || defaultTints;
2372
2286
  if (state === "disabled") {
2373
2287
  tints = defaultTints;
2374
- const bg2 = getColorHex(tones.default, dark, "default", "bg_tint");
2288
+ const bg2 = mix(base.bg, tints[dark ? 800 : 200].hex);
2375
2289
  const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 800].hex);
2376
2290
  return {
2377
2291
  bg: bg2,
2378
2292
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2379
- border: getColorHex(tones.default, dark, "default", "bg_base"),
2380
- fg: getColorHex(tones.default, dark, "default", "text_inactive"),
2381
- iconColor: getColorHex(tones.default, dark, "default", "border_base"),
2293
+ border: mix(base.bg, tints[dark ? 800 : 200].hex),
2294
+ iconColor: "",
2295
+ // Add color
2296
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2382
2297
  muted: {
2383
2298
  fg: mix(base.bg, tints[dark ? 950 : 50].hex)
2384
2299
  },
@@ -2399,14 +2314,15 @@ const color = createColorTheme({
2399
2314
  };
2400
2315
  }
2401
2316
  if (state === "hovered") {
2402
- const bg2 = getColorHex(tints, dark, tone, "bg_accent_hover");
2317
+ const bg2 = mix(base.bg, tints[dark ? 300 : 600].hex);
2403
2318
  const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 800].hex);
2404
2319
  return {
2405
2320
  bg: bg2,
2406
2321
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2407
- border: bg2,
2408
- fg: getColorHex(tints, dark, "default", "bg_base"),
2409
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2322
+ border: mix(base.bg, tints[dark ? 300 : 600].hex),
2323
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2324
+ iconColor: "",
2325
+ // Add color
2410
2326
  muted: {
2411
2327
  fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2412
2328
  },
@@ -2427,14 +2343,15 @@ const color = createColorTheme({
2427
2343
  };
2428
2344
  }
2429
2345
  if (state === "pressed") {
2430
- const bg2 = getColorHex(tints, dark, tone, "bg_accent_active");
2431
- const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 600].hex);
2346
+ const bg2 = mix(base.bg, tints[dark ? 200 : 800].hex);
2347
+ const skeletonFrom2 = mix2(bg2, tints[dark ? 200 : 800].hex);
2432
2348
  return {
2433
- bg: bg2,
2349
+ bg: mix(base.bg, tints[dark ? 200 : 800].hex),
2434
2350
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2435
- border: bg2,
2436
- fg: getColorHex(tints, dark, "default", "bg_base"),
2437
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2351
+ iconColor: "",
2352
+ // Add color
2353
+ border: mix(base.bg, tints[dark ? 200 : 800].hex),
2354
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2438
2355
  muted: {
2439
2356
  fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2440
2357
  },
@@ -2463,9 +2380,10 @@ const color = createColorTheme({
2463
2380
  return {
2464
2381
  bg: bg2,
2465
2382
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2466
- border: bg2,
2467
- fg: getColorHex(tints, dark, "default", "bg_base"),
2468
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2383
+ border: mix(base.bg, tints[dark ? 200 : 800].hex),
2384
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2385
+ iconColor: "",
2386
+ // Add color
2469
2387
  muted: {
2470
2388
  fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2471
2389
  },
@@ -2485,14 +2403,15 @@ const color = createColorTheme({
2485
2403
  }
2486
2404
  };
2487
2405
  }
2488
- const bg = getColorHex(tints, dark, tone, "bg_accent");
2406
+ const bg = mix(base.bg, tints[dark ? 400 : 500].hex);
2489
2407
  const skeletonFrom = mix2(bg, tints[dark ? 200 : 800].hex);
2490
2408
  return {
2491
2409
  bg,
2492
2410
  bg2: mix2(bg, tints[dark ? 50 : 950].hex),
2493
- border: bg,
2494
- fg: getColorHex(tints, dark, "default", "bg_base"),
2495
- iconColor: getColorHex(tints, dark, "default", "icon_inverted"),
2411
+ border: mix(base.bg, tints[dark ? 400 : 500].hex),
2412
+ iconColor: "",
2413
+ // Add color
2414
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2496
2415
  muted: {
2497
2416
  fg: mix(base.bg, tints[dark ? 900 : 100].hex)
2498
2417
  },
@@ -2531,21 +2450,22 @@ const color = createColorTheme({
2531
2450
  return {
2532
2451
  bg: bg2,
2533
2452
  bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2534
- border: getColorHex(tones.default, dark, "default", "border_base"),
2535
- fg: getColorHex(tones.default, dark, "default", "text_inactive"),
2536
- iconColor: getColorHex(tones.default, dark, "default", "border_base"),
2453
+ border: mix(bg2, tints[dark ? 950 : 50].hex),
2454
+ iconColor: "",
2455
+ // Add color
2456
+ fg: mix(bg2, tints[dark ? 800 : 200].hex),
2537
2457
  muted: {
2538
- fg: getColorHex(tones.default, dark, "default", "text_inactive")
2458
+ fg: mix(bg2, tints[dark ? 900 : 100].hex)
2539
2459
  },
2540
2460
  accent: {
2541
- fg: getColorHex(tints, dark, tone, "text_secondary")
2461
+ fg: mix(bg2, tints[dark ? 900 : 100].hex)
2542
2462
  },
2543
2463
  link: {
2544
- fg: getColorHex(tints, dark, tone, "text_secondary")
2464
+ fg: mix(bg2, tints[dark ? 900 : 100].hex)
2545
2465
  },
2546
2466
  code: {
2547
2467
  bg: bg2,
2548
- fg: getColorHex(tints, dark, tone, "text_secondary")
2468
+ fg: mix(bg2, tints[dark ? 900 : 100].hex)
2549
2469
  },
2550
2470
  skeleton: {
2551
2471
  from: rgba(skeletonFrom2, 0.5),
@@ -2554,16 +2474,17 @@ const color = createColorTheme({
2554
2474
  };
2555
2475
  }
2556
2476
  if (state === "hovered") {
2557
- const bg2 = getColorHex(tints, dark, name, "bg_base_hover");
2477
+ const bg2 = mix(base.bg, tints[dark ? 950 : 50].hex);
2558
2478
  const skeletonFrom2 = mix(bg2, tints[dark ? 900 : 100].hex);
2559
2479
  return {
2560
2480
  bg: bg2,
2561
2481
  bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2562
2482
  border: mix(bg2, tints[dark ? 900 : 100].hex),
2563
- fg: getColorHex(tints, dark, tone, "text_primary"),
2564
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2483
+ fg: mix(base.bg, tints[dark ? 200 : 800].hex),
2484
+ iconColor: "",
2485
+ // Add color
2565
2486
  muted: {
2566
- fg: getColorHex(tints, dark, tone, "text_secondary")
2487
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2567
2488
  },
2568
2489
  accent: {
2569
2490
  fg: mix(base.bg, color$1.hues.red[dark ? 400 : 500].hex)
@@ -2573,7 +2494,7 @@ const color = createColorTheme({
2573
2494
  },
2574
2495
  code: {
2575
2496
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
2576
- fg: getColorHex(tints, dark, tone, "text_secondary")
2497
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2577
2498
  },
2578
2499
  skeleton: {
2579
2500
  from: skeletonFrom2,
@@ -2585,16 +2506,17 @@ const color = createColorTheme({
2585
2506
  if (isNeutral) {
2586
2507
  tints = tones.primary;
2587
2508
  }
2588
- const bg2 = getColorHex(tints, dark, name, "bg_base_active");
2589
- const skeletonFrom2 = mix(bg2, getColorHex(tints, dark, name, "bg_base_active"));
2509
+ const bg2 = mix(base.bg, tints[dark ? 900 : 100].hex);
2510
+ const skeletonFrom2 = mix(bg2, tints[dark ? 900 : 100].hex);
2590
2511
  return {
2591
2512
  bg: bg2,
2592
2513
  bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2593
- border: getColorHex(tints, dark, name, "border_base"),
2594
- fg: getColorHex(tints, dark, tone, "text_primary"),
2595
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2514
+ border: mix(bg2, tints[dark ? 900 : 100].hex),
2515
+ iconColor: "",
2516
+ // Add color
2517
+ fg: mix(base.bg, tints[dark ? 200 : 800].hex),
2596
2518
  muted: {
2597
- fg: getColorHex(tints, dark, tone, "text_secondary")
2519
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2598
2520
  },
2599
2521
  accent: {
2600
2522
  fg: mix(bg2, color$1.hues.red[dark ? 400 : 500].hex)
@@ -2604,7 +2526,7 @@ const color = createColorTheme({
2604
2526
  },
2605
2527
  code: {
2606
2528
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
2607
- fg: getColorHex(tints, dark, tone, "text_secondary")
2529
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2608
2530
  },
2609
2531
  skeleton: {
2610
2532
  from: skeletonFrom2,
@@ -2621,11 +2543,12 @@ const color = createColorTheme({
2621
2543
  return {
2622
2544
  bg: bg2,
2623
2545
  bg2: mix(bg2, tints[dark ? 950 : 50].hex),
2624
- border: getColorHex(tints, dark, name, "border_base"),
2625
- fg: getColorHex(tints, dark, tone, "text_primary"),
2626
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2546
+ border: mix(bg2, tints[dark ? 900 : 100].hex),
2547
+ fg: mix(base.bg, tints[dark ? 200 : 800].hex),
2548
+ iconColor: "",
2549
+ // Add color
2627
2550
  muted: {
2628
- fg: getColorHex(tints, dark, tone, "text_secondary")
2551
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2629
2552
  },
2630
2553
  accent: {
2631
2554
  fg: mix(bg2, color$1.hues.red[dark ? 400 : 500].hex)
@@ -2635,7 +2558,7 @@ const color = createColorTheme({
2635
2558
  },
2636
2559
  code: {
2637
2560
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
2638
- fg: getColorHex(tints, dark, tone, "text_secondary")
2561
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2639
2562
  },
2640
2563
  skeleton: {
2641
2564
  from: skeletonFrom2,
@@ -2648,11 +2571,12 @@ const color = createColorTheme({
2648
2571
  return {
2649
2572
  bg,
2650
2573
  bg2: mix(bg, tints[dark ? 950 : 50].hex),
2651
- border: mix(bg, getColorHex(tints, dark, name, "bg_base")),
2652
- fg: getColorHex(tints, dark, tone, "text_primary"),
2653
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2574
+ border: mix(bg, tints[dark ? 900 : 100].hex),
2575
+ fg: mix(base.bg, tints[dark ? 300 : 700].hex),
2576
+ iconColor: "",
2577
+ // Add color
2654
2578
  muted: {
2655
- fg: getColorHex(tints, dark, tone, "text_secondary")
2579
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2656
2580
  },
2657
2581
  accent: {
2658
2582
  fg: mix(base.bg, color$1.hues.red[dark ? 400 : 500].hex)
@@ -2662,7 +2586,7 @@ const color = createColorTheme({
2662
2586
  },
2663
2587
  code: {
2664
2588
  bg: mix(base.bg, tints[dark ? 950 : 50].hex),
2665
- fg: getColorHex(tints, dark, tone, "text_secondary")
2589
+ fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2666
2590
  },
2667
2591
  skeleton: {
2668
2592
  from: skeletonFrom,
@@ -2703,11 +2627,12 @@ const color = createColorTheme({
2703
2627
  }
2704
2628
  if (mode === "ghost") {
2705
2629
  return {
2706
- ...muted,
2630
+ ...solid,
2707
2631
  enabled: {
2708
2632
  ...muted.enabled,
2709
2633
  border: base.border
2710
- }
2634
+ },
2635
+ disabled: muted.disabled
2711
2636
  };
2712
2637
  }
2713
2638
  return solid;
@@ -2748,8 +2673,9 @@ const color = createColorTheme({
2748
2673
  bg,
2749
2674
  bg2: mix(bg, tints[dark ? 950 : 50].hex),
2750
2675
  fg: base.fg,
2751
- iconColor: getColorHex(tints, dark, name, "icon_default"),
2752
2676
  border: base.border,
2677
+ iconColor: "",
2678
+ // Add color
2753
2679
  muted: {
2754
2680
  fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2755
2681
  },
@@ -2781,45 +2707,50 @@ const color = createColorTheme({
2781
2707
  const tints = tones.critical;
2782
2708
  return {
2783
2709
  bg: mix(base.bg, tints[dark ? 950 : 50].hex),
2784
- bg2: getColorHex(tints, dark, "critical", "text_secondary"),
2710
+ bg2: "",
2711
+ // Add color
2785
2712
  fg: mix(base.bg, tints[dark ? 400 : 600].hex),
2786
- border: getColorHex(tints, dark, "critical", "border_base"),
2787
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2713
+ border: mix(base.bg, tints[dark ? 800 : 200].hex),
2714
+ placeholder: mix(base.bg, tints[dark ? 600 : 400].hex)
2788
2715
  };
2789
2716
  }
2790
2717
  if (state === "hovered") {
2791
2718
  return {
2792
2719
  bg: base.bg,
2793
- bg2: getColorHex(tones.default, dark, "default", "text_secondary"),
2720
+ bg2: "",
2721
+ // Add color
2794
2722
  fg: base.fg,
2795
2723
  border: mix(base.bg, color$1.hues.gray[dark ? 700 : 300].hex),
2796
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2724
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 600 : 400].hex)
2797
2725
  };
2798
2726
  }
2799
2727
  if (state === "disabled") {
2800
2728
  return {
2801
- bg: getColorHex(tones.default, dark, "default", "bg_tint"),
2802
- bg2: getColorHex(tones.default, dark, "default", "border_base"),
2803
- fg: getColorHex(tones.default, dark, "default", "text_secondary"),
2804
- border: getColorHex(tones.default, dark, "default", "border_base"),
2805
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2729
+ bg: mix(base.bg, color$1.hues.gray[dark ? 950 : 50].hex),
2730
+ bg2: "",
2731
+ // Add color
2732
+ fg: mix(base.bg, color$1.hues.gray[dark ? 700 : 300].hex),
2733
+ border: mix(base.bg, color$1.hues.gray[dark ? 900 : 100].hex),
2734
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 800 : 200].hex)
2806
2735
  };
2807
2736
  }
2808
2737
  if (state === "readOnly") {
2809
2738
  return {
2810
- bg: getColorHex(tones.default, dark, "default", "bg_tint"),
2811
- bg2: getColorHex(tones.default, dark, "default", "border_base"),
2812
- fg: getColorHex(tones.default, dark, "default", "text_secondary"),
2813
- border: getColorHex(tones.default, dark, "default", "border_base"),
2814
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2739
+ bg: mix(base.bg, color$1.hues.gray[dark ? 950 : 50].hex),
2740
+ bg2: "",
2741
+ // Add color
2742
+ fg: mix(base.bg, color$1.hues.gray[dark ? 200 : 800].hex),
2743
+ border: mix(base.bg, color$1.hues.gray[dark ? 800 : 200].hex),
2744
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 600 : 400].hex)
2815
2745
  };
2816
2746
  }
2817
2747
  return {
2818
2748
  bg: base.bg,
2819
- bg2: getColorHex(tones.default, dark, "default", "text_secondary"),
2749
+ bg2: "",
2750
+ // Add color
2820
2751
  fg: base.fg,
2821
2752
  border: base.border,
2822
- placeholder: getColorHex(tones.default, !dark, "default", "text_secondary")
2753
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 600 : 400].hex)
2823
2754
  };
2824
2755
  },
2825
2756
  selectable: _ref17 => {
@@ -3134,6 +3065,10 @@ const studioTheme = {
3134
3065
  },
3135
3066
  color,
3136
3067
  container: [320, 640, 960, 1280, 1600, 1920],
3068
+ focusRing: {
3069
+ offset: 1,
3070
+ width: 2
3071
+ },
3137
3072
  fonts,
3138
3073
  media: [360, 600, 900, 1200, 1800, 2400],
3139
3074
  radius: [0, 1, 3, 6, 9, 12, 21],
@@ -3142,9 +3077,9 @@ const studioTheme = {
3142
3077
  penumbra: [0, 0, 0, 0],
3143
3078
  ambient: [0, 0, 0, 0]
3144
3079
  }, {
3145
- umbra: [0, 3, 5, -1],
3080
+ umbra: [0, 3, 5, -2],
3146
3081
  penumbra: [0, 6, 10, 0],
3147
- ambient: [0, 1, 18, 0]
3082
+ ambient: [0, 1, 18, 1]
3148
3083
  }, {
3149
3084
  umbra: [0, 7, 8, -4],
3150
3085
  penumbra: [0, 12, 17, 2],
@@ -4590,64 +4525,6 @@ const Box = react.forwardRef(function Box2(props, ref) {
4590
4525
  children: props.children
4591
4526
  });
4592
4527
  });
4593
- var __freeze$y = Object.freeze;
4594
- var __defProp$z = Object.defineProperty;
4595
- var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
4596
- value: __freeze$y(raw || cooked.slice())
4597
- }));
4598
- var _a$y, _b$k, _c$b;
4599
- function labelBaseStyle(props) {
4600
- const {
4601
- $accent,
4602
- $muted,
4603
- theme
4604
- } = props;
4605
- const {
4606
- fonts
4607
- } = theme.sanity;
4608
- return styled.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 && styled.css(_a$y || (_a$y = __template$y(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$k || (_b$k = __template$y(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
4609
- }
4610
- var __freeze$x = Object.freeze;
4611
- var __defProp$y = Object.defineProperty;
4612
- var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
4613
- value: __freeze$x(raw || cooked.slice())
4614
- }));
4615
- var _a$x;
4616
- const Root$z = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
4617
- const SpanWithTextOverflow$1 = styled__default.default.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"])));
4618
- const Label = react.forwardRef(function Label2(props, ref) {
4619
- const {
4620
- accent,
4621
- align,
4622
- children: childrenProp,
4623
- muted = false,
4624
- size = 2,
4625
- textOverflow,
4626
- weight,
4627
- ...restProps
4628
- } = props;
4629
- let children = childrenProp;
4630
- if (textOverflow === "ellipsis") {
4631
- children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
4632
- children
4633
- });
4634
- } else {
4635
- children = /* @__PURE__ */jsxRuntime.jsx("span", {
4636
- children
4637
- });
4638
- }
4639
- return /* @__PURE__ */jsxRuntime.jsx(Root$z, {
4640
- "data-ui": "Label",
4641
- ...restProps,
4642
- $accent: accent,
4643
- $align: useArrayProp(align),
4644
- $muted: muted,
4645
- $size: useArrayProp(size),
4646
- $weight: weight,
4647
- ref,
4648
- children
4649
- });
4650
- });
4651
4528
  function badgeStyle(props) {
4652
4529
  const {
4653
4530
  $mode,
@@ -4666,18 +4543,18 @@ function badgeStyle(props) {
4666
4543
  }
4667
4544
  };
4668
4545
  }
4669
- const Root$y = styled__default.default(Box)(responsiveRadiusStyle, badgeStyle);
4546
+ const Root$z = styled__default.default(Box)(responsiveRadiusStyle, badgeStyle);
4670
4547
  const Badge = react.forwardRef(function Badge2(props, ref) {
4671
4548
  const {
4672
4549
  children,
4673
- fontSize,
4550
+ fontSize = 1,
4674
4551
  mode = "default",
4675
4552
  padding = 1,
4676
4553
  radius = 2,
4677
4554
  tone = "default",
4678
4555
  ...restProps
4679
4556
  } = props;
4680
- return /* @__PURE__ */jsxRuntime.jsx(Root$y, {
4557
+ return /* @__PURE__ */jsxRuntime.jsx(Root$z, {
4681
4558
  "data-ui": "Badge",
4682
4559
  ...restProps,
4683
4560
  $mode: mode,
@@ -4685,13 +4562,14 @@ const Badge = react.forwardRef(function Badge2(props, ref) {
4685
4562
  $radius: useArrayProp(radius),
4686
4563
  padding: useArrayProp(padding),
4687
4564
  ref,
4688
- children: /* @__PURE__ */jsxRuntime.jsx(Label, {
4565
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
4689
4566
  size: fontSize,
4567
+ weight: "medium",
4690
4568
  children
4691
4569
  })
4692
4570
  });
4693
4571
  });
4694
- const Root$x = styled__default.default(Box)(flexItemStyle, responsiveFlexStyle);
4572
+ const Root$y = styled__default.default(Box)(flexItemStyle, responsiveFlexStyle);
4695
4573
  const Flex = react.forwardRef(function Flex2(props, ref) {
4696
4574
  const {
4697
4575
  align,
@@ -4705,7 +4583,7 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
4705
4583
  return (
4706
4584
  // @ts-expect-error -- some dollar prefixed typings aren't inferred correctly https://github.com/styled-components/styled-components/issues/4062
4707
4585
  /* @__PURE__ */
4708
- jsxRuntime.jsx(Root$x, {
4586
+ jsxRuntime.jsx(Root$y, {
4709
4587
  "data-ui": "Flex",
4710
4588
  ...restProps,
4711
4589
  $align: useArrayProp(align),
@@ -4718,16 +4596,16 @@ const Flex = react.forwardRef(function Flex2(props, ref) {
4718
4596
  })
4719
4597
  );
4720
4598
  });
4721
- var __freeze$w = Object.freeze;
4722
- var __defProp$x = Object.defineProperty;
4723
- var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
4724
- value: __freeze$w(raw || cooked.slice())
4599
+ var __freeze$y = Object.freeze;
4600
+ var __defProp$z = Object.defineProperty;
4601
+ var __template$y = (cooked, raw) => __freeze$y(__defProp$z(cooked, "raw", {
4602
+ value: __freeze$y(raw || cooked.slice())
4725
4603
  }));
4726
- var _a$w, _b$j;
4727
- const rotate$1 = styled.keyframes(_a$w || (_a$w = __template$w(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
4728
- const Root$w = styled__default.default(Text)(_b$j || (_b$j = __template$w(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
4604
+ var _a$y, _b$k;
4605
+ const rotate$1 = styled.keyframes(_a$y || (_a$y = __template$y(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
4606
+ const Root$x = styled__default.default(Text)(_b$k || (_b$k = __template$y(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
4729
4607
  const Spinner = react.forwardRef(function Spinner2(props, ref) {
4730
- return /* @__PURE__ */jsxRuntime.jsx(Root$w, {
4608
+ return /* @__PURE__ */jsxRuntime.jsx(Root$x, {
4731
4609
  "data-ui": "Spinner",
4732
4610
  ...props,
4733
4611
  ref,
@@ -4765,14 +4643,14 @@ function _colorVarsStyle(base, color) {
4765
4643
  "--card-hairline-hard-color": color.border
4766
4644
  };
4767
4645
  }
4768
- var __freeze$v = Object.freeze;
4769
- var __defProp$w = Object.defineProperty;
4770
- var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
4771
- value: __freeze$v(raw || cooked.slice())
4646
+ var __freeze$x = Object.freeze;
4647
+ var __defProp$y = Object.defineProperty;
4648
+ var __template$x = (cooked, raw) => __freeze$x(__defProp$y(cooked, "raw", {
4649
+ value: __freeze$x(raw || cooked.slice())
4772
4650
  }));
4773
- var _a$v;
4651
+ var _a$x;
4774
4652
  function buttonBaseStyles() {
4775
- return styled.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 "])));
4653
+ return styled.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 "])));
4776
4654
  }
4777
4655
  const buttonTheme = {
4778
4656
  border: {
@@ -4832,14 +4710,14 @@ function buttonColorStyles(props) {
4832
4710
  }
4833
4711
  }, (_b = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.button) == null ? void 0 : _b.root].filter(Boolean);
4834
4712
  }
4835
- var __freeze$u = Object.freeze;
4836
- var __defProp$v = Object.defineProperty;
4837
- var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
4838
- value: __freeze$u(raw || cooked.slice())
4713
+ var __freeze$w = Object.freeze;
4714
+ var __defProp$x = Object.defineProperty;
4715
+ var __template$w = (cooked, raw) => __freeze$w(__defProp$x(cooked, "raw", {
4716
+ value: __freeze$w(raw || cooked.slice())
4839
4717
  }));
4840
- var _a$u;
4841
- const Root$v = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
4842
- const LoadingBox = styled__default.default.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: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])));
4718
+ var _a$w;
4719
+ const Root$w = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
4720
+ const LoadingBox = styled__default.default.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: var(--card-bg-color);\n border-radius: inherit;\n z-index: 1;\n box-shadow: inherit;\n"])));
4843
4721
  const Button = react.forwardRef(function Button2(props, ref) {
4844
4722
  const {
4845
4723
  children,
@@ -4888,7 +4766,7 @@ const Button = react.forwardRef(function Button2(props, ref) {
4888
4766
  paddingLeft,
4889
4767
  paddingRight
4890
4768
  }), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
4891
- return /* @__PURE__ */jsxRuntime.jsxs(Root$v, {
4769
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$w, {
4892
4770
  "data-ui": "Button",
4893
4771
  ...restProps,
4894
4772
  $mode: mode,
@@ -4933,12 +4811,12 @@ const Button = react.forwardRef(function Button2(props, ref) {
4933
4811
  })]
4934
4812
  });
4935
4813
  });
4936
- var __freeze$t = Object.freeze;
4937
- var __defProp$u = Object.defineProperty;
4938
- var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
4939
- value: __freeze$t(raw || cooked.slice())
4814
+ var __freeze$v = Object.freeze;
4815
+ var __defProp$w = Object.defineProperty;
4816
+ var __template$v = (cooked, raw) => __freeze$v(__defProp$w(cooked, "raw", {
4817
+ value: __freeze$v(raw || cooked.slice())
4940
4818
  }));
4941
- var _a$t, _b$i, _c$a;
4819
+ var _a$v, _b$j, _c$b;
4942
4820
  function cardStyle(props) {
4943
4821
  return [cardBaseStyle(props), cardColorStyle(props)];
4944
4822
  }
@@ -4948,7 +4826,7 @@ function cardBaseStyle(props) {
4948
4826
  theme
4949
4827
  } = props;
4950
4828
  const space = theme.sanity.space;
4951
- return styled.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 && styled.css(_a$t || (_a$t = __template$t(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
4829
+ return styled.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 && styled.css(_a$v || (_a$v = __template$v(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
4952
4830
  }
4953
4831
  function cardColorStyle(props) {
4954
4832
  var _a2, _b2;
@@ -4969,7 +4847,7 @@ function cardColorStyle(props) {
4969
4847
  width: 0,
4970
4848
  color: "var(--card-border-color)"
4971
4849
  };
4972
- return styled.css(_c$a || (_c$a = __template$t(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[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 "])), dark ? "dark" : "light", _colorVarsStyle(base, card.enabled, $checkered), _colorVarsStyle(base, card.disabled, $checkered), _colorVarsStyle(base, card.pressed, $checkered), _colorVarsStyle(base, card.selected, $checkered), _colorVarsStyle(base, card.hovered, $checkered), _colorVarsStyle(base, card.pressed, $checkered), $focusRing ? focusRingStyle({
4850
+ return styled.css(_c$b || (_c$b = __template$v(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &[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 "])), dark ? "dark" : "light", _colorVarsStyle(base, card.enabled, $checkered), _colorVarsStyle(base, card.disabled, $checkered), _colorVarsStyle(base, card.pressed, $checkered), _colorVarsStyle(base, card.selected, $checkered), _colorVarsStyle(base, card.hovered, $checkered), _colorVarsStyle(base, card.pressed, $checkered), $focusRing ? focusRingStyle({
4973
4851
  base,
4974
4852
  border,
4975
4853
  focusRing
@@ -4979,7 +4857,7 @@ function cardColorStyle(props) {
4979
4857
  focusRing
4980
4858
  }) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
4981
4859
  }
4982
- const Root$u = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
4860
+ const Root$v = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
4983
4861
  const Card = react.forwardRef(function Card2(props, ref) {
4984
4862
  const {
4985
4863
  __unstable_checkered: checkered = false,
@@ -5004,7 +4882,7 @@ const Card = react.forwardRef(function Card2(props, ref) {
5004
4882
  return /* @__PURE__ */jsxRuntime.jsx(ThemeColorProvider, {
5005
4883
  scheme,
5006
4884
  tone,
5007
- children: /* @__PURE__ */jsxRuntime.jsx(Root$u, {
4885
+ children: /* @__PURE__ */jsxRuntime.jsx(Root$v, {
5008
4886
  "data-as": typeof as === "string" ? as : void 0,
5009
4887
  "data-scheme": rootTheme.scheme,
5010
4888
  "data-ui": "Card",
@@ -5029,14 +4907,14 @@ const Card = react.forwardRef(function Card2(props, ref) {
5029
4907
  })
5030
4908
  });
5031
4909
  });
5032
- var __freeze$s = Object.freeze;
5033
- var __defProp$t = Object.defineProperty;
5034
- var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
5035
- value: __freeze$s(raw || cooked.slice())
4910
+ var __freeze$u = Object.freeze;
4911
+ var __defProp$v = Object.defineProperty;
4912
+ var __template$u = (cooked, raw) => __freeze$u(__defProp$v(cooked, "raw", {
4913
+ value: __freeze$u(raw || cooked.slice())
5036
4914
  }));
5037
- var _a$s, _b$h;
4915
+ var _a$u, _b$i;
5038
4916
  function checkboxBaseStyles() {
5039
- return styled.css(_a$s || (_a$s = __template$s(["\n position: relative;\n display: inline-block;\n "])));
4917
+ return styled.css(_a$u || (_a$u = __template$u(["\n position: relative;\n display: inline-block;\n "])));
5040
4918
  }
5041
4919
  function inputElementStyles(props) {
5042
4920
  const {
@@ -5050,7 +4928,7 @@ function inputElementStyles(props) {
5050
4928
  const {
5051
4929
  focusRing
5052
4930
  } = input.checkbox;
5053
- return styled.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({
4931
+ return styled.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({
5054
4932
  color: color.default.enabled.border,
5055
4933
  width: input.border.width
5056
4934
  }), rem(radius[2]), color.default.enabled.bg, color.default.enabled.bg2, focusRingBorderStyle({
@@ -5083,7 +4961,7 @@ function inputElementStyles(props) {
5083
4961
  color: color.default.readOnly.border
5084
4962
  }), color.default.readOnly.fg, color.default.readOnly.bg2);
5085
4963
  }
5086
- const Root$t = styled__default.default.div(checkboxBaseStyles);
4964
+ const Root$u = styled__default.default.div(checkboxBaseStyles);
5087
4965
  const Input$5 = styled__default.default.input(inputElementStyles);
5088
4966
  const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
5089
4967
  const {
@@ -5103,7 +4981,7 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
5103
4981
  ref.current.indeterminate = indeterminate || false;
5104
4982
  }
5105
4983
  }, [indeterminate, ref]);
5106
- return /* @__PURE__ */jsxRuntime.jsxs(Root$t, {
4984
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$u, {
5107
4985
  className,
5108
4986
  "data-ui": "Checkbox",
5109
4987
  style,
@@ -5121,12 +4999,12 @@ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
5121
4999
  })]
5122
5000
  });
5123
5001
  });
5124
- var __freeze$r = Object.freeze;
5125
- var __defProp$s = Object.defineProperty;
5126
- var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
5127
- value: __freeze$r(raw || cooked.slice())
5002
+ var __freeze$t = Object.freeze;
5003
+ var __defProp$u = Object.defineProperty;
5004
+ var __template$t = (cooked, raw) => __freeze$t(__defProp$u(cooked, "raw", {
5005
+ value: __freeze$t(raw || cooked.slice())
5128
5006
  }));
5129
- var _a$r;
5007
+ var _a$t;
5130
5008
  function codeSyntaxHighlightingStyle(_ref20) {
5131
5009
  let {
5132
5010
  theme
@@ -5244,9 +5122,9 @@ function codeSyntaxHighlightingStyle(_ref20) {
5244
5122
  };
5245
5123
  }
5246
5124
  function codeBaseStyle() {
5247
- return styled.css(_a$r || (_a$r = __template$r(["\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 & 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 "])), codeSyntaxHighlightingStyle);
5125
+ return styled.css(_a$t || (_a$t = __template$t(["\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 & 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 "])), codeSyntaxHighlightingStyle);
5248
5126
  }
5249
- const Root$s = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle);
5127
+ const Root$t = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle);
5250
5128
  const Code = react.forwardRef(function Code2(props, ref) {
5251
5129
  const {
5252
5130
  children,
@@ -5257,7 +5135,7 @@ const Code = react.forwardRef(function Code2(props, ref) {
5257
5135
  } = props;
5258
5136
  const language = typeof languageProp === "string" ? languageProp : void 0;
5259
5137
  const registered = language ? Refractor__default.default.hasLanguage(language) : false;
5260
- return /* @__PURE__ */jsxRuntime.jsxs(Root$s, {
5138
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$t, {
5261
5139
  "data-ui": "Code",
5262
5140
  ...restProps,
5263
5141
  $size: useArrayProp(size),
@@ -5291,14 +5169,14 @@ function responsiveContainerWidthStyle(props) {
5291
5169
  maxWidth: val === "auto" ? "none" : rem(container[val])
5292
5170
  }));
5293
5171
  }
5294
- const Root$r = styled__default.default(Box)(containerBaseStyle, responsiveContainerWidthStyle);
5172
+ const Root$s = styled__default.default(Box)(containerBaseStyle, responsiveContainerWidthStyle);
5295
5173
  const Container = react.forwardRef(function Container2(props, ref) {
5296
5174
  const {
5297
5175
  as,
5298
5176
  width = 2,
5299
5177
  ...restProps
5300
5178
  } = props;
5301
- return /* @__PURE__ */jsxRuntime.jsx(Root$r, {
5179
+ return /* @__PURE__ */jsxRuntime.jsx(Root$s, {
5302
5180
  "data-ui": "Container",
5303
5181
  ...restProps,
5304
5182
  $width: useArrayProp(width),
@@ -5306,7 +5184,7 @@ const Container = react.forwardRef(function Container2(props, ref) {
5306
5184
  ref
5307
5185
  });
5308
5186
  });
5309
- const Root$q = styled__default.default(Box)(responsiveGridStyle);
5187
+ const Root$r = styled__default.default(Box)(responsiveGridStyle);
5310
5188
  const Grid = react.forwardRef(function Grid2(props, ref) {
5311
5189
  const {
5312
5190
  as,
@@ -5321,7 +5199,7 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
5321
5199
  children,
5322
5200
  ...restProps
5323
5201
  } = props;
5324
- return /* @__PURE__ */jsxRuntime.jsx(Root$q, {
5202
+ return /* @__PURE__ */jsxRuntime.jsx(Root$r, {
5325
5203
  "data-as": typeof as === "string" ? as : void 0,
5326
5204
  "data-ui": "Grid",
5327
5205
  ...restProps,
@@ -5338,28 +5216,28 @@ const Grid = react.forwardRef(function Grid2(props, ref) {
5338
5216
  children
5339
5217
  });
5340
5218
  });
5341
- var __freeze$q = Object.freeze;
5342
- var __defProp$r = Object.defineProperty;
5343
- var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
5344
- value: __freeze$q(raw || cooked.slice())
5219
+ var __freeze$s = Object.freeze;
5220
+ var __defProp$t = Object.defineProperty;
5221
+ var __template$s = (cooked, raw) => __freeze$s(__defProp$t(cooked, "raw", {
5222
+ value: __freeze$s(raw || cooked.slice())
5345
5223
  }));
5346
- var _a$q, _b$g, _c$9;
5224
+ var _a$s, _b$h, _c$a;
5347
5225
  function headingBaseStyle(props) {
5348
5226
  const {
5349
5227
  $accent,
5350
5228
  $muted,
5351
5229
  theme
5352
5230
  } = props;
5353
- return styled.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: 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:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\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 && styled.css(_a$q || (_a$q = __template$q(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$g || (_b$g = __template$q(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
5231
+ return styled.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: 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:\n 0 0 0 1px var(--card-bg-color),\n 0 0 0 3px var(--card-focus-ring-color);\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 && styled.css(_a$s || (_a$s = __template$s(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$h || (_b$h = __template$s(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
5354
5232
  }
5355
- var __freeze$p = Object.freeze;
5356
- var __defProp$q = Object.defineProperty;
5357
- var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
5358
- value: __freeze$p(raw || cooked.slice())
5233
+ var __freeze$r = Object.freeze;
5234
+ var __defProp$s = Object.defineProperty;
5235
+ var __template$r = (cooked, raw) => __freeze$r(__defProp$s(cooked, "raw", {
5236
+ value: __freeze$r(raw || cooked.slice())
5359
5237
  }));
5360
- var _a$p;
5361
- const Root$p = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
5362
- const SpanWithTextOverflow = styled__default.default.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"])));
5238
+ var _a$r;
5239
+ const Root$q = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
5240
+ const SpanWithTextOverflow$1 = styled__default.default.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"])));
5363
5241
  const Heading = react.forwardRef(function Heading2(props, ref) {
5364
5242
  const {
5365
5243
  accent = false,
@@ -5373,11 +5251,11 @@ const Heading = react.forwardRef(function Heading2(props, ref) {
5373
5251
  } = props;
5374
5252
  let children = childrenProp;
5375
5253
  if (textOverflow === "ellipsis") {
5376
- children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow, {
5254
+ children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
5377
5255
  children
5378
5256
  });
5379
5257
  }
5380
- return /* @__PURE__ */jsxRuntime.jsx(Root$p, {
5258
+ return /* @__PURE__ */jsxRuntime.jsx(Root$q, {
5381
5259
  "data-ui": "Heading",
5382
5260
  ...restProps,
5383
5261
  $accent: accent,
@@ -5417,7 +5295,7 @@ function inlineSpaceStyle(props) {
5417
5295
  };
5418
5296
  });
5419
5297
  }
5420
- const Root$o = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle);
5298
+ const Root$p = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle);
5421
5299
  const Inline = react.forwardRef(function Inline2(props, ref) {
5422
5300
  const {
5423
5301
  as,
@@ -5428,7 +5306,7 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
5428
5306
  const children = react.useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsxRuntime.jsx("div", {
5429
5307
  children: child
5430
5308
  }, idx)), [childrenProp]);
5431
- return /* @__PURE__ */jsxRuntime.jsx(Root$o, {
5309
+ return /* @__PURE__ */jsxRuntime.jsx(Root$p, {
5432
5310
  "data-ui": "Inline",
5433
5311
  ...restProps,
5434
5312
  $space: useArrayProp(space),
@@ -5437,16 +5315,16 @@ const Inline = react.forwardRef(function Inline2(props, ref) {
5437
5315
  children
5438
5316
  });
5439
5317
  });
5440
- var __freeze$o = Object.freeze;
5441
- var __defProp$p = Object.defineProperty;
5442
- var __template$o = (cooked, raw) => __freeze$o(__defProp$p(cooked, "raw", {
5443
- value: __freeze$o(raw || cooked.slice())
5318
+ var __freeze$q = Object.freeze;
5319
+ var __defProp$r = Object.defineProperty;
5320
+ var __template$q = (cooked, raw) => __freeze$q(__defProp$r(cooked, "raw", {
5321
+ value: __freeze$q(raw || cooked.slice())
5444
5322
  }));
5445
- var _a$o;
5323
+ var _a$q;
5446
5324
  function kbdStyle() {
5447
- return styled.css(_a$o || (_a$o = __template$o(["\n background: var(--card-bg2-color);\n font: inherit;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
5325
+ return styled.css(_a$q || (_a$q = __template$q(["\n background: var(--card-bg2-color);\n font: inherit;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
5448
5326
  }
5449
- const Root$n = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
5327
+ const Root$o = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
5450
5328
  const KBD = react.forwardRef(function KBD2(props, ref) {
5451
5329
  const {
5452
5330
  children,
@@ -5455,7 +5333,7 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
5455
5333
  radius = 2,
5456
5334
  ...restProps
5457
5335
  } = props;
5458
- return /* @__PURE__ */jsxRuntime.jsx(Root$n, {
5336
+ return /* @__PURE__ */jsxRuntime.jsx(Root$o, {
5459
5337
  "data-ui": "KBD",
5460
5338
  ...restProps,
5461
5339
  $radius: useArrayProp(radius),
@@ -5473,6 +5351,64 @@ const KBD = react.forwardRef(function KBD2(props, ref) {
5473
5351
  })
5474
5352
  });
5475
5353
  });
5354
+ var __freeze$p = Object.freeze;
5355
+ var __defProp$q = Object.defineProperty;
5356
+ var __template$p = (cooked, raw) => __freeze$p(__defProp$q(cooked, "raw", {
5357
+ value: __freeze$p(raw || cooked.slice())
5358
+ }));
5359
+ var _a$p, _b$g, _c$9;
5360
+ function labelBaseStyle(props) {
5361
+ const {
5362
+ $accent,
5363
+ $muted,
5364
+ theme
5365
+ } = props;
5366
+ const {
5367
+ fonts
5368
+ } = theme.sanity;
5369
+ return styled.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 && styled.css(_a$p || (_a$p = __template$p(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_b$g || (_b$g = __template$p(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
5370
+ }
5371
+ var __freeze$o = Object.freeze;
5372
+ var __defProp$p = Object.defineProperty;
5373
+ var __template$o = (cooked, raw) => __freeze$o(__defProp$p(cooked, "raw", {
5374
+ value: __freeze$o(raw || cooked.slice())
5375
+ }));
5376
+ var _a$o;
5377
+ const Root$n = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
5378
+ const SpanWithTextOverflow = styled__default.default.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"])));
5379
+ const Label = react.forwardRef(function Label2(props, ref) {
5380
+ const {
5381
+ accent,
5382
+ align,
5383
+ children: childrenProp,
5384
+ muted = false,
5385
+ size = 2,
5386
+ textOverflow,
5387
+ weight,
5388
+ ...restProps
5389
+ } = props;
5390
+ let children = childrenProp;
5391
+ if (textOverflow === "ellipsis") {
5392
+ children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow, {
5393
+ children
5394
+ });
5395
+ } else {
5396
+ children = /* @__PURE__ */jsxRuntime.jsx("span", {
5397
+ children
5398
+ });
5399
+ }
5400
+ return /* @__PURE__ */jsxRuntime.jsx(Root$n, {
5401
+ "data-ui": "Label",
5402
+ ...restProps,
5403
+ $accent: accent,
5404
+ $align: useArrayProp(align),
5405
+ $muted: muted,
5406
+ $size: useArrayProp(size),
5407
+ $weight: weight,
5408
+ ref,
5409
+ children
5410
+ });
5411
+ });
5476
5412
  const key$7 = Symbol.for("@sanity/ui/context/boundaryElement");
5477
5413
  globalScope[key$7] = globalScope[key$7] || react.createContext(null);
5478
5414
  const BoundaryElementContext = globalScope[key$7];
@@ -6851,7 +6787,7 @@ const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
6851
6787
  disabled = false,
6852
6788
  fontSize = 2,
6853
6789
  padding = 3,
6854
- radius = 1,
6790
+ radius = 2,
6855
6791
  weight,
6856
6792
  ...restProps
6857
6793
  } = props;
@@ -6925,7 +6861,7 @@ const TextInput = react.forwardRef(function TextInput2(props, forwardedRef) {
6925
6861
  onClear,
6926
6862
  padding: paddingProp = 3,
6927
6863
  prefix,
6928
- radius: radiusProp = 1,
6864
+ radius: radiusProp = 2,
6929
6865
  readOnly,
6930
6866
  space: spaceProp = 3,
6931
6867
  suffix,
@@ -7962,6 +7898,7 @@ const Breadcrumbs = react.forwardRef(function Breadcrumbs2(props, ref) {
7962
7898
  }, itemIndex))
7963
7899
  });
7964
7900
  });
7901
+ const BORDER_OFFSET_X = 12;
7965
7902
  function dialogStyle(_ref24) {
7966
7903
  let {
7967
7904
  theme
@@ -8016,9 +7953,9 @@ const Root$7 = styled__default.default(Layer)(responsivePaddingStyle, dialogStyl
8016
7953
  const DialogContainer = styled__default.default(Container)(_a$b || (_a$b = __template$b(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
8017
7954
  const DialogCardRoot = styled__default.default(Card)(_b$6 || (_b$6 = __template$b(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n min-height: 0;\n max-height: 100%;\n overflow: hidden;\n overflow: clip;\n"])));
8018
7955
  const DialogLayout = styled__default.default(Flex)(_c$2 || (_c$2 = __template$b(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
8019
- const DialogHeader = styled__default.default(Card)(_d$1 || (_d$1 = __template$b(["\n position: relative;\n z-index: 2;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n bottom: -1px;\n border-bottom: 1px solid var(--card-hairline-soft-color);\n }\n"])));
7956
+ const DialogHeader = styled__default.default(Box)(_d$1 || (_d$1 = __template$b(["\n position: relative;\n z-index: 2;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: ", "px;\n right: ", "px;\n bottom: -1px;\n border-bottom: 1px solid var(--card-border-color);\n width: auto;\n opacity: ", ";\n transition: opacity 200ms ease-in;\n }\n"])), BORDER_OFFSET_X, BORDER_OFFSET_X, props => props.$isContentScrollable && props.$hasScrolledFromTop ? 1 : 0);
8020
7957
  const DialogContent = styled__default.default(Box)(_e || (_e = __template$b(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
8021
- const DialogFooter = styled__default.default(Box)(_f || (_f = __template$b(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
7958
+ const DialogFooter = styled__default.default(Box)(_f || (_f = __template$b(["\n position: relative;\n z-index: 3;\n\n &:before {\n content: '';\n display: block;\n position: absolute;\n left: ", "px;\n right: ", "px;\n top: -1px;\n border-top: 1px solid var(--card-border-color);\n width: auto;\n opacity: ", ";\n transition: opacity 200ms ease-in;\n }\n"])), BORDER_OFFSET_X, BORDER_OFFSET_X, props => props.$isContentScrollable && !props.$hasScrolledToBottom ? 1 : 0);
8022
7959
  const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
8023
7960
  var _a2;
8024
7961
  const {
@@ -8053,6 +7990,9 @@ const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
8053
7990
  const labelId = "".concat(id, "_label");
8054
7991
  const showCloseButton = Boolean(onClose) && hideCloseButton === false;
8055
7992
  const showHeader = Boolean(header) || showCloseButton;
7993
+ const [isContentScrollable, setIsContentScrollable] = react.useState(false);
7994
+ const [hasScrolledFromTop, setHasScrolledFromTop] = react.useState(false);
7995
+ const [hasScrolledToBottom, setHasScrolledToBottom] = react.useState(false);
8056
7996
  react.useEffect(() => {
8057
7997
  if (!autoFocus) return;
8058
7998
  if (forwardedRef.current) {
@@ -8087,6 +8027,22 @@ const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
8087
8027
  localContentRef.current = el;
8088
8028
  if (typeof contentRef === "function") contentRef(el);else if (contentRef) contentRef.current = el;
8089
8029
  }, [contentRef]);
8030
+ const handleContentUpdate = react.useCallback(() => {
8031
+ if (localContentRef.current) {
8032
+ setIsContentScrollable(localContentRef.current.clientHeight < localContentRef.current.scrollHeight);
8033
+ setHasScrolledFromTop(localContentRef.current.scrollTop > 0);
8034
+ setHasScrolledToBottom(localContentRef.current.scrollTop >= localContentRef.current.scrollHeight - localContentRef.current.clientHeight);
8035
+ }
8036
+ }, []);
8037
+ react.useEffect(() => {
8038
+ const resizeObserver = new ResizeObserver(handleContentUpdate);
8039
+ if (localContentRef.current) {
8040
+ resizeObserver.observe(localContentRef.current);
8041
+ }
8042
+ return () => {
8043
+ resizeObserver.disconnect();
8044
+ };
8045
+ }, [contentRef, handleContentUpdate]);
8090
8046
  return /* @__PURE__ */jsxRuntime.jsx(DialogContainer, {
8091
8047
  "data-ui": "DialogCard",
8092
8048
  width,
@@ -8098,33 +8054,38 @@ const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
8098
8054
  children: /* @__PURE__ */jsxRuntime.jsxs(DialogLayout, {
8099
8055
  direction: "column",
8100
8056
  children: [showHeader && /* @__PURE__ */jsxRuntime.jsx(DialogHeader, {
8057
+ $isContentScrollable: isContentScrollable,
8058
+ $hasScrolledFromTop: hasScrolledFromTop,
8059
+ padding: 3,
8101
8060
  children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8061
+ align: "center",
8102
8062
  children: [/* @__PURE__ */jsxRuntime.jsx(Box, {
8103
8063
  flex: 1,
8104
- padding: 4,
8064
+ padding: 3,
8105
8065
  children: header && /* @__PURE__ */jsxRuntime.jsx(Text, {
8106
8066
  id: labelId,
8107
- weight: "semibold",
8067
+ size: 1,
8068
+ weight: "medium",
8108
8069
  children: header
8109
8070
  })
8110
- }), showCloseButton && /* @__PURE__ */jsxRuntime.jsx(Box, {
8111
- padding: 2,
8112
- children: /* @__PURE__ */jsxRuntime.jsx(Button, {
8113
- "aria-label": "Close dialog",
8114
- disabled: !onClose,
8115
- icon: icons.CloseIcon,
8116
- mode: "bleed",
8117
- onClick: onClose,
8118
- padding: 3
8119
- })
8071
+ }), showCloseButton && /* @__PURE__ */jsxRuntime.jsx(Button, {
8072
+ "aria-label": "Close dialog",
8073
+ disabled: !onClose,
8074
+ icon: icons.CloseIcon,
8075
+ mode: "bleed",
8076
+ onClick: onClose,
8077
+ padding: 3
8120
8078
  })]
8121
8079
  })
8122
8080
  }), /* @__PURE__ */jsxRuntime.jsx(DialogContent, {
8123
8081
  flex: 1,
8124
8082
  ref: setContentRef,
8125
8083
  tabIndex: -1,
8084
+ onScroll: handleContentUpdate,
8126
8085
  children
8127
8086
  }), footer && /* @__PURE__ */jsxRuntime.jsx(DialogFooter, {
8087
+ $isContentScrollable: isContentScrollable,
8088
+ $hasScrolledToBottom: hasScrolledToBottom,
8128
8089
  children: footer
8129
8090
  })]
8130
8091
  })
@@ -8757,7 +8718,7 @@ function selectableColorStyle(props) {
8757
8718
  selectable
8758
8719
  } = theme.sanity.color;
8759
8720
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
8760
- return styled.css(_b$4 || (_b$4 = __template$7(["\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[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 "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
8721
+ return styled.css(_b$4 || (_b$4 = __template$7(["\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &[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 "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), (_b2 = (_a2 = theme.sanity.styles) == null ? void 0 : _a2.card) == null ? void 0 : _b2.root);
8761
8722
  }
8762
8723
  const Selectable = styled__default.default(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
8763
8724
  function useMenu() {
@@ -8774,7 +8735,7 @@ function MenuGroup(props) {
8774
8735
  const {
8775
8736
  as = "button",
8776
8737
  children,
8777
- fontSize,
8738
+ fontSize = 1,
8778
8739
  icon,
8779
8740
  onClick,
8780
8741
  padding = 3,
@@ -8786,6 +8747,9 @@ function MenuGroup(props) {
8786
8747
  ...restProps
8787
8748
  } = props;
8788
8749
  const menu = useMenu();
8750
+ const {
8751
+ scheme
8752
+ } = useRootTheme();
8789
8753
  const {
8790
8754
  activeElement,
8791
8755
  mount,
@@ -8874,34 +8838,31 @@ function MenuGroup(props) {
8874
8838
  "data-selected": !withinMenu && active ? "" : void 0,
8875
8839
  $radius: useArrayProp(radius),
8876
8840
  $tone: tone,
8841
+ $scheme: scheme,
8877
8842
  onClick: handleClick,
8878
8843
  onKeyDown: handleKeyDown,
8879
8844
  onMouseEnter: handleMouseEnter,
8880
8845
  ref: setRootElement,
8881
8846
  tabIndex: -1,
8882
8847
  type: as === "button" ? "button" : void 0,
8883
- children: /* @__PURE__ */jsxRuntime.jsx(Box, {
8848
+ children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8849
+ gap: space,
8884
8850
  padding,
8885
- children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8886
- children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8851
+ children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8852
+ size: fontSize,
8853
+ children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
8854
+ }), /* @__PURE__ */jsxRuntime.jsx(Box, {
8855
+ flex: 1,
8856
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
8887
8857
  size: fontSize,
8888
- children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
8889
- }), /* @__PURE__ */jsxRuntime.jsx(Box, {
8890
- flex: 1,
8891
- marginLeft: icon ? space : void 0,
8892
- children: /* @__PURE__ */jsxRuntime.jsx(Text, {
8893
- size: fontSize,
8894
- textOverflow: "ellipsis",
8895
- children: text
8896
- })
8897
- }), /* @__PURE__ */jsxRuntime.jsx(Box, {
8898
- marginLeft: space,
8899
- children: /* @__PURE__ */jsxRuntime.jsx(Text, {
8900
- size: fontSize,
8901
- children: /* @__PURE__ */jsxRuntime.jsx(icons.ChevronRightIcon, {})
8902
- })
8903
- })]
8904
- })
8858
+ textOverflow: "ellipsis",
8859
+ weight: "medium",
8860
+ children: text
8861
+ })
8862
+ }), /* @__PURE__ */jsxRuntime.jsx(Text, {
8863
+ size: fontSize,
8864
+ children: /* @__PURE__ */jsxRuntime.jsx(icons.ChevronRightIcon, {})
8865
+ })]
8905
8866
  })
8906
8867
  })
8907
8868
  });
@@ -8911,7 +8872,7 @@ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
8911
8872
  as = "button",
8912
8873
  children,
8913
8874
  disabled,
8914
- fontSize = 2,
8875
+ fontSize = 1,
8915
8876
  hotkeys,
8916
8877
  icon,
8917
8878
  iconRight,
@@ -8931,6 +8892,9 @@ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
8931
8892
  tone = "default",
8932
8893
  ...restProps
8933
8894
  } = props;
8895
+ const {
8896
+ scheme
8897
+ } = useRootTheme();
8934
8898
  const menu = useMenu();
8935
8899
  const {
8936
8900
  activeElement,
@@ -8971,7 +8935,8 @@ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
8971
8935
  forwardedAs: as,
8972
8936
  $radius: useArrayProp(radius),
8973
8937
  $padding: useArrayProp(0),
8974
- $tone: tone,
8938
+ $tone: disabled ? "default" : tone,
8939
+ $scheme: scheme,
8975
8940
  disabled,
8976
8941
  onClick: handleClick,
8977
8942
  onMouseEnter: onItemMouseEnter,
@@ -8980,38 +8945,33 @@ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
8980
8945
  role: "menuitem",
8981
8946
  tabIndex: -1,
8982
8947
  type: as === "button" ? "button" : void 0,
8983
- children: [(icon || text || iconRight) && /* @__PURE__ */jsxRuntime.jsx(Box, {
8948
+ children: [(icon || text || iconRight) && /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8984
8949
  as: "span",
8950
+ gap: space,
8951
+ align: "center",
8985
8952
  ...paddingProps,
8986
- children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8987
- as: "span",
8988
- children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8989
- size: fontSize,
8990
- children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
8991
- }), text && /* @__PURE__ */jsxRuntime.jsx(Box, {
8992
- flex: 1,
8993
- marginLeft: icon ? space : void 0,
8994
- marginRight: iconRight ? space : void 0,
8995
- children: /* @__PURE__ */jsxRuntime.jsx(Text, {
8996
- size: fontSize,
8997
- textOverflow: "ellipsis",
8998
- children: text
8999
- })
9000
- }), hotkeys && /* @__PURE__ */jsxRuntime.jsx(Box, {
9001
- marginLeft: space,
9002
- style: {
9003
- marginTop: -4,
9004
- marginBottom: -4
9005
- },
9006
- children: /* @__PURE__ */jsxRuntime.jsx(Hotkeys, {
9007
- fontSize,
9008
- keys: hotkeys
9009
- })
9010
- }), iconRight && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8953
+ children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8954
+ size: fontSize,
8955
+ children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
8956
+ }), text && /* @__PURE__ */jsxRuntime.jsx(Box, {
8957
+ flex: 1,
8958
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
9011
8959
  size: fontSize,
9012
- children: [react.isValidElement(iconRight) && iconRight, ReactIs.isValidElementType(iconRight) && react.createElement(iconRight)]
9013
- })]
9014
- })
8960
+ textOverflow: "ellipsis",
8961
+ weight: "medium",
8962
+ children: text
8963
+ })
8964
+ }), hotkeys && /* @__PURE__ */jsxRuntime.jsx(Hotkeys, {
8965
+ fontSize,
8966
+ keys: hotkeys,
8967
+ style: {
8968
+ marginTop: -4,
8969
+ marginBottom: -4
8970
+ }
8971
+ }), iconRight && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8972
+ size: fontSize,
8973
+ children: [react.isValidElement(iconRight) && iconRight, ReactIs.isValidElementType(iconRight) && react.createElement(iconRight)]
8974
+ })]
9015
8975
  }), children && /* @__PURE__ */jsxRuntime.jsx(Box, {
9016
8976
  as: "span",
9017
8977
  ...paddingProps,
@@ -10022,6 +9982,7 @@ exports.responsiveTextFont = responsiveTextFont;
10022
9982
  exports.rgbToHex = rgbToHex;
10023
9983
  exports.rgbToHsl = rgbToHsl;
10024
9984
  exports.rgba = rgba;
9985
+ exports.rgbaToRGBA = rgbaToRGBA;
10025
9986
  exports.screen = screen$1;
10026
9987
  exports.studioTheme = studioTheme;
10027
9988
  exports.useArrayProp = useArrayProp;