@sanity/ui 3.0.0-static.6 → 3.0.0-static.8
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 +53 -53
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +54 -54
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +207 -185
- package/dist/css.d.ts +207 -185
- package/dist/css.js +617 -547
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +617 -547
- package/dist/css.mjs.map +1 -1
- package/dist/index.js +3 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -13
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +1 -1
- package/dist/system.css +1334 -914
- package/dist/theme.d.mts +84 -76
- package/dist/theme.d.ts +84 -76
- package/dist/theme.js +148 -124
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +148 -124
- package/dist/theme.mjs.map +1 -1
- package/package.json +1 -1
- package/src/css/aspects/index.ts +1 -0
- package/src/css/aspects/minWidth/index.ts +2 -0
- package/src/css/aspects/minWidth/minWidth.style.ts +13 -0
- package/src/css/aspects/minWidth/minWidth.ts +6 -0
- package/src/css/aspects/minWidth/types.ts +7 -0
- package/src/css/compile/compileRule.ts +1 -0
- package/src/css/compile/compileStyle.ts +1 -1
- package/src/css/compile/compileTheme_v3.ts +46 -37
- package/src/css/primitives/badge/badge.style.ts +1 -1
- package/src/css/primitives/box/box.style.ts +1 -1
- package/src/css/primitives/box/box.ts +2 -3
- package/src/css/primitives/box/types.ts +2 -0
- package/src/css/primitives/button/button.style.ts +20 -0
- package/src/css/primitives/card/card.style.ts +116 -44
- package/src/css/primitives/card/types.ts +0 -1
- package/src/css/primitives/kbd/kbd.style.ts +1 -1
- package/src/css/primitives/popover/popover.ts +4 -0
- package/src/css/primitives/switch/switch.style.ts +8 -83
- package/src/css/primitives/text/text.style.ts +11 -3
- package/src/css/system.style.ts +2 -0
- package/src/css/types.ts +200 -188
- package/src/css/varNames.ts +86 -76
- package/src/css/vars.ts +85 -76
- package/src/theme/v3/color/buildColor_v3.ts +43 -38
- package/src/theme/v3/color/card.ts +43 -38
- package/src/theme/v3/color/color.ts +42 -38
- package/src/theme/v3/defaults.ts +63 -47
- package/src/theme/v3/resolveTokens.ts +43 -38
- package/src/theme/versioning/themeColor_v3_v2.ts +1 -1
- package/src/ui/components/autocomplete/__workshop__/async.tsx +0 -1
- package/src/ui/components/autocomplete/autocomplete.tsx +2 -11
- package/src/ui/primitives/box/box.tsx +4 -3
- package/src/ui/primitives/card/card.tsx +2 -6
- package/src/ui/primitives/kbd/kbd.tsx +2 -2
- package/src/ui/primitives/popover/popoverCard.tsx +45 -39
- package/src/css/primitives/card/rules.ts +0 -473
|
@@ -362,15 +362,15 @@ function _temp$6() {
|
|
|
362
362
|
return !1;
|
|
363
363
|
}
|
|
364
364
|
const Box = react.forwardRef(function(props, ref) {
|
|
365
|
-
const $ = reactCompilerRuntime.c(
|
|
366
|
-
let align, autoCols, autoFlow, autoRows,
|
|
365
|
+
const $ = reactCompilerRuntime.c(120);
|
|
366
|
+
let align, autoCols, autoFlow, autoRows, borderBottom, borderLeft, borderRight, borderTop, className, column, columnEnd, columnStart, columns, direction, flex, gap, gapX, gapY, height, inset, insetBottom, insetLeft, insetRight, insetTop, justify, marginBottom, marginLeft, marginRight, marginTop, marginX, marginY, maxWidth, muted, overflow, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pointerEvents, position, radius, restProps, row, rowEnd, rowStart, rows, t0, t1, t2, t3, t4, t5, t6, width, wrap;
|
|
367
367
|
$[0] !== props ? ({
|
|
368
368
|
align,
|
|
369
369
|
as: t0,
|
|
370
370
|
autoCols,
|
|
371
371
|
autoFlow,
|
|
372
372
|
autoRows,
|
|
373
|
-
border,
|
|
373
|
+
border: t1,
|
|
374
374
|
borderTop,
|
|
375
375
|
borderRight,
|
|
376
376
|
borderBottom,
|
|
@@ -381,7 +381,7 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
381
381
|
columnEnd,
|
|
382
382
|
columns,
|
|
383
383
|
direction,
|
|
384
|
-
display:
|
|
384
|
+
display: t2,
|
|
385
385
|
flex,
|
|
386
386
|
gap,
|
|
387
387
|
gapX,
|
|
@@ -393,7 +393,7 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
393
393
|
insetRight,
|
|
394
394
|
insetTop,
|
|
395
395
|
justify,
|
|
396
|
-
margin:
|
|
396
|
+
margin: t3,
|
|
397
397
|
marginX,
|
|
398
398
|
marginY,
|
|
399
399
|
marginTop,
|
|
@@ -401,8 +401,9 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
401
401
|
marginBottom,
|
|
402
402
|
marginLeft,
|
|
403
403
|
maxWidth,
|
|
404
|
+
minWidth: t4,
|
|
404
405
|
overflow,
|
|
405
|
-
padding:
|
|
406
|
+
padding: t5,
|
|
406
407
|
paddingX,
|
|
407
408
|
paddingY,
|
|
408
409
|
paddingTop,
|
|
@@ -417,14 +418,14 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
417
418
|
rows,
|
|
418
419
|
rowStart,
|
|
419
420
|
rowEnd,
|
|
420
|
-
sizing:
|
|
421
|
+
sizing: t6,
|
|
421
422
|
width,
|
|
422
423
|
wrap,
|
|
423
424
|
...restProps
|
|
424
|
-
} = props, $[0] = props, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] =
|
|
425
|
-
const As = t0 === void 0 ? "div" : t0,
|
|
426
|
-
let
|
|
427
|
-
$[
|
|
425
|
+
} = props, $[0] = props, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = borderBottom, $[6] = borderLeft, $[7] = borderRight, $[8] = borderTop, $[9] = className, $[10] = column, $[11] = columnEnd, $[12] = columnStart, $[13] = columns, $[14] = direction, $[15] = flex, $[16] = gap, $[17] = gapX, $[18] = gapY, $[19] = height, $[20] = inset, $[21] = insetBottom, $[22] = insetLeft, $[23] = insetRight, $[24] = insetTop, $[25] = justify, $[26] = marginBottom, $[27] = marginLeft, $[28] = marginRight, $[29] = marginTop, $[30] = marginX, $[31] = marginY, $[32] = maxWidth, $[33] = muted, $[34] = overflow, $[35] = paddingBottom, $[36] = paddingLeft, $[37] = paddingRight, $[38] = paddingTop, $[39] = paddingX, $[40] = paddingY, $[41] = pointerEvents, $[42] = position, $[43] = radius, $[44] = restProps, $[45] = row, $[46] = rowEnd, $[47] = rowStart, $[48] = rows, $[49] = t0, $[50] = t1, $[51] = t2, $[52] = t3, $[53] = t4, $[54] = t5, $[55] = t6, $[56] = width, $[57] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], borderBottom = $[5], borderLeft = $[6], borderRight = $[7], borderTop = $[8], className = $[9], column = $[10], columnEnd = $[11], columnStart = $[12], columns = $[13], direction = $[14], flex = $[15], gap = $[16], gapX = $[17], gapY = $[18], height = $[19], inset = $[20], insetBottom = $[21], insetLeft = $[22], insetRight = $[23], insetTop = $[24], justify = $[25], marginBottom = $[26], marginLeft = $[27], marginRight = $[28], marginTop = $[29], marginX = $[30], marginY = $[31], maxWidth = $[32], muted = $[33], overflow = $[34], paddingBottom = $[35], paddingLeft = $[36], paddingRight = $[37], paddingTop = $[38], paddingX = $[39], paddingY = $[40], pointerEvents = $[41], position = $[42], radius = $[43], restProps = $[44], row = $[45], rowEnd = $[46], rowStart = $[47], rows = $[48], t0 = $[49], t1 = $[50], t2 = $[51], t3 = $[52], t4 = $[53], t5 = $[54], t6 = $[55], width = $[56], wrap = $[57]);
|
|
426
|
+
const As = t0 === void 0 ? "div" : t0, border = t1 === void 0 ? !1 : t1, display = t2 === void 0 ? "block" : t2, margin = t3 === void 0 ? 0 : t3, minWidth = t4 === void 0 ? 0 : t4, padding = t5 === void 0 ? 0 : t5, sizing = t6 === void 0 ? "content" : t6;
|
|
427
|
+
let t7;
|
|
428
|
+
$[58] !== align || $[59] !== autoCols || $[60] !== autoFlow || $[61] !== autoRows || $[62] !== border || $[63] !== borderBottom || $[64] !== borderLeft || $[65] !== borderRight || $[66] !== borderTop || $[67] !== className || $[68] !== column || $[69] !== columnEnd || $[70] !== columnStart || $[71] !== columns || $[72] !== direction || $[73] !== display || $[74] !== flex || $[75] !== gap || $[76] !== gapX || $[77] !== gapY || $[78] !== height || $[79] !== inset || $[80] !== insetBottom || $[81] !== insetLeft || $[82] !== insetRight || $[83] !== insetTop || $[84] !== justify || $[85] !== margin || $[86] !== marginBottom || $[87] !== marginLeft || $[88] !== marginRight || $[89] !== marginTop || $[90] !== marginX || $[91] !== marginY || $[92] !== maxWidth || $[93] !== minWidth || $[94] !== muted || $[95] !== overflow || $[96] !== padding || $[97] !== paddingBottom || $[98] !== paddingLeft || $[99] !== paddingRight || $[100] !== paddingTop || $[101] !== paddingX || $[102] !== paddingY || $[103] !== pointerEvents || $[104] !== position || $[105] !== radius || $[106] !== row || $[107] !== rowEnd || $[108] !== rowStart || $[109] !== rows || $[110] !== sizing || $[111] !== width || $[112] !== wrap ? (t7 = css.composeClassNames(className, css.box({
|
|
428
429
|
align,
|
|
429
430
|
autoCols,
|
|
430
431
|
autoFlow,
|
|
@@ -460,6 +461,7 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
460
461
|
marginBottom,
|
|
461
462
|
marginLeft,
|
|
462
463
|
maxWidth,
|
|
464
|
+
minWidth,
|
|
463
465
|
muted,
|
|
464
466
|
padding,
|
|
465
467
|
paddingX,
|
|
@@ -478,9 +480,9 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
478
480
|
sizing,
|
|
479
481
|
width,
|
|
480
482
|
wrap
|
|
481
|
-
})), $[
|
|
482
|
-
let
|
|
483
|
-
return $[
|
|
483
|
+
})), $[58] = align, $[59] = autoCols, $[60] = autoFlow, $[61] = autoRows, $[62] = border, $[63] = borderBottom, $[64] = borderLeft, $[65] = borderRight, $[66] = borderTop, $[67] = className, $[68] = column, $[69] = columnEnd, $[70] = columnStart, $[71] = columns, $[72] = direction, $[73] = display, $[74] = flex, $[75] = gap, $[76] = gapX, $[77] = gapY, $[78] = height, $[79] = inset, $[80] = insetBottom, $[81] = insetLeft, $[82] = insetRight, $[83] = insetTop, $[84] = justify, $[85] = margin, $[86] = marginBottom, $[87] = marginLeft, $[88] = marginRight, $[89] = marginTop, $[90] = marginX, $[91] = marginY, $[92] = maxWidth, $[93] = minWidth, $[94] = muted, $[95] = overflow, $[96] = padding, $[97] = paddingBottom, $[98] = paddingLeft, $[99] = paddingRight, $[100] = paddingTop, $[101] = paddingX, $[102] = paddingY, $[103] = pointerEvents, $[104] = position, $[105] = radius, $[106] = row, $[107] = rowEnd, $[108] = rowStart, $[109] = rows, $[110] = sizing, $[111] = width, $[112] = wrap, $[113] = t7) : t7 = $[113];
|
|
484
|
+
let t8;
|
|
485
|
+
return $[114] !== As || $[115] !== props.children || $[116] !== ref || $[117] !== restProps || $[118] !== t7 ? (t8 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Box", ...restProps, className: t7, ref, children: props.children }), $[114] = As, $[115] = props.children, $[116] = ref, $[117] = restProps, $[118] = t7, $[119] = t8) : t8 = $[119], t8;
|
|
484
486
|
});
|
|
485
487
|
Box.displayName = "ForwardRef(Box)";
|
|
486
488
|
const Label = react.forwardRef(function(props, ref) {
|
|
@@ -840,8 +842,8 @@ function useCard() {
|
|
|
840
842
|
return react.useContext(CardContext);
|
|
841
843
|
}
|
|
842
844
|
const Card = react.forwardRef(function(props, ref) {
|
|
843
|
-
const $ = reactCompilerRuntime.c(
|
|
844
|
-
let asProp, className, pressed, restProps, schemeProp,
|
|
845
|
+
const $ = reactCompilerRuntime.c(42);
|
|
846
|
+
let asProp, className, pressed, restProps, schemeProp, selected, shadow, style, t0, t1, t2, t3;
|
|
845
847
|
$[0] !== props ? ({
|
|
846
848
|
__unstable_checkered: t0,
|
|
847
849
|
__unstable_focusRing: t1,
|
|
@@ -850,48 +852,41 @@ const Card = react.forwardRef(function(props, ref) {
|
|
|
850
852
|
pressed,
|
|
851
853
|
radius: t2,
|
|
852
854
|
scheme: schemeProp,
|
|
853
|
-
selectable,
|
|
854
855
|
selected,
|
|
855
856
|
shadow,
|
|
856
857
|
style,
|
|
857
858
|
tone: t3,
|
|
858
859
|
...restProps
|
|
859
|
-
} = props, $[0] = props, $[1] = asProp, $[2] = className, $[3] = pressed, $[4] = restProps, $[5] = schemeProp, $[6] =
|
|
860
|
+
} = props, $[0] = props, $[1] = asProp, $[2] = className, $[3] = pressed, $[4] = restProps, $[5] = schemeProp, $[6] = selected, $[7] = shadow, $[8] = style, $[9] = t0, $[10] = t1, $[11] = t2, $[12] = t3) : (asProp = $[1], className = $[2], pressed = $[3], restProps = $[4], schemeProp = $[5], selected = $[6], shadow = $[7], style = $[8], t0 = $[9], t1 = $[10], t2 = $[11], t3 = $[12]);
|
|
860
861
|
const checkered = t0 === void 0 ? !1 : t0, focusRing = t1 === void 0 ? !1 : t1, radius = t2 === void 0 ? 0 : t2, toneProp = t3 === void 0 ? "default" : t3, as = ReactIs.isValidElementType(asProp) ? asProp : "div", parent = useCard(), t4 = parent?.tone ?? "default", t5 = parent?.scheme ?? "light";
|
|
861
862
|
let t6;
|
|
862
|
-
$[
|
|
863
|
+
$[13] !== t4 || $[14] !== t5 ? (t6 = {
|
|
863
864
|
tone: t4,
|
|
864
865
|
scheme: t5
|
|
865
|
-
}, $[
|
|
866
|
+
}, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15];
|
|
866
867
|
const context = t6, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t7 = scheme === context.scheme ? void 0 : scheme;
|
|
867
868
|
let t8;
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
scheme: t7,
|
|
874
|
-
shadow,
|
|
875
|
-
tone
|
|
876
|
-
}), t92), $[17] = className, $[18] = radius, $[19] = selectable, $[20] = shadow, $[21] = t7, $[22] = tone, $[23] = t8;
|
|
877
|
-
} else
|
|
878
|
-
t8 = $[23];
|
|
869
|
+
$[16] !== className || $[17] !== shadow || $[18] !== t7 || $[19] !== tone ? (t8 = css.composeClassNames(className, css.card({
|
|
870
|
+
scheme: t7,
|
|
871
|
+
shadow,
|
|
872
|
+
tone
|
|
873
|
+
})), $[16] = className, $[17] = shadow, $[18] = t7, $[19] = tone, $[20] = t8) : t8 = $[20];
|
|
879
874
|
const t9 = checkered ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
|
|
880
875
|
let t13;
|
|
881
|
-
$[
|
|
876
|
+
$[21] !== as || $[22] !== radius || $[23] !== ref || $[24] !== restProps || $[25] !== style || $[26] !== t10 || $[27] !== t11 || $[28] !== t12 || $[29] !== t8 || $[30] !== t9 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "Card", ...restProps, as, className: t8, "data-checkered": t9, "data-focus-ring": t10, "data-pressed": t11, "data-selected": t12, radius, ref, style }), $[21] = as, $[22] = radius, $[23] = ref, $[24] = restProps, $[25] = style, $[26] = t10, $[27] = t11, $[28] = t12, $[29] = t8, $[30] = t9, $[31] = t13) : t13 = $[31];
|
|
882
877
|
let node = t13;
|
|
883
878
|
if (scheme === context.scheme && tone === context.tone)
|
|
884
879
|
return node;
|
|
885
880
|
const t14 = parent?.compat_provider, t15 = tone ?? context.tone;
|
|
886
881
|
let t16;
|
|
887
|
-
if ($[
|
|
882
|
+
if ($[32] !== node || $[33] !== scheme || $[34] !== t14 || $[35] !== t15 ? (t16 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { compat_provider: t14, rendered: !0, scheme, tone: t15, children: node }), $[32] = node, $[33] = scheme, $[34] = t14, $[35] = t15, $[36] = t16) : t16 = $[36], node = t16, parent?.compat_provider) {
|
|
888
883
|
const t17 = tone ?? context.tone;
|
|
889
884
|
let t18;
|
|
890
|
-
return $[
|
|
885
|
+
return $[37] !== node || $[38] !== parent.compat_provider || $[39] !== scheme || $[40] !== t17 ? (t18 = react.createElement(parent.compat_provider, {
|
|
891
886
|
children: node,
|
|
892
887
|
scheme,
|
|
893
888
|
tone: t17
|
|
894
|
-
}), $[
|
|
889
|
+
}), $[37] = node, $[38] = parent.compat_provider, $[39] = scheme, $[40] = t17, $[41] = t18) : t18 = $[41], t18;
|
|
895
890
|
}
|
|
896
891
|
return node;
|
|
897
892
|
});
|
|
@@ -1080,13 +1075,13 @@ const KBD = react.forwardRef(function(props, ref) {
|
|
|
1080
1075
|
radius: t4,
|
|
1081
1076
|
...restProps
|
|
1082
1077
|
} = props, $[0] = props, $[1] = children, $[2] = className, $[3] = restProps, $[4] = t0, $[5] = t1, $[6] = t2, $[7] = t3, $[8] = t4) : (children = $[1], className = $[2], restProps = $[3], t0 = $[4], t1 = $[5], t2 = $[6], t3 = $[7], t4 = $[8]);
|
|
1083
|
-
const as = t0 === void 0 ? "kbd" : t0, display = t1 === void 0 ? "inline-block" : t1, fontSize = t2 === void 0 ?
|
|
1078
|
+
const as = t0 === void 0 ? "kbd" : t0, display = t1 === void 0 ? "inline-block" : t1, fontSize = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 1 : t3, radius = t4 === void 0 ? 2 : t4;
|
|
1084
1079
|
let t5;
|
|
1085
1080
|
$[9] !== className || $[10] !== radius ? (t5 = css.composeClassNames(className, css.kbd({
|
|
1086
1081
|
radius
|
|
1087
1082
|
})), $[9] = className, $[10] = radius, $[11] = t5) : t5 = $[11];
|
|
1088
1083
|
let t6;
|
|
1089
|
-
$[12] !== children || $[13] !== fontSize ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", muted: !0, size: fontSize, children }), $[12] = children, $[13] = fontSize, $[14] = t6) : t6 = $[14];
|
|
1084
|
+
$[12] !== children || $[13] !== fontSize ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(Text, { as: "span", muted: !0, size: fontSize, weight: "semibold", children }), $[12] = children, $[13] = fontSize, $[14] = t6) : t6 = $[14];
|
|
1090
1085
|
let t7;
|
|
1091
1086
|
return $[15] !== as || $[16] !== display || $[17] !== padding || $[18] !== ref || $[19] !== restProps || $[20] !== t5 || $[21] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(Box, { "data-ui": "KBD", ...restProps, as, className: t5, display, muted: !0, padding, ref, children: t6 }), $[15] = as, $[16] = display, $[17] = padding, $[18] = ref, $[19] = restProps, $[20] = t5, $[21] = t6, $[22] = t7) : t7 = $[22], t7;
|
|
1092
1087
|
});
|
|
@@ -1693,7 +1688,7 @@ function size(options) {
|
|
|
1693
1688
|
};
|
|
1694
1689
|
}
|
|
1695
1690
|
const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(react.forwardRef(function(props, ref) {
|
|
1696
|
-
const $ = reactCompilerRuntime.c(
|
|
1691
|
+
const $ = reactCompilerRuntime.c(74);
|
|
1697
1692
|
let animate, arrow, arrowRef, arrowX, arrowY, children, marginsProp, maxWidth, originX, originY, overflow, padding, placement, radius, referenceWidth, restProps, scheme, shadow, strategy, style, tone, xProp, yProp;
|
|
1698
1693
|
$[0] !== props ? ({
|
|
1699
1694
|
__unstable_margins: marginsProp,
|
|
@@ -1720,7 +1715,7 @@ const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(
|
|
|
1720
1715
|
y: yProp,
|
|
1721
1716
|
...restProps
|
|
1722
1717
|
} = props, $[0] = props, $[1] = animate, $[2] = arrow, $[3] = arrowRef, $[4] = arrowX, $[5] = arrowY, $[6] = children, $[7] = marginsProp, $[8] = maxWidth, $[9] = originX, $[10] = originY, $[11] = overflow, $[12] = padding, $[13] = placement, $[14] = radius, $[15] = referenceWidth, $[16] = restProps, $[17] = scheme, $[18] = shadow, $[19] = strategy, $[20] = style, $[21] = tone, $[22] = xProp, $[23] = yProp) : (animate = $[1], arrow = $[2], arrowRef = $[3], arrowX = $[4], arrowY = $[5], children = $[6], marginsProp = $[7], maxWidth = $[8], originX = $[9], originY = $[10], overflow = $[11], padding = $[12], placement = $[13], radius = $[14], referenceWidth = $[15], restProps = $[16], scheme = $[17], shadow = $[18], strategy = $[19], style = $[20], tone = $[21], xProp = $[22], yProp = $[23]);
|
|
1723
|
-
const layer = useLayer();
|
|
1718
|
+
const card = useCard(), layer = useLayer();
|
|
1724
1719
|
let t0;
|
|
1725
1720
|
t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
1726
1721
|
const margins = t0, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
@@ -1748,24 +1743,29 @@ const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(
|
|
|
1748
1743
|
right: void 0,
|
|
1749
1744
|
bottom: void 0
|
|
1750
1745
|
}, $[34] = t6, $[35] = t7, $[36] = t8) : t8 = $[36], t5 = t8;
|
|
1751
|
-
const arrowStyle = t5, t9 =
|
|
1752
|
-
let t10;
|
|
1753
|
-
$[37] !== animate ? (t10 = animate ? ["hidden", "initial"] : void 0, $[37] = animate, $[38] = t10) : t10 = $[38];
|
|
1746
|
+
const arrowStyle = t5, t9 = card?.tone ?? "transparent", t10 = card?.scheme ?? "light";
|
|
1754
1747
|
let t11;
|
|
1755
|
-
$[
|
|
1756
|
-
|
|
1757
|
-
$[41] !== animate ? (t12 = animate ? ["hidden", "scaleOut"] : void 0, $[41] = animate, $[42] = t12) : t12 = $[42];
|
|
1758
|
-
let t13;
|
|
1759
|
-
$[43] !== children || $[44] !== padding ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[43] = children, $[44] = padding, $[45] = t13) : t13 = $[45];
|
|
1748
|
+
$[37] === Symbol.for("react.memo_cache_sentinel") ? (t11 = css.popoverCard(), $[37] = t11) : t11 = $[37];
|
|
1749
|
+
const t12 = restProps, t13 = card?.tone ?? "transparent";
|
|
1760
1750
|
let t14;
|
|
1761
|
-
$[
|
|
1751
|
+
$[38] !== animate ? (t14 = animate ? ["hidden", "initial"] : void 0, $[38] = animate, $[39] = t14) : t14 = $[39];
|
|
1762
1752
|
let t15;
|
|
1763
|
-
$[
|
|
1753
|
+
$[40] !== animate ? (t15 = animate ? ["visible", "scaleIn"] : void 0, $[40] = animate, $[41] = t15) : t15 = $[41];
|
|
1764
1754
|
let t16;
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1755
|
+
$[42] !== animate ? (t16 = animate ? ["hidden", "scaleOut"] : void 0, $[42] = animate, $[43] = t16) : t16 = $[43];
|
|
1756
|
+
let t17;
|
|
1757
|
+
$[44] !== children || $[45] !== padding ? (t17 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { direction: "column", flex: 1, padding, children }), $[44] = children, $[45] = padding, $[46] = t17) : t17 = $[46];
|
|
1758
|
+
let t18;
|
|
1759
|
+
$[47] !== maxWidth || $[48] !== overflow || $[49] !== t17 ? (t18 = /* @__PURE__ */ jsxRuntime.jsx(Flex, { "data-ui": "Popover__wrapper", direction: "column", flex: 1, maxWidth, overflow, children: t17 }), $[47] = maxWidth, $[48] = overflow, $[49] = t17, $[50] = t18) : t18 = $[50];
|
|
1760
|
+
let t19;
|
|
1761
|
+
$[51] !== arrow || $[52] !== arrowRef || $[53] !== arrowStyle ? (t19 = arrow && /* @__PURE__ */ jsxRuntime.jsx(Arrow, { ref: arrowRef, style: arrowStyle, width: DEFAULT_POPOVER_ARROW_WIDTH, height: DEFAULT_POPOVER_ARROW_HEIGHT, radius: DEFAULT_POPOVER_ARROW_RADIUS }), $[51] = arrow, $[52] = arrowRef, $[53] = arrowStyle, $[54] = t19) : t19 = $[54];
|
|
1762
|
+
let t20;
|
|
1763
|
+
$[55] !== placement || $[56] !== radius || $[57] !== ref || $[58] !== rootStyle || $[59] !== scheme || $[60] !== shadow || $[61] !== t12 || $[62] !== t13 || $[63] !== t14 || $[64] !== t15 || $[65] !== t16 || $[66] !== t18 || $[67] !== t19 || $[68] !== tone ? (t20 = /* @__PURE__ */ jsxRuntime.jsxs(MotionCard$1, { className: t11, "data-ui": "Popover", ...t12, "data-context-tone": t13, "data-placement": placement, direction: "column", display: "flex", radius, ref, scheme, shadow, sizing: "border", style: rootStyle, tone, variants: POPOVER_MOTION_PROPS.card, transition: POPOVER_MOTION_PROPS.transition, initial: t14, animate: t15, exit: t16, children: [
|
|
1764
|
+
t18,
|
|
1765
|
+
t19
|
|
1766
|
+
] }), $[55] = placement, $[56] = radius, $[57] = ref, $[58] = rootStyle, $[59] = scheme, $[60] = shadow, $[61] = t12, $[62] = t13, $[63] = t14, $[64] = t15, $[65] = t16, $[66] = t18, $[67] = t19, $[68] = tone, $[69] = t20) : t20 = $[69];
|
|
1767
|
+
let t21;
|
|
1768
|
+
return $[70] !== t10 || $[71] !== t20 || $[72] !== t9 ? (t21 = /* @__PURE__ */ jsxRuntime.jsx(CardProvider, { tone: t9, scheme: t10, children: t20 }), $[70] = t10, $[71] = t20, $[72] = t9, $[73] = t21) : t21 = $[73], t21;
|
|
1769
1769
|
}));
|
|
1770
1770
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
1771
1771
|
const ViewportOverlay = () => {
|