@sanity/ui 1.0.1 → 1.1.0-beta.1

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.
@@ -1,3 +1,5 @@
1
+ 'use strict';
2
+
1
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21, _templateObject22, _templateObject23, _templateObject24, _templateObject25, _templateObject26, _templateObject27, _templateObject28, _templateObject29, _templateObject30, _templateObject31, _templateObject32, _templateObject33, _templateObject34, _templateObject35, _templateObject36, _templateObject37, _templateObject38, _templateObject39, _templateObject40, _templateObject41, _templateObject42, _templateObject43, _templateObject44, _templateObject45, _templateObject46, _templateObject47, _templateObject48, _templateObject49, _templateObject50, _templateObject51, _templateObject52, _templateObject53, _templateObject54, _templateObject55, _templateObject56, _templateObject57, _templateObject58, _templateObject59, _templateObject60, _templateObject61, _templateObject62, _templateObject63, _templateObject64, _templateObject65, _templateObject66, _templateObject67, _templateObject68, _templateObject69, _templateObject70, _templateObject71, _templateObject72, _templateObject73, _templateObject74, _templateObject75, _templateObject76, _templateObject77, _templateObject78, _templateObject79, _templateObject80, _templateObject81, _templateObject82, _templateObject83, _templateObject84, _templateObject85, _templateObject86, _templateObject87, _templateObject88, _templateObject89, _templateObject90;
2
4
  const _excluded = ["color", "layer"],
3
5
  _excluded2 = ["accent", "align", "children", "muted", "size", "textOverflow", "weight"],
@@ -55,17 +57,30 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
55
57
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
56
58
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
57
59
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
58
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
59
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
60
- import { useMemo, useState, useRef, useEffect, createContext, useContext, useLayoutEffect, forwardRef, useId, useCallback, cloneElement, isValidElement, createElement, Component, memo, useReducer, Children, Fragment as Fragment$1 } from 'react';
61
- import ReactIs, { isElement as isElement$1, isFragment, isValidElementType } from 'react-is';
62
- import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, keyframes } from 'styled-components';
63
- import { white as white$1, black as black$1, hues } from '@sanity/color';
64
- import { SpinnerIcon, CheckmarkIcon, RemoveIcon, SelectIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon } from '@sanity/icons';
65
- import Refractor from 'react-refractor';
66
- import { detectOverflow, flip, offset, shift, arrow, hide, autoUpdate, useFloating } from '@floating-ui/react-dom';
67
- import { createPortal } from 'react-dom';
68
- import { AnimatePresence, motion } from 'framer-motion';
60
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
61
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
62
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
63
+ Object.defineProperty(exports, '__esModule', {
64
+ value: true
65
+ });
66
+ var jsxRuntime = require('react/jsx-runtime');
67
+ var react = require('react');
68
+ var ReactIs = require('react-is');
69
+ var styled = require('styled-components');
70
+ var color$1 = require('@sanity/color');
71
+ var icons = require('@sanity/icons');
72
+ var Refractor = require('react-refractor');
73
+ var reactDom$1 = require('@floating-ui/react-dom');
74
+ var reactDom = require('react-dom');
75
+ var framerMotion = require('framer-motion');
76
+ function _interopDefaultCompat(e) {
77
+ return e && typeof e === 'object' && 'default' in e ? e : {
78
+ default: e
79
+ };
80
+ }
81
+ var ReactIs__default = /*#__PURE__*/_interopDefaultCompat(ReactIs);
82
+ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
83
+ var Refractor__default = /*#__PURE__*/_interopDefaultCompat(Refractor);
69
84
  const EMPTY_ARRAY = [];
70
85
  const EMPTY_RECORD = {};
