@sanity/ui 2.0.13-alpha.2 → 2.0.14

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/index.d.mts +2 -2
  2. package/dist/index.d.ts +2 -2
  3. package/dist/index.esm.js +84 -78
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/index.js +211 -205
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +84 -78
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/theme.d.mts +1 -1
  10. package/dist/theme.d.ts +1 -1
  11. package/dist/theme.esm.js +587 -51
  12. package/dist/theme.esm.js.map +1 -1
  13. package/dist/theme.js +560 -22
  14. package/dist/theme.js.map +1 -1
  15. package/dist/theme.mjs +587 -51
  16. package/dist/theme.mjs.map +1 -1
  17. package/package.json +27 -28
  18. package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
  19. package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +1 -1
  20. package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
  21. package/src/core/components/dialog/dialog.tsx +1 -1
  22. package/src/core/components/dialog/styles.ts +3 -3
  23. package/src/core/components/hotkeys/hotkeys.tsx +1 -1
  24. package/src/core/components/menu/menu.tsx +1 -1
  25. package/src/core/components/menu/menuDivider.ts +1 -1
  26. package/src/core/components/skeleton/skeleton.tsx +1 -1
  27. package/src/core/components/skeleton/textSkeleton.tsx +3 -3
  28. package/src/core/components/tab/tab.tsx +1 -1
  29. package/src/core/components/tab/tabList.tsx +1 -1
  30. package/src/core/components/toast/toast.tsx +1 -1
  31. package/src/core/components/toast/toastProvider.tsx +1 -1
  32. package/src/core/components/tree/style.ts +3 -2
  33. package/src/core/components/tree/treeItem.tsx +1 -1
  34. package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +1 -1
  35. package/src/core/primitives/_selectable/selectable.tsx +1 -1
  36. package/src/core/primitives/_selectable/style.ts +2 -1
  37. package/src/core/primitives/avatar/avatar.tsx +1 -1
  38. package/src/core/primitives/avatar/avatarCounter.tsx +4 -3
  39. package/src/core/primitives/avatar/avatarStack.tsx +3 -2
  40. package/src/core/primitives/avatar/styles.ts +3 -3
  41. package/src/core/primitives/badge/badge.tsx +1 -1
  42. package/src/core/primitives/box/box.tsx +1 -1
  43. package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
  44. package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
  45. package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
  46. package/src/core/primitives/button/button.tsx +1 -1
  47. package/src/core/primitives/button/styles.ts +3 -3
  48. package/src/core/primitives/card/__workshop__/selected.tsx +3 -3
  49. package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
  50. package/src/core/primitives/card/card.tsx +1 -1
  51. package/src/core/primitives/card/styles.ts +3 -2
  52. package/src/core/primitives/checkbox/checkbox.tsx +1 -1
  53. package/src/core/primitives/checkbox/styles.ts +2 -1
  54. package/src/core/primitives/code/code.tsx +1 -1
  55. package/src/core/primitives/code/styles.ts +4 -1
  56. package/src/core/primitives/container/container.tsx +1 -1
  57. package/src/core/primitives/container/styles.ts +2 -2
  58. package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
  59. package/src/core/primitives/flex/flex.tsx +1 -1
  60. package/src/core/primitives/grid/grid.tsx +1 -1
  61. package/src/core/primitives/heading/heading.tsx +1 -1
  62. package/src/core/primitives/heading/styles.ts +2 -1
  63. package/src/core/primitives/inline/inline.tsx +1 -1
  64. package/src/core/primitives/inline/styles.ts +2 -2
  65. package/src/core/primitives/kbd/kbd.tsx +1 -1
  66. package/src/core/primitives/label/label.tsx +1 -1
  67. package/src/core/primitives/label/styles.ts +2 -1
  68. package/src/core/primitives/popover/popoverCard.tsx +1 -1
  69. package/src/core/primitives/radio/radio.tsx +1 -1
  70. package/src/core/primitives/radio/styles.ts +2 -1
  71. package/src/core/primitives/select/select.tsx +1 -1
  72. package/src/core/primitives/select/styles.ts +5 -5
  73. package/src/core/primitives/spinner/spinner.tsx +1 -1
  74. package/src/core/primitives/stack/stack.tsx +1 -1
  75. package/src/core/primitives/stack/styles.ts +2 -2
  76. package/src/core/primitives/switch/styles.ts +4 -3
  77. package/src/core/primitives/switch/switch.tsx +1 -1
  78. package/src/core/primitives/text/__workshop__/colored.tsx +3 -3
  79. package/src/core/primitives/text/styles.ts +2 -1
  80. package/src/core/primitives/text/text.tsx +1 -1
  81. package/src/core/primitives/textArea/textArea.tsx +1 -1
  82. package/src/core/primitives/textInput/textInput.tsx +1 -1
  83. package/src/core/primitives/tooltip/tooltip.tsx +21 -12
  84. package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
  85. package/src/core/styles/border/borderStyle.ts +6 -6
  86. package/src/core/styles/box/boxStyle.ts +5 -5
  87. package/src/core/styles/flex/flexItemStyle.ts +2 -2
  88. package/src/core/styles/flex/flexStyle.ts +6 -6
  89. package/src/core/styles/font/responsiveFont.ts +2 -2
  90. package/src/core/styles/font/textAlignStyle.ts +2 -2
  91. package/src/core/styles/grid/gridItemStyle.ts +7 -7
  92. package/src/core/styles/grid/gridStyle.ts +9 -9
  93. package/src/core/styles/helpers.ts +2 -2
  94. package/src/core/styles/input/responsiveInputPaddingStyle.ts +2 -2
  95. package/src/core/styles/input/textInputStyle.ts +4 -4
  96. package/src/core/styles/margin/marginsStyle.test.ts +1 -1
  97. package/src/core/styles/padding/paddingStyle.test.ts +1 -1
  98. package/src/core/styles/radius/radiusStyle.ts +2 -2
  99. package/src/core/styles/shadow/shadowStyle.ts +2 -2
  100. package/src/core/theme/__workshop__/build/Root.tsx +2 -1
  101. package/src/core/theme/theme.test.tsx +1 -1
  102. package/src/core/theme/themeProvider.tsx +7 -6
  103. package/src/core/theme/useTheme.ts +1 -2
  104. package/src/core/utils/arrow/arrow.tsx +1 -1
  105. package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
  106. package/src/core/utils/layer/layer.tsx +1 -1
  107. package/src/core/utils/srOnly/srOnly.tsx +1 -1
  108. package/src/core/utils/virtualList/virtualList.tsx +1 -1
  109. package/src/theme/system/theme.ts +1 -1
  110. package/dist/_chunks-cjs/getScopedTheme.js +0 -547
  111. package/dist/_chunks-cjs/getScopedTheme.js.map +0 -1
  112. package/dist/_chunks-es/getScopedTheme.mjs +0 -548
  113. package/dist/_chunks-es/getScopedTheme.mjs.map +0 -1
  114. package/dist/_legacy/getScopedTheme.esm.js +0 -548
  115. package/dist/_legacy/getScopedTheme.esm.js.map +0 -1
