@sanity/ui 3.0.0-static.5 → 3.0.0-static.7
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 +60 -56
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +61 -57
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +10 -10
- package/dist/_visual-editing.d.ts +10 -10
- package/dist/cli.js +1 -1
- package/dist/css.d.mts +11 -1
- package/dist/css.d.ts +11 -1
- package/dist/css.js +324 -309
- package/dist/css.js.map +1 -1
- package/dist/css.mjs +324 -309
- package/dist/css.mjs.map +1 -1
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +5 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -19
- package/dist/index.mjs.map +1 -1
- package/dist/sanity-theme.css +1 -1
- package/dist/system.css +229 -10
- package/dist/theme.js +1 -1
- package/dist/theme.js.map +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/theme.mjs.map +1 -1
- package/package.json +2 -2
- 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/primitives/_input/__workshop__/index.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/card/card.style.ts +69 -3
- package/src/css/primitives/card/types.ts +0 -1
- package/src/css/primitives/popover/popover.ts +4 -0
- package/src/css/primitives/switch/switch.style.ts +8 -83
- package/src/css/system.style.ts +2 -0
- package/src/theme/v3/defaults.ts +1 -1
- package/src/ui/components/autocomplete/__workshop__/index.ts +1 -1
- package/src/ui/components/autocomplete/autocomplete.tsx +2 -11
- package/src/ui/components/dialog/dialog.tsx +3 -4
- package/src/ui/constants.ts +6 -0
- package/src/ui/hooks/useMediaIndex/useMediaIndex.ts +0 -2
- package/src/ui/primitives/box/box.tsx +3 -2
- package/src/ui/primitives/card/card.tsx +2 -6
- package/src/ui/primitives/code/code.tsx +1 -1
- package/src/ui/primitives/kbd/kbd.tsx +2 -2
- package/src/ui/primitives/popover/popover.tsx +5 -75
- package/src/ui/primitives/popover/popoverCard.tsx +45 -39
- package/src/ui/primitives/textInput/textInput.tsx +1 -1
- package/src/ui/primitives/tooltip/tooltip.tsx +2 -3
- package/src/css/primitives/card/rules.ts +0 -473
|
@@ -135,6 +135,10 @@ const createColorTheme = theme.createColorTheme, hexToRgb = theme.hexToRgb, hslT
|
|
|
135
135
|
visualDuration: 0.2,
|
|
136
136
|
bounce: 0.25
|
|
137
137
|
}
|
|
138
|
+
}, Z_OFFSETS = {
|
|
139
|
+
dialog: 600,
|
|
140
|
+
popover: 400,
|
|
141
|
+
tooltip: 200
|
|
138
142
|
};
|
|
139
143
|
function _isEnterToClickElement(element) {
|
|
140
144
|
return isHTMLAnchorElement(element) || isHTMLButtonElement(element);
|
|
@@ -358,8 +362,8 @@ function _temp$6() {
|
|
|
358
362
|
return !1;
|
|
359
363
|
}
|
|
360
364
|
const Box = react.forwardRef(function(props, ref) {
|
|
361
|
-
const $ = reactCompilerRuntime.c(
|
|
362
|
-
let align, autoCols, autoFlow, autoRows, border, 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, width, wrap;
|
|
365
|
+
const $ = reactCompilerRuntime.c(120);
|
|
366
|
+
let align, autoCols, autoFlow, autoRows, border, 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, width, wrap;
|
|
363
367
|
$[0] !== props ? ({
|
|
364
368
|
align,
|
|
365
369
|
as: t0,
|
|
@@ -397,8 +401,9 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
397
401
|
marginBottom,
|
|
398
402
|
marginLeft,
|
|
399
403
|
maxWidth,
|
|
404
|
+
minWidth: t3,
|
|
400
405
|
overflow,
|
|
401
|
-
padding:
|
|
406
|
+
padding: t4,
|
|
402
407
|
paddingX,
|
|
403
408
|
paddingY,
|
|
404
409
|
paddingTop,
|
|
@@ -413,14 +418,14 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
413
418
|
rows,
|
|
414
419
|
rowStart,
|
|
415
420
|
rowEnd,
|
|
416
|
-
sizing:
|
|
421
|
+
sizing: t5,
|
|
417
422
|
width,
|
|
418
423
|
wrap,
|
|
419
424
|
...restProps
|
|
420
|
-
} = props, $[0] = props, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = border, $[6] = borderBottom, $[7] = borderLeft, $[8] = borderRight, $[9] = borderTop, $[10] = className, $[11] = column, $[12] = columnEnd, $[13] = columnStart, $[14] = columns, $[15] = direction, $[16] = flex, $[17] = gap, $[18] = gapX, $[19] = gapY, $[20] = height, $[21] = inset, $[22] = insetBottom, $[23] = insetLeft, $[24] = insetRight, $[25] = insetTop, $[26] = justify, $[27] = marginBottom, $[28] = marginLeft, $[29] = marginRight, $[30] = marginTop, $[31] = marginX, $[32] = marginY, $[33] = maxWidth, $[34] = muted, $[35] = overflow, $[36] = paddingBottom, $[37] = paddingLeft, $[38] = paddingRight, $[39] = paddingTop, $[40] = paddingX, $[41] = paddingY, $[42] = pointerEvents, $[43] = position, $[44] = radius, $[45] = restProps, $[46] = row, $[47] = rowEnd, $[48] = rowStart, $[49] = rows, $[50] = t0, $[51] = t1, $[52] = t2, $[53] = t3, $[54] = t4, $[55] =
|
|
421
|
-
const As = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2,
|
|
422
|
-
let
|
|
423
|
-
$[
|
|
425
|
+
} = props, $[0] = props, $[1] = align, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = border, $[6] = borderBottom, $[7] = borderLeft, $[8] = borderRight, $[9] = borderTop, $[10] = className, $[11] = column, $[12] = columnEnd, $[13] = columnStart, $[14] = columns, $[15] = direction, $[16] = flex, $[17] = gap, $[18] = gapX, $[19] = gapY, $[20] = height, $[21] = inset, $[22] = insetBottom, $[23] = insetLeft, $[24] = insetRight, $[25] = insetTop, $[26] = justify, $[27] = marginBottom, $[28] = marginLeft, $[29] = marginRight, $[30] = marginTop, $[31] = marginX, $[32] = marginY, $[33] = maxWidth, $[34] = muted, $[35] = overflow, $[36] = paddingBottom, $[37] = paddingLeft, $[38] = paddingRight, $[39] = paddingTop, $[40] = paddingX, $[41] = paddingY, $[42] = pointerEvents, $[43] = position, $[44] = radius, $[45] = restProps, $[46] = row, $[47] = rowEnd, $[48] = rowStart, $[49] = rows, $[50] = t0, $[51] = t1, $[52] = t2, $[53] = t3, $[54] = t4, $[55] = t5, $[56] = width, $[57] = wrap) : (align = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], border = $[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], width = $[56], wrap = $[57]);
|
|
426
|
+
const As = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, minWidth = t3 === void 0 ? 0 : t3, padding = t4 === void 0 ? 0 : t4, sizing = t5 === void 0 ? "content" : t5;
|
|
427
|
+
let t6;
|
|
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 ? (t6 = css.composeClassNames(className, css.box({
|
|
424
429
|
align,
|
|
425
430
|
autoCols,
|
|
426
431
|
autoFlow,
|
|
@@ -456,6 +461,7 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
456
461
|
marginBottom,
|
|
457
462
|
marginLeft,
|
|
458
463
|
maxWidth,
|
|
464
|
+
minWidth,
|
|
459
465
|
muted,
|
|
460
466
|
padding,
|
|
461
467
|
paddingX,
|
|
@@ -474,9 +480,9 @@ const Box = react.forwardRef(function(props, ref) {
|
|
|
474
480
|
sizing,
|
|
475
481
|
width,
|
|
476
482
|
wrap
|
|
477
|
-
})), $[
|
|
478
|
-
let
|
|
479
|
-
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] = t6) : t6 = $[113];
|
|
484
|
+
let t7;
|
|
485
|
+
return $[114] !== As || $[115] !== props.children || $[116] !== ref || $[117] !== restProps || $[118] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsx(As, { "data-ui": "Box", ...restProps, className: t6, ref, children: props.children }), $[114] = As, $[115] = props.children, $[116] = ref, $[117] = restProps, $[118] = t6, $[119] = t7) : t7 = $[119], t7;
|
|
480
486
|
});
|
|
481
487
|
Box.displayName = "ForwardRef(Box)";
|
|
482
488
|
const Label = react.forwardRef(function(props, ref) {
|
|
@@ -836,8 +842,8 @@ function useCard() {
|
|
|
836
842
|
return react.useContext(CardContext);
|
|
837
843
|
}
|
|
838
844
|
const Card = react.forwardRef(function(props, ref) {
|
|
839
|
-
const $ = reactCompilerRuntime.c(
|
|
840
|
-
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;
|
|
841
847
|
$[0] !== props ? ({
|
|
842
848
|
__unstable_checkered: t0,
|
|
843
849
|
__unstable_focusRing: t1,
|
|
@@ -846,48 +852,41 @@ const Card = react.forwardRef(function(props, ref) {
|
|
|
846
852
|
pressed,
|
|
847
853
|
radius: t2,
|
|
848
854
|
scheme: schemeProp,
|
|
849
|
-
selectable,
|
|
850
855
|
selected,
|
|
851
856
|
shadow,
|
|
852
857
|
style,
|
|
853
858
|
tone: t3,
|
|
854
859
|
...restProps
|
|
855
|
-
} = 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]);
|
|
856
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";
|
|
857
862
|
let t6;
|
|
858
|
-
$[
|
|
863
|
+
$[13] !== t4 || $[14] !== t5 ? (t6 = {
|
|
859
864
|
tone: t4,
|
|
860
865
|
scheme: t5
|
|
861
|
-
}, $[
|
|
866
|
+
}, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15];
|
|
862
867
|
const context = t6, tone = toneProp === "inherit" ? context.tone : toneProp, scheme = schemeProp === void 0 ? context.scheme : schemeProp, t7 = scheme === context.scheme ? void 0 : scheme;
|
|
863
868
|
let t8;
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
scheme: t7,
|
|
870
|
-
shadow,
|
|
871
|
-
tone
|
|
872
|
-
}), t92), $[17] = className, $[18] = radius, $[19] = selectable, $[20] = shadow, $[21] = t7, $[22] = tone, $[23] = t8;
|
|
873
|
-
} else
|
|
874
|
-
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];
|
|
875
874
|
const t9 = checkered ? "" : void 0, t10 = focusRing ? "" : void 0, t11 = pressed ? "" : void 0, t12 = selected ? "" : void 0;
|
|
876
875
|
let t13;
|
|
877
|
-
$[
|
|
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];
|
|
878
877
|
let node = t13;
|
|
879
878
|
if (scheme === context.scheme && tone === context.tone)
|
|
880
879
|
return node;
|
|
881
880
|
const t14 = parent?.compat_provider, t15 = tone ?? context.tone;
|
|
882
881
|
let t16;
|
|
883
|
-
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) {
|
|
884
883
|
const t17 = tone ?? context.tone;
|
|
885
884
|
let t18;
|
|
886
|
-
return $[
|
|
885
|
+
return $[37] !== node || $[38] !== parent.compat_provider || $[39] !== scheme || $[40] !== t17 ? (t18 = react.createElement(parent.compat_provider, {
|
|
887
886
|
children: node,
|
|
888
887
|
scheme,
|
|
889
888
|
tone: t17
|
|
890
|
-
}), $[
|
|
889
|
+
}), $[37] = node, $[38] = parent.compat_provider, $[39] = scheme, $[40] = t17, $[41] = t18) : t18 = $[41], t18;
|
|
891
890
|
}
|
|
892
891
|
return node;
|
|
893
892
|
});
|
|
@@ -945,7 +944,7 @@ const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
|
|
|
945
944
|
weight,
|
|
946
945
|
...restProps
|
|
947
946
|
} = props, $[0] = props, $[1] = children, $[2] = className, $[3] = languageProp, $[4] = restProps, $[5] = t0, $[6] = t1, $[7] = weight) : (children = $[1], className = $[2], languageProp = $[3], restProps = $[4], t0 = $[5], t1 = $[6], weight = $[7]);
|
|
948
|
-
const As = t0 === void 0 ? "pre" : t0, size2 = t1 === void 0 ?
|
|
947
|
+
const As = t0 === void 0 ? "pre" : t0, size2 = t1 === void 0 ? 2 : t1, language = typeof languageProp == "string" ? languageProp : void 0;
|
|
949
948
|
let t2;
|
|
950
949
|
$[8] !== className || $[9] !== size2 || $[10] !== weight ? (t2 = css.composeClassNames(className, css.code({
|
|
951
950
|
size: size2,
|
|
@@ -1076,13 +1075,13 @@ const KBD = react.forwardRef(function(props, ref) {
|
|
|
1076
1075
|
radius: t4,
|
|
1077
1076
|
...restProps
|
|
1078
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]);
|
|
1079
|
-
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;
|
|
1080
1079
|
let t5;
|
|
1081
1080
|
$[9] !== className || $[10] !== radius ? (t5 = css.composeClassNames(className, css.kbd({
|
|
1082
1081
|
radius
|
|
1083
1082
|
})), $[9] = className, $[10] = radius, $[11] = t5) : t5 = $[11];
|
|
1084
1083
|
let t6;
|
|
1085
|
-
$[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];
|
|
1086
1085
|
let t7;
|
|
1087
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;
|
|
1088
1087
|
});
|
|
@@ -1689,7 +1688,7 @@ function size(options) {
|
|
|
1689
1688
|
};
|
|
1690
1689
|
}
|
|
1691
1690
|
const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(react.forwardRef(function(props, ref) {
|
|
1692
|
-
const $ = reactCompilerRuntime.c(
|
|
1691
|
+
const $ = reactCompilerRuntime.c(74);
|
|
1693
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;
|
|
1694
1693
|
$[0] !== props ? ({
|
|
1695
1694
|
__unstable_margins: marginsProp,
|
|
@@ -1716,7 +1715,7 @@ const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(
|
|
|
1716
1715
|
y: yProp,
|
|
1717
1716
|
...restProps
|
|
1718
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]);
|
|
1719
|
-
const layer = useLayer();
|
|
1718
|
+
const card = useCard(), layer = useLayer();
|
|
1720
1719
|
let t0;
|
|
1721
1720
|
t0 = marginsProp || DEFAULT_POPOVER_MARGINS;
|
|
1722
1721
|
const margins = t0, x = (xProp ?? 0) + margins[3], y = (yProp ?? 0) + margins[0];
|
|
@@ -1744,24 +1743,29 @@ const MotionCard$1 = framerMotion.motion.create(Card), PopoverCard = react.memo(
|
|
|
1744
1743
|
right: void 0,
|
|
1745
1744
|
bottom: void 0
|
|
1746
1745
|
}, $[34] = t6, $[35] = t7, $[36] = t8) : t8 = $[36], t5 = t8;
|
|
1747
|
-
const arrowStyle = t5, t9 =
|
|
1748
|
-
let t10;
|
|
1749
|
-
$[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";
|
|
1750
1747
|
let t11;
|
|
1751
|
-
$[
|
|
1752
|
-
|
|
1753
|
-
$[41] !== animate ? (t12 = animate ? ["hidden", "scaleOut"] : void 0, $[41] = animate, $[42] = t12) : t12 = $[42];
|
|
1754
|
-
let t13;
|
|
1755
|
-
$[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";
|
|
1756
1750
|
let t14;
|
|
1757
|
-
$[
|
|
1751
|
+
$[38] !== animate ? (t14 = animate ? ["hidden", "initial"] : void 0, $[38] = animate, $[39] = t14) : t14 = $[39];
|
|
1758
1752
|
let t15;
|
|
1759
|
-
$[
|
|
1753
|
+
$[40] !== animate ? (t15 = animate ? ["visible", "scaleIn"] : void 0, $[40] = animate, $[41] = t15) : t15 = $[41];
|
|
1760
1754
|
let t16;
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
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;
|
|
1765
1769
|
}));
|
|
1766
1770
|
PopoverCard.displayName = "Memo(ForwardRef(PopoverCard))";
|
|
1767
1771
|
const ViewportOverlay = () => {
|
|
@@ -1781,6 +1785,7 @@ const ViewportOverlay = () => {
|
|
|
1781
1785
|
__unstable_margins: margins = DEFAULT_POPOVER_MARGINS,
|
|
1782
1786
|
animate: _animate = !1,
|
|
1783
1787
|
arrow: arrowProp = !1,
|
|
1788
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1784
1789
|
boundaryElement = boundaryElementContext.element,
|
|
1785
1790
|
children: childProp,
|
|
1786
1791
|
constrainSize = !1,
|
|
@@ -1806,7 +1811,7 @@ const ViewportOverlay = () => {
|
|
|
1806
1811
|
tone = "inherit",
|
|
1807
1812
|
width: widthProp = "auto",
|
|
1808
1813
|
// zOffset: zOffsetProp = layer.popover.zOffset,
|
|
1809
|
-
zOffset: zOffsetProp,
|
|
1814
|
+
zOffset: zOffsetProp = Z_OFFSETS.popover,
|
|
1810
1815
|
updateRef,
|
|
1811
1816
|
...restProps
|
|
1812
1817
|
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, zOffset = useArrayProp(zOffsetProp), ref = react.useRef(null), arrowRef = react.useRef(null), rootBoundary = "viewport";
|
|
@@ -2122,7 +2127,7 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
2122
2127
|
__unstable_disableFocusRing = t72, t0 = t82, className = t92, clearButton = t102, t1 = t112, t2 = t122, gap = t132, IconComponent = t142, IconRightComponent = t152, onClear = t162, t3 = t172, prefix = t182, t4 = t192, readOnly = t202, t5 = t212, suffix = t222, customValidity = t232, t6 = t242, width = t252, restProps = t262, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = className, $[5] = clearButton, $[6] = customValidity, $[7] = gap, $[8] = onClear, $[9] = prefix, $[10] = readOnly, $[11] = restProps, $[12] = suffix, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6, $[20] = width;
|
|
2123
2128
|
} else
|
|
2124
2129
|
IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], className = $[4], clearButton = $[5], customValidity = $[6], gap = $[7], onClear = $[8], prefix = $[9], readOnly = $[10], restProps = $[11], suffix = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], t5 = $[18], t6 = $[19], width = $[20];
|
|
2125
|
-
const border = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize = t2 === void 0 ?
|
|
2130
|
+
const border = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSize = t2 === void 0 ? 2 : t2, padding = t3 === void 0 ? 3 : t3, radius = t4 === void 0 ? 2 : t4, space = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = react.useRef(null), paddingArray = useArrayProp(padding), withClearButton = !!clearButton;
|
|
2126
2131
|
let t7;
|
|
2127
2132
|
$[21] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => ref.current, $[21] = t7) : t7 = $[21], react.useImperativeHandle(forwardedRef, t7), useCustomValidity(ref, customValidity);
|
|
2128
2133
|
const handleClearMouseDown = _temp;
|
|
@@ -2323,8 +2328,6 @@ function useTooltipDelayGroup() {
|
|
|
2323
2328
|
}
|
|
2324
2329
|
const Tooltip = react.forwardRef(function(props, forwardedRef) {
|
|
2325
2330
|
const boundaryElementContext = useBoundaryElement(), {
|
|
2326
|
-
layer
|
|
2327
|
-
} = useTheme_v2(), {
|
|
2328
2331
|
animate: _animate = !1,
|
|
2329
2332
|
arrow: arrowProp = !1,
|
|
2330
2333
|
boundaryElement = boundaryElementContext?.element,
|
|
@@ -2340,7 +2343,7 @@ const Tooltip = react.forwardRef(function(props, forwardedRef) {
|
|
|
2340
2343
|
radius = 3,
|
|
2341
2344
|
scheme,
|
|
2342
2345
|
shadow = 2,
|
|
2343
|
-
zOffset =
|
|
2346
|
+
zOffset = Z_OFFSETS.tooltip,
|
|
2344
2347
|
tone,
|
|
2345
2348
|
...restProps
|
|
2346
2349
|
} = props, animate = usePrefersReducedMotion() ? !1 : _animate, fallbackPlacements = useArrayProp(fallbackPlacementsProp), ref = react.useRef(null), [referenceElement, setReferenceElement] = react.useState(null), arrowRef = react.useRef(null), rootBoundary = "viewport", [tooltipMaxWidth, setTooltipMaxWidth] = react.useState(0);
|
|
@@ -3090,6 +3093,7 @@ exports.Tooltip = Tooltip;
|
|
|
3090
3093
|
exports.TooltipDelayGroupContext = TooltipDelayGroupContext;
|
|
3091
3094
|
exports.TooltipDelayGroupProvider = TooltipDelayGroupProvider;
|
|
3092
3095
|
exports.VirtualList = VirtualList;
|
|
3096
|
+
exports.Z_OFFSETS = Z_OFFSETS;
|
|
3093
3097
|
exports._ResizeObserver = _ResizeObserver;
|
|
3094
3098
|
exports._elementSizeObserver = _elementSizeObserver;
|
|
3095
3099
|
exports._getArrayProp = _getArrayProp;
|