@sanity/ui 2.0.12 → 2.0.13-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/_chunks-cjs/getScopedTheme.js +547 -0
  2. package/dist/_chunks-cjs/getScopedTheme.js.map +1 -0
  3. package/dist/_chunks-es/getScopedTheme.mjs +548 -0
  4. package/dist/_chunks-es/getScopedTheme.mjs.map +1 -0
  5. package/dist/_legacy/getScopedTheme.esm.js +548 -0
  6. package/dist/_legacy/getScopedTheme.esm.js.map +1 -0
  7. package/dist/index.d.mts +2 -2
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.esm.js +74 -74
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.js +202 -202
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +74 -74
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/theme.d.mts +1 -1
  16. package/dist/theme.d.ts +1 -1
  17. package/dist/theme.esm.js +51 -587
  18. package/dist/theme.esm.js.map +1 -1
  19. package/dist/theme.js +22 -560
  20. package/dist/theme.js.map +1 -1
  21. package/dist/theme.mjs +51 -587
  22. package/dist/theme.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
  25. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +1 -1
  26. package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
  27. package/src/core/components/dialog/dialog.tsx +1 -1
  28. package/src/core/components/dialog/styles.ts +3 -3
  29. package/src/core/components/hotkeys/hotkeys.tsx +1 -1
  30. package/src/core/components/menu/menu.tsx +1 -1
  31. package/src/core/components/menu/menuDivider.ts +1 -1
  32. package/src/core/components/skeleton/skeleton.tsx +1 -1
  33. package/src/core/components/skeleton/textSkeleton.tsx +3 -3
  34. package/src/core/components/tab/tab.tsx +1 -1
  35. package/src/core/components/tab/tabList.tsx +1 -1
  36. package/src/core/components/toast/toast.tsx +1 -1
  37. package/src/core/components/toast/toastProvider.tsx +1 -1
  38. package/src/core/components/tree/style.ts +2 -3
  39. package/src/core/components/tree/treeItem.tsx +1 -1
  40. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +1 -1
  41. package/src/core/primitives/_selectable/selectable.tsx +1 -1
  42. package/src/core/primitives/_selectable/style.ts +1 -2
  43. package/src/core/primitives/avatar/avatar.tsx +1 -1
  44. package/src/core/primitives/avatar/avatarCounter.tsx +3 -4
  45. package/src/core/primitives/avatar/avatarStack.tsx +2 -3
  46. package/src/core/primitives/avatar/styles.ts +3 -3
  47. package/src/core/primitives/badge/badge.tsx +1 -1
  48. package/src/core/primitives/box/box.tsx +1 -1
  49. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
  50. package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
  51. package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
  52. package/src/core/primitives/button/button.tsx +1 -1
  53. package/src/core/primitives/button/styles.ts +3 -3
  54. package/src/core/primitives/card/__workshop__/selected.tsx +3 -3
  55. package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
  56. package/src/core/primitives/card/card.tsx +1 -1
  57. package/src/core/primitives/card/styles.ts +2 -3
  58. package/src/core/primitives/checkbox/checkbox.tsx +1 -1
  59. package/src/core/primitives/checkbox/styles.ts +1 -2
  60. package/src/core/primitives/code/code.tsx +1 -1
  61. package/src/core/primitives/code/styles.ts +1 -4
  62. package/src/core/primitives/container/container.tsx +1 -1
  63. package/src/core/primitives/container/styles.ts +2 -2
  64. package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
  65. package/src/core/primitives/flex/flex.tsx +1 -1
  66. package/src/core/primitives/grid/grid.tsx +1 -1
  67. package/src/core/primitives/heading/heading.tsx +1 -1
  68. package/src/core/primitives/heading/styles.ts +1 -2
  69. package/src/core/primitives/inline/inline.tsx +1 -1
  70. package/src/core/primitives/inline/styles.ts +2 -2
  71. package/src/core/primitives/kbd/kbd.tsx +1 -1
  72. package/src/core/primitives/label/label.tsx +1 -1
  73. package/src/core/primitives/label/styles.ts +1 -2
  74. package/src/core/primitives/popover/popoverCard.tsx +1 -1
  75. package/src/core/primitives/radio/radio.tsx +1 -1
  76. package/src/core/primitives/radio/styles.ts +1 -2
  77. package/src/core/primitives/select/select.tsx +1 -1
  78. package/src/core/primitives/select/styles.ts +5 -5
  79. package/src/core/primitives/spinner/spinner.tsx +1 -1
  80. package/src/core/primitives/stack/stack.tsx +1 -1
  81. package/src/core/primitives/stack/styles.ts +2 -2
  82. package/src/core/primitives/switch/styles.ts +3 -4
  83. package/src/core/primitives/switch/switch.tsx +1 -1
  84. package/src/core/primitives/text/__workshop__/colored.tsx +3 -3
  85. package/src/core/primitives/text/styles.ts +1 -2
  86. package/src/core/primitives/text/text.tsx +1 -1
  87. package/src/core/primitives/textArea/textArea.tsx +1 -1
  88. package/src/core/primitives/textInput/textInput.tsx +1 -1
  89. package/src/core/primitives/tooltip/tooltip.tsx +1 -1
  90. package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
  91. package/src/core/styles/border/borderStyle.ts +6 -6
  92. package/src/core/styles/box/boxStyle.ts +5 -5
  93. package/src/core/styles/flex/flexItemStyle.ts +2 -2
  94. package/src/core/styles/flex/flexStyle.ts +6 -6
  95. package/src/core/styles/font/responsiveFont.ts +2 -2
  96. package/src/core/styles/font/textAlignStyle.ts +2 -2
  97. package/src/core/styles/grid/gridItemStyle.ts +7 -7
  98. package/src/core/styles/grid/gridStyle.ts +9 -9
  99. package/src/core/styles/helpers.ts +2 -2
  100. package/src/core/styles/input/responsiveInputPaddingStyle.ts +2 -2
  101. package/src/core/styles/input/textInputStyle.ts +4 -4
  102. package/src/core/styles/margin/marginsStyle.test.ts +1 -1
  103. package/src/core/styles/padding/paddingStyle.test.ts +1 -1
  104. package/src/core/styles/radius/radiusStyle.ts +2 -2
  105. package/src/core/styles/shadow/shadowStyle.ts +2 -2
  106. package/src/core/theme/__workshop__/build/Root.tsx +1 -2
  107. package/src/core/theme/theme.test.tsx +1 -1
  108. package/src/core/theme/themeProvider.tsx +6 -7
  109. package/src/core/theme/useTheme.ts +2 -1
  110. package/src/core/utils/arrow/arrow.tsx +1 -1
  111. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
  112. package/src/core/utils/layer/layer.tsx +1 -1
  113. package/src/core/utils/srOnly/srOnly.tsx +1 -1
  114. package/src/core/utils/virtualList/virtualList.tsx +1 -1
  115. package/src/theme/system/theme.ts +1 -1
package/dist/index.js CHANGED
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
- var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), react = require("react"), ReactIs = require("react-is"), styledComponents = require("styled-components"), icons = require("@sanity/icons"), Refractor = require("react-refractor"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), reactDom = require("react-dom");
3
+ var theme = require("@sanity/ui/theme"), jsxRuntime = require("react/jsx-runtime"), react = require("react"), ReactIs = require("react-is"), styled = require("styled-components");
4
+ require("@sanity/color");
5
+ var getScopedTheme = require("./_chunks-cjs/getScopedTheme.js"), icons = require("@sanity/icons"), Refractor = require("react-refractor"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), reactDom = require("react-dom");
4
6
  function _interopDefaultCompat(e) {
5
7
  return e && typeof e == "object" && "default" in e ? e : { default: e };
6
8
  }