package/dist/index.d.mts CHANGED
@@ -24,7 +24,7 @@ import {RefCallback} from 'react'
24
24
  import {RGB as RGB_2} from '@sanity/ui/theme'
25
25
  import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
26
26
  import {Theme as Theme_2} from '@sanity/ui/theme'
27
- import type {Theme_v2} from '@sanity/ui/theme'
27
+ import {Theme_v2} from '@sanity/ui/theme'
28
28
  import {ThemeAvatar} from '@sanity/ui/theme'
29
29
  import {ThemeBoxShadow} from '@sanity/ui/theme'
30
30
  import {ThemeColor} from '@sanity/ui/theme'
@@ -1387,7 +1387,7 @@ export declare interface MenuGroupProps {
1387
1387
  */
1388
1388
  export declare const MenuItem: ForwardRefExoticComponent<
1389
1389
  MenuItemProps &
1390
- Omit<HTMLProps<HTMLDivElement>, 'height' | 'tabIndex' | 'selected' | 'ref' | 'as'> &
1390
+ Omit<HTMLProps<HTMLDivElement>, 'height' | 'tabIndex' | 'ref' | 'as' | 'selected'> &
1391
1391
  RefAttributes<HTMLDivElement>
1392
1392
  >
1393
1393
 
package/dist/index.d.ts CHANGED
@@ -24,7 +24,7 @@ import {RefCallback} from 'react'
24
24
  import {RGB as RGB_2} from '@sanity/ui/theme'
25
25
  import {RootTheme as RootTheme_2} from '@sanity/ui/theme'
26
26
  import {Theme as Theme_2} from '@sanity/ui/theme'
27
- import type {Theme_v2} from '@sanity/ui/theme'
27
+ import {Theme_v2} from '@sanity/ui/theme'
28
28
  import {ThemeAvatar} from '@sanity/ui/theme'
29
29
  import {ThemeBoxShadow} from '@sanity/ui/theme'
30
30
  import {ThemeColor} from '@sanity/ui/theme'
@@ -1387,7 +1387,7 @@ export declare interface MenuGroupProps {
1387
1387
  */
1388
1388
  export declare const MenuItem: ForwardRefExoticComponent<
1389
1389
  MenuItemProps &
1390
- Omit<HTMLProps<HTMLDivElement>, 'height' | 'tabIndex' | 'selected' | 'ref' | 'as'> &
1390
+ Omit<HTMLProps<HTMLDivElement>, 'height' | 'tabIndex' | 'ref' | 'as' | 'selected'> &
1391
1391
  RefAttributes<HTMLDivElement>
1392
1392
  >
1393
1393
 
package/dist/index.esm.js CHANGED
@@ -1,10 +1,8 @@
1
- import { buildTheme, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1 } from "@sanity/ui/theme";
1
+ import { buildTheme, createColorTheme as createColorTheme$1, hexToRgb as hexToRgb$1, hslToRgb as hslToRgb$1, multiply as multiply$1, parseColor as parseColor$1, rgbToHex as rgbToHex$1, rgbToHsl as rgbToHsl$1, rgba as rgba$1, screen as screen$1, getTheme_v2, getScopedTheme } from "@sanity/ui/theme";
2
2
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
3
3
  import { useMemo, useState, useRef, useEffect, createContext, useContext, useSyncExternalStore, useLayoutEffect, forwardRef, useId, useCallback, cloneElement, isValidElement, createElement, Component, memo, useReducer, Children, Fragment as Fragment$1, startTransition } from "react";
4
4
  import ReactIs, { isElement as isElement$1, isFragment, isValidElementType } from "react-is";
5
- import styled, { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, keyframes } from "styled-components";
6
- import "@sanity/color";
7
- import { g as getScopedTheme, a as getTheme_v2 } from "./_legacy/getScopedTheme.esm.js";
5
+ import { ThemeProvider as ThemeProvider$1, useTheme as useTheme$1, css, styled, keyframes } from "styled-components";
8
6
  import { SpinnerIcon, CheckmarkIcon, RemoveIcon, ChevronDownIcon, CloseIcon, ChevronRightIcon, ToggleArrowRightIcon } from "@sanity/icons";
9
7
  import Refractor from "react-refractor";
10
8
  import { detectOverflow, flip, offset, shift, arrow, hide, useFloating, autoUpdate } from "@floating-ui/react-dom";
@@ -47,7 +45,7 @@ function _getResponsiveSpace(theme, props, spaceIndexes = EMPTY_ARRAY) {
47
45
  throw new Error("the property must be array of numbers");
48
46
  if (spaceIndexes.length === 0)
49
47
  return null;
50
- const { media, space } = theme.sanity.v2;
48
+ const { media, space } = getTheme_v2(theme);
51
49
  return _responsive(
52
50
  media,
53
51
  spaceIndexes,
@@ -55,7 +53,7 @@ function _getResponsiveSpace(theme, props, spaceIndexes = EMPTY_ARRAY) {
55
53
  );
56
54
  }
57
55
  function responsiveFont(fontKey, props) {
58
- 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 = {
56
+ const { $size, $weight } = props, { font, media } = getTheme_v2(props.theme), { family, sizes, weights } = font[fontKey], fontWeight = $weight && weights[$weight] || weights.regular, defaultSize = sizes[2], base = {
59
57
  position: "relative",
60
58
  fontFamily: family,
61
59
  fontWeight,
@@ -116,7 +114,7 @@ function responsiveLabelFont(props) {
116
114
  return responsiveFont("label", props);
117
115
  }
118
116
  function responsiveTextAlignStyle(props) {
119
- const { media } = props.theme.sanity.v2;
117
+ const { media } = getTheme_v2(props.theme);
120
118
  return _responsive(media, props.$align, (textAlign) => ({ textAlign }));
121
119
  }
122
120
  function responsiveTextFont(props) {
@@ -534,7 +532,7 @@ function ThemeProvider(props) {
534
532
  scheme,
535
533
  tone
536
534
  } : null, [rootTheme, scheme, tone]), theme = useMemo(() => rootTheme ? getScopedTheme(rootTheme, scheme, tone) : null, [scheme, rootTheme, tone]);
537
- return theme ? theme.sanity.v2 ? /* @__PURE__ */ jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }) }) : /* @__PURE__ */ jsx("pre", { children: 'ThemeProvider: no "theme.sanity.v2" property in theme' }) : /* @__PURE__ */ jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
535
+ return theme ? /* @__PURE__ */ jsx(ThemeContext.Provider, { value: themeContext, children: /* @__PURE__ */ jsx(ThemeProvider$1, { theme, children }) }) : /* @__PURE__ */ jsx("pre", { children: 'ThemeProvider: no "theme" property provided' });
538
536
  }
539
537
  function useRootTheme() {
540
538
  const value = useContext(ThemeContext);
@@ -647,7 +645,7 @@ function responsiveBorderStyle() {
647
645
  }
648
646
  function border(props) {
649
647
  var _a, _b;
650
- 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)`;
648
+ const { card, media } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
651
649
  return _responsive(
652
650
  media,
653
651
  props.$border,
@@ -656,7 +654,7 @@ function border(props) {
656
654
  }
657
655
  function borderTop(props) {
658
656
  var _a, _b;
659
- 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)`;
657
+ const { card, media } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
660
658
  return _responsive(
661
659
  media,
662
660
  props.$borderTop,
@@ -665,7 +663,7 @@ function borderTop(props) {
665
663
  }
666
664
  function borderRight(props) {
667
665
  var _a, _b;
668
- 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)`;
666
+ const { card, media } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
669
667
  return _responsive(
670
668
  media,
671
669
  props.$borderRight,
@@ -674,7 +672,7 @@ function borderRight(props) {
674
672
  }
675
673
  function borderBottom(props) {
676
674
  var _a, _b;
677
- 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)`;
675
+ const { card, media } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
678
676
  return _responsive(
679
677
  media,
680
678
  props.$borderBottom,
@@ -683,7 +681,7 @@ function borderBottom(props) {
683
681
  }
684
682
  function borderLeft(props) {
685
683
  var _a, _b;
686
- 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)`;
684
+ const { card, media } = getTheme_v2(props.theme), borderStyle = `${(_b = (_a = card.border) == null ? void 0 : _a.width) != null ? _b : 1}px solid var(--card-border-color)`;
687
685
  return _responsive(
688
686
  media,
689
687
  props.$borderLeft,
@@ -713,25 +711,25 @@ function responsiveBoxStyle() {
713
711
  ];
714
712
  }
715
713
  function responsiveBoxDisplayStyle(props) {
716
- const { media } = props.theme.sanity.v2;
714
+ const { media } = getTheme_v2(props.theme);
717
715
  return _responsive(media, props.$display, (display) => ({
718
716
  "&:not([hidden])": { display }
719
717
  }));
720
718
  }
721
719
  function responsiveBoxSizingStyle(props) {
722
- const { media } = props.theme.sanity.v2;
720
+ const { media } = getTheme_v2(props.theme);
723
721
  return _responsive(media, props.$sizing, (sizing) => ({
724
722
  boxSizing: BOX_SIZING[sizing]
725
723
  }));
726
724
  }
727
725
  function responsiveBoxHeightStyle(props) {
728
- const { media } = props.theme.sanity.v2;
726
+ const { media } = getTheme_v2(props.theme);
729
727
  return _responsive(media, props.$height, (height) => ({
730
728
  height: BOX_HEIGHT[height]
731
729
  }));
732
730
  }
733
731
  function responsiveBoxOverflowStyle(props) {
734
- const { media } = props.theme.sanity.v2;
732
+ const { media } = getTheme_v2(props.theme);
735
733
  return _responsive(media, props.$overflow, (overflow) => ({
736
734
  overflow
737
735
  }));
@@ -752,25 +750,25 @@ function responsiveFlexStyle() {
752
750
  ];
753
751
  }
754
752
  function responsiveFlexAlignStyle(props) {
755
- const { media } = props.theme.sanity.v2;
753
+ const { media } = getTheme_v2(props.theme);
756
754
  return _responsive(media, props.$align, (align) => ({ alignItems: align }));
757
755
  }
758
756
  function responsiveFlexGapStyle(props) {
759
- const { media, space } = props.theme.sanity.v2;
757
+ const { media, space } = getTheme_v2(props.theme);
760
758
  return _responsive(media, props.$gap, (gap) => ({
761
759
  gap: gap ? rem(space[gap]) : void 0
762
760
  }));
763
761
  }
764
762
  function responsiveFlexWrapStyle(props) {
765
- const { media } = props.theme.sanity.v2;
763
+ const { media } = getTheme_v2(props.theme);
766
764
  return _responsive(media, props.$wrap, (wrap) => ({ flexWrap: wrap }));
767
765
  }
768
766
  function responsiveFlexJustifyStyle(props) {
769
- const { media } = props.theme.sanity.v2;
767
+ const { media } = getTheme_v2(props.theme);
770
768
  return _responsive(media, props.$justify, (justify) => ({ justifyContent: justify }));
771
769
  }
772
770
  function responsiveFlexDirectionStyle(props) {
773
- const { media } = props.theme.sanity.v2;
771
+ const { media } = getTheme_v2(props.theme);
774
772
  return _responsive(media, props.$direction, (direction) => ({ flexDirection: direction }));
775
773
  }
776
774
  const BASE_STYLE$2 = {
@@ -781,7 +779,7 @@ function flexItemStyle() {
781
779
  return [BASE_STYLE$2, responsiveFlexItemStyle];
782
780
  }
783
781
  function responsiveFlexItemStyle(props) {
784
- const { media } = props.theme.sanity.v2;
782
+ const { media } = getTheme_v2(props.theme);
785
783
  return props.$flex ? _responsive(media, props.$flex, (flex) => ({ flex })) : EMPTY_ARRAY;
786
784
  }
787
785
  function focusRingBorderStyle(border2) {
@@ -828,49 +826,49 @@ function responsiveGridStyle() {
828
826
  ];
829
827
  }
830
828
  function responsiveGridAutoFlowStyle(props) {
831
- const { media } = props.theme.sanity.v2;
829
+ const { media } = getTheme_v2(props.theme);
832
830
  return _responsive(media, props.$autoFlow, (autoFlow) => ({
833
831
  gridAutoFlow: autoFlow
834
832
  }));
835
833
  }
836
834
  function responsiveGridAutoRowsStyle(props) {
837
- const { media } = props.theme.sanity.v2;
835
+ const { media } = getTheme_v2(props.theme);
838
836
  return _responsive(media, props.$autoRows, (autoRows) => ({
839
837
  gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows]
840
838
  }));
841
839
  }
842
840
  function responsiveGridAutoColsStyle(props) {
843
- const { media } = props.theme.sanity.v2;
841
+ const { media } = getTheme_v2(props.theme);
844
842
  return _responsive(media, props.$autoCols, (autoCols) => ({
845
843
  gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols]
846
844
  }));
847
845
  }
848
846
  function responsiveGridColumnsStyle(props) {
849
- const { media } = props.theme.sanity.v2;
847
+ const { media } = getTheme_v2(props.theme);
850
848
  return _responsive(media, props.$columns, (columns) => ({
851
849
  gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));`
852
850
  }));
853
851
  }