71
86
  const FLOATING_STATIC_SIDES = {
@@ -221,7 +236,7 @@ function responsiveTextFont(props) {
221
236
  }
222
237
  function useArrayProp(val, defaultVal) {
223
238
  const __perf_hash__ = JSON.stringify(val != null ? val : defaultVal);
224
- return useMemo(() => _getArrayProp(val, defaultVal), [__perf_hash__]);
239
+ return react.useMemo(() => _getArrayProp(val, defaultVal), [__perf_hash__]);
225
240
  }
226
241
  function _getElements(element, elementsArg) {
227
242
  const ret = [element];
@@ -237,10 +252,10 @@ function _getElements(element, elementsArg) {
237
252
  function useClickOutside(listener) {
238
253
  let elementsArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : EMPTY_ARRAY;
239
254
  let boundaryElement = arguments.length > 2 ? arguments[2] : undefined;
240
- const [element, setElement] = useState(null);
241
- const [elements, setElements] = useState(() => _getElements(element, elementsArg));
242
- const elementsRef = useRef(elements);
243
- useEffect(() => {
255
+ const [element, setElement] = react.useState(null);
256
+ const [elements, setElements] = react.useState(() => _getElements(element, elementsArg));
257
+ const elementsRef = react.useRef(elements);
258
+ react.useEffect(() => {
244
259
  const prevElements = elementsRef.current;
245
260
  const nextElements = _getElements(element, elementsArg);
246
261
  if (prevElements.length !== nextElements.length) {
@@ -263,7 +278,7 @@ function useClickOutside(listener) {
263
278
  }
264
279
  }
265
280
  }, [element, elementsArg]);
266
- useEffect(() => {
281
+ react.useEffect(() => {
267
282
  if (!listener) return void 0;
268
283
  const handleWindowMouseDown = evt => {
269
284
  const target = evt.target;
@@ -869,8 +884,8 @@ function _createElementSizeObserver() {
869
884
  };
870
885
  }
871
886
  function useElementSize(element) {
872
- const [size, setSize] = useState(null);
873
- useEffect(() => {
887
+ const [size, setSize] = react.useState(null);
888
+ react.useEffect(() => {
874
889
  if (!element) return void 0;
875
890
  return _elementSizeObserver.subscribe(element, setSize);
876
891
  }, [element]);
@@ -881,7 +896,7 @@ function useElementRect(element) {
881
896
  return (elementSize == null ? void 0 : elementSize._contentRect) || null;
882
897
  }
883
898
  function useGlobalKeyDown(onKeyDown) {
884
- return useEffect(() => {
899
+ return react.useEffect(() => {
885
900
  addEventListener("keydown", onKeyDown);
886
901
  return () => removeEventListener("keydown", onKeyDown);
887
902
  }, [onKeyDown]);
@@ -2208,12 +2223,12 @@ function screen(bg, fg) {
2208
2223
  return hex;
2209
2224
  }
2210
2225
  const tones = {
2211
- default: hues.gray,
2212
- transparent: hues.gray,
2213
- primary: hues.blue,
2214
- positive: hues.green,
2215
- caution: hues.yellow,
2216
- critical: hues.red
2226
+ default: color$1.hues.gray,
2227
+ transparent: color$1.hues.gray,
2228
+ primary: color$1.hues.blue,
2229
+ positive: color$1.hues.green,
2230
+ caution: color$1.hues.yellow,
2231
+ critical: color$1.hues.red
2217
2232
  };
2218
2233
  const NEUTRAL_TONES = ["default", "transparent"];
2219
2234
  const color = createColorTheme({
@@ -2223,13 +2238,13 @@ const color = createColorTheme({
2223
2238
  name
2224
2239
  } = _ref11;
2225
2240
  if (name === "default") {
2226
- const tints2 = hues.gray;
2241
+ const tints2 = color$1.hues.gray;
2227
2242
  const skeletonFrom2 = dark ? tints2[900].hex : tints2[100].hex;
2228
2243
  return {
2229
- fg: dark ? white$1.hex : black$1.hex,
2230
- bg: dark ? black$1.hex : white$1.hex,
2244
+ fg: dark ? color$1.white.hex : color$1.black.hex,
2245
+ bg: dark ? color$1.black.hex : color$1.white.hex,
2231
2246
  border: tints2[dark ? 800 : 200].hex,
2232
- focusRing: hues.blue[dark ? 500 : 500].hex,
2247
+ focusRing: color$1.hues.blue[dark ? 500 : 500].hex,
2233
2248
  shadow: {
2234
2249
  outline: rgba(tints2[500].hex, 0.4),
2235
2250
  umbra: dark ? rgba(tints2[950].hex, 0.4) : rgba(tints2[500].hex, 0.2),
@@ -2249,7 +2264,7 @@ const color = createColorTheme({
2249
2264
  fg: tints2[dark ? 100 : 900].hex,
2250
2265
  bg: tints2[dark ? 950 : 50].hex,
2251
2266
  border: tints2[dark ? 800 : 300].hex,
2252
- focusRing: hues.blue[500].hex,
2267
+ focusRing: color$1.hues.blue[500].hex,
2253
2268
  shadow: {
2254
2269
  outline: rgba(tints2[500].hex, 0.4),
2255
2270
  umbra: dark ? rgba(tints2[900].hex, 0.4) : rgba(tints2[500].hex, 0.2),
@@ -2302,7 +2317,7 @@ const color = createColorTheme({
2302
2317
  bg: bg2,
2303
2318
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2304
2319
  border: mix(base.bg, tints[dark ? 800 : 200].hex),
2305
- fg: mix(base.bg, dark ? black$1.hex : white$1.hex),
2320
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2306
2321
  muted: {
2307
2322
  fg: mix(base.bg, tints[dark ? 950 : 50].hex)
2308
2323
  },
@@ -2329,15 +2344,15 @@ const color = createColorTheme({
2329
2344
  bg: bg2,
2330
2345
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2331
2346
  border: mix(base.bg, tints[dark ? 300 : 600].hex),
2332
- fg: mix(base.bg, dark ? black$1.hex : white$1.hex),
2347
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2333
2348
  muted: {
2334
2349
  fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2335
2350
  },
2336
2351
  accent: {
2337
- fg: mix2(bg2, hues.red[dark ? 800 : 200].hex)
2352
+ fg: mix2(bg2, color$1.hues.red[dark ? 800 : 200].hex)
2338
2353
  },
2339
2354
  link: {
2340
- fg: mix2(bg2, hues.blue[dark ? 800 : 200].hex)
2355
+ fg: mix2(bg2, color$1.hues.blue[dark ? 800 : 200].hex)
2341
2356
  },
2342
2357
  code: {
2343
2358
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
@@ -2356,15 +2371,15 @@ const color = createColorTheme({
2356
2371
  bg: mix(base.bg, tints[dark ? 200 : 800].hex),
2357
2372
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2358
2373
  border: mix(base.bg, tints[dark ? 200 : 800].hex),
2359
- fg: mix(base.bg, dark ? black$1.hex : white$1.hex),
2374
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2360
2375
  muted: {
2361
2376
  fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2362
2377
  },
2363
2378
  accent: {
2364
- fg: mix2(bg2, hues.red[dark ? 800 : 200].hex)
2379
+ fg: mix2(bg2, color$1.hues.red[dark ? 800 : 200].hex)
2365
2380
  },
2366
2381
  link: {
2367
- fg: mix2(bg2, hues.blue[dark ? 800 : 200].hex)
2382
+ fg: mix2(bg2, color$1.hues.blue[dark ? 800 : 200].hex)
2368
2383
  },
2369
2384
  code: {
2370
2385
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
@@ -2386,15 +2401,15 @@ const color = createColorTheme({
2386
2401
  bg: bg2,
2387
2402
  bg2: mix2(bg2, tints[dark ? 50 : 950].hex),
2388
2403
  border: mix(base.bg, tints[dark ? 200 : 800].hex),
2389
- fg: mix(base.bg, dark ? black$1.hex : white$1.hex),
2404
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2390
2405
  muted: {
2391
2406
  fg: mix(base.bg, tints[dark ? 800 : 200].hex)
2392
2407
  },
2393
2408
  accent: {
2394
- fg: mix2(bg2, hues.red[dark ? 800 : 200].hex)
2409
+ fg: mix2(bg2, color$1.hues.red[dark ? 800 : 200].hex)
2395
2410
  },
2396
2411
  link: {
2397
- fg: mix2(bg2, hues.blue[dark ? 800 : 200].hex)
2412
+ fg: mix2(bg2, color$1.hues.blue[dark ? 800 : 200].hex)
2398
2413
  },
2399
2414
  code: {
2400
2415
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
@@ -2412,15 +2427,15 @@ const color = createColorTheme({
2412
2427
  bg,
2413
2428
  bg2: mix2(bg, tints[dark ? 50 : 950].hex),
2414
2429
  border: mix(base.bg, tints[dark ? 400 : 500].hex),
2415
- fg: mix(base.bg, dark ? black$1.hex : white$1.hex),
2430
+ fg: mix(base.bg, dark ? color$1.black.hex : color$1.white.hex),
2416
2431
  muted: {
2417
2432
  fg: mix(base.bg, tints[dark ? 900 : 100].hex)
2418
2433
  },
2419
2434
  accent: {
2420
- fg: mix2(bg, hues.red[dark ? 900 : 100].hex)
2435
+ fg: mix2(bg, color$1.hues.red[dark ? 900 : 100].hex)
2421
2436
  },
2422
2437
  link: {
2423
- fg: mix2(bg, hues.blue[dark ? 900 : 100].hex)
2438
+ fg: mix2(bg, color$1.hues.blue[dark ? 900 : 100].hex)
2424
2439
  },
2425
2440
  code: {
2426
2441
  bg: mix(bg, tints[dark ? 950 : 50].hex),
@@ -2484,10 +2499,10 @@ const color = createColorTheme({
2484
2499
  fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2485
2500
  },
2486
2501
  accent: {
2487
- fg: mix(base.bg, hues.red[dark ? 400 : 500].hex)
2502
+ fg: mix(base.bg, color$1.hues.red[dark ? 400 : 500].hex)
2488
2503
  },
2489
2504
  link: {
2490
- fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex)
2505
+ fg: mix(base.bg, color$1.hues.blue[dark ? 400 : 600].hex)
2491
2506
  },
2492
2507
  code: {
2493
2508
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
@@ -2514,10 +2529,10 @@ const color = createColorTheme({
2514
2529
  fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2515
2530
  },
2516
2531
  accent: {
2517
- fg: mix(bg2, hues.red[dark ? 400 : 500].hex)
2532
+ fg: mix(bg2, color$1.hues.red[dark ? 400 : 500].hex)
2518
2533
  },
2519
2534
  link: {
2520
- fg: mix(bg2, hues.blue[dark ? 400 : 600].hex)
2535
+ fg: mix(bg2, color$1.hues.blue[dark ? 400 : 600].hex)
2521
2536
  },
2522
2537
  code: {
2523
2538
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
@@ -2544,10 +2559,10 @@ const color = createColorTheme({
2544
2559
  fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2545
2560
  },
2546
2561
  accent: {
2547
- fg: mix(bg2, hues.red[dark ? 400 : 500].hex)
2562
+ fg: mix(bg2, color$1.hues.red[dark ? 400 : 500].hex)
2548
2563
  },
2549
2564
  link: {
2550
- fg: mix(bg2, hues.blue[dark ? 400 : 600].hex)
2565
+ fg: mix(bg2, color$1.hues.blue[dark ? 400 : 600].hex)
2551
2566
  },
2552
2567
  code: {
2553
2568
  bg: mix(bg2, tints[dark ? 950 : 50].hex),
@@ -2570,10 +2585,10 @@ const color = createColorTheme({
2570
2585
  fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2571
2586
  },
2572
2587
  accent: {
2573
- fg: mix(base.bg, hues.red[dark ? 400 : 500].hex)
2588
+ fg: mix(base.bg, color$1.hues.red[dark ? 400 : 500].hex)
2574
2589
  },
2575
2590
  link: {
2576
- fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex)
2591
+ fg: mix(base.bg, color$1.hues.blue[dark ? 400 : 600].hex)
2577
2592
  },
2578
2593
  code: {
2579
2594
  bg: mix(base.bg, tints[dark ? 950 : 50].hex),
@@ -2662,10 +2677,10 @@ const color = createColorTheme({
2662
2677
  fg: mix(base.bg, tints[dark ? 400 : 600].hex)
2663
2678
  },
2664
2679
  accent: {
2665
- fg: mix(base.bg, hues.red[dark ? 400 : 500].hex)
2680
+ fg: mix(base.bg, color$1.hues.red[dark ? 400 : 500].hex)
2666
2681
  },
2667
2682
  link: {
2668
- fg: mix(base.bg, hues.blue[dark ? 400 : 600].hex)
2683
+ fg: mix(base.bg, color$1.hues.blue[dark ? 400 : 600].hex)
2669
2684
  },
2670
2685
  code: {
2671
2686
  bg: mix(base.bg, tints[dark ? 950 : 50].hex),
@@ -2698,31 +2713,31 @@ const color = createColorTheme({
2698
2713
  return {
2699
2714
  bg: base.bg,
2700
2715
  fg: base.fg,
2701
- border: mix(base.bg, hues.gray[dark ? 700 : 300].hex),
2702
- placeholder: mix(base.bg, hues.gray[dark ? 600 : 400].hex)
2716
+ border: mix(base.bg, color$1.hues.gray[dark ? 700 : 300].hex),
2717
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 600 : 400].hex)
2703
2718
  };
2704
2719
  }
2705
2720
  if (state === "disabled") {
2706
2721
  return {
2707
- bg: mix(base.bg, hues.gray[dark ? 950 : 50].hex),
2708
- fg: mix(base.bg, hues.gray[dark ? 700 : 300].hex),
2709
- border: mix(base.bg, hues.gray[dark ? 900 : 100].hex),
2710
- placeholder: mix(base.bg, hues.gray[dark ? 800 : 200].hex)
2722
+ bg: mix(base.bg, color$1.hues.gray[dark ? 950 : 50].hex),
2723
+ fg: mix(base.bg, color$1.hues.gray[dark ? 700 : 300].hex),
2724
+ border: mix(base.bg, color$1.hues.gray[dark ? 900 : 100].hex),
2725
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 800 : 200].hex)
2711
2726
  };
2712
2727
  }
2713
2728
  if (state === "readOnly") {
2714
2729
  return {
2715
- bg: mix(base.bg, hues.gray[dark ? 950 : 50].hex),
2716
- fg: mix(base.bg, hues.gray[dark ? 200 : 800].hex),
2717
- border: mix(base.bg, hues.gray[dark ? 800 : 200].hex),
2718
- placeholder: mix(base.bg, hues.gray[dark ? 600 : 400].hex)
2730
+ bg: mix(base.bg, color$1.hues.gray[dark ? 950 : 50].hex),
2731
+ fg: mix(base.bg, color$1.hues.gray[dark ? 200 : 800].hex),
2732
+ border: mix(base.bg, color$1.hues.gray[dark ? 800 : 200].hex),
2733
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 600 : 400].hex)
2719
2734
  };
2720
2735
  }
2721
2736
  return {
2722
2737
  bg: base.bg,
2723
2738
  fg: base.fg,
2724
2739
  border: base.border,
2725
- placeholder: mix(base.bg, hues.gray[dark ? 600 : 400].hex)
2740
+ placeholder: mix(base.bg, color$1.hues.gray[dark ? 600 : 400].hex)
2726
2741
  };
2727
2742
  },
2728
2743
  selectable: _ref17 => {
@@ -2764,7 +2779,7 @@ const color = createColorTheme({
2764
2779
  key
2765
2780
  } = _ref18;
2766
2781
  const mix = dark ? screen : multiply;
2767
- return mix(base.bg, hues[key][dark ? 400 : 500].hex);
2782
+ return mix(base.bg, color$1.hues[key][dark ? 400 : 500].hex);
2768
2783
  },
2769
2784
  syntax: _ref19 => {
2770
2785
  let {
@@ -2775,42 +2790,42 @@ const color = createColorTheme({
2775
2790
  const mainShade = dark ? 400 : 600;
2776
2791
  const secondaryShade = dark ? 600 : 400;
2777
2792
  return {
2778
- atrule: mix(base.bg, hues.purple[mainShade].hex),
2779
- attrName: mix(base.bg, hues.green[mainShade].hex),
2780
- attrValue: mix(base.bg, hues.yellow[mainShade].hex),
2781
- attribute: mix(base.bg, hues.yellow[mainShade].hex),
2782
- boolean: mix(base.bg, hues.purple[mainShade].hex),
2783
- builtin: mix(base.bg, hues.purple[mainShade].hex),
2784
- cdata: mix(base.bg, hues.yellow[mainShade].hex),
2785
- char: mix(base.bg, hues.yellow[mainShade].hex),
2786
- class: mix(base.bg, hues.orange[mainShade].hex),
2787
- className: mix(base.bg, hues.cyan[mainShade].hex),
2788
- comment: mix(base.bg, hues.gray[secondaryShade].hex),
2789
- constant: mix(base.bg, hues.purple[mainShade].hex),
2790
- deleted: mix(base.bg, hues.red[mainShade].hex),
2791
- doctype: mix(base.bg, hues.gray[secondaryShade].hex),
2792
- entity: mix(base.bg, hues.red[mainShade].hex),
2793
- function: mix(base.bg, hues.green[mainShade].hex),
2794
- hexcode: mix(base.bg, hues.blue[mainShade].hex),
2795
- id: mix(base.bg, hues.purple[mainShade].hex),
2796
- important: mix(base.bg, hues.purple[mainShade].hex),
2797
- inserted: mix(base.bg, hues.yellow[mainShade].hex),
2798
- keyword: mix(base.bg, hues.magenta[mainShade].hex),
2799
- number: mix(base.bg, hues.purple[mainShade].hex),
2800
- operator: mix(base.bg, hues.magenta[mainShade].hex),
2801
- prolog: mix(base.bg, hues.gray[secondaryShade].hex),
2802
- property: mix(base.bg, hues.blue[mainShade].hex),
2803
- pseudoClass: mix(base.bg, hues.yellow[mainShade].hex),
2804
- pseudoElement: mix(base.bg, hues.yellow[mainShade].hex),
2805
- punctuation: mix(base.bg, hues.gray[mainShade].hex),
2806
- regex: mix(base.bg, hues.blue[mainShade].hex),
2807
- selector: mix(base.bg, hues.red[mainShade].hex),
2808
- string: mix(base.bg, hues.yellow[mainShade].hex),
2809
- symbol: mix(base.bg, hues.purple[mainShade].hex),
2810
- tag: mix(base.bg, hues.red[mainShade].hex),
2811
- unit: mix(base.bg, hues.orange[mainShade].hex),
2812
- url: mix(base.bg, hues.red[mainShade].hex),
2813
- variable: mix(base.bg, hues.red[mainShade].hex)
2793
+ atrule: mix(base.bg, color$1.hues.purple[mainShade].hex),
2794
+ attrName: mix(base.bg, color$1.hues.green[mainShade].hex),
2795
+ attrValue: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2796
+ attribute: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2797
+ boolean: mix(base.bg, color$1.hues.purple[mainShade].hex),
2798
+ builtin: mix(base.bg, color$1.hues.purple[mainShade].hex),
2799
+ cdata: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2800
+ char: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2801
+ class: mix(base.bg, color$1.hues.orange[mainShade].hex),
2802
+ className: mix(base.bg, color$1.hues.cyan[mainShade].hex),
2803
+ comment: mix(base.bg, color$1.hues.gray[secondaryShade].hex),
2804
+ constant: mix(base.bg, color$1.hues.purple[mainShade].hex),
2805
+ deleted: mix(base.bg, color$1.hues.red[mainShade].hex),
2806
+ doctype: mix(base.bg, color$1.hues.gray[secondaryShade].hex),
2807
+ entity: mix(base.bg, color$1.hues.red[mainShade].hex),
2808
+ function: mix(base.bg, color$1.hues.green[mainShade].hex),
2809
+ hexcode: mix(base.bg, color$1.hues.blue[mainShade].hex),
2810
+ id: mix(base.bg, color$1.hues.purple[mainShade].hex),
2811
+ important: mix(base.bg, color$1.hues.purple[mainShade].hex),
2812
+ inserted: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2813
+ keyword: mix(base.bg, color$1.hues.magenta[mainShade].hex),
2814
+ number: mix(base.bg, color$1.hues.purple[mainShade].hex),
2815
+ operator: mix(base.bg, color$1.hues.magenta[mainShade].hex),
2816
+ prolog: mix(base.bg, color$1.hues.gray[secondaryShade].hex),
2817
+ property: mix(base.bg, color$1.hues.blue[mainShade].hex),
2818
+ pseudoClass: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2819
+ pseudoElement: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2820
+ punctuation: mix(base.bg, color$1.hues.gray[mainShade].hex),
2821
+ regex: mix(base.bg, color$1.hues.blue[mainShade].hex),
2822
+ selector: mix(base.bg, color$1.hues.red[mainShade].hex),
2823
+ string: mix(base.bg, color$1.hues.yellow[mainShade].hex),
2824
+ symbol: mix(base.bg, color$1.hues.purple[mainShade].hex),
2825
+ tag: mix(base.bg, color$1.hues.red[mainShade].hex),
2826
+ unit: mix(base.bg, color$1.hues.orange[mainShade].hex),
2827
+ url: mix(base.bg, color$1.hues.red[mainShade].hex),
2828
+ variable: mix(base.bg, color$1.hues.red[mainShade].hex)
2814
2829
  };
2815
2830
  }
2816
2831
  });
@@ -3090,17 +3105,17 @@ function getGlobalScope() {
3090
3105
  }
3091
3106
  const globalScope = getGlobalScope();
3092
3107
  const key$7 = Symbol.for("@sanity/ui/context/theme");
3093
- globalScope[key$7] = globalScope[key$7] || createContext(null);
3108
+ globalScope[key$7] = globalScope[key$7] || react.createContext(null);
3094
3109
  const ThemeContext = globalScope[key$7];
3095
3110
  function ThemeProvider(props) {
3096
- const parentTheme = useContext(ThemeContext);
3111
+ const parentTheme = react.useContext(ThemeContext);
3097
3112
  const {
3098
3113
  children,
3099
3114
  scheme = (parentTheme == null ? void 0 : parentTheme.scheme) || "light",
3100
3115
  theme: themeProp = (parentTheme == null ? void 0 : parentTheme.theme) || null,
3101
3116
  tone = (parentTheme == null ? void 0 : parentTheme.tone) || "default"
3102
3117
  } = props;
3103
- const theme = useMemo(() => {
3118
+ const theme = react.useMemo(() => {
3104
3119
  if (!themeProp) return null;
3105
3120
  const {
3106
3121
  color: rootColor,
@@ -3117,20 +3132,20 @@ function ThemeProvider(props) {
3117
3132
  })
3118
3133
  };
3119
3134
  }, [scheme, themeProp, tone]);
3120
- const value = useMemo(() => themeProp && {
3135
+ const value = react.useMemo(() => themeProp && {
3121
3136
  version: 0,
3122
3137
  theme: themeProp,
3123
3138
  scheme,
3124
3139
  tone
3125
3140
  }, [themeProp, scheme, tone]);
3126
3141
  if (!theme) {
3127
- return /* @__PURE__ */jsx("pre", {
3142
+ return /* @__PURE__ */jsxRuntime.jsx("pre", {
3128
3143
  children: 'ThemeProvider: no "theme" property provided'
3129
3144
  });
3130
3145
  }
3131
- return /* @__PURE__ */jsx(ThemeContext.Provider, {
3146
+ return /* @__PURE__ */jsxRuntime.jsx(ThemeContext.Provider, {
3132
3147
  value,
3133
- children: /* @__PURE__ */jsx(ThemeProvider$1, {
3148
+ children: /* @__PURE__ */jsxRuntime.jsx(styled.ThemeProvider, {
3134
3149
  theme,
3135
3150
  children
3136
3151
  })
@@ -3140,7 +3155,7 @@ function isRecord(value) {
3140
3155
  return Boolean(value && typeof value === "object");
3141
3156
  }
3142
3157
  function useRootTheme() {
3143
- const value = useContext(ThemeContext);
3158
+ const value = react.useContext(ThemeContext);
3144
3159
  if (!value) {
3145
3160
  throw new Error("useRootTheme(): missing context value");
3146
3161
  }
@@ -3156,7 +3171,7 @@ function ThemeColorProvider(props) {
3156
3171
  tone
3157
3172
  } = props;
3158
3173
  const root = useRootTheme();
3159
- return /* @__PURE__ */jsx(ThemeProvider, {
3174
+ return /* @__PURE__ */jsxRuntime.jsx(ThemeProvider, {
3160
3175
  scheme: scheme || root.scheme,
3161
3176
  theme: root.theme,
3162
3177
  tone,
@@ -3164,7 +3179,7 @@ function ThemeColorProvider(props) {
3164
3179
  });
3165
3180
  }
3166
3181
  function useTheme() {
3167
- return useTheme$1();
3182
+ return styled.useTheme();
3168
3183
  }
3169
3184
  const MEDIA_MANAGER_CACHE = /* @__PURE__ */new WeakMap();
3170
3185
  function _getMediaQuery(media, index) {
@@ -3243,18 +3258,18 @@ function useMediaIndex() {
3243
3258
  const {
3244
3259
  media
3245
3260
  } = theme.sanity;
3246
- const manager = useMemo(() => _getMediaManager(media), [media]);
3247
- const [index, setIndex] = useState(manager.getCurrentIndex);
3248
- useEffect(() => manager.subscribe(setIndex), [manager]);
3261
+ const manager = react.useMemo(() => _getMediaManager(media), [media]);
3262
+ const [index, setIndex] = react.useState(manager.getCurrentIndex);
3263
+ react.useEffect(() => manager.subscribe(setIndex), [manager]);
3249
3264
  return index;
3250
3265
  }
3251
3266
  function usePrefersDark() {
3252
- const mq = useMemo(() => {
3267
+ const mq = react.useMemo(() => {
3253
3268
  if (typeof window === "undefined") return void 0;
3254
3269
  return window.matchMedia("(prefers-color-scheme: dark)");
3255
3270
  }, []);
3256
- const [dark, setDark] = useState((mq == null ? void 0 : mq.matches) || false);
3257
- useEffect(() => {
3271
+ const [dark, setDark] = react.useState((mq == null ? void 0 : mq.matches) || false);
3272
+ react.useEffect(() => {
3258
3273
  if (!mq) return void 0;
3259
3274
  setDark(mq.matches);
3260
3275
  const handleChange = () => setDark(mq.matches);
@@ -3263,9 +3278,9 @@ function usePrefersDark() {
3263
3278
  }, [mq]);
3264
3279
  return dark;
3265
3280
  }
3266
- const useIsomorphicEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
3281
+ const useIsomorphicEffect = typeof window !== "undefined" ? react.useLayoutEffect : react.useEffect;
3267
3282
  function useForwardedRef(ref) {
3268
- const innerRef = useRef(null);
3283
+ const innerRef = react.useRef(null);
3269
3284
  useIsomorphicEffect(() => {
3270
3285
  if (!ref) return;
3271
3286
  if (typeof ref === "function") {
@@ -3277,7 +3292,7 @@ function useForwardedRef(ref) {
3277
3292
  return innerRef;
3278
3293
  }
3279
3294
  function useCustomValidity(ref, customValidity) {
3280
- useEffect(() => {
3295
+ react.useEffect(() => {
3281
3296
  if (ref.current) {
3282
3297
  ref.current.setCustomValidity(customValidity || "");
3283
3298
  }
@@ -3791,7 +3806,7 @@ function responsiveInputPaddingIconRightStyle(props) {
3791
3806
  $iconRight: true
3792
3807
  }));
3793
3808
  }
3794
- const ROOT_STYLE = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
3809
+ const ROOT_STYLE = styled.css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n\n align-items: center;\n"])));
3795
3810
  function textInputRootStyle() {
3796
3811
  return ROOT_STYLE;
3797
3812
  }
@@ -3804,7 +3819,7 @@ function textInputBaseStyle(props) {
3804
3819
  } = props;
3805
3820
  const font = theme.sanity.fonts.text;
3806
3821
  const color = theme.sanity.color.input;
3807
- return css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $scheme, $tone, color.default.enabled.fg, color.default.enabled.placeholder, color.default.enabled.fg, color.default.enabled.placeholder, color.default.disabled.fg, color.default.disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color.default.readOnly.fg, color.default.readOnly.placeholder);
3822
+ return styled.css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n appearance: none;\n background: none;\n border: 0;\n border-radius: 0;\n outline: none;\n width: 100%;\n box-sizing: border-box;\n font-family: ", ";\n font-weight: ", ";\n margin: 0;\n position: relative;\n z-index: 1;\n display: block;\n\n /* NOTE: This is a hack to disable Chrome\u2019s autofill styles */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-text-fill-color: var(--input-fg-color) !important;\n transition: background-color 5000s;\n transition-delay: 86400s /* 24h */;\n }\n\n /* &:is(textarea) */\n &[data-as='textarea'] {\n resize: none;\n }\n\n color: var(--input-fg-color);\n\n &::placeholder {\n color: var(--input-placeholder-color);\n }\n\n &[data-scheme='", "'][data-tone='", "'] {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n\n /* enabled */\n &:not(:invalid):not(:disabled):not(:read-only) {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* disabled */\n &:not(:invalid):disabled {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* invalid */\n &:invalid {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n\n /* readOnly */\n &:read-only {\n --input-fg-color: ", ";\n --input-placeholder-color: ", ";\n }\n }\n "])), font.family, $weight && font.weights[$weight] || font.weights.regular, $scheme, $tone, color.default.enabled.fg, color.default.enabled.placeholder, color.default.enabled.fg, color.default.enabled.placeholder, color.default.disabled.fg, color.default.disabled.placeholder, color.invalid.enabled.fg, color.invalid.enabled.placeholder, color.default.readOnly.fg, color.default.readOnly.placeholder);
3808
3823
  }
3809
3824
  function textInputFontSizeStyle(props) {
3810
3825
  const {
@@ -3835,7 +3850,7 @@ function textInputRepresentationStyle(props) {
3835
3850
  input
3836
3851
  } = theme.sanity;
3837
3852
  const color = theme.sanity.color.input;
3838
- return css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
3853
+ return styled.css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n --input-box-shadow: none;\n\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: block;\n pointer-events: none;\n z-index: 0;\n\n background-color: var(--card-bg-color);\n box-shadow: var(--input-box-shadow);\n\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n\n &[data-scheme='", "'][data-tone='", "'] {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n /* enabled */\n *:not(:disabled) + &[data-border] {\n --input-box-shadow: ", ";\n }\n\n /* invalid */\n *:not(:disabled):invalid + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* focused */\n *:not(:disabled):focus + & {\n &[data-border] {\n --input-box-shadow: ", ";\n }\n\n &:not([data-border]) {\n --input-box-shadow: ", ";\n }\n }\n\n /* disabled */\n *:disabled + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n\n &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n\n /* readOnly */\n *:read-only + & {\n --card-bg-color: ", " !important;\n --card-fg-color: ", " !important;\n }\n\n /* hovered */\n @media (hover: hover) {\n *:not(:disabled):not(:read-only):not(:invalid):hover + & {\n --card-bg-color: ", ";\n --card-fg-color: ", ";\n }\n\n *:not(:disabled):not(:read-only):not(:invalid):not(:focus):hover + &[data-border] {\n --input-box-shadow: ", ";\n }\n }\n }\n "])), $hasPrefix ? 0 : void 0, $hasPrefix ? 0 : void 0, $hasSuffix ? 0 : void 0, $hasSuffix ? 0 : void 0, $scheme, $tone, color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
3839
3854
  color: color.default.enabled.border,
3840
3855
  width: input.border.width
3841
3856
  }), color.invalid.enabled.bg, color.invalid.enabled.fg, focusRingBorderStyle({
@@ -3913,11 +3928,11 @@ function textBaseStyle(props) {
3913
3928
  const {
3914
3929
  weights
3915
3930
  } = theme.sanity.fonts.text;
3916
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family, weights.bold);
3931
+ return styled.css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: var(--card-fg-color);\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n background-color: var(--card-code-bg-color);\n color: var(--card-code-fg-color);\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & strong {\n font-weight: ", ";\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && styled.css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family, weights.bold);
3917
3932
  }
3918
- const Root$E = styled.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
3919
- const SpanWithTextOverflow$2 = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
3920
- const Text = forwardRef(function Text2(props, ref) {
3933
+ const Root$E = styled__default.default.div(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle);
3934
+ const SpanWithTextOverflow$2 = styled__default.default.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
3935
+ const Text = react.forwardRef(function Text2(props, ref) {
3921
3936
  const {
3922
3937
  accent = false,
3923
3938
  align,
@@ -3930,11 +3945,11 @@ const Text = forwardRef(function Text2(props, ref) {
3930
3945
  restProps = _objectWithoutProperties(props, _excluded2);
3931
3946
  let children = childrenProp;
3932
3947
  if (textOverflow === "ellipsis") {
3933
- children = /* @__PURE__ */jsx(SpanWithTextOverflow$2, {
3948
+ children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$2, {
3934
3949
  children
3935
3950
  });
3936
3951
  }
3937
- return /* @__PURE__ */jsx(Root$E, _objectSpread(_objectSpread({
3952
+ return /* @__PURE__ */jsxRuntime.jsx(Root$E, _objectSpread(_objectSpread({
3938
3953
  "data-ui": "Text"
3939
3954
  }, restProps), {}, {
3940
3955
  $accent: accent,
@@ -3943,7 +3958,7 @@ const Text = forwardRef(function Text2(props, ref) {
3943
3958
  ref,
3944
3959
  $size: useArrayProp(size),
3945
3960
  $weight: weight,
3946
- children: /* @__PURE__ */jsx("span", {
3961
+ children: /* @__PURE__ */jsxRuntime.jsx("span", {
3947
3962
  children
3948
3963
  })
3949
3964
  }));
@@ -4092,12 +4107,12 @@ function avatarStrokeStyle() {
4092
4107
  }
4093
4108
  };
4094
4109
  }
4095
- const Root$D = styled.div(responsiveAvatarSizeStyle, avatarStyle.root);
4096
- const Arrow = styled.div(avatarStyle.arrow);
4097
- const BgStroke = styled.ellipse(avatarStyle.bgStroke);
4098
- const Stroke = styled.ellipse(avatarStyle.stroke);
4099
- const Initials = styled.div(avatarStyle.initials);
4100
- const Avatar = forwardRef(function Avatar2(props, ref) {
4110
+ const Root$D = styled__default.default.div(responsiveAvatarSizeStyle, avatarStyle.root);
4111
+ const Arrow = styled__default.default.div(avatarStyle.arrow);
4112
+ const BgStroke = styled__default.default.ellipse(avatarStyle.bgStroke);
4113
+ const Stroke = styled__default.default.ellipse(avatarStyle.stroke);
4114
+ const Initials = styled__default.default.div(avatarStyle.initials);
4115
+ const Avatar = react.forwardRef(function Avatar2(props, ref) {
4101
4116
  const {
4102
4117
  as: asProp,
4103
4118
  color: colorKey = "gray",
@@ -4111,33 +4126,33 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4111
4126
  size: sizeProp = 0
4112
4127
  } = props,
4113
4128
  restProps = _objectWithoutProperties(props, _excluded3);
4114
- const as = ReactIs.isValidElementType(asProp) ? asProp : "div";
4129
+ const as = ReactIs__default.default.isValidElementType(asProp) ? asProp : "div";
4115
4130
  const size = useArrayProp(sizeProp);
4116
4131
  const theme = useTheme();
4117
4132
  const color = theme.sanity.color.spot[colorKey] || theme.sanity.color.spot.gray;
4118
4133
  const avatarSize = theme.sanity.avatar.sizes[size[0]] || theme.sanity.avatar.sizes[0];
4119
4134
  const _sizeRem = avatarSize.size;
4120
4135
  const _radius = _sizeRem / 2;
4121
- const elementId = useId();
4122
- const [arrowPosition, setArrowPosition] = useState(animateArrowFrom || arrowPositionProp || "inside");
4123
- const [imageFailed, setImageFailed] = useState(false);
4136
+ const elementId = react.useId();
4137
+ const [arrowPosition, setArrowPosition] = react.useState(animateArrowFrom || arrowPositionProp || "inside");
4138
+ const [imageFailed, setImageFailed] = react.useState(false);
4124
4139
  const imageId = "avatar-image-".concat(elementId);
4125
- useEffect(() => {
4140
+ react.useEffect(() => {
4126
4141
  if (arrowPosition === arrowPositionProp) return void 0;
4127
4142
  const raf = requestAnimationFrame(() => setArrowPosition(arrowPositionProp));
4128
4143
  return () => cancelAnimationFrame(raf);
4129
4144
  }, [arrowPosition, arrowPositionProp]);
4130
- useEffect(() => {
4145
+ react.useEffect(() => {
4131
4146
  if (src) setImageFailed(false);
4132
4147
  }, [src]);
4133
- const handleImageError = useCallback(() => {
4148
+ const handleImageError = react.useCallback(() => {
4134
4149
  setImageFailed(true);
4135
4150
  if (onImageLoadError) {
4136
4151
  onImageLoadError(new Error("Avatar: the image failed to load"));
4137
4152
  }
4138
4153
  }, [onImageLoadError]);
4139
- const initialsSize = useMemo(() => size.map(s => s === 0 ? 0 : s + 1), [size]);
4140
- return /* @__PURE__ */jsxs(Root$D, _objectSpread(_objectSpread({
4154
+ const initialsSize = react.useMemo(() => size.map(s => s === 0 ? 0 : s + 1), [size]);
4155
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$D, _objectSpread(_objectSpread({
4141
4156
  as,
4142
4157
  "data-as": typeof as === "string" ? as : void 0,
4143
4158
  "data-ui": "Avatar"
@@ -4149,45 +4164,45 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4149
4164
  "data-status": status,
4150
4165
  ref,
4151
4166
  title,
4152
- children: [/* @__PURE__ */jsx(Arrow, {
4153
- children: /* @__PURE__ */jsx("svg", {
4167
+ children: [/* @__PURE__ */jsxRuntime.jsx(Arrow, {
4168
+ children: /* @__PURE__ */jsxRuntime.jsx("svg", {
4154
4169
  width: "11",
4155
4170
  height: "7",
4156
4171
  viewBox: "0 0 11 7",
4157
4172
  fill: "none",
4158
- children: /* @__PURE__ */jsx("path", {
4173
+ children: /* @__PURE__ */jsxRuntime.jsx("path", {
4159
4174
  d: "M6.67948 1.50115L11 7L0 7L4.32052 1.50115C4.92109 0.736796 6.07891 0.736795 6.67948 1.50115Z",
4160
4175
  fill: color
4161
4176
  })
4162
4177
  })
4163
- }), !imageFailed && src && /* @__PURE__ */jsxs("svg", {
4178
+ }), !imageFailed && src && /* @__PURE__ */jsxRuntime.jsxs("svg", {
4164
4179
  viewBox: "0 0 ".concat(_sizeRem, " ").concat(_sizeRem),
4165
4180
  fill: "none",
4166
- children: [/* @__PURE__ */jsx("defs", {
4167
- children: /* @__PURE__ */jsx("pattern", {
4181
+ children: [/* @__PURE__ */jsxRuntime.jsx("defs", {
4182
+ children: /* @__PURE__ */jsxRuntime.jsx("pattern", {
4168
4183
  id: imageId,
4169
4184
  patternContentUnits: "objectBoundingBox",
4170
4185
  width: "1",
4171
4186
  height: "1",
4172
- children: /* @__PURE__ */jsx("image", {
4187
+ children: /* @__PURE__ */jsxRuntime.jsx("image", {
4173
4188
  href: src,
4174
4189
  width: "1",
4175
4190
  height: "1",
4176
4191
  onError: handleImageError
4177
4192
  })
4178
4193
  })
4179
- }), /* @__PURE__ */jsx("circle", {
4194
+ }), /* @__PURE__ */jsxRuntime.jsx("circle", {
4180
4195
  cx: _radius,
4181
4196
  cy: _radius,
4182
4197
  r: _radius,
4183
4198
  fill: "url(#".concat(imageId, ")")
4184
- }), /* @__PURE__ */jsx(BgStroke, {
4199
+ }), /* @__PURE__ */jsxRuntime.jsx(BgStroke, {
4185
4200
  cx: _radius,
4186
4201
  cy: _radius,
4187
4202
  rx: _radius,
4188
4203
  ry: _radius,
4189
4204
  vectorEffect: "non-scaling-stroke"
4190
- }), /* @__PURE__ */jsx(Stroke, {
4205
+ }), /* @__PURE__ */jsxRuntime.jsx(Stroke, {
4191
4206
  cx: _radius,
4192
4207
  cy: _radius,
4193
4208
  rx: _radius,
@@ -4195,12 +4210,12 @@ const Avatar = forwardRef(function Avatar2(props, ref) {
4195
4210
  stroke: color,
4196
4211
  vectorEffect: "non-scaling-stroke"
4197
4212
  })]
4198
- }), (imageFailed || !src) && initials && /* @__PURE__ */jsx(Fragment, {
4199
- children: /* @__PURE__ */jsx(Initials, {
4200
- children: /* @__PURE__ */jsx(Text, {
4213
+ }), (imageFailed || !src) && initials && /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {
4214
+ children: /* @__PURE__ */jsxRuntime.jsx(Initials, {
4215
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
4201
4216
  as: "span",
4202
4217
  size: initialsSize,
4203
- children: /* @__PURE__ */jsx("strong", {
4218
+ children: /* @__PURE__ */jsxRuntime.jsx("strong", {
4204
4219
  children: initials
4205
4220
  })
4206
4221
  })
@@ -4230,24 +4245,24 @@ function _avatarCounterBaseStyle(props) {
4230
4245
  const {
4231
4246
  theme
4232
4247
  } = props;
4233
- return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow: 0 0 0 1px var(--card-bg-color), inset 0 0 0 1.5px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(theme.sanity.space[2]));
4248
+ return styled.css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n user-select: none;\n color: inherit;\n color: var(--card-fg-color);\n background: var(--card-bg-color);\n box-shadow: 0 0 0 1px var(--card-bg-color), inset 0 0 0 1.5px var(--card-hairline-hard-color);\n padding: 0 ", ";\n\n &:not([hidden]) {\n display: flex;\n }\n "])), rem(theme.sanity.space[2]));
4234
4249
  }
4235
- const Root$C = styled.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
4236
- const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
4250
+ const Root$C = styled__default.default.div(_responsiveAvatarCounterSizeStyle, _avatarCounterBaseStyle);
4251
+ const AvatarCounter = react.forwardRef(function AvatarCounter2(props, ref) {
4237
4252
  const {
4238
4253
  count,
4239
4254
  size: sizeProp = 0
4240
4255
  } = props;
4241
4256
  const size = useArrayProp(sizeProp);
4242
- const counterSize = useMemo(() => size.map(s => s === 0 ? 0 : s + 1), [size]);
4243
- return /* @__PURE__ */jsx(Root$C, {
4257
+ const counterSize = react.useMemo(() => size.map(s => s === 0 ? 0 : s + 1), [size]);
4258
+ return /* @__PURE__ */jsxRuntime.jsx(Root$C, {
4244
4259
  $size: size,
4245
4260
  "data-ui": "AvatarCounter",
4246
4261
  ref,
4247
- children: /* @__PURE__ */jsx(Text, {
4262
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
4248
4263
  as: "span",
4249
4264
  size: counterSize,
4250
- children: /* @__PURE__ */jsx("strong", {
4265
+ children: /* @__PURE__ */jsxRuntime.jsx("strong", {
4251
4266
  children: count
4252
4267
  })
4253
4268
  })
@@ -4255,9 +4270,9 @@ const AvatarCounter = forwardRef(function AvatarCounter2(props, ref) {
4255
4270
  });
4256
4271
  function childrenToElementArray(children) {
4257
4272
  const childrenArray = Array.isArray(children) ? children : [children];
4258
- return childrenArray.filter(node => isElement$1(node) || isFragment(node) || typeof node === "string");
4273
+ return childrenArray.filter(node => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node === "string");
4259
4274
  }
4260
- const BASE_STYLES = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
4275
+ const BASE_STYLES = styled.css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n white-space: nowrap;\n\n & > div {\n vertical-align: top;\n\n &:not([hidden]) {\n display: inline-block;\n }\n }\n"])));
4261
4276
  function avatarStackStyle() {
4262
4277
  return BASE_STYLES;
4263
4278
  }
@@ -4279,8 +4294,8 @@ function responsiveAvatarStackSizeStyle(props) {
4279
4294
  };
4280
4295
  });
4281
4296
  }
4282
- const Root$B = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
4283
- const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
4297
+ const Root$B = styled__default.default.div(responsiveAvatarStackSizeStyle, avatarStackStyle);
4298
+ const AvatarStack = react.forwardRef(function AvatarStack2(props, ref) {
4284
4299
  const {
4285
4300
  children: childrenProp,
4286
4301
  maxLength: maxLengthProp = 4,
@@ -4294,29 +4309,29 @@ const AvatarStack = forwardRef(function AvatarStack2(props, ref) {
4294
4309
  const visibleCount = maxLength - 1;
4295
4310
  const extraCount = len - visibleCount;
4296
4311
  const visibleChildren = extraCount > 1 ? children.slice(extraCount, len) : children;
4297
- return /* @__PURE__ */jsxs(Root$B, _objectSpread(_objectSpread({
4312
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$B, _objectSpread(_objectSpread({
4298
4313
  "data-ui": "AvatarStack"
4299
4314
  }, restProps), {}, {
4300
4315
  ref,
4301
4316
  $size: size,
4302
- children: [len === 0 && /* @__PURE__ */jsx("div", {
4303
- children: /* @__PURE__ */jsx(AvatarCounter, {
4317
+ children: [len === 0 && /* @__PURE__ */jsxRuntime.jsx("div", {
4318
+ children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
4304
4319
  count: len
4305
4320
  })
4306
- }), len !== 0 && extraCount > 1 && /* @__PURE__ */jsx("div", {
4307
- children: /* @__PURE__ */jsx(AvatarCounter, {
4321
+ }), len !== 0 && extraCount > 1 && /* @__PURE__ */jsxRuntime.jsx("div", {
4322
+ children: /* @__PURE__ */jsxRuntime.jsx(AvatarCounter, {
4308
4323
  count: extraCount,
4309
4324
  size
4310
4325
  })
4311
- }), visibleChildren.map((child, childIndex) => /* @__PURE__ */jsx("div", {
4312
- children: cloneElement(child, {
4326
+ }), visibleChildren.map((child, childIndex) => /* @__PURE__ */jsxRuntime.jsx("div", {
4327
+ children: react.cloneElement(child, {
4313
4328
  size
4314
4329
  })
4315
4330
  }, String(childIndex)))]
4316
4331
  }));
4317
4332
  });
4318
- const Root$A = styled.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
4319
- const Box = forwardRef(function Box2(props, ref) {
4333
+ const Root$A = styled__default.default.div(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle);
4334
+ const Box = react.forwardRef(function Box2(props, ref) {
4320
4335
  const {
4321
4336
  as: asProp = "div",
4322
4337
  column,
@@ -4346,7 +4361,7 @@ const Box = forwardRef(function Box2(props, ref) {
4346
4361
  sizing
4347
4362
  } = props,
4348
4363
  restProps = _objectWithoutProperties(props, _excluded5);
4349
- return /* @__PURE__ */jsx(Root$A, _objectSpread(_objectSpread({
4364
+ return /* @__PURE__ */jsxRuntime.jsx(Root$A, _objectSpread(_objectSpread({
4350
4365
  "data-as": typeof asProp === "string" ? asProp : void 0,
4351
4366
  "data-ui": "Box"
4352
4367
  }, restProps), {}, {
@@ -4389,11 +4404,11 @@ function labelBaseStyle(props) {
4389
4404
  const {
4390
4405
  fonts
4391
4406
  } = theme.sanity;
4392
- return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
4407
+ return styled.css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n text-transform: uppercase;\n\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && styled.css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))), fonts.code.family);
4393
4408
  }
4394
- const Root$z = styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
4395
- const SpanWithTextOverflow$1 = styled.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
4396
- const Label = forwardRef(function Label2(props, ref) {
4409
+ const Root$z = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle);
4410
+ const SpanWithTextOverflow$1 = styled__default.default.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
4411
+ const Label = react.forwardRef(function Label2(props, ref) {
4397
4412
  const {
4398
4413
  accent,
4399
4414
  align,
@@ -4406,15 +4421,15 @@ const Label = forwardRef(function Label2(props, ref) {
4406
4421
  restProps = _objectWithoutProperties(props, _excluded6);
4407
4422
  let children = childrenProp;
4408
4423
  if (textOverflow === "ellipsis") {
4409
- children = /* @__PURE__ */jsx(SpanWithTextOverflow$1, {
4424
+ children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow$1, {
4410
4425
  children
4411
4426
  });
4412
4427
  } else {
4413
- children = /* @__PURE__ */jsx("span", {
4428
+ children = /* @__PURE__ */jsxRuntime.jsx("span", {
4414
4429
  children
4415
4430
  });
4416
4431
  }
4417
- return /* @__PURE__ */jsx(Root$z, _objectSpread(_objectSpread({
4432
+ return /* @__PURE__ */jsxRuntime.jsx(Root$z, _objectSpread(_objectSpread({
4418
4433
  "data-ui": "Label"
4419
4434
  }, restProps), {}, {
4420
4435
  $accent: accent,
@@ -4444,8 +4459,8 @@ function badgeStyle(props) {
4444
4459
  }
4445
4460
  };
4446
4461
  }
4447
- const Root$y = styled(Box)(responsiveRadiusStyle, badgeStyle);
4448
- const Badge = forwardRef(function Badge2(props, ref) {
4462
+ const Root$y = styled__default.default(Box)(responsiveRadiusStyle, badgeStyle);
4463
+ const Badge = react.forwardRef(function Badge2(props, ref) {
4449
4464
  const {
4450
4465
  children,
4451
4466
  fontSize,
@@ -4455,7 +4470,7 @@ const Badge = forwardRef(function Badge2(props, ref) {
4455
4470
  tone = "default"
4456
4471
  } = props,
4457
4472
  restProps = _objectWithoutProperties(props, _excluded7);
4458
- return /* @__PURE__ */jsx(Root$y, _objectSpread(_objectSpread({
4473
+ return /* @__PURE__ */jsxRuntime.jsx(Root$y, _objectSpread(_objectSpread({
4459
4474
  "data-ui": "Badge"
4460
4475
  }, restProps), {}, {
4461
4476
  $mode: mode,
@@ -4463,14 +4478,14 @@ const Badge = forwardRef(function Badge2(props, ref) {
4463
4478
  $radius: useArrayProp(radius),
4464
4479
  padding: useArrayProp(padding),
4465
4480
  ref,
4466
- children: /* @__PURE__ */jsx(Label, {
4481
+ children: /* @__PURE__ */jsxRuntime.jsx(Label, {
4467
4482
  size: fontSize,
4468
4483
  children
4469
4484
  })
4470
4485
  }));
4471
4486
  });
4472
- const Root$x = styled(Box)(flexItemStyle, responsiveFlexStyle);
4473
- const Flex = forwardRef(function Flex2(props, ref) {
4487
+ const Root$x = styled__default.default(Box)(flexItemStyle, responsiveFlexStyle);
4488
+ const Flex = react.forwardRef(function Flex2(props, ref) {
4474
4489
  const {
4475
4490
  align,
4476
4491
  as,
@@ -4480,7 +4495,7 @@ const Flex = forwardRef(function Flex2(props, ref) {
4480
4495
  wrap
4481
4496
  } = props,
4482
4497
  restProps = _objectWithoutProperties(props, _excluded8);
4483
- return /* @__PURE__ */jsx(Root$x, _objectSpread(_objectSpread({
4498
+ return /* @__PURE__ */jsxRuntime.jsx(Root$x, _objectSpread(_objectSpread({
4484
4499
  "data-ui": "Flex"
4485
4500
  }, restProps), {}, {
4486
4501
  $align: useArrayProp(align),
@@ -4492,14 +4507,14 @@ const Flex = forwardRef(function Flex2(props, ref) {
4492
4507
  ref
4493
4508
  }));
4494
4509
  });
4495
- const rotate$1 = keyframes(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
4496
- const Root$w = styled(Text)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
4497
- const Spinner = forwardRef(function Spinner2(props, ref) {
4498
- return /* @__PURE__ */jsx(Root$w, _objectSpread(_objectSpread({
4510
+ const rotate$1 = styled.keyframes(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
4511
+ const Root$w = styled__default.default(Text)(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n & > span > svg {\n animation: ", " 500ms linear infinite;\n }\n"])), rotate$1);
4512
+ const Spinner = react.forwardRef(function Spinner2(props, ref) {
4513
+ return /* @__PURE__ */jsxRuntime.jsx(Root$w, _objectSpread(_objectSpread({
4499
4514
  "data-ui": "Spinner"
4500
4515
  }, props), {}, {
4501
4516
  ref,
4502
- children: /* @__PURE__ */jsx(SpinnerIcon, {})
4517
+ children: /* @__PURE__ */jsxRuntime.jsx(icons.SpinnerIcon, {})
4503
4518
  }));
4504
4519
  });
4505
4520
  function _colorVarsStyle(base, color) {
@@ -4528,7 +4543,7 @@ function _colorVarsStyle(base, color) {
4528
4543
  };
4529
4544
  }
4530
4545
  function buttonBaseStyles() {
4531
- return css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\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 "])));
4546
+ return styled.css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\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 "])));
4532
4547
  }
4533
4548
  const buttonTheme = {
4534
4549
  border: {
@@ -4575,9 +4590,9 @@ function buttonColorStyles(props) {
4575
4590
  }
4576
4591
  }, (_b = (_a = theme.sanity.styles) == null ? void 0 : _a.button) == null ? void 0 : _b.root].filter(Boolean);
4577
4592
  }
4578
- const Root$v = styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
4579
- const LoadingBox = styled.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\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"])));
4580
- const Button = forwardRef(function Button2(props, ref) {
4593
+ const Root$v = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles);
4594
+ const LoadingBox = styled__default.default.div(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\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"])));
4595
+ const Button = react.forwardRef(function Button2(props, ref) {
4581
4596
  const {
4582
4597
  children,
4583
4598
  disabled,
@@ -4614,7 +4629,7 @@ const Button = forwardRef(function Button2(props, ref) {
4614
4629
  const radius = useArrayProp(radiusProp);
4615
4630
  const space = useArrayProp(spaceProp);
4616
4631
  const theme = useTheme();
4617
- const boxProps = useMemo(() => ({
4632
+ const boxProps = react.useMemo(() => ({
4618
4633
  padding,
4619
4634
  paddingX,
4620
4635
  paddingY,
@@ -4623,7 +4638,7 @@ const Button = forwardRef(function Button2(props, ref) {
4623
4638
  paddingLeft,
4624
4639
  paddingRight
4625
4640
  }), [padding, paddingX, paddingY, paddingTop, paddingBottom, paddingLeft, paddingRight]);
4626
- return /* @__PURE__ */jsxs(Root$v, _objectSpread(_objectSpread({
4641
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$v, _objectSpread(_objectSpread({
4627
4642
  "data-ui": "Button"
4628
4643
  }, restProps), {}, {
4629
4644
  $mode: mode,
@@ -4634,34 +4649,34 @@ const Button = forwardRef(function Button2(props, ref) {
4634
4649
  disabled: Boolean(loading || disabled),
4635
4650
  ref,
4636
4651
  type,
4637
- children: [Boolean(loading) && /* @__PURE__ */jsx(LoadingBox, {
4638
- children: /* @__PURE__ */jsx(Spinner, {})
4639
- }), (icon || text || iconRight) && /* @__PURE__ */jsx(Box, _objectSpread(_objectSpread({
4652
+ children: [Boolean(loading) && /* @__PURE__ */jsxRuntime.jsx(LoadingBox, {
4653
+ children: /* @__PURE__ */jsxRuntime.jsx(Spinner, {})
4654
+ }), (icon || text || iconRight) && /* @__PURE__ */jsxRuntime.jsx(Box, _objectSpread(_objectSpread({
4640
4655
  as: "span"
4641
4656
  }, boxProps), {}, {
4642
- children: /* @__PURE__ */jsxs(Flex, {
4657
+ children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
4643
4658
  as: "span",
4644
4659
  justify,
4645
- children: [icon && /* @__PURE__ */jsxs(Text, {
4660
+ children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
4646
4661
  size: fontSize,
4647
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
4648
- }), text && /* @__PURE__ */jsx(Box, {
4662
+ children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
4663
+ }), text && /* @__PURE__ */jsxRuntime.jsx(Box, {
4649
4664
  flex: iconRight ? 1 : void 0,
4650
4665
  marginLeft: icon ? space : void 0,
4651
4666
  marginRight: iconRight ? space : void 0,
4652
- children: /* @__PURE__ */jsx(Text, {
4667
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
4653
4668
  align: textAlign,
4654
4669
  size: fontSize,
4655
4670
  textOverflow: "ellipsis",
4656
4671
  weight: theme.sanity.button.textWeight,
4657
4672
  children: text
4658
4673
  })
4659
- }), iconRight && /* @__PURE__ */jsxs(Text, {
4674
+ }), iconRight && /* @__PURE__ */jsxRuntime.jsxs(Text, {
4660
4675
  size: fontSize,
4661
- children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
4676
+ children: [react.isValidElement(iconRight) && iconRight, ReactIs.isValidElementType(iconRight) && react.createElement(iconRight)]
4662
4677
  })]
4663
4678
  })
4664
- })), children && /* @__PURE__ */jsx(Box, _objectSpread(_objectSpread({
4679
+ })), children && /* @__PURE__ */jsxRuntime.jsx(Box, _objectSpread(_objectSpread({
4665
4680
  as: "span"
4666
4681
  }, boxProps), {}, {
4667
4682
  children
@@ -4677,7 +4692,7 @@ function cardBaseStyle(props) {
4677
4692
  theme
4678
4693
  } = props;
4679
4694
  const space = theme.sanity.space;
4680
- return css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\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(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
4695
+ return styled.css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\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(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n background-size: ", "px ", "px;\n background-position: 50% 50%;\n background-image: var(--card-bg-image);\n "])), space[3], space[3]));
4681
4696
  }
4682
4697
  function cardColorStyle(props) {
4683
4698
  var _a, _b;
@@ -4698,7 +4713,7 @@ function cardColorStyle(props) {
4698
4713
  width: 0,
4699
4714
  color: "var(--card-border-color)"
4700
4715
  };
4701
- return css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n ", "\n "])), dark ? "dark" : "light", _colorVarsStyle(base, card.enabled, $checkered), _colorVarsStyle(base, card.disabled, $checkered), _colorVarsStyle(base, card.pressed, $checkered), _colorVarsStyle(base, card.selected, $checkered), _colorVarsStyle(base, card.hovered, $checkered), _colorVarsStyle(base, card.pressed, $checkered), $focusRing ? focusRingStyle({
4716
+ return styled.css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\n color-scheme: ", ";\n\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n\n /* &:is(button) */\n &[data-as='button'] {\n --card-focus-ring-box-shadow: none;\n\n cursor: default;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n cursor: pointer;\n box-shadow: var(--card-focus-ring-box-shadow);\n\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-pressed]):not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n\n &:focus {\n --card-focus-ring-box-shadow: ", ";\n }\n\n &:focus:not(:focus-visible) {\n --card-focus-ring-box-shadow: ", ";\n }\n }\n }\n\n ", "\n "])), dark ? "dark" : "light", _colorVarsStyle(base, card.enabled, $checkered), _colorVarsStyle(base, card.disabled, $checkered), _colorVarsStyle(base, card.pressed, $checkered), _colorVarsStyle(base, card.selected, $checkered), _colorVarsStyle(base, card.hovered, $checkered), _colorVarsStyle(base, card.pressed, $checkered), $focusRing ? focusRingStyle({
4702
4717
  base,
4703
4718
  border,
4704
4719
  focusRing
@@ -4708,8 +4723,8 @@ function cardColorStyle(props) {
4708
4723
  focusRing
4709
4724
  }) : void 0, $focusRing ? focusRingBorderStyle(border) : void 0, (_b = (_a = theme.sanity.styles) == null ? void 0 : _a.card) == null ? void 0 : _b.root);
4710
4725
  }
4711
- const Root$u = styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
4712
- const Card = forwardRef(function Card2(props, ref) {
4726
+ const Root$u = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle);
4727
+ const Card = react.forwardRef(function Card2(props, ref) {
4713
4728
  const {
4714
4729
  __unstable_checkered: checkered = false,
4715
4730
  __unstable_focusRing: focusRing = false,
@@ -4727,13 +4742,13 @@ const Card = forwardRef(function Card2(props, ref) {
4727
4742
  tone: toneProp = "default"
4728
4743
  } = props,
4729
4744
  restProps = _objectWithoutProperties(props, _excluded10);
4730
- const as = isValidElementType(asProp) ? asProp : "div";
4745
+ const as = ReactIs.isValidElementType(asProp) ? asProp : "div";
4731
4746
  const rootTheme = useRootTheme();
4732
4747
  const tone = toneProp === "inherit" ? rootTheme.tone : toneProp;
4733
- return /* @__PURE__ */jsx(ThemeColorProvider, {
4748
+ return /* @__PURE__ */jsxRuntime.jsx(ThemeColorProvider, {
4734
4749
  scheme,
4735
4750
  tone,
4736
- children: /* @__PURE__ */jsx(Root$u, _objectSpread(_objectSpread({
4751
+ children: /* @__PURE__ */jsxRuntime.jsx(Root$u, _objectSpread(_objectSpread({
4737
4752
  "data-as": typeof as === "string" ? as : void 0,
4738
4753
  "data-scheme": rootTheme.scheme,
4739
4754
  "data-ui": "Card",
@@ -4759,7 +4774,7 @@ const Card = forwardRef(function Card2(props, ref) {
4759
4774
  });
4760
4775
  });
4761
4776
  function checkboxBaseStyles() {
4762
- return css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n position: relative;\n display: inline-block;\n "])));
4777
+ return styled.css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n position: relative;\n display: inline-block;\n "])));
4763
4778
  }
4764
4779
  function inputElementStyles(props) {
4765
4780
  const {
@@ -4771,7 +4786,7 @@ function inputElementStyles(props) {
4771
4786
  input,
4772
4787
  radius
4773
4788
  } = theme.sanity;
4774
- return css(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 2 !important;\n }\n }\n }\n\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:not([data-read-only]):disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
4789
+ return styled.css(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n outline: none;\n opacity: 0;\n z-index: 1;\n padding: 0;\n margin: 0;\n\n & + span {\n position: relative;\n display: block;\n height: ", ";\n width: ", ";\n box-sizing: border-box;\n box-shadow: ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n\n & > svg {\n display: block;\n position: absolute;\n opacity: 0;\n height: 100%;\n width: 100%;\n\n & > path {\n vector-effect: non-scaling-stroke;\n stroke-width: 2 !important;\n }\n }\n }\n\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span > svg:first-child {\n opacity: 1;\n }\n\n &[data-read-only] + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:not([data-read-only]):disabled + span {\n background-color: ", ";\n box-shadow: ", ";\n color: ", ";\n }\n\n &:indeterminate + span > svg:last-child {\n opacity: 1;\n }\n "])), rem(input.checkbox.size), rem(input.checkbox.size), focusRingBorderStyle({
4775
4790
  color: color.default.enabled.border,
4776
4791
  width: input.border.width
4777
4792
  }), rem(radius[2]), color.default.enabled.bg, focusRingStyle({
@@ -4791,9 +4806,9 @@ function inputElementStyles(props) {
4791
4806
  color: color.default.disabled.border
4792
4807
  }), color.default.disabled.fg);
4793
4808
  }
4794
- const Root$t = styled.div(checkboxBaseStyles);
4795
- const Input$5 = styled.input(inputElementStyles);
4796
- const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
4809
+ const Root$t = styled__default.default.div(checkboxBaseStyles);
4810
+ const Input$5 = styled__default.default.input(inputElementStyles);
4811
+ const Checkbox = react.forwardRef(function Checkbox2(props, forwardedRef) {
4797
4812
  const {
4798
4813
  checked,
4799
4814
  className,
@@ -4806,16 +4821,16 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
4806
4821
  restProps = _objectWithoutProperties(props, _excluded11);
4807
4822
  const ref = useForwardedRef(forwardedRef);
4808
4823
  useCustomValidity(ref, customValidity);
4809
- useEffect(() => {
4824
+ react.useEffect(() => {
4810
4825
  if (ref.current) {
4811
4826
  ref.current.indeterminate = indeterminate || false;
4812
4827
  }
4813
4828
  }, [indeterminate, ref]);
4814
- return /* @__PURE__ */jsxs(Root$t, {
4829
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$t, {
4815
4830
  className,
4816
4831
  "data-ui": "Checkbox",
4817
4832
  style,
4818
- children: [/* @__PURE__ */jsx(Input$5, _objectSpread(_objectSpread({
4833
+ children: [/* @__PURE__ */jsxRuntime.jsx(Input$5, _objectSpread(_objectSpread({
4819
4834
  "data-read-only": !disabled && readOnly ? "" : void 0
4820
4835
  }, restProps), {}, {
4821
4836
  checked,
@@ -4823,8 +4838,8 @@ const Checkbox = forwardRef(function Checkbox2(props, forwardedRef) {
4823
4838
  type: "checkbox",
4824
4839
  readOnly,
4825
4840
  ref
4826
- })), /* @__PURE__ */jsxs("span", {
4827
- children: [/* @__PURE__ */jsx(CheckmarkIcon, {}), /* @__PURE__ */jsx(RemoveIcon, {})]
4841
+ })), /* @__PURE__ */jsxRuntime.jsxs("span", {
4842
+ children: [/* @__PURE__ */jsxRuntime.jsx(icons.CheckmarkIcon, {}), /* @__PURE__ */jsxRuntime.jsx(icons.RemoveIcon, {})]
4828
4843
  })]
4829
4844
  });
4830
4845
  });
@@ -4945,10 +4960,10 @@ function codeSyntaxHighlightingStyle(_ref20) {
4945
4960
  };
4946
4961
  }
4947
4962
  function codeBaseStyle() {
4948
- return css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ", "\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), codeSyntaxHighlightingStyle);
4963
+ return styled.css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\n color: var(--card-code-fg-color);\n\n & code {\n font-family: inherit;\n\n &.refractor .token {\n ", "\n }\n }\n\n & a {\n color: inherit;\n text-decoration: underline;\n border-radius: 1px;\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), codeSyntaxHighlightingStyle);
4949
4964
  }
4950
- const Root$s = styled.pre(codeBaseStyle, responsiveCodeFontStyle);
4951
- const Code = forwardRef(function Code2(props, ref) {
4965
+ const Root$s = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle);
4966
+ const Code = react.forwardRef(function Code2(props, ref) {
4952
4967
  const {
4953
4968
  children,
4954
4969
  language: languageProp,
@@ -4957,16 +4972,16 @@ const Code = forwardRef(function Code2(props, ref) {
4957
4972
  } = props,
4958
4973
  restProps = _objectWithoutProperties(props, _excluded12);
4959
4974
  const language = typeof languageProp === "string" ? languageProp : void 0;
4960
- const registered = language ? Refractor.hasLanguage(language) : false;
4961
- return /* @__PURE__ */jsxs(Root$s, _objectSpread(_objectSpread({
4975
+ const registered = language ? Refractor__default.default.hasLanguage(language) : false;
4976
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$s, _objectSpread(_objectSpread({
4962
4977
  "data-ui": "Code"
4963
4978
  }, restProps), {}, {
4964
4979
  $size: useArrayProp(size),
4965
4980
  $weight: weight,
4966
4981
  ref,
4967
- children: [!(language && registered) && /* @__PURE__ */jsx("code", {
4982
+ children: [!(language && registered) && /* @__PURE__ */jsxRuntime.jsx("code", {
4968
4983
  children
4969
- }), language && registered && /* @__PURE__ */jsx(Refractor, {
4984
+ }), language && registered && /* @__PURE__ */jsxRuntime.jsx(Refractor__default.default, {
4970
4985
  inline: true,
4971
4986
  language,
4972
4987
  value: String(children)
@@ -4992,14 +5007,14 @@ function responsiveContainerWidthStyle(props) {
4992
5007
  maxWidth: val === "auto" ? "none" : rem(container[val])
4993
5008
  }));
4994
5009
  }
4995
- const Root$r = styled(Box)(containerBaseStyle, responsiveContainerWidthStyle);
4996
- const Container = forwardRef(function Container2(props, ref) {
5010
+ const Root$r = styled__default.default(Box)(containerBaseStyle, responsiveContainerWidthStyle);
5011
+ const Container = react.forwardRef(function Container2(props, ref) {
4997
5012
  const {
4998
5013
  as,
4999
5014
  width = 2
5000
5015
  } = props,
5001
5016
  restProps = _objectWithoutProperties(props, _excluded13);
5002
- return /* @__PURE__ */jsx(Root$r, _objectSpread(_objectSpread({
5017
+ return /* @__PURE__ */jsxRuntime.jsx(Root$r, _objectSpread(_objectSpread({
5003
5018
  "data-ui": "Container"
5004
5019
  }, restProps), {}, {
5005
5020
  $width: useArrayProp(width),
@@ -5007,8 +5022,8 @@ const Container = forwardRef(function Container2(props, ref) {
5007
5022
  ref
5008
5023
  }));
5009
5024
  });
5010
- const Root$q = styled(Box)(responsiveGridStyle);
5011
- const Grid = forwardRef(function Grid2(props, ref) {
5025
+ const Root$q = styled__default.default(Box)(responsiveGridStyle);
5026
+ const Grid = react.forwardRef(function Grid2(props, ref) {
5012
5027
  const {
5013
5028
  as,
5014
5029
  autoRows,
@@ -5022,7 +5037,7 @@ const Grid = forwardRef(function Grid2(props, ref) {
5022
5037
  children
5023
5038
  } = props,
5024
5039
  restProps = _objectWithoutProperties(props, _excluded14);
5025
- return /* @__PURE__ */jsx(Root$q, _objectSpread(_objectSpread({
5040
+ return /* @__PURE__ */jsxRuntime.jsx(Root$q, _objectSpread(_objectSpread({
5026
5041
  "data-as": typeof as === "string" ? as : void 0,
5027
5042
  "data-ui": "Grid"
5028
5043
  }, restProps), {}, {
@@ -5045,11 +5060,11 @@ function headingBaseStyle(props) {
5045
5060
  $muted,
5046
5061
  theme
5047
5062
  } = props;
5048
- return css(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && css(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))), $muted && css(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
5063
+ return styled.css(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\n ", "\n\n ", "\n\n & code {\n font-family: ", ";\n border-radius: 1px;\n }\n\n & a {\n text-decoration: none;\n border-radius: 1px;\n color: var(--card-link-color);\n outline: none;\n\n @media (hover: hover) {\n &:hover {\n text-decoration: underline;\n }\n }\n\n &:focus {\n box-shadow: 0 0 0 1px var(--card-bg-color), 0 0 0 3px var(--card-focus-ring-color);\n }\n\n &:focus:not(:focus-visible) {\n box-shadow: none;\n }\n }\n\n & [data-sanity-icon] {\n vertical-align: baseline;\n }\n "])), $accent && styled.css(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\n color: var(--card-accent-fg-color);\n "]))), $muted && styled.css(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\n color: var(--card-muted-fg-color);\n "]))), theme.sanity.fonts.code.family);
5049
5064
  }
5050
- const Root$p = styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
5051
- const SpanWithTextOverflow = styled.span(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
5052
- const Heading = forwardRef(function Heading2(props, ref) {
5065
+ const Root$p = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont);
5066
+ const SpanWithTextOverflow = styled__default.default.span(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n"])));
5067
+ const Heading = react.forwardRef(function Heading2(props, ref) {
5053
5068
  const {
5054
5069
  accent = false,
5055
5070
  align,
@@ -5062,11 +5077,11 @@ const Heading = forwardRef(function Heading2(props, ref) {
5062
5077
  restProps = _objectWithoutProperties(props, _excluded15);
5063
5078
  let children = childrenProp;
5064
5079
  if (textOverflow === "ellipsis") {
5065
- children = /* @__PURE__ */jsx(SpanWithTextOverflow, {
5080
+ children = /* @__PURE__ */jsxRuntime.jsx(SpanWithTextOverflow, {
5066
5081
  children
5067
5082
  });
5068
5083
  }
5069
- return /* @__PURE__ */jsx(Root$p, _objectSpread(_objectSpread({
5084
+ return /* @__PURE__ */jsxRuntime.jsx(Root$p, _objectSpread(_objectSpread({
5070
5085
  "data-ui": "Heading"
5071
5086
  }, restProps), {}, {
5072
5087
  $accent: accent,
@@ -5075,7 +5090,7 @@ const Heading = forwardRef(function Heading2(props, ref) {
5075
5090
  $size: useArrayProp(size),
5076
5091
  $weight: weight,
5077
5092
  ref,
5078
- children: /* @__PURE__ */jsx("span", {
5093
+ children: /* @__PURE__ */jsxRuntime.jsx("span", {
5079
5094
  children
5080
5095
  })
5081
5096
  }));
@@ -5106,18 +5121,18 @@ function inlineSpaceStyle(props) {
5106
5121
  };
5107
5122
  });
5108
5123
  }
5109
- const Root$o = styled(Box)(inlineBaseStyle, inlineSpaceStyle);
5110
- const Inline = forwardRef(function Inline2(props, ref) {
5124
+ const Root$o = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle);
5125
+ const Inline = react.forwardRef(function Inline2(props, ref) {
5111
5126
  const {
5112
5127
  as,
5113
5128
  children: childrenProp,
5114
5129
  space
5115
5130
  } = props,
5116
5131
  restProps = _objectWithoutProperties(props, _excluded16);
5117
- const children = useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsx("div", {
5132
+ const children = react.useMemo(() => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */jsxRuntime.jsx("div", {
5118
5133
  children: child
5119
5134
  }, idx)), [childrenProp]);
5120
- return /* @__PURE__ */jsx(Root$o, _objectSpread(_objectSpread({
5135
+ return /* @__PURE__ */jsxRuntime.jsx(Root$o, _objectSpread(_objectSpread({
5121
5136
  "data-ui": "Inline"
5122
5137
  }, restProps), {}, {
5123
5138
  $space: useArrayProp(space),
@@ -5127,10 +5142,10 @@ const Inline = forwardRef(function Inline2(props, ref) {
5127
5142
  }));
5128
5143
  });
5129
5144
  function kbdStyle() {
5130
- return css(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n background: var(--card-bg-color);\n font: inherit;\n box-shadow: inset 0 0 0 1px var(--card-hairline-hard-color);\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
5145
+ return styled.css(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\n background: var(--card-bg-color);\n font: inherit;\n box-shadow: inset 0 0 0 1px var(--card-hairline-hard-color);\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
5131
5146
  }
5132
- const Root$n = styled.kbd(responsiveRadiusStyle, kbdStyle);
5133
- const KBD = forwardRef(function KBD2(props, ref) {
5147
+ const Root$n = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle);
5148
+ const KBD = react.forwardRef(function KBD2(props, ref) {
5134
5149
  const {
5135
5150
  children,
5136
5151
  fontSize = 1,
@@ -5138,15 +5153,15 @@ const KBD = forwardRef(function KBD2(props, ref) {
5138
5153
  radius = 2
5139
5154
  } = props,
5140
5155
  restProps = _objectWithoutProperties(props, _excluded17);
5141
- return /* @__PURE__ */jsx(Root$n, _objectSpread(_objectSpread({
5156
+ return /* @__PURE__ */jsxRuntime.jsx(Root$n, _objectSpread(_objectSpread({
5142
5157
  "data-ui": "KBD"
5143
5158
  }, restProps), {}, {
5144
5159
  $radius: useArrayProp(radius),
5145
5160
  ref,
5146
- children: /* @__PURE__ */jsx(Box, {
5161
+ children: /* @__PURE__ */jsxRuntime.jsx(Box, {
5147
5162
  as: "span",
5148
5163
  padding,
5149
- children: /* @__PURE__ */jsx(Code, {
5164
+ children: /* @__PURE__ */jsxRuntime.jsx(Code, {
5150
5165
  as: "span",
5151
5166
  muted: true,
5152
5167
  size: fontSize,
@@ -5156,18 +5171,18 @@ const KBD = forwardRef(function KBD2(props, ref) {
5156
5171
  }));
5157
5172
  });
5158
5173
  const key$6 = Symbol.for("@sanity/ui/context/boundaryElement");
5159
- globalScope[key$6] = globalScope[key$6] || createContext(null);
5174
+ globalScope[key$6] = globalScope[key$6] || react.createContext(null);
5160
5175
  const BoundaryElementContext = globalScope[key$6];
5161
5176
  function BoundaryElementProvider(props) {
5162
5177
  const {
5163
5178
  children,
5164
5179
  element
5165
5180
  } = props;
5166
- const value = useMemo(() => ({
5181
+ const value = react.useMemo(() => ({
5167
5182
  version: 0,
5168
5183
  element
5169
5184
  }), [element]);
5170
- return /* @__PURE__ */jsx(BoundaryElementContext.Provider, {
5185
+ return /* @__PURE__ */jsxRuntime.jsx(BoundaryElementContext.Provider, {
5171
5186
  value,
5172
5187
  children
5173
5188
  });
@@ -5177,7 +5192,7 @@ const DEFAULT_VALUE = {
5177
5192
  element: null
5178
5193
  };
5179
5194
  function useBoundaryElement() {
5180
- const value = useContext(BoundaryElementContext);
5195
+ const value = react.useContext(BoundaryElementContext);
5181
5196
  if (value && (!isRecord(value) || value.version !== 0)) {
5182
5197
  throw new Error("useBoundaryElement(): the context value is not compatible");
5183
5198
  }
@@ -5203,7 +5218,7 @@ function findMinBreakpoints(media, width) {
5203
5218
  }
5204
5219
  return ret;
5205
5220
  }
5206
- const ElementQuery = forwardRef(function ElementQuery2(props, ref) {
5221
+ const ElementQuery = react.forwardRef(function ElementQuery2(props, ref) {
5207
5222
  const theme = useTheme();
5208
5223
  const {
5209
5224
  children,
@@ -5211,19 +5226,19 @@ const ElementQuery = forwardRef(function ElementQuery2(props, ref) {
5211
5226
  } = props,
5212
5227
  restProps = _objectWithoutProperties(props, _excluded18);
5213
5228
  const forwardedRef = useForwardedRef(ref);
5214
- const [element, setElement] = useState(null);
5229
+ const [element, setElement] = react.useState(null);
5215
5230
  const elementSize = useElementSize(element);
5216
- const width = useMemo(() => {
5231
+ const width = react.useMemo(() => {
5217
5232
  var _a;
5218
5233
  return (_a = elementSize == null ? void 0 : elementSize.border.width) != null ? _a : window.innerWidth;
5219
5234
  }, [elementSize]);
5220
- const max = useMemo(() => findMaxBreakpoints(media, width), [media, width]);
5221
- const min = useMemo(() => findMinBreakpoints(media, width), [media, width]);
5222
- const setRef = useCallback(el => {
5235
+ const max = react.useMemo(() => findMaxBreakpoints(media, width), [media, width]);
5236
+ const min = react.useMemo(() => findMinBreakpoints(media, width), [media, width]);
5237
+ const setRef = react.useCallback(el => {
5223
5238
  forwardedRef.current = el;
5224
5239
  setElement(el);
5225
5240
  }, [forwardedRef]);
5226
- return /* @__PURE__ */jsx("div", _objectSpread(_objectSpread({
5241
+ return /* @__PURE__ */jsxRuntime.jsx("div", _objectSpread(_objectSpread({
5227
5242
  "data-ui": "ElementQuery"
5228
5243
  }, restProps), {}, {
5229
5244
  "data-eq-max": max.length ? max.join(" ") : void 0,
@@ -5232,7 +5247,7 @@ const ElementQuery = forwardRef(function ElementQuery2(props, ref) {
5232
5247
  children
5233
5248
  }));
5234
5249
  });
5235
- class ErrorBoundary extends Component {
5250
+ class ErrorBoundary extends react.Component {
5236
5251
  constructor() {
5237
5252
  super(...arguments);
5238
5253
  this.state = {
@@ -5256,7 +5271,7 @@ class ErrorBoundary extends Component {
5256
5271
  } = this.state;
5257
5272
  if (error) {
5258
5273
  const message = typeof (error == null ? void 0 : error.message) === "string" ? error.message : "Error";
5259
- return /* @__PURE__ */jsx(Code, {
5274
+ return /* @__PURE__ */jsxRuntime.jsx(Code, {
5260
5275
  children: message
5261
5276
  });
5262
5277
  }
@@ -5264,10 +5279,10 @@ class ErrorBoundary extends Component {
5264
5279
  }
5265
5280
  }
5266
5281
  const key$5 = Symbol.for("@sanity/ui/context/layer");
5267
- globalScope[key$5] = globalScope[key$5] || createContext(null);
5282
+ globalScope[key$5] = globalScope[key$5] || react.createContext(null);
5268
5283
  const LayerContext = globalScope[key$5];
5269
5284
  function useLayer() {
5270
- const value = useContext(LayerContext);
5285
+ const value = react.useContext(LayerContext);
5271
5286
  if (!value) {
5272
5287
  throw new Error("useLayer(): missing context value");
5273
5288
  }
@@ -5281,35 +5296,35 @@ function LayerProvider(props) {
5281
5296
  children,
5282
5297
  zOffset: zOffsetProp = 0
5283
5298
  } = props;
5284
- const parent = useContext(LayerContext);
5299
+ const parent = react.useContext(LayerContext);
5285
5300
  const zOffset = useArrayProp(zOffsetProp);
5286
5301
  const maxMediaIndex = zOffset.length - 1;
5287
5302
  const mediaIndex = Math.min(useMediaIndex(), maxMediaIndex);
5288
5303
  const zIndex = parent ? parent.zIndex + zOffset[mediaIndex] : zOffset[mediaIndex];
5289
- const [size, setSize] = useState(0);
5290
- const registerChild = useCallback(() => {
5304
+ const [size, setSize] = react.useState(0);
5305
+ const registerChild = react.useCallback(() => {
5291
5306
  setSize(v => v + 1);
5292
5307
  return () => setSize(v => v - 1);
5293
5308
  }, []);
5294
5309
  const parentRegisterChild = parent == null ? void 0 : parent.registerChild;
5295
- useEffect(() => {
5310
+ react.useEffect(() => {
5296
5311
  if (!parentRegisterChild) return;
5297
5312
  return parentRegisterChild();
5298
5313
  }, [parentRegisterChild]);
5299
- const value = useMemo(() => ({
5314
+ const value = react.useMemo(() => ({
5300
5315
  version: 0,
5301
5316
  isTopLayer: size === 0,
5302
5317
  registerChild,
5303
5318
  size,
5304
5319
  zIndex
5305
5320
  }), [size, registerChild, zIndex]);
5306
- return /* @__PURE__ */jsx(LayerContext.Provider, {
5321
+ return /* @__PURE__ */jsxRuntime.jsx(LayerContext.Provider, {
5307
5322
  value,
5308
5323
  children
5309
5324
  });
5310
5325
  }
5311
- const Root$m = styled.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n position: relative;\n"])));
5312
- const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
5326
+ const Root$m = styled__default.default.div(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\n position: relative;\n"])));
5327
+ const LayerChildren = react.forwardRef(function LayerChildren2(props, ref) {
5313
5328
  const {
5314
5329
  children,
5315
5330
  style = EMPTY_RECORD
@@ -5318,7 +5333,7 @@ const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
5318
5333
  const {
5319
5334
  zIndex
5320
5335
  } = useLayer();
5321
- return /* @__PURE__ */jsx(Root$m, _objectSpread(_objectSpread({}, restProps), {}, {
5336
+ return /* @__PURE__ */jsxRuntime.jsx(Root$m, _objectSpread(_objectSpread({}, restProps), {}, {
5322
5337
  "data-ui": "Layer",
5323
5338
  ref,
5324
5339
  style: _objectSpread(_objectSpread({}, style), {}, {
@@ -5327,15 +5342,15 @@ const LayerChildren = forwardRef(function LayerChildren2(props, ref) {
5327
5342
  children
5328
5343
  }));
5329
5344
  });
5330
- const Layer = forwardRef(function Layer2(props, ref) {
5345
+ const Layer = react.forwardRef(function Layer2(props, ref) {
5331
5346
  const {
5332
5347
  children,
5333
5348
  zOffset = 1
5334
5349
  } = props,
5335
5350
  restProps = _objectWithoutProperties(props, _excluded20);
5336
- return /* @__PURE__ */jsx(LayerProvider, {
5351
+ return /* @__PURE__ */jsxRuntime.jsx(LayerProvider, {
5337
5352
  zOffset,
5338
- children: /* @__PURE__ */jsx(LayerChildren, _objectSpread(_objectSpread({}, restProps), {}, {
5353
+ children: /* @__PURE__ */jsxRuntime.jsx(LayerChildren, _objectSpread(_objectSpread({}, restProps), {}, {
5339
5354
  ref,
5340
5355
  children
5341
5356
  }))
@@ -5360,10 +5375,10 @@ const defaultContextValue = {
5360
5375
  return globalScope[elementKey];
5361
5376
  }
5362
5377
  };
5363
- globalScope[key$4] = globalScope[key$4] || createContext(defaultContextValue);
5378
+ globalScope[key$4] = globalScope[key$4] || react.createContext(defaultContextValue);
5364
5379
  const PortalContext = globalScope[key$4];
5365
5380
  function usePortal() {
5366
- const value = useContext(PortalContext);
5381
+ const value = react.useContext(PortalContext);
5367
5382
  if (!value) {
5368
5383
  throw new Error("usePortal(): missing context value");
5369
5384
  }
@@ -5383,10 +5398,10 @@ function Portal(props) {
5383
5398
  if (!portalElement) {
5384
5399
  return null;
5385
5400
  }
5386
- return createPortal(children, portalElement);
5401
+ return reactDom.createPortal(children, portalElement);
5387
5402
  }
5388
5403
  function useUnique(value) {
5389
- const valueRef = useRef(value);
5404
+ const valueRef = react.useRef(value);
5390
5405
  if (!_isEqual(valueRef.current, value)) {
5391
5406
  valueRef.current = value;
5392
5407
  }
@@ -5412,7 +5427,7 @@ function PortalProvider(props) {
5412
5427
  __unstable_elements: elementsProp
5413
5428
  } = props;
5414
5429
  const elements = useUnique(elementsProp);
5415
- const value = useMemo(() => {
5430
+ const value = react.useMemo(() => {
5416
5431
  return {
5417
5432
  version: 0,
5418
5433
  boundaryElement: boundaryElement || null,
@@ -5420,18 +5435,18 @@ function PortalProvider(props) {
5420
5435
  elements
5421
5436
  };
5422
5437
  }, [boundaryElement, element, elements]);
5423
- return /* @__PURE__ */jsx(PortalContext.Provider, {
5438
+ return /* @__PURE__ */jsxRuntime.jsx(PortalContext.Provider, {
5424
5439
  value,
5425
5440
  children
5426
5441
  });
5427
5442
  }
5428
- const Root$l = styled.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n"])));
5429
- const SrOnly = forwardRef(function SrOnly2(props, ref) {
5443
+ const Root$l = styled__default.default.div(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n overflow: hidden;\n"])));
5444
+ const SrOnly = react.forwardRef(function SrOnly2(props, ref) {
5430
5445
  const {
5431
5446
  as,
5432
5447
  children
5433
5448
  } = props;
5434
- return /* @__PURE__ */jsx(Root$l, {
5449
+ return /* @__PURE__ */jsxRuntime.jsx(Root$l, {
5435
5450
  "aria-hidden": true,
5436
5451
  as,
5437
5452
  "data-ui": "SrOnly",
@@ -5526,9 +5541,9 @@ function _isScrollable(el) {
5526
5541
  const style = window.getComputedStyle(el);
5527
5542
  return style.overflowX.includes("auto") || style.overflowX.includes("scroll") || style.overflowY.includes("auto") || style.overflowY.includes("scroll");
5528
5543
  }
5529
- const Root$k = styled.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n position: relative;\n"])));
5530
- const ItemWrapper = styled.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
5531
- const VirtualList = forwardRef(function VirtualList2(props, ref) {
5544
+ const Root$k = styled__default.default.div(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n position: relative;\n"])));
5545
+ const ItemWrapper = styled__default.default.div(_templateObject32 || (_templateObject32 = _taggedTemplateLiteral(["\n position: absolute;\n left: 0;\n right: 0;\n"])));
5546
+ const VirtualList = react.forwardRef(function VirtualList2(props, ref) {
5532
5547
  const {
5533
5548
  as = "div",
5534
5549
  gap = 0,
@@ -5542,18 +5557,18 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
5542
5557
  space
5543
5558
  } = useTheme().sanity;
5544
5559
  const forwardedRef = useForwardedRef(ref);
5545
- const wrapperRef = useRef(null);
5546
- const [scrollTop, setScrollTop] = useState(0);
5547
- const [scrollHeight, setScrollHeight] = useState(0);
5548
- const [itemHeight, setItemHeight] = useState(-1);
5549
- useEffect(() => {
5560
+ const wrapperRef = react.useRef(null);
5561
+ const [scrollTop, setScrollTop] = react.useState(0);
5562
+ const [scrollHeight, setScrollHeight] = react.useState(0);
5563
+ const [itemHeight, setItemHeight] = react.useState(-1);
5564
+ react.useEffect(() => {
5550
5565
  if (!wrapperRef.current) return;
5551
5566
  const firstElement = wrapperRef.current.firstChild;
5552
5567
  if (firstElement instanceof HTMLElement) {
5553
5568
  setItemHeight(firstElement.offsetHeight);
5554
5569
  }
5555
5570
  }, [renderItem]);
5556
- useEffect(() => {
5571
+ react.useEffect(() => {
5557
5572
  if (!forwardedRef.current) return;
5558
5573
  let _scrollEl = forwardedRef.current.parentNode;
5559
5574
  while (_scrollEl && !_isScrollable(_scrollEl)) {
@@ -5600,7 +5615,7 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
5600
5615
  const height = itemHeight ? len * (itemHeight + space[gap]) - space[gap] : 0;
5601
5616
  const fromIndex = height ? Math.max(Math.floor(scrollTop / height * len) - 2, 0) : 0;
5602
5617
  const toIndex = height ? Math.ceil((scrollTop + scrollHeight) / height * len) + 1 : 0;
5603
- useEffect(() => {
5618
+ react.useEffect(() => {
5604
5619
  if (!onChange) return;
5605
5620
  onChange({
5606
5621
  fromIndex,
@@ -5611,10 +5626,10 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
5611
5626
  toIndex
5612
5627
  });
5613
5628
  }, [fromIndex, gap, itemHeight, onChange, scrollHeight, scrollTop, space, toIndex]);
5614
- const children = useMemo(() => {
5629
+ const children = react.useMemo(() => {
5615
5630
  if (!renderItem || items.length === 0) return null;
5616
5631
  if (itemHeight === -1) {
5617
- return [/* @__PURE__ */jsx(ItemWrapper, {
5632
+ return [/* @__PURE__ */jsxRuntime.jsx(ItemWrapper, {
5618
5633
  children: renderItem(items[0])
5619
5634
  }, 0)];
5620
5635
  }
@@ -5622,7 +5637,7 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
5622
5637
  const itemIndex = fromIndex + _itemIndex;
5623
5638
  const node = renderItem(item);
5624
5639
  const key = getItemKey ? getItemKey(item, itemIndex) : itemIndex;
5625
- return /* @__PURE__ */jsx(ItemWrapper, {
5640
+ return /* @__PURE__ */jsxRuntime.jsx(ItemWrapper, {
5626
5641
  style: {
5627
5642
  top: itemIndex * (itemHeight + space[gap])
5628
5643
  },
@@ -5630,15 +5645,15 @@ const VirtualList = forwardRef(function VirtualList2(props, ref) {
5630
5645
  }, key);
5631
5646
  });
5632
5647
  }, [fromIndex, gap, getItemKey, itemHeight, items, renderItem, space, toIndex]);
5633
- const wrapperStyle = useMemo(() => ({
5648
+ const wrapperStyle = react.useMemo(() => ({
5634
5649
  height
5635
5650
  }), [height]);
5636
- return /* @__PURE__ */jsx(Root$k, _objectSpread(_objectSpread({
5651
+ return /* @__PURE__ */jsxRuntime.jsx(Root$k, _objectSpread(_objectSpread({
5637
5652
  as,
5638
5653
  "data-ui": "VirtualList"
5639
5654
  }, restProps), {}, {
5640
5655
  ref: forwardedRef,
5641
- children: /* @__PURE__ */jsx("div", {
5656
+ children: /* @__PURE__ */jsxRuntime.jsx("div", {
5642
5657
  ref: wrapperRef,
5643
5658
  style: wrapperStyle,
5644
5659
  children
@@ -5669,7 +5684,7 @@ function size(options) {
5669
5684
  floating,
5670
5685
  reference
5671
5686
  } = rects;
5672
- const overflow = await detectOverflow(args, {
5687
+ const overflow = await reactDom$1.detectOverflow(args, {
5673
5688
  altBoundary: true,
5674
5689
  boundary: options.boundaryElement || void 0,
5675
5690
  elementContext: "floating",
@@ -5716,23 +5731,23 @@ function size(options) {
5716
5731
  }
5717
5732
  };
5718
5733
  }
5719
- const Root$j = styled.div(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n position: absolute;\n pointer-events: none;\n width: ", "px;\n height: ", "px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: ", "px ", "px;\n }\n\n [data-placement^='top'] > & {\n bottom: -", "px;\n }\n\n [data-placement^='right'] > & {\n left: -", "px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -", "px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -", "px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])), DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH);
5720
- const BorderPath = styled.path(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
5721
- const ShapePath = styled.path(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
5722
- const PopoverArrow = forwardRef(function PopoverArrow2(props, ref) {
5723
- return /* @__PURE__ */jsx(Root$j, _objectSpread(_objectSpread({
5734
+ const Root$j = styled__default.default.div(_templateObject33 || (_templateObject33 = _taggedTemplateLiteral(["\n position: absolute;\n pointer-events: none;\n width: ", "px;\n height: ", "px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: ", "px ", "px;\n }\n\n [data-placement^='top'] > & {\n bottom: -", "px;\n }\n\n [data-placement^='right'] > & {\n left: -", "px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -", "px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -", "px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])), DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH / 2, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH, DEFAULT_POPOVER_ARROW_WIDTH);
5735
+ const BorderPath = styled__default.default.path(_templateObject34 || (_templateObject34 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
5736
+ const ShapePath = styled__default.default.path(_templateObject35 || (_templateObject35 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
5737
+ const PopoverArrow = react.forwardRef(function PopoverArrow2(props, ref) {
5738
+ return /* @__PURE__ */jsxRuntime.jsx(Root$j, _objectSpread(_objectSpread({
5724
5739
  "data-ui": "Popover__arrow"
5725
5740
  }, props), {}, {
5726
5741
  ref,
5727
- children: /* @__PURE__ */jsxs("svg", {
5742
+ children: /* @__PURE__ */jsxRuntime.jsxs("svg", {
5728
5743
  width: DEFAULT_POPOVER_ARROW_WIDTH,
5729
5744
  height: DEFAULT_POPOVER_ARROW_HEIGHT,
5730
5745
  viewBox: "0 0 27 11",
5731
5746
  fill: "none",
5732
5747
  xmlns: "http://www.w3.org/2000/svg",
5733
- children: [/* @__PURE__ */jsx(BorderPath, {
5748
+ children: [/* @__PURE__ */jsxRuntime.jsx(BorderPath, {
5734
5749
  d: "M1.18708 1C3.29803 1.0011 5.29585 1.95479 6.62414 3.59561L11.1683 9.20895C12.369 10.6922 14.631 10.6922 15.8317 9.20894L20.3759 3.59561C21.7042 1.95478 23.702 1.0011 25.8129 1H21.9436C21.0533 1.49255 20.2545 2.15618 19.5986 2.96641L15.0545 8.57975C14.254 9.56855 12.746 9.56855 11.9455 8.57975L7.40139 2.96642C6.74548 2.15618 5.94673 1.49255 5.05643 1H1.18708Z"
5735
- }), /* @__PURE__ */jsx(ShapePath, {
5750
+ }), /* @__PURE__ */jsxRuntime.jsx(ShapePath, {
5736
5751
  d: "M1.18342 0C3.59749 0 5.88246 1.0901 7.40138 2.96642L11.9455 8.57975C12.746 9.56855 14.254 9.56855 15.0545 8.57975L19.5986 2.96641C21.1175 1.0901 23.4025 0 25.8166 0H27H0H1.18342Z"
5737
5752
  })]
5738
5753
  })
@@ -5752,9 +5767,9 @@ function popoverCardStyle(props) {
5752
5767
  maxWidth: typeof $boundaryWidth === "number" ? "".concat($boundaryWidth - DEFAULT_POPOVER_PADDING * 2, "px") : void 0
5753
5768
  };
5754
5769
  }
5755
- const Root$i = memo(styled(Card)(popoverCardStyle));
5756
- const PopoverContainer = memo(styled(Container)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n max-height: inherit;\n max-width: inherit;\n"]))));
5757
- const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5770
+ const Root$i = react.memo(styled__default.default(Card)(popoverCardStyle));
5771
+ const PopoverContainer = react.memo(styled__default.default(Container)(_templateObject36 || (_templateObject36 = _taggedTemplateLiteral(["\n max-height: inherit;\n max-width: inherit;\n"]))));
5772
+ const PopoverCard = react.memo(react.forwardRef(function PopoverCard2(props, ref) {
5758
5773
  const {
5759
5774
  __unstable_margins: marginsProp,
5760
5775
  arrow,
@@ -5780,17 +5795,17 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5780
5795
  const {
5781
5796
  zIndex
5782
5797
  } = useLayer();
5783
- const margins = useMemo(() => marginsProp || DEFAULT_POPOVER_MARGINS, [marginsProp]);
5798
+ const margins = react.useMemo(() => marginsProp || DEFAULT_POPOVER_MARGINS, [marginsProp]);
5784
5799
  const x = (xProp != null ? xProp : 0) + margins[3];
5785
5800
  const y = (yProp != null ? yProp : 0) + margins[0];
5786
- const rootStyle = useMemo(() => _objectSpread({
5801
+ const rootStyle = react.useMemo(() => _objectSpread({
5787
5802
  position: strategy,
5788
5803
  top: y,
5789
5804
  left: x,
5790
5805
  zIndex
5791
5806
  }, style), [strategy, style, x, y, zIndex]);
5792
5807
  const staticSide = placement && FLOATING_STATIC_SIDES[placement.split("-")[0]];
5793
- const arrowStyle = useMemo(() => {
5808
+ const arrowStyle = react.useMemo(() => {
5794
5809
  const style2 = {
5795
5810
  left: arrowX !== null ? arrowX : void 0,
5796
5811
  top: arrowY !== null ? arrowY : void 0,
@@ -5800,7 +5815,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5800
5815
  if (staticSide) style2[staticSide] = 0 - DEFAULT_POPOVER_ARROW_WIDTH;
5801
5816
  return style2;
5802
5817
  }, [arrowX, arrowY, staticSide]);
5803
- return /* @__PURE__ */jsxs(Root$i, _objectSpread(_objectSpread({}, restProps), {}, {
5818
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$i, _objectSpread(_objectSpread({}, restProps), {}, {
5804
5819
  $boundaryWidth: boundaryWidth,
5805
5820
  "data-placement": placement,
5806
5821
  "data-ui": "Popover",
@@ -5811,7 +5826,7 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5811
5826
  sizing: "border",
5812
5827
  style: rootStyle,
5813
5828
  tone,
5814
- children: [/* @__PURE__ */jsx(PopoverContainer, {
5829
+ children: [/* @__PURE__ */jsxRuntime.jsx(PopoverContainer, {
5815
5830
  "data-ui": "Popover__wrapper",
5816
5831
  flex: 1,
5817
5832
  overflow,
@@ -5819,14 +5834,14 @@ const PopoverCard = memo(forwardRef(function PopoverCard2(props, ref) {
5819
5834
  sizing: "border",
5820
5835
  width,
5821
5836
  children
5822
- }), arrow && /* @__PURE__ */jsx(PopoverArrow, {
5837
+ }), arrow && /* @__PURE__ */jsxRuntime.jsx(PopoverArrow, {
5823
5838
  ref: arrowRef,
5824
5839
  style: arrowStyle
5825
5840
  })]
5826
5841
  }));
5827
5842
  }));
5828
5843
  PopoverCard.displayName = "PopoverCard";
5829
- const Popover = memo(forwardRef(function Popover2(props, ref) {
5844
+ const Popover = react.memo(react.forwardRef(function Popover2(props, ref) {
5830
5845
  var _a, _b, _c, _d, _e;
5831
5846
  const theme = useTheme();
5832
5847
  const boundaryElementContext = useBoundaryElement();
@@ -5862,19 +5877,19 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5862
5877
  const width = useArrayProp(widthProp);
5863
5878
  const zOffset = useArrayProp(zOffsetProp);
5864
5879
  const forwardedRef = useForwardedRef(ref);
5865
- const arrowRef = useRef(null);
5880
+ const arrowRef = react.useRef(null);
5866
5881
  const rootBoundary = "viewport";
5867
- const middleware = useMemo(() => {
5882
+ const middleware = react.useMemo(() => {
5868
5883
  const ret = [];
5869
5884
  if (constrainSize || preventOverflow) {
5870
- ret.push(flip({
5885
+ ret.push(reactDom$1.flip({
5871
5886
  boundary: boundaryElement || void 0,
5872
5887
  fallbackPlacements,
5873
5888
  padding: DEFAULT_POPOVER_PADDING,
5874
5889
  rootBoundary
5875
5890
  }));
5876
5891
  }
5877
- ret.push(offset({
5892
+ ret.push(reactDom$1.offset({
5878
5893
  mainAxis: arrowProp ? DEFAULT_POPOVER_DISTANCE : 0
5879
5894
  }));
5880
5895
  if (constrainSize || matchReferenceWidthProp) {
@@ -5902,29 +5917,29 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5902
5917
  }));
5903
5918
  }
5904
5919
  if (preventOverflow) {
5905
- ret.push(shift({
5920
+ ret.push(reactDom$1.shift({
5906
5921
  boundary: boundaryElement || void 0,
5907
5922
  rootBoundary,
5908
5923
  padding: DEFAULT_POPOVER_PADDING
5909
5924
  }));
5910
5925
  }
5911
5926
  if (arrowProp) {
5912
- ret.push(arrow({
5927
+ ret.push(reactDom$1.arrow({
5913
5928
  element: arrowRef,
5914
5929
  padding: DEFAULT_POPOVER_PADDING
5915
5930
  }));
5916
5931
  }
5917
- ret.push(hide({
5932
+ ret.push(reactDom$1.hide({
5918
5933
  boundary: boundaryElement || void 0,
5919
5934
  padding: DEFAULT_POPOVER_PADDING,
5920
5935
  strategy: "referenceHidden"
5921
5936
  }));
5922
5937
  return ret;
5923
5938
  }, [arrowProp, boundaryElement, constrainSize, fallbackPlacements, margins, matchReferenceWidthProp, preventOverflow]);
5924
- const floatingProps = useMemo(() => ({
5939
+ const floatingProps = react.useMemo(() => ({
5925
5940
  middleware,
5926
5941
  placement: placementProp,
5927
- whileElementsMounted: autoUpdate
5942
+ whileElementsMounted: reactDom$1.autoUpdate
5928
5943
  }), [middleware, placementProp]);
5929
5944
  const {
5930
5945
  x,
@@ -5934,18 +5949,18 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5934
5949
  floating: floatingRef,
5935
5950
  middlewareData,
5936
5951
  strategy
5937
- } = useFloating(floatingProps);
5952
+ } = reactDom$1.useFloating(floatingProps);
5938
5953
  const referenceHidden = (_c = middlewareData.hide) == null ? void 0 : _c.referenceHidden;
5939
5954
  const arrowX = (_d = middlewareData.arrow) == null ? void 0 : _d.x;
5940
5955
  const arrowY = (_e = middlewareData.arrow) == null ? void 0 : _e.y;
5941
- const setArrow = useCallback(arrowEl => {
5956
+ const setArrow = react.useCallback(arrowEl => {
5942
5957
  arrowRef.current = arrowEl;
5943
5958
  }, []);
5944
- const setFloating = useCallback(node => {
5959
+ const setFloating = react.useCallback(node => {
5945
5960
  forwardedRef.current = node;
5946
5961
  floatingRef(node);
5947
5962
  }, [floatingRef, forwardedRef]);
5948
- const setReference = useCallback(node => {
5963
+ const setReference = react.useCallback(node => {
5949
5964
  referenceRef(node);
5950
5965
  const childRef = childProp == null ? void 0 : childProp.ref;
5951
5966
  if (typeof childRef === "function") {
@@ -5954,21 +5969,21 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5954
5969
  childRef.current = node;
5955
5970
  }
5956
5971
  }, [childProp, referenceRef]);
5957
- const child = useMemo(() => {
5972
+ const child = react.useMemo(() => {
5958
5973
  if (!childProp || referenceElement) return null;
5959
- return cloneElement(childProp, {
5974
+ return react.cloneElement(childProp, {
5960
5975
  ref: setReference
5961
5976
  });
5962
5977
  }, [childProp, referenceElement, setReference]);
5963
- useEffect(() => {
5978
+ react.useEffect(() => {
5964
5979
  referenceRef(referenceElement || null);
5965
5980
  }, [referenceRef, referenceElement]);
5966
5981
  if (disabled) {
5967
- return childProp || /* @__PURE__ */jsx(Fragment, {});
5982
+ return childProp || /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {});
5968
5983
  }
5969
- const popover = /* @__PURE__ */jsx(LayerProvider, {
5984
+ const popover = /* @__PURE__ */jsxRuntime.jsx(LayerProvider, {
5970
5985
  zOffset,
5971
- children: /* @__PURE__ */jsx(PopoverCard, _objectSpread(_objectSpread({}, restProps), {}, {
5986
+ children: /* @__PURE__ */jsxRuntime.jsx(PopoverCard, _objectSpread(_objectSpread({}, restProps), {}, {
5972
5987
  __unstable_margins: margins,
5973
5988
  arrow: arrowProp,
5974
5989
  arrowRef: setArrow,
@@ -5991,9 +6006,9 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
5991
6006
  children: content
5992
6007
  }))
5993
6008
  });
5994
- return /* @__PURE__ */jsxs(Fragment, {
5995
- children: [open && /* @__PURE__ */jsx(Fragment, {
5996
- children: portal ? /* @__PURE__ */jsx(Portal, {
6009
+ return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
6010
+ children: [open && /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {
6011
+ children: portal ? /* @__PURE__ */jsxRuntime.jsx(Portal, {
5997
6012
  __unstable_name: typeof portal === "string" ? portal : void 0,
5998
6013
  children: popover
5999
6014
  }) : popover
@@ -6002,7 +6017,7 @@ const Popover = memo(forwardRef(function Popover2(props, ref) {
6002
6017
  }));
6003
6018
  Popover.displayName = "Popover";
6004
6019
  function radioBaseStyle() {
6005
- return css(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));
6020
+ return styled.css(_templateObject37 || (_templateObject37 = _taggedTemplateLiteral(["\n position: relative;\n\n &:not([hidden]) {\n display: inline-block;\n }\n\n &[data-read-only] {\n outline: 1px solid red;\n }\n "])));
6006
6021
  }
6007
6022
  function inputElementStyle(props) {
6008
6023
  const {
@@ -6014,7 +6029,7 @@ function inputElementStyle(props) {
6014
6029
  } = theme.sanity;
6015
6030
  const color = theme.sanity.color.input;
6016
6031
  const dist = (input.radio.size - input.radio.markSize) / 2;
6017
- return css(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n z-index: 1;\n padding: 0;\n margin: 0;\n border-radius: ", ";\n border: none;\n\n /* enabled */\n & + span {\n display: block;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n\n &::after {\n content: '';\n position: absolute;\n top: ", ";\n left: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n opacity: 0;\n }\n }\n\n /* focused */\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span::after {\n opacity: 1;\n }\n\n /* read only */\n &[data-read-only] + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n\n /* disabled */\n &:not([data-read-only]):disabled + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n "])), rem(input.radio.size / 2), rem(input.radio.size), rem(input.radio.size), rem(input.radio.size / 2), color.default.enabled.bg, focusRingBorderStyle({
6032
+ return styled.css(_templateObject38 || (_templateObject38 = _taggedTemplateLiteral(["\n appearance: none;\n position: absolute;\n top: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n z-index: 1;\n padding: 0;\n margin: 0;\n border-radius: ", ";\n border: none;\n\n /* enabled */\n & + span {\n display: block;\n position: relative;\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n box-shadow: ", ";\n\n &::after {\n content: '';\n position: absolute;\n top: ", ";\n left: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n opacity: 0;\n }\n }\n\n /* focused */\n &:not(:disabled):focus + span {\n box-shadow: ", ";\n }\n\n &:not(:disabled):focus:not(:focus-visible) + span {\n box-shadow: ", ";\n }\n\n &:checked + span::after {\n opacity: 1;\n }\n\n /* read only */\n &[data-read-only] + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n\n /* disabled */\n &:not([data-read-only]):disabled + span {\n box-shadow: 0 0 0 1px ", ";\n background: ", ";\n\n &::after {\n background: ", ";\n }\n }\n "])), rem(input.radio.size / 2), rem(input.radio.size), rem(input.radio.size), rem(input.radio.size / 2), color.default.enabled.bg, focusRingBorderStyle({
6018
6033
  color: color.default.enabled.border,
6019
6034
  width: input.border.width
6020
6035
  }), rem(dist), rem(dist), rem(input.radio.markSize), rem(input.radio.markSize), rem(input.radio.markSize / 2), color.default.enabled.fg, focusRingStyle({
@@ -6028,9 +6043,9 @@ function inputElementStyle(props) {
6028
6043
  width: input.border.width
6029
6044
  }), color.default.readOnly.border, color.default.readOnly.bg, color.default.readOnly.fg, color.default.disabled.border, color.default.disabled.bg, color.default.disabled.fg);
6030
6045
  }
6031
- const Root$h = styled.div(radioBaseStyle);
6032
- const Input$4 = styled.input(inputElementStyle);
6033
- const Radio = forwardRef(function Radio2(props, forwardedRef) {
6046
+ const Root$h = styled__default.default.div(radioBaseStyle);
6047
+ const Input$4 = styled__default.default.input(inputElementStyle);
6048
+ const Radio = react.forwardRef(function Radio2(props, forwardedRef) {
6034
6049
  const {
6035
6050
  className,
6036
6051
  disabled,
@@ -6041,29 +6056,29 @@ const Radio = forwardRef(function Radio2(props, forwardedRef) {
6041
6056
  restProps = _objectWithoutProperties(props, _excluded24);
6042
6057
  const ref = useForwardedRef(forwardedRef);
6043
6058
  useCustomValidity(ref, customValidity);
6044
- return /* @__PURE__ */jsxs(Root$h, {
6059
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$h, {
6045
6060
  className,
6046
6061
  "data-ui": "Radio",
6047
6062
  style,
6048
- children: [/* @__PURE__ */jsx(Input$4, _objectSpread(_objectSpread({
6063
+ children: [/* @__PURE__ */jsxRuntime.jsx(Input$4, _objectSpread(_objectSpread({
6049
6064
  "data-read-only": !disabled && readOnly ? "" : void 0
6050
6065
  }, restProps), {}, {
6051
6066
  disabled: disabled || readOnly,
6052
6067
  readOnly,
6053
6068
  ref,
6054
6069
  type: "radio"
6055
- })), /* @__PURE__ */jsx("span", {})]
6070
+ })), /* @__PURE__ */jsxRuntime.jsx("span", {})]
6056
6071
  });
6057
6072
  });
6058
6073
  function rootStyle() {
6059
- return css(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n position: relative;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6074
+ return styled.css(_templateObject39 || (_templateObject39 = _taggedTemplateLiteral(["\n position: relative;\n width: stretch;\n\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6060
6075
  }
6061
6076
  function inputBaseStyle(props) {
6062
6077
  const {
6063
6078
  theme
6064
6079
  } = props;
6065
6080
  const font = theme.sanity.fonts.text;
6066
- return css(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n -webkit-font-smoothing: antialiased;\n appearance: none;\n border: 0;\n font-family: ", ";\n color: inherit;\n width: 100%;\n outline: none;\n margin: 0;\n\n &:disabled {\n opacity: 1;\n }\n "])), font.family);
6081
+ return styled.css(_templateObject40 || (_templateObject40 = _taggedTemplateLiteral(["\n -webkit-font-smoothing: antialiased;\n appearance: none;\n border: 0;\n font-family: ", ";\n color: inherit;\n width: 100%;\n outline: none;\n margin: 0;\n\n &:disabled {\n opacity: 1;\n }\n "])), font.family);
6067
6082
  }
6068
6083
  function inputColorStyle(props) {
6069
6084
  const {
@@ -6074,7 +6089,7 @@ function inputColorStyle(props) {
6074
6089
  input
6075
6090
  } = theme.sanity;
6076
6091
  const color = theme.sanity.color.input;
6077
- return css(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n /* enabled */\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ", ";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n "])), color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
6092
+ return styled.css(_templateObject41 || (_templateObject41 = _taggedTemplateLiteral(["\n /* enabled */\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n\n /* hovered */\n @media (hover: hover) {\n &:not(:disabled):hover {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n }\n\n /* focused */\n &:not(:disabled):focus {\n box-shadow: ", ";\n }\n\n /* read-only */\n &[data-read-only] {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n\n /* disabled */\n &:not([data-read-only]):disabled {\n background-color: ", ";\n color: ", ";\n box-shadow: ", ";\n }\n "])), color.default.enabled.bg, color.default.enabled.fg, focusRingBorderStyle({
6078
6093
  color: color.default.enabled.border,
6079
6094
  width: input.border.width
6080
6095
  }), color.default.hovered.bg, color.default.hovered.fg, focusRingBorderStyle({
@@ -6118,17 +6133,17 @@ function iconBoxStyle(props) {
6118
6133
  theme
6119
6134
  } = props;
6120
6135
  const color = theme.sanity.color.input;
6121
- return css(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n\n /* enabled */\n --card-fg-color: ", ";\n\n /* hover */\n @media (hover: hover) {\n select:not(disabled):not(:read-only):hover + && {\n --card-fg-color: ", ";\n }\n }\n\n /* disabled */\n select:disabled + && {\n --card-fg-color: ", ";\n }\n\n /* read-only */\n select[data-read-only] + && {\n --card-fg-color: ", ";\n }\n "])), color.default.enabled.fg, color.default.hovered.fg, color.default.disabled.fg, color.default.readOnly.fg);
6136
+ return styled.css(_templateObject42 || (_templateObject42 = _taggedTemplateLiteral(["\n pointer-events: none;\n position: absolute;\n top: 0;\n right: 0;\n\n /* enabled */\n --card-fg-color: ", ";\n\n /* hover */\n @media (hover: hover) {\n select:not(disabled):not(:read-only):hover + && {\n --card-fg-color: ", ";\n }\n }\n\n /* disabled */\n select:disabled + && {\n --card-fg-color: ", ";\n }\n\n /* read-only */\n select[data-read-only] + && {\n --card-fg-color: ", ";\n }\n "])), color.default.enabled.fg, color.default.hovered.fg, color.default.disabled.fg, color.default.readOnly.fg);
6122
6137
  }
6123
6138
  const selectStyle = {
6124
6139
  root: rootStyle,
6125
6140
  input: inputStyle,
6126
6141
  iconBox: iconBoxStyle
6127
6142
  };
6128
- const Root$g = styled.div(selectStyle.root);
6129
- const Input$3 = styled.select(selectStyle.input);
6130
- const IconBox = styled(Box)(selectStyle.iconBox);
6131
- const Select = forwardRef(function Select2(props, forwardedRef) {
6143
+ const Root$g = styled__default.default.div(selectStyle.root);
6144
+ const Input$3 = styled__default.default.select(selectStyle.input);
6145
+ const IconBox = styled__default.default(Box)(selectStyle.iconBox);
6146
+ const Select = react.forwardRef(function Select2(props, forwardedRef) {
6132
6147
  const {
6133
6148
  children,
6134
6149
  customValidity,
@@ -6142,9 +6157,9 @@ const Select = forwardRef(function Select2(props, forwardedRef) {
6142
6157
  restProps = _objectWithoutProperties(props, _excluded25);
6143
6158
  const ref = useForwardedRef(forwardedRef);
6144
6159
  useCustomValidity(ref, customValidity);
6145
- return /* @__PURE__ */jsxs(Root$g, {
6160
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$g, {
6146
6161
  "data-ui": "Select",
6147
- children: [/* @__PURE__ */jsx(Input$3, _objectSpread(_objectSpread({
6162
+ children: [/* @__PURE__ */jsxRuntime.jsx(Input$3, _objectSpread(_objectSpread({
6148
6163
  "data-read-only": !disabled && readOnly ? "" : void 0,
6149
6164
  "data-ui": "Select"
6150
6165
  }, restProps), {}, {
@@ -6155,11 +6170,11 @@ const Select = forwardRef(function Select2(props, forwardedRef) {
6155
6170
  disabled: disabled || readOnly,
6156
6171
  ref,
6157
6172
  children
6158
- })), /* @__PURE__ */jsx(IconBox, {
6173
+ })), /* @__PURE__ */jsxRuntime.jsx(IconBox, {
6159
6174
  padding,
6160
- children: /* @__PURE__ */jsx(Text, {
6175
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
6161
6176
  size: fontSize,
6162
- children: /* @__PURE__ */jsx(SelectIcon, {})
6177
+ children: /* @__PURE__ */jsxRuntime.jsx(icons.SelectIcon, {})
6163
6178
  })
6164
6179
  })]
6165
6180
  });
@@ -6189,14 +6204,14 @@ function responsiveStackSpaceStyle(props) {
6189
6204
  gridGap: rem(space[spaceIndex])
6190
6205
  }));
6191
6206
  }
6192
- const Root$f = styled(Box)(stackBaseStyle, responsiveStackSpaceStyle);
6193
- const Stack = forwardRef(function Stack2(props, ref) {
6207
+ const Root$f = styled__default.default(Box)(stackBaseStyle, responsiveStackSpaceStyle);
6208
+ const Stack = react.forwardRef(function Stack2(props, ref) {
6194
6209
  const {
6195
6210
  as,
6196
6211
  space
6197
6212
  } = props,
6198
6213
  restProps = _objectWithoutProperties(props, _excluded26);
6199
- return /* @__PURE__ */jsx(Root$f, _objectSpread(_objectSpread({
6214
+ return /* @__PURE__ */jsxRuntime.jsx(Root$f, _objectSpread(_objectSpread({
6200
6215
  "data-as": typeof as === "string" ? as : void 0,
6201
6216
  "data-ui": "Stack"
6202
6217
  }, restProps), {}, {
@@ -6206,10 +6221,10 @@ const Stack = forwardRef(function Stack2(props, ref) {
6206
6221
  }));
6207
6222
  });
6208
6223
  function switchBaseStyles() {
6209
- return css(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6224
+ return styled.css(_templateObject43 || (_templateObject43 = _taggedTemplateLiteral(["\n position: relative;\n &:not([hidden]) {\n display: inline-block;\n }\n "])));
6210
6225
  }
6211
6226
  function switchInputStyles() {
6212
- return css(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n padding: 0;\n margin: 0;\n\n /* Place the input element above the representation element */\n z-index: 1;\n "])));
6227
+ return styled.css(_templateObject44 || (_templateObject44 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n opacity: 0;\n height: 100%;\n width: 100%;\n outline: none;\n padding: 0;\n margin: 0;\n\n /* Place the input element above the representation element */\n z-index: 1;\n "])));
6213
6228
  }
6214
6229
  function switchRepresentationStyles(props) {
6215
6230
  const {
@@ -6220,7 +6235,7 @@ function switchRepresentationStyles(props) {
6220
6235
  input
6221
6236
  } = theme.sanity;
6222
6237
  const color = theme.sanity.color.button.default;
6223
- return css(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ", ";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n "])), color.default.enabled.bg, color.default.enabled.fg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
6238
+ return styled.css(_templateObject45 || (_templateObject45 = _taggedTemplateLiteral(["\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n --switch-box-shadow: none;\n\n &:not([hidden]) {\n display: block;\n }\n position: relative;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n\n /* Make sure it\u2019s not possible to interact with the wrapper element */\n pointer-events: none;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1;\n box-shadow: var(--switch-box-shadow);\n border-radius: inherit;\n }\n\n /* Focus styles */\n input:focus + && {\n --switch-box-shadow: ", ";\n }\n\n input:focus:not(:focus-visible) + && {\n --switch-box-shadow: none;\n }\n\n input:checked + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n @media (hover: hover) {\n input:not(:disabled):hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n\n input:not(:disabled):checked:hover + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n }\n\n input:not([data-read-only]):disabled + && {\n --switch-bg-color: ", ";\n --switch-fg-color: ", ";\n }\n "])), color.default.enabled.bg, color.default.enabled.fg, rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2), focusRingStyle({
6224
6239
  focusRing
6225
6240
  }), color.positive.enabled.bg, color.positive.enabled.fg, color.default.hovered.bg, color.default.hovered.fg, color.positive.hovered.bg, color.positive.hovered.fg, color.default.disabled.bg, color.default.disabled.fg);
6226
6241
  }
@@ -6231,7 +6246,7 @@ function switchTrackStyles(props) {
6231
6246
  const {
6232
6247
  input
6233
6248
  } = theme.sanity;
6234
- return css(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n background-color: var(--switch-bg-color);\n position: absolute;\n left: 0;\n top: 0;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n "])), rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2));
6249
+ return styled.css(_templateObject46 || (_templateObject46 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n background-color: var(--switch-bg-color);\n position: absolute;\n left: 0;\n top: 0;\n width: ", ";\n height: ", ";\n border-radius: ", ";\n "])), rem(input.switch.width), rem(input.switch.height), rem(input.switch.height / 2));
6235
6250
  }
6236
6251
  function switchThumbStyles(props) {
6237
6252
  const {
@@ -6248,14 +6263,14 @@ function switchThumbStyles(props) {
6248
6263
  const checkedOffset = trackWidth - trackPadding * 2 - size;
6249
6264
  const indeterminateOffset = trackWidth / 2 - size / 2 - trackPadding;
6250
6265
  const checked = $indeterminate !== true && props.$checked === true;
6251
- return css(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n position: absolute;\n left: ", ";\n top: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n transition-property: transform;\n transition-duration: ", "ms;\n transition-timing-function: ", ";\n background: var(--switch-fg-color);\n transform: translate3d(0, 0, 0);\n\n ", "\n\n ", "\n "])), rem(trackPadding), rem(trackPadding), rem(size), rem(size), rem(size / 2), input.switch.transitionDurationMs, input.switch.transitionTimingFunction, checked && css(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && css(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
6266
+ return styled.css(_templateObject47 || (_templateObject47 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n position: absolute;\n left: ", ";\n top: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n transition-property: transform;\n transition-duration: ", "ms;\n transition-timing-function: ", ";\n background: var(--switch-fg-color);\n transform: translate3d(0, 0, 0);\n\n ", "\n\n ", "\n "])), rem(trackPadding), rem(trackPadding), rem(size), rem(size), rem(size / 2), input.switch.transitionDurationMs, input.switch.transitionTimingFunction, checked && styled.css(_templateObject48 || (_templateObject48 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), checkedOffset), $indeterminate && styled.css(_templateObject49 || (_templateObject49 = _taggedTemplateLiteral(["\n transform: translate3d(", "px, 0, 0);\n "])), indeterminateOffset));
6252
6267
  }
6253
- const Root$e = styled.span(switchBaseStyles);
6254
- const Input$2 = styled.input(switchInputStyles);
6255
- const Representation = styled.span(switchRepresentationStyles);
6256
- const Track = styled.span(switchTrackStyles);
6257
- const Thumb = styled.span(switchThumbStyles);
6258
- const Switch = forwardRef(function Switch2(props, forwardedRef) {
6268
+ const Root$e = styled__default.default.span(switchBaseStyles);
6269
+ const Input$2 = styled__default.default.input(switchInputStyles);
6270
+ const Representation = styled__default.default.span(switchRepresentationStyles);
6271
+ const Track = styled__default.default.span(switchTrackStyles);
6272
+ const Thumb = styled__default.default.span(switchThumbStyles);
6273
+ const Switch = react.forwardRef(function Switch2(props, forwardedRef) {
6259
6274
  const {
6260
6275
  checked,
6261
6276
  className,
@@ -6266,37 +6281,37 @@ const Switch = forwardRef(function Switch2(props, forwardedRef) {
6266
6281
  } = props,
6267
6282
  restProps = _objectWithoutProperties(props, _excluded27);
6268
6283
  const ref = useForwardedRef(forwardedRef);
6269
- useEffect(() => {
6284
+ react.useEffect(() => {
6270
6285
  if (ref.current) {
6271
6286
  ref.current.indeterminate = indeterminate || false;
6272
6287
  }
6273
6288
  }, [indeterminate, ref]);
6274
- return /* @__PURE__ */jsxs(Root$e, {
6289
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$e, {
6275
6290
  className,
6276
6291
  "data-ui": "Switch",
6277
6292
  style,
6278
- children: [/* @__PURE__ */jsx(Input$2, _objectSpread(_objectSpread({
6293
+ children: [/* @__PURE__ */jsxRuntime.jsx(Input$2, _objectSpread(_objectSpread({
6279
6294
  "data-read-only": !disabled && readOnly ? "" : void 0
6280
6295
  }, restProps), {}, {
6281
6296
  checked: indeterminate !== true && checked,
6282
6297
  disabled: disabled || readOnly,
6283
6298
  type: "checkbox",
6284
6299
  ref
6285
- })), /* @__PURE__ */jsxs(Representation, {
6300
+ })), /* @__PURE__ */jsxRuntime.jsxs(Representation, {
6286
6301
  "aria-hidden": true,
6287
6302
  "data-name": "representation",
6288
- children: [/* @__PURE__ */jsx(Track, {}), /* @__PURE__ */jsx(Thumb, {
6303
+ children: [/* @__PURE__ */jsxRuntime.jsx(Track, {}), /* @__PURE__ */jsxRuntime.jsx(Thumb, {
6289
6304
  $checked: checked,
6290
6305
  $indeterminate: indeterminate
6291
6306
  })]
6292
6307
  })]
6293
6308
  });
6294
6309
  });
6295
- const Root$d = styled.span(textInputRootStyle);
6296
- const InputRoot$1 = styled.span(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6297
- const Input$1 = styled.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6298
- const Presentation$1 = styled.div(responsiveRadiusStyle, textInputRepresentationStyle);
6299
- const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
6310
+ const Root$d = styled__default.default.span(textInputRootStyle);
6311
+ const InputRoot$1 = styled__default.default.span(_templateObject50 || (_templateObject50 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6312
+ const Input$1 = styled__default.default.textarea(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6313
+ const Presentation$1 = styled__default.default.div(responsiveRadiusStyle, textInputRepresentationStyle);
6314
+ const TextArea = react.forwardRef(function TextArea2(props, forwardedRef) {
6300
6315
  const {
6301
6316
  border = true,
6302
6317
  customValidity,
@@ -6310,10 +6325,10 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
6310
6325
  const ref = useForwardedRef(forwardedRef);
6311
6326
  const rootTheme = useRootTheme();
6312
6327
  useCustomValidity(ref, customValidity);
6313
- return /* @__PURE__ */jsx(Root$d, {
6328
+ return /* @__PURE__ */jsxRuntime.jsx(Root$d, {
6314
6329
  "data-ui": "TextArea",
6315
- children: /* @__PURE__ */jsxs(InputRoot$1, {
6316
- children: [/* @__PURE__ */jsx(Input$1, _objectSpread(_objectSpread({
6330
+ children: /* @__PURE__ */jsxRuntime.jsxs(InputRoot$1, {
6331
+ children: [/* @__PURE__ */jsxRuntime.jsx(Input$1, _objectSpread(_objectSpread({
6317
6332
  "data-as": "textarea",
6318
6333
  "data-scheme": rootTheme.scheme,
6319
6334
  "data-tone": rootTheme.tone
@@ -6326,7 +6341,7 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
6326
6341
  $weight: weight,
6327
6342
  disabled,
6328
6343
  ref
6329
- })), /* @__PURE__ */jsx(Presentation$1, {
6344
+ })), /* @__PURE__ */jsxRuntime.jsx(Presentation$1, {
6330
6345
  $radius: useArrayProp(radius),
6331
6346
  $scheme: rootTheme.scheme,
6332
6347
  $tone: rootTheme.tone,
@@ -6340,22 +6355,22 @@ const TextArea = forwardRef(function TextArea2(props, forwardedRef) {
6340
6355
  const CLEAR_BUTTON_BOX_STYLE = {
6341
6356
  zIndex: 2
6342
6357
  };
6343
- const Root$c = styled(Card).attrs({
6358
+ const Root$c = styled__default.default(Card).attrs({
6344
6359
  forwardedAs: "span"
6345
6360
  })(textInputRootStyle);
6346
- const InputRoot = styled.span(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6347
- const Prefix = styled(Card).attrs({
6361
+ const InputRoot = styled__default.default.span(_templateObject51 || (_templateObject51 = _taggedTemplateLiteral(["\n flex: 1;\n min-width: 0;\n display: block;\n position: relative;\n"])));
6362
+ const Prefix = styled__default.default(Card).attrs({
6348
6363
  forwardedAs: "span"
6349
6364
  })(_templateObject52 || (_templateObject52 = _taggedTemplateLiteral(["\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6350
- const Suffix = styled(Card).attrs({
6365
+ const Suffix = styled__default.default(Card).attrs({
6351
6366
  forwardedAs: "span"
6352
6367
  })(_templateObject53 || (_templateObject53 = _taggedTemplateLiteral(["\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n\n & > span {\n display: block;\n margin: -1px;\n }\n"])));
6353
- const Input = styled.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6354
- const Presentation = styled.span(responsiveRadiusStyle, textInputRepresentationStyle);
6355
- const LeftBox = styled(Box)(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
6356
- const RightBox = styled(Box)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
6357
- const RightCard = styled(Card)(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
6358
- const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6368
+ const Input = styled__default.default.input(responsiveInputPaddingStyle, textInputBaseStyle, textInputFontSizeStyle);
6369
+ const Presentation = styled__default.default.span(responsiveRadiusStyle, textInputRepresentationStyle);
6370
+ const LeftBox = styled__default.default(Box)(_templateObject54 || (_templateObject54 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n left: 0;\n"])));
6371
+ const RightBox = styled__default.default(Box)(_templateObject55 || (_templateObject55 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n"])));
6372
+ const RightCard = styled__default.default(Card)(_templateObject56 || (_templateObject56 = _taggedTemplateLiteral(["\n background-color: transparent;\n position: absolute;\n top: 0;\n right: 0;\n"])));
6373
+ const TextInput = react.forwardRef(function TextInput2(props, forwardedRef) {
6359
6374
  const {
6360
6375
  border = true,
6361
6376
  clearButton,
@@ -6387,29 +6402,29 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6387
6402
  const $hasSuffix = Boolean(suffix);
6388
6403
  const $hasPrefix = Boolean(prefix);
6389
6404
  useCustomValidity(ref, customValidity);
6390
- const handleClearMouseDown = useCallback(event => {
6405
+ const handleClearMouseDown = react.useCallback(event => {
6391
6406
  event.preventDefault();
6392
6407
  event.stopPropagation();
6393
6408
  }, []);
6394
- const handleClearClick = useCallback(event => {
6409
+ const handleClearClick = react.useCallback(event => {
6395
6410
  var _a;
6396
6411
  event.preventDefault();
6397
6412
  event.stopPropagation();
6398
6413
  if (onClear) onClear();
6399
6414
  (_a = ref.current) == null ? void 0 : _a.focus();
6400
6415
  }, [onClear, ref]);
6401
- const prefixNode = useMemo(() => prefix && /* @__PURE__ */jsx(Prefix, {
6416
+ const prefixNode = react.useMemo(() => prefix && /* @__PURE__ */jsxRuntime.jsx(Prefix, {
6402
6417
  borderTop: true,
6403
6418
  borderLeft: true,
6404
6419
  borderBottom: true,
6405
6420
  radius,
6406
6421
  sizing: "border",
6407
6422
  tone: "inherit",
6408
- children: /* @__PURE__ */jsx("span", {
6423
+ children: /* @__PURE__ */jsxRuntime.jsx("span", {
6409
6424
  children: prefix
6410
6425
  })
6411
6426
  }), [prefix, radius]);
6412
- const presentationNode = useMemo(() => /* @__PURE__ */jsxs(Presentation, {
6427
+ const presentationNode = react.useMemo(() => /* @__PURE__ */jsxRuntime.jsxs(Presentation, {
6413
6428
  $hasPrefix,
6414
6429
  $hasSuffix,
6415
6430
  $radius: radius,
@@ -6418,43 +6433,43 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6418
6433
  "data-border": border ? "" : void 0,
6419
6434
  "data-scheme": rootTheme.scheme,
6420
6435
  "data-tone": rootTheme.tone,
6421
- children: [icon && /* @__PURE__ */jsx(LeftBox, {
6436
+ children: [icon && /* @__PURE__ */jsxRuntime.jsx(LeftBox, {
6422
6437
  padding,
6423
- children: /* @__PURE__ */jsxs(Text, {
6438
+ children: /* @__PURE__ */jsxRuntime.jsxs(Text, {
6424
6439
  size: fontSize,
6425
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
6440
+ children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
6426
6441
  })
6427
- }), !$hasClearButton && iconRight && /* @__PURE__ */jsx(RightBox, {
6442
+ }), !$hasClearButton && iconRight && /* @__PURE__ */jsxRuntime.jsx(RightBox, {
6428
6443
  padding,
6429
- children: /* @__PURE__ */jsxs(Text, {
6444
+ children: /* @__PURE__ */jsxRuntime.jsxs(Text, {
6430
6445
  size: fontSize,
6431
- children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
6446
+ children: [react.isValidElement(iconRight) && iconRight, ReactIs.isValidElementType(iconRight) && react.createElement(iconRight)]
6432
6447
  })
6433
6448
  })]
6434
6449
  }), [border, fontSize, icon, iconRight, padding, radius, rootTheme, $hasClearButton, $hasPrefix, $hasSuffix]);
6435
- const clearButtonBoxPadding = useMemo(() => padding.map(v => {
6450
+ const clearButtonBoxPadding = react.useMemo(() => padding.map(v => {
6436
6451
  if (v === 0) return 0;
6437
6452
  if (v === 1) return 1;
6438
6453
  if (v === 2) return 1;
6439
6454
  return v - 2;
6440
6455
  }), [padding]);
6441
- const clearButtonPadding = useMemo(() => padding.map(v => {
6456
+ const clearButtonPadding = react.useMemo(() => padding.map(v => {
6442
6457
  if (v === 0) return 0;
6443
6458
  if (v === 1) return 0;
6444
6459
  if (v === 2) return 1;
6445
6460
  return v - 1;
6446
6461
  }), [padding]);
6447
- const clearButtonProps = useMemo(() => typeof clearButton === "object" ? clearButton : EMPTY_RECORD, [clearButton]);
6448
- const clearButtonNode = useMemo(() => !disabled && !readOnly && clearButton && /* @__PURE__ */jsx(RightCard, {
6462
+ const clearButtonProps = react.useMemo(() => typeof clearButton === "object" ? clearButton : EMPTY_RECORD, [clearButton]);
6463
+ const clearButtonNode = react.useMemo(() => !disabled && !readOnly && clearButton && /* @__PURE__ */jsxRuntime.jsx(RightCard, {
6449
6464
  forwardedAs: "span",
6450
6465
  padding: clearButtonBoxPadding,
6451
6466
  style: CLEAR_BUTTON_BOX_STYLE,
6452
6467
  tone: customValidity ? "critical" : "inherit",
6453
- children: /* @__PURE__ */jsx(Button, _objectSpread(_objectSpread({
6468
+ children: /* @__PURE__ */jsxRuntime.jsx(Button, _objectSpread(_objectSpread({
6454
6469
  "aria-label": "Clear",
6455
6470
  "data-qa": "clear-button",
6456
6471
  fontSize,
6457
- icon: CloseIcon,
6472
+ icon: icons.CloseIcon,
6458
6473
  mode: "bleed",
6459
6474
  padding: clearButtonPadding,
6460
6475
  radius
@@ -6463,22 +6478,22 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6463
6478
  onMouseDown: handleClearMouseDown
6464
6479
  }))
6465
6480
  }), [clearButton, clearButtonBoxPadding, clearButtonPadding, clearButtonProps, customValidity, disabled, fontSize, handleClearClick, handleClearMouseDown, radius, readOnly]);
6466
- const suffixNode = useMemo(() => suffix && /* @__PURE__ */jsx(Suffix, {
6481
+ const suffixNode = react.useMemo(() => suffix && /* @__PURE__ */jsxRuntime.jsx(Suffix, {
6467
6482
  borderTop: true,
6468
6483
  borderRight: true,
6469
6484
  borderBottom: true,
6470
6485
  radius,
6471
6486
  sizing: "border",
6472
6487
  tone: "inherit",
6473
- children: /* @__PURE__ */jsx("span", {
6488
+ children: /* @__PURE__ */jsxRuntime.jsx("span", {
6474
6489
  children: suffix
6475
6490
  })
6476
6491
  }), [radius, suffix]);
6477
- return /* @__PURE__ */jsxs(Root$c, {
6492
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$c, {
6478
6493
  "data-ui": "TextInput",
6479
6494
  tone: rootTheme.tone,
6480
- children: [prefixNode, /* @__PURE__ */jsxs(InputRoot, {
6481
- children: [/* @__PURE__ */jsx(Input, _objectSpread(_objectSpread({
6495
+ children: [prefixNode, /* @__PURE__ */jsxRuntime.jsxs(InputRoot, {
6496
+ children: [/* @__PURE__ */jsxRuntime.jsx(Input, _objectSpread(_objectSpread({
6482
6497
  "data-as": "input",
6483
6498
  "data-scheme": rootTheme.scheme,
6484
6499
  "data-tone": rootTheme.tone
@@ -6499,29 +6514,29 @@ const TextInput = forwardRef(function TextInput2(props, forwardedRef) {
6499
6514
  }), suffixNode]
6500
6515
  });
6501
6516
  });
6502
- const Root$b = styled.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n position: absolute;\n pointer-events: none;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: 7.5px 7.5px;\n }\n\n /* position: absolute;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n &:not([hidden]) {\n display: block;\n }\n transform-origin: 7.5px 7.5px;\n } */\n\n [data-placement^='top'] > & {\n bottom: -27px;\n }\n\n [data-placement^='right'] > & {\n left: -27px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -27px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -27px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])));
6503
- const Border = styled.path(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
6504
- const Shape = styled.path(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
6505
- const TooltipArrow = forwardRef(function TooltipArrow2(props, ref) {
6517
+ const Root$b = styled__default.default.div(_templateObject57 || (_templateObject57 = _taggedTemplateLiteral(["\n position: absolute;\n pointer-events: none;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n display: block;\n transform-origin: 7.5px 7.5px;\n }\n\n /* position: absolute;\n width: 15px;\n height: 15px;\n fill: none;\n\n :empty + & {\n display: none;\n }\n\n & > svg {\n &:not([hidden]) {\n display: block;\n }\n transform-origin: 7.5px 7.5px;\n } */\n\n [data-placement^='top'] > & {\n bottom: -27px;\n }\n\n [data-placement^='right'] > & {\n left: -27px;\n\n & > svg {\n transform: rotate(90deg);\n }\n }\n\n [data-placement^='left'] > & {\n right: -27px;\n\n & > svg {\n transform: rotate(-90deg);\n }\n }\n\n [data-placement^='bottom'] > & {\n top: -27px;\n\n & > svg {\n transform: rotate(180deg);\n }\n }\n"])));
6518
+ const Border = styled__default.default.path(_templateObject58 || (_templateObject58 = _taggedTemplateLiteral(["\n fill: var(--card-shadow-outline-color);\n"])));
6519
+ const Shape = styled__default.default.path(_templateObject59 || (_templateObject59 = _taggedTemplateLiteral(["\n fill: var(--card-bg-color);\n"])));
6520
+ const TooltipArrow = react.forwardRef(function TooltipArrow2(props, ref) {
6506
6521
  const restProps = _extends({}, (_objectDestructuringEmpty(props), props));
6507
- return /* @__PURE__ */jsx(Root$b, _objectSpread(_objectSpread({
6522
+ return /* @__PURE__ */jsxRuntime.jsx(Root$b, _objectSpread(_objectSpread({
6508
6523
  "data-ui": "Tooltip__arrow"
6509
6524
  }, restProps), {}, {
6510
6525
  ref,
6511
- children: /* @__PURE__ */jsxs("svg", {
6526
+ children: /* @__PURE__ */jsxRuntime.jsxs("svg", {
6512
6527
  width: "15",
6513
6528
  height: "15",
6514
6529
  viewBox: "0 0 15 15",
6515
- children: [/* @__PURE__ */jsx(Border, {
6530
+ children: [/* @__PURE__ */jsxRuntime.jsx(Border, {
6516
6531
  d: "M11.5266 1C11.032 1.32802 10.5837 1.73105 10.1995 2.20057L9.04792 3.6081C8.24771 4.58614 6.7523 4.58614 5.95209 3.6081L4.80047 2.20057C4.41632 1.73105 3.96796 1.32802 3.47341 1H0.156727C1.65639 1 3.07687 1.67313 4.02651 2.83381L5.17813 4.24134C6.37844 5.70839 8.62156 5.70839 9.82187 4.24134L10.9735 2.83381C11.9231 1.67313 13.3436 1 14.8433 1H11.5266Z"
6517
- }), /* @__PURE__ */jsx(Shape, {
6532
+ }), /* @__PURE__ */jsxRuntime.jsx(Shape, {
6518
6533
  d: "M0.156725 0C1.95632 0 3.66089 0.80776 4.80047 2.20057L5.95209 3.6081C6.75229 4.58614 8.24771 4.58614 9.04791 3.6081L10.1995 2.20057C11.3391 0.80776 13.0437 0 14.8433 0H15H0H0.156725Z"
6519
6534
  })]
6520
6535
  })
6521
6536
  }));
6522
6537
  });
6523
- const Root$a = styled(Layer)(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n pointer-events: none;\n"])));
6524
- const Tooltip = forwardRef(function Tooltip2(props, ref) {
6538
+ const Root$a = styled__default.default(Layer)(_templateObject60 || (_templateObject60 = _taggedTemplateLiteral(["\n pointer-events: none;\n"])));
6539
+ const Tooltip = react.forwardRef(function Tooltip2(props, ref) {
6525
6540
  var _a, _b, _c;
6526
6541
  const boundaryElementContext = useBoundaryElement();
6527
6542
  const theme = useTheme();
@@ -6541,26 +6556,26 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6541
6556
  restProps = _objectWithoutProperties(props, _excluded30);
6542
6557
  const fallbackPlacements = useArrayProp(fallbackPlacementsProp);
6543
6558
  const forwardedRef = useForwardedRef(ref);
6544
- const [referenceElement, setReferenceElement] = useState(null);
6545
- const arrowRef = useRef(null);
6559
+ const [referenceElement, setReferenceElement] = react.useState(null);
6560
+ const arrowRef = react.useRef(null);
6546
6561
  const rootBoundary = "viewport";
6547
- const middleware = useMemo(() => {
6562
+ const middleware = react.useMemo(() => {
6548
6563
  const ret = [];
6549
- ret.push(flip({
6564
+ ret.push(reactDom$1.flip({
6550
6565
  boundary: boundaryElement || void 0,
6551
6566
  fallbackPlacements,
6552
6567
  padding: 4,
6553
6568
  rootBoundary
6554
6569
  }));
6555
- ret.push(offset({
6570
+ ret.push(reactDom$1.offset({
6556
6571
  mainAxis: 3
6557
6572
  }));
6558
- ret.push(shift({
6573
+ ret.push(reactDom$1.shift({
6559
6574
  boundary: boundaryElement || void 0,
6560
6575
  rootBoundary,
6561
6576
  padding: 4
6562
6577
  }));
6563
- ret.push(arrow({
6578
+ ret.push(reactDom$1.arrow({
6564
6579
  element: arrowRef,
6565
6580
  padding: 2
6566
6581
  }));
@@ -6575,12 +6590,12 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6575
6590
  middlewareData,
6576
6591
  update,
6577
6592
  strategy
6578
- } = useFloating({
6593
+ } = reactDom$1.useFloating({
6579
6594
  middleware,
6580
6595
  placement: placementProp,
6581
- whileElementsMounted: autoUpdate
6596
+ whileElementsMounted: reactDom$1.autoUpdate
6582
6597
  });
6583
- const rootStyle = useMemo(() => ({
6598
+ const rootStyle = react.useMemo(() => ({
6584
6599
  position: strategy,
6585
6600
  top: y != null ? y : 0,
6586
6601
  left: x != null ? x : 0
@@ -6588,7 +6603,7 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6588
6603
  const staticSide = placement && FLOATING_STATIC_SIDES[placement.split("-")[0]];
6589
6604
  const arrowX = (_b = middlewareData.arrow) == null ? void 0 : _b.x;
6590
6605
  const arrowY = (_c = middlewareData.arrow) == null ? void 0 : _c.y;
6591
- const arrowStyle = useMemo(() => {
6606
+ const arrowStyle = react.useMemo(() => {
6592
6607
  const style = {
6593
6608
  left: arrowX !== null ? arrowX : void 0,
6594
6609
  top: arrowY !== null ? arrowY : void 0,
@@ -6598,12 +6613,12 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6598
6613
  if (staticSide) style[staticSide] = -15;
6599
6614
  return style;
6600
6615
  }, [arrowX, arrowY, staticSide]);
6601
- const [isOpen, setIsOpen] = useState(false);
6602
- const handleBlur = useCallback(() => setIsOpen(false), []);
6603
- const handleFocus = useCallback(() => setIsOpen(true), []);
6604
- const handleMouseEnter = useCallback(() => setIsOpen(true), []);
6605
- const handleMouseLeave = useCallback(() => setIsOpen(false), []);
6606
- useEffect(() => {
6616
+ const [isOpen, setIsOpen] = react.useState(false);
6617
+ const handleBlur = react.useCallback(() => setIsOpen(false), []);
6618
+ const handleFocus = react.useCallback(() => setIsOpen(true), []);
6619
+ const handleMouseEnter = react.useCallback(() => setIsOpen(true), []);
6620
+ const handleMouseLeave = react.useCallback(() => setIsOpen(false), []);
6621
+ react.useEffect(() => {
6607
6622
  if (!isOpen) return;
6608
6623
  function handleWindowMouseMove(event) {
6609
6624
  if (!referenceElement) return;
@@ -6618,23 +6633,23 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6618
6633
  window.removeEventListener("mousemove", handleWindowMouseMove);
6619
6634
  };
6620
6635
  }, [isOpen, referenceElement]);
6621
- useEffect(() => {
6636
+ react.useEffect(() => {
6622
6637
  if (disabled) setIsOpen(false);
6623
6638
  }, [disabled]);
6624
- useEffect(() => {
6639
+ react.useEffect(() => {
6625
6640
  if (!content) setIsOpen(false);
6626
6641
  }, [content]);
6627
- useEffect(() => reference(referenceElement), [reference, referenceElement]);
6628
- const setArrow = useCallback(arrowEl => {
6642
+ react.useEffect(() => reference(referenceElement), [reference, referenceElement]);
6643
+ const setArrow = react.useCallback(arrowEl => {
6629
6644
  arrowRef.current = arrowEl;
6630
6645
  update();
6631
6646
  }, [update]);
6632
- const setFloating = useCallback(node => {
6647
+ const setFloating = react.useCallback(node => {
6633
6648
  forwardedRef.current = node;
6634
6649
  floating(node);
6635
6650
  }, [floating, forwardedRef]);
6636
6651
  const childRef = childProp == null ? void 0 : childProp.ref;
6637
- const setReference = useCallback(node => {
6652
+ const setReference = react.useCallback(node => {
6638
6653
  if (typeof childRef === "function") {
6639
6654
  childRef(node);
6640
6655
  } else if (childRef) {
@@ -6642,9 +6657,9 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6642
6657
  }
6643
6658
  setReferenceElement(node);
6644
6659
  }, [childRef]);
6645
- const child = useMemo(() => {
6660
+ const child = react.useMemo(() => {
6646
6661
  if (!childProp) return null;
6647
- return cloneElement(childProp, {
6662
+ return react.cloneElement(childProp, {
6648
6663
  onBlur: handleBlur,
6649
6664
  onFocus: handleFocus,
6650
6665
  onMouseEnter: handleMouseEnter,
@@ -6652,40 +6667,40 @@ const Tooltip = forwardRef(function Tooltip2(props, ref) {
6652
6667
  ref: setReference
6653
6668
  });
6654
6669
  }, [childProp, handleBlur, handleFocus, handleMouseEnter, handleMouseLeave, setReference]);
6655
- if (!child) return /* @__PURE__ */jsx(Fragment, {});
6670
+ if (!child) return /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {});
6656
6671
  if (disabled) return child;
6657
- const root = /* @__PURE__ */jsx(Root$a, _objectSpread(_objectSpread({
6672
+ const root = /* @__PURE__ */jsxRuntime.jsx(Root$a, _objectSpread(_objectSpread({
6658
6673
  "data-ui": "Tooltip"
6659
6674
  }, restProps), {}, {
6660
6675
  ref: setFloating,
6661
6676
  style: rootStyle,
6662
6677
  zOffset,
6663
- children: /* @__PURE__ */jsxs(Card, {
6678
+ children: /* @__PURE__ */jsxRuntime.jsxs(Card, {
6664
6679
  "data-ui": "Tooltip__card",
6665
6680
  "data-placement": placement,
6666
6681
  padding,
6667
6682
  radius: 2,
6668
6683
  scheme,
6669
6684
  shadow,
6670
- children: [content, /* @__PURE__ */jsx(TooltipArrow, {
6685
+ children: [content, /* @__PURE__ */jsxRuntime.jsx(TooltipArrow, {
6671
6686
  ref: setArrow,
6672
6687
  style: arrowStyle
6673
6688
  })]
6674
6689
  })
6675
6690
  }));
6676
- return /* @__PURE__ */jsxs(Fragment, {
6677
- children: [child, isOpen && /* @__PURE__ */jsx(Fragment, {
6678
- children: portal ? /* @__PURE__ */jsx(Portal, {
6691
+ return /* @__PURE__ */jsxRuntime.jsxs(jsxRuntime.Fragment, {
6692
+ children: [child, isOpen && /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {
6693
+ children: portal ? /* @__PURE__ */jsxRuntime.jsx(Portal, {
6679
6694
  __unstable_name: typeof portal === "string" ? portal : void 0,
6680
6695
  children: root
6681
6696
  }) : root
6682
6697
  })]
6683
6698
  });
6684
6699
  });
6685
- const Root$9 = styled.div(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["\n line-height: 0;\n"])));
6686
- const ListBox = styled(Box)(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
6687
- const rotate = keyframes(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
6688
- const AnimatedSpinnerIcon = styled(SpinnerIcon)(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
6700
+ const Root$9 = styled__default.default.div(_templateObject61 || (_templateObject61 = _taggedTemplateLiteral(["\n line-height: 0;\n"])));
6701
+ const ListBox = styled__default.default(Box)(_templateObject62 || (_templateObject62 = _taggedTemplateLiteral(["\n & > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n }\n"])));
6702
+ const rotate = styled.keyframes(_templateObject63 || (_templateObject63 = _taggedTemplateLiteral(["\n from {\n transform: rotate(0deg);\n }\n\n to {\n transform: rotate(360deg);\n }\n"])));
6703
+ const AnimatedSpinnerIcon = styled__default.default(icons.SpinnerIcon)(_templateObject64 || (_templateObject64 = _taggedTemplateLiteral(["\n animation: ", " 500ms linear infinite;\n"])), rotate);
6689
6704
  function AutocompleteOption(props) {
6690
6705
  const {
6691
6706
  children,
@@ -6694,17 +6709,17 @@ function AutocompleteOption(props) {
6694
6709
  selected,
6695
6710
  value
6696
6711
  } = props;
6697
- const handleClick = useCallback(() => {
6712
+ const handleClick = react.useCallback(() => {
6698
6713
  setTimeout(() => {
6699
6714
  onSelect(value);
6700
6715
  }, 0);
6701
6716
  }, [onSelect, value]);
6702
- const handleKeyDown = useCallback(event => {
6717
+ const handleKeyDown = react.useCallback(event => {
6703
6718
  if (event.key === "Enter" && !_isEnterToClickElement(event.currentTarget)) {
6704
6719
  handleClick();
6705
6720
  }
6706
6721
  }, [handleClick]);
6707
- return /* @__PURE__ */jsx("li", {
6722
+ return /* @__PURE__ */jsxRuntime.jsx("li", {
6708
6723
  "aria-selected": selected,
6709
6724
  "data-ui": "AutocompleteOption",
6710
6725
  id,
@@ -6776,7 +6791,7 @@ const AUTOCOMPLETE_POPOVER_PLACEMENT = "bottom-start";
6776
6791
  const AUTOCOMPLETE_POPOVER_FALLBACK_PLACEMENTS = ["bottom-start", "top-start"];
6777
6792
  const DEFAULT_RENDER_VALUE = (value, option) => option ? option.value : value;
6778
6793
  const DEFAULT_FILTER_OPTION = (query, option) => option.value.toLowerCase().indexOf(query.toLowerCase()) > -1;
6779
- const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6794
+ const InnerAutocomplete = react.forwardRef(function InnerAutocomplete2(props, ref) {
6780
6795
  const {
6781
6796
  border = true,
6782
6797
  customValidity,
@@ -6807,7 +6822,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6807
6822
  value: valueProp
6808
6823
  } = props,
6809
6824
  restProps = _objectWithoutProperties(props, _excluded31);
6810
- const [state, dispatch] = useReducer(autocompleteReducer, {
6825
+ const [state, dispatch] = react.useReducer(autocompleteReducer, {
6811
6826
  activeValue: valueProp || null,
6812
6827
  focused: false,
6813
6828
  listFocused: false,
@@ -6821,16 +6836,16 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6821
6836
  query,
6822
6837
  value
6823
6838
  } = state;
6824
- const defaultRenderOption = useCallback(_ref22 => {
6839
+ const defaultRenderOption = react.useCallback(_ref22 => {
6825
6840
  let {
6826
6841
  value: value2
6827
6842
  } = _ref22;
6828
- return /* @__PURE__ */jsx(Card, {
6843
+ return /* @__PURE__ */jsxRuntime.jsx(Card, {
6829
6844
  "data-as": "button",
6830
6845
  padding: paddingProp,
6831
6846
  radius: 2,
6832
6847
  tone: "inherit",
6833
- children: /* @__PURE__ */jsx(Text, {
6848
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
6834
6849
  size: fontSize,
6835
6850
  textOverflow: "ellipsis",
6836
6851
  children: value2
@@ -6839,24 +6854,24 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6839
6854
  }, [fontSize, paddingProp]);
6840
6855
  const renderOption = typeof renderOptionProp === "function" ? renderOptionProp : defaultRenderOption;
6841
6856
  const filterOption = typeof filterOptionProp === "function" ? filterOptionProp : DEFAULT_FILTER_OPTION;
6842
- const rootElementRef = useRef(null);
6843
- const resultsPopoverElementRef = useRef(null);
6844
- const inputElementRef = useRef(null);
6845
- const listBoxElementRef = useRef(null);
6846
- const listFocusedRef = useRef(false);
6847
- const valueRef = useRef(value);
6848
- const valuePropRef = useRef(valueProp);
6849
- const popoverMouseWithinRef = useRef(false);
6857
+ const rootElementRef = react.useRef(null);
6858
+ const resultsPopoverElementRef = react.useRef(null);
6859
+ const inputElementRef = react.useRef(null);
6860
+ const listBoxElementRef = react.useRef(null);
6861
+ const listFocusedRef = react.useRef(false);
6862
+ const valueRef = react.useRef(value);
6863
+ const valuePropRef = react.useRef(valueProp);
6864
+ const popoverMouseWithinRef = react.useRef(false);
6850
6865
  const forwardedRef = useForwardedRef(ref);
6851
6866
  const listBoxId = "".concat(id, "-listbox");
6852
6867
  const options = Array.isArray(optionsProp) ? optionsProp : EMPTY_ARRAY;
6853
6868
  const padding = useArrayProp(paddingProp);
6854
- const currentOption = useMemo(() => value !== null ? options.find(o => o.value === value) : void 0, [options, value]);
6855
- const filteredOptions = useMemo(() => options.filter(option => query ? filterOption(query, option) : true), [filterOption, options, query]);
6869
+ const currentOption = react.useMemo(() => value !== null ? options.find(o => o.value === value) : void 0, [options, value]);
6870
+ const filteredOptions = react.useMemo(() => options.filter(option => query ? filterOption(query, option) : true), [filterOption, options, query]);
6856
6871
  const filteredOptionsLen = filteredOptions.length;
6857
6872
  const activeItemId = activeValue ? "".concat(id, "-option-").concat(activeValue) : void 0;
6858
6873
  const expanded = query !== null && loading || focused && query !== null;
6859
- const handleRootBlur = useCallback(event => {
6874
+ const handleRootBlur = react.useCallback(event => {
6860
6875
  setTimeout(() => {
6861
6876
  if (popoverMouseWithinRef.current) {
6862
6877
  return;
@@ -6881,7 +6896,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6881
6896
  }
6882
6897
  }, 0);
6883
6898
  }, [onBlur, onQueryChange, relatedElements]);
6884
- const handleRootFocus = useCallback(event => {
6899
+ const handleRootFocus = react.useCallback(event => {
6885
6900
  const listBoxElement = listBoxElementRef.current;
6886
6901
  const focusedElement = event.target instanceof HTMLElement ? event.target : null;
6887
6902
  const listFocused2 = (listBoxElement == null ? void 0 : listBoxElement.contains(focusedElement)) || false;
@@ -6893,7 +6908,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6893
6908
  });
6894
6909
  }
6895
6910
  }, []);
6896
- const handleOptionSelect = useCallback(v => {
6911
+ const handleOptionSelect = react.useCallback(v => {
6897
6912
  var _a;
6898
6913
  dispatch({
6899
6914
  type: "value/change",
@@ -6906,7 +6921,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6906
6921
  if (onQueryChange) onQueryChange(null);
6907
6922
  (_a = inputElementRef.current) == null ? void 0 : _a.focus();
6908
6923
  }, [onChange, onSelect, onQueryChange]);
6909
- const handleRootKeyDown = useCallback(event => {
6924
+ const handleRootKeyDown = react.useCallback(event => {
6910
6925
  var _a, _b;
6911
6926
  if (event.key === "ArrowDown") {
6912
6927
  event.preventDefault();
@@ -6954,7 +6969,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6954
6969
  return;
6955
6970
  }
6956
6971
  }, [activeValue, filteredOptions, filteredOptionsLen, onQueryChange]);
6957
- const handleInputChange = useCallback(event => {
6972
+ const handleInputChange = react.useCallback(event => {
6958
6973
  const nextQuery = event.currentTarget.value;
6959
6974
  dispatch({
6960
6975
  type: "input/change",
@@ -6962,7 +6977,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6962
6977
  });
6963
6978
  if (onQueryChange) onQueryChange(nextQuery);
6964
6979
  }, [onQueryChange]);
6965
- const handleInputFocus = useCallback(event => {
6980
+ const handleInputFocus = react.useCallback(event => {
6966
6981
  if (!focused) {
6967
6982
  dispatch({
6968
6983
  type: "input/focus"
@@ -6970,13 +6985,13 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6970
6985
  if (onFocus) onFocus(event);
6971
6986
  }
6972
6987
  }, [focused, onFocus]);
6973
- const handlePopoverMouseEnter = useCallback(() => {
6988
+ const handlePopoverMouseEnter = react.useCallback(() => {
6974
6989
  popoverMouseWithinRef.current = true;
6975
6990
  }, []);
6976
- const handlePopoverMouseLeave = useCallback(() => {
6991
+ const handlePopoverMouseLeave = react.useCallback(() => {
6977
6992
  popoverMouseWithinRef.current = false;
6978
6993
  }, []);
6979
- const handleClearButtonClick = useCallback(() => {
6994
+ const handleClearButtonClick = react.useCallback(() => {
6980
6995
  var _a;
6981
6996
  dispatch({
6982
6997
  type: "root/clear"
@@ -6986,12 +7001,12 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
6986
7001
  if (onQueryChange) onQueryChange(null);
6987
7002
  (_a = inputElementRef.current) == null ? void 0 : _a.focus();
6988
7003
  }, [onChange, onQueryChange]);
6989
- const handleClearButtonFocus = useCallback(() => {
7004
+ const handleClearButtonFocus = react.useCallback(() => {
6990
7005
  dispatch({
6991
7006
  type: "input/focus"
6992
7007
  });
6993
7008
  }, []);
6994
- useEffect(() => {
7009
+ react.useEffect(() => {
6995
7010
  if (valueProp !== valuePropRef.current) {
6996
7011
  valuePropRef.current = valueProp;
6997
7012
  if (valueProp !== void 0) {
@@ -7011,7 +7026,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7011
7026
  });
7012
7027
  }
7013
7028
  }, [valueProp]);
7014
- useEffect(() => {
7029
+ react.useEffect(() => {
7015
7030
  if (!focused && valueRef.current) {
7016
7031
  dispatch({
7017
7032
  type: "root/setActiveValue",
@@ -7019,7 +7034,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7019
7034
  });
7020
7035
  }
7021
7036
  }, [focused]);
7022
- useEffect(() => {
7037
+ react.useEffect(() => {
7023
7038
  const listElement = listBoxElementRef.current;
7024
7039
  if (!listElement) return;
7025
7040
  const activeOption = filteredOptions.find(o => o.value === activeValue);
@@ -7034,11 +7049,11 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7034
7049
  }
7035
7050
  }
7036
7051
  }, [activeValue, filteredOptions]);
7037
- const setRef = useCallback(el => {
7052
+ const setRef = react.useCallback(el => {
7038
7053
  inputElementRef.current = el;
7039
7054
  forwardedRef.current = el;
7040
7055
  }, [forwardedRef]);
7041
- const clearButton = useMemo(() => {
7056
+ const clearButton = react.useMemo(() => {
7042
7057
  if (!loading && !disabled && value) {
7043
7058
  return {
7044
7059
  "aria-label": "Clear",
@@ -7047,15 +7062,15 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7047
7062
  }
7048
7063
  return void 0;
7049
7064
  }, [disabled, handleClearButtonFocus, loading, value]);
7050
- const openButtonBoxPadding = useMemo(() => padding.map(v => {
7065
+ const openButtonBoxPadding = react.useMemo(() => padding.map(v => {
7051
7066
  if (v === 0) return 0;
7052
7067
  if (v === 1) return 1;
7053
7068
  if (v === 2) return 1;
7054
7069
  return v - 2;
7055
7070
  }), [padding]);
7056
- const openButtonPadding = useMemo(() => padding.map(v => Math.max(v - 1, 0)), [padding]);
7057
- const openButtonProps = useMemo(() => typeof openButton === "object" ? openButton : EMPTY_RECORD, [openButton]);
7058
- const handleOpenClick = useCallback(event => {
7071
+ const openButtonPadding = react.useMemo(() => padding.map(v => Math.max(v - 1, 0)), [padding]);
7072
+ const openButtonProps = react.useMemo(() => typeof openButton === "object" ? openButton : EMPTY_RECORD, [openButton]);
7073
+ const handleOpenClick = react.useCallback(event => {
7059
7074
  dispatch({
7060
7075
  type: "root/open",
7061
7076
  query: value ? renderValue(value, currentOption) : ""
@@ -7066,21 +7081,21 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7066
7081
  return (_a = inputElementRef.current) == null ? void 0 : _a.focus();
7067
7082
  });
7068
7083
  }, [currentOption, openButtonProps, renderValue, value]);
7069
- const openButtonNode = useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */jsx(Box, {
7084
+ const openButtonNode = react.useMemo(() => !disabled && !readOnly && openButton ? /* @__PURE__ */jsxRuntime.jsx(Box, {
7070
7085
  "aria-hidden": expanded,
7071
7086
  padding: openButtonBoxPadding,
7072
- children: /* @__PURE__ */jsx(Button, _objectSpread(_objectSpread({
7087
+ children: /* @__PURE__ */jsxRuntime.jsx(Button, _objectSpread(_objectSpread({
7073
7088
  "aria-label": "Open",
7074
7089
  disabled: expanded,
7075
7090
  fontSize,
7076
- icon: ChevronDownIcon,
7091
+ icon: icons.ChevronDownIcon,
7077
7092
  mode: "bleed",
7078
7093
  padding: openButtonPadding
7079
7094
  }, openButtonProps), {}, {
7080
7095
  onClick: handleOpenClick
7081
7096
  }))
7082
7097
  }) : void 0, [disabled, expanded, fontSize, handleOpenClick, openButton, openButtonBoxPadding, openButtonPadding, openButtonProps, readOnly]);
7083
- const inputValue = useMemo(() => {
7098
+ const inputValue = react.useMemo(() => {
7084
7099
  if (query === null) {
7085
7100
  if (value !== null) {
7086
7101
  return renderValue(value, currentOption);
@@ -7089,7 +7104,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7089
7104
  }
7090
7105
  return query;
7091
7106
  }, [currentOption, query, renderValue, value]);
7092
- const input = /* @__PURE__ */jsx(TextInput, _objectSpread(_objectSpread({}, restProps), {}, {
7107
+ const input = /* @__PURE__ */jsxRuntime.jsx(TextInput, _objectSpread(_objectSpread({}, restProps), {}, {
7093
7108
  "aria-activedescendant": activeItemId,
7094
7109
  "aria-autocomplete": "list",
7095
7110
  "aria-expanded": expanded,
@@ -7119,21 +7134,21 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7119
7134
  suffix: suffix || openButtonNode,
7120
7135
  value: inputValue
7121
7136
  }));
7122
- const handleListBoxKeyDown = useCallback(event => {
7137
+ const handleListBoxKeyDown = react.useCallback(event => {
7123
7138
  var _a;
7124
7139
  if (event.key === "Tab") {
7125
7140
  if (listFocused) (_a = inputElementRef.current) == null ? void 0 : _a.focus();
7126
7141
  }
7127
7142
  }, [listFocused]);
7128
- const content = useMemo(() => {
7143
+ const content = react.useMemo(() => {
7129
7144
  if (filteredOptions.length === 0) return null;
7130
- return /* @__PURE__ */jsx(ListBox, _objectSpread(_objectSpread({
7145
+ return /* @__PURE__ */jsxRuntime.jsx(ListBox, _objectSpread(_objectSpread({
7131
7146
  "data-ui": "AutoComplete__results",
7132
7147
  onKeyDown: handleListBoxKeyDown,
7133
7148
  padding: 1
7134
7149
  }, listBox), {}, {
7135
7150
  tabIndex: -1,
7136
- children: /* @__PURE__ */jsx(Stack, {
7151
+ children: /* @__PURE__ */jsxRuntime.jsx(Stack, {
7137
7152
  as: "ul",
7138
7153
  "aria-multiselectable": false,
7139
7154
  "data-ui": "AutoComplete__resultsList",
@@ -7143,12 +7158,12 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7143
7158
  space: 1,
7144
7159
  children: filteredOptions.map(option => {
7145
7160
  const active = activeValue !== null ? option.value === activeValue : currentOption === option;
7146
- return /* @__PURE__ */jsx(AutocompleteOption, {
7161
+ return /* @__PURE__ */jsxRuntime.jsx(AutocompleteOption, {
7147
7162
  id: "".concat(id, "-option-").concat(option.value),
7148
7163
  onSelect: handleOptionSelect,
7149
7164
  selected: active,
7150
7165
  value: option.value,
7151
- children: cloneElement(renderOption(option), {
7166
+ children: react.cloneElement(renderOption(option), {
7152
7167
  disabled: loading,
7153
7168
  selected: active,
7154
7169
  tabIndex: listFocused && active ? 0 : -1
@@ -7158,7 +7173,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7158
7173
  })
7159
7174
  }));
7160
7175
  }, [activeValue, currentOption, filteredOptions, handleOptionSelect, handleListBoxKeyDown, id, listBox, listBoxId, listFocused, loading, renderOption]);
7161
- const results = useMemo(() => {
7176
+ const results = react.useMemo(() => {
7162
7177
  if (renderPopover) {
7163
7178
  return renderPopover({
7164
7179
  content,
@@ -7171,7 +7186,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7171
7186
  if (filteredOptionsLen === 0) {
7172
7187
  return null;
7173
7188
  }
7174
- return /* @__PURE__ */jsx(Popover, _objectSpread({
7189
+ return /* @__PURE__ */jsxRuntime.jsx(Popover, _objectSpread({
7175
7190
  arrow: false,
7176
7191
  constrainSize: true,
7177
7192
  content,
@@ -7188,7 +7203,7 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7188
7203
  referenceElement: inputElementRef.current
7189
7204
  }, popover));
7190
7205
  }, [content, expanded, filteredOptionsLen, handlePopoverMouseEnter, handlePopoverMouseLeave, popover, radius, renderPopover]);
7191
- return /* @__PURE__ */jsxs(Root$9, {
7206
+ return /* @__PURE__ */jsxRuntime.jsxs(Root$9, {
7192
7207
  "data-ui": "Autocomplete",
7193
7208
  onBlur: handleRootBlur,
7194
7209
  onFocus: handleRootFocus,
@@ -7198,9 +7213,9 @@ const InnerAutocomplete = forwardRef(function InnerAutocomplete2(props, ref) {
7198
7213
  });
7199
7214
  });
7200
7215
  const Autocomplete = InnerAutocomplete;
7201
- const Root$8 = styled.ol(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n display: flex;\n list-style: none;\n align-items: center;\n white-space: nowrap;\n line-height: 0;\n"])));
7202
- const ExpandButton = styled(Button)(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["\n appearance: none;\n margin: -4px;\n"])));
7203
- const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7216
+ const Root$8 = styled__default.default.ol(_templateObject65 || (_templateObject65 = _taggedTemplateLiteral(["\n margin: 0;\n padding: 0;\n display: flex;\n list-style: none;\n align-items: center;\n white-space: nowrap;\n line-height: 0;\n"])));
7217
+ const ExpandButton = styled__default.default(Button)(_templateObject66 || (_templateObject66 = _taggedTemplateLiteral(["\n appearance: none;\n margin: -4px;\n"])));
7218
+ const Breadcrumbs = react.forwardRef(function Breadcrumbs2(props, ref) {
7204
7219
  const {
7205
7220
  children,
7206
7221
  maxLength,
@@ -7209,23 +7224,23 @@ const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7209
7224
  } = props,
7210
7225
  restProps = _objectWithoutProperties(props, _excluded32);
7211
7226
  const space = useArrayProp(spaceRaw);
7212
- const [open, setOpen] = useState(false);
7213
- const [expandElement, setExpandElement] = useState(null);
7214
- const [popoverElement, setPopoverElement] = useState(null);
7215
- const collapse = useCallback(() => setOpen(false), []);
7216
- const expand = useCallback(() => setOpen(true), []);
7227
+ const [open, setOpen] = react.useState(false);
7228
+ const [expandElement, setExpandElement] = react.useState(null);
7229
+ const [popoverElement, setPopoverElement] = react.useState(null);
7230
+ const collapse = react.useCallback(() => setOpen(false), []);
7231
+ const expand = react.useCallback(() => setOpen(true), []);
7217
7232
  useClickOutside(collapse, [expandElement, popoverElement]);
7218
- const rawItems = useMemo(() => Children.toArray(children).filter(child => {
7219
- return isValidElement(child);
7233
+ const rawItems = react.useMemo(() => react.Children.toArray(children).filter(child => {
7234
+ return react.isValidElement(child);
7220
7235
  }), [children]);
7221
- const items = useMemo(() => {
7236
+ const items = react.useMemo(() => {
7222
7237
  const len = rawItems.length;
7223
7238
  if (maxLength && len > maxLength) {
7224
7239
  const beforeLength = Math.ceil(maxLength / 2);
7225
7240
  const afterLength = Math.floor(maxLength / 2);
7226
- return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */jsx(Popover, {
7241
+ return [...rawItems.slice(0, beforeLength - 1), /* @__PURE__ */jsxRuntime.jsx(Popover, {
7227
7242
  constrainSize: true,
7228
- content: /* @__PURE__ */jsx(Stack, {
7243
+ content: /* @__PURE__ */jsxRuntime.jsx(Stack, {
7229
7244
  as: "ol",
7230
7245
  overflow: "auto",
7231
7246
  padding: space,
@@ -7236,7 +7251,7 @@ const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7236
7251
  placement: "top",
7237
7252
  portal: true,
7238
7253
  ref: setPopoverElement,
7239
- children: /* @__PURE__ */jsx(ExpandButton, {
7254
+ children: /* @__PURE__ */jsxRuntime.jsx(ExpandButton, {
7240
7255
  fontSize: 1,
7241
7256
  mode: "bleed",
7242
7257
  onClick: open ? collapse : expand,
@@ -7249,20 +7264,20 @@ const Breadcrumbs = forwardRef(function Breadcrumbs2(props, ref) {
7249
7264
  }
7250
7265
  return rawItems;
7251
7266
  }, [collapse, expand, maxLength, open, rawItems, space]);
7252
- return /* @__PURE__ */jsx(Root$8, _objectSpread(_objectSpread({
7267
+ return /* @__PURE__ */jsxRuntime.jsx(Root$8, _objectSpread(_objectSpread({
7253
7268
  "data-ui": "Breadcrumbs"
7254
7269
  }, restProps), {}, {
7255
7270
  ref,
7256
- children: items.map((item, itemIndex) => /* @__PURE__ */jsxs(Fragment$1, {
7257
- children: [itemIndex > 0 && /* @__PURE__ */jsx(Box, {
7271
+ children: items.map((item, itemIndex) => /* @__PURE__ */jsxRuntime.jsxs(react.Fragment, {
7272
+ children: [itemIndex > 0 && /* @__PURE__ */jsxRuntime.jsx(Box, {
7258
7273
  "aria-hidden": true,
7259
7274
  as: "li",
7260
7275
  paddingX: space,
7261
- children: separator || /* @__PURE__ */jsx(Text, {
7276
+ children: separator || /* @__PURE__ */jsxRuntime.jsx(Text, {
7262
7277
  muted: true,
7263
7278
  children: "/"
7264
7279
  })
7265
- }), /* @__PURE__ */jsx(Box, {
7280
+ }), /* @__PURE__ */jsxRuntime.jsx(Box, {
7266
7281
  as: "li",
7267
7282
  children: item
7268
7283
  })]
@@ -7302,21 +7317,21 @@ function responsiveDialogPositionStyle(props) {
7302
7317
  }));
7303
7318
  }
7304
7319
  const key$3 = Symbol.for("@sanity/ui/context/dialog");
7305
- globalScope[key$3] = globalScope[key$3] || createContext({
7320
+ globalScope[key$3] = globalScope[key$3] || react.createContext({
7306
7321
  version: 0
7307
7322
  });
7308
7323
  const DialogContext = globalScope[key$3];
7309
7324
  function useDialog() {
7310
- return useContext(DialogContext);
7325
+ return react.useContext(DialogContext);
7311
7326
  }
7312
- const Root$7 = styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
7313
- const DialogContainer = styled(Container)(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
7314
- const DialogCardRoot = styled(Card)(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n min-height: 0;\n max-height: 100%;\n overflow: hidden;\n"])));
7315
- const DialogLayout = styled(Flex)(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
7316
- const DialogHeader = styled(Card)(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 2;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n bottom: -1px;\n border-bottom: 1px solid var(--card-hairline-soft-color);\n }\n"])));
7317
- const DialogContent = styled(Box)(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
7318
- const DialogFooter = styled(Box)(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
7319
- const DialogCard = forwardRef(function DialogCard2(props, ref) {
7327
+ const Root$7 = styled__default.default(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle);
7328
+ const DialogContainer = styled__default.default(Container)(_templateObject67 || (_templateObject67 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n height: 100%;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n"])));
7329
+ const DialogCardRoot = styled__default.default(Card)(_templateObject68 || (_templateObject68 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: flex;\n }\n width: 100%;\n min-height: 0;\n max-height: 100%;\n overflow: hidden;\n"])));
7330
+ const DialogLayout = styled__default.default(Flex)(_templateObject69 || (_templateObject69 = _taggedTemplateLiteral(["\n flex: 1;\n min-height: 0;\n width: 100%;\n"])));
7331
+ const DialogHeader = styled__default.default(Card)(_templateObject70 || (_templateObject70 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 2;\n\n &:after {\n content: '';\n display: block;\n position: absolute;\n left: 0;\n right: 0;\n bottom: -1px;\n border-bottom: 1px solid var(--card-hairline-soft-color);\n }\n"])));
7332
+ const DialogContent = styled__default.default(Box)(_templateObject71 || (_templateObject71 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 1;\n overflow: auto;\n outline: none;\n"])));
7333
+ const DialogFooter = styled__default.default(Box)(_templateObject72 || (_templateObject72 = _taggedTemplateLiteral(["\n position: relative;\n z-index: 3;\n border-top: 1px solid var(--card-hairline-soft-color);\n"])));
7334
+ const DialogCard = react.forwardRef(function DialogCard2(props, ref) {
7320
7335
  const {
7321
7336
  __unstable_autoFocus: autoFocus,
7322
7337
  __unstable_hideCloseButton: hideCloseButton,
@@ -7336,8 +7351,8 @@ const DialogCard = forwardRef(function DialogCard2(props, ref) {
7336
7351
  const shadow = useArrayProp(shadowProp);
7337
7352
  const width = useArrayProp(widthProp);
7338
7353
  const forwardedRef = useForwardedRef(ref);
7339
- const [rootElement, setRootElement] = useState(null);
7340
- const localContentRef = useRef(null);
7354
+ const [rootElement, setRootElement] = react.useState(null);
7355
+ const localContentRef = react.useRef(null);
7341
7356
  const layer = useLayer();
7342
7357
  const {
7343
7358
  isTopLayer
@@ -7345,13 +7360,13 @@ const DialogCard = forwardRef(function DialogCard2(props, ref) {
7345
7360
  const labelId = "".concat(id, "_label");
7346
7361
  const showCloseButton = Boolean(onClose) && hideCloseButton === false;
7347
7362
  const showHeader = Boolean(header) || showCloseButton;
7348
- useEffect(() => {
7363
+ react.useEffect(() => {
7349
7364
  if (!autoFocus) return;
7350
7365
  if (forwardedRef.current) {
7351
7366
  focusFirstDescendant(forwardedRef.current);
7352
7367
  }
7353
7368
  }, [autoFocus, forwardedRef]);
7354
- useGlobalKeyDown(useCallback(event => {
7369
+ useGlobalKeyDown(react.useCallback(event => {
7355
7370
  if (!isTopLayer || !onClose) return;
7356
7371
  if (event.key === "Escape") {
7357
7372
  event.preventDefault();
@@ -7359,63 +7374,63 @@ const DialogCard = forwardRef(function DialogCard2(props, ref) {
7359
7374
  onClose();
7360
7375
  }
7361
7376
  }, [isTopLayer, onClose]));
7362
- useClickOutside(useCallback(() => {
7377
+ useClickOutside(react.useCallback(() => {
7363
7378
  if (!isTopLayer || !onClickOutside) return;
7364
7379
  onClickOutside();
7365
7380
  }, [isTopLayer, onClickOutside]), [rootElement]);
7366
- const setRef = useCallback(el => {
7381
+ const setRef = react.useCallback(el => {
7367
7382
  setRootElement(el);
7368
7383
  forwardedRef.current = el;
7369
7384
  }, [forwardedRef]);
7370
- const setContentRef = useCallback(el => {
7385
+ const setContentRef = react.useCallback(el => {
7371
7386
  localContentRef.current = el;
7372
7387
  if (typeof contentRef === "function") contentRef(el);else if (contentRef) contentRef.current = el;
7373
7388
  }, [contentRef]);
7374
- return /* @__PURE__ */jsx(DialogContainer, {
7389
+ return /* @__PURE__ */jsxRuntime.jsx(DialogContainer, {
7375
7390
  "data-ui": "DialogCard",
7376
7391
  width,
7377
- children: /* @__PURE__ */jsx(DialogCardRoot, {
7392
+ children: /* @__PURE__ */jsxRuntime.jsx(DialogCardRoot, {
7378
7393
  radius,
7379
7394
  ref: setRef,
7380
7395
  scheme,
7381
7396
  shadow,
7382
- children: /* @__PURE__ */jsxs(DialogLayout, {
7397
+ children: /* @__PURE__ */jsxRuntime.jsxs(DialogLayout, {
7383
7398
  direction: "column",
7384
- children: [showHeader && /* @__PURE__ */jsx(DialogHeader, {
7385
- children: /* @__PURE__ */jsxs(Flex, {
7386
- children: [/* @__PURE__ */jsx(Box, {
7399
+ children: [showHeader && /* @__PURE__ */jsxRuntime.jsx(DialogHeader, {
7400
+ children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
7401
+ children: [/* @__PURE__ */jsxRuntime.jsx(Box, {
7387
7402
  flex: 1,
7388
7403
  padding: 4,
7389
- children: header && /* @__PURE__ */jsx(Text, {
7404
+ children: header && /* @__PURE__ */jsxRuntime.jsx(Text, {
7390
7405
  id: labelId,
7391
7406
  weight: "semibold",
7392
7407
  children: header
7393
7408
  })
7394
- }), showCloseButton && /* @__PURE__ */jsx(Box, {
7409
+ }), showCloseButton && /* @__PURE__ */jsxRuntime.jsx(Box, {
7395
7410
  padding: 2,
7396
- children: /* @__PURE__ */jsx(Button, {
7411
+ children: /* @__PURE__ */jsxRuntime.jsx(Button, {
7397
7412
  "aria-label": "Close dialog",
7398
7413
  disabled: !onClose,
7399
- icon: CloseIcon,
7414
+ icon: icons.CloseIcon,
7400
7415
  mode: "bleed",
7401
7416
  onClick: onClose,
7402
7417
  padding: 3
7403
7418
  })
7404
7419
  })]
7405
7420
  })
7406
- }), /* @__PURE__ */jsx(DialogContent, {
7421
+ }), /* @__PURE__ */jsxRuntime.jsx(DialogContent, {
7407
7422
  flex: 1,
7408
7423
  ref: setContentRef,
7409
7424
  tabIndex: -1,
7410
7425
  children
7411
- }), footer && /* @__PURE__ */jsx(DialogFooter, {
7426
+ }), footer && /* @__PURE__ */jsxRuntime.jsx(DialogFooter, {
7412
7427
  children: footer
7413
7428
  })]
7414
7429
  })
7415
7430
  })
7416
7431
  });
7417
7432
  });
7418
- const Dialog = forwardRef(function Dialog2(props, ref) {
7433
+ const Dialog = react.forwardRef(function Dialog2(props, ref) {
7419
7434
  var _a;
7420
7435
  const dialog = useDialog();
7421
7436
  const theme = useTheme();
@@ -7444,10 +7459,10 @@ const Dialog = forwardRef(function Dialog2(props, ref) {
7444
7459
  const position = useArrayProp(positionProp);
7445
7460
  const width = useArrayProp(widthProp);
7446
7461
  const zOffset = useArrayProp(zOffsetProp);
7447
- const preDivRef = useRef(null);
7448
- const postDivRef = useRef(null);
7449
- const cardRef = useRef(null);
7450
- const handleFocus = useCallback(event => {
7462
+ const preDivRef = react.useRef(null);
7463
+ const postDivRef = react.useRef(null);
7464
+ const cardRef = react.useRef(null);
7465
+ const handleFocus = react.useCallback(event => {
7451
7466
  const target = event.target;
7452
7467
  const cardElement = cardRef.current;
7453
7468
  if (!cardElement) {
@@ -7463,9 +7478,9 @@ const Dialog = forwardRef(function Dialog2(props, ref) {
7463
7478
  }
7464
7479
  }, []);
7465
7480
  const labelId = "".concat(id, "_label");
7466
- return /* @__PURE__ */jsx(Portal, {
7481
+ return /* @__PURE__ */jsxRuntime.jsx(Portal, {
7467
7482
  __unstable_name: portal,
7468
- children: /* @__PURE__ */jsxs(Root$7, _objectSpread(_objectSpread({}, restProps), {}, {
7483
+ children: /* @__PURE__ */jsxRuntime.jsxs(Root$7, _objectSpread(_objectSpread({}, restProps), {}, {
7469
7484
  $padding: padding,
7470
7485
  $position: position,
7471
7486
  "aria-labelledby": labelId,
@@ -7476,10 +7491,10 @@ const Dialog = forwardRef(function Dialog2(props, ref) {
7476
7491
  ref,
7477
7492
  role: "dialog",
7478
7493
  zOffset,
7479
- children: [/* @__PURE__ */jsx("div", {
7494
+ children: [/* @__PURE__ */jsxRuntime.jsx("div", {
7480
7495
  ref: preDivRef,
7481
7496
  tabIndex: 0
7482
- }), /* @__PURE__ */jsx(DialogCard, {
7497
+ }), /* @__PURE__ */jsxRuntime.jsx(DialogCard, {
7483
7498
  __unstable_autoFocus: autoFocus,
7484
7499
  __unstable_hideCloseButton: hideCloseButton,
7485
7500
  contentRef,
@@ -7494,7 +7509,7 @@ const Dialog = forwardRef(function Dialog2(props, ref) {
7494
7509
  shadow: cardShadow,
7495
7510
  width,
7496
7511
  children
7497
- }), /* @__PURE__ */jsx("div", {
7512
+ }), /* @__PURE__ */jsxRuntime.jsx("div", {
7498
7513
  ref: postDivRef,
7499
7514
  tabIndex: 0
7500
7515
  })]
@@ -7507,19 +7522,19 @@ function DialogProvider(props) {
7507
7522
  position,
7508
7523
  zOffset
7509
7524
  } = props;
7510
- const contextValue = useMemo(() => ({
7525
+ const contextValue = react.useMemo(() => ({
7511
7526
  version: 0,
7512
7527
  position,
7513
7528
  zOffset
7514
7529
  }), [position, zOffset]);
7515
- return /* @__PURE__ */jsx(DialogContext.Provider, {
7530
+ return /* @__PURE__ */jsxRuntime.jsx(DialogContext.Provider, {
7516
7531
  value: contextValue,
7517
7532
  children
7518
7533
  });
7519
7534
  }
7520
- const Root$6 = styled.kbd(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
7521
- const Key = styled(KBD)(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n"])));
7522
- const Hotkeys = forwardRef(function Hotkeys2(props, ref) {
7535
+ const Root$6 = styled__default.default.kbd(_templateObject73 || (_templateObject73 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n font: inherit;\n"])));
7536
+ const Key = styled__default.default(KBD)(_templateObject74 || (_templateObject74 = _taggedTemplateLiteral(["\n &:not([hidden]) {\n display: block;\n }\n"])));
7537
+ const Hotkeys = react.forwardRef(function Hotkeys2(props, ref) {
7523
7538
  const {
7524
7539
  fontSize,
7525
7540
  keys,
@@ -7530,16 +7545,16 @@ const Hotkeys = forwardRef(function Hotkeys2(props, ref) {
7530
7545
  restProps = _objectWithoutProperties(props, _excluded34);
7531
7546
  const space = useArrayProp(spaceProp);
7532
7547
  if (!keys || keys.length === 0) {
7533
- return /* @__PURE__ */jsx(Fragment, {});
7548
+ return /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {});
7534
7549
  }
7535
- return /* @__PURE__ */jsx(Root$6, _objectSpread(_objectSpread({
7550
+ return /* @__PURE__ */jsxRuntime.jsx(Root$6, _objectSpread(_objectSpread({
7536
7551
  "data-ui": "Hotkeys"
7537
7552
  }, restProps), {}, {
7538
7553
  ref,
7539
- children: /* @__PURE__ */jsx(Inline, {
7554
+ children: /* @__PURE__ */jsxRuntime.jsx(Inline, {
7540
7555
  as: "span",
7541
7556
  space,
7542
- children: keys.map((key, i) => /* @__PURE__ */jsx(Key, {
7557
+ children: keys.map((key, i) => /* @__PURE__ */jsxRuntime.jsx(Key, {
7543
7558
  fontSize,
7544
7559
  padding,
7545
7560
  radius,
@@ -7549,7 +7564,7 @@ const Hotkeys = forwardRef(function Hotkeys2(props, ref) {
7549
7564
  }));
7550
7565
  });
7551
7566
  const key$2 = Symbol.for("@sanity/ui/context/menu");
7552
- globalScope[key$2] = globalScope[key$2] || createContext(null);
7567
+ globalScope[key$2] = globalScope[key$2] || react.createContext(null);
7553
7568
  const MenuContext = globalScope[key$2];
7554
7569
  function _isFocusable(element) {
7555
7570
  return isHTMLAnchorElement(element) && element.getAttribute("data-disabled") !== "true" || isHTMLButtonElement(element) && !element.disabled;
@@ -7601,17 +7616,17 @@ function useMenuController(props) {
7601
7616
  originElement,
7602
7617
  shouldFocus
7603
7618
  } = props;
7604
- const elementsRef = useRef([]);
7605
- const [rootElement, setRootElement] = useState(null);
7606
- const [activeIndex, _setActiveIndex] = useState(-1);
7607
- const activeIndexRef = useRef(activeIndex);
7619
+ const elementsRef = react.useRef([]);
7620
+ const [rootElement, setRootElement] = react.useState(null);
7621
+ const [activeIndex, _setActiveIndex] = react.useState(-1);
7622
+ const activeIndexRef = react.useRef(activeIndex);
7608
7623
  const activeElement = elementsRef.current[activeIndex] || null;
7609
7624
  const mounted = Boolean(rootElement);
7610
- const setActiveIndex = useCallback(nextActiveIndex => {
7625
+ const setActiveIndex = react.useCallback(nextActiveIndex => {
7611
7626
  _setActiveIndex(nextActiveIndex);
7612
7627
  activeIndexRef.current = nextActiveIndex;
7613
7628
  }, []);
7614
- const mount = useCallback((element, selected) => {
7629
+ const mount = react.useCallback((element, selected) => {
7615
7630
  if (!element) return () => void 0;
7616
7631
  if (elementsRef.current.indexOf(element) === -1) {
7617
7632
  elementsRef.current.push(element);
@@ -7628,7 +7643,7 @@ function useMenuController(props) {
7628
7643
  }
7629
7644
  };
7630
7645
  }, [rootElement, setActiveIndex]);
7631
- const handleKeyDown = useCallback(event => {
7646
+ const handleKeyDown = react.useCallback(event => {
7632
7647
  if (event.key === "Tab") {
7633
7648
  if (originElement) {
7634
7649
  originElement.focus();
@@ -7687,16 +7702,16 @@ function useMenuController(props) {
7687
7702
  onKeyDown(event);
7688
7703
  }
7689
7704
  }, [onKeyDown, originElement, setActiveIndex]);
7690
- const handleItemMouseEnter = useCallback(event => {
7705
+ const handleItemMouseEnter = react.useCallback(event => {
7691
7706
  const element = event.currentTarget;
7692
7707
  const currentIndex = elementsRef.current.indexOf(element);
7693
7708
  setActiveIndex(currentIndex);
7694
7709
  }, [setActiveIndex]);
7695
- const handleItemMouseLeave = useCallback(() => {
7710
+ const handleItemMouseLeave = react.useCallback(() => {
7696
7711
  rootElement == null ? void 0 : rootElement.focus();
7697
7712
  setActiveIndex(-1);
7698
7713
  }, [rootElement, setActiveIndex]);
7699
- useEffect(() => {
7714
+ react.useEffect(() => {
7700
7715
  if (!mounted) return;
7701
7716
  const rafId = window.requestAnimationFrame(() => {
7702
7717
  const _activeIndex = activeIndexRef.current;
@@ -7739,8 +7754,8 @@ function useMenuController(props) {
7739
7754
  setRootElement
7740
7755
  };
7741
7756
  }
7742
- const Root$5 = styled(Box)(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
7743
- const Menu = forwardRef(function Menu2(props, ref) {
7757
+ const Root$5 = styled__default.default(Box)(_templateObject75 || (_templateObject75 = _taggedTemplateLiteral(["\n outline: none;\n overflow: auto;\n"])));
7758
+ const Menu = react.forwardRef(function Menu2(props, ref) {
7744
7759
  const {
7745
7760
  children,
7746
7761
  focusFirst,
@@ -7775,26 +7790,26 @@ const Menu = forwardRef(function Menu2(props, ref) {
7775
7790
  originElement,
7776
7791
  shouldFocus
7777
7792
  });
7778
- const handleRefChange = useCallback(el => {
7793
+ const handleRefChange = react.useCallback(el => {
7779
7794
  setRootElement(el);
7780
7795
  forwardedRef.current = el;
7781
7796
  }, [forwardedRef, setRootElement]);
7782
- useEffect(() => {
7797
+ react.useEffect(() => {
7783
7798
  if (onItemSelect) onItemSelect(activeIndex);
7784
7799
  }, [activeIndex, onItemSelect]);
7785
- useClickOutside(useCallback(event => isTopLayer && onClickOutside && onClickOutside(event), [isTopLayer, onClickOutside]), [rootElement]);
7786
- useGlobalKeyDown(useCallback(event => {
7800
+ useClickOutside(react.useCallback(event => isTopLayer && onClickOutside && onClickOutside(event), [isTopLayer, onClickOutside]), [rootElement]);
7801
+ useGlobalKeyDown(react.useCallback(event => {
7787
7802
  if (!isTopLayer) return;
7788
7803
  if (event.key === "Escape") {
7789
7804
  event.stopPropagation();
7790
7805
  if (onEscape) onEscape();
7791
7806
  }
7792
7807
  }, [isTopLayer, onEscape]));
7793
- useEffect(() => {
7808
+ react.useEffect(() => {
7794
7809
  if (!rootElement || !registerElement) return;
7795
7810
  return registerElement(rootElement);
7796
7811
  }, [registerElement, rootElement]);
7797
- const value = useMemo(() => ({
7812
+ const value = react.useMemo(() => ({
7798
7813
  version: 0,
7799
7814
  activeElement,
7800
7815
  activeIndex,
@@ -7808,9 +7823,9 @@ const Menu = forwardRef(function Menu2(props, ref) {
7808
7823
  onMouseEnter: handleItemMouseEnter,
7809
7824
  onMouseLeave: handleItemMouseLeave
7810
7825
  }), [activeElement, activeIndex, mount, handleItemMouseEnter, handleItemMouseLeave, onClickOutside, onEscape, onItemClick, registerElement]);
7811
- return /* @__PURE__ */jsx(MenuContext.Provider, {
7826
+ return /* @__PURE__ */jsxRuntime.jsx(MenuContext.Provider, {
7812
7827
  value,
7813
- children: /* @__PURE__ */jsx(Root$5, _objectSpread(_objectSpread({
7828
+ children: /* @__PURE__ */jsxRuntime.jsx(Root$5, _objectSpread(_objectSpread({
7814
7829
  "data-ui": "Menu"
7815
7830
  }, restProps), {}, {
7816
7831
  onKeyDown: handleKeyDown,
@@ -7818,14 +7833,14 @@ const Menu = forwardRef(function Menu2(props, ref) {
7818
7833
  ref: handleRefChange,
7819
7834
  role: "menu",
7820
7835
  tabIndex: -1,
7821
- children: /* @__PURE__ */jsx(Stack, {
7836
+ children: /* @__PURE__ */jsxRuntime.jsx(Stack, {
7822
7837
  space,
7823
7838
  children
7824
7839
  })
7825
7840
  }))
7826
7841
  });
7827
7842
  });
7828
- const MenuButton = forwardRef(function MenuButton2(props, ref) {
7843
+ const MenuButton = react.forwardRef(function MenuButton2(props, ref) {
7829
7844
  const {
7830
7845
  __unstable_disableRestoreFocusOnClose: disableRestoreFocusOnClose = false,
7831
7846
  boundaryElement: deprecated_boundaryElement,
@@ -7840,24 +7855,24 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7840
7855
  popoverRadius: deprecated_popoverRadius,
7841
7856
  preventOverflow: deprecated_preventOverflow
7842
7857
  } = props;
7843
- const [open, setOpen] = useState(false);
7844
- const [shouldFocus, setShouldFocus] = useState(null);
7845
- const [buttonElement, setButtonElement] = useState(null);
7846
- const [menuElements, setChildMenuElements] = useState([]);
7847
- const openRef = useRef(open);
7848
- useEffect(() => {
7858
+ const [open, setOpen] = react.useState(false);
7859
+ const [shouldFocus, setShouldFocus] = react.useState(null);
7860
+ const [buttonElement, setButtonElement] = react.useState(null);
7861
+ const [menuElements, setChildMenuElements] = react.useState([]);
7862
+ const openRef = react.useRef(open);
7863
+ react.useEffect(() => {
7849
7864
  if (onClose && !open && openRef.current) {
7850
7865
  onClose();
7851
7866
  }
7852
7867
  }, [onClose, open]);
7853
- useEffect(() => {
7868
+ react.useEffect(() => {
7854
7869
  openRef.current = open;
7855
7870
  }, [open]);
7856
- const handleButtonClick = useCallback(() => {
7871
+ const handleButtonClick = react.useCallback(() => {
7857
7872
  setOpen(v => !v);
7858
7873
  setShouldFocus(null);
7859
7874
  }, []);
7860
- const handleButtonKeyDown = useCallback(event => {
7875
+ const handleButtonKeyDown = react.useCallback(event => {
7861
7876
  if (event.key === "ArrowDown" || event.key === "Enter" || event.key === " ") {
7862
7877
  event.preventDefault();
7863
7878
  setOpen(true);
@@ -7871,7 +7886,7 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7871
7886
  return;
7872
7887
  }
7873
7888
  }, []);
7874
- const handleMenuClickOutside = useCallback(event => {
7889
+ const handleMenuClickOutside = react.useCallback(event => {
7875
7890
  const target = event.target;
7876
7891
  if (!(target instanceof Node)) {
7877
7892
  return;
@@ -7886,12 +7901,12 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7886
7901
  }
7887
7902
  setOpen(false);
7888
7903
  }, [buttonElement, menuElements]);
7889
- const handleMenuEscape = useCallback(() => {
7904
+ const handleMenuEscape = react.useCallback(() => {
7890
7905
  setOpen(false);
7891
7906
  if (disableRestoreFocusOnClose) return;
7892
7907
  if (buttonElement) buttonElement.focus();
7893
7908
  }, [buttonElement, disableRestoreFocusOnClose]);
7894
- const handleBlur = useCallback(event => {
7909
+ const handleBlur = react.useCallback(event => {
7895
7910
  const target = event.relatedTarget;
7896
7911
  if (!(target instanceof Node)) {
7897
7912
  return;
@@ -7903,12 +7918,12 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7903
7918
  }
7904
7919
  setOpen(false);
7905
7920
  }, [menuElements]);
7906
- const handleItemClick = useCallback(() => {
7921
+ const handleItemClick = react.useCallback(() => {
7907
7922
  setOpen(false);
7908
7923
  if (disableRestoreFocusOnClose) return;
7909
7924
  if (buttonElement) buttonElement.focus();
7910
7925
  }, [buttonElement, disableRestoreFocusOnClose]);
7911
- const registerElement = useCallback(el => {
7926
+ const registerElement = react.useCallback(el => {
7912
7927
  setChildMenuElements(els => els.concat([el]));
7913
7928
  return () => {
7914
7929
  setChildMenuElements(els => {
@@ -7916,7 +7931,7 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7916
7931
  });
7917
7932
  };
7918
7933
  }, []);
7919
- const menuProps = useMemo(() => ({
7934
+ const menuProps = react.useMemo(() => ({
7920
7935
  "aria-labelledby": id,
7921
7936
  onBlurCapture: handleBlur,
7922
7937
  onClickOutside: handleMenuClickOutside,
@@ -7926,8 +7941,8 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7926
7941
  registerElement,
7927
7942
  shouldFocus
7928
7943
  }), [buttonElement, handleMenuClickOutside, handleMenuEscape, handleItemClick, id, handleBlur, registerElement, shouldFocus]);
7929
- const menu = isElement$1(menuProp) ? cloneElement(menuProp, menuProps) : null;
7930
- const setButtonRef = useCallback(el => {
7944
+ const menu = ReactIs.isElement(menuProp) ? react.cloneElement(menuProp, menuProps) : null;
7945
+ const setButtonRef = react.useCallback(el => {
7931
7946
  if (typeof ref === "function") {
7932
7947
  ref(el);
7933
7948
  } else if (ref) {
@@ -7935,7 +7950,7 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7935
7950
  }
7936
7951
  setButtonElement(el);
7937
7952
  }, [ref]);
7938
- const button = useMemo(() => isElement$1(buttonProp) ? cloneElement(buttonProp, {
7953
+ const button = react.useMemo(() => ReactIs.isElement(buttonProp) ? react.cloneElement(buttonProp, {
7939
7954
  "data-ui": "MenuButton",
7940
7955
  id,
7941
7956
  onClick: handleButtonClick,
@@ -7945,7 +7960,7 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7945
7960
  ref: setButtonRef,
7946
7961
  selected: open
7947
7962
  }) : null, [buttonProp, handleButtonClick, handleButtonKeyDown, id, open, setButtonRef]);
7948
- const popoverProps = useMemo(() => _objectSpread({
7963
+ const popoverProps = react.useMemo(() => _objectSpread({
7949
7964
  boundaryElement: deprecated_boundaryElement,
7950
7965
  overflow: "auto",
7951
7966
  placement: deprecated_placement,
@@ -7954,17 +7969,17 @@ const MenuButton = forwardRef(function MenuButton2(props, ref) {
7954
7969
  radius: deprecated_popoverRadius,
7955
7970
  scheme: deprecated_popoverScheme
7956
7971
  }, popover || {}), [deprecated_boundaryElement, deprecated_placement, deprecated_popoverRadius, deprecated_popoverScheme, deprecated_portal, deprecated_preventOverflow, popover]);
7957
- return /* @__PURE__ */jsx(Popover, _objectSpread(_objectSpread({
7972
+ return /* @__PURE__ */jsxRuntime.jsx(Popover, _objectSpread(_objectSpread({
7958
7973
  "data-ui": "MenuButton__popover"
7959
7974
  }, popoverProps), {}, {
7960
7975
  content: menu,
7961
7976
  open,
7962
- children: button || /* @__PURE__ */jsx(Fragment, {})
7977
+ children: button || /* @__PURE__ */jsxRuntime.jsx(jsxRuntime.Fragment, {})
7963
7978
  }));
7964
7979
  });
7965
- const MenuDivider = styled.hr(_templateObject76 || (_templateObject76 = _taggedTemplateLiteral(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
7980
+ const MenuDivider = styled__default.default.hr(_templateObject76 || (_templateObject76 = _taggedTemplateLiteral(["\n height: 1px;\n border: 0;\n background: var(--card-hairline-soft-color);\n margin: 0;\n"])));
7966
7981
  function selectableBaseStyle() {
7967
- return css(_templateObject77 || (_templateObject77 = _taggedTemplateLiteral(["\n background-color: inherit;\n color: inherit;\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n text-decoration: none;\n }\n "])));
7982
+ return styled.css(_templateObject77 || (_templateObject77 = _taggedTemplateLiteral(["\n background-color: inherit;\n color: inherit;\n\n &[data-as='button'] {\n -webkit-font-smoothing: inherit;\n appearance: none;\n outline: none;\n font: inherit;\n text-align: inherit;\n border: 0;\n width: stretch;\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n text-decoration: none;\n }\n "])));
7968
7983
  }
7969
7984
  function selectableColorStyle(props) {
7970
7985
  var _a, _b;
@@ -7978,11 +7993,11 @@ function selectableColorStyle(props) {
7978
7993
  selectable
7979
7994
  } = theme.sanity.color;
7980
7995
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
7981
- return css(_templateObject78 || (_templateObject78 = _taggedTemplateLiteral(["\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n ", "\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), (_b = (_a = theme.sanity.styles) == null ? void 0 : _a.card) == null ? void 0 : _b.root);
7996
+ return styled.css(_templateObject78 || (_templateObject78 = _taggedTemplateLiteral(["\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n outline: none;\n\n /* &:is(button) */\n &[data-as='button'] {\n &:disabled {\n ", "\n }\n\n &:not(:disabled) {\n &[aria-pressed='true'] {\n ", "\n }\n\n &[data-selected],\n &[aria-selected='true'] > & {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n /* &:is(a) */\n &[data-as='a'] {\n &[data-disabled] {\n ", "\n }\n\n &:not([data-disabled]) {\n &[data-pressed] {\n ", "\n }\n\n &[data-selected] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) {\n &:hover {\n ", "\n }\n\n &:active {\n ", "\n }\n }\n }\n }\n }\n\n ", "\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.disabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.pressed), (_b = (_a = theme.sanity.styles) == null ? void 0 : _a.card) == null ? void 0 : _b.root);
7982
7997
  }
7983
- const Selectable = styled(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
7998
+ const Selectable = styled__default.default(Box)(responsiveRadiusStyle, selectableBaseStyle, selectableColorStyle);
7984
7999
  function useMenu() {
7985
- const value = useContext(MenuContext);
8000
+ const value = react.useContext(MenuContext);
7986
8001
  if (!value) {
7987
8002
  throw new Error("useMenu(): missing context value");
7988
8003
  }
@@ -8016,17 +8031,17 @@ function MenuGroup(props) {
8016
8031
  onItemMouseEnter = menu.onMouseEnter,
8017
8032
  registerElement
8018
8033
  } = menu;
8019
- const [rootElement, setRootElement] = useState(null);
8020
- const [open, setOpen] = useState(false);
8021
- const shouldFocusRef = useRef(null);
8034
+ const [rootElement, setRootElement] = react.useState(null);
8035
+ const [open, setOpen] = react.useState(false);
8036
+ const shouldFocusRef = react.useRef(null);
8022
8037
  const active = Boolean(activeElement) && activeElement === rootElement;
8023
- const [withinMenu, setWithinMenu] = useState(false);
8024
- const handleMouseEnter = useCallback(event => {
8038
+ const [withinMenu, setWithinMenu] = react.useState(false);
8039
+ const handleMouseEnter = react.useCallback(event => {
8025
8040
  setWithinMenu(false);
8026
8041
  onItemMouseEnter(event);
8027
8042
  setOpen(true);
8028
8043
  }, [onItemMouseEnter]);
8029
- const handleMenuKeyDown = useCallback(event => {
8044
+ const handleMenuKeyDown = react.useCallback(event => {
8030
8045
  if (event.key === "ArrowLeft") {
8031
8046
  event.stopPropagation();
8032
8047
  setOpen(false);
@@ -8035,7 +8050,7 @@ function MenuGroup(props) {
8035
8050
  });
8036
8051
  }
8037
8052
  }, [rootElement]);
8038
- const handleClick = useCallback(event => {
8053
+ const handleClick = react.useCallback(event => {
8039
8054
  if (onClick) onClick(event);
8040
8055
  shouldFocusRef.current = "first";
8041
8056
  setOpen(true);
@@ -8043,19 +8058,19 @@ function MenuGroup(props) {
8043
8058
  shouldFocusRef.current = null;
8044
8059
  });
8045
8060
  }, [onClick]);
8046
- const handleChildItemClick = useCallback(() => {
8061
+ const handleChildItemClick = react.useCallback(() => {
8047
8062
  setOpen(false);
8048
8063
  if (onItemClick) onItemClick();
8049
8064
  }, [onItemClick]);
8050
- const handleMenuMouseEnter = useCallback(() => setWithinMenu(true), []);
8051
- useEffect(() => mount(rootElement), [mount, rootElement]);
8052
- useEffect(() => {
8065
+ const handleMenuMouseEnter = react.useCallback(() => setWithinMenu(true), []);
8066
+ react.useEffect(() => mount(rootElement), [mount, rootElement]);
8067
+ react.useEffect(() => {
8053
8068
  if (!active) setOpen(false);
8054
8069
  }, [active]);
8055
- useEffect(() => {
8070
+ react.useEffect(() => {
8056
8071
  if (!open) setWithinMenu(false);
8057
8072
  }, [open]);
8058
- const childMenu = /* @__PURE__ */jsx(Menu, {
8073
+ const childMenu = /* @__PURE__ */jsxRuntime.jsx(Menu, {
8059
8074
  onClickOutside,
8060
8075
  onEscape,
8061
8076
  onItemClick: handleChildItemClick,
@@ -8065,7 +8080,7 @@ function MenuGroup(props) {
8065
8080
  shouldFocus: shouldFocusRef.current,
8066
8081
  children
8067
8082
  });
8068
- const handleKeyDown = useCallback(event => {
8083
+ const handleKeyDown = react.useCallback(event => {
8069
8084
  const target = event.currentTarget;
8070
8085
  if (document.activeElement !== target) {
8071
8086
  return;
@@ -8080,11 +8095,11 @@ function MenuGroup(props) {
8080
8095
  return;
8081
8096
  }
8082
8097
  }, []);
8083
- return /* @__PURE__ */jsx(Popover, _objectSpread(_objectSpread({}, popover), {}, {
8098
+ return /* @__PURE__ */jsxRuntime.jsx(Popover, _objectSpread(_objectSpread({}, popover), {}, {
8084
8099
  content: childMenu,
8085
8100
  "data-ui": "MenuGroup__popover",
8086
8101
  open,
8087
- children: /* @__PURE__ */jsx(Selectable, _objectSpread(_objectSpread({
8102
+ children: /* @__PURE__ */jsxRuntime.jsx(Selectable, _objectSpread(_objectSpread({
8088
8103
  "data-as": as,
8089
8104
  "data-ui": "MenuGroup",
8090
8105
  forwardedAs: as
@@ -8100,25 +8115,25 @@ function MenuGroup(props) {
8100
8115
  ref: setRootElement,
8101
8116
  tabIndex: -1,
8102
8117
  type: as === "button" ? "button" : void 0,
8103
- children: /* @__PURE__ */jsx(Box, {
8118
+ children: /* @__PURE__ */jsxRuntime.jsx(Box, {
8104
8119
  padding,
8105
- children: /* @__PURE__ */jsxs(Flex, {
8106
- children: [icon && /* @__PURE__ */jsxs(Text, {
8120
+ children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8121
+ children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8107
8122
  size: fontSize,
8108
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
8109
- }), /* @__PURE__ */jsx(Box, {
8123
+ children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
8124
+ }), /* @__PURE__ */jsxRuntime.jsx(Box, {
8110
8125
  flex: 1,
8111
8126
  marginLeft: icon ? space : void 0,
8112
- children: /* @__PURE__ */jsx(Text, {
8127
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
8113
8128
  size: fontSize,
8114
8129
  textOverflow: "ellipsis",
8115
8130
  children: text
8116
8131
  })
8117
- }), /* @__PURE__ */jsx(Box, {
8132
+ }), /* @__PURE__ */jsxRuntime.jsx(Box, {
8118
8133
  marginLeft: space,
8119
- children: /* @__PURE__ */jsx(Text, {
8134
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
8120
8135
  size: fontSize,
8121
- children: /* @__PURE__ */jsx(ChevronRightIcon, {})
8136
+ children: /* @__PURE__ */jsxRuntime.jsx(icons.ChevronRightIcon, {})
8122
8137
  })
8123
8138
  })]
8124
8139
  })
@@ -8126,7 +8141,7 @@ function MenuGroup(props) {
8126
8141
  }))
8127
8142
  }));
8128
8143
  }
8129
- const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8144
+ const MenuItem = react.forwardRef(function MenuItem2(props, forwardedRef) {
8130
8145
  const {
8131
8146
  as = "button",
8132
8147
  children,
@@ -8159,16 +8174,16 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8159
8174
  onItemMouseEnter = menu.onMouseEnter,
8160
8175
  onItemMouseLeave = menu.onMouseLeave
8161
8176
  } = menu;
8162
- const [rootElement, setRootElement] = useState(null);
8177
+ const [rootElement, setRootElement] = react.useState(null);
8163
8178
  const active = Boolean(activeElement) && activeElement === rootElement;
8164
- useEffect(() => mount(rootElement, selectedProp), [mount, rootElement, selectedProp]);
8179
+ react.useEffect(() => mount(rootElement, selectedProp), [mount, rootElement, selectedProp]);
8165
8180
  const ref = useForwardedRef(forwardedRef);
8166
- const handleClick = useCallback(event => {
8181
+ const handleClick = react.useCallback(event => {
8167
8182
  if (disabled) return;
8168
8183
  if (onClick) onClick(event);
8169
8184
  if (onItemClick) onItemClick();
8170
8185
  }, [disabled, onClick, onItemClick]);
8171
- const paddingProps = useMemo(() => ({
8186
+ const paddingProps = react.useMemo(() => ({
8172
8187
  padding,
8173
8188
  paddingX,
8174
8189
  paddingY,
@@ -8177,11 +8192,11 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8177
8192
  paddingBottom,
8178
8193
  paddingLeft
8179
8194
  }), [padding, paddingX, paddingY, paddingTop, paddingRight, paddingBottom, paddingLeft]);
8180
- const setRef = useCallback(el => {
8195
+ const setRef = react.useCallback(el => {
8181
8196
  ref.current = el;
8182
8197
  setRootElement(el);
8183
8198
  }, [ref]);
8184
- return /* @__PURE__ */jsxs(Selectable, _objectSpread(_objectSpread({
8199
+ return /* @__PURE__ */jsxRuntime.jsxs(Selectable, _objectSpread(_objectSpread({
8185
8200
  "data-ui": "MenuItem"
8186
8201
  }, restProps), {}, {
8187
8202
  "aria-pressed": as === "button" && pressed,
@@ -8200,48 +8215,48 @@ const MenuItem = forwardRef(function MenuItem2(props, forwardedRef) {
8200
8215
  role: "menuitem",
8201
8216
  tabIndex: -1,
8202
8217
  type: as === "button" ? "button" : void 0,
8203
- children: [(icon || text || iconRight) && /* @__PURE__ */jsx(Box, _objectSpread(_objectSpread({
8218
+ children: [(icon || text || iconRight) && /* @__PURE__ */jsxRuntime.jsx(Box, _objectSpread(_objectSpread({
8204
8219
  as: "span"
8205
8220
  }, paddingProps), {}, {
8206
- children: /* @__PURE__ */jsxs(Flex, {
8221
+ children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8207
8222
  as: "span",
8208
- children: [icon && /* @__PURE__ */jsxs(Text, {
8223
+ children: [icon && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8209
8224
  size: fontSize,
8210
- children: [isValidElement(icon) && icon, isValidElementType(icon) && createElement(icon)]
8211
- }), text && /* @__PURE__ */jsx(Box, {
8225
+ children: [react.isValidElement(icon) && icon, ReactIs.isValidElementType(icon) && react.createElement(icon)]
8226
+ }), text && /* @__PURE__ */jsxRuntime.jsx(Box, {
8212
8227
  flex: 1,
8213
8228
  marginLeft: icon ? space : void 0,
8214
8229
  marginRight: iconRight ? space : void 0,
8215
- children: /* @__PURE__ */jsx(Text, {
8230
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
8216
8231
  size: fontSize,
8217
8232
  textOverflow: "ellipsis",
8218
8233
  children: text
8219
8234
  })
8220
- }), hotkeys && /* @__PURE__ */jsx(Box, {
8235
+ }), hotkeys && /* @__PURE__ */jsxRuntime.jsx(Box, {
8221
8236
  marginLeft: space,
8222
8237
  style: {
8223
8238
  marginTop: -4,
8224
8239
  marginBottom: -4
8225
8240
  },
8226
- children: /* @__PURE__ */jsx(Hotkeys, {
8241
+ children: /* @__PURE__ */jsxRuntime.jsx(Hotkeys, {
8227
8242
  fontSize,
8228
8243
  keys: hotkeys
8229
8244
  })
8230
- }), iconRight && /* @__PURE__ */jsxs(Text, {
8245
+ }), iconRight && /* @__PURE__ */jsxRuntime.jsxs(Text, {
8231
8246
  size: fontSize,
8232
- children: [isValidElement(iconRight) && iconRight, isValidElementType(iconRight) && createElement(iconRight)]
8247
+ children: [react.isValidElement(iconRight) && iconRight, ReactIs.isValidElementType(iconRight) && react.createElement(iconRight)]
8233
8248
  })]
8234
8249
  })
8235
- })), children && /* @__PURE__ */jsx(Box, _objectSpread(_objectSpread({
8250
+ })), children && /* @__PURE__ */jsxRuntime.jsx(Box, _objectSpread(_objectSpread({
8236
8251
  as: "span"
8237
8252
  }, paddingProps), {}, {
8238
8253
  children
8239
8254
  }))]
8240
8255
  }));
8241
8256
  });
8242
- const keyframe = keyframes(_templateObject79 || (_templateObject79 = _taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
8243
- const animation = css(_templateObject80 || (_templateObject80 = _taggedTemplateLiteral(["\n background-image: linear-gradient(\n to right,\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-to),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from)\n );\n background-position: 100%;\n background-size: 200% 100%;\n background-attachment: fixed;\n animation-name: ", ";\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n animation-duration: 2000ms;\n"])), keyframe);
8244
- const skeletonStyle = css(_templateObject81 || (_templateObject81 = _taggedTemplateLiteral(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])), _ref24 => {
8257
+ const keyframe = styled.keyframes(_templateObject79 || (_templateObject79 = _taggedTemplateLiteral(["\n 0% {\n background-position: 100%;\n }\n 100% {\n background-position: -100%;\n }\n"])));
8258
+ const animation = styled.css(_templateObject80 || (_templateObject80 = _taggedTemplateLiteral(["\n background-image: linear-gradient(\n to right,\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-to),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from),\n var(--card-skeleton-color-from)\n );\n background-position: 100%;\n background-size: 200% 100%;\n background-attachment: fixed;\n animation-name: ", ";\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n animation-duration: 2000ms;\n"])), keyframe);
8259
+ const skeletonStyle = styled.css(_templateObject81 || (_templateObject81 = _taggedTemplateLiteral(["\n opacity: ", ";\n transition: opacity 200ms ease-in;\n\n @media screen and (prefers-reduced-motion: no-preference) {\n ", "\n }\n\n @media screen and (prefers-reduced-motion: reduce) {\n background-color: var(--card-skeleton-color-from);\n }\n"])), _ref24 => {
8245
8260
  let {
8246
8261
  $visible
8247
8262
  } = _ref24;
@@ -8250,18 +8265,18 @@ const skeletonStyle = css(_templateObject81 || (_templateObject81 = _taggedTempl
8250
8265
  let {
8251
8266
  $animated
8252
8267
  } = _ref25;
8253
- return $animated ? animation : css(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8268
+ return $animated ? animation : styled.css(_templateObject82 || (_templateObject82 = _taggedTemplateLiteral(["\n background-color: var(--card-skeleton-color-from);\n "])));
8254
8269
  });
8255
- const Root$4 = styled(Box)(responsiveRadiusStyle, skeletonStyle);
8256
- const Skeleton = forwardRef(function Skeleton2(props, ref) {
8270
+ const Root$4 = styled__default.default(Box)(responsiveRadiusStyle, skeletonStyle);
8271
+ const Skeleton = react.forwardRef(function Skeleton2(props, ref) {
8257
8272
  const {
8258
8273
  animated = false,
8259
8274
  delay,
8260
8275
  radius
8261
8276
  } = props,
8262
8277
  restProps = _objectWithoutProperties(props, _excluded38);
8263
- const [visible, setVisible] = useState(delay ? false : true);
8264
- useEffect(() => {
8278
+ const [visible, setVisible] = react.useState(delay ? false : true);
8279
+ react.useEffect(() => {
8265
8280
  if (!delay) {
8266
8281
  return setVisible(true);
8267
8282
  }
@@ -8272,14 +8287,14 @@ const Skeleton = forwardRef(function Skeleton2(props, ref) {
8272
8287
  clearTimeout(timeout);
8273
8288
  };
8274
8289
  }, [delay]);
8275
- return /* @__PURE__ */jsx(Root$4, _objectSpread(_objectSpread({}, restProps), {}, {
8290
+ return /* @__PURE__ */jsxRuntime.jsx(Root$4, _objectSpread(_objectSpread({}, restProps), {}, {
8276
8291
  $animated: animated,
8277
8292
  $radius: useArrayProp(radius),
8278
8293
  $visible: visible,
8279
8294
  ref
8280
8295
  }));
8281
8296
  });
8282
- const Root$3 = styled(Skeleton)(_ref26 => {
8297
+ const Root$3 = styled__default.default(Skeleton)(_ref26 => {
8283
8298
  let {
8284
8299
  $size,
8285
8300
  $style,
@@ -8298,55 +8313,55 @@ const Root$3 = styled(Skeleton)(_ref26 => {
8298
8313
  });
8299
8314
  return styles;
8300
8315
  });
8301
- const TextSkeleton = forwardRef(function TextSkeleton2(props, ref) {
8316
+ const TextSkeleton = react.forwardRef(function TextSkeleton2(props, ref) {
8302
8317
  const {
8303
8318
  size = 2
8304
8319
  } = props,
8305
8320
  restProps = _objectWithoutProperties(props, _excluded39);
8306
8321
  const $size = useArrayProp(size);
8307
- return /* @__PURE__ */jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8322
+ return /* @__PURE__ */jsxRuntime.jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8308
8323
  $size,
8309
8324
  ref,
8310
8325
  $style: "text"
8311
8326
  }));
8312
8327
  });
8313
- const LabelSkeleton = forwardRef(function TextSkeleton3(props, ref) {
8328
+ const LabelSkeleton = react.forwardRef(function TextSkeleton3(props, ref) {
8314
8329
  const {
8315
8330
  size = 2
8316
8331
  } = props,
8317
8332
  restProps = _objectWithoutProperties(props, _excluded40);
8318
8333
  const $size = useArrayProp(size);
8319
- return /* @__PURE__ */jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8334
+ return /* @__PURE__ */jsxRuntime.jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8320
8335
  $size,
8321
8336
  ref,
8322
8337
  $style: "label"
8323
8338
  }));
8324
8339
  });
8325
- const HeadingSkeleton = forwardRef(function TextSkeleton4(props, ref) {
8340
+ const HeadingSkeleton = react.forwardRef(function TextSkeleton4(props, ref) {
8326
8341
  const {
8327
8342
  size = 2
8328
8343
  } = props,
8329
8344
  restProps = _objectWithoutProperties(props, _excluded41);
8330
8345
  const $size = useArrayProp(size);
8331
- return /* @__PURE__ */jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8346
+ return /* @__PURE__ */jsxRuntime.jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8332
8347
  $size,
8333
8348
  ref,
8334
8349
  $style: "heading"
8335
8350
  }));
8336
8351
  });
8337
- const CodeSkeleton = forwardRef(function TextSkeleton5(props, ref) {
8352
+ const CodeSkeleton = react.forwardRef(function TextSkeleton5(props, ref) {
8338
8353
  const {
8339
8354
  size = 2
8340
8355
  } = props,
8341
8356
  restProps = _objectWithoutProperties(props, _excluded42);
8342
8357
  const $size = useArrayProp(size);
8343
- return /* @__PURE__ */jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8358
+ return /* @__PURE__ */jsxRuntime.jsx(Root$3, _objectSpread(_objectSpread({}, restProps), {}, {
8344
8359
  $size,
8345
8360
  ref,
8346
8361
  $style: "code"
8347
8362
  }));
8348
8363
  });
8349
- const Tab = forwardRef(function Tab2(props, forwardedRef) {
8364
+ const Tab = react.forwardRef(function Tab2(props, forwardedRef) {
8350
8365
  const {
8351
8366
  icon,
8352
8367
  id,
@@ -8359,17 +8374,17 @@ const Tab = forwardRef(function Tab2(props, forwardedRef) {
8359
8374
  selected
8360
8375
  } = props,
8361
8376
  restProps = _objectWithoutProperties(props, _excluded43);
8362
- const elementRef = useRef(null);
8363
- const focusedRef = useRef(false);
8364
- const handleBlur = useCallback(() => {
8377
+ const elementRef = react.useRef(null);
8378
+ const focusedRef = react.useRef(false);
8379
+ const handleBlur = react.useCallback(() => {
8365
8380
  focusedRef.current = false;
8366
8381
  }, []);
8367
- const handleFocus = useCallback(event => {
8382
+ const handleFocus = react.useCallback(event => {
8368
8383
  focusedRef.current = true;
8369
8384
  if (onFocus) onFocus(event);
8370
8385
  }, [onFocus]);
8371
8386
  const ref = useForwardedRef(forwardedRef);
8372
- useEffect(() => {
8387
+ react.useEffect(() => {
8373
8388
  if (focused && !focusedRef.current) {
8374
8389
  if (elementRef.current) elementRef.current.focus();
8375
8390
  focusedRef.current = true;
@@ -8379,7 +8394,7 @@ const Tab = forwardRef(function Tab2(props, forwardedRef) {
8379
8394
  elementRef.current = el;
8380
8395
  ref.current = el;
8381
8396
  };
8382
- return /* @__PURE__ */jsx(Button, _objectSpread(_objectSpread({
8397
+ return /* @__PURE__ */jsxRuntime.jsx(Button, _objectSpread(_objectSpread({
8383
8398
  "data-ui": "Tab"
8384
8399
  }, restProps), {}, {
8385
8400
  "aria-selected": selected ? "true" : "false",
@@ -8402,23 +8417,23 @@ const Tab = forwardRef(function Tab2(props, forwardedRef) {
8402
8417
  function _isReactElement(node) {
8403
8418
  return Boolean(node);
8404
8419
  }
8405
- const TabList = forwardRef(function TabList2(props, ref) {
8420
+ const TabList = react.forwardRef(function TabList2(props, ref) {
8406
8421
  const {
8407
8422
  children: childrenProp
8408
8423
  } = props,
8409
8424
  restProps = _objectWithoutProperties(props, _excluded44);
8410
- const [focusedIndex, setFocusedIndex] = useState(-1);
8411
- const children = useMemo(() => childrenProp.filter(_isReactElement), [childrenProp]);
8412
- const tabs = children.map((child, childIndex) => cloneElement(child, {
8425
+ const [focusedIndex, setFocusedIndex] = react.useState(-1);
8426
+ const children = react.useMemo(() => childrenProp.filter(_isReactElement), [childrenProp]);
8427
+ const tabs = children.map((child, childIndex) => react.cloneElement(child, {
8413
8428
  focused: focusedIndex === childIndex,
8414
8429
  key: childIndex,
8415
8430
  onFocus: () => handleTabFocus(childIndex)
8416
8431
  }));
8417
8432
  const numTabs = tabs.length;
8418
- const handleTabFocus = useCallback(tabIdx => {
8433
+ const handleTabFocus = react.useCallback(tabIdx => {
8419
8434
  setFocusedIndex(tabIdx);
8420
8435
  }, []);
8421
- const handleKeyDown = useCallback(event => {
8436
+ const handleKeyDown = react.useCallback(event => {
8422
8437
  if (event.key === "ArrowLeft") {
8423
8438
  setFocusedIndex(prevIndex => (prevIndex + numTabs - 1) % numTabs);
8424
8439
  }
@@ -8426,7 +8441,7 @@ const TabList = forwardRef(function TabList2(props, ref) {
8426
8441
  setFocusedIndex(prevIndex => (prevIndex + 1) % numTabs);
8427
8442
  }
8428
8443
  }, [numTabs]);
8429
- return /* @__PURE__ */jsx(Inline, _objectSpread(_objectSpread({
8444
+ return /* @__PURE__ */jsxRuntime.jsx(Inline, _objectSpread(_objectSpread({
8430
8445
  "data-ui": "TabList"
8431
8446
  }, restProps), {}, {
8432
8447
  onKeyDown: handleKeyDown,
@@ -8435,12 +8450,12 @@ const TabList = forwardRef(function TabList2(props, ref) {
8435
8450
  children: tabs
8436
8451
  }));
8437
8452
  });
8438
- const TabPanel = forwardRef(function TabPanel2(props, ref) {
8453
+ const TabPanel = react.forwardRef(function TabPanel2(props, ref) {
8439
8454
  const {
8440
8455
  flex
8441
8456
  } = props,
8442
8457
  restProps = _objectWithoutProperties(props, _excluded45);
8443
- return /* @__PURE__ */jsx(Box, _objectSpread(_objectSpread({
8458
+ return /* @__PURE__ */jsxRuntime.jsx(Box, _objectSpread(_objectSpread({
8444
8459
  "data-ui": "TabPanel"
8445
8460
  }, restProps), {}, {
8446
8461
  flex,
@@ -8462,8 +8477,8 @@ const ROLES = {
8462
8477
  success: "alert",
8463
8478
  info: "alert"
8464
8479
  };
8465
- const Root$2 = styled(Card)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n pointer-events: all;\n"])));
8466
- const TextBox = styled(Flex)(_templateObject84 || (_templateObject84 = _taggedTemplateLiteral(["\n overflow-x: auto;\n"])));
8480
+ const Root$2 = styled__default.default(Card)(_templateObject83 || (_templateObject83 = _taggedTemplateLiteral(["\n pointer-events: all;\n"])));
8481
+ const TextBox = styled__default.default(Flex)(_templateObject84 || (_templateObject84 = _taggedTemplateLiteral(["\n overflow-x: auto;\n"])));
8467
8482
  function Toast(props) {
8468
8483
  const {
8469
8484
  closable,
@@ -8475,7 +8490,7 @@ function Toast(props) {
8475
8490
  restProps = _objectWithoutProperties(props, _excluded46);
8476
8491
  const cardTone = status ? STATUS_CARD_TONE[status] : "default";
8477
8492
  const role = status ? ROLES[status] : "status";
8478
- return /* @__PURE__ */jsx(Root$2, _objectSpread(_objectSpread({
8493
+ return /* @__PURE__ */jsxRuntime.jsx(Root$2, _objectSpread(_objectSpread({
8479
8494
  "data-ui": "Toast",
8480
8495
  role
8481
8496
  }, restProps), {}, {
@@ -8483,27 +8498,27 @@ function Toast(props) {
8483
8498
  radius: 2,
8484
8499
  shadow: 2,
8485
8500
  tone: cardTone,
8486
- children: /* @__PURE__ */jsxs(Flex, {
8501
+ children: /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8487
8502
  align: "flex-start",
8488
- children: [/* @__PURE__ */jsx(TextBox, {
8503
+ children: [/* @__PURE__ */jsxRuntime.jsx(TextBox, {
8489
8504
  flex: 1,
8490
8505
  padding: 3,
8491
- children: /* @__PURE__ */jsxs(Stack, {
8506
+ children: /* @__PURE__ */jsxRuntime.jsxs(Stack, {
8492
8507
  space: 3,
8493
- children: [title && /* @__PURE__ */jsx(Text, {
8508
+ children: [title && /* @__PURE__ */jsxRuntime.jsx(Text, {
8494
8509
  weight: "semibold",
8495
8510
  children: title
8496
- }), description && /* @__PURE__ */jsx(Text, {
8511
+ }), description && /* @__PURE__ */jsxRuntime.jsx(Text, {
8497
8512
  muted: true,
8498
8513
  size: 1,
8499
8514
  children: description
8500
8515
  })]
8501
8516
  })
8502
- }), closable && /* @__PURE__ */jsx(Box, {
8517
+ }), closable && /* @__PURE__ */jsxRuntime.jsx(Box, {
8503
8518
  padding: 1,
8504
- children: /* @__PURE__ */jsx(Button, {
8519
+ children: /* @__PURE__ */jsxRuntime.jsx(Button, {
8505
8520
  as: "button",
8506
- icon: CloseIcon,
8521
+ icon: icons.CloseIcon,
8507
8522
  mode: "bleed",
8508
8523
  padding: 2,
8509
8524
  onClick: onClose,
@@ -8516,10 +8531,10 @@ function Toast(props) {
8516
8531
  }));
8517
8532
  }
8518
8533
  const key$1 = Symbol.for("@sanity/ui/context/toast");
8519
- globalScope[key$1] = globalScope[key$1] || createContext(null);
8534
+ globalScope[key$1] = globalScope[key$1] || react.createContext(null);
8520
8535
  const ToastContext = globalScope[key$1];
8521
- const Root$1 = styled(Layer)(_templateObject85 || (_templateObject85 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n"])));
8522
- const ToastContainer = styled.div(_templateObject86 || (_templateObject86 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: absolute;\n right: 0;\n bottom: 0;\n max-width: 420px;\n width: 100%;\n"])));
8536
+ const Root$1 = styled__default.default(Layer)(_templateObject85 || (_templateObject85 = _taggedTemplateLiteral(["\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n pointer-events: none;\n"])));
8537
+ const ToastContainer = styled__default.default.div(_templateObject86 || (_templateObject86 = _taggedTemplateLiteral(["\n box-sizing: border-box;\n position: absolute;\n right: 0;\n bottom: 0;\n max-width: 420px;\n width: 100%;\n"])));
8523
8538
  let toastId = 0;
8524
8539
  function ToastProvider(props) {
8525
8540
  const {
@@ -8529,11 +8544,11 @@ function ToastProvider(props) {
8529
8544
  paddingY,
8530
8545
  zOffset
8531
8546
  } = props;
8532
- const [state, setState] = useState({
8547
+ const [state, setState] = react.useState({
8533
8548
  toasts: []
8534
8549
  });
8535
- const toastsRef = useRef({});
8536
- const push = useCallback(params => {
8550
+ const toastsRef = react.useRef({});
8551
+ const push = react.useCallback(params => {
8537
8552
  const id = params.id || String(toastId++);
8538
8553
  const duration = params.duration || 5e3;
8539
8554
  const dismiss = () => {
@@ -8575,7 +8590,7 @@ function ToastProvider(props) {
8575
8590
  };
8576
8591
  return id;
8577
8592
  }, []);
8578
- useEffect(() => () => {
8593
+ react.useEffect(() => () => {
8579
8594
  for (const {
8580
8595
  timeoutId
8581
8596
  } of Object.values(toastsRef.current)) {
@@ -8583,21 +8598,21 @@ function ToastProvider(props) {
8583
8598
  }
8584
8599
  toastsRef.current = {};
8585
8600
  }, []);
8586
- const value = useMemo(() => ({
8601
+ const value = react.useMemo(() => ({
8587
8602
  version: 0,
8588
8603
  push
8589
8604
  }), [push]);
8590
- return /* @__PURE__ */jsxs(ToastContext.Provider, {
8605
+ return /* @__PURE__ */jsxRuntime.jsxs(ToastContext.Provider, {
8591
8606
  value,
8592
- children: [children, /* @__PURE__ */jsx(Root$1, {
8607
+ children: [children, /* @__PURE__ */jsxRuntime.jsx(Root$1, {
8593
8608
  "data-ui": "ToastProvider",
8594
8609
  zOffset,
8595
- children: /* @__PURE__ */jsx(ToastContainer, {
8596
- children: /* @__PURE__ */jsx(Box, {
8610
+ children: /* @__PURE__ */jsxRuntime.jsx(ToastContainer, {
8611
+ children: /* @__PURE__ */jsxRuntime.jsx(Box, {
8597
8612
  padding,
8598
8613
  paddingX,
8599
8614
  paddingY,
8600
- children: /* @__PURE__ */jsx(AnimatePresence, {
8615
+ children: /* @__PURE__ */jsxRuntime.jsx(framerMotion.AnimatePresence, {
8601
8616
  initial: false,
8602
8617
  children: state.toasts.map(_ref27 => {
8603
8618
  let {
@@ -8605,7 +8620,7 @@ function ToastProvider(props) {
8605
8620
  id,
8606
8621
  params
8607
8622
  } = _ref27;
8608
- return /* @__PURE__ */jsx(motion.div, {
8623
+ return /* @__PURE__ */jsxRuntime.jsx(framerMotion.motion.div, {
8609
8624
  animate: {
8610
8625
  opacity: 1,
8611
8626
  y: 0,
@@ -8629,7 +8644,7 @@ function ToastProvider(props) {
8629
8644
  damping: 30,
8630
8645
  stiffness: 400
8631
8646
  },
8632
- children: /* @__PURE__ */jsx(Toast, {
8647
+ children: /* @__PURE__ */jsxRuntime.jsx(Toast, {
8633
8648
  closable: params.closable,
8634
8649
  description: params.description,
8635
8650
  onClose: dismiss,
@@ -8645,7 +8660,7 @@ function ToastProvider(props) {
8645
8660
  });
8646
8661
  }
8647
8662
  function useToast() {
8648
- const value = useContext(ToastContext);
8663
+ const value = react.useContext(ToastContext);
8649
8664
  if (!value) {
8650
8665
  throw new Error("useToast(): missing context value");
8651
8666
  }
@@ -8725,28 +8740,28 @@ function _focusItemElement(el) {
8725
8740
  }
8726
8741
  }
8727
8742
  const key = Symbol.for("@sanity/ui/context/tree");
8728
- globalScope[key] = globalScope[key] || createContext(null);
8743
+ globalScope[key] = globalScope[key] || react.createContext(null);
8729
8744
  const TreeContext = globalScope[key];
8730
- const Tree = memo(forwardRef(function Tree2(props, ref) {
8745
+ const Tree = react.memo(react.forwardRef(function Tree2(props, ref) {
8731
8746
  const {
8732
8747
  children,
8733
8748
  space = 1
8734
8749
  } = props,
8735
8750
  restProps = _objectWithoutProperties(props, _excluded47);
8736
8751
  const forwardedRef = useForwardedRef(ref);
8737
- const [focusedElement, setFocusedElement] = useState(null);
8738
- const focusedElementRef = useRef(focusedElement);
8739
- const path = useMemo(() => [], []);
8740
- const [itemElements, setItemElements] = useState([]);
8741
- const [state, setState] = useState({});
8742
- const stateRef = useRef(state);
8743
- useEffect(() => {
8752
+ const [focusedElement, setFocusedElement] = react.useState(null);
8753
+ const focusedElementRef = react.useRef(focusedElement);
8754
+ const path = react.useMemo(() => [], []);
8755
+ const [itemElements, setItemElements] = react.useState([]);
8756
+ const [state, setState] = react.useState({});
8757
+ const stateRef = react.useRef(state);
8758
+ react.useEffect(() => {
8744
8759
  focusedElementRef.current = focusedElement;
8745
8760
  }, [focusedElement]);
8746
- useEffect(() => {
8761
+ react.useEffect(() => {
8747
8762
  stateRef.current = state;
8748
8763
  }, [state]);
8749
- const registerItem = useCallback((element, path2, expanded, selected) => {
8764
+ const registerItem = react.useCallback((element, path2, expanded, selected) => {
8750
8765
  setState(s => _objectSpread(_objectSpread({}, s), {}, {
8751
8766
  [path2]: {
8752
8767
  element,
@@ -8764,7 +8779,7 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
8764
8779
  });
8765
8780
  };
8766
8781
  }, []);
8767
- const setExpanded = useCallback((path2, expanded) => {
8782
+ const setExpanded = react.useCallback((path2, expanded) => {
8768
8783
  setState(s => {
8769
8784
  const itemState = s[path2];
8770
8785
  if (!itemState) return s;
@@ -8775,7 +8790,7 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
8775
8790
  });
8776
8791
  });
8777
8792
  }, []);
8778
- const contextValue = useMemo(() => ({
8793
+ const contextValue = react.useMemo(() => ({
8779
8794
  version: 0,
8780
8795
  focusedElement: focusedElement || itemElements[0] || null,
8781
8796
  level: 0,
@@ -8786,7 +8801,7 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
8786
8801
  space,
8787
8802
  state
8788
8803
  }), [focusedElement, itemElements, path, registerItem, setExpanded, space, state]);
8789
- const handleKeyDown = useCallback(event => {
8804
+ const handleKeyDown = react.useCallback(event => {
8790
8805
  var _a;
8791
8806
  if (!focusedElementRef.current) return;
8792
8807
  if (event.key === "ArrowDown") {
@@ -8853,14 +8868,14 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
8853
8868
  return;
8854
8869
  }
8855
8870
  }, [itemElements]);
8856
- useEffect(() => {
8871
+ react.useEffect(() => {
8857
8872
  if (!forwardedRef.current) return;
8858
8873
  const _itemElements = Array.from(forwardedRef.current.querySelectorAll('[data-ui="TreeItem"]'));
8859
8874
  setItemElements(_itemElements);
8860
8875
  }, [children, forwardedRef]);
8861
- return /* @__PURE__ */jsx(TreeContext.Provider, {
8876
+ return /* @__PURE__ */jsxRuntime.jsx(TreeContext.Provider, {
8862
8877
  value: contextValue,
8863
- children: /* @__PURE__ */jsx(Stack, _objectSpread(_objectSpread({
8878
+ children: /* @__PURE__ */jsxRuntime.jsx(Stack, _objectSpread(_objectSpread({
8864
8879
  as: "ul",
8865
8880
  "data-ui": "Tree"
8866
8881
  }, restProps), {}, {
@@ -8874,7 +8889,7 @@ const Tree = memo(forwardRef(function Tree2(props, ref) {
8874
8889
  }));
8875
8890
  Tree.displayName = "Tree";
8876
8891
  function treeItemRootStyle() {
8877
- return css(_templateObject87 || (_templateObject87 = _taggedTemplateLiteral(["\n &[role='none'] > [role='treeitem'] {\n outline: none;\n cursor: default;\n border-radius: 3px;\n\n &:focus {\n position: relative;\n }\n }\n\n &[role='treeitem'] {\n outline: none;\n\n & > div {\n cursor: default;\n border-radius: 3px;\n }\n\n &:focus > div {\n position: relative;\n }\n }\n "])));
8892
+ return styled.css(_templateObject87 || (_templateObject87 = _taggedTemplateLiteral(["\n &[role='none'] > [role='treeitem'] {\n outline: none;\n cursor: default;\n border-radius: 3px;\n\n &:focus {\n position: relative;\n }\n }\n\n &[role='treeitem'] {\n outline: none;\n\n & > div {\n cursor: default;\n border-radius: 3px;\n }\n\n &:focus > div {\n position: relative;\n }\n }\n "])));
8878
8893
  }
8879
8894
  function treeItemRootColorStyle(props) {
8880
8895
  const {
@@ -8887,7 +8902,7 @@ function treeItemRootColorStyle(props) {
8887
8902
  selectable
8888
8903
  } = theme.sanity.color;
8889
8904
  const tone = selectable ? selectable[$tone] || selectable.default : muted[$tone] || muted.default;
8890
- return css(_templateObject88 || (_templateObject88 = _taggedTemplateLiteral(["\n /* <div role=\"none\"><a data-ui=\"TreeItem__box\" role=\"treeitem\" tabIndex=\"0\"></div> */\n &[role='none'] {\n & > [role='treeitem'] {\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--treeitem-fg-color);\n }\n\n &[data-selected] > [role='treeitem'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) > [role='treeitem']:not(:focus):hover {\n ", "\n }\n\n & > [role='treeitem']:focus {\n ", "\n }\n }\n }\n\n /* <div role=\"treeitem\" tabIndex=\"0\"><div data-ui=\"TreeItem__box\"></div> */\n &[role='treeitem'] {\n & > [data-ui='TreeItem__box'] {\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n }\n\n &[data-selected] > [data-ui='TreeItem__box'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {\n ", "\n }\n\n &:focus > [data-ui='TreeItem__box'] {\n ", "\n }\n }\n }\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected));
8905
+ return styled.css(_templateObject88 || (_templateObject88 = _taggedTemplateLiteral(["\n /* <div role=\"none\"><a data-ui=\"TreeItem__box\" role=\"treeitem\" tabIndex=\"0\"></div> */\n &[role='none'] {\n & > [role='treeitem'] {\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--treeitem-fg-color);\n }\n\n &[data-selected] > [role='treeitem'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]) > [role='treeitem']:not(:focus):hover {\n ", "\n }\n\n & > [role='treeitem']:focus {\n ", "\n }\n }\n }\n\n /* <div role=\"treeitem\" tabIndex=\"0\"><div data-ui=\"TreeItem__box\"></div> */\n &[role='treeitem'] {\n & > [data-ui='TreeItem__box'] {\n ", "\n\n background-color: var(--card-bg-color);\n color: var(--card-fg-color);\n }\n\n &[data-selected] > [data-ui='TreeItem__box'] {\n ", "\n }\n\n @media (hover: hover) {\n &:not([data-selected]):not(:focus) > [data-ui='TreeItem__box']:hover {\n ", "\n }\n\n &:focus > [data-ui='TreeItem__box'] {\n ", "\n }\n }\n }\n "])), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected), _colorVarsStyle(base, tone.enabled), _colorVarsStyle(base, tone.pressed), _colorVarsStyle(base, tone.hovered), _colorVarsStyle(base, tone.selected));
8891
8906
  }
8892
8907
  function treeItemBoxStyle(props) {
8893
8908
  const {
@@ -8897,23 +8912,23 @@ function treeItemBoxStyle(props) {
8897
8912
  const {
8898
8913
  space
8899
8914
  } = theme.sanity;
8900
- return css(_templateObject89 || (_templateObject89 = _taggedTemplateLiteral(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
8915
+ return styled.css(_templateObject89 || (_templateObject89 = _taggedTemplateLiteral(["\n padding-left: ", ";\n\n &[data-as='a'] {\n text-decoration: none;\n }\n "])), rem(space[2] * $level));
8901
8916
  }
8902
8917
  function useTree() {
8903
- const tree = useContext(TreeContext);
8918
+ const tree = react.useContext(TreeContext);
8904
8919
  if (!tree) {
8905
8920
  throw new Error("Tree: missing context value");
8906
8921
  }
8907
8922
  return tree;
8908
8923
  }
8909
- const TreeGroup = memo(function TreeGroup2(props) {
8924
+ const TreeGroup = react.memo(function TreeGroup2(props) {
8910
8925
  const {
8911
8926
  children,
8912
8927
  expanded = false
8913
8928
  } = props,
8914
8929
  restProps = _objectWithoutProperties(props, _excluded48);
8915
8930
  const tree = useTree();
8916
- return /* @__PURE__ */jsx(Stack, _objectSpread(_objectSpread({
8931
+ return /* @__PURE__ */jsxRuntime.jsx(Stack, _objectSpread(_objectSpread({
8917
8932
  as: "ul",
8918
8933
  "data-ui": "TreeGroup"
8919
8934
  }, restProps), {}, {
@@ -8924,12 +8939,12 @@ const TreeGroup = memo(function TreeGroup2(props) {
8924
8939
  children
8925
8940
  }));
8926
8941
  });
8927
- const Root = memo(styled.li(treeItemRootStyle, treeItemRootColorStyle));
8928
- const TreeItemBox = styled(Box).attrs({
8942
+ const Root = react.memo(styled__default.default.li(treeItemRootStyle, treeItemRootColorStyle));
8943
+ const TreeItemBox = styled__default.default(Box).attrs({
8929
8944
  forwardedAs: "a"
8930
8945
  })(treeItemBoxStyle);
8931
- const ToggleArrowText = styled(Text)(_templateObject90 || (_templateObject90 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
8932
- const TreeItem = memo(function TreeItem2(props) {
8946
+ const ToggleArrowText = styled__default.default(Text)(_templateObject90 || (_templateObject90 = _taggedTemplateLiteral(["\n & > svg {\n transition: transform 100ms;\n }\n"])));
8947
+ const TreeItem = react.memo(function TreeItem2(props) {
8933
8948
  const {
8934
8949
  children,
8935
8950
  expanded: expandedProp = false,
@@ -8946,8 +8961,8 @@ const TreeItem = memo(function TreeItem2(props) {
8946
8961
  weight
8947
8962
  } = props,
8948
8963
  restProps = _objectWithoutProperties(props, _excluded49);
8949
- const rootRef = useRef(null);
8950
- const treeitemRef = useRef(null);
8964
+ const rootRef = react.useRef(null);
8965
+ const treeitemRef = react.useRef(null);
8951
8966
  const tree = useTree();
8952
8967
  const {
8953
8968
  path,
@@ -8955,19 +8970,19 @@ const TreeItem = memo(function TreeItem2(props) {
8955
8970
  setExpanded,
8956
8971
  setFocusedElement
8957
8972
  } = tree;
8958
- const _id = useId();
8973
+ const _id = react.useId();
8959
8974
  const id = idProp || _id;
8960
- const itemPath = useMemo(() => path.concat([id || ""]), [id, path]);
8975
+ const itemPath = react.useMemo(() => path.concat([id || ""]), [id, path]);
8961
8976
  const itemKey = itemPath.join("/");
8962
8977
  const itemState = tree.state[itemKey];
8963
8978
  const focused = tree.focusedElement === rootRef.current;
8964
8979
  const expanded = (itemState == null ? void 0 : itemState.expanded) === void 0 ? expandedProp : (itemState == null ? void 0 : itemState.expanded) || false;
8965
8980
  const tabIndex = tree.focusedElement && tree.focusedElement === rootRef.current ? 0 : -1;
8966
- const contextValue = useMemo(() => _objectSpread(_objectSpread({}, tree), {}, {
8981
+ const contextValue = react.useMemo(() => _objectSpread(_objectSpread({}, tree), {}, {
8967
8982
  level: tree.level + 1,
8968
8983
  path: itemPath
8969
8984
  }), [itemPath, tree]);
8970
- const handleClick = useCallback(event => {
8985
+ const handleClick = react.useCallback(event => {
8971
8986
  if (onClick) onClick(event);
8972
8987
  const target = event.target;
8973
8988
  if (target instanceof HTMLElement && (target.getAttribute("data-ui") === "TreeItem__box" || target.closest('[data-ui="TreeItem__box"]'))) {
@@ -8976,42 +8991,42 @@ const TreeItem = memo(function TreeItem2(props) {
8976
8991
  setFocusedElement(rootRef.current);
8977
8992
  }
8978
8993
  }, [expanded, itemKey, onClick, setExpanded, setFocusedElement]);
8979
- const handleKeyDown = useCallback(event => {
8994
+ const handleKeyDown = react.useCallback(event => {
8980
8995
  if (focused && event.key === "Enter") {
8981
8996
  const el = treeitemRef.current || rootRef.current;
8982
8997
  el == null ? void 0 : el.click();
8983
8998
  }
8984
8999
  }, [focused]);
8985
- useEffect(() => {
9000
+ react.useEffect(() => {
8986
9001
  if (!rootRef.current) return;
8987
9002
  return registerItem(rootRef.current, itemPath.join("/"), expanded, selected);
8988
9003
  }, [expanded, itemPath, registerItem, selected]);
8989
- const content = /* @__PURE__ */jsxs(Flex, {
9004
+ const content = /* @__PURE__ */jsxRuntime.jsxs(Flex, {
8990
9005
  padding,
8991
- children: [/* @__PURE__ */jsxs(Box, {
9006
+ children: [/* @__PURE__ */jsxRuntime.jsxs(Box, {
8992
9007
  marginRight: space,
8993
9008
  style: {
8994
9009
  visibility: icon || children ? "visible" : "hidden",
8995
9010
  pointerEvents: "none"
8996
9011
  },
8997
- children: [icon && /* @__PURE__ */jsx(Text, {
9012
+ children: [icon && /* @__PURE__ */jsxRuntime.jsx(Text, {
8998
9013
  muted,
8999
9014
  size: fontSize,
9000
9015
  weight,
9001
- children: createElement(icon)
9002
- }), !icon && /* @__PURE__ */jsx(ToggleArrowText, {
9016
+ children: react.createElement(icon)
9017
+ }), !icon && /* @__PURE__ */jsxRuntime.jsx(ToggleArrowText, {
9003
9018
  muted,
9004
9019
  size: fontSize,
9005
9020
  weight,
9006
- children: /* @__PURE__ */jsx(ToggleArrowRightIcon, {
9021
+ children: /* @__PURE__ */jsxRuntime.jsx(icons.ToggleArrowRightIcon, {
9007
9022
  style: {
9008
9023
  transform: expanded ? "rotate(90deg)" : void 0
9009
9024
  }
9010
9025
  })
9011
9026
  })]
9012
- }), /* @__PURE__ */jsx(Box, {
9027
+ }), /* @__PURE__ */jsxRuntime.jsx(Box, {
9013
9028
  flex: 1,
9014
- children: /* @__PURE__ */jsx(Text, {
9029
+ children: /* @__PURE__ */jsxRuntime.jsx(Text, {
9015
9030
  muted,
9016
9031
  size: fontSize,
9017
9032
  textOverflow: "ellipsis",
@@ -9021,7 +9036,7 @@ const TreeItem = memo(function TreeItem2(props) {
9021
9036
  })]
9022
9037
  });
9023
9038
  if (href) {
9024
- return /* @__PURE__ */jsxs(Root, _objectSpread(_objectSpread({
9039
+ return /* @__PURE__ */jsxRuntime.jsxs(Root, _objectSpread(_objectSpread({
9025
9040
  "data-selected": selected ? "" : void 0,
9026
9041
  "data-tree-id": id,
9027
9042
  "data-tree-key": itemKey,
@@ -9030,7 +9045,7 @@ const TreeItem = memo(function TreeItem2(props) {
9030
9045
  onClick: handleClick,
9031
9046
  ref: rootRef,
9032
9047
  role: "none",
9033
- children: [/* @__PURE__ */jsx(TreeItemBox, {
9048
+ children: [/* @__PURE__ */jsxRuntime.jsx(TreeItemBox, {
9034
9049
  $level: tree.level,
9035
9050
  "aria-expanded": expanded,
9036
9051
  "data-ui": "TreeItem__box",
@@ -9039,16 +9054,16 @@ const TreeItem = memo(function TreeItem2(props) {
9039
9054
  role: "treeitem",
9040
9055
  tabIndex,
9041
9056
  children: content
9042
- }), /* @__PURE__ */jsx(TreeContext.Provider, {
9057
+ }), /* @__PURE__ */jsxRuntime.jsx(TreeContext.Provider, {
9043
9058
  value: contextValue,
9044
- children: children && /* @__PURE__ */jsx(TreeGroup, {
9059
+ children: children && /* @__PURE__ */jsxRuntime.jsx(TreeGroup, {
9045
9060
  hidden: !expanded,
9046
9061
  children
9047
9062
  })
9048
9063
  })]
9049
9064
  }));
9050
9065
  }
9051
- return /* @__PURE__ */jsxs(Root, _objectSpread(_objectSpread({
9066
+ return /* @__PURE__ */jsxRuntime.jsxs(Root, _objectSpread(_objectSpread({
9052
9067
  "data-selected": selected ? "" : void 0,
9053
9068
  "data-ui": "TreeItem",
9054
9069
  "data-tree-id": id,
@@ -9060,19 +9075,132 @@ const TreeItem = memo(function TreeItem2(props) {
9060
9075
  ref: rootRef,
9061
9076
  role: "treeitem",
9062
9077
  tabIndex,
9063
- children: [/* @__PURE__ */jsx(TreeItemBox, {
9078
+ children: [/* @__PURE__ */jsxRuntime.jsx(TreeItemBox, {
9064
9079
  $level: tree.level,
9065
9080
  as: "div",
9066
9081
  "data-ui": "TreeItem__box",
9067
9082
  children: content
9068
- }), /* @__PURE__ */jsx(TreeContext.Provider, {
9083
+ }), /* @__PURE__ */jsxRuntime.jsx(TreeContext.Provider, {
9069
9084
  value: contextValue,
9070
- children: children && /* @__PURE__ */jsx(TreeGroup, {
9085
+ children: children && /* @__PURE__ */jsxRuntime.jsx(TreeGroup, {
9071
9086
  expanded,
9072
9087
  children
9073
9088
  })
9074
9089
  })]
9075
9090
  }));
9076
9091
  });
9077
- export { Autocomplete, Avatar, AvatarCounter, AvatarStack, Badge, BoundaryElementProvider, Box, Breadcrumbs, Button, Card, Checkbox, Code, CodeSkeleton, Container, Dialog, DialogContext, DialogProvider, ElementQuery, ErrorBoundary, Flex, Grid, Heading, HeadingSkeleton, Hotkeys, Inline, KBD, Label, LabelSkeleton, Layer, LayerProvider, Menu, MenuButton, MenuDivider, MenuGroup, MenuItem, Popover, Portal, PortalProvider, Radio, Select, Skeleton, Spinner, SrOnly, Stack, Switch, Tab, TabList, TabPanel, Text, TextArea, TextInput, TextSkeleton, ThemeColorProvider, ThemeProvider, Toast, ToastProvider, Tooltip, Tree, TreeItem, VirtualList, _ResizeObserver, _elementSizeObserver, _fillCSSObject, _getArrayProp, _getResponsiveSpace, _hasFocus, _isEnterToClickElement, _isScrollable, _raf, _raf2, _responsive, attemptFocus, createColorTheme, focusFirstDescendant, focusLastDescendant, hexToRgb, hslToRgb, isFocusable, isHTMLAnchorElement, isHTMLButtonElement, isHTMLElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, multiply$1 as multiply, parseColor, rem, responsiveCodeFontStyle, responsiveHeadingFont, responsiveLabelFont, responsiveTextAlignStyle, responsiveTextFont, rgbToHex, rgbToHsl, rgba, screen$1 as screen, studioTheme, useArrayProp, useBoundaryElement, useClickOutside, useCustomValidity, useDialog, useElementRect, useElementSize, useForwardedRef, useGlobalKeyDown, useLayer, useMediaIndex, usePortal, usePrefersDark, useRootTheme, useTheme, useToast, useTree };
9078
- //# sourceMappingURL=index.esm.js.map
9092
+ exports.Autocomplete = Autocomplete;
9093
+ exports.Avatar = Avatar;
9094
+ exports.AvatarCounter = AvatarCounter;
9095
+ exports.AvatarStack = AvatarStack;
9096
+ exports.Badge = Badge;
9097
+ exports.BoundaryElementProvider = BoundaryElementProvider;
9098
+ exports.Box = Box;
9099
+ exports.Breadcrumbs = Breadcrumbs;
9100
+ exports.Button = Button;
9101
+ exports.Card = Card;
9102
+ exports.Checkbox = Checkbox;
9103
+ exports.Code = Code;
9104
+ exports.CodeSkeleton = CodeSkeleton;
9105
+ exports.Container = Container;
9106
+ exports.Dialog = Dialog;
9107
+ exports.DialogContext = DialogContext;
9108
+ exports.DialogProvider = DialogProvider;
9109
+ exports.ElementQuery = ElementQuery;
9110
+ exports.ErrorBoundary = ErrorBoundary;
9111
+ exports.Flex = Flex;
9112
+ exports.Grid = Grid;
9113
+ exports.Heading = Heading;
9114
+ exports.HeadingSkeleton = HeadingSkeleton;
9115
+ exports.Hotkeys = Hotkeys;
9116
+ exports.Inline = Inline;
9117
+ exports.KBD = KBD;
9118
+ exports.Label = Label;
9119
+ exports.LabelSkeleton = LabelSkeleton;
9120
+ exports.Layer = Layer;
9121
+ exports.LayerProvider = LayerProvider;
9122
+ exports.Menu = Menu;
9123
+ exports.MenuButton = MenuButton;
9124
+ exports.MenuDivider = MenuDivider;
9125
+ exports.MenuGroup = MenuGroup;
9126
+ exports.MenuItem = MenuItem;
9127
+ exports.Popover = Popover;
9128
+ exports.Portal = Portal;
9129
+ exports.PortalProvider = PortalProvider;
9130
+ exports.Radio = Radio;
9131
+ exports.Select = Select;
9132
+ exports.Skeleton = Skeleton;
9133
+ exports.Spinner = Spinner;
9134
+ exports.SrOnly = SrOnly;
9135
+ exports.Stack = Stack;
9136
+ exports.Switch = Switch;
9137
+ exports.Tab = Tab;
9138
+ exports.TabList = TabList;
9139
+ exports.TabPanel = TabPanel;
9140
+ exports.Text = Text;
9141
+ exports.TextArea = TextArea;
9142
+ exports.TextInput = TextInput;
9143
+ exports.TextSkeleton = TextSkeleton;
9144
+ exports.ThemeColorProvider = ThemeColorProvider;
9145
+ exports.ThemeProvider = ThemeProvider;
9146
+ exports.Toast = Toast;
9147
+ exports.ToastProvider = ToastProvider;
9148
+ exports.Tooltip = Tooltip;
9149
+ exports.Tree = Tree;
9150
+ exports.TreeItem = TreeItem;
9151
+ exports.VirtualList = VirtualList;
9152
+ exports._ResizeObserver = _ResizeObserver;
9153
+ exports._elementSizeObserver = _elementSizeObserver;
9154
+ exports._fillCSSObject = _fillCSSObject;
9155
+ exports._getArrayProp = _getArrayProp;
9156
+ exports._getResponsiveSpace = _getResponsiveSpace;
9157
+ exports._hasFocus = _hasFocus;
9158
+ exports._isEnterToClickElement = _isEnterToClickElement;
9159
+ exports._isScrollable = _isScrollable;
9160
+ exports._raf = _raf;
9161
+ exports._raf2 = _raf2;
9162
+ exports._responsive = _responsive;
9163
+ exports.attemptFocus = attemptFocus;
9164
+ exports.createColorTheme = createColorTheme;
9165
+ exports.focusFirstDescendant = focusFirstDescendant;
9166
+ exports.focusLastDescendant = focusLastDescendant;
9167
+ exports.hexToRgb = hexToRgb;
9168
+ exports.hslToRgb = hslToRgb;
9169
+ exports.isFocusable = isFocusable;
9170
+ exports.isHTMLAnchorElement = isHTMLAnchorElement;
9171
+ exports.isHTMLButtonElement = isHTMLButtonElement;
9172
+ exports.isHTMLElement = isHTMLElement;
9173
+ exports.isHTMLInputElement = isHTMLInputElement;
9174
+ exports.isHTMLSelectElement = isHTMLSelectElement;
9175
+ exports.isHTMLTextAreaElement = isHTMLTextAreaElement;
9176
+ exports.multiply = multiply$1;
9177
+ exports.parseColor = parseColor;
9178
+ exports.rem = rem;
9179
+ exports.responsiveCodeFontStyle = responsiveCodeFontStyle;
9180
+ exports.responsiveHeadingFont = responsiveHeadingFont;
9181
+ exports.responsiveLabelFont = responsiveLabelFont;
9182
+ exports.responsiveTextAlignStyle = responsiveTextAlignStyle;
9183
+ exports.responsiveTextFont = responsiveTextFont;
9184
+ exports.rgbToHex = rgbToHex;
9185
+ exports.rgbToHsl = rgbToHsl;
9186
+ exports.rgba = rgba;
9187
+ exports.screen = screen$1;
9188
+ exports.studioTheme = studioTheme;
9189
+ exports.useArrayProp = useArrayProp;
9190
+ exports.useBoundaryElement = useBoundaryElement;
9191
+ exports.useClickOutside = useClickOutside;
9192
+ exports.useCustomValidity = useCustomValidity;
9193
+ exports.useDialog = useDialog;
9194
+ exports.useElementRect = useElementRect;
9195
+ exports.useElementSize = useElementSize;
9196
+ exports.useForwardedRef = useForwardedRef;
9197
+ exports.useGlobalKeyDown = useGlobalKeyDown;
9198
+ exports.useLayer = useLayer;
9199
+ exports.useMediaIndex = useMediaIndex;
9200
+ exports.usePortal = usePortal;
9201
+ exports.usePrefersDark = usePrefersDark;
9202
+ exports.useRootTheme = useRootTheme;
9203
+ exports.useTheme = useTheme;
9204
+ exports.useToast = useToast;
9205
+ exports.useTree = useTree;
9206
+ //# sourceMappingURL=index.cjs.map