@sanity/ui 3.2.0 → 3.3.0
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/_chunks-cjs/_visual-editing.js +54 -43
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +54 -43
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +129 -75
- package/dist/_visual-editing.d.ts +129 -75
- package/dist/index.d.mts +222 -139
- package/dist/index.d.ts +222 -139
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/theme.d.mts +10 -4
- package/dist/theme.d.ts +10 -4
- package/package.json +1 -1
- package/src/core/components/autocomplete/autocomplete.tsx +1 -1
- package/src/core/components/autocomplete/types.ts +2 -2
- package/src/core/components/menu/__workshop__/asComponent.tsx +1 -1
- package/src/core/components/menu/menuDivider.ts +16 -5
- package/src/core/components/menu/menuGroup.spacing.test.tsx +1 -7
- package/src/core/components/menu/menuGroup.tsx +14 -6
- package/src/core/components/menu/menuItem.tsx +17 -6
- package/src/core/components/skeleton/skeleton.tsx +2 -2
- package/src/core/components/tab/tabList.tsx +2 -2
- package/src/core/components/tab/tabPanel.tsx +2 -2
- package/src/core/components/toast/styles.ts +2 -2
- package/src/core/components/tree/__workshop__/basic.perf.ts +1 -1
- package/src/core/components/tree/__workshop__/tabFromElement.tsx +1 -1
- package/src/core/components/tree/tree.tsx +9 -6
- package/src/core/components/tree/treeGroup.tsx +1 -1
- package/src/core/components/tree/treeItem.tsx +3 -2
- package/src/core/primitives/avatar/avatar.tsx +19 -11
- package/src/core/primitives/badge/badge.tsx +20 -12
- package/src/core/primitives/box/__workshop__/asComponent.tsx +31 -0
- package/src/core/primitives/box/__workshop__/index.ts +5 -0
- package/src/core/primitives/box/box.test.tsx +12 -4
- package/src/core/primitives/box/box.tsx +23 -12
- package/src/core/primitives/button/__workshop__/disabled.tsx +2 -2
- package/src/core/primitives/button/__workshop__/sanityUploadButton.tsx +1 -1
- package/src/core/primitives/button/__workshop__/uploadButton.tsx +1 -1
- package/src/core/primitives/button/button.test.tsx +3 -3
- package/src/core/primitives/button/button.tsx +28 -9
- package/src/core/primitives/card/__workshop__/asComponent.tsx +1 -1
- package/src/core/primitives/card/card.tsx +24 -13
- package/src/core/primitives/code/code.tsx +16 -7
- package/src/core/primitives/container/container.tsx +23 -10
- package/src/core/primitives/flex/flex.tsx +21 -11
- package/src/core/primitives/grid/grid.test.tsx +3 -1
- package/src/core/primitives/grid/grid.tsx +22 -9
- package/src/core/primitives/heading/heading.tsx +19 -11
- package/src/core/primitives/inline/inline.tsx +19 -9
- package/src/core/primitives/kbd/kbd.tsx +19 -11
- package/src/core/primitives/label/label.tsx +19 -11
- package/src/core/primitives/popover/__workshop__/SidePanelStory.tsx +1 -1
- package/src/core/primitives/stack/stack.tsx +20 -11
- package/src/core/primitives/text/text.tsx +19 -11
- package/src/core/primitives/textInput/textInput.tsx +2 -2
- package/src/core/types/component.ts +32 -0
- package/src/core/types/index.ts +1 -0
- package/src/core/utils/virtualList/virtualList.tsx +2 -2
- package/src/theme/system/css.ts +10 -4
|
@@ -981,7 +981,7 @@ function labelBaseStyle(props) {
|
|
|
981
981
|
const StyledLabel = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
982
982
|
displayName: "StyledLabel",
|
|
983
983
|
componentId: "sc-1luap7z-0"
|
|
984
|
-
})(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle),
|
|
984
|
+
})(responsiveLabelFont, responsiveTextAlignStyle, labelBaseStyle), LabelComponent = react.forwardRef(function(props, ref) {
|
|
985
985
|
const $ = reactCompilerRuntime.c(26);
|
|
986
986
|
let accent, align, childrenProp, restProps, t0, t1, textOverflow, weight;
|
|
987
987
|
$[0] !== props ? ({
|
|
@@ -1010,8 +1010,8 @@ const StyledLabel = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
1010
1010
|
let t4;
|
|
1011
1011
|
return $[17] !== accent || $[18] !== children || $[19] !== muted || $[20] !== ref || $[21] !== restProps || $[22] !== t2 || $[23] !== t3 || $[24] !== weight ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(StyledLabel, { "data-ui": "Label", ...restProps, $accent: accent, $align: t2, $muted: muted, $size: t3, $weight: weight, ref, children }), $[17] = accent, $[18] = children, $[19] = muted, $[20] = ref, $[21] = restProps, $[22] = t2, $[23] = t3, $[24] = weight, $[25] = t4) : t4 = $[25], t4;
|
|
1012
1012
|
});
|
|
1013
|
-
|
|
1014
|
-
const avatarStyle = {
|
|
1013
|
+
LabelComponent.displayName = "ForwardRef(Label)";
|
|
1014
|
+
const Label = LabelComponent, avatarStyle = {
|
|
1015
1015
|
root: avatarRootStyle,
|
|
1016
1016
|
arrow: avatarArrowStyle,
|
|
1017
1017
|
bgStroke: avatarBgStrokeStyle,
|
|
@@ -1177,7 +1177,7 @@ const StyledAvatar = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
1177
1177
|
}), AvatarImage = /* @__PURE__ */ styledComponents.styled.svg.withConfig({
|
|
1178
1178
|
displayName: "AvatarImage",
|
|
1179
1179
|
componentId: "sc-1rj7kl0-6"
|
|
1180
|
-
})(avatarStyle.image),
|
|
1180
|
+
})(avatarStyle.image), AvatarComponent = react.forwardRef(function(props, ref) {
|
|
1181
1181
|
const $ = reactCompilerRuntime.c(46);
|
|
1182
1182
|
let __unstable_hideInnerStroke, animateArrowFrom, arrowPositionProp, asProp, initials, onImageLoadError, restProps, src, t0, t1, t2, title;
|
|
1183
1183
|
$[0] !== props ? ({
|
|
@@ -1230,7 +1230,8 @@ const StyledAvatar = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
1230
1230
|
t12
|
|
1231
1231
|
] }), $[32] = T0, $[33] = arrowPosition, $[34] = as, $[35] = color, $[36] = ref, $[37] = restProps, $[38] = size2, $[39] = status, $[40] = t10, $[41] = t11, $[42] = t12, $[43] = t8, $[44] = title, $[45] = t13) : t13 = $[45], t13;
|
|
1232
1232
|
});
|
|
1233
|
-
|
|
1233
|
+
AvatarComponent.displayName = "ForwardRef(Avatar)";
|
|
1234
|
+
const Avatar = AvatarComponent;
|
|
1234
1235
|
function _temp$a(s) {
|
|
1235
1236
|
return s === 1 ? 1 : s === 2 ? 3 : s === 3 ? 5 : 0;
|
|
1236
1237
|
}
|
|
@@ -1358,7 +1359,7 @@ AvatarStack.displayName = "ForwardRef(AvatarStack)";
|
|
|
1358
1359
|
const StyledBox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
1359
1360
|
displayName: "StyledBox",
|
|
1360
1361
|
componentId: "sc-1hhky9f-0"
|
|
1361
|
-
})(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle),
|
|
1362
|
+
})(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), BoxComponent = react.forwardRef(function(props, ref) {
|
|
1362
1363
|
const $ = reactCompilerRuntime.c(115);
|
|
1363
1364
|
let deprecated_column, deprecated_columnEnd, deprecated_columnStart, deprecated_row, deprecated_rowEnd, deprecated_rowStart, flex, gridColumn, gridColumnEnd, gridColumnStart, gridRow, gridRowEnd, gridRowStart, height, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, restProps, sizing, t0, t1, t2, t3;
|
|
1364
1365
|
$[0] !== props ? ({
|
|
@@ -1450,7 +1451,8 @@ const StyledBox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
1450
1451
|
let t30;
|
|
1451
1452
|
return $[84] !== asProp || $[85] !== props.children || $[86] !== ref || $[87] !== restProps || $[88] !== t10 || $[89] !== t11 || $[90] !== t12 || $[91] !== t13 || $[92] !== t14 || $[93] !== t15 || $[94] !== t16 || $[95] !== t17 || $[96] !== t18 || $[97] !== t19 || $[98] !== t20 || $[99] !== t21 || $[100] !== t22 || $[101] !== t23 || $[102] !== t24 || $[103] !== t25 || $[104] !== t26 || $[105] !== t27 || $[106] !== t28 || $[107] !== t29 || $[108] !== t4 || $[109] !== t5 || $[110] !== t6 || $[111] !== t7 || $[112] !== t8 || $[113] !== t9 ? (t30 = /* @__PURE__ */ jsxRuntime.jsx(StyledBox, { "data-as": t4, "data-ui": "Box", ...restProps, $column: t5, $columnStart: t6, $columnEnd: t7, $display: t8, $flex: t9, $height: t10, $margin: t11, $marginX: t12, $marginY: t13, $marginTop: t14, $marginRight: t15, $marginBottom: t16, $marginLeft: t17, $overflow: t18, $padding: t19, $paddingX: t20, $paddingY: t21, $paddingTop: t22, $paddingRight: t23, $paddingBottom: t24, $paddingLeft: t25, $row: t26, $rowStart: t27, $rowEnd: t28, $sizing: t29, as: asProp, ref, children: props.children }), $[84] = asProp, $[85] = props.children, $[86] = ref, $[87] = restProps, $[88] = t10, $[89] = t11, $[90] = t12, $[91] = t13, $[92] = t14, $[93] = t15, $[94] = t16, $[95] = t17, $[96] = t18, $[97] = t19, $[98] = t20, $[99] = t21, $[100] = t22, $[101] = t23, $[102] = t24, $[103] = t25, $[104] = t26, $[105] = t27, $[106] = t28, $[107] = t29, $[108] = t4, $[109] = t5, $[110] = t6, $[111] = t7, $[112] = t8, $[113] = t9, $[114] = t30) : t30 = $[114], t30;
|
|
1452
1453
|
});
|
|
1453
|
-
|
|
1454
|
+
BoxComponent.displayName = "ForwardRef(Box)";
|
|
1455
|
+
const Box = BoxComponent;
|
|
1454
1456
|
function textBaseStyle(props) {
|
|
1455
1457
|
const {
|
|
1456
1458
|
$accent,
|
|
@@ -1522,7 +1524,7 @@ function textBaseStyle(props) {
|
|
|
1522
1524
|
const StyledText = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
1523
1525
|
displayName: "StyledText",
|
|
1524
1526
|
componentId: "sc-11ov82j-0"
|
|
1525
|
-
})(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle),
|
|
1527
|
+
})(responsiveTextFont, responsiveTextAlignStyle, textBaseStyle), TextComponent = react.forwardRef(function(props, ref) {
|
|
1526
1528
|
const $ = reactCompilerRuntime.c(26);
|
|
1527
1529
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
1528
1530
|
$[0] !== props ? ({
|
|
@@ -1550,7 +1552,8 @@ const StyledText = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
1550
1552
|
let t6;
|
|
1551
1553
|
return $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledText, { "data-ui": "Text", ...restProps, $accent: accent, $align: t3, $muted: muted, ref, $size: t4, $weight: weight, children: t5 }), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;
|
|
1552
1554
|
});
|
|
1553
|
-
|
|
1555
|
+
TextComponent.displayName = "ForwardRef(Text)";
|
|
1556
|
+
const Text = TextComponent;
|
|
1554
1557
|
function badgeStyle(props) {
|
|
1555
1558
|
const {
|
|
1556
1559
|
$tone
|
|
@@ -1569,7 +1572,7 @@ function badgeStyle(props) {
|
|
|
1569
1572
|
const StyledBadge = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
1570
1573
|
displayName: "StyledBadge",
|
|
1571
1574
|
componentId: "sc-5u140l-0"
|
|
1572
|
-
})(responsiveRadiusStyle, badgeStyle),
|
|
1575
|
+
})(responsiveRadiusStyle, badgeStyle), BadgeComponent = react.forwardRef(function(props, ref) {
|
|
1573
1576
|
const $ = reactCompilerRuntime.c(21);
|
|
1574
1577
|
let children, restProps, t0, t1, t2, t3;
|
|
1575
1578
|
if ($[0] !== props) {
|
|
@@ -1595,11 +1598,11 @@ const StyledBadge = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
1595
1598
|
let t7;
|
|
1596
1599
|
return $[14] !== ref || $[15] !== restProps || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== tone ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(StyledBadge, { "data-ui": "Badge", ...restProps, $tone: tone, $radius: t4, padding: t5, ref, children: t6 }), $[14] = ref, $[15] = restProps, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = tone, $[20] = t7) : t7 = $[20], t7;
|
|
1597
1600
|
});
|
|
1598
|
-
|
|
1599
|
-
const StyledFlex = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
1601
|
+
BadgeComponent.displayName = "ForwardRef(Badge)";
|
|
1602
|
+
const Badge = BadgeComponent, StyledFlex = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
1600
1603
|
displayName: "StyledFlex",
|
|
1601
1604
|
componentId: "sc-oxesg3-0"
|
|
1602
|
-
})(flexItemStyle, responsiveFlexStyle),
|
|
1605
|
+
})(flexItemStyle, responsiveFlexStyle), FlexComponent = react.forwardRef(function(props, ref) {
|
|
1603
1606
|
const $ = reactCompilerRuntime.c(27);
|
|
1604
1607
|
let align, as, gap, justify, restProps, t0, wrap;
|
|
1605
1608
|
$[0] !== props ? ({
|
|
@@ -1625,8 +1628,8 @@ const StyledFlex = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
1625
1628
|
let t6;
|
|
1626
1629
|
return $[18] !== as || $[19] !== ref || $[20] !== restProps || $[21] !== t1 || $[22] !== t2 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledFlex, { "data-ui": "Flex", ...restProps, $align: t1, $direction: t2, $gap: t3, $justify: t4, $wrap: t5, forwardedAs: as, ref }), $[18] = as, $[19] = ref, $[20] = restProps, $[21] = t1, $[22] = t2, $[23] = t3, $[24] = t4, $[25] = t5, $[26] = t6) : t6 = $[26], t6;
|
|
1627
1630
|
});
|
|
1628
|
-
|
|
1629
|
-
const rotate = styledComponents.keyframes`
|
|
1631
|
+
FlexComponent.displayName = "ForwardRef(Flex)";
|
|
1632
|
+
const Flex = FlexComponent, rotate = styledComponents.keyframes`
|
|
1630
1633
|
from {
|
|
1631
1634
|
transform: rotate(0deg);
|
|
1632
1635
|
}
|
|
@@ -1819,7 +1822,7 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
|
|
|
1819
1822
|
})(responsiveRadiusStyle, buttonBaseStyles, buttonColorStyles), LoadingBox = styledComponents.styled.div.withConfig({
|
|
1820
1823
|
displayName: "LoadingBox",
|
|
1821
1824
|
componentId: "sc-aaekt4-1"
|
|
1822
|
-
})`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`,
|
|
1825
|
+
})`position:absolute;top:0;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;background-color:var(--card-bg-color);border-radius:inherit;z-index:1;box-shadow:inherit;`, ButtonComponent = react.forwardRef(function(props, ref) {
|
|
1823
1826
|
const $ = reactCompilerRuntime.c(87);
|
|
1824
1827
|
let IconComponent, IconRightComponent, children, disabled, gap, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;
|
|
1825
1828
|
$[0] !== props ? ({
|
|
@@ -1918,7 +1921,8 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
|
|
|
1918
1921
|
t26
|
|
1919
1922
|
] }), $[73] = mode, $[74] = radius, $[75] = ref, $[76] = restProps, $[77] = t21, $[78] = t22, $[79] = t23, $[80] = t24, $[81] = t25, $[82] = t26, $[83] = tone, $[84] = type, $[85] = width, $[86] = t27) : t27 = $[86], t27;
|
|
1920
1923
|
});
|
|
1921
|
-
|
|
1924
|
+
ButtonComponent.displayName = "ForwardRef(Button)";
|
|
1925
|
+
const Button = ButtonComponent;
|
|
1922
1926
|
function cardStyle(props) {
|
|
1923
1927
|
return [cardBaseStyle(props), cardColorStyle(props)];
|
|
1924
1928
|
}
|
|
@@ -2070,7 +2074,7 @@ function cardColorStyle(props) {
|
|
|
2070
2074
|
const StyledCard = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
2071
2075
|
displayName: "StyledCard",
|
|
2072
2076
|
componentId: "sc-osnro2-0"
|
|
2073
|
-
})(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle),
|
|
2077
|
+
})(responsiveBorderStyle, responsiveRadiusStyle, responsiveShadowStyle, cardStyle), CardComponent = react.forwardRef(function(props, ref) {
|
|
2074
2078
|
const $ = reactCompilerRuntime.c(56);
|
|
2075
2079
|
let asProp, border2, borderBottom2, borderLeft2, borderRight2, borderTop2, muted, pressed, restProps, scheme, selected, shadow, t0, t1, t2, t3;
|
|
2076
2080
|
$[0] !== props ? ({
|
|
@@ -2112,7 +2116,8 @@ const StyledCard = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
2112
2116
|
let t17;
|
|
2113
2117
|
return $[52] !== scheme || $[53] !== t16 || $[54] !== tone ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(ThemeColorProvider, { scheme, tone, children: t16 }), $[52] = scheme, $[53] = t16, $[54] = tone, $[55] = t17) : t17 = $[55], t17;
|
|
2114
2118
|
});
|
|
2115
|
-
|
|
2119
|
+
CardComponent.displayName = "ForwardRef(Card)";
|
|
2120
|
+
const Card = CardComponent;
|
|
2116
2121
|
function useClickOutsideEvent(listener, t0, boundaryElement) {
|
|
2117
2122
|
const $ = reactCompilerRuntime.c(9), elementsArg = t0 === void 0 ? _temp$8 : t0;
|
|
2118
2123
|
let t1;
|
|
@@ -2626,7 +2631,7 @@ const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
|
|
|
2626
2631
|
})), StyledCode = /* @__PURE__ */ styledComponents.styled.pre.withConfig({
|
|
2627
2632
|
displayName: "StyledCode",
|
|
2628
2633
|
componentId: "sc-4dymyn-0"
|
|
2629
|
-
})(codeBaseStyle, responsiveCodeFontStyle),
|
|
2634
|
+
})(codeBaseStyle, responsiveCodeFontStyle), CodeComponent = react.forwardRef(function(props, ref) {
|
|
2630
2635
|
const $ = reactCompilerRuntime.c(22);
|
|
2631
2636
|
let children, language, restProps, t0, weight;
|
|
2632
2637
|
$[0] !== props ? ({
|
|
@@ -2648,8 +2653,8 @@ const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
|
|
|
2648
2653
|
let t5;
|
|
2649
2654
|
return $[16] !== ref || $[17] !== restProps || $[18] !== t1 || $[19] !== t4 || $[20] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(StyledCode, { "data-ui": "Code", ...restProps, $size: t1, $weight: weight, ref, children: t4 }), $[16] = ref, $[17] = restProps, $[18] = t1, $[19] = t4, $[20] = weight, $[21] = t5) : t5 = $[21], t5;
|
|
2650
2655
|
});
|
|
2651
|
-
|
|
2652
|
-
const BASE_STYLE$1 = {
|
|
2656
|
+
CodeComponent.displayName = "ForwardRef(Code)";
|
|
2657
|
+
const Code = CodeComponent, BASE_STYLE$1 = {
|
|
2653
2658
|
width: "100%",
|
|
2654
2659
|
margin: "0 auto"
|
|
2655
2660
|
};
|
|
@@ -2668,7 +2673,7 @@ function responsiveContainerWidthStyle(props) {
|
|
|
2668
2673
|
const StyledContainer = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
2669
2674
|
displayName: "StyledContainer",
|
|
2670
2675
|
componentId: "sc-wyroop-0"
|
|
2671
|
-
})(containerBaseStyle, responsiveContainerWidthStyle),
|
|
2676
|
+
})(containerBaseStyle, responsiveContainerWidthStyle), ContainerComponent = react.forwardRef(function(props, ref) {
|
|
2672
2677
|
const $ = reactCompilerRuntime.c(11);
|
|
2673
2678
|
let as, restProps, t0;
|
|
2674
2679
|
$[0] !== props ? ({
|
|
@@ -2682,11 +2687,11 @@ const StyledContainer = /* @__PURE__ */ styledComponents.styled(Box).withConfig(
|
|
|
2682
2687
|
let t2;
|
|
2683
2688
|
return $[6] !== as || $[7] !== ref || $[8] !== restProps || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledContainer, { "data-ui": "Container", ...restProps, $width: t1, forwardedAs: as, ref }), $[6] = as, $[7] = ref, $[8] = restProps, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
2684
2689
|
});
|
|
2685
|
-
|
|
2686
|
-
const StyledGrid = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
2690
|
+
ContainerComponent.displayName = "ForwardRef(Container)";
|
|
2691
|
+
const Container = ContainerComponent, StyledGrid = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
2687
2692
|
displayName: "StyledGrid",
|
|
2688
2693
|
componentId: "sc-v8t8oz-0"
|
|
2689
|
-
})(responsiveGridStyle),
|
|
2694
|
+
})(responsiveGridStyle), GridComponent = react.forwardRef(function(props, ref) {
|
|
2690
2695
|
const $ = reactCompilerRuntime.c(44);
|
|
2691
2696
|
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, gridTemplateColumns, gridTemplateRows, restProps, rows;
|
|
2692
2697
|
$[0] !== props ? ({
|
|
@@ -2726,7 +2731,8 @@ const StyledGrid = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
2726
2731
|
let t11;
|
|
2727
2732
|
return $[30] !== as || $[31] !== children || $[32] !== ref || $[33] !== restProps || $[34] !== t0 || $[35] !== t1 || $[36] !== t10 || $[37] !== t2 || $[38] !== t3 || $[39] !== t5 || $[40] !== t6 || $[41] !== t7 || $[42] !== t8 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(StyledGrid, { "data-as": t0, "data-ui": "Grid", ...restProps, $autoRows: t1, $autoCols: t2, $autoFlow: t3, $columns: t5, $gap: t6, $gapX: t7, $gapY: t8, $rows: t10, forwardedAs: as, ref, children }), $[30] = as, $[31] = children, $[32] = ref, $[33] = restProps, $[34] = t0, $[35] = t1, $[36] = t10, $[37] = t2, $[38] = t3, $[39] = t5, $[40] = t6, $[41] = t7, $[42] = t8, $[43] = t11) : t11 = $[43], t11;
|
|
2728
2733
|
});
|
|
2729
|
-
|
|
2734
|
+
GridComponent.displayName = "ForwardRef(Grid)";
|
|
2735
|
+
const Grid = GridComponent;
|
|
2730
2736
|
function headingBaseStyle(props) {
|
|
2731
2737
|
const {
|
|
2732
2738
|
$accent,
|
|
@@ -2789,7 +2795,7 @@ function headingBaseStyle(props) {
|
|
|
2789
2795
|
const StyledHeading = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
2790
2796
|
displayName: "StyledHeading",
|
|
2791
2797
|
componentId: "sc-137lwim-0"
|
|
2792
|
-
})(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont),
|
|
2798
|
+
})(headingBaseStyle, responsiveTextAlignStyle, responsiveHeadingFont), HeadingComponent = react.forwardRef(function(props, ref) {
|
|
2793
2799
|
const $ = reactCompilerRuntime.c(26);
|
|
2794
2800
|
let align, childrenProp, restProps, t0, t1, t2, textOverflow, weight;
|
|
2795
2801
|
$[0] !== props ? ({
|
|
@@ -2817,7 +2823,8 @@ const StyledHeading = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
2817
2823
|
let t6;
|
|
2818
2824
|
return $[17] !== accent || $[18] !== muted || $[19] !== ref || $[20] !== restProps || $[21] !== t3 || $[22] !== t4 || $[23] !== t5 || $[24] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledHeading, { "data-ui": "Heading", ...restProps, $accent: accent, $align: t3, $muted: muted, $size: t4, $weight: weight, ref, children: t5 }), $[17] = accent, $[18] = muted, $[19] = ref, $[20] = restProps, $[21] = t3, $[22] = t4, $[23] = t5, $[24] = weight, $[25] = t6) : t6 = $[25], t6;
|
|
2819
2825
|
});
|
|
2820
|
-
|
|
2826
|
+
HeadingComponent.displayName = "ForwardRef(Heading)";
|
|
2827
|
+
const Heading = HeadingComponent;
|
|
2821
2828
|
function inlineBaseStyle() {
|
|
2822
2829
|
return {
|
|
2823
2830
|
lineHeight: "0",
|
|
@@ -2848,7 +2855,7 @@ function inlineSpaceStyle(props) {
|
|
|
2848
2855
|
const StyledInline = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
2849
2856
|
displayName: "StyledInline",
|
|
2850
2857
|
componentId: "sc-1pkiy6j-0"
|
|
2851
|
-
})(inlineBaseStyle, inlineSpaceStyle),
|
|
2858
|
+
})(inlineBaseStyle, inlineSpaceStyle), InlineComponent = react.forwardRef(function(props, ref) {
|
|
2852
2859
|
const $ = reactCompilerRuntime.c(16);
|
|
2853
2860
|
let as, childrenProp, deprecated_space, gap, restProps;
|
|
2854
2861
|
$[0] !== props ? ({
|
|
@@ -2868,7 +2875,8 @@ const StyledInline = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
2868
2875
|
let t3;
|
|
2869
2876
|
return $[10] !== as || $[11] !== children || $[12] !== restProps || $[13] !== t1 || $[14] !== t2 ? (t3 = /* @__PURE__ */ jsxRuntime.jsx(StyledInline, { "data-ui": "Inline", ...restProps, $space: t1, forwardedAs: as, ref: t2, children }), $[10] = as, $[11] = children, $[12] = restProps, $[13] = t1, $[14] = t2, $[15] = t3) : t3 = $[15], t3;
|
|
2870
2877
|
});
|
|
2871
|
-
|
|
2878
|
+
InlineComponent.displayName = "ForwardRef(Inline)";
|
|
2879
|
+
const Inline = InlineComponent;
|
|
2872
2880
|
function _temp$5(child) {
|
|
2873
2881
|
return child && /* @__PURE__ */ jsxRuntime.jsx("div", { children: child });
|
|
2874
2882
|
}
|
|
@@ -2892,7 +2900,7 @@ function kbdStyle() {
|
|
|
2892
2900
|
const StyledKBD = /* @__PURE__ */ styledComponents.styled.kbd.withConfig({
|
|
2893
2901
|
displayName: "StyledKBD",
|
|
2894
2902
|
componentId: "sc-1w7yd8w-0"
|
|
2895
|
-
})(responsiveRadiusStyle, kbdStyle),
|
|
2903
|
+
})(responsiveRadiusStyle, kbdStyle), KBDComponent = react.forwardRef(function(props, ref) {
|
|
2896
2904
|
const $ = reactCompilerRuntime.c(19);
|
|
2897
2905
|
let children, restProps, t0, t1, t2;
|
|
2898
2906
|
$[0] !== props ? ({
|
|
@@ -2912,8 +2920,8 @@ const StyledKBD = /* @__PURE__ */ styledComponents.styled.kbd.withConfig({
|
|
|
2912
2920
|
let t6;
|
|
2913
2921
|
return $[14] !== ref || $[15] !== restProps || $[16] !== t3 || $[17] !== t5 ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledKBD, { "data-ui": "KBD", ...restProps, $radius: t3, ref, children: t5 }), $[14] = ref, $[15] = restProps, $[16] = t3, $[17] = t5, $[18] = t6) : t6 = $[18], t6;
|
|
2914
2922
|
});
|
|
2915
|
-
|
|
2916
|
-
const origin = {
|
|
2923
|
+
KBDComponent.displayName = "ForwardRef(KBD)";
|
|
2924
|
+
const KBD = KBDComponent, origin = {
|
|
2917
2925
|
name: "@sanity/ui/origin",
|
|
2918
2926
|
fn({
|
|
2919
2927
|
middlewareData,
|
|
@@ -4306,7 +4314,7 @@ function responsiveStackSpaceStyle(props) {
|
|
|
4306
4314
|
const StyledStack = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
4307
4315
|
displayName: "StyledStack",
|
|
4308
4316
|
componentId: "sc-8dpfq2-0"
|
|
4309
|
-
})(stackBaseStyle, responsiveStackSpaceStyle),
|
|
4317
|
+
})(stackBaseStyle, responsiveStackSpaceStyle), StackComponent = react.forwardRef(function(props, ref) {
|
|
4310
4318
|
const $ = reactCompilerRuntime.c(13);
|
|
4311
4319
|
let as, deprecated_space, gap, restProps;
|
|
4312
4320
|
$[0] !== props ? ({
|
|
@@ -4321,7 +4329,8 @@ const StyledStack = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
4321
4329
|
let t2;
|
|
4322
4330
|
return $[7] !== as || $[8] !== ref || $[9] !== restProps || $[10] !== t0 || $[11] !== t1 ? (t2 = /* @__PURE__ */ jsxRuntime.jsx(StyledStack, { "data-as": t0, "data-ui": "Stack", ...restProps, $space: t1, forwardedAs: as, ref }), $[7] = as, $[8] = ref, $[9] = restProps, $[10] = t0, $[11] = t1, $[12] = t2) : t2 = $[12], t2;
|
|
4323
4331
|
});
|
|
4324
|
-
|
|
4332
|
+
StackComponent.displayName = "ForwardRef(Stack)";
|
|
4333
|
+
const Stack = StackComponent;
|
|
4325
4334
|
function switchBaseStyles() {
|
|
4326
4335
|
return styledComponents.css`
|
|
4327
4336
|
position: relative;
|
|
@@ -5387,11 +5396,12 @@ const StyledMenu = styledComponents.styled(Box).withConfig({
|
|
|
5387
5396
|
return $[47] !== t11 || $[48] !== value ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t11 }), $[47] = t11, $[48] = value, $[49] = t12) : t12 = $[49], t12;
|
|
5388
5397
|
});
|
|
5389
5398
|
Menu.displayName = "ForwardRef(Menu)";
|
|
5390
|
-
const
|
|
5391
|
-
displayName: "
|
|
5399
|
+
const StyledMenuDivider = styledComponents.styled.hr.withConfig({
|
|
5400
|
+
displayName: "StyledMenuDivider",
|
|
5392
5401
|
componentId: "sc-uhoxwu-0"
|
|
5393
5402
|
})`height:1px;border:0;background:var(--card-hairline-soft-color);margin:0;`;
|
|
5394
|
-
|
|
5403
|
+
StyledMenuDivider.displayName = "MenuDivider";
|
|
5404
|
+
const MenuDivider = StyledMenuDivider;
|
|
5395
5405
|
function selectableBaseStyle() {
|
|
5396
5406
|
return styledComponents.css`
|
|
5397
5407
|
background-color: inherit;
|
|
@@ -5505,7 +5515,7 @@ function useMenu() {
|
|
|
5505
5515
|
throw new Error("useMenu(): the context value is not compatible");
|
|
5506
5516
|
return value;
|
|
5507
5517
|
}
|
|
5508
|
-
function
|
|
5518
|
+
function MenuGroupComponent(props) {
|
|
5509
5519
|
const $ = reactCompilerRuntime.c(82);
|
|
5510
5520
|
let IconComponent, children, gap, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
5511
5521
|
$[0] !== props ? ({
|
|
@@ -5614,8 +5624,8 @@ function MenuGroup(props) {
|
|
|
5614
5624
|
let t32;
|
|
5615
5625
|
return $[77] !== childMenu || $[78] !== open || $[79] !== popover || $[80] !== t31 ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(Popover, { ...popover, content: childMenu, "data-ui": "MenuGroup__popover", open, children: t31 }), $[77] = childMenu, $[78] = open, $[79] = popover, $[80] = t31, $[81] = t32) : t32 = $[81], t32;
|
|
5616
5626
|
}
|
|
5617
|
-
|
|
5618
|
-
const
|
|
5627
|
+
MenuGroupComponent.displayName = "MenuGroup";
|
|
5628
|
+
const MenuGroup = MenuGroupComponent, MenuItemComponent = react.forwardRef(function(props, forwardedRef) {
|
|
5619
5629
|
const $ = reactCompilerRuntime.c(76);
|
|
5620
5630
|
let IconComponent, IconRightComponent, children, disabled, gap, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
5621
5631
|
$[0] !== props ? ({
|
|
@@ -5709,7 +5719,8 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
5709
5719
|
t21
|
|
5710
5720
|
] }), $[60] = as, $[61] = disabled, $[62] = handleClick, $[63] = onItemMouseEnter, $[64] = onItemMouseLeave, $[65] = restProps, $[66] = scheme, $[67] = t13, $[68] = t14, $[69] = t15, $[70] = t16, $[71] = t18, $[72] = t19, $[73] = t20, $[74] = t21, $[75] = t22) : t22 = $[75], t22;
|
|
5711
5721
|
});
|
|
5712
|
-
|
|
5722
|
+
MenuItemComponent.displayName = "ForwardRef(MenuItem)";
|
|
5723
|
+
const MenuItem = MenuItemComponent;
|
|
5713
5724
|
function _temp(s) {
|
|
5714
5725
|
return s - 1;
|
|
5715
5726
|
}
|