854
852
  function responsiveGridRowsStyle(props) {
855
- const { media } = props.theme.sanity.v2;
853
+ const { media } = getTheme_v2(props.theme);
856
854
  return _responsive(media, props.$rows, (rows) => ({
857
855
  gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));`
858
856
  }));
859
857
  }
860
858
  function responsiveGridGapStyle(props) {
861
- const { media, space } = props.theme.sanity.v2;
859
+ const { media, space } = getTheme_v2(props.theme);
862
860
  return _responsive(media, props.$gap, (gap) => ({
863
861
  gridGap: gap ? rem(space[gap]) : void 0
864
862
  }));
865
863
  }
866
864
  function responsiveGridGapXStyle(props) {
867
- const { media, space } = props.theme.sanity.v2;
865
+ const { media, space } = getTheme_v2(props.theme);
868
866
  return _responsive(media, props.$gapX, (gapX) => ({
869
867
  columnGap: gapX ? rem(space[gapX]) : void 0
870
868
  }));
871
869
  }
872
870
  function responsiveGridGapYStyle(props) {
873
- const { media, space } = props.theme.sanity.v2;
871
+ const { media, space } = getTheme_v2(props.theme);
874
872
  return _responsive(media, props.$gapY, (gapY) => ({
875
873
  rowGap: gapY ? rem(space[gapY]) : void 0
876
874
  }));
@@ -893,37 +891,37 @@ const GRID_ITEM_ROW = {
893
891
  full: "1 / -1"
894
892
  };
895
893
  function responsiveGridItemRowStyle(props) {
896
- const { media } = props.theme.sanity.v2;
894
+ const { media } = getTheme_v2(props.theme);
897
895
  return _responsive(media, props.$row, (row) => typeof row == "number" ? { gridRow: `span ${row} / span ${row}` } : { gridRow: GRID_ITEM_ROW[row] });
898
896
  }
899
897
  function responsiveGridItemRowStartStyle(props) {
900
- const { media } = props.theme.sanity.v2;
898
+ const { media } = getTheme_v2(props.theme);
901
899
  return _responsive(media, props.$rowStart, (rowStart) => ({
902
900
  gridRowStart: rowStart
903
901
  }));
904
902
  }
905
903
  function responsiveGridItemRowEndStyle(props) {
906
- const { media } = props.theme.sanity.v2;
904
+ const { media } = getTheme_v2(props.theme);
907
905
  return _responsive(media, props.$rowEnd, (rowEnd) => ({ gridRowEnd: rowEnd }));
908
906
  }
909
907
  function responsiveGridItemColumnStyle(props) {
910
- const { media } = props.theme.sanity.v2;
908
+ const { media } = getTheme_v2(props.theme);
911
909
  return _responsive(media, props.$column, (column) => typeof column == "number" ? { gridColumn: `span ${column} / span ${column}` } : { gridColumn: GRID_ITEM_COLUMN[column] });
912
910
  }
913
911
  function responsiveGridItemColumnStartStyle(props) {
914
- const { media } = props.theme.sanity.v2;
912
+ const { media } = getTheme_v2(props.theme);
915
913
  return _responsive(media, props.$columnStart, (columnStart) => ({
916
914
  gridColumnStart: columnStart
917
915
  }));
918
916
  }
919
917
  function responsiveGridItemColumnEndStyle(props) {
920
- const { media } = props.theme.sanity.v2;
918
+ const { media } = getTheme_v2(props.theme);
921
919
  return _responsive(media, props.$columnEnd, (columnEnd) => ({
922
920
  gridColumnEnd: columnEnd
923
921
  }));
924
922
  }
925
923
  function responsiveInputPaddingStyle(props) {
926
- 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 = [];
924
+ const { $fontSize, $iconLeft, $iconRight, $padding, $space } = props, { font, media, space } = getTheme_v2(props.theme), len = Math.max($padding.length, $space.length, $fontSize.length), _padding = [], _space = [], _fontSize = [];
927
925
  for (let i = 0; i < len; i += 1)
928
926
  _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];
929
927
  return _responsive(media, _padding, (_, i) => {
@@ -950,7 +948,7 @@ function textInputRootStyle() {
950
948
  return ROOT_STYLE;
951
949
  }
952
950
  function textInputBaseStyle(props) {
953
- const { $scheme, $tone, $weight } = props, { color, font } = props.theme.sanity.v2;
951
+ const { $scheme, $tone, $weight } = props, { color, font } = getTheme_v2(props.theme);
954
952
  return css`
955
953
  appearance: none;
956
954
  background: none;
@@ -1018,7 +1016,7 @@ function textInputBaseStyle(props) {
1018
1016
  `;
1019
1017
  }
1020
1018
  function textInputFontSizeStyle(props) {
1021
- const { font, media } = props.theme.sanity.v2;
1019
+ const { font, media } = getTheme_v2(props.theme);
1022
1020
  return _responsive(media, props.$fontSize, (sizeIndex) => {
1023
1021
  const size2 = font.text.sizes[sizeIndex] || font.text.sizes[2];
1024
1022
  return {
@@ -1028,7 +1026,7 @@ function textInputFontSizeStyle(props) {
1028
1026
  });
1029
1027
  }
1030
1028
  function textInputRepresentationStyle(props) {
1031
- const { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = props.theme.sanity.v2;
1029
+ const { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = getTheme_v2(props.theme);
1032
1030
  return css`
1033
1031
  --input-box-shadow: none;
1034
1032
 
@@ -1180,7 +1178,7 @@ function responsivePaddingStyle(props) {
1180
1178
  ].filter(Boolean);
1181
1179
  }
1182
1180
  function responsiveRadiusStyle(props) {
1183
- const { media, radius } = props.theme.sanity.v2;
1181
+ const { media, radius } = getTheme_v2(props.theme);
1184
1182
  return _responsive(media, props.$radius, (value) => {
1185
1183
  let borderRadius = 0;
1186
1184
  return typeof value == "number" && (borderRadius = rem(radius[value])), value === "full" && (borderRadius = "9999px"), { borderRadius };
@@ -1196,7 +1194,7 @@ function shadowStyle(shadow, outlineWidth = 1) {
1196
1194
  return { boxShadow: `${outline}, ${umbra}, ${penumbra}, ${ambient}` };
1197
1195
  }
1198
1196
  function responsiveShadowStyle(props) {
1199
- const { card, media, shadow } = props.theme.sanity.v2;
1197
+ const { card, media, shadow } = getTheme_v2(props.theme);
1200
1198
  return _responsive(
1201
1199
  media,
1202
1200
  props.$shadow,
@@ -1204,7 +1202,7 @@ function responsiveShadowStyle(props) {
1204
1202
  );
1205
1203
  }
1206
1204
  function labelBaseStyle(props) {
1207
- const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
1205
+ const { $accent, $muted } = props, { font } = getTheme_v2(props.theme);
1208
1206
  return css`
1209
1207
  text-transform: uppercase;
1210
1208
 
@@ -1315,7 +1313,7 @@ function avatarArrowStyle() {
1315
1313
  };
1316
1314
  }
1317
1315
  function avatarRootStyle(props) {
1318
- const { $color } = props, { avatar } = props.theme.sanity.v2;
1316
+ const { $color } = props, { avatar } = getTheme_v2(props.theme);
1319
1317
  return {
1320
1318
  "--avatar-bg-color": `var(--card-avatar-${$color}-bg-color)`,
1321
1319
  "--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)`,
@@ -1352,7 +1350,7 @@ function avatarRootStyle(props) {
1352
1350
  };
1353
1351
  }
1354
1352
  function responsiveAvatarSizeStyle(props) {
1355
- const { avatar, media } = props.theme.sanity.v2;
1353
+ const { avatar, media } = getTheme_v2(props.theme);
1356
1354
  return _responsive(media, props.$size, (size2) => {
1357
1355
  const avatarSize = avatar.sizes[size2] || avatar.sizes[0];
1358
1356
  return {
@@ -1499,7 +1497,7 @@ const Root$B = styled.div(
1499
1497
  );
1500
1498
  });
1501
1499
  function _responsiveAvatarCounterSizeStyle(props) {
1502
- const { avatar, media } = props.theme.sanity.v2;
1500
+ const { avatar, media } = getTheme_v2(props.theme);
1503
1501
  return _responsive(media, props.$size, (size2) => {
1504
1502
  const avatarSize = avatar.sizes[size2];
1505
1503
  return avatarSize ? {
@@ -1510,7 +1508,7 @@ function _responsiveAvatarCounterSizeStyle(props) {
1510
1508
  });
1511
1509
  }
1512
1510
  function _avatarCounterBaseStyle(props) {
1513
- const { space } = props.theme.sanity.v2;
1511
+ const { space } = getTheme_v2(props.theme);
1514
1512
  return css`
1515
1513
  align-items: center;
1516
1514
  justify-content: center;
@@ -1559,7 +1557,7 @@ function avatarStackStyle() {
1559
1557
  return BASE_STYLES;
1560
1558
  }
1561
1559
  function responsiveAvatarStackSizeStyle(props) {
1562
- const { avatar, media } = props.theme.sanity.v2;
1560
+ const { avatar, media } = getTheme_v2(props.theme);
1563
1561
  return _responsive(media, props.$size, (size2) => {
1564
1562
  const avatarSize = avatar.sizes[size2];
1565
1563
  return avatarSize ? {
@@ -1658,7 +1656,7 @@ const Root$z = styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), Ava
1658
1656
  );
1659
1657
  });
1660
1658
  function textBaseStyle(props) {
1661
- const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
1659
+ const { $accent, $muted } = props, { font } = getTheme_v2(props.theme);
1662
1660
  return css`
1663
1661
  color: var(--card-fg-color);
1664
1662
 
@@ -1902,7 +1900,7 @@ function _cardColorStyle(base, color, checkered = !1) {
1902
1900
  };
1903
1901
  }
1904
1902
  function buttonBaseStyles(props) {
1905
- const { $width } = props, { style } = props.theme.sanity.v2;
1903
+ const { $width } = props, { style } = getTheme_v2(props.theme);
1906
1904
  return css`
1907
1905
  ${style == null ? void 0 : style.button};
1908
1906
 
@@ -1948,7 +1946,7 @@ function combineBoxShadow(...boxShadows) {
1948
1946
  }
1949
1947
  function buttonColorStyles(props) {
1950
1948
  var _a;
1951
- 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 = {
1949
+ const { $mode } = props, { button, color: baseColor, style } = getTheme_v2(props.theme), shadow = props.$mode === "ghost", mode = baseColor.button[$mode] || baseColor.button.default, color = mode[props.$tone] || mode.default, border2 = {
1952
1950
  width: button.border.width,
1953
1951
  color: "var(--card-border-color)"
1954
1952
  }, defaultBoxShadow = void 0;
@@ -2087,7 +2085,7 @@ function cardStyle(props) {
2087
2085
  return [cardBaseStyle(props), cardColorStyle(props)];
2088
2086
  }
2089
2087
  function cardBaseStyle(props) {
2090
- const { $checkered } = props, { space } = props.theme.sanity.v2;
2088
+ const { $checkered } = props, { space } = getTheme_v2(props.theme);
2091
2089
  return css`
2092
2090
  ${$checkered && css`
2093
2091
  background-size: ${space[3]}px ${space[3]}px;
@@ -2121,7 +2119,7 @@ function cardBaseStyle(props) {
2121
2119
  }
2122
2120
  function cardColorStyle(props) {
2123
2121
  var _a;
2124
- const { $checkered, $focusRing } = props, { card, color, style } = props.theme.sanity.v2, border2 = { width: card.border.width, color: "var(--card-border-color)" };
2122
+ const { $checkered, $focusRing } = props, { card, color, style } = getTheme_v2(props.theme), border2 = { width: card.border.width, color: "var(--card-border-color)" };
2125
2123
  return css`
2126
2124
  color-scheme: ${color._dark ? "dark" : "light"};
2127
2125
 
@@ -2261,7 +2259,7 @@ function checkboxBaseStyles() {
2261
2259
  `;
2262
2260
  }
2263
2261
  function inputElementStyles(props) {
2264
- const { color, input, radius } = props.theme.sanity.v2, { focusRing } = input.checkbox;
2262
+ const { color, input, radius } = getTheme_v2(props.theme), { focusRing } = input.checkbox;
2265
2263
  return css`
2266
2264
  position: absolute;
2267
2265
  top: 0;
@@ -2407,7 +2405,9 @@ const Root$r = styled.div(checkboxBaseStyles), Input$5 = styled.input(inputEleme
2407
2405
  ] });
2408
2406
  });
2409
2407
  function codeSyntaxHighlightingStyle({ theme }) {
2410
- const color = theme.sanity.v2.color.syntax;
2408
+ const {
2409
+ color: { syntax: color }
2410
+ } = getTheme_v2(theme);
2411
2411
  return {
2412
2412
  "&.atrule": { color: color.atrule },
2413
2413
  "&.attr-name": { color: color.attrName },
@@ -2490,7 +2490,7 @@ function containerBaseStyle() {
2490
2490
  return BASE_STYLE$1;
2491
2491
  }
2492
2492
  function responsiveContainerWidthStyle(props) {
2493
- const { container, media } = props.theme.sanity.v2;
2493
+ const { container, media } = getTheme_v2(props.theme);
2494
2494
  return _responsive(media, props.$width, (val) => ({
2495
2495
  maxWidth: val === "auto" ? "none" : rem(container[val])
2496
2496
  }));
@@ -2533,7 +2533,7 @@ const Root$p = styled(Box)(
2533
2533
  );
2534
2534
  });
2535
2535
  function headingBaseStyle(props) {
2536
- const { $accent, $muted } = props, { font } = props.theme.sanity.v2;
2536
+ const { $accent, $muted } = props, { font } = getTheme_v2(props.theme);
2537
2537
  return css`
2538
2538
  ${$accent && css`
2539
2539
  color: var(--card-accent-fg-color);
@@ -2632,7 +2632,7 @@ function inlineBaseStyle() {
2632
2632
  };
2633
2633
  }
2634
2634
  function inlineSpaceStyle(props) {
2635
- const { media, space } = props.theme.sanity.v2;
2635
+ const { media, space } = getTheme_v2(props.theme);
2636
2636
  return _responsive(media, props.$space, (spaceIndex) => {
2637
2637
  const _space = rem(spaceIndex === 0.5 ? space[1] / 2 : space[spaceIndex]);
2638
2638
  return {
@@ -3501,7 +3501,7 @@ function radioBaseStyle() {
3501
3501
  `;
3502
3502
  }
3503
3503
  function inputElementStyle(props) {
3504
- const { color, input } = props.theme.sanity.v2, dist = (input.radio.size - input.radio.markSize) / 2;
3504
+ const { color, input } = getTheme_v2(props.theme), dist = (input.radio.size - input.radio.markSize) / 2;
3505
3505
  return css`
3506
3506
  appearance: none;
3507
3507
  position: absolute;
@@ -3626,7 +3626,7 @@ function rootStyle() {
3626
3626
  `;
3627
3627
  }
3628
3628
  function inputBaseStyle(props) {
3629
- const { font } = props.theme.sanity.v2;
3629
+ const { font } = getTheme_v2(props.theme);
3630
3630
  return css`
3631
3631
  -webkit-font-smoothing: antialiased;
3632
3632
  appearance: none;
@@ -3643,7 +3643,7 @@ function inputBaseStyle(props) {
3643
3643
  `;
3644
3644
  }
3645
3645
  function inputColorStyle(props) {
3646
- const { color, input } = props.theme.sanity.v2;
3646
+ const { color, input } = getTheme_v2(props.theme);
3647
3647
  return css`
3648
3648
  /* enabled */
3649
3649
  background-color: ${color.input.default.enabled.bg};
@@ -3698,7 +3698,7 @@ function textSize(size2) {
3698
3698
  return { fontSize: rem(size2.fontSize), lineHeight: rem(size2.lineHeight) };
3699
3699
  }
3700
3700
  function inputTextSizeStyle(props) {
3701
- const { $fontSize } = props, { font, media } = props.theme.sanity.v2;
3701
+ const { $fontSize } = props, { font, media } = getTheme_v2(props.theme);
3702
3702
  return _responsive(
3703
3703
  media,
3704
3704
  $fontSize,
@@ -3715,7 +3715,7 @@ function inputStyle() {
3715
3715
  ];
3716
3716
  }
3717
3717
  function iconBoxStyle(props) {
3718
- const { color } = props.theme.sanity.v2;
3718
+ const { color } = getTheme_v2(props.theme);
3719
3719
  return css`
3720
3720
  pointer-events: none;
3721
3721
  position: absolute;
@@ -3791,7 +3791,7 @@ function stackBaseStyle() {
3791
3791
  return BASE_STYLE;
3792
3792
  }
3793
3793
  function responsiveStackSpaceStyle(props) {
3794
- const { media, space } = props.theme.sanity.v2;
3794
+ const { media, space } = getTheme_v2(props.theme);
3795
3795
  return _responsive(media, props.$space, (spaceIndex) => ({
3796
3796
  gridGap: rem(space[spaceIndex])
3797
3797
  }));
@@ -3837,7 +3837,7 @@ function switchInputStyles() {
3837
3837
  `;
3838
3838
  }
3839
3839
  function switchRepresentationStyles(props) {
3840
- const { color, input } = props.theme.sanity.v2;
3840
+ const { color, input } = getTheme_v2(props.theme);
3841
3841
  return css`
3842
3842
  --switch-bg-color: ${color.input.default.enabled.border};
3843
3843
  --switch-fg-color: ${color.input.default.enabled.bg};
@@ -3910,7 +3910,7 @@ function switchRepresentationStyles(props) {
3910
3910
  `;
3911
3911
  }
3912
3912
  function switchTrackStyles(props) {
3913
- const { input } = props.theme.sanity.v2;
3913
+ const { input } = getTheme_v2(props.theme);
3914
3914
  return css`
3915
3915
  &:not([hidden]) {
3916
3916
  display: block;
@@ -3925,7 +3925,7 @@ function switchTrackStyles(props) {
3925
3925
  `;
3926
3926
  }
3927
3927
  function switchThumbStyles(props) {
3928
- 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;
3928
+ const { $indeterminate } = props, { input } = 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;
3929
3929
  return css`
3930
3930
  &:not([hidden]) {
3931
3931
  display: block;
@@ -4361,13 +4361,18 @@ const Root$a = styled(Layer)`
4361
4361
  zOffset = layer.tooltip.zOffset,
4362
4362
  delay,
4363
4363
  ...restProps
4364
- } = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), forwardedRef = useForwardedRef(ref), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", portal = usePortal(), portalElement = typeof portalProp == "string" ? ((_c = portal.elements) == null ? void 0 : _c[portalProp]) || null : portal.element, tooltipWidth = useMemo(() => {
4364
+ } = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), forwardedRef = useForwardedRef(ref), [referenceElement, setReferenceElement] = useState(null), arrowRef = useRef(null), rootBoundary = "viewport", portal = usePortal(), portalElement = typeof portalProp == "string" ? ((_c = portal.elements) == null ? void 0 : _c[portalProp]) || null : portal.element, documentBodyOffsetWidth = useSyncExternalStore(
4365
+ emptySubscribe,
4366
+ () => document.body.offsetWidth,
4367
+ // We don't actually know what the width of the body is during SSR, so we'll just assume it's 800px or larger
4368
+ () => 800
4369
+ ), tooltipWidth = useMemo(() => {
4365
4370
  const availableWidths = [
4366
4371
  ...boundaryElement ? [boundaryElement.offsetWidth] : [],
4367
- (portalElement == null ? void 0 : portalElement.offsetWidth) || document.body.offsetWidth
4372
+ (portalElement == null ? void 0 : portalElement.offsetWidth) || documentBodyOffsetWidth
4368
4373
  ];
4369
4374
  return Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2;
4370
- }, [boundaryElement, portalElement == null ? void 0 : portalElement.offsetWidth]), middleware = useMemo(() => {
4375
+ }, [boundaryElement, documentBodyOffsetWidth, portalElement == null ? void 0 : portalElement.offsetWidth]), middleware = useMemo(() => {
4371
4376
  const ret = [];
4372
4377
  return ret.push(
4373
4378
  flip({
@@ -4547,7 +4552,8 @@ const Root$a = styled(Layer)`
4547
4552
  ),
4548
4553
  child
4549
4554
  ] });
4550
- }), Root$9 = styled.div`
4555
+ }), emptySubscribe = () => () => {
4556
+ }, Root$9 = styled.div`
4551
4557
  line-height: 0;
4552
4558
  `, ListBox = styled(Box)`
4553
4559
  & > ul {
@@ -5004,7 +5010,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
5004
5010
  ] }, itemIndex)) });
5005
5011
  });
5006
5012
  function dialogStyle({ theme }) {
5007
- const { color } = theme.sanity.v2;
5013
+ const { color } = getTheme_v2(theme);
5008
5014
  return {
5009
5015
  "&:not([hidden])": {
5010
5016
  display: "flex"
@@ -5020,7 +5026,7 @@ function dialogStyle({ theme }) {
5020
5026
  };
5021
5027
  }
5022
5028
  function responsiveDialogPositionStyle(props) {
5023
- const { media } = props.theme.sanity.v2;
5029
+ const { media } = getTheme_v2(props.theme);
5024
5030
  return _responsive(media, props.$position, (position) => ({ "&&": { position } }));
5025
5031
  }
5026
5032
  function animationDialogStyle(props) {
@@ -5699,7 +5705,7 @@ function selectableBaseStyle() {
5699
5705
  }
5700
5706
  function selectableColorStyle(props) {
5701
5707
  var _a;
5702
- const { $tone } = props, { color, style } = props.theme.sanity.v2, tone = color.selectable[$tone];
5708
+ const { $tone } = props, { color, style } = getTheme_v2(props.theme), tone = color.selectable[$tone];
5703
5709
  return css`
5704
5710
  ${_cardColorStyle(color, tone.enabled)}
5705
5711
 
@@ -6044,7 +6050,7 @@ const MenuItem = forwardRef(function(props, forwardedRef) {
6044
6050
  }
6045
6051
  );
6046
6052
  }), Root$3 = styled(Skeleton)((props) => {
6047
- const { $size, $style } = props, { font, media } = props.theme.sanity.v2, fontStyle = font[$style];
6053
+ const { $size, $style } = props, { font, media } = getTheme_v2(props.theme), fontStyle = font[$style];
6048
6054
  return _responsive(media, $size, (sizeIndex) => {
6049
6055
  const fontSize2 = fontStyle.sizes[sizeIndex];
6050
6056
  return { height: fontSize2.lineHeight - fontSize2.ascenderHeight - fontSize2.descenderHeight };
@@ -6543,7 +6549,7 @@ function treeItemRootStyle() {
6543
6549
  `;
6544
6550
  }
6545
6551
  function treeItemRootColorStyle(props) {
6546
- const $tone = "default", { color } = props.theme.sanity.v2, tone = color.selectable[$tone];
6552
+ const $tone = "default", { color } = getTheme_v2(props.theme), tone = color.selectable[$tone];
6547
6553
  return css`
6548
6554
  &[role='none'] {
6549
6555
  & > [role='treeitem'] {
@@ -6587,7 +6593,7 @@ function treeItemRootColorStyle(props) {
6587
6593
  `;
6588
6594
  }
6589
6595
  function treeItemBoxStyle(props) {
6590
- const { $level } = props, { space } = props.theme.sanity.v2;
6596
+ const { $level } = props, { space } = getTheme_v2(props.theme);
6591
6597
  return css`
6592
6598
  padding-left: ${rem(space[2] * $level)};
6593
6599