@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.
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +84 -78
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +211 -205
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +84 -78
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/theme.esm.js +587 -51
- package/dist/theme.esm.js.map +1 -1
- package/dist/theme.js +560 -22
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +587 -51
- package/dist/theme.mjs.map +1 -1
- package/package.json +27 -28
- package/src/core/components/autocomplete/autocomplete.styles.tsx +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.styles.ts +1 -1
- package/src/core/components/dialog/__workshop__/panes.tsx +1 -1
- package/src/core/components/dialog/dialog.tsx +1 -1
- package/src/core/components/dialog/styles.ts +3 -3
- package/src/core/components/hotkeys/hotkeys.tsx +1 -1
- package/src/core/components/menu/menu.tsx +1 -1
- package/src/core/components/menu/menuDivider.ts +1 -1
- package/src/core/components/skeleton/skeleton.tsx +1 -1
- package/src/core/components/skeleton/textSkeleton.tsx +3 -3
- package/src/core/components/tab/tab.tsx +1 -1
- package/src/core/components/tab/tabList.tsx +1 -1
- package/src/core/components/toast/toast.tsx +1 -1
- package/src/core/components/toast/toastProvider.tsx +1 -1
- package/src/core/components/tree/style.ts +3 -2
- package/src/core/components/tree/treeItem.tsx +1 -1
- package/src/core/hooks/useMediaIndex/useMediaIndex.test.tsx +1 -1
- package/src/core/primitives/_selectable/selectable.tsx +1 -1
- package/src/core/primitives/_selectable/style.ts +2 -1
- package/src/core/primitives/avatar/avatar.tsx +1 -1
- package/src/core/primitives/avatar/avatarCounter.tsx +4 -3
- package/src/core/primitives/avatar/avatarStack.tsx +3 -2
- package/src/core/primitives/avatar/styles.ts +3 -3
- package/src/core/primitives/badge/badge.tsx +1 -1
- package/src/core/primitives/box/box.tsx +1 -1
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled1.tsx +1 -1
- package/src/core/primitives/button/__workshop__/styled2.tsx +1 -1
- package/src/core/primitives/button/button.tsx +1 -1
- package/src/core/primitives/button/styles.ts +3 -3
- package/src/core/primitives/card/__workshop__/selected.tsx +3 -3
- package/src/core/primitives/card/__workshop__/styled.tsx +1 -1
- package/src/core/primitives/card/card.tsx +1 -1
- package/src/core/primitives/card/styles.ts +3 -2
- package/src/core/primitives/checkbox/checkbox.tsx +1 -1
- package/src/core/primitives/checkbox/styles.ts +2 -1
- package/src/core/primitives/code/code.tsx +1 -1
- package/src/core/primitives/code/styles.ts +4 -1
- package/src/core/primitives/container/container.tsx +1 -1
- package/src/core/primitives/container/styles.ts +2 -2
- package/src/core/primitives/flex/__workshop__/example.tsx +1 -1
- package/src/core/primitives/flex/flex.tsx +1 -1
- package/src/core/primitives/grid/grid.tsx +1 -1
- package/src/core/primitives/heading/heading.tsx +1 -1
- package/src/core/primitives/heading/styles.ts +2 -1
- package/src/core/primitives/inline/inline.tsx +1 -1
- package/src/core/primitives/inline/styles.ts +2 -2
- package/src/core/primitives/kbd/kbd.tsx +1 -1
- package/src/core/primitives/label/label.tsx +1 -1
- package/src/core/primitives/label/styles.ts +2 -1
- package/src/core/primitives/popover/popoverCard.tsx +1 -1
- package/src/core/primitives/radio/radio.tsx +1 -1
- package/src/core/primitives/radio/styles.ts +2 -1
- package/src/core/primitives/select/select.tsx +1 -1
- package/src/core/primitives/select/styles.ts +5 -5
- package/src/core/primitives/spinner/spinner.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +1 -1
- package/src/core/primitives/stack/styles.ts +2 -2
- package/src/core/primitives/switch/styles.ts +4 -3
- package/src/core/primitives/switch/switch.tsx +1 -1
- package/src/core/primitives/text/__workshop__/colored.tsx +3 -3
- package/src/core/primitives/text/styles.ts +2 -1
- package/src/core/primitives/text/text.tsx +1 -1
- package/src/core/primitives/textArea/textArea.tsx +1 -1
- package/src/core/primitives/textInput/textInput.tsx +1 -1
- package/src/core/primitives/tooltip/tooltip.tsx +21 -12
- package/src/core/primitives/tooltip/tooltipCard.tsx +1 -1
- package/src/core/styles/border/borderStyle.ts +6 -6
- package/src/core/styles/box/boxStyle.ts +5 -5
- package/src/core/styles/flex/flexItemStyle.ts +2 -2
- package/src/core/styles/flex/flexStyle.ts +6 -6
- package/src/core/styles/font/responsiveFont.ts +2 -2
- package/src/core/styles/font/textAlignStyle.ts +2 -2
- package/src/core/styles/grid/gridItemStyle.ts +7 -7
- package/src/core/styles/grid/gridStyle.ts +9 -9
- package/src/core/styles/helpers.ts +2 -2
- package/src/core/styles/input/responsiveInputPaddingStyle.ts +2 -2
- package/src/core/styles/input/textInputStyle.ts +4 -4
- package/src/core/styles/margin/marginsStyle.test.ts +1 -1
- package/src/core/styles/padding/paddingStyle.test.ts +1 -1
- package/src/core/styles/radius/radiusStyle.ts +2 -2
- package/src/core/styles/shadow/shadowStyle.ts +2 -2
- package/src/core/theme/__workshop__/build/Root.tsx +2 -1
- package/src/core/theme/theme.test.tsx +1 -1
- package/src/core/theme/themeProvider.tsx +7 -6
- package/src/core/theme/useTheme.ts +1 -2
- package/src/core/utils/arrow/arrow.tsx +1 -1
- package/src/core/utils/elementQuery/__workshop__/customMedia.tsx +1 -1
- package/src/core/utils/layer/layer.tsx +1 -1
- package/src/core/utils/srOnly/srOnly.tsx +1 -1
- package/src/core/utils/virtualList/virtualList.tsx +1 -1
- package/src/theme/system/theme.ts +1 -1
- package/dist/_chunks-cjs/getScopedTheme.js +0 -547
- package/dist/_chunks-cjs/getScopedTheme.js.map +0 -1
- package/dist/_chunks-es/getScopedTheme.mjs +0 -548
- package/dist/_chunks-es/getScopedTheme.mjs.map +0 -1
- package/dist/_legacy/getScopedTheme.esm.js +0 -548
- package/dist/_legacy/getScopedTheme.esm.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
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"),
|
|
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");
|
|
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");
|
|
6
4
|
function _interopDefaultCompat(e) {
|
|
7
5
|
return e && typeof e == "object" && "default" in e ? e : { default: e };
|
|
8
6
|
}
|
|
9
|
-
var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs),
|
|
7
|
+
var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs), Refractor__default = /* @__PURE__ */ _interopDefaultCompat(Refractor);
|
|
10
8
|
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 = {
|
|
11
9
|
initial: {
|
|
12
10
|
opacity: 0.5,
|
|
@@ -39,12 +37,12 @@ function _responsive(media, values, callback) {
|
|
|
39
37
|
function _getArrayProp(val, defaultVal) {
|
|
40
38
|
return val === void 0 ? defaultVal || EMPTY_ARRAY : Array.isArray(val) ? val : [val];
|
|
41
39
|
}
|
|
42
|
-
function _getResponsiveSpace(
|
|
40
|
+
function _getResponsiveSpace(theme$1, props, spaceIndexes = EMPTY_ARRAY) {
|
|
43
41
|
if (!Array.isArray(spaceIndexes))
|
|
44
42
|
throw new Error("the property must be array of numbers");
|
|
45
43
|
if (spaceIndexes.length === 0)
|
|
46
44
|
return null;
|
|
47
|
-
const { media, space } =
|
|
45
|
+
const { media, space } = theme.getTheme_v2(theme$1);
|
|
48
46
|
return _responsive(
|
|
49
47
|
media,
|
|
50
48
|
spaceIndexes,
|
|
@@ -52,7 +50,7 @@ function _getResponsiveSpace(theme2, props, spaceIndexes = EMPTY_ARRAY) {
|
|
|
52
50
|
);
|
|
53
51
|
}
|
|
54
52
|
function responsiveFont(fontKey, props) {
|
|
55
|
-
const { $size, $weight } = props, { font, media } = props.theme
|
|
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 = {
|
|
56
54
|
position: "relative",
|
|
57
55
|
fontFamily: family,
|
|
58
56
|
fontWeight,
|
|
@@ -113,7 +111,7 @@ function responsiveLabelFont(props) {
|
|
|
113
111
|
return responsiveFont("label", props);
|
|
114
112
|
}
|
|
115
113
|
function responsiveTextAlignStyle(props) {
|
|
116
|
-
const { media } = props.theme
|
|
114
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
117
115
|
return _responsive(media, props.$align, (textAlign) => ({ textAlign }));
|
|
118
116
|
}
|
|
119
117
|
function responsiveTextFont(props) {
|
|
@@ -530,8 +528,8 @@ function ThemeProvider(props) {
|
|
|
530
528
|
theme: rootTheme,
|
|
531
529
|
scheme,
|
|
532
530
|
tone
|
|
533
|
-
} : null, [rootTheme, scheme, tone]),
|
|
534
|
-
return
|
|
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' });
|
|
535
533
|
}
|
|
536
534
|
function useRootTheme() {
|
|
537
535
|
const value = react.useContext(ThemeContext);
|
|
@@ -544,10 +542,10 @@ function ThemeColorProvider(props) {
|
|
|
544
542
|
return /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, { scheme: scheme || root.scheme, theme: root.theme, tone, children });
|
|
545
543
|
}
|
|
546
544
|
function useTheme() {
|
|
547
|
-
return
|
|
545
|
+
return styledComponents.useTheme();
|
|
548
546
|
}
|
|
549
547
|
function useTheme_v2() {
|
|
550
|
-
return
|
|
548
|
+
return theme.getTheme_v2(styledComponents.useTheme());
|
|
551
549
|
}
|
|
552
550
|
const MEDIA_STORE_CACHE = /* @__PURE__ */ new WeakMap();
|
|
553
551
|
function _getMediaQuery(media, index) {
|
|
@@ -644,7 +642,7 @@ function responsiveBorderStyle() {
|
|
|
644
642
|
}
|
|
645
643
|
function border(props) {
|
|
646
644
|
var _a, _b;
|
|
647
|
-
const { card, media } = props.theme
|
|
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)`;
|
|
648
646
|
return _responsive(
|
|
649
647
|
media,
|
|
650
648
|
props.$border,
|
|
@@ -653,7 +651,7 @@ function border(props) {
|
|
|
653
651
|
}
|
|
654
652
|
function borderTop(props) {
|
|
655
653
|
var _a, _b;
|
|
656
|
-
const { card, media } = props.theme
|
|
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)`;
|
|
657
655
|
return _responsive(
|
|
658
656
|
media,
|
|
659
657
|
props.$borderTop,
|
|
@@ -662,7 +660,7 @@ function borderTop(props) {
|
|
|
662
660
|
}
|
|
663
661
|
function borderRight(props) {
|
|
664
662
|
var _a, _b;
|
|
665
|
-
const { card, media } = props.theme
|
|
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)`;
|
|
666
664
|
return _responsive(
|
|
667
665
|
media,
|
|
668
666
|
props.$borderRight,
|
|
@@ -671,7 +669,7 @@ function borderRight(props) {
|
|
|
671
669
|
}
|
|
672
670
|
function borderBottom(props) {
|
|
673
671
|
var _a, _b;
|
|
674
|
-
const { card, media } = props.theme
|
|
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)`;
|
|
675
673
|
return _responsive(
|
|
676
674
|
media,
|
|
677
675
|
props.$borderBottom,
|
|
@@ -680,7 +678,7 @@ function borderBottom(props) {
|
|
|
680
678
|
}
|
|
681
679
|
function borderLeft(props) {
|
|
682
680
|
var _a, _b;
|
|
683
|
-
const { card, media } = props.theme
|
|
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)`;
|
|
684
682
|
return _responsive(
|
|
685
683
|
media,
|
|
686
684
|
props.$borderLeft,
|
|
@@ -710,25 +708,25 @@ function responsiveBoxStyle() {
|
|
|
710
708
|
];
|
|
711
709
|
}
|
|
712
710
|
function responsiveBoxDisplayStyle(props) {
|
|
713
|
-
const { media } = props.theme
|
|
711
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
714
712
|
return _responsive(media, props.$display, (display) => ({
|
|
715
713
|
"&:not([hidden])": { display }
|
|
716
714
|
}));
|
|
717
715
|
}
|
|
718
716
|
function responsiveBoxSizingStyle(props) {
|
|
719
|
-
const { media } = props.theme
|
|
717
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
720
718
|
return _responsive(media, props.$sizing, (sizing) => ({
|
|
721
719
|
boxSizing: BOX_SIZING[sizing]
|
|
722
720
|
}));
|
|
723
721
|
}
|
|
724
722
|
function responsiveBoxHeightStyle(props) {
|
|
725
|
-
const { media } = props.theme
|
|
723
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
726
724
|
return _responsive(media, props.$height, (height) => ({
|
|
727
725
|
height: BOX_HEIGHT[height]
|
|
728
726
|
}));
|
|
729
727
|
}
|
|
730
728
|
function responsiveBoxOverflowStyle(props) {
|
|
731
|
-
const { media } = props.theme
|
|
729
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
732
730
|
return _responsive(media, props.$overflow, (overflow) => ({
|
|
733
731
|
overflow
|
|
734
732
|
}));
|
|
@@ -749,25 +747,25 @@ function responsiveFlexStyle() {
|
|
|
749
747
|
];
|
|
750
748
|
}
|
|
751
749
|
function responsiveFlexAlignStyle(props) {
|
|
752
|
-
const { media } = props.theme
|
|
750
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
753
751
|
return _responsive(media, props.$align, (align) => ({ alignItems: align }));
|
|
754
752
|
}
|
|
755
753
|
function responsiveFlexGapStyle(props) {
|
|
756
|
-
const { media, space } = props.theme
|
|
754
|
+
const { media, space } = theme.getTheme_v2(props.theme);
|
|
757
755
|
return _responsive(media, props.$gap, (gap) => ({
|
|
758
756
|
gap: gap ? rem(space[gap]) : void 0
|
|
759
757
|
}));
|
|
760
758
|
}
|
|
761
759
|
function responsiveFlexWrapStyle(props) {
|
|
762
|
-
const { media } = props.theme
|
|
760
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
763
761
|
return _responsive(media, props.$wrap, (wrap) => ({ flexWrap: wrap }));
|
|
764
762
|
}
|
|
765
763
|
function responsiveFlexJustifyStyle(props) {
|
|
766
|
-
const { media } = props.theme
|
|
764
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
767
765
|
return _responsive(media, props.$justify, (justify) => ({ justifyContent: justify }));
|
|
768
766
|
}
|
|
769
767
|
function responsiveFlexDirectionStyle(props) {
|
|
770
|
-
const { media } = props.theme
|
|
768
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
771
769
|
return _responsive(media, props.$direction, (direction) => ({ flexDirection: direction }));
|
|
772
770
|
}
|
|
773
771
|
const BASE_STYLE$2 = {
|
|
@@ -778,7 +776,7 @@ function flexItemStyle() {
|
|
|
778
776
|
return [BASE_STYLE$2, responsiveFlexItemStyle];
|
|
779
777
|
}
|
|
780
778
|
function responsiveFlexItemStyle(props) {
|
|
781
|
-
const { media } = props.theme
|
|
779
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
782
780
|
return props.$flex ? _responsive(media, props.$flex, (flex) => ({ flex })) : EMPTY_ARRAY;
|
|
783
781
|
}
|
|
784
782
|
function focusRingBorderStyle(border2) {
|
|
@@ -825,49 +823,49 @@ function responsiveGridStyle() {
|
|
|
825
823
|
];
|
|
826
824
|
}
|
|
827
825
|
function responsiveGridAutoFlowStyle(props) {
|
|
828
|
-
const { media } = props.theme
|
|
826
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
829
827
|
return _responsive(media, props.$autoFlow, (autoFlow) => ({
|
|
830
828
|
gridAutoFlow: autoFlow
|
|
831
829
|
}));
|
|
832
830
|
}
|
|
833
831
|
function responsiveGridAutoRowsStyle(props) {
|
|
834
|
-
const { media } = props.theme
|
|
832
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
835
833
|
return _responsive(media, props.$autoRows, (autoRows) => ({
|
|
836
834
|
gridAutoRows: autoRows && GRID_AUTO_ROWS[autoRows]
|
|
837
835
|
}));
|
|
838
836
|
}
|
|
839
837
|
function responsiveGridAutoColsStyle(props) {
|
|
840
|
-
const { media } = props.theme
|
|
838
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
841
839
|
return _responsive(media, props.$autoCols, (autoCols) => ({
|
|
842
840
|
gridAutoColumns: autoCols && GRID_AUTO_COLUMS[autoCols]
|
|
843
841
|
}));
|
|
844
842
|
}
|
|
845
843
|
function responsiveGridColumnsStyle(props) {
|
|
846
|
-
const { media } = props.theme
|
|
844
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
847
845
|
return _responsive(media, props.$columns, (columns) => ({
|
|
848
846
|
gridTemplateColumns: columns && `repeat(${columns},minmax(0,1fr));`
|
|
849
847
|
}));
|
|
850
848
|
}
|
|
851
849
|
function responsiveGridRowsStyle(props) {
|
|
852
|
-
const { media } = props.theme
|
|
850
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
853
851
|
return _responsive(media, props.$rows, (rows) => ({
|
|
854
852
|
gridTemplateRows: rows && `repeat(${rows},minmax(0,1fr));`
|
|
855
853
|
}));
|
|
856
854
|
}
|
|
857
855
|
function responsiveGridGapStyle(props) {
|
|
858
|
-
const { media, space } = props.theme
|
|
856
|
+
const { media, space } = theme.getTheme_v2(props.theme);
|
|
859
857
|
return _responsive(media, props.$gap, (gap) => ({
|
|
860
858
|
gridGap: gap ? rem(space[gap]) : void 0
|
|
861
859
|
}));
|
|
862
860
|
}
|
|
863
861
|
function responsiveGridGapXStyle(props) {
|
|
864
|
-
const { media, space } = props.theme
|
|
862
|
+
const { media, space } = theme.getTheme_v2(props.theme);
|
|
865
863
|
return _responsive(media, props.$gapX, (gapX) => ({
|
|
866
864
|
columnGap: gapX ? rem(space[gapX]) : void 0
|
|
867
865
|
}));
|
|
868
866
|
}
|
|
869
867
|
function responsiveGridGapYStyle(props) {
|
|
870
|
-
const { media, space } = props.theme
|
|
868
|
+
const { media, space } = theme.getTheme_v2(props.theme);
|
|
871
869
|
return _responsive(media, props.$gapY, (gapY) => ({
|
|
872
870
|
rowGap: gapY ? rem(space[gapY]) : void 0
|
|
873
871
|
}));
|
|
@@ -890,37 +888,37 @@ const GRID_ITEM_ROW = {
|
|
|
890
888
|
full: "1 / -1"
|
|
891
889
|
};
|
|
892
890
|
function responsiveGridItemRowStyle(props) {
|
|
893
|
-
const { media } = props.theme
|
|
891
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
894
892
|
return _responsive(media, props.$row, (row) => typeof row == "number" ? { gridRow: `span ${row} / span ${row}` } : { gridRow: GRID_ITEM_ROW[row] });
|
|
895
893
|
}
|
|
896
894
|
function responsiveGridItemRowStartStyle(props) {
|
|
897
|
-
const { media } = props.theme
|
|
895
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
898
896
|
return _responsive(media, props.$rowStart, (rowStart) => ({
|
|
899
897
|
gridRowStart: rowStart
|
|
900
898
|
}));
|
|
901
899
|
}
|
|
902
900
|
function responsiveGridItemRowEndStyle(props) {
|
|
903
|
-
const { media } = props.theme
|
|
901
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
904
902
|
return _responsive(media, props.$rowEnd, (rowEnd) => ({ gridRowEnd: rowEnd }));
|
|
905
903
|
}
|
|
906
904
|
function responsiveGridItemColumnStyle(props) {
|
|
907
|
-
const { media } = props.theme
|
|
905
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
908
906
|
return _responsive(media, props.$column, (column) => typeof column == "number" ? { gridColumn: `span ${column} / span ${column}` } : { gridColumn: GRID_ITEM_COLUMN[column] });
|
|
909
907
|
}
|
|
910
908
|
function responsiveGridItemColumnStartStyle(props) {
|
|
911
|
-
const { media } = props.theme
|
|
909
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
912
910
|
return _responsive(media, props.$columnStart, (columnStart) => ({
|
|
913
911
|
gridColumnStart: columnStart
|
|
914
912
|
}));
|
|
915
913
|
}
|
|
916
914
|
function responsiveGridItemColumnEndStyle(props) {
|
|
917
|
-
const { media } = props.theme
|
|
915
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
918
916
|
return _responsive(media, props.$columnEnd, (columnEnd) => ({
|
|
919
917
|
gridColumnEnd: columnEnd
|
|
920
918
|
}));
|
|
921
919
|
}
|
|
922
920
|
function responsiveInputPaddingStyle(props) {
|
|
923
|
-
const { $fontSize, $iconLeft, $iconRight, $padding, $space } = props, { font, media, space } = props.theme
|
|
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 = [];
|
|
924
922
|
for (let i = 0; i < len; i += 1)
|
|
925
923
|
_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];
|
|
926
924
|
return _responsive(media, _padding, (_, i) => {
|
|
@@ -936,7 +934,7 @@ function responsiveInputPaddingStyle(props) {
|
|
|
936
934
|
function responsiveInputPaddingIconRightStyle(props) {
|
|
937
935
|
return responsiveInputPaddingStyle({ ...props, $iconRight: !0 });
|
|
938
936
|
}
|
|
939
|
-
const ROOT_STYLE =
|
|
937
|
+
const ROOT_STYLE = styledComponents.css`
|
|
940
938
|
&:not([hidden]) {
|
|
941
939
|
display: flex;
|
|
942
940
|
}
|
|
@@ -947,8 +945,8 @@ function textInputRootStyle() {
|
|
|
947
945
|
return ROOT_STYLE;
|
|
948
946
|
}
|
|
949
947
|
function textInputBaseStyle(props) {
|
|
950
|
-
const { $scheme, $tone, $weight } = props, { color, font } = props.theme
|
|
951
|
-
return
|
|
948
|
+
const { $scheme, $tone, $weight } = props, { color, font } = theme.getTheme_v2(props.theme);
|
|
949
|
+
return styledComponents.css`
|
|
952
950
|
appearance: none;
|
|
953
951
|
background: none;
|
|
954
952
|
border: 0;
|
|
@@ -1015,7 +1013,7 @@ function textInputBaseStyle(props) {
|
|
|
1015
1013
|
`;
|
|
1016
1014
|
}
|
|
1017
1015
|
function textInputFontSizeStyle(props) {
|
|
1018
|
-
const { font, media } = props.theme
|
|
1016
|
+
const { font, media } = theme.getTheme_v2(props.theme);
|
|
1019
1017
|
return _responsive(media, props.$fontSize, (sizeIndex) => {
|
|
1020
1018
|
const size2 = font.text.sizes[sizeIndex] || font.text.sizes[2];
|
|
1021
1019
|
return {
|
|
@@ -1025,8 +1023,8 @@ function textInputFontSizeStyle(props) {
|
|
|
1025
1023
|
});
|
|
1026
1024
|
}
|
|
1027
1025
|
function textInputRepresentationStyle(props) {
|
|
1028
|
-
const { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = props.theme
|
|
1029
|
-
return
|
|
1026
|
+
const { $hasPrefix, $hasSuffix, $scheme, $tone, $unstableDisableFocusRing } = props, { color, input } = theme.getTheme_v2(props.theme);
|
|
1027
|
+
return styledComponents.css`
|
|
1030
1028
|
--input-box-shadow: none;
|
|
1031
1029
|
|
|
1032
1030
|
position: absolute;
|
|
@@ -1177,7 +1175,7 @@ function responsivePaddingStyle(props) {
|
|
|
1177
1175
|
].filter(Boolean);
|
|
1178
1176
|
}
|
|
1179
1177
|
function responsiveRadiusStyle(props) {
|
|
1180
|
-
const { media, radius } = props.theme
|
|
1178
|
+
const { media, radius } = theme.getTheme_v2(props.theme);
|
|
1181
1179
|
return _responsive(media, props.$radius, (value) => {
|
|
1182
1180
|
let borderRadius = 0;
|
|
1183
1181
|
return typeof value == "number" && (borderRadius = rem(radius[value])), value === "full" && (borderRadius = "9999px"), { borderRadius };
|
|
@@ -1193,7 +1191,7 @@ function shadowStyle(shadow, outlineWidth = 1) {
|
|
|
1193
1191
|
return { boxShadow: `${outline}, ${umbra}, ${penumbra}, ${ambient}` };
|
|
1194
1192
|
}
|
|
1195
1193
|
function responsiveShadowStyle(props) {
|
|
1196
|
-
const { card, media, shadow } = props.theme
|
|
1194
|
+
const { card, media, shadow } = theme.getTheme_v2(props.theme);
|
|
1197
1195
|
return _responsive(
|
|
1198
1196
|
media,
|
|
1199
1197
|
props.$shadow,
|
|
@@ -1201,15 +1199,15 @@ function responsiveShadowStyle(props) {
|
|
|
1201
1199
|
);
|
|
1202
1200
|
}
|
|
1203
1201
|
function labelBaseStyle(props) {
|
|
1204
|
-
const { $accent, $muted } = props, { font } = props.theme
|
|
1205
|
-
return
|
|
1202
|
+
const { $accent, $muted } = props, { font } = theme.getTheme_v2(props.theme);
|
|
1203
|
+
return styledComponents.css`
|
|
1206
1204
|
text-transform: uppercase;
|
|
1207
1205
|
|
|
1208
|
-
${$accent &&
|
|
1206
|
+
${$accent && styledComponents.css`
|
|
1209
1207
|
color: var(--card-accent-fg-color);
|
|
1210
1208
|
`}
|
|
1211
1209
|
|
|
1212
|
-
${$muted &&
|
|
1210
|
+
${$muted && styledComponents.css`
|
|
1213
1211
|
color: var(--card-muted-fg-color);
|
|
1214
1212
|
`}
|
|
1215
1213
|
|
|
@@ -1234,7 +1232,7 @@ function labelBaseStyle(props) {
|
|
|
1234
1232
|
}
|
|
1235
1233
|
`;
|
|
1236
1234
|
}
|
|
1237
|
-
const Root$C =
|
|
1235
|
+
const Root$C = styledComponents.styled.div(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), SpanWithTextOverflow$2 = styledComponents.styled.span`
|
|
1238
1236
|
display: block;
|
|
1239
1237
|
white-space: nowrap;
|
|
1240
1238
|
text-overflow: ellipsis;
|
|
@@ -1312,7 +1310,7 @@ function avatarArrowStyle() {
|
|
|
1312
1310
|
};
|
|
1313
1311
|
}
|
|
1314
1312
|
function avatarRootStyle(props) {
|
|
1315
|
-
const { $color } = props, { avatar } = props.theme
|
|
1313
|
+
const { $color } = props, { avatar } = theme.getTheme_v2(props.theme);
|
|
1316
1314
|
return {
|
|
1317
1315
|
"--avatar-bg-color": `var(--card-avatar-${$color}-bg-color)`,
|
|
1318
1316
|
"--avatar-fg-color": `var(--card-avatar-${$color}-fg-color)`,
|
|
@@ -1349,7 +1347,7 @@ function avatarRootStyle(props) {
|
|
|
1349
1347
|
};
|
|
1350
1348
|
}
|
|
1351
1349
|
function responsiveAvatarSizeStyle(props) {
|
|
1352
|
-
const { avatar, media } = props.theme
|
|
1350
|
+
const { avatar, media } = theme.getTheme_v2(props.theme);
|
|
1353
1351
|
return _responsive(media, props.$size, (size2) => {
|
|
1354
1352
|
const avatarSize = avatar.sizes[size2] || avatar.sizes[0];
|
|
1355
1353
|
return {
|
|
@@ -1400,12 +1398,12 @@ function avatarStrokeStyle() {
|
|
|
1400
1398
|
}
|
|
1401
1399
|
};
|
|
1402
1400
|
}
|
|
1403
|
-
const Root$B =
|
|
1401
|
+
const Root$B = styledComponents.styled.div(
|
|
1404
1402
|
responsiveAvatarSizeStyle,
|
|
1405
1403
|
avatarStyle.root
|
|
1406
|
-
), Arrow$1 =
|
|
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)({
|
|
1407
1405
|
color: "inherit"
|
|
1408
|
-
}), Image =
|
|
1406
|
+
}), Image = styledComponents.styled.svg(avatarStyle.image), Avatar = react.forwardRef(function(props, ref) {
|
|
1409
1407
|
const {
|
|
1410
1408
|
__unstable_hideInnerStroke,
|
|
1411
1409
|
as: asProp,
|
|
@@ -1496,7 +1494,7 @@ const Root$B = styled__default.default.div(
|
|
|
1496
1494
|
);
|
|
1497
1495
|
});
|
|
1498
1496
|
function _responsiveAvatarCounterSizeStyle(props) {
|
|
1499
|
-
const { avatar, media } = props.theme
|
|
1497
|
+
const { avatar, media } = theme.getTheme_v2(props.theme);
|
|
1500
1498
|
return _responsive(media, props.$size, (size2) => {
|
|
1501
1499
|
const avatarSize = avatar.sizes[size2];
|
|
1502
1500
|
return avatarSize ? {
|
|
@@ -1507,8 +1505,8 @@ function _responsiveAvatarCounterSizeStyle(props) {
|
|
|
1507
1505
|
});
|
|
1508
1506
|
}
|
|
1509
1507
|
function _avatarCounterBaseStyle(props) {
|
|
1510
|
-
const { space } = props.theme
|
|
1511
|
-
return
|
|
1508
|
+
const { space } = theme.getTheme_v2(props.theme);
|
|
1509
|
+
return styledComponents.css`
|
|
1512
1510
|
align-items: center;
|
|
1513
1511
|
justify-content: center;
|
|
1514
1512
|
box-sizing: border-box;
|
|
@@ -1526,7 +1524,7 @@ function _avatarCounterBaseStyle(props) {
|
|
|
1526
1524
|
}
|
|
1527
1525
|
`;
|
|
1528
1526
|
}
|
|
1529
|
-
const Root$A =
|
|
1527
|
+
const Root$A = styledComponents.styled.div(
|
|
1530
1528
|
_responsiveAvatarCounterSizeStyle,
|
|
1531
1529
|
_avatarCounterBaseStyle
|
|
1532
1530
|
), AvatarCounter = react.forwardRef(function(props, ref) {
|
|
@@ -1541,7 +1539,7 @@ function childrenToElementArray(children) {
|
|
|
1541
1539
|
(node) => ReactIs.isElement(node) || ReactIs.isFragment(node) || typeof node == "string"
|
|
1542
1540
|
);
|
|
1543
1541
|
}
|
|
1544
|
-
const BASE_STYLES =
|
|
1542
|
+
const BASE_STYLES = styledComponents.css`
|
|
1545
1543
|
white-space: nowrap;
|
|
1546
1544
|
|
|
1547
1545
|
& > div {
|
|
@@ -1556,7 +1554,7 @@ function avatarStackStyle() {
|
|
|
1556
1554
|
return BASE_STYLES;
|
|
1557
1555
|
}
|
|
1558
1556
|
function responsiveAvatarStackSizeStyle(props) {
|
|
1559
|
-
const { avatar, media } = props.theme
|
|
1557
|
+
const { avatar, media } = theme.getTheme_v2(props.theme);
|
|
1560
1558
|
return _responsive(media, props.$size, (size2) => {
|
|
1561
1559
|
const avatarSize = avatar.sizes[size2];
|
|
1562
1560
|
return avatarSize ? {
|
|
@@ -1566,7 +1564,7 @@ function responsiveAvatarStackSizeStyle(props) {
|
|
|
1566
1564
|
} : EMPTY_RECORD;
|
|
1567
1565
|
});
|
|
1568
1566
|
}
|
|
1569
|
-
const Root$z =
|
|
1567
|
+
const Root$z = styledComponents.styled.div(responsiveAvatarStackSizeStyle, avatarStackStyle), AvatarStack = react.forwardRef(function(props, ref) {
|
|
1570
1568
|
const {
|
|
1571
1569
|
children: childrenProp,
|
|
1572
1570
|
maxLength: maxLengthProp = 4,
|
|
@@ -1580,7 +1578,7 @@ const Root$z = styled__default.default.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1580
1578
|
len !== 0 && extraCount > 1 && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(AvatarCounter, { count: extraCount, size: size2 }) }),
|
|
1581
1579
|
visibleChildren.map((child, childIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: react.cloneElement(child, { size: size2 }) }, String(childIndex)))
|
|
1582
1580
|
] });
|
|
1583
|
-
}), Root$y =
|
|
1581
|
+
}), Root$y = styledComponents.styled.div(
|
|
1584
1582
|
boxStyle,
|
|
1585
1583
|
flexItemStyle,
|
|
1586
1584
|
responsiveBoxStyle,
|
|
@@ -1655,15 +1653,15 @@ const Root$z = styled__default.default.div(responsiveAvatarStackSizeStyle, avata
|
|
|
1655
1653
|
);
|
|
1656
1654
|
});
|
|
1657
1655
|
function textBaseStyle(props) {
|
|
1658
|
-
const { $accent, $muted } = props, { font } = props.theme
|
|
1659
|
-
return
|
|
1656
|
+
const { $accent, $muted } = props, { font } = theme.getTheme_v2(props.theme);
|
|
1657
|
+
return styledComponents.css`
|
|
1660
1658
|
color: var(--card-fg-color);
|
|
1661
1659
|
|
|
1662
|
-
${$accent &&
|
|
1660
|
+
${$accent && styledComponents.css`
|
|
1663
1661
|
color: var(--card-accent-fg-color);
|
|
1664
1662
|
`}
|
|
1665
1663
|
|
|
1666
|
-
${$muted &&
|
|
1664
|
+
${$muted && styledComponents.css`
|
|
1667
1665
|
color: var(--card-muted-fg-color);
|
|
1668
1666
|
`}
|
|
1669
1667
|
|
|
@@ -1717,11 +1715,11 @@ function textBaseStyle(props) {
|
|
|
1717
1715
|
}
|
|
1718
1716
|
`;
|
|
1719
1717
|
}
|
|
1720
|
-
const Root$x =
|
|
1718
|
+
const Root$x = styledComponents.styled.div(
|
|
1721
1719
|
responsiveTextFont,
|
|
1722
1720
|
responsiveTextAlignStyle,
|
|
1723
1721
|
textBaseStyle
|
|
1724
|
-
), SpanWithTextOverflow$1 =
|
|
1722
|
+
), SpanWithTextOverflow$1 = styledComponents.styled.span`
|
|
1725
1723
|
display: block;
|
|
1726
1724
|
white-space: nowrap;
|
|
1727
1725
|
text-overflow: ellipsis;
|
|
@@ -1767,7 +1765,7 @@ function badgeStyle(props) {
|
|
|
1767
1765
|
}
|
|
1768
1766
|
};
|
|
1769
1767
|
}
|
|
1770
|
-
const Root$w =
|
|
1768
|
+
const Root$w = styledComponents.styled(Box)(
|
|
1771
1769
|
responsiveRadiusStyle,
|
|
1772
1770
|
badgeStyle
|
|
1773
1771
|
), Badge = react.forwardRef(function(props, ref) {
|
|
@@ -1793,7 +1791,7 @@ const Root$w = styled__default.default(Box)(
|
|
|
1793
1791
|
children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children })
|
|
1794
1792
|
}
|
|
1795
1793
|
);
|
|
1796
|
-
}), Root$v =
|
|
1794
|
+
}), Root$v = styledComponents.styled(Box)(
|
|
1797
1795
|
flexItemStyle,
|
|
1798
1796
|
responsiveFlexStyle
|
|
1799
1797
|
), Flex = react.forwardRef(function(props, ref) {
|
|
@@ -1812,7 +1810,7 @@ const Root$w = styled__default.default(Box)(
|
|
|
1812
1810
|
ref
|
|
1813
1811
|
}
|
|
1814
1812
|
);
|
|
1815
|
-
}), rotate$1 =
|
|
1813
|
+
}), rotate$1 = styledComponents.keyframes`
|
|
1816
1814
|
from {
|
|
1817
1815
|
transform: rotate(0deg);
|
|
1818
1816
|
}
|
|
@@ -1820,7 +1818,7 @@ const Root$w = styled__default.default(Box)(
|
|
|
1820
1818
|
to {
|
|
1821
1819
|
transform: rotate(360deg);
|
|
1822
1820
|
}
|
|
1823
|
-
`, Root$u =
|
|
1821
|
+
`, Root$u = styledComponents.styled(Text)`
|
|
1824
1822
|
& > span > svg {
|
|
1825
1823
|
animation: ${rotate$1} 500ms linear infinite;
|
|
1826
1824
|
}
|
|
@@ -1899,8 +1897,8 @@ function _cardColorStyle(base, color, checkered = !1) {
|
|
|
1899
1897
|
};
|
|
1900
1898
|
}
|
|
1901
1899
|
function buttonBaseStyles(props) {
|
|
1902
|
-
const { $width } = props, { style } = props.theme
|
|
1903
|
-
return
|
|
1900
|
+
const { $width } = props, { style } = theme.getTheme_v2(props.theme);
|
|
1901
|
+
return styledComponents.css`
|
|
1904
1902
|
${style == null ? void 0 : style.button};
|
|
1905
1903
|
|
|
1906
1904
|
-webkit-font-smoothing: inherit;
|
|
@@ -1921,7 +1919,7 @@ function buttonBaseStyles(props) {
|
|
|
1921
1919
|
position: relative;
|
|
1922
1920
|
vertical-align: top;
|
|
1923
1921
|
|
|
1924
|
-
${$width === "fill" &&
|
|
1922
|
+
${$width === "fill" && styledComponents.css`
|
|
1925
1923
|
width: -moz-available;
|
|
1926
1924
|
width: -webkit-fill-available;
|
|
1927
1925
|
width: stretch;
|
|
@@ -1945,7 +1943,7 @@ function combineBoxShadow(...boxShadows) {
|
|
|
1945
1943
|
}
|
|
1946
1944
|
function buttonColorStyles(props) {
|
|
1947
1945
|
var _a;
|
|
1948
|
-
const { $mode } = props, { button, color: baseColor, style } = props.theme
|
|
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 = {
|
|
1949
1947
|
width: button.border.width,
|
|
1950
1948
|
color: "var(--card-border-color)"
|
|
1951
1949
|
}, defaultBoxShadow = void 0;
|
|
@@ -1985,7 +1983,7 @@ function buttonColorStyles(props) {
|
|
|
1985
1983
|
(_a = style == null ? void 0 : style.button) == null ? void 0 : _a.root
|
|
1986
1984
|
].filter(Boolean);
|
|
1987
1985
|
}
|
|
1988
|
-
const Root$t =
|
|
1986
|
+
const Root$t = styledComponents.styled.button(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styledComponents.styled.div`
|
|
1989
1987
|
position: absolute;
|
|
1990
1988
|
top: 0;
|
|
1991
1989
|
left: 0;
|
|
@@ -2084,9 +2082,9 @@ function cardStyle(props) {
|
|
|
2084
2082
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
2085
2083
|
}
|
|
2086
2084
|
function cardBaseStyle(props) {
|
|
2087
|
-
const { $checkered } = props, { space } = props.theme
|
|
2088
|
-
return
|
|
2089
|
-
${$checkered &&
|
|
2085
|
+
const { $checkered } = props, { space } = theme.getTheme_v2(props.theme);
|
|
2086
|
+
return styledComponents.css`
|
|
2087
|
+
${$checkered && styledComponents.css`
|
|
2090
2088
|
background-size: ${space[3]}px ${space[3]}px;
|
|
2091
2089
|
background-position: 50% 50%;
|
|
2092
2090
|
background-image: var(--card-bg-image);
|
|
@@ -2118,8 +2116,8 @@ function cardBaseStyle(props) {
|
|
|
2118
2116
|
}
|
|
2119
2117
|
function cardColorStyle(props) {
|
|
2120
2118
|
var _a;
|
|
2121
|
-
const { $checkered, $focusRing } = props, { card, color, style } = props.theme
|
|
2122
|
-
return
|
|
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`
|
|
2123
2121
|
color-scheme: ${color._dark ? "dark" : "light"};
|
|
2124
2122
|
|
|
2125
2123
|
${_cardColorStyle(color, color, $checkered)}
|
|
@@ -2206,7 +2204,7 @@ function cardColorStyle(props) {
|
|
|
2206
2204
|
${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
|
|
2207
2205
|
`;
|
|
2208
2206
|
}
|
|
2209
|
-
const Root$s =
|
|
2207
|
+
const Root$s = styledComponents.styled(Box)(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), Card = react.forwardRef(function(props, ref) {
|
|
2210
2208
|
const {
|
|
2211
2209
|
__unstable_checkered: checkered = !1,
|
|
2212
2210
|
__unstable_focusRing: focusRing = !1,
|
|
@@ -2252,14 +2250,14 @@ const Root$s = styled__default.default(Box)(responsiveBorderStyle, responsiveRad
|
|
|
2252
2250
|
) });
|
|
2253
2251
|
});
|
|
2254
2252
|
function checkboxBaseStyles() {
|
|
2255
|
-
return
|
|
2253
|
+
return styledComponents.css`
|
|
2256
2254
|
position: relative;
|
|
2257
2255
|
display: inline-block;
|
|
2258
2256
|
`;
|
|
2259
2257
|
}
|
|
2260
2258
|
function inputElementStyles(props) {
|
|
2261
|
-
const { color, input, radius } = props.theme
|
|
2262
|
-
return
|
|
2259
|
+
const { color, input, radius } = theme.getTheme_v2(props.theme), { focusRing } = input.checkbox;
|
|
2260
|
+
return styledComponents.css`
|
|
2263
2261
|
position: absolute;
|
|
2264
2262
|
top: 0;
|
|
2265
2263
|
left: 0;
|
|
@@ -2370,7 +2368,7 @@ function inputElementStyles(props) {
|
|
|
2370
2368
|
}
|
|
2371
2369
|
`;
|
|
2372
2370
|
}
|
|
2373
|
-
const Root$r =
|
|
2371
|
+
const Root$r = styledComponents.styled.div(checkboxBaseStyles), Input$5 = styledComponents.styled.input(inputElementStyles), Checkbox = react.forwardRef(function(props, forwardedRef) {
|
|
2374
2372
|
const {
|
|
2375
2373
|
checked,
|
|
2376
2374
|
className,
|
|
@@ -2403,8 +2401,10 @@ const Root$r = styled__default.default.div(checkboxBaseStyles), Input$5 = styled
|
|
|
2403
2401
|
] })
|
|
2404
2402
|
] });
|
|
2405
2403
|
});
|
|
2406
|
-
function codeSyntaxHighlightingStyle({ theme:
|
|
2407
|
-
const
|
|
2404
|
+
function codeSyntaxHighlightingStyle({ theme: theme$1 }) {
|
|
2405
|
+
const {
|
|
2406
|
+
color: { syntax: color }
|
|
2407
|
+
} = theme.getTheme_v2(theme$1);
|
|
2408
2408
|
return {
|
|
2409
2409
|
"&.atrule": { color: color.atrule },
|
|
2410
2410
|
"&.attr-name": { color: color.attrName },
|
|
@@ -2445,7 +2445,7 @@ function codeSyntaxHighlightingStyle({ theme: theme2 }) {
|
|
|
2445
2445
|
};
|
|
2446
2446
|
}
|
|
2447
2447
|
function codeBaseStyle() {
|
|
2448
|
-
return
|
|
2448
|
+
return styledComponents.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 =
|
|
2476
|
+
const Root$q = styledComponents.styled.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 } = props.theme
|
|
2490
|
+
const { container, media } = theme.getTheme_v2(props.theme);
|
|
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 =
|
|
2495
|
+
const Root$p = styledComponents.styled(Box)(
|
|
2496
2496
|
containerBaseStyle,
|
|
2497
2497
|
responsiveContainerWidthStyle
|
|
2498
2498
|
), Container = react.forwardRef(function(props, ref) {
|
|
@@ -2507,7 +2507,7 @@ const Root$p = styled__default.default(Box)(
|
|
|
2507
2507
|
ref
|
|
2508
2508
|
}
|
|
2509
2509
|
);
|
|
2510
|
-
}), Root$o =
|
|
2510
|
+
}), Root$o = styledComponents.styled(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 = styled__default.default(Box)(
|
|
|
2530
2530
|
);
|
|
2531
2531
|
});
|
|
2532
2532
|
function headingBaseStyle(props) {
|
|
2533
|
-
const { $accent, $muted } = props, { font } = props.theme
|
|
2534
|
-
return
|
|
2535
|
-
${$accent &&
|
|
2533
|
+
const { $accent, $muted } = props, { font } = theme.getTheme_v2(props.theme);
|
|
2534
|
+
return styledComponents.css`
|
|
2535
|
+
${$accent && styledComponents.css`
|
|
2536
2536
|
color: var(--card-accent-fg-color);
|
|
2537
2537
|
`}
|
|
2538
2538
|
|
|
2539
|
-
${$muted &&
|
|
2539
|
+
${$muted && styledComponents.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 =
|
|
2586
|
+
const Root$n = styledComponents.styled.div(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), SpanWithTextOverflow = styledComponents.styled.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 } = props.theme
|
|
2632
|
+
const { media, space } = theme.getTheme_v2(props.theme);
|
|
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 =
|
|
2641
|
+
const Root$m = styledComponents.styled(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 = styled__default.default(Box)(inlineBaseStyle, inlineSpaceStyle),
|
|
|
2656
2656
|
);
|
|
2657
2657
|
});
|
|
2658
2658
|
function kbdStyle() {
|
|
2659
|
-
return
|
|
2659
|
+
return styledComponents.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 =
|
|
2675
|
+
const Root$l = styledComponents.styled.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 =
|
|
2737
|
-
({ $w: w }) =>
|
|
2736
|
+
const Root$k = styledComponents.styled.div(
|
|
2737
|
+
({ $w: w }) => styledComponents.css`
|
|
2738
2738
|
position: absolute;
|
|
2739
2739
|
width: ${w}px;
|
|
2740
2740
|
height: ${w}px;
|
|
@@ -2781,9 +2781,9 @@ const Root$k = styled__default.default.div(
|
|
|
2781
2781
|
}
|
|
2782
2782
|
}
|
|
2783
2783
|
`
|
|
2784
|
-
), StrokePath =
|
|
2784
|
+
), StrokePath = styledComponents.styled.path`
|
|
2785
2785
|
stroke: var(--card-shadow-outline-color);
|
|
2786
|
-
`, ShapePath =
|
|
2786
|
+
`, ShapePath = styledComponents.styled.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 =
|
|
3030
|
+
const Root$j = styledComponents.styled.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 =
|
|
3101
|
+
const Root$i = styledComponents.styled.div`
|
|
3102
3102
|
display: block;
|
|
3103
3103
|
width: 0;
|
|
3104
3104
|
height: 0;
|
|
@@ -3108,9 +3108,9 @@ const Root$i = styled__default.default.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 =
|
|
3111
|
+
}), Root$h = styledComponents.styled.div`
|
|
3112
3112
|
position: relative;
|
|
3113
|
-
`, ItemWrapper =
|
|
3113
|
+
`, ItemWrapper = styledComponents.styled.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 =
|
|
3214
|
+
const MotionCard$1 = styledComponents.styled(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
|
|
3488
|
+
return styledComponents.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 } = props.theme
|
|
3502
|
-
return
|
|
3501
|
+
const { color, input } = theme.getTheme_v2(props.theme), dist = (input.radio.size - input.radio.markSize) / 2;
|
|
3502
|
+
return styledComponents.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 =
|
|
3595
|
+
const Root$g = styledComponents.styled.div(radioBaseStyle), Input$4 = styledComponents.styled.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 = styled__default.default.div(radioBaseStyle), Input$4 = styled__de
|
|
|
3611
3611
|
] });
|
|
3612
3612
|
});
|
|
3613
3613
|
function rootStyle() {
|
|
3614
|
-
return
|
|
3614
|
+
return styledComponents.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 } = props.theme
|
|
3627
|
-
return
|
|
3626
|
+
const { font } = theme.getTheme_v2(props.theme);
|
|
3627
|
+
return styledComponents.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 } = props.theme
|
|
3644
|
-
return
|
|
3643
|
+
const { color, input } = theme.getTheme_v2(props.theme);
|
|
3644
|
+
return styledComponents.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 } = props.theme
|
|
3698
|
+
const { $fontSize } = props, { font, media } = theme.getTheme_v2(props.theme);
|
|
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 } = props.theme
|
|
3716
|
-
return
|
|
3715
|
+
const { color } = theme.getTheme_v2(props.theme);
|
|
3716
|
+
return styledComponents.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 =
|
|
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) {
|
|
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 } = props.theme
|
|
3791
|
+
const { media, space } = theme.getTheme_v2(props.theme);
|
|
3792
3792
|
return _responsive(media, props.$space, (spaceIndex) => ({
|
|
3793
3793
|
gridGap: rem(space[spaceIndex])
|
|
3794
3794
|
}));
|
|
3795
3795
|
}
|
|
3796
|
-
const Root$e =
|
|
3796
|
+
const Root$e = styledComponents.styled(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 = styled__default.default(Box)(stackBaseStyle, responsiveStackSpace
|
|
|
3808
3808
|
);
|
|
3809
3809
|
});
|
|
3810
3810
|
function switchBaseStyles() {
|
|
3811
|
-
return
|
|
3811
|
+
return styledComponents.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
|
|
3819
|
+
return styledComponents.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 } = props.theme
|
|
3838
|
-
return
|
|
3837
|
+
const { color, input } = theme.getTheme_v2(props.theme);
|
|
3838
|
+
return styledComponents.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 } = props.theme
|
|
3911
|
-
return
|
|
3910
|
+
const { input } = theme.getTheme_v2(props.theme);
|
|
3911
|
+
return styledComponents.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 } = props.theme
|
|
3926
|
-
return
|
|
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`
|
|
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 &&
|
|
3943
|
+
${checked && styledComponents.css`
|
|
3944
3944
|
transform: translate3d(${checkedOffset}px, 0, 0);
|
|
3945
3945
|
`}
|
|
3946
3946
|
|
|
3947
|
-
${$indeterminate &&
|
|
3947
|
+
${$indeterminate && styledComponents.css`
|
|
3948
3948
|
transform: translate3d(${indeterminateOffset}px, 0, 0);
|
|
3949
3949
|
`}
|
|
3950
3950
|
`;
|
|
3951
3951
|
}
|
|
3952
|
-
const Root$d =
|
|
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) {
|
|
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 = styled__default.default.span(switchBaseStyles), Input$2 = styled_
|
|
|
3970
3970
|
/* @__PURE__ */ jsxRuntime.jsx(Thumb, { $checked: checked, $indeterminate: indeterminate })
|
|
3971
3971
|
] })
|
|
3972
3972
|
] });
|
|
3973
|
-
}), Root$c =
|
|
3973
|
+
}), Root$c = styledComponents.styled.span(textInputRootStyle), InputRoot$1 = styledComponents.styled.span`
|
|
3974
3974
|
flex: 1;
|
|
3975
3975
|
min-width: 0;
|
|
3976
3976
|
display: block;
|
|
3977
3977
|
position: relative;
|
|
3978
|
-
`, Input$1 =
|
|
3978
|
+
`, Input$1 = styledComponents.styled.textarea(
|
|
3979
3979
|
responsiveInputPaddingStyle,
|
|
3980
3980
|
textInputBaseStyle,
|
|
3981
3981
|
textInputFontSizeStyle
|
|
3982
|
-
), Presentation$1 =
|
|
3982
|
+
), Presentation$1 = styledComponents.styled.div(
|
|
3983
3983
|
responsiveRadiusStyle,
|
|
3984
3984
|
textInputRepresentationStyle
|
|
3985
3985
|
), TextArea = react.forwardRef(function(props, forwardedRef) {
|
|
@@ -4023,12 +4023,12 @@ const Root$d = styled__default.default.span(switchBaseStyles), Input$2 = styled_
|
|
|
4023
4023
|
}
|
|
4024
4024
|
)
|
|
4025
4025
|
] }) });
|
|
4026
|
-
}), CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Root$b =
|
|
4026
|
+
}), CLEAR_BUTTON_BOX_STYLE = { zIndex: 2 }, Root$b = styledComponents.styled(Card).attrs({ forwardedAs: "span" })(textInputRootStyle), InputRoot = styledComponents.styled.span`
|
|
4027
4027
|
flex: 1;
|
|
4028
4028
|
min-width: 0;
|
|
4029
4029
|
display: block;
|
|
4030
4030
|
position: relative;
|
|
4031
|
-
`, Prefix =
|
|
4031
|
+
`, Prefix = styledComponents.styled(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 = styled__default.default.span(switchBaseStyles), Input$2 = styled_
|
|
|
4036
4036
|
display: block;
|
|
4037
4037
|
margin: -1px;
|
|
4038
4038
|
}
|
|
4039
|
-
`, Suffix =
|
|
4039
|
+
`, Suffix = styledComponents.styled(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 = styled__default.default.span(switchBaseStyles), Input$2 = styled_
|
|
|
4044
4044
|
display: block;
|
|
4045
4045
|
margin: -1px;
|
|
4046
4046
|
}
|
|
4047
|
-
`, Input =
|
|
4047
|
+
`, Input = styledComponents.styled.input(
|
|
4048
4048
|
responsiveInputPaddingStyle,
|
|
4049
4049
|
textInputBaseStyle,
|
|
4050
4050
|
textInputFontSizeStyle
|
|
4051
|
-
), Presentation =
|
|
4051
|
+
), Presentation = styledComponents.styled.span(
|
|
4052
4052
|
responsiveRadiusStyle,
|
|
4053
4053
|
textInputRepresentationStyle
|
|
4054
|
-
), LeftBox =
|
|
4054
|
+
), LeftBox = styledComponents.styled(Box)`
|
|
4055
4055
|
position: absolute;
|
|
4056
4056
|
top: 0;
|
|
4057
4057
|
left: 0;
|
|
4058
|
-
`, RightBox =
|
|
4058
|
+
`, RightBox = styledComponents.styled(Box)`
|
|
4059
4059
|
position: absolute;
|
|
4060
4060
|
top: 0;
|
|
4061
4061
|
right: 0;
|
|
4062
|
-
`, RightCard =
|
|
4062
|
+
`, RightCard = styledComponents.styled(Card)`
|
|
4063
4063
|
background-color: transparent;
|
|
4064
4064
|
position: absolute;
|
|
4065
4065
|
top: 0;
|
|
4066
4066
|
right: 0;
|
|
4067
|
-
`, TextInputClearButton =
|
|
4067
|
+
`, TextInputClearButton = styledComponents.styled(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 =
|
|
4247
|
+
}, MotionCard = styledComponents.styled(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 =
|
|
4339
|
+
const Root$a = styledComponents.styled(Layer)`
|
|
4340
4340
|
pointer-events: none;
|
|
4341
4341
|
max-width: ${({ $maxWidth }) => $maxWidth}px;
|
|
4342
4342
|
`, Tooltip = react.forwardRef(function(props, ref) {
|
|
@@ -4358,13 +4358,18 @@ const Root$a = styled__default.default(Layer)`
|
|
|
4358
4358
|
zOffset = layer.tooltip.zOffset,
|
|
4359
4359
|
delay,
|
|
4360
4360
|
...restProps
|
|
4361
|
-
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), forwardedRef = useForwardedRef(ref), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", portal = usePortal(), portalElement = typeof portalProp == "string" ? ((_c = portal.elements) == null ? void 0 : _c[portalProp]) || null : portal.element,
|
|
4361
|
+
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), forwardedRef = useForwardedRef(ref), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", portal = usePortal(), portalElement = typeof portalProp == "string" ? ((_c = portal.elements) == null ? void 0 : _c[portalProp]) || null : portal.element, documentBodyOffsetWidth = react.useSyncExternalStore(
|
|
4362
|
+
emptySubscribe,
|
|
4363
|
+
() => document.body.offsetWidth,
|
|
4364
|
+
// We don't actually know what the width of the body is during SSR, so we'll just assume it's 800px or larger
|
|
4365
|
+
() => 800
|
|
4366
|
+
), tooltipWidth = react.useMemo(() => {
|
|
4362
4367
|
const availableWidths = [
|
|
4363
4368
|
...boundaryElement ? [boundaryElement.offsetWidth] : [],
|
|
4364
|
-
(portalElement == null ? void 0 : portalElement.offsetWidth) ||
|
|
4369
|
+
(portalElement == null ? void 0 : portalElement.offsetWidth) || documentBodyOffsetWidth
|
|
4365
4370
|
];
|
|
4366
4371
|
return Math.min(...availableWidths) - DEFAULT_TOOLTIP_PADDING * 2;
|
|
4367
|
-
}, [boundaryElement, portalElement == null ? void 0 : portalElement.offsetWidth]), middleware = react.useMemo(() => {
|
|
4372
|
+
}, [boundaryElement, documentBodyOffsetWidth, portalElement == null ? void 0 : portalElement.offsetWidth]), middleware = react.useMemo(() => {
|
|
4368
4373
|
const ret = [];
|
|
4369
4374
|
return ret.push(
|
|
4370
4375
|
reactDom$1.flip({
|
|
@@ -4544,15 +4549,16 @@ const Root$a = styled__default.default(Layer)`
|
|
|
4544
4549
|
),
|
|
4545
4550
|
child
|
|
4546
4551
|
] });
|
|
4547
|
-
}),
|
|
4552
|
+
}), emptySubscribe = () => () => {
|
|
4553
|
+
}, Root$9 = styledComponents.styled.div`
|
|
4548
4554
|
line-height: 0;
|
|
4549
|
-
`, ListBox =
|
|
4555
|
+
`, ListBox = styledComponents.styled(Box)`
|
|
4550
4556
|
& > ul {
|
|
4551
4557
|
list-style: none;
|
|
4552
4558
|
padding: 0;
|
|
4553
4559
|
margin: 0;
|
|
4554
4560
|
}
|
|
4555
|
-
`, rotate =
|
|
4561
|
+
`, rotate = styledComponents.keyframes`
|
|
4556
4562
|
from {
|
|
4557
4563
|
transform: rotate(0deg);
|
|
4558
4564
|
}
|
|
@@ -4560,7 +4566,7 @@ const Root$a = styled__default.default(Layer)`
|
|
|
4560
4566
|
to {
|
|
4561
4567
|
transform: rotate(360deg);
|
|
4562
4568
|
}
|
|
4563
|
-
`, AnimatedSpinnerIcon =
|
|
4569
|
+
`, AnimatedSpinnerIcon = styledComponents.styled(icons.SpinnerIcon)`
|
|
4564
4570
|
animation: ${rotate} 500ms linear infinite;
|
|
4565
4571
|
`;
|
|
4566
4572
|
function AutocompleteOption(props) {
|
|
@@ -4943,7 +4949,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
4943
4949
|
]
|
|
4944
4950
|
}
|
|
4945
4951
|
);
|
|
4946
|
-
}), Autocomplete = InnerAutocomplete, Root$8 =
|
|
4952
|
+
}), Autocomplete = InnerAutocomplete, Root$8 = styledComponents.styled.ol`
|
|
4947
4953
|
margin: 0;
|
|
4948
4954
|
padding: 0;
|
|
4949
4955
|
display: flex;
|
|
@@ -4951,7 +4957,7 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
4951
4957
|
align-items: center;
|
|
4952
4958
|
white-space: nowrap;
|
|
4953
4959
|
line-height: 0;
|
|
4954
|
-
`, ExpandButton =
|
|
4960
|
+
`, ExpandButton = styledComponents.styled(Button)`
|
|
4955
4961
|
appearance: none;
|
|
4956
4962
|
margin: -4px;
|
|
4957
4963
|
`, Breadcrumbs = react.forwardRef(function(props, ref) {
|
|
@@ -5000,8 +5006,8 @@ const AUTOCOMPLETE_LISTBOX_IGNORE_KEYS = [
|
|
|
5000
5006
|
/* @__PURE__ */ jsxRuntime.jsx(Box, { as: "li", children: item })
|
|
5001
5007
|
] }, itemIndex)) });
|
|
5002
5008
|
});
|
|
5003
|
-
function dialogStyle({ theme:
|
|
5004
|
-
const { color } =
|
|
5009
|
+
function dialogStyle({ theme: theme$1 }) {
|
|
5010
|
+
const { color } = theme.getTheme_v2(theme$1);
|
|
5005
5011
|
return {
|
|
5006
5012
|
"&:not([hidden])": {
|
|
5007
5013
|
display: "flex"
|
|
@@ -5017,11 +5023,11 @@ function dialogStyle({ theme: theme2 }) {
|
|
|
5017
5023
|
};
|
|
5018
5024
|
}
|
|
5019
5025
|
function responsiveDialogPositionStyle(props) {
|
|
5020
|
-
const { media } = props.theme
|
|
5026
|
+
const { media } = theme.getTheme_v2(props.theme);
|
|
5021
5027
|
return _responsive(media, props.$position, (position) => ({ "&&": { position } }));
|
|
5022
5028
|
}
|
|
5023
5029
|
function animationDialogStyle(props) {
|
|
5024
|
-
return props.$animate ?
|
|
5030
|
+
return props.$animate ? styledComponents.css`
|
|
5025
5031
|
@keyframes zoomIn {
|
|
5026
5032
|
from {
|
|
5027
5033
|
opacity: 0;
|
|
@@ -5046,7 +5052,7 @@ function animationDialogStyle(props) {
|
|
|
5046
5052
|
& > [data-ui='DialogCard'] {
|
|
5047
5053
|
animation: zoomIn 200ms ease-out;
|
|
5048
5054
|
}
|
|
5049
|
-
` :
|
|
5055
|
+
` : styledComponents.css``;
|
|
5050
5056
|
}
|
|
5051
5057
|
const key$3 = Symbol.for("@sanity/ui/context/dialog");
|
|
5052
5058
|
globalScope[key$3] = globalScope[key$3] || react.createContext({ version: 0 });
|
|
@@ -5057,7 +5063,7 @@ function useDialog() {
|
|
|
5057
5063
|
function isTargetWithinScope(boundaryElement, portalElement, target) {
|
|
5058
5064
|
return !boundaryElement || !portalElement ? !0 : containsOrEqualsElement(boundaryElement, target) || containsOrEqualsElement(portalElement, target);
|
|
5059
5065
|
}
|
|
5060
|
-
const Root$7 =
|
|
5066
|
+
const Root$7 = styledComponents.styled(Layer)(responsivePaddingStyle, dialogStyle, responsiveDialogPositionStyle, animationDialogStyle), DialogContainer = styledComponents.styled(Container)`
|
|
5061
5067
|
&:not([hidden]) {
|
|
5062
5068
|
display: flex;
|
|
5063
5069
|
}
|
|
@@ -5066,7 +5072,7 @@ const Root$7 = styled__default.default(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5066
5072
|
flex-direction: column;
|
|
5067
5073
|
align-items: center;
|
|
5068
5074
|
justify-content: center;
|
|
5069
|
-
`, DialogCardRoot =
|
|
5075
|
+
`, DialogCardRoot = styledComponents.styled(Card)`
|
|
5070
5076
|
&:not([hidden]) {
|
|
5071
5077
|
display: flex;
|
|
5072
5078
|
}
|
|
@@ -5075,19 +5081,19 @@ const Root$7 = styled__default.default(Layer)(responsivePaddingStyle, dialogStyl
|
|
|
5075
5081
|
max-height: 100%;
|
|
5076
5082
|
overflow: hidden;
|
|
5077
5083
|
overflow: clip;
|
|
5078
|
-
`, DialogLayout =
|
|
5084
|
+
`, DialogLayout = styledComponents.styled(Flex)`
|
|
5079
5085
|
flex: 1;
|
|
5080
5086
|
min-height: 0;
|
|
5081
5087
|
width: 100%;
|
|
5082
|
-
`, DialogHeader =
|
|
5088
|
+
`, DialogHeader = styledComponents.styled(Box)`
|
|
5083
5089
|
position: relative;
|
|
5084
5090
|
z-index: 2;
|
|
5085
|
-
`, DialogContent =
|
|
5091
|
+
`, DialogContent = styledComponents.styled(Box)`
|
|
5086
5092
|
position: relative;
|
|
5087
5093
|
z-index: 1;
|
|
5088
5094
|
overflow: auto;
|
|
5089
5095
|
outline: none;
|
|
5090
|
-
`, DialogFooter =
|
|
5096
|
+
`, DialogFooter = styledComponents.styled(Box)`
|
|
5091
5097
|
position: relative;
|
|
5092
5098
|
z-index: 3;
|
|
5093
5099
|
`, DialogCard = react.forwardRef(function(props, ref) {
|
|
@@ -5269,14 +5275,14 @@ function DialogProvider(props) {
|
|
|
5269
5275
|
);
|
|
5270
5276
|
return /* @__PURE__ */ jsxRuntime.jsx(DialogContext.Provider, { value: contextValue, children });
|
|
5271
5277
|
}
|
|
5272
|
-
const Root$6 =
|
|
5278
|
+
const Root$6 = styledComponents.styled.kbd`
|
|
5273
5279
|
font: inherit;
|
|
5274
5280
|
padding: 1px;
|
|
5275
5281
|
|
|
5276
5282
|
&:not([hidden]) {
|
|
5277
5283
|
display: block;
|
|
5278
5284
|
}
|
|
5279
|
-
`, Key =
|
|
5285
|
+
`, Key = styledComponents.styled(KBD)`
|
|
5280
5286
|
&:not([hidden]) {
|
|
5281
5287
|
display: block;
|
|
5282
5288
|
}
|
|
@@ -5441,7 +5447,7 @@ function useMenuController(props) {
|
|
|
5441
5447
|
setRootElement
|
|
5442
5448
|
};
|
|
5443
5449
|
}
|
|
5444
|
-
const Root$5 =
|
|
5450
|
+
const Root$5 = styledComponents.styled(Box)`
|
|
5445
5451
|
outline: none;
|
|
5446
5452
|
overflow: auto;
|
|
5447
5453
|
`, Menu = react.forwardRef(function(props, ref) {
|
|
@@ -5665,14 +5671,14 @@ const Root$5 = styled__default.default(Box)`
|
|
|
5665
5671
|
]
|
|
5666
5672
|
);
|
|
5667
5673
|
return /* @__PURE__ */ jsxRuntime.jsx(Popover, { "data-ui": "MenuButton__popover", ...popoverProps, content: menu, open, children: button || /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}) });
|
|
5668
|
-
}), MenuDivider =
|
|
5674
|
+
}), MenuDivider = styledComponents.styled.hr`
|
|
5669
5675
|
height: 1px;
|
|
5670
5676
|
border: 0;
|
|
5671
5677
|
background: var(--card-hairline-soft-color);
|
|
5672
5678
|
margin: 0;
|
|
5673
5679
|
`;
|
|
5674
5680
|
function selectableBaseStyle() {
|
|
5675
|
-
return
|
|
5681
|
+
return styledComponents.css`
|
|
5676
5682
|
background-color: inherit;
|
|
5677
5683
|
color: inherit;
|
|
5678
5684
|
|
|
@@ -5696,8 +5702,8 @@ function selectableBaseStyle() {
|
|
|
5696
5702
|
}
|
|
5697
5703
|
function selectableColorStyle(props) {
|
|
5698
5704
|
var _a;
|
|
5699
|
-
const { $tone } = props, { color, style } = props.theme
|
|
5700
|
-
return
|
|
5705
|
+
const { $tone } = props, { color, style } = theme.getTheme_v2(props.theme), tone = color.selectable[$tone];
|
|
5706
|
+
return styledComponents.css`
|
|
5701
5707
|
${_cardColorStyle(color, tone.enabled)}
|
|
5702
5708
|
|
|
5703
5709
|
background-color: var(--card-bg-color);
|
|
@@ -5767,7 +5773,7 @@ function selectableColorStyle(props) {
|
|
|
5767
5773
|
${(_a = style == null ? void 0 : style.card) == null ? void 0 : _a.root}
|
|
5768
5774
|
`;
|
|
5769
5775
|
}
|
|
5770
|
-
const Selectable =
|
|
5776
|
+
const Selectable = styledComponents.styled(Box)(
|
|
5771
5777
|
responsiveRadiusStyle,
|
|
5772
5778
|
selectableBaseStyle,
|
|
5773
5779
|
selectableColorStyle
|
|
@@ -5980,14 +5986,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
5980
5986
|
]
|
|
5981
5987
|
}
|
|
5982
5988
|
);
|
|
5983
|
-
}), keyframe =
|
|
5989
|
+
}), keyframe = styledComponents.keyframes`
|
|
5984
5990
|
0% {
|
|
5985
5991
|
background-position: 100%;
|
|
5986
5992
|
}
|
|
5987
5993
|
100% {
|
|
5988
5994
|
background-position: -100%;
|
|
5989
5995
|
}
|
|
5990
|
-
`, animation =
|
|
5996
|
+
`, animation = styledComponents.css`
|
|
5991
5997
|
background-image: linear-gradient(
|
|
5992
5998
|
to right,
|
|
5993
5999
|
var(--card-skeleton-color-from),
|
|
@@ -6003,12 +6009,12 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6003
6009
|
animation-timing-function: ease-in-out;
|
|
6004
6010
|
animation-iteration-count: infinite;
|
|
6005
6011
|
animation-duration: 2000ms;
|
|
6006
|
-
`, skeletonStyle =
|
|
6012
|
+
`, skeletonStyle = styledComponents.css`
|
|
6007
6013
|
opacity: ${({ $visible }) => $visible ? 1 : 0};
|
|
6008
6014
|
transition: opacity 200ms ease-in;
|
|
6009
6015
|
|
|
6010
6016
|
@media screen and (prefers-reduced-motion: no-preference) {
|
|
6011
|
-
${({ $animated }) => $animated ? animation :
|
|
6017
|
+
${({ $animated }) => $animated ? animation : styledComponents.css`
|
|
6012
6018
|
background-color: var(--card-skeleton-color-from);
|
|
6013
6019
|
`}
|
|
6014
6020
|
}
|
|
@@ -6016,7 +6022,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6016
6022
|
@media screen and (prefers-reduced-motion: reduce) {
|
|
6017
6023
|
background-color: var(--card-skeleton-color-from);
|
|
6018
6024
|
}
|
|
6019
|
-
`, Root$4 =
|
|
6025
|
+
`, Root$4 = styledComponents.styled(Box)(
|
|
6020
6026
|
responsiveRadiusStyle,
|
|
6021
6027
|
skeletonStyle
|
|
6022
6028
|
), Skeleton = react.forwardRef(function(props, ref) {
|
|
@@ -6040,8 +6046,8 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6040
6046
|
ref
|
|
6041
6047
|
}
|
|
6042
6048
|
);
|
|
6043
|
-
}), Root$3 =
|
|
6044
|
-
const { $size, $style } = props, { font, media } = props.theme
|
|
6049
|
+
}), Root$3 = styledComponents.styled(Skeleton)((props) => {
|
|
6050
|
+
const { $size, $style } = props, { font, media } = theme.getTheme_v2(props.theme), fontStyle = font[$style];
|
|
6045
6051
|
return _responsive(media, $size, (sizeIndex) => {
|
|
6046
6052
|
const fontSize2 = fontStyle.sizes[sizeIndex];
|
|
6047
6053
|
return { height: fontSize2.lineHeight - fontSize2.ascenderHeight - fontSize2.descenderHeight };
|
|
@@ -6058,7 +6064,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6058
6064
|
}), CodeSkeleton = react.forwardRef(function(props, ref) {
|
|
6059
6065
|
const { size: size2 = 2, ...restProps } = props, $size = useArrayProp(size2);
|
|
6060
6066
|
return /* @__PURE__ */ jsxRuntime.jsx(Root$3, { ...restProps, $size, ref, $style: "code" });
|
|
6061
|
-
}), CustomButton =
|
|
6067
|
+
}), CustomButton = styledComponents.styled(Button)`
|
|
6062
6068
|
max-width: 100%;
|
|
6063
6069
|
`, Tab = react.forwardRef(function(props, forwardedRef) {
|
|
6064
6070
|
const {
|
|
@@ -6110,7 +6116,7 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
6110
6116
|
function _isReactElement(node) {
|
|
6111
6117
|
return !!node;
|
|
6112
6118
|
}
|
|
6113
|
-
const CustomInline =
|
|
6119
|
+
const CustomInline = styledComponents.styled(Inline)`
|
|
6114
6120
|
& > div {
|
|
6115
6121
|
display: inline-block;
|
|
6116
6122
|
vertical-align: middle;
|
|
@@ -6172,13 +6178,13 @@ const CustomInline = styled__default.default(Inline)`
|
|
|
6172
6178
|
warning: "alert",
|
|
6173
6179
|
success: "alert",
|
|
6174
6180
|
info: "alert"
|
|
6175
|
-
}, Root$2 =
|
|
6181
|
+
}, Root$2 = styledComponents.styled(Card)`
|
|
6176
6182
|
pointer-events: all;
|
|
6177
6183
|
& > * {
|
|
6178
6184
|
opacity: var(${POPOVER_MOTION_CONTENT_OPACITY_PROPERTY}, 1);
|
|
6179
6185
|
will-change: opacity;
|
|
6180
6186
|
}
|
|
6181
|
-
`, TextBox =
|
|
6187
|
+
`, TextBox = styledComponents.styled(Flex)`
|
|
6182
6188
|
overflow-x: auto;
|
|
6183
6189
|
`;
|
|
6184
6190
|
function Toast(props) {
|
|
@@ -6224,14 +6230,14 @@ function useMounted() {
|
|
|
6224
6230
|
const subscribe = () => () => {
|
|
6225
6231
|
}, key$1 = Symbol.for("@sanity/ui/context/toast");
|
|
6226
6232
|
globalScope[key$1] = globalScope[key$1] || react.createContext(null);
|
|
6227
|
-
const ToastContext = globalScope[key$1], Root$1 =
|
|
6233
|
+
const ToastContext = globalScope[key$1], Root$1 = styledComponents.styled(Layer)`
|
|
6228
6234
|
position: fixed;
|
|
6229
6235
|
top: 0;
|
|
6230
6236
|
left: 0;
|
|
6231
6237
|
right: 0;
|
|
6232
6238
|
bottom: 0;
|
|
6233
6239
|
pointer-events: none;
|
|
6234
|
-
`, ToastContainer =
|
|
6240
|
+
`, ToastContainer = styledComponents.styled.div`
|
|
6235
6241
|
box-sizing: border-box;
|
|
6236
6242
|
position: absolute;
|
|
6237
6243
|
right: 0;
|
|
@@ -6508,7 +6514,7 @@ const TreeContext = globalScope[key], Tree = react.memo(
|
|
|
6508
6514
|
);
|
|
6509
6515
|
Tree.displayName = "Tree";
|
|
6510
6516
|
function treeItemRootStyle() {
|
|
6511
|
-
return
|
|
6517
|
+
return styledComponents.css`
|
|
6512
6518
|
&[role='none'] > [role='treeitem'] {
|
|
6513
6519
|
outline: none;
|
|
6514
6520
|
cursor: default;
|
|
@@ -6540,8 +6546,8 @@ function treeItemRootStyle() {
|
|
|
6540
6546
|
`;
|
|
6541
6547
|
}
|
|
6542
6548
|
function treeItemRootColorStyle(props) {
|
|
6543
|
-
const $tone = "default", { color } = props.theme
|
|
6544
|
-
return
|
|
6549
|
+
const $tone = "default", { color } = theme.getTheme_v2(props.theme), tone = color.selectable[$tone];
|
|
6550
|
+
return styledComponents.css`
|
|
6545
6551
|
&[role='none'] {
|
|
6546
6552
|
& > [role='treeitem'] {
|
|
6547
6553
|
${_cardColorStyle(color, tone.enabled)}
|
|
@@ -6584,8 +6590,8 @@ function treeItemRootColorStyle(props) {
|
|
|
6584
6590
|
`;
|
|
6585
6591
|
}
|
|
6586
6592
|
function treeItemBoxStyle(props) {
|
|
6587
|
-
const { $level } = props, { space } = props.theme
|
|
6588
|
-
return
|
|
6593
|
+
const { $level } = props, { space } = theme.getTheme_v2(props.theme);
|
|
6594
|
+
return styledComponents.css`
|
|
6589
6595
|
padding-left: ${rem(space[2] * $level)};
|
|
6590
6596
|
|
|
6591
6597
|
&[data-as='a'] {
|
|
@@ -6614,7 +6620,7 @@ const TreeGroup = react.memo(function(props) {
|
|
|
6614
6620
|
children
|
|
6615
6621
|
}
|
|
6616
6622
|
);
|
|
6617
|
-
}), Root = react.memo(
|
|
6623
|
+
}), Root = react.memo(styledComponents.styled.li(treeItemRootStyle, treeItemRootColorStyle)), TreeItemBox = styledComponents.styled(Box).attrs({ forwardedAs: "a" })(treeItemBoxStyle), ToggleArrowText = styledComponents.styled(Text)`
|
|
6618
6624
|
& > svg {
|
|
6619
6625
|
transition: transform 100ms;
|
|
6620
6626
|
}
|