7
- var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs), Refractor__default = /* @__PURE__ */ _interopDefaultCompat(Refractor);
9
+ var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs), styled__default = /* @__PURE__ */ _interopDefaultCompat(styled), Refractor__default = /* @__PURE__ */ _interopDefaultCompat(Refractor);
8
10
  const createColorTheme = theme.createColorTheme, hexToRgb = theme.hexToRgb, hslToRgb = theme.hslToRgb, multiply = theme.multiply, parseColor = theme.parseColor, rgbToHex = theme.rgbToHex, rgbToHsl = theme.rgbToHsl, rgba = theme.rgba, screen = theme.screen, studioTheme = theme.buildTheme(), EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_CONTENT_OPACITY_PROPERTY = "--motion-content-opacity", POPOVER_MOTION_PROPS = {
9
11
  initial: {
10
12
  opacity: 0.5,
@@ -37,12 +39,12 @@ function _responsive(media, values, callback) {
37
39
  function _getArrayProp(val, defaultVal) {
38
40
  return val === void 0 ? defaultVal || EMPTY_ARRAY : Array.isArray(val) ? val : [val];
39
41
  }
40
- function _getResponsiveSpace(theme$1, props, spaceIndexes = EMPTY_ARRAY) {
42
+ function _getResponsiveSpace(theme2, props, spaceIndexes = EMPTY_ARRAY) {
41
43
  if (!Array.isArray(spaceIndexes))
42
44
  throw new Error("the property must be array of numbers");
43
45
  if (spaceIndexes.length === 0)
44
46
  return null;
45
- const { media, space } = theme.getTheme_v2(theme$1);
47
+ const { media, space } = theme2.sanity.v2;
46
48
  return _responsive(
47
49
  media,
48
50
  spaceIndexes,
@@ -50,7 +52,7 @@ function _getResponsiveSpace(theme$1, props, spaceIndexes = EMPTY_ARRAY) {
50
52
  );
51
53
  }
52
54
  function responsiveFont(fontKey, props) {
53
- const { $size, $weight } = props, { font, media } = theme.getTheme_v2(props.theme), { family, sizes, weights } = font[fontKey], fontWeight = $weight && weights[$weight] || weights.regular, defaultSize = sizes[2], base = {
55
+ const { $size, $weight } = props, { font, media } = props.theme.sanity.v2, { family, sizes, weights } = font[fontKey], fontWeight = $weight && weights[$weight] || weights.regular, defaultSize = sizes[2], base = {
54
56
  position: "relative",
55
57
  fontFamily: family,
56
58
  fontWeight,
@@ -111,7 +113,7 @@ function responsiveLabelFont(props) {
111
113
  return responsiveFont("label", props);
112
114
  }
113
115
  function responsiveTextAlignStyle(props) {
114
- const { media } = theme.getTheme_v2(props.theme);
116
+ const { media } = props.theme.sanity.v2;
115
117
  return _responsive(media, props.$align, (textAlign) => ({ textAlign }));
116
118
  }
117
119
  function responsiveTextFont(props) {
@@ -528,8 +530,8 @@ function ThemeProvider(props) {
528
530
  theme: rootTheme,
529
531
  scheme,
530
532
  tone
531
- } : null, [rootTheme, scheme, tone]), theme$1 = react.useMemo(() => rootTheme ? theme.getScopedTheme(rootTheme, scheme, tone) : null, [scheme, rootTheme, tone]);
532
- return theme$1 ? /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsxRuntime.jsx(styledComponents.ThemeProvider, { theme: theme$1, children }) }) : /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
533
+ } : null, [rootTheme, scheme, tone]), theme2 = react.useMemo(() => rootTheme ? getScopedTheme.getScopedTheme(rootTheme, scheme, tone) : null, [scheme, rootTheme, tone]);
534
+ return theme2 ? theme2.sanity.v2 ? /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsxRuntime.jsx(styled.ThemeProvider, { theme: theme2, children }) }) : /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme.sanity.v2" property in theme' }) : /* @__PURE__ */ jsxRuntime.jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
533
535
  }
534
536
  function useRootTheme() {
535
537
  const value = react.useContext(ThemeContext);
@@ -542,10 +544,10 @@ function ThemeColorProvider(props) {
542
544
  return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { scheme: scheme || root.scheme, theme: root.theme, tone, children });
543
545
  }
544
546
  function useTheme() {
545
- return styledComponents.useTheme();
547
+ return styled.useTheme();
546
548
  }
547
549
  function useTheme_v2() {
548
- return theme.getTheme_v2(styledComponents.useTheme());
550
+ return getScopedTheme.getTheme_v2(styled.useTheme());
549
551
  }
550
552
  const MEDIA_STORE_CACHE = /* @__PURE__ */ new WeakMap();
551
553
  function _getMediaQuery(media, index) {
@@ -642,7 +644,7 @@ function responsiveBorderStyle() {
642
644
  }
643
645
  function border(props) {
644
646
  var _a, _b;
645
- const { card, media } = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
647
+ const { card, media } = props.theme.sanity.v2, borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
646
648
  return _responsive(
647
649
  media,
648
650
  props.$border,
@@ -651,7 +653,7 @@ function border(props) {
651
653
  }
652
654
  function borderTop(props) {
653
655
  var _a, _b;
654
- const { card, media } = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
656
+ const { card, media } = props.theme.sanity.v2, borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
655
657
  return _responsive(
656
658
  media,
657
659
  props.$borderTop,
@@ -660,7 +662,7 @@ function borderTop(props) {
660
662
  }
661
663
  function borderRight(props) {
662
664
  var _a, _b;
663
- const { card, media } = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
665
+ const { card, media } = props.theme.sanity.v2, borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
664
666
  return _responsive(
665
667
  media,
666
668
  props.$borderRight,
@@ -669,7 +671,7 @@ function borderRight(props) {
669
671
  }
670
672
  function borderBottom(props) {
671
673
  var _a, _b;
672
- const { card, media } = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
674
+ const { card, media } = props.theme.sanity.v2, borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
673
675
  return _responsive(
674
676
  media,
675
677
  props.$borderBottom,
@@ -678,7 +680,7 @@ function borderBottom(props) {
678
680
  }
679
681
  function borderLeft(props) {
680
682
  var _a, _b;
681
- const { card, media } = theme.getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
683
+ const { card, media } = props.theme.sanity.v2, borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
682
684
  return _responsive(
683
685
  media,
684
686
  props.$borderLeft,
@@ -708,25 +710,25 @@ function responsiveBoxStyle() {
708
710
  ];
709
711
  }
710
712
  function responsiveBoxDisplayStyle(props) {
711
- const { media } = theme.getTheme_v2(props.theme);
713
+ const { media } = props.theme.sanity.v2;
712
714
  return _responsive(media, props.$display, (display) => ({
713
715
  "&:not([hidden])": { display }
714
716
  }));
715
717
  }
716
718
  function responsiveBoxSizingStyle(props) {
717
- const { media } = theme.getTheme_v2(props.theme);
719
+ const { media } = props.theme.sanity.v2;
718
720
  return _responsive(media, props.$sizing, (sizing) => ({
719
721
  boxSizing: BOX_SIZING[sizing]
720
722
  }));
721
723
  }
722
724
  function responsiveBoxHeightStyle(props) {
723
- const { media } = theme.getTheme_v2(props.theme);
725
+ const { media } = props.theme.sanity.v2;
724
726
  return _responsive(media, props.$height, (height) => ({
725
727
  height: BOX_HEIGHT[height]
726
728
  }));
727
729
  }
728
730
  function responsiveBoxOverflowStyle(props) {
729
- const { media } = theme.getTheme_v2(props.theme);
731
+ const { media } = props.theme.sanity.v2;
730
732
  return _responsive(media, props.$overflow, (overflow) => ({
731
733
  overflow
732
734
  }));
@@ -747,25 +749,25 @@ function responsiveFlexStyle() {
747
749
  ];
748
750
  }
749
751
  function responsiveFlexAlignStyle(props) {
750
- const { media } = theme.getTheme_v2(props.theme);
752
+ const { media } = props.theme.sanity.v2;
751
753
  return _responsive(media, props.$align, (align) => ({ alignItems: align }));
752
754
  }
753
755
  function responsiveFlexGapStyle(props) {
754
- const { media, space } = theme.getTheme_v2(props.theme);
756
+ const { media, space } = props.theme.sanity.v2;
755
757
  return _responsive(media, props.$gap, (gap) => ({
756
758
  gap: gap ? rem(space[gap]) : void 0
757
759
  }));
758
760
  }
759
761
  function responsiveFlexWrapStyle(props) {
760
- const { media } = theme.getTheme_v2(props.theme);
762
+ const { media } = props.theme.sanity.v2;
761
763
  return _responsive(media, props.$wrap, (wrap) => ({ flexWrap: wrap }));
762
764
  }
763
765
  function responsiveFlexJustifyStyle(props) {
764
- const { media } = theme.getTheme_v2(props.theme);
766
+ const { media } = props.theme.sanity.v2;
765
767
  return _responsive(media, props.$justify, (justify) => ({ justifyContent: justify }));
766
768
  }
767
769
  function responsiveFlexDirectionStyle(props) {
768
- const { media } = theme.getTheme_v2(props.theme);
770
+ const { media } = props.theme.sanity.v2;
769
771
  return _responsive(media, props.$direction, (direction) => ({ flexDirection: direction }));
770
772
  }
771
773
  const BASE_STYLE$2 = {
@@ -776,7 +778,7 @@ function flexItemStyle() {
776
778
  return [BASE_STYLE$2, responsiveFlexItemStyle];
777
779
  }
778
780
  function responsiveFlexItemStyle(props) {
779
- const { media } = theme.getTheme_v2(props.theme);
781
+ const { media } = props.theme.sanity.v2;
780
782
  return props.$flex ? _responsive(media, props.$flex, (flex) => ({ flex })) : EMPTY_ARRAY;
781
783
  }
782
784
  function focusRingBorderStyle(border2) {
@@ -823,49 +825,49 @@ function responsiveGridStyle() {
823
825
  ];
824
826
  }
825
827
  function responsiveGridAutoFlowStyle(props) {
826
- const { media } = theme.getTheme_v2(props.theme);
828
+ const { media } = props.theme.sanity.v2;
827
829
  return _responsive(media, props.$autoFlow, (autoFlow) => ({
828
830
  gridAutoFlow: autoFlow
829
831
  }));
830
832
  }
831
833
  function responsiveGridAutoRowsStyle(props) {
832
- const { media } = theme.getTheme_v2(props.theme);
834
+ const { media } = props.theme.sanity.v2;
833
835
  return _responsive(media, props.$autoRows, (autoRows) => ({
834
836
  gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows]
835
837
  }));
836
838
  }
837
839
  function responsiveGridAutoColsStyle(props) {
838
- const { media } = theme.getTheme_v2(props.theme);
840
+ const { media } = props.theme.sanity.v2;
839
841
  return _responsive(media, props.$autoCols, (autoCols) => ({
840
842
  gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols]
841
843
  }));
842
844
  }
843
845
  function responsiveGridColumnsStyle(props) {
844
- const { media } = theme.getTheme_v2(props.theme);
846
+ const { media } = props.theme.sanity.v2;
845
847
  return _responsive(media, props.$columns, (columns) => ({
846
848
  gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));`
847
849
  }));
848
850
  }
849
851
  function responsiveGridRowsStyle(props) {
850
- const { media } = theme.getTheme_v2(props.theme);
852
+ const { media } = props.theme.sanity.v2;
851
853
  return _responsive(media, props.$rows, (rows) => ({
852
854
  gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));`
853
855
  }));
854
856
  }
855
857
  function responsiveGridGapStyle(props) {
856
- const { media, space } = theme.getTheme_v2(props.theme);
858
+ const { media, space } = props.theme.sanity.v2;
857
859
  return _responsive(media, props.$gap, (gap) => ({
858
860
  gridGap: gap ? rem(space[gap]) : void 0
859
861
  }));
860
862
  }
861
863
  function responsiveGridGapXStyle(props) {
862
- const { media, space } = theme.getTheme_v2(props.theme);
864
+ const { media, space } = props.theme.sanity.v2;
863
865
  return _responsive(media, props.$gapX, (gapX) => ({
864
866
  columnGap: gapX ? rem(space[gapX]) : void 0
865
867
  }));
866
868
  }
867
869
  function responsiveGridGapYStyle(props) {
868
- const { media, space } = theme.getTheme_v2(props.theme);
870
+ const { media, space } = props.theme.sanity.v2;
869
871
  return _responsive(media, props.$gapY, (gapY) => ({
870
872
  rowGap: gapY ? rem(space[gapY]) : void 0
871
873
  }));
@@ -888,37 +890,37 @@ const GRID_ITEM_ROW = {
888
890
  full: "1 / -1"
889
891
  };
890
892
  function responsiveGridItemRowStyle(props) {
891
- const { media } = theme.getTheme_v2(props.theme);
893
+ const { media } = props.theme.sanity.v2;
892
894
  return _responsive(media, props.$row, (row) => typeof row == "number" ? { gridRow: `span ${row} / span ${row}` } : { gridRow: GRID_ITEM_ROW[row] });
893
895
  }
894
896
  function responsiveGridItemRowStartStyle(props) {
895
- const { media } = theme.getTheme_v2(props.theme);
897
+ const { media } = props.theme.sanity.v2;
896
898
  return _responsive(media, props.$rowStart, (rowStart) => ({
897
899
  gridRowStart: rowStart
898
900
  }));
899
901
  }
900
902
  function responsiveGridItemRowEndStyle(props) {
901
- const { media } = theme.getTheme_v2(props.theme);
903
+ const { media } = props.theme.sanity.v2;
902
904
  return _responsive(media, props.$rowEnd, (rowEnd) => ({ gridRowEnd: rowEnd }));
903
905
  }
904
906
  function responsiveGridItemColumnStyle(props) {
905
- const { media } = theme.getTheme_v2(props.theme);
907
+ const { media } = props.theme.sanity.v2;
906
908
  return _responsive(media, props.$column, (column) => typeof column == "number" ? { gridColumn: `span ${column} / span ${column}` } : { gridColumn: GRID_ITEM_COLUMN[column] });
907
909
  }
908
910
  function responsiveGridItemColumnStartStyle(props) {
909
- const { media } = theme.getTheme_v2(props.theme);
911
+ const { media } = props.theme.sanity.v2;
910
912
  return _responsive(media, props.$columnStart, (columnStart) => ({
911
913
  gridColumnStart: columnStart
912
914
  }));
913
915
  }
914
916
  function responsiveGridItemColumnEndStyle(props) {
915
- const { media } = theme.getTheme_v2(props.theme);
917
+ const { media } = props.theme.sanity.v2;
916
918
  return _responsive(media, props.$columnEnd, (columnEnd) => ({
917
919
  gridColumnEnd: columnEnd
918
920
  }));
919
921
  }
920
922
  function responsiveInputPaddingStyle(props) {
921
- const { $fontSize, $iconLeft, $iconRight, $padding, $space } = props, { font, media, space } = theme.getTheme_v2(props.theme), len = Math.max($padding.length, $space.length, $fontSize.length), _padding = [], _space = [], _fontSize = [];
923
+ const { $fontSize, $iconLeft, $iconRight, $padding, $space } = props, { font, media, space } = props.theme.sanity.v2, len = Math.max($padding.length, $space.length, $fontSize.length), _padding = [], _space = [], _fontSize = [];
922
924
  for (let i = 0; i < len; i += 1)
923
925
  _fontSize[i] = $fontSize[i] === void 0 ? _fontSize[i - 1] : $fontSize[i], _padding[i] = $padding[i] === void 0 ? _padding[i - 1] : $padding[i], _space[i] = $space[i] === void 0 ? _space[i - 1] : $space[i];
924
926
  return _responsive(media, _padding, (_, i) => {
@@ -934,7 +936,7 @@ function responsiveInputPaddingStyle(props) {
934
936
  function responsiveInputPaddingIconRightStyle(props) {
935
937
  return responsiveInputPaddingStyle({ ...props, $iconRight: !0 });
936
938
  }
937
- const ROOT_STYLE = styledComponents.css`
939
+ const ROOT_STYLE = styled.css`
938
940
  &:not([hidden]) {
939
941
  display: flex;
940
942
  }
@@ -945,8 +947,8 @@ function textInputRootStyle() {
945
947
  return ROOT_STYLE;
946
948
  }
947
949
  function textInputBaseStyle(props) {
948
- const { $scheme, $tone, $weight } = props, { color, font } = theme.getTheme_v2(props.theme);
949
- return styledComponents.css`
950
+ const { $scheme, $tone, $weight } = props, { color, font } = props.theme.sanity.v2;
951
+ return styled.css`
950
952
  appearance: none;
951
953
  background: none;
952
954
  border: 0;
@@ -1013,7 +1015,7 @@ function textInputBaseStyle(props) {
1013
1015
  `;
1014
1016
  }
1015
1017
  function textInputFontSizeStyle(props) {
1016
- const { font, media } = theme.getTheme_v2(props.theme);
1018
+ const { font, media } = props.theme.sanity.v2;
1017
1019
  return _responsive(media, props.$fontSize, (sizeIndex) => {
1018
1020
  const size2 = font.text.sizes[sizeIndex] || font.text.sizes[2];
1019
1021
  return {
@@ -1023,8 +1025,8 @@ function textInputFontSizeStyle(props) {
1023
1025
  });
1024
1026
  }
1025
1027
  function textInputRepresentationStyle(props) {
1026
- const { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = theme.getTheme_v2(props.theme);
1027
- return styledComponents.css`
1028
+ const { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = props.theme.sanity.v2;
1029
+ return styled.css`
1028
1030
  --input-box-shadow: none;
1029
1031
 
1030
1032
  position: absolute;
@@ -1175,7 +1177,7 @@ function responsivePaddingStyle(props) {
1175
1177
  ].filter(Boolean);
1176
1178
  }
1177
1179
  function responsiveRadiusStyle(props) {
1178
- const { media, radius } = theme.getTheme_v2(props.theme);
1180
+ const { media, radius } = props.theme.sanity.v2;
1179
1181
  return _responsive(media, props.$radius, (value) => {
1180
1182
  let borderRadius = 0;
1181
1183
  return typeof value == "number" && (borderRadius = rem(radius[value])), value === "full" && (borderRadius = "9999px"), { borderRadius };
@@ -1191,7 +1193,7 @@ function shadowStyle(shadow, outlineWidth = 1) {
1191
1193
  return { boxShadow: `${outline}, ${umbra}, ${penumbra}, ${ambient}` };
1192
1194
  }
1193
1195
  function responsiveShadowStyle(props) {
1194
- const { card, media, shadow } = theme.getTheme_v2(props.theme);
1196
+ const { card, media, shadow } = props.theme.sanity.v2;
1195
1197
  return _responsive(
1196
1198
  media,
1197
1199
  props.$shadow,
@@ -1199,15 +1201,15 @@ function responsiveShadowStyle(props) {
1199
1201
  );
1200
1202
  }
1201
1203
  function labelBaseStyle(props) {
1202
- const { $accent, $muted } = props, { font } = theme.getTheme_v2(props.theme);
1203
- return styledComponents.css`
1204
+ const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
1205
+ return styled.css`
1204
1206
  text-transform: uppercase;
1205
1207
 
1206
- ${$accent && styledComponents.css`
1208
+ ${$accent && styled.css`
1207
1209
  color: var(--card-accent-fg-color);
1208
1210
  `}
1209
1211
 
1210
- ${$muted && styledComponents.css`
1212
+ ${$muted && styled.css`
1211
1213
  color: var(--card-muted-fg-color);
1212
1214
  `}
1213
1215
 
@@ -1232,7 +1234,7 @@ function labelBaseStyle(props) {
1232
1234
  }
1233
1235
  `;
1234
1236
  }
1235
- const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), SpanWithTextOverflow$2 = styledComponents.styled.span`
1237
+ const Root$C = styled__default.default.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), SpanWithTextOverflow$2 = styled__default.default.span`
1236
1238
  display: block;
1237
1239
  white-space: nowrap;
1238
1240
  text-overflow: ellipsis;
@@ -1310,7 +1312,7 @@ function avatarArrowStyle() {
1310
1312
  };
1311
1313
  }
1312
1314
  function avatarRootStyle(props) {
1313
- const { $color } = props, { avatar } = theme.getTheme_v2(props.theme);
1315
+ const { $color } = props, { avatar } = props.theme.sanity.v2;
1314
1316
  return {
1315
1317
  "--avatar-bg-color": `var(--card-avatar-${$color}-bg-color)`,
1316
1318
  "--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)`,
@@ -1347,7 +1349,7 @@ function avatarRootStyle(props) {
1347
1349
  };
1348
1350
  }
1349
1351
  function responsiveAvatarSizeStyle(props) {
1350
- const { avatar, media } = theme.getTheme_v2(props.theme);
1352
+ const { avatar, media } = props.theme.sanity.v2;
1351
1353
  return _responsive(media, props.$size, (size2) => {
1352
1354
  const avatarSize = avatar.sizes[size2] || avatar.sizes[0];
1353
1355
  return {
@@ -1398,12 +1400,12 @@ function avatarStrokeStyle() {
1398
1400
  }
1399
1401
  };
1400
1402
  }
1401
- const Root$B = styledComponents.styled.div(
1403
+ const Root$B = styled__default.default.div(
1402
1404
  responsiveAvatarSizeStyle,
1403
1405
  avatarStyle.root
1404
- ), Arrow$1 = styledComponents.styled.div(avatarStyle.arrow), BgStroke = styledComponents.styled.ellipse(avatarStyle.bgStroke), Stroke = styledComponents.styled.ellipse(avatarStyle.stroke), Initials = styledComponents.styled.div(avatarStyle.initials), InitialsLabel = styledComponents.styled(Label)({
1406
+ ), Arrow$1 = styled__default.default.div(avatarStyle.arrow), BgStroke = styled__default.default.ellipse(avatarStyle.bgStroke), Stroke = styled__default.default.ellipse(avatarStyle.stroke), Initials = styled__default.default.div(avatarStyle.initials), InitialsLabel = styled__default.default(Label)({
1405
1407
  color: "inherit"
1406
- }), Image = styledComponents.styled.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
1408
+ }), Image = styled__default.default.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
1407
1409
  const {
1408
1410
  __unstable_hideInnerStroke,
1409
1411
  as: asProp,
@@ -1494,7 +1496,7 @@ const Root$B = styledComponents.styled.div(
1494
1496
  );
1495
1497
  });
1496
1498
  function _responsiveAvatarCounterSizeStyle(props) {
1497
- const { avatar, media } = theme.getTheme_v2(props.theme);
1499
+ const { avatar, media } = props.theme.sanity.v2;
1498
1500
  return _responsive(media, props.$size, (size2) => {
1499
1501
  const avatarSize = avatar.sizes[size2];
1500
1502
  return avatarSize ? {
@@ -1505,8 +1507,8 @@ function _responsiveAvatarCounterSizeStyle(props) {
1505
1507
  });
1506
1508
  }
1507
1509
  function _avatarCounterBaseStyle(props) {
1508
- const { space } = theme.getTheme_v2(props.theme);
1509
- return styledComponents.css`
1510
+ const { space } = props.theme.sanity.v2;
1511
+ return styled.css`
1510
1512
  align-items: center;
1511
1513
  justify-content: center;
1512
1514
  box-sizing: border-box;
@@ -1524,7 +1526,7 @@ function _avatarCounterBaseStyle(props) {
1524
1526
  }
1525
1527
  `;
1526
1528
  }
1527
- const Root$A = styledComponents.styled.div(
1529
+ const Root$A = styled__default.default.div(
1528
1530
  _responsiveAvatarCounterSizeStyle,
1529
1531
  _avatarCounterBaseStyle
1530
1532
  ), AvatarCounter = react.forwardRef(function(props, ref) {
@@ -1539,7 +1541,7 @@ function childrenToElementArray(children) {
1539
1541
  (node) => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node == "string"
1540
1542
  );
1541
1543
  }
1542
- const BASE_STYLES = styledComponents.css`
1544
+ const BASE_STYLES = styled.css`
1543
1545
  white-space: nowrap;
1544
1546
 
1545
1547
  & > div {
@@ -1554,7 +1556,7 @@ function avatarStackStyle() {
1554
1556
  return BASE_STYLES;
1555
1557
  }
1556
1558
  function responsiveAvatarStackSizeStyle(props) {
1557
- const { avatar, media } = theme.getTheme_v2(props.theme);
1559
+ const { avatar, media } = props.theme.sanity.v2;
1558
1560
  return _responsive(media, props.$size, (size2) => {
1559
1561
  const avatarSize = avatar.sizes[size2];
1560
1562
  return avatarSize ? {
@@ -1564,7 +1566,7 @@ function responsiveAvatarStackSizeStyle(props) {
1564
1566
  } : EMPTY_RECORD;
1565
1567
  });
1566
1568
  }
1567
- const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
1569
+ const Root$z = styled__default.default.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
1568
1570
  const {
1569
1571
  children: childrenProp,
1570
1572
  maxLength: maxLengthProp = 4,
@@ -1578,7 +1580,7 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
1578
1580
  len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) }),
1579
1581
  visibleChildren.map((child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, { size: size2 }) }, String(childIndex)))
1580
1582
  ] });
1581
- }), Root$y = styledComponents.styled.div(
1583
+ }), Root$y = styled__default.default.div(
1582
1584
  boxStyle,
1583
1585
  flexItemStyle,
1584
1586
  responsiveBoxStyle,
@@ -1653,15 +1655,15 @@ const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avata
1653
1655
  );
1654
1656
  });
1655
1657
  function textBaseStyle(props) {
1656
- const { $accent, $muted } = props, { font } = theme.getTheme_v2(props.theme);
1657
- return styledComponents.css`
1658
+ const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
1659
+ return styled.css`
1658
1660
  color: var(--card-fg-color);
1659
1661
 
1660
- ${$accent && styledComponents.css`
1662
+ ${$accent && styled.css`
1661
1663
  color: var(--card-accent-fg-color);
1662
1664
  `}
1663
1665
 
1664
- ${$muted && styledComponents.css`
1666
+ ${$muted && styled.css`
1665
1667
  color: var(--card-muted-fg-color);
1666
1668
  `}
1667
1669
 
@@ -1715,11 +1717,11 @@ function textBaseStyle(props) {
1715
1717
  }
1716
1718
  `;
1717
1719
  }
1718
- const Root$x = styledComponents.styled.div(
1720
+ const Root$x = styled__default.default.div(
1719
1721
  responsiveTextFont,
1720
1722
  responsiveTextAlignStyle,
1721
1723
  textBaseStyle
1722
- ), SpanWithTextOverflow$1 = styledComponents.styled.span`
1724
+ ), SpanWithTextOverflow$1 = styled__default.default.span`
1723
1725
  display: block;
1724
1726
  white-space: nowrap;
1725
1727
  text-overflow: ellipsis;
@@ -1765,7 +1767,7 @@ function badgeStyle(props) {
1765
1767
  }
1766
1768
  };
1767
1769
  }
1768
- const Root$w = styledComponents.styled(Box)(
1770
+ const Root$w = styled__default.default(Box)(
1769
1771
  responsiveRadiusStyle,
1770
1772
  badgeStyle
1771
1773
  ), Badge = react.forwardRef(function(props, ref) {
@@ -1791,7 +1793,7 @@ const Root$w = styledComponents.styled(Box)(
1791
1793
  children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children })
1792
1794
  }
1793
1795
  );
1794
- }), Root$v = styledComponents.styled(Box)(
1796
+ }), Root$v = styled__default.default(Box)(
1795
1797
  flexItemStyle,
1796
1798
  responsiveFlexStyle
1797
1799
  ), Flex = react.forwardRef(function(props, ref) {
@@ -1810,7 +1812,7 @@ const Root$w = styledComponents.styled(Box)(
1810
1812
  ref
1811
1813
  }
1812
1814
  );
1813
- }), rotate$1 = styledComponents.keyframes`
1815
+ }), rotate$1 = styled.keyframes`
1814
1816
  from {
1815
1817
  transform: rotate(0deg);
1816
1818
  }
@@ -1818,7 +1820,7 @@ const Root$w = styledComponents.styled(Box)(
1818
1820
  to {
1819
1821
  transform: rotate(360deg);
1820
1822
  }
1821
- `, Root$u = styledComponents.styled(Text)`
1823
+ `, Root$u = styled__default.default(Text)`
1822
1824
  & > span > svg {
1823
1825
  animation: ${rotate$1} 500ms linear infinite;
1824
1826
  }
@@ -1897,8 +1899,8 @@ function _cardColorStyle(base, color, checkered = !1) {
1897
1899
  };
1898
1900
  }
1899
1901
  function buttonBaseStyles(props) {
1900
- const { $width } = props, { style } = theme.getTheme_v2(props.theme);
1901
- return styledComponents.css`
1902
+ const { $width } = props, { style } = props.theme.sanity.v2;
1903
+ return styled.css`
1902
1904
  ${style == null ? void 0 : style.button};
1903
1905
 
1904
1906
  -webkit-font-smoothing: inherit;
@@ -1919,7 +1921,7 @@ function buttonBaseStyles(props) {
1919
1921
  position: relative;
1920
1922
  vertical-align: top;
1921
1923
 
1922
- ${$width === "fill" && styledComponents.css`
1924
+ ${$width === "fill" && styled.css`
1923
1925
  width: -moz-available;
1924
1926
  width: -webkit-fill-available;
1925
1927
  width: stretch;
@@ -1943,7 +1945,7 @@ function combineBoxShadow(...boxShadows) {
1943
1945
  }
1944
1946
  function buttonColorStyles(props) {
1945
1947
  var _a;
1946
- const { $mode } = props, { button, color: baseColor, style } = theme.getTheme_v2(props.theme), shadow = props.$mode === "ghost", mode = baseColor.button[$mode] || baseColor.button.default, color = mode[props.$tone] || mode.default, border2 = {
1948
+ const { $mode } = props, { button, color: baseColor, style } = props.theme.sanity.v2, shadow = props.$mode === "ghost", mode = baseColor.button[$mode] || baseColor.button.default, color = mode[props.$tone] || mode.default, border2 = {
1947
1949
  width: button.border.width,
1948
1950
  color: "var(--card-border-color)"
1949
1951
  }, defaultBoxShadow = void 0;
@@ -1983,7 +1985,7 @@ function buttonColorStyles(props) {
1983
1985
  (_a = style == null ? void 0 : style.button) == null ? void 0 : _a.root
1984
1986
  ].filter(Boolean);
1985
1987
  }
1986
- const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styledComponents.styled.div`
1988
+ const Root$t = styled__default.default.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styled__default.default.div`
1987
1989
  position: absolute;
1988
1990
  top: 0;
1989
1991
  left: 0;
@@ -2082,9 +2084,9 @@ function cardStyle(props) {
2082
2084
  return [cardBaseStyle(props), cardColorStyle(props)];
2083
2085
  }
2084
2086
  function cardBaseStyle(props) {
2085
- const { $checkered } = props, { space } = theme.getTheme_v2(props.theme);
2086
- return styledComponents.css`
2087
- ${$checkered && styledComponents.css`
2087
+ const { $checkered } = props, { space } = props.theme.sanity.v2;
2088
+ return styled.css`
2089
+ ${$checkered && styled.css`
2088
2090
  background-size: ${space[3]}px ${space[3]}px;
2089
2091
  background-position: 50% 50%;
2090
2092
  background-image: var(--card-bg-image);
@@ -2116,8 +2118,8 @@ function cardBaseStyle(props) {
2116
2118
  }
2117
2119
  function cardColorStyle(props) {
2118
2120
  var _a;
2119
- const { $checkered, $focusRing } = props, { card, color, style } = theme.getTheme_v2(props.theme), border2 = { width: card.border.width, color: "var(--card-border-color)" };
2120
- return styledComponents.css`
2121
+ const { $checkered, $focusRing } = props, { card, color, style } = props.theme.sanity.v2, border2 = { width: card.border.width, color: "var(--card-border-color)" };
2122
+ return styled.css`
2121
2123
  color-scheme: ${color._dark ? "dark" : "light"};
2122
2124
 
2123
2125
  ${_cardColorStyle(color, color, $checkered)}
@@ -2204,7 +2206,7 @@ function cardColorStyle(props) {
2204
2206
  ${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
2205
2207
  `;
2206
2208
  }
2207
- const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
2209
+ const Root$s = styled__default.default(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
2208
2210
  const {
2209
2211
  __unstable_checkered: checkered = !1,
2210
2212
  __unstable_focusRing: focusRing = !1,
@@ -2250,14 +2252,14 @@ const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRad
2250
2252
  ) });
2251
2253
  });
2252
2254
  function checkboxBaseStyles() {
2253
- return styledComponents.css`
2255
+ return styled.css`
2254
2256
  position: relative;
2255
2257
  display: inline-block;
2256
2258
  `;
2257
2259
  }
2258
2260
  function inputElementStyles(props) {
2259
- const { color, input, radius } = theme.getTheme_v2(props.theme), { focusRing } = input.checkbox;
2260
- return styledComponents.css`
2261
+ const { color, input, radius } = props.theme.sanity.v2, { focusRing } = input.checkbox;
2262
+ return styled.css`
2261
2263
  position: absolute;
2262
2264
  top: 0;
2263
2265
  left: 0;
@@ -2368,7 +2370,7 @@ function inputElementStyles(props) {
2368
2370
  }
2369
2371
  `;
2370
2372
  }
2371
- const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styledComponents.styled.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
2373
+ const Root$r = styled__default.default.div(checkboxBaseStyles), Input$5 = styled__default.default.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
2372
2374
  const {
2373
2375
  checked,
2374
2376
  className,
@@ -2401,10 +2403,8 @@ const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styled
2401
2403
  ] })
2402
2404
  ] });
2403
2405
  });
2404
- function codeSyntaxHighlightingStyle({ theme: theme$1 }) {
2405
- const {
2406
- color: { syntax: color }
2407
- } = theme.getTheme_v2(theme$1);
2406
+ function codeSyntaxHighlightingStyle({ theme: theme2 }) {
2407
+ const color = theme2.sanity.v2.color.syntax;
2408
2408
  return {
2409
2409
  "&.atrule": { color: color.atrule },
2410
2410
  "&.attr-name": { color: color.attrName },
@@ -2445,7 +2445,7 @@ function codeSyntaxHighlightingStyle({ theme: theme$1 }) {
2445
2445
  };
2446
2446
  }
2447
2447
  function codeBaseStyle() {
2448
- return styledComponents.css`
2448
+ return styled.css`
2449
2449
  color: var(--card-code-fg-color);
2450
2450
 
2451
2451
  & code {
@@ -2473,7 +2473,7 @@ function codeBaseStyle() {
2473
2473
  }
2474
2474
  `;
2475
2475
  }
2476
- const Root$q = styledComponents.styled.pre(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
2476
+ const Root$q = styled__default.default.pre(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
2477
2477
  const { children, language: languageProp, size: size2 = 2, weight, ...restProps } = props, language = typeof languageProp == "string" ? languageProp : void 0, registered = language ? Refractor__default.default.hasLanguage(language) : !1;
2478
2478
  return /* @__PURE__ */ jsxRuntime.jsxs(Root$q, { "data-ui": "Code", ...restProps, $size: useArrayProp(size2), $weight: weight, ref, children: [
2479
2479
  !(language && registered) && /* @__PURE__ */ jsxRuntime.jsx("code", { children }),
@@ -2487,12 +2487,12 @@ function containerBaseStyle() {
2487
2487
  return BASE_STYLE$1;
2488
2488
  }
2489
2489
  function responsiveContainerWidthStyle(props) {
2490
- const { container, media } = theme.getTheme_v2(props.theme);
2490
+ const { container, media } = props.theme.sanity.v2;
2491
2491
  return _responsive(media, props.$width, (val) => ({
2492
2492
  maxWidth: val === "auto" ? "none" : rem(container[val])
2493
2493
  }));
2494
2494
  }
2495
- const Root$p = styledComponents.styled(Box)(
2495
+ const Root$p = styled__default.default(Box)(
2496
2496
  containerBaseStyle,
2497
2497
  responsiveContainerWidthStyle
2498
2498
  ), Container = react.forwardRef(function(props, ref) {
@@ -2507,7 +2507,7 @@ const Root$p = styledComponents.styled(Box)(
2507
2507
  ref
2508
2508
  }
2509
2509
  );
2510
- }), Root$o = styledComponents.styled(Box)(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
2510
+ }), Root$o = styled__default.default(Box)(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
2511
2511
  const { as, autoRows, autoCols, autoFlow, columns, gap, gapX, gapY, rows, children, ...restProps } = props;
2512
2512
  return /* @__PURE__ */ jsxRuntime.jsx(
2513
2513
  Root$o,
@@ -2530,13 +2530,13 @@ const Root$p = styledComponents.styled(Box)(
2530
2530
  );
2531
2531
  });
2532
2532
  function headingBaseStyle(props) {
2533
- const { $accent, $muted } = props, { font } = theme.getTheme_v2(props.theme);
2534
- return styledComponents.css`
2535
- ${$accent && styledComponents.css`
2533
+ const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
2534
+ return styled.css`
2535
+ ${$accent && styled.css`
2536
2536
  color: var(--card-accent-fg-color);
2537
2537
  `}
2538
2538
 
2539
- ${$muted && styledComponents.css`
2539
+ ${$muted && styled.css`
2540
2540
  color: var(--card-muted-fg-color);
2541
2541
  `}
2542
2542
 
@@ -2583,7 +2583,7 @@ function headingBaseStyle(props) {
2583
2583
  }
2584
2584
  `;
2585
2585
  }
2586
- const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), SpanWithTextOverflow = styledComponents.styled.span`
2586
+ const Root$n = styled__default.default.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), SpanWithTextOverflow = styled__default.default.span`
2587
2587
  display: block;
2588
2588
  white-space: nowrap;
2589
2589
  text-overflow: ellipsis;
@@ -2629,7 +2629,7 @@ function inlineBaseStyle() {
2629
2629
  };
2630
2630
  }
2631
2631
  function inlineSpaceStyle(props) {
2632
- const { media, space } = theme.getTheme_v2(props.theme);
2632
+ const { media, space } = props.theme.sanity.v2;
2633
2633
  return _responsive(media, props.$space, (spaceIndex) => {
2634
2634
  const _space = rem(spaceIndex === 0.5 ? space[1] / 2 : space[spaceIndex]);
2635
2635
  return {
@@ -2638,7 +2638,7 @@ function inlineSpaceStyle(props) {
2638
2638
  };
2639
2639
  });
2640
2640
  }
2641
- const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
2641
+ const Root$m = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
2642
2642
  const { as, children: childrenProp, space, ...restProps } = props, children = react.useMemo(
2643
2643
  () => childrenToElementArray(childrenProp).filter(Boolean).map((child, idx) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: child }, idx)),
2644
2644
  [childrenProp]
@@ -2656,7 +2656,7 @@ const Root$m = styledComponents.styled(Box)(inlineBaseStyle, inlineSpaceStyle),
2656
2656
  );
2657
2657
  });
2658
2658
  function kbdStyle() {
2659
- return styledComponents.css`
2659
+ return styled.css`
2660
2660
  --card-bg-color: var(--card-kbd-bg-color);
2661
2661
  --card-border-color: var(--card-kbd-border-color);
2662
2662
  --card-fg-color: var(--card-kbd-fg-color);
@@ -2672,7 +2672,7 @@ function kbdStyle() {
2672
2672
  }
2673
2673
  `;
2674
2674
  }
2675
- const Root$l = styledComponents.styled.kbd(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
2675
+ const Root$l = styled__default.default.kbd(responsiveRadiusStyle, kbdStyle), KBD = react.forwardRef(function(props, ref) {
2676
2676
  const { children, fontSize: fontSize2 = 0, padding = 1, radius = 2, ...restProps } = props;
2677
2677
  return /* @__PURE__ */ jsxRuntime.jsx(Root$l, { "data-ui": "KBD", ...restProps, $radius: useArrayProp(radius), ref, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", padding, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", size: fontSize2, weight: "semibold", children }) }) });
2678
2678
  }), origin = {
@@ -2733,8 +2733,8 @@ function getRoundedCommands(points) {
2733
2733
  function compileCommands(cmds) {
2734
2734
  return cmds.map((n, idx) => n.type === "point" ? `${idx === 0 ? "M" : "L"} ${n.x} ${n.y}` : n.type === "curve" ? `C ${n.startControl.x} ${n.startControl.y} ${n.endControl.x} ${n.endControl.y} ${n.curveEnd.x} ${n.curveEnd.y}` : "").join(" ");
2735
2735
  }
2736
- const Root$k = styledComponents.styled.div(
2737
- ({ $w: w }) => styledComponents.css`
2736
+ const Root$k = styled__default.default.div(
2737
+ ({ $w: w }) => styled.css`
2738
2738
  position: absolute;
2739
2739
  width: ${w}px;
2740
2740
  height: ${w}px;
@@ -2781,9 +2781,9 @@ const Root$k = styledComponents.styled.div(
2781
2781
  }
2782
2782
  }
2783
2783
  `
2784
- ), StrokePath = styledComponents.styled.path`
2784
+ ), StrokePath = styled__default.default.path`
2785
2785
  stroke: var(--card-shadow-outline-color);
2786
- `, ShapePath = styledComponents.styled.path`
2786
+ `, ShapePath = styled__default.default.path`
2787
2787
  fill: var(--card-bg-color);
2788
2788
  `, Arrow = react.forwardRef(function(props, ref) {
2789
2789
  const { width: w, height: h, radius = 0, ...restProps } = props, { card } = useTheme_v2(), strokeWidth = card.shadow.outline, center = w / 2, points = [
@@ -3027,7 +3027,7 @@ function LayerProvider(props) {
3027
3027
  );
3028
3028
  return /* @__PURE__ */ jsxRuntime.jsx(LayerContext.Provider, { value, children });
3029
3029
  }
3030
- const Root$j = styledComponents.styled.div({ position: "relative" }), LayerChildren = react.forwardRef(function(props, ref) {
3030
+ const Root$j = styled__default.default.div({ position: "relative" }), LayerChildren = react.forwardRef(function(props, ref) {
3031
3031
  const { children, onActivate, onFocus, style = EMPTY_RECORD, ...restProps } = props, { zIndex, isTopLayer } = useLayer(), lastFocusedRef = react.useRef(null), forwardedRef = useForwardedRef(ref), isTopLayerRef = react.useRef(isTopLayer);
3032
3032
  react.useEffect(() => {
3033
3033
  isTopLayerRef.current !== isTopLayer && isTopLayer && (onActivate == null || onActivate({ activeElement: lastFocusedRef.current })), isTopLayerRef.current = isTopLayer;
@@ -3098,7 +3098,7 @@ function PortalProvider(props) {
3098
3098
  }), [boundaryElement, element, elements]);
3099
3099
  return /* @__PURE__ */ jsxRuntime.jsx(PortalContext.Provider, { value, children });
3100
3100
  }
3101
- const Root$i = styledComponents.styled.div`
3101
+ const Root$i = styled__default.default.div`
3102
3102
  display: block;
3103
3103
  width: 0;
3104
3104
  height: 0;
@@ -3108,9 +3108,9 @@ const Root$i = styledComponents.styled.div`
3108
3108
  `, SrOnly = react.forwardRef(function(props, ref) {
3109
3109
  const { as, children } = props;
3110
3110
  return /* @__PURE__ */ jsxRuntime.jsx(Root$i, { "aria-hidden": !0, as, "data-ui": "SrOnly", ref, children });
3111
- }), Root$h = styledComponents.styled.div`
3111
+ }), Root$h = styled__default.default.div`
3112
3112
  position: relative;
3113
- `, ItemWrapper = styledComponents.styled.div`
3113
+ `, ItemWrapper = styled__default.default.div`
3114
3114
  position: absolute;
3115
3115
  left: 0;
3116
3116
  right: 0;
@@ -3211,7 +3211,7 @@ function calcMaxWidth(params) {
3211
3211
  (boundaryWidth || 1 / 0) - DEFAULT_POPOVER_PADDING * 2
3212
3212
  );
3213
3213
  }
3214
- const MotionCard$1 = styledComponents.styled(framerMotion.motion(Card))`
3214
+ const MotionCard$1 = styled__default.default(framerMotion.motion(Card))`
3215
3215
  &:not([hidden]) {
3216
3216
  display: flex;
3217
3217
  }
@@ -3485,7 +3485,7 @@ const Popover = react.memo(
3485
3485
  );
3486
3486
  Popover.displayName = "Popover";
3487
3487
  function radioBaseStyle() {
3488
- return styledComponents.css`
3488
+ return styled.css`
3489
3489
  position: relative;
3490
3490
 
3491
3491
  &:not([hidden]) {
@@ -3498,8 +3498,8 @@ function radioBaseStyle() {
3498
3498
  `;
3499
3499
  }
3500
3500
  function inputElementStyle(props) {
3501
- const { color, input } = theme.getTheme_v2(props.theme), dist = (input.radio.size - input.radio.markSize) / 2;
3502
- return styledComponents.css`
3501
+ const { color, input } = props.theme.sanity.v2, dist = (input.radio.size - input.radio.markSize) / 2;
3502
+ return styled.css`
3503
3503
  appearance: none;
3504
3504
  position: absolute;
3505
3505
  top: 0;
@@ -3592,7 +3592,7 @@ function inputElementStyle(props) {
3592
3592
  }
3593
3593
  `;
3594
3594
  }
3595
- const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComponents.styled.input(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
3595
+ const Root$g = styled__default.default.div(radioBaseStyle), Input$4 = styled__default.default.input(inputElementStyle), Radio = react.forwardRef(function(props, forwardedRef) {
3596
3596
  const { className, disabled, style, customValidity, readOnly, ...restProps } = props, ref = useForwardedRef(forwardedRef);
3597
3597
  return useCustomValidity(ref, customValidity), /* @__PURE__ */ jsxRuntime.jsxs(Root$g, { className, "data-ui": "Radio", style, children: [
3598
3598
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -3611,7 +3611,7 @@ const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComp
3611
3611
  ] });
3612
3612
  });
3613
3613
  function rootStyle() {
3614
- return styledComponents.css`
3614
+ return styled.css`
3615
3615
  position: relative;
3616
3616
  width: -moz-available;
3617
3617
  width: -webkit-fill-available;
@@ -3623,8 +3623,8 @@ function rootStyle() {
3623
3623
  `;
3624
3624
  }
3625
3625
  function inputBaseStyle(props) {
3626
- const { font } = theme.getTheme_v2(props.theme);
3627
- return styledComponents.css`
3626
+ const { font } = props.theme.sanity.v2;
3627
+ return styled.css`
3628
3628
  -webkit-font-smoothing: antialiased;
3629
3629
  appearance: none;
3630
3630
  border: 0;
@@ -3640,8 +3640,8 @@ function inputBaseStyle(props) {
3640
3640
  `;
3641
3641
  }
3642
3642
  function inputColorStyle(props) {
3643
- const { color, input } = theme.getTheme_v2(props.theme);
3644
- return styledComponents.css`
3643
+ const { color, input } = props.theme.sanity.v2;
3644
+ return styled.css`
3645
3645
  /* enabled */
3646
3646
  background-color: ${color.input.default.enabled.bg};
3647
3647
  color: ${color.input.default.enabled.fg};
@@ -3695,7 +3695,7 @@ function textSize(size2) {
3695
3695
  return { fontSize: rem(size2.fontSize), lineHeight: rem(size2.lineHeight) };
3696
3696
  }
3697
3697
  function inputTextSizeStyle(props) {
3698
- const { $fontSize } = props, { font, media } = theme.getTheme_v2(props.theme);
3698
+ const { $fontSize } = props, { font, media } = props.theme.sanity.v2;
3699
3699
  return _responsive(
3700
3700
  media,
3701
3701
  $fontSize,
@@ -3712,8 +3712,8 @@ function inputStyle() {
3712
3712
  ];
3713
3713
  }
3714
3714
  function iconBoxStyle(props) {
3715
- const { color } = theme.getTheme_v2(props.theme);
3716
- return styledComponents.css`
3715
+ const { color } = props.theme.sanity.v2;
3716
+ return styled.css`
3717
3717
  pointer-events: none;
3718
3718
  position: absolute;
3719
3719
  top: 0;
@@ -3744,7 +3744,7 @@ const selectStyle = {
3744
3744
  root: rootStyle,
3745
3745
  input: inputStyle,
3746
3746
  iconBox: iconBoxStyle
3747
- }, Root$f = styledComponents.styled.div(selectStyle.root), Input$3 = styledComponents.styled.select(selectStyle.input), IconBox = styledComponents.styled(Box)(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
3747
+ }, Root$f = styled__default.default.div(selectStyle.root), Input$3 = styled__default.default.select(selectStyle.input), IconBox = styled__default.default(Box)(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
3748
3748
  const {
3749
3749
  children,
3750
3750
  customValidity,
@@ -3788,12 +3788,12 @@ function stackBaseStyle() {
3788
3788
  return BASE_STYLE;
3789
3789
  }
3790
3790
  function responsiveStackSpaceStyle(props) {
3791
- const { media, space } = theme.getTheme_v2(props.theme);
3791
+ const { media, space } = props.theme.sanity.v2;
3792
3792
  return _responsive(media, props.$space, (spaceIndex) => ({
3793
3793
  gridGap: rem(space[spaceIndex])
3794
3794
  }));
3795
3795
  }
3796
- const Root$e = styledComponents.styled(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
3796
+ const Root$e = styled__default.default(Box)(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
3797
3797
  const { as, space, ...restProps } = props;
3798
3798
  return /* @__PURE__ */ jsxRuntime.jsx(
3799
3799
  Root$e,
@@ -3808,7 +3808,7 @@ const Root$e = styledComponents.styled(Box)(stackBaseStyle, responsiveStackSpace
3808
3808
  );
3809
3809
  });
3810
3810
  function switchBaseStyles() {
3811
- return styledComponents.css`
3811
+ return styled.css`
3812
3812
  position: relative;
3813
3813
  &:not([hidden]) {
3814
3814
  display: inline-block;
@@ -3816,7 +3816,7 @@ function switchBaseStyles() {
3816
3816
  `;
3817
3817
  }
3818
3818
  function switchInputStyles() {
3819
- return styledComponents.css`
3819
+ return styled.css`
3820
3820
  position: absolute;
3821
3821
  top: 0;
3822
3822
  right: 0;
@@ -3834,8 +3834,8 @@ function switchInputStyles() {
3834
3834
  `;
3835
3835
  }
3836
3836
  function switchRepresentationStyles(props) {
3837
- const { color, input } = theme.getTheme_v2(props.theme);
3838
- return styledComponents.css`
3837
+ const { color, input } = props.theme.sanity.v2;
3838
+ return styled.css`
3839
3839
  --switch-bg-color: ${color.input.default.enabled.border};
3840
3840
  --switch-fg-color: ${color.input.default.enabled.bg};
3841
3841
  --switch-box-shadow: none;
@@ -3907,8 +3907,8 @@ function switchRepresentationStyles(props) {
3907
3907
  `;
3908
3908
  }
3909
3909
  function switchTrackStyles(props) {
3910
- const { input } = theme.getTheme_v2(props.theme);
3911
- return styledComponents.css`
3910
+ const { input } = props.theme.sanity.v2;
3911
+ return styled.css`
3912
3912
  &:not([hidden]) {
3913
3913
  display: block;
3914
3914
  }
@@ -3922,8 +3922,8 @@ function switchTrackStyles(props) {
3922
3922
  `;
3923
3923
  }
3924
3924
  function switchThumbStyles(props) {
3925
- const { $indeterminate } = props, { input } = theme.getTheme_v2(props.theme), trackWidth = input.switch.width, trackHeight = input.switch.height, trackPadding = input.switch.padding, size2 = trackHeight - input.switch.padding * 2, checkedOffset = trackWidth - trackPadding * 2 - size2, indeterminateOffset = trackWidth / 2 - size2 / 2 - trackPadding, checked = $indeterminate !== !0 && props.$checked === !0;
3926
- return styledComponents.css`
3925
+ const { $indeterminate } = props, { input } = props.theme.sanity.v2, trackWidth = input.switch.width, trackHeight = input.switch.height, trackPadding = input.switch.padding, size2 = trackHeight - input.switch.padding * 2, checkedOffset = trackWidth - trackPadding * 2 - size2, indeterminateOffset = trackWidth / 2 - size2 / 2 - trackPadding, checked = $indeterminate !== !0 && props.$checked === !0;
3926
+ return styled.css`
3927
3927
  &:not([hidden]) {
3928
3928
  display: block;
3929
3929
  }
@@ -3940,16 +3940,16 @@ function switchThumbStyles(props) {
3940
3940
  transform: translate3d(0, 0, 0);
3941
3941
  box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.05);
3942
3942
 
3943
- ${checked && styledComponents.css`
3943
+ ${checked && styled.css`
3944
3944
  transform: translate3d(${checkedOffset}px, 0, 0);
3945
3945
  `}
3946
3946
 
3947
- ${$indeterminate && styledComponents.css`
3947
+ ${$indeterminate && styled.css`
3948
3948
  transform: translate3d(${indeterminateOffset}px, 0, 0);
3949
3949
  `}
3950
3950
  `;
3951
3951
  }
3952
- const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledComponents.styled.input(switchInputStyles), Representation = styledComponents.styled.span(switchRepresentationStyles), Track = styledComponents.styled.span(switchTrackStyles), Thumb = styledComponents.styled.span(switchThumbStyles), Switch = react.forwardRef(function(props, forwardedRef) {
3952
+ const Root$d = styled__default.default.span(switchBaseStyles), Input$2 = styled__default.default.input(switchInputStyles), Representation = styled__default.default.span(switchRepresentationStyles), Track = styled__default.default.span(switchTrackStyles), Thumb = styled__default.default.span(switchThumbStyles), Switch = react.forwardRef(function(props, forwardedRef) {
3953
3953
  const { checked, className, disabled, indeterminate, readOnly, style, ...restProps } = props, ref = useForwardedRef(forwardedRef);
3954
3954
  return react.useEffect(() => {
3955
3955
  ref.current && (ref.current.indeterminate = indeterminate || !1);
@@ -3970,16 +3970,16 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
3970
3970
  /* @__PURE__ */ jsxRuntime.jsx(Thumb, { $checked: checked, $indeterminate: indeterminate })
3971
3971
  ] })
3972
3972
  ] });
3973
- }), Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = styledComponents.styled.span`
3973
+ }), Root$c = styled__default.default.span(textInputRootStyle), InputRoot$1 = styled__default.default.span`
3974
3974
  flex: 1;
3975
3975
  min-width: 0;
3976
3976
  display: block;
3977
3977
  position: relative;
3978
- `, Input$1 = styledComponents.styled.textarea(
3978
+ `, Input$1 = styled__default.default.textarea(
3979
3979
  responsiveInputPaddingStyle,
3980
3980
  textInputBaseStyle,
3981
3981
  textInputFontSizeStyle
3982
- ), Presentation$1 = styledComponents.styled.div(
3982
+ ), Presentation$1 = styled__default.default.div(
3983
3983
  responsiveRadiusStyle,
3984
3984
  textInputRepresentationStyle
3985
3985
  ), TextArea = react.forwardRef(function(props, forwardedRef) {
@@ -4023,12 +4023,12 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
4023
4023
  }
4024
4024
  )
4025
4025
  ] }) });
4026
- }), CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Root$b = styledComponents.styled(Card).attrs({ forwardedAs: "span" })(textInputRootStyle), InputRoot = styledComponents.styled.span`
4026
+ }), CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Root$b = styled__default.default(Card).attrs({ forwardedAs: "span" })(textInputRootStyle), InputRoot = styled__default.default.span`
4027
4027
  flex: 1;
4028
4028
  min-width: 0;
4029
4029
  display: block;
4030
4030
  position: relative;
4031
- `, Prefix = styledComponents.styled(Card).attrs({ forwardedAs: "span" })`
4031
+ `, Prefix = styled__default.default(Card).attrs({ forwardedAs: "span" })`
4032
4032
  border-top-right-radius: 0;
4033
4033
  border-bottom-right-radius: 0;
4034
4034
 
@@ -4036,7 +4036,7 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
4036
4036
  display: block;
4037
4037
  margin: -1px;
4038
4038
  }
4039
- `, Suffix = styledComponents.styled(Card).attrs({ forwardedAs: "span" })`
4039
+ `, Suffix = styled__default.default(Card).attrs({ forwardedAs: "span" })`
4040
4040
  border-top-left-radius: 0;
4041
4041
  border-bottom-left-radius: 0;
4042
4042
 
@@ -4044,27 +4044,27 @@ const Root$d = styledComponents.styled.span(switchBaseStyles), Input$2 = styledC
4044
4044
  display: block;
4045
4045
  margin: -1px;
4046
4046
  }
4047
- `, Input = styledComponents.styled.input(
4047
+ `, Input = styled__default.default.input(
4048
4048
  responsiveInputPaddingStyle,
4049
4049
  textInputBaseStyle,
4050
4050
  textInputFontSizeStyle
4051
- ), Presentation = styledComponents.styled.span(
4051
+ ), Presentation = styled__default.default.span(
4052
4052
  responsiveRadiusStyle,
4053
4053
  textInputRepresentationStyle
4054
- ), LeftBox = styledComponents.styled(Box)`
4054
+ ), LeftBox = styled__default.default(Box)`
4055
4055
  position: absolute;
4056
4056
  top: 0;
4057
4057
  left: 0;
4058
- `, RightBox = styledComponents.styled(Box)`
4058
+ `, RightBox = styled__default.default(Box)`
4059
4059
  position: absolute;
4060
4060
  top: 0;
4061
4061
  right: 0;
4062
- `, RightCard = styledComponents.styled(Card)`
4062
+ `, RightCard = styled__default.default(Card)`
4063
4063
  background-color: transparent;
4064
4064
  position: absolute;
4065
4065
  top: 0;
4066
4066
  right: 0;
4067
- `, TextInputClearButton = styledComponents.styled(Button)({
4067
+ `, TextInputClearButton = styled__default.default(Button)({
4068
4068
  "&:not([hidden])": {
4069
4069
  display: "block"
4070
4070
  }
@@ -4244,7 +4244,7 @@ const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAUL
4244
4244
  right: ["right-end", "right-start", "left", "top", "bottom"],
4245
4245
  "right-start": ["right", "right-end", "left-start", "top-start", "bottom-start"],
4246
4246
  "right-end": ["right", "right-start", "left-end", "top-end", "bottom-end"]
4247
- }, MotionCard = styledComponents.styled(framerMotion.motion(Card))`
4247
+ }, MotionCard = styled__default.default(framerMotion.motion(Card))`
4248
4248
  & > * {
4249
4249
  opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
4250
4250
  will-change: opacity;
@@ -4336,7 +4336,7 @@ function TooltipDelayGroupProvider(props) {
4336
4336
  );
4337
4337
  return /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupContext.Provider, { value, children });
4338
4338
  }
4339
- const Root$a = styledComponents.styled(Layer)`
4339
+ const Root$a = styled__default.default(Layer)`
4340
4340
  pointer-events: none;
4341
4341
  max-width: ${({ $maxWidth }) => $maxWidth}px;
4342
4342
  `, Tooltip = react.forwardRef(function(props, ref) {
@@ -4544,15 +4544,15 @@ const Root$a = styledComponents.styled(Layer)`
4544
4544
  ),
4545
4545
  child
4546
4546
  ] });
4547
- }), Root$9 = styledComponents.styled.div`
4547
+ }), Root$9 = styled__default.default.div`
4548
4548
  line-height: 0;
4549
- `, ListBox = styledComponents.styled(Box)`
4549
+ `, ListBox = styled__default.default(Box)`
4550
4550
  & > ul {
4551
4551
  list-style: none;
4552
4552
  padding: 0;
4553
4553
  margin: 0;
4554
4554
  }
4555
- `, rotate = styledComponents.keyframes`
4555
+ `, rotate = styled.keyframes`
4556
4556
  from {
4557
4557
  transform: rotate(0deg);
4558
4558
  }
@@ -4560,7 +4560,7 @@ const Root$a = styledComponents.styled(Layer)`
4560
4560
  to {
4561
4561
  transform: rotate(360deg);
4562
4562
  }
4563
- `, AnimatedSpinnerIcon = styledComponents.styled(icons.SpinnerIcon)`
4563
+ `, AnimatedSpinnerIcon = styled__default.default(icons.SpinnerIcon)`
4564
4564
  animation: ${rotate} 500ms linear infinite;
4565
4565
  `;
4566
4566
  function AutocompleteOption(props) {
@@ -4943,7 +4943,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
4943
4943
  ]
4944
4944
  }
4945
4945
  );
4946
- }), Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
4946
+ }), Autocomplete = InnerAutocomplete, Root$8 = styled__default.default.ol`
4947
4947
  margin: 0;
4948
4948
  padding: 0;
4949
4949
  display: flex;
@@ -4951,7 +4951,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
4951
4951
  align-items: center;
4952
4952
  white-space: nowrap;
4953
4953
  line-height: 0;
4954
- `, ExpandButton = styledComponents.styled(Button)`
4954
+ `, ExpandButton = styled__default.default(Button)`
4955
4955
  appearance: none;
4956
4956
  margin: -4px;
4957
4957
  `, Breadcrumbs = react.forwardRef(function(props, ref) {
@@ -5000,8 +5000,8 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
5000
5000
  /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "li", children: item })
5001
5001
  ] }, itemIndex)) });
5002
5002
  });
5003
- function dialogStyle({ theme: theme$1 }) {
5004
- const { color } = theme.getTheme_v2(theme$1);
5003
+ function dialogStyle({ theme: theme2 }) {
5004
+ const { color } = theme2.sanity.v2;
5005
5005
  return {
5006
5006
  "&:not([hidden])": {
5007
5007
  display: "flex"
@@ -5017,11 +5017,11 @@ function dialogStyle({ theme: theme$1 }) {
5017
5017
  };
5018
5018
  }
5019
5019
  function responsiveDialogPositionStyle(props) {
5020
- const { media } = theme.getTheme_v2(props.theme);
5020
+ const { media } = props.theme.sanity.v2;
5021
5021
  return _responsive(media, props.$position, (position) => ({ "&&": { position } }));
5022
5022
  }
5023
5023
  function animationDialogStyle(props) {
5024
- return props.$animate ? styledComponents.css`
5024
+ return props.$animate ? styled.css`
5025
5025
  @keyframes zoomIn {
5026
5026
  from {
5027
5027
  opacity: 0;
@@ -5046,7 +5046,7 @@ function animationDialogStyle(props) {
5046
5046
  & > [data-ui='DialogCard'] {
5047
5047
  animation: zoomIn 200ms ease-out;
5048
5048
  }
5049
- ` : styledComponents.css``;
5049
+ ` : styled.css``;
5050
5050
  }
5051
5051
  const key$3 = Symbol.for("@sanity/ui/context/dialog");
5052
5052
  globalScope[key$3] = globalScope[key$3] || react.createContext({ version: 0 });
@@ -5057,7 +5057,7 @@ function useDialog() {
5057
5057
  function isTargetWithinScope(boundaryElement, portalElement, target) {
5058
5058
  return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
5059
5059
  }
5060
- const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styledComponents.styled(Container)`
5060
+ const Root$7 = styled__default.default(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styled__default.default(Container)`
5061
5061
  &:not([hidden]) {
5062
5062
  display: flex;
5063
5063
  }
@@ -5066,7 +5066,7 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
5066
5066
  flex-direction: column;
5067
5067
  align-items: center;
5068
5068
  justify-content: center;
5069
- `, DialogCardRoot = styledComponents.styled(Card)`
5069
+ `, DialogCardRoot = styled__default.default(Card)`
5070
5070
  &:not([hidden]) {
5071
5071
  display: flex;
5072
5072
  }
@@ -5075,19 +5075,19 @@ const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyl
5075
5075
  max-height: 100%;
5076
5076
  overflow: hidden;
5077
5077
  overflow: clip;
5078
- `, DialogLayout = styledComponents.styled(Flex)`
5078
+ `, DialogLayout = styled__default.default(Flex)`
5079
5079
  flex: 1;
5080
5080
  min-height: 0;
5081
5081
  width: 100%;
5082
- `, DialogHeader = styledComponents.styled(Box)`
5082
+ `, DialogHeader = styled__default.default(Box)`
5083
5083
  position: relative;
5084
5084
  z-index: 2;
5085
- `, DialogContent = styledComponents.styled(Box)`
5085
+ `, DialogContent = styled__default.default(Box)`
5086
5086
  position: relative;
5087
5087
  z-index: 1;
5088
5088
  overflow: auto;
5089
5089
  outline: none;
5090
- `, DialogFooter = styledComponents.styled(Box)`
5090
+ `, DialogFooter = styled__default.default(Box)`
5091
5091
  position: relative;
5092
5092
  z-index: 3;
5093
5093
  `, DialogCard = react.forwardRef(function(props, ref) {
@@ -5269,14 +5269,14 @@ function DialogProvider(props) {
5269
5269
  );
5270
5270
  return /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children });
5271
5271
  }
5272
- const Root$6 = styledComponents.styled.kbd`
5272
+ const Root$6 = styled__default.default.kbd`
5273
5273
  font: inherit;
5274
5274
  padding: 1px;
5275
5275
 
5276
5276
  &:not([hidden]) {
5277
5277
  display: block;
5278
5278
  }
5279
- `, Key = styledComponents.styled(KBD)`
5279
+ `, Key = styled__default.default(KBD)`
5280
5280
  &:not([hidden]) {
5281
5281
  display: block;
5282
5282
  }
@@ -5441,7 +5441,7 @@ function useMenuController(props) {
5441
5441
  setRootElement
5442
5442
  };
5443
5443
  }
5444
- const Root$5 = styledComponents.styled(Box)`
5444
+ const Root$5 = styled__default.default(Box)`
5445
5445
  outline: none;
5446
5446
  overflow: auto;
5447
5447
  `, Menu = react.forwardRef(function(props, ref) {
@@ -5665,14 +5665,14 @@ const Root$5 = styledComponents.styled(Box)`
5665
5665
  ]
5666
5666
  );
5667
5667
  return /* @__PURE__ */ jsxRuntime.jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}) });
5668
- }), MenuDivider = styledComponents.styled.hr`
5668
+ }), MenuDivider = styled__default.default.hr`
5669
5669
  height: 1px;
5670
5670
  border: 0;
5671
5671
  background: var(--card-hairline-soft-color);
5672
5672
  margin: 0;
5673
5673
  `;
5674
5674
  function selectableBaseStyle() {
5675
- return styledComponents.css`
5675
+ return styled.css`
5676
5676
  background-color: inherit;
5677
5677
  color: inherit;
5678
5678
 
@@ -5696,8 +5696,8 @@ function selectableBaseStyle() {
5696
5696
  }
5697
5697
  function selectableColorStyle(props) {
5698
5698
  var _a;
5699
- const { $tone } = props, { color, style } = theme.getTheme_v2(props.theme), tone = color.selectable[$tone];
5700
- return styledComponents.css`
5699
+ const { $tone } = props, { color, style } = props.theme.sanity.v2, tone = color.selectable[$tone];
5700
+ return styled.css`
5701
5701
  ${_cardColorStyle(color, tone.enabled)}
5702
5702
 
5703
5703
  background-color: var(--card-bg-color);
@@ -5767,7 +5767,7 @@ function selectableColorStyle(props) {
5767
5767
  ${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
5768
5768
  `;
5769
5769
  }
5770
- const Selectable = styledComponents.styled(Box)(
5770
+ const Selectable = styled__default.default(Box)(
5771
5771
  responsiveRadiusStyle,
5772
5772
  selectableBaseStyle,
5773
5773
  selectableColorStyle
@@ -5980,14 +5980,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
5980
5980
  ]
5981
5981
  }
5982
5982
  );
5983
- }), keyframe = styledComponents.keyframes`
5983
+ }), keyframe = styled.keyframes`
5984
5984
  0% {
5985
5985
  background-position: 100%;
5986
5986
  }
5987
5987
  100% {
5988
5988
  background-position: -100%;
5989
5989
  }
5990
- `, animation = styledComponents.css`
5990
+ `, animation = styled.css`
5991
5991
  background-image: linear-gradient(
5992
5992
  to right,
5993
5993
  var(--card-skeleton-color-from),
@@ -6003,12 +6003,12 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
6003
6003
  animation-timing-function: ease-in-out;
6004
6004
  animation-iteration-count: infinite;
6005
6005
  animation-duration: 2000ms;
6006
- `, skeletonStyle = styledComponents.css`
6006
+ `, skeletonStyle = styled.css`
6007
6007
  opacity: ${({ $visible }) => $visible ? 1 : 0};
6008
6008
  transition: opacity 200ms ease-in;
6009
6009
 
6010
6010
  @media screen and (prefers-reduced-motion: no-preference) {
6011
- ${({ $animated }) => $animated ? animation : styledComponents.css`
6011
+ ${({ $animated }) => $animated ? animation : styled.css`
6012
6012
  background-color: var(--card-skeleton-color-from);
6013
6013
  `}
6014
6014
  }
@@ -6016,7 +6016,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
6016
6016
  @media screen and (prefers-reduced-motion: reduce) {
6017
6017
  background-color: var(--card-skeleton-color-from);
6018
6018
  }
6019
- `, Root$4 = styledComponents.styled(Box)(
6019
+ `, Root$4 = styled__default.default(Box)(
6020
6020
  responsiveRadiusStyle,
6021
6021
  skeletonStyle
6022
6022
  ), Skeleton = react.forwardRef(function(props, ref) {
@@ -6040,8 +6040,8 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
6040
6040
  ref
6041
6041
  }
6042
6042
  );
6043
- }), Root$3 = styledComponents.styled(Skeleton)((props) => {
6044
- const { $size, $style } = props, { font, media } = theme.getTheme_v2(props.theme), fontStyle = font[$style];
6043
+ }), Root$3 = styled__default.default(Skeleton)((props) => {
6044
+ const { $size, $style } = props, { font, media } = props.theme.sanity.v2, fontStyle = font[$style];
6045
6045
  return _responsive(media, $size, (sizeIndex) => {
6046
6046
  const fontSize2 = fontStyle.sizes[sizeIndex];
6047
6047
  return { height: fontSize2.lineHeight - fontSize2.ascenderHeight - fontSize2.descenderHeight };
@@ -6058,7 +6058,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
6058
6058
  }), CodeSkeleton = react.forwardRef(function(props, ref) {
6059
6059
  const { size: size2 = 2, ...restProps } = props, $size = useArrayProp(size2);
6060
6060
  return /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "code" });
6061
- }), CustomButton = styledComponents.styled(Button)`
6061
+ }), CustomButton = styled__default.default(Button)`
6062
6062
  max-width: 100%;
6063
6063
  `, Tab = react.forwardRef(function(props, forwardedRef) {
6064
6064
  const {
@@ -6110,7 +6110,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
6110
6110
  function _isReactElement(node) {
6111
6111
  return !!node;
6112
6112
  }
6113
- const CustomInline = styledComponents.styled(Inline)`
6113
+ const CustomInline = styled__default.default(Inline)`
6114
6114
  & > div {
6115
6115
  display: inline-block;
6116
6116
  vertical-align: middle;
@@ -6172,13 +6172,13 @@ const CustomInline = styledComponents.styled(Inline)`
6172
6172
  warning: "alert",
6173
6173
  success: "alert",
6174
6174
  info: "alert"
6175
- }, Root$2 = styledComponents.styled(Card)`
6175
+ }, Root$2 = styled__default.default(Card)`
6176
6176
  pointer-events: all;
6177
6177
  & > * {
6178
6178
  opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
6179
6179
  will-change: opacity;
6180
6180
  }
6181
- `, TextBox = styledComponents.styled(Flex)`
6181
+ `, TextBox = styled__default.default(Flex)`
6182
6182
  overflow-x: auto;
6183
6183
  `;
6184
6184
  function Toast(props) {
@@ -6224,14 +6224,14 @@ function useMounted() {
6224
6224
  const subscribe = () => () => {
6225
6225
  }, key$1 = Symbol.for("@sanity/ui/context/toast");
6226
6226
  globalScope[key$1] = globalScope[key$1] || react.createContext(null);
6227
- const ToastContext = globalScope[key$1], Root$1 = styledComponents.styled(Layer)`
6227
+ const ToastContext = globalScope[key$1], Root$1 = styled__default.default(Layer)`
6228
6228
  position: fixed;
6229
6229
  top: 0;
6230
6230
  left: 0;
6231
6231
  right: 0;
6232
6232
  bottom: 0;
6233
6233
  pointer-events: none;
6234
- `, ToastContainer = styledComponents.styled.div`
6234
+ `, ToastContainer = styled__default.default.div`
6235
6235
  box-sizing: border-box;
6236
6236
  position: absolute;
6237
6237
  right: 0;
@@ -6508,7 +6508,7 @@ const TreeContext = globalScope[key], Tree = react.memo(
6508
6508
  );
6509
6509
  Tree.displayName = "Tree";
6510
6510
  function treeItemRootStyle() {
6511
- return styledComponents.css`
6511
+ return styled.css`
6512
6512
  &[role='none'] > [role='treeitem'] {
6513
6513
  outline: none;
6514
6514
  cursor: default;
@@ -6540,8 +6540,8 @@ function treeItemRootStyle() {
6540
6540
  `;
6541
6541
  }
6542
6542
  function treeItemRootColorStyle(props) {
6543
- const $tone = "default", { color } = theme.getTheme_v2(props.theme), tone = color.selectable[$tone];
6544
- return styledComponents.css`
6543
+ const $tone = "default", { color } = props.theme.sanity.v2, tone = color.selectable[$tone];
6544
+ return styled.css`
6545
6545
  &[role='none'] {
6546
6546
  & > [role='treeitem'] {
6547
6547
  ${_cardColorStyle(color, tone.enabled)}
@@ -6584,8 +6584,8 @@ function treeItemRootColorStyle(props) {
6584
6584
  `;
6585
6585
  }
6586
6586
  function treeItemBoxStyle(props) {
6587
- const { $level } = props, { space } = theme.getTheme_v2(props.theme);
6588
- return styledComponents.css`
6587
+ const { $level } = props, { space } = props.theme.sanity.v2;
6588
+ return styled.css`
6589
6589
  padding-left: ${rem(space[2] * $level)};
6590
6590
 
6591
6591
  &[data-as='a'] {
@@ -6614,7 +6614,7 @@ const TreeGroup = react.memo(function(props) {
6614
6614
  children
6615
6615
  }
6616
6616
  );
6617
- }), Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styledComponents.styled(Box).attrs({ forwardedAs: "a" })(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(Text)`
6617
+ }), Root = react.memo(styled__default.default.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styled__default.default(Box).attrs({ forwardedAs: "a" })(treeItemBoxStyle), ToggleArrowText = styled__default.default(Text)`
6618
6618
  & > svg {
6619
6619
  transition: transform 100ms;
6620
6620
  }