@sanity/ui 3.1.13 → 3.2.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 +276 -252
- package/dist/_chunks-cjs/_visual-editing.js.map +1 -1
- package/dist/_chunks-es/_visual-editing.mjs +276 -252
- package/dist/_chunks-es/_visual-editing.mjs.map +1 -1
- package/dist/_visual-editing.d.mts +66 -1
- package/dist/_visual-editing.d.ts +66 -1
- package/dist/index.d.mts +86 -1
- package/dist/index.d.ts +86 -1
- package/dist/index.js +97 -93
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -93
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/core/components/breadcrumbs/breadcrumbs.test.tsx +51 -0
- package/src/core/components/breadcrumbs/breadcrumbs.tsx +7 -3
- package/src/core/components/hotkeys/hotkeys.test.tsx +42 -0
- package/src/core/components/hotkeys/hotkeys.tsx +7 -3
- package/src/core/components/menu/menu.spacing.test.tsx +63 -0
- package/src/core/components/menu/menu.tsx +8 -2
- package/src/core/components/menu/menuGroup.spacing.test.tsx +69 -0
- package/src/core/components/menu/menuGroup.tsx +8 -2
- package/src/core/components/menu/menuItem.spacing.test.tsx +59 -0
- package/src/core/components/menu/menuItem.tsx +8 -2
- package/src/core/components/tab/tabList.test.tsx +48 -0
- package/src/core/components/tree/tree.test.tsx +55 -0
- package/src/core/components/tree/tree.tsx +10 -4
- package/src/core/components/tree/treeGroup.tsx +2 -2
- package/src/core/components/tree/treeItem.test.tsx +65 -0
- package/src/core/components/tree/treeItem.tsx +8 -2
- package/src/core/components/tree/types.ts +4 -0
- package/src/core/hooks/useDelayed.test.ts +20 -0
- package/src/core/hooks/useDelayedState.ts +9 -1
- package/src/core/primitives/box/box.test.tsx +134 -0
- package/src/core/primitives/box/box.tsx +18 -6
- package/src/core/primitives/button/button.test.tsx +38 -0
- package/src/core/primitives/button/button.tsx +8 -3
- package/src/core/primitives/grid/grid.test.tsx +78 -0
- package/src/core/primitives/grid/grid.tsx +17 -4
- package/src/core/primitives/inline/inline.test.tsx +51 -0
- package/src/core/primitives/inline/inline.tsx +9 -3
- package/src/core/primitives/select/select.test.tsx +52 -0
- package/src/core/primitives/select/select.tsx +8 -2
- package/src/core/primitives/stack/stack.test.tsx +57 -0
- package/src/core/primitives/stack/stack.tsx +7 -2
- package/src/core/primitives/textInput/textInput.test.tsx +48 -0
- package/src/core/primitives/textInput/textInput.tsx +7 -2
- package/src/core/primitives/types.ts +33 -0
|
@@ -1359,13 +1359,16 @@ const StyledBox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
1359
1359
|
displayName: "StyledBox",
|
|
1360
1360
|
componentId: "sc-1hhky9f-0"
|
|
1361
1361
|
})(boxStyle, flexItemStyle, responsiveBoxStyle, responsiveGridItemStyle, responsiveMarginStyle, responsivePaddingStyle), Box = react.forwardRef(function(props, ref) {
|
|
1362
|
-
const $ = reactCompilerRuntime.c(
|
|
1363
|
-
let
|
|
1362
|
+
const $ = reactCompilerRuntime.c(115);
|
|
1363
|
+
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
1364
|
$[0] !== props ? ({
|
|
1365
1365
|
as: t0,
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1366
|
+
gridColumn,
|
|
1367
|
+
column: deprecated_column,
|
|
1368
|
+
gridColumnStart,
|
|
1369
|
+
columnStart: deprecated_columnStart,
|
|
1370
|
+
gridColumnEnd,
|
|
1371
|
+
columnEnd: deprecated_columnEnd,
|
|
1369
1372
|
display: t1,
|
|
1370
1373
|
flex,
|
|
1371
1374
|
height,
|
|
@@ -1384,65 +1387,68 @@ const StyledBox = /* @__PURE__ */ styledComponents.styled.div.withConfig({
|
|
|
1384
1387
|
paddingRight,
|
|
1385
1388
|
paddingBottom,
|
|
1386
1389
|
paddingLeft,
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
+
gridRow,
|
|
1391
|
+
row: deprecated_row,
|
|
1392
|
+
gridRowStart,
|
|
1393
|
+
rowStart: deprecated_rowStart,
|
|
1394
|
+
gridRowEnd,
|
|
1395
|
+
rowEnd: deprecated_rowEnd,
|
|
1390
1396
|
sizing,
|
|
1391
1397
|
...restProps
|
|
1392
|
-
} = props, $[0] = props, $[1] =
|
|
1393
|
-
const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, t4 = typeof asProp == "string" ? asProp : void 0;
|
|
1398
|
+
} = props, $[0] = props, $[1] = deprecated_column, $[2] = deprecated_columnEnd, $[3] = deprecated_columnStart, $[4] = deprecated_row, $[5] = deprecated_rowEnd, $[6] = deprecated_rowStart, $[7] = flex, $[8] = gridColumn, $[9] = gridColumnEnd, $[10] = gridColumnStart, $[11] = gridRow, $[12] = gridRowEnd, $[13] = gridRowStart, $[14] = height, $[15] = marginBottom, $[16] = marginLeft, $[17] = marginRight, $[18] = marginTop, $[19] = marginX, $[20] = marginY, $[21] = overflow, $[22] = paddingBottom, $[23] = paddingLeft, $[24] = paddingRight, $[25] = paddingTop, $[26] = paddingX, $[27] = paddingY, $[28] = restProps, $[29] = sizing, $[30] = t0, $[31] = t1, $[32] = t2, $[33] = t3) : (deprecated_column = $[1], deprecated_columnEnd = $[2], deprecated_columnStart = $[3], deprecated_row = $[4], deprecated_rowEnd = $[5], deprecated_rowStart = $[6], flex = $[7], gridColumn = $[8], gridColumnEnd = $[9], gridColumnStart = $[10], gridRow = $[11], gridRowEnd = $[12], gridRowStart = $[13], height = $[14], marginBottom = $[15], marginLeft = $[16], marginRight = $[17], marginTop = $[18], marginX = $[19], marginY = $[20], overflow = $[21], paddingBottom = $[22], paddingLeft = $[23], paddingRight = $[24], paddingTop = $[25], paddingX = $[26], paddingY = $[27], restProps = $[28], sizing = $[29], t0 = $[30], t1 = $[31], t2 = $[32], t3 = $[33]);
|
|
1399
|
+
const asProp = t0 === void 0 ? "div" : t0, display = t1 === void 0 ? "block" : t1, margin = t2 === void 0 ? 0 : t2, padding = t3 === void 0 ? 0 : t3, column = gridColumn === void 0 ? deprecated_column : gridColumn, columnStart = gridColumnStart === void 0 ? deprecated_columnStart : gridColumnStart, columnEnd = gridColumnEnd === void 0 ? deprecated_columnEnd : gridColumnEnd, row = gridRow === void 0 ? deprecated_row : gridRow, rowStart = gridRowStart === void 0 ? deprecated_rowStart : gridRowStart, rowEnd = gridRowEnd === void 0 ? deprecated_rowEnd : gridRowEnd, t4 = typeof asProp == "string" ? asProp : void 0;
|
|
1394
1400
|
let t5;
|
|
1395
|
-
$[
|
|
1401
|
+
$[34] !== column ? (t5 = _getArrayProp(column), $[34] = column, $[35] = t5) : t5 = $[35];
|
|
1396
1402
|
let t6;
|
|
1397
|
-
$[
|
|
1403
|
+
$[36] !== columnStart ? (t6 = _getArrayProp(columnStart), $[36] = columnStart, $[37] = t6) : t6 = $[37];
|
|
1398
1404
|
let t7;
|
|
1399
|
-
$[
|
|
1405
|
+
$[38] !== columnEnd ? (t7 = _getArrayProp(columnEnd), $[38] = columnEnd, $[39] = t7) : t7 = $[39];
|
|
1400
1406
|
let t8;
|
|
1401
|
-
$[
|
|
1407
|
+
$[40] !== display ? (t8 = _getArrayProp(display), $[40] = display, $[41] = t8) : t8 = $[41];
|
|
1402
1408
|
let t9;
|
|
1403
|
-
$[
|
|
1409
|
+
$[42] !== flex ? (t9 = _getArrayProp(flex), $[42] = flex, $[43] = t9) : t9 = $[43];
|
|
1404
1410
|
let t10;
|
|
1405
|
-
$[
|
|
1411
|
+
$[44] !== height ? (t10 = _getArrayProp(height), $[44] = height, $[45] = t10) : t10 = $[45];
|
|
1406
1412
|
let t11;
|
|
1407
|
-
$[
|
|
1413
|
+
$[46] !== margin ? (t11 = _getArrayProp(margin), $[46] = margin, $[47] = t11) : t11 = $[47];
|
|
1408
1414
|
let t12;
|
|
1409
|
-
$[
|
|
1415
|
+
$[48] !== marginX ? (t12 = _getArrayProp(marginX), $[48] = marginX, $[49] = t12) : t12 = $[49];
|
|
1410
1416
|
let t13;
|
|
1411
|
-
$[
|
|
1417
|
+
$[50] !== marginY ? (t13 = _getArrayProp(marginY), $[50] = marginY, $[51] = t13) : t13 = $[51];
|
|
1412
1418
|
let t14;
|
|
1413
|
-
$[
|
|
1419
|
+
$[52] !== marginTop ? (t14 = _getArrayProp(marginTop), $[52] = marginTop, $[53] = t14) : t14 = $[53];
|
|
1414
1420
|
let t15;
|
|
1415
|
-
$[
|
|
1421
|
+
$[54] !== marginRight ? (t15 = _getArrayProp(marginRight), $[54] = marginRight, $[55] = t15) : t15 = $[55];
|
|
1416
1422
|
let t16;
|
|
1417
|
-
$[
|
|
1423
|
+
$[56] !== marginBottom ? (t16 = _getArrayProp(marginBottom), $[56] = marginBottom, $[57] = t16) : t16 = $[57];
|
|
1418
1424
|
let t17;
|
|
1419
|
-
$[
|
|
1425
|
+
$[58] !== marginLeft ? (t17 = _getArrayProp(marginLeft), $[58] = marginLeft, $[59] = t17) : t17 = $[59];
|
|
1420
1426
|
let t18;
|
|
1421
|
-
$[
|
|
1427
|
+
$[60] !== overflow ? (t18 = _getArrayProp(overflow), $[60] = overflow, $[61] = t18) : t18 = $[61];
|
|
1422
1428
|
let t19;
|
|
1423
|
-
$[
|
|
1429
|
+
$[62] !== padding ? (t19 = _getArrayProp(padding), $[62] = padding, $[63] = t19) : t19 = $[63];
|
|
1424
1430
|
let t20;
|
|
1425
|
-
$[
|
|
1431
|
+
$[64] !== paddingX ? (t20 = _getArrayProp(paddingX), $[64] = paddingX, $[65] = t20) : t20 = $[65];
|
|
1426
1432
|
let t21;
|
|
1427
|
-
$[
|
|
1433
|
+
$[66] !== paddingY ? (t21 = _getArrayProp(paddingY), $[66] = paddingY, $[67] = t21) : t21 = $[67];
|
|
1428
1434
|
let t22;
|
|
1429
|
-
$[
|
|
1435
|
+
$[68] !== paddingTop ? (t22 = _getArrayProp(paddingTop), $[68] = paddingTop, $[69] = t22) : t22 = $[69];
|
|
1430
1436
|
let t23;
|
|
1431
|
-
$[
|
|
1437
|
+
$[70] !== paddingRight ? (t23 = _getArrayProp(paddingRight), $[70] = paddingRight, $[71] = t23) : t23 = $[71];
|
|
1432
1438
|
let t24;
|
|
1433
|
-
$[
|
|
1439
|
+
$[72] !== paddingBottom ? (t24 = _getArrayProp(paddingBottom), $[72] = paddingBottom, $[73] = t24) : t24 = $[73];
|
|
1434
1440
|
let t25;
|
|
1435
|
-
$[
|
|
1441
|
+
$[74] !== paddingLeft ? (t25 = _getArrayProp(paddingLeft), $[74] = paddingLeft, $[75] = t25) : t25 = $[75];
|
|
1436
1442
|
let t26;
|
|
1437
|
-
$[
|
|
1443
|
+
$[76] !== row ? (t26 = _getArrayProp(row), $[76] = row, $[77] = t26) : t26 = $[77];
|
|
1438
1444
|
let t27;
|
|
1439
|
-
$[
|
|
1445
|
+
$[78] !== rowStart ? (t27 = _getArrayProp(rowStart), $[78] = rowStart, $[79] = t27) : t27 = $[79];
|
|
1440
1446
|
let t28;
|
|
1441
|
-
$[
|
|
1447
|
+
$[80] !== rowEnd ? (t28 = _getArrayProp(rowEnd), $[80] = rowEnd, $[81] = t28) : t28 = $[81];
|
|
1442
1448
|
let t29;
|
|
1443
|
-
$[
|
|
1449
|
+
$[82] !== sizing ? (t29 = _getArrayProp(sizing), $[82] = sizing, $[83] = t29) : t29 = $[83];
|
|
1444
1450
|
let t30;
|
|
1445
|
-
return $[
|
|
1451
|
+
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;
|
|
1446
1452
|
});
|
|
1447
1453
|
Box.displayName = "ForwardRef(Box)";
|
|
1448
1454
|
function textBaseStyle(props) {
|
|
@@ -1814,8 +1820,8 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
|
|
|
1814
1820
|
displayName: "LoadingBox",
|
|
1815
1821
|
componentId: "sc-aaekt4-1"
|
|
1816
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;`, Button = react.forwardRef(function(props, ref) {
|
|
1817
|
-
const $ = reactCompilerRuntime.c(
|
|
1818
|
-
let IconComponent, IconRightComponent, children, disabled, loading, paddingBottomProp, paddingLeftProp, paddingRightProp, paddingTopProp, paddingXProp, paddingYProp, restProps, selected, t0, t1, t2, t3, t4, t5, t6, t7, t8, text, textAlign, textWeight, width;
|
|
1823
|
+
const $ = reactCompilerRuntime.c(87);
|
|
1824
|
+
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;
|
|
1819
1825
|
$[0] !== props ? ({
|
|
1820
1826
|
children,
|
|
1821
1827
|
disabled,
|
|
@@ -1834,6 +1840,7 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
|
|
|
1834
1840
|
paddingRight: paddingRightProp,
|
|
1835
1841
|
radius: t4,
|
|
1836
1842
|
selected,
|
|
1843
|
+
gap,
|
|
1837
1844
|
space: t5,
|
|
1838
1845
|
text,
|
|
1839
1846
|
textAlign,
|
|
@@ -1843,42 +1850,42 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
|
|
|
1843
1850
|
muted: t8,
|
|
1844
1851
|
width,
|
|
1845
1852
|
...restProps
|
|
1846
|
-
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] =
|
|
1847
|
-
const fontSize2 = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4,
|
|
1853
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = loading, $[7] = paddingBottomProp, $[8] = paddingLeftProp, $[9] = paddingRightProp, $[10] = paddingTopProp, $[11] = paddingXProp, $[12] = paddingYProp, $[13] = restProps, $[14] = selected, $[15] = t0, $[16] = t1, $[17] = t2, $[18] = t3, $[19] = t4, $[20] = t5, $[21] = t6, $[22] = t7, $[23] = t8, $[24] = text, $[25] = textAlign, $[26] = textWeight, $[27] = width) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], loading = $[6], paddingBottomProp = $[7], paddingLeftProp = $[8], paddingRightProp = $[9], paddingTopProp = $[10], paddingXProp = $[11], paddingYProp = $[12], restProps = $[13], selected = $[14], t0 = $[15], t1 = $[16], t2 = $[17], t3 = $[18], t4 = $[19], t5 = $[20], t6 = $[21], t7 = $[22], t8 = $[23], text = $[24], textAlign = $[25], textWeight = $[26], width = $[27]);
|
|
1854
|
+
const fontSize2 = t0 === void 0 ? 1 : t0, justifyProp = t1 === void 0 ? "center" : t1, mode = t2 === void 0 ? "default" : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, tone = t6 === void 0 ? "default" : t6, type = t7 === void 0 ? "button" : t7, muted = t8 === void 0 ? !1 : t8, {
|
|
1848
1855
|
button
|
|
1849
1856
|
} = useTheme_v2();
|
|
1850
1857
|
let t9;
|
|
1851
|
-
$[
|
|
1858
|
+
$[28] !== justifyProp ? (t9 = _getArrayProp(justifyProp), $[28] = justifyProp, $[29] = t9) : t9 = $[29];
|
|
1852
1859
|
const justify = t9;
|
|
1853
1860
|
let t10;
|
|
1854
|
-
$[
|
|
1861
|
+
$[30] !== paddingProp ? (t10 = _getArrayProp(paddingProp), $[30] = paddingProp, $[31] = t10) : t10 = $[31];
|
|
1855
1862
|
const padding = t10;
|
|
1856
1863
|
let t11;
|
|
1857
|
-
$[
|
|
1864
|
+
$[32] !== paddingXProp ? (t11 = _getArrayProp(paddingXProp), $[32] = paddingXProp, $[33] = t11) : t11 = $[33];
|
|
1858
1865
|
const paddingX = t11;
|
|
1859
1866
|
let t12;
|
|
1860
|
-
$[
|
|
1867
|
+
$[34] !== paddingYProp ? (t12 = _getArrayProp(paddingYProp), $[34] = paddingYProp, $[35] = t12) : t12 = $[35];
|
|
1861
1868
|
const paddingY = t12;
|
|
1862
1869
|
let t13;
|
|
1863
|
-
$[
|
|
1870
|
+
$[36] !== paddingTopProp ? (t13 = _getArrayProp(paddingTopProp), $[36] = paddingTopProp, $[37] = t13) : t13 = $[37];
|
|
1864
1871
|
const paddingTop = t13;
|
|
1865
1872
|
let t14;
|
|
1866
|
-
$[
|
|
1873
|
+
$[38] !== paddingBottomProp ? (t14 = _getArrayProp(paddingBottomProp), $[38] = paddingBottomProp, $[39] = t14) : t14 = $[39];
|
|
1867
1874
|
const paddingBottom = t14;
|
|
1868
1875
|
let t15;
|
|
1869
|
-
$[
|
|
1876
|
+
$[40] !== paddingLeftProp ? (t15 = _getArrayProp(paddingLeftProp), $[40] = paddingLeftProp, $[41] = t15) : t15 = $[41];
|
|
1870
1877
|
const paddingLeft = t15;
|
|
1871
1878
|
let t16;
|
|
1872
|
-
$[
|
|
1879
|
+
$[42] !== paddingRightProp ? (t16 = _getArrayProp(paddingRightProp), $[42] = paddingRightProp, $[43] = t16) : t16 = $[43];
|
|
1873
1880
|
const paddingRight = t16;
|
|
1874
1881
|
let t17;
|
|
1875
|
-
$[
|
|
1876
|
-
const radius = t17;
|
|
1877
|
-
let t18;
|
|
1878
|
-
$[45] !== spaceProp ? (t18 = _getArrayProp(spaceProp), $[45] = spaceProp, $[46] = t18) : t18 = $[46];
|
|
1879
|
-
const space = t18;
|
|
1882
|
+
$[44] !== radiusProp ? (t17 = _getArrayProp(radiusProp), $[44] = radiusProp, $[45] = t17) : t17 = $[45];
|
|
1883
|
+
const radius = t17, t18 = gap === void 0 ? deprecated_space : gap;
|
|
1880
1884
|
let t19;
|
|
1881
|
-
$[
|
|
1885
|
+
$[46] !== t18 ? (t19 = _getArrayProp(t18), $[46] = t18, $[47] = t19) : t19 = $[47];
|
|
1886
|
+
const spacing = t19;
|
|
1887
|
+
let t20;
|
|
1888
|
+
$[48] !== padding || $[49] !== paddingBottom || $[50] !== paddingLeft || $[51] !== paddingRight || $[52] !== paddingTop || $[53] !== paddingX || $[54] !== paddingY ? (t20 = {
|
|
1882
1889
|
padding,
|
|
1883
1890
|
paddingX,
|
|
1884
1891
|
paddingY,
|
|
@@ -1886,12 +1893,12 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
|
|
|
1886
1893
|
paddingBottom,
|
|
1887
1894
|
paddingLeft,
|
|
1888
1895
|
paddingRight
|
|
1889
|
-
}, $[
|
|
1890
|
-
const boxProps =
|
|
1891
|
-
let t23;
|
|
1892
|
-
$[55] !== loading ? (t23 = !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }), $[55] = loading, $[56] = t23) : t23 = $[56];
|
|
1896
|
+
}, $[48] = padding, $[49] = paddingBottom, $[50] = paddingLeft, $[51] = paddingRight, $[52] = paddingTop, $[53] = paddingX, $[54] = paddingY, $[55] = t20) : t20 = $[55];
|
|
1897
|
+
const boxProps = t20, t21 = !!(loading || disabled), t22 = selected ? "" : void 0, t23 = !!(loading || disabled);
|
|
1893
1898
|
let t24;
|
|
1894
|
-
$[
|
|
1899
|
+
$[56] !== loading ? (t24 = !!loading && /* @__PURE__ */ jsxRuntime.jsx(LoadingBox, { children: /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}) }), $[56] = loading, $[57] = t24) : t24 = $[57];
|
|
1900
|
+
let t25;
|
|
1901
|
+
$[58] !== IconComponent || $[59] !== IconRightComponent || $[60] !== boxProps || $[61] !== button || $[62] !== fontSize2 || $[63] !== justify || $[64] !== muted || $[65] !== spacing || $[66] !== text || $[67] !== textAlign || $[68] !== textWeight ? (t25 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children: /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", justify, gap: spacing, children: [
|
|
1895
1902
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
1896
1903
|
react.isValidElement(IconComponent) && IconComponent,
|
|
1897
1904
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -1901,15 +1908,15 @@ const StyledButton = /* @__PURE__ */ styledComponents.styled.button.withConfig({
|
|
|
1901
1908
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
1902
1909
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
1903
1910
|
] })
|
|
1904
|
-
] }) }), $[
|
|
1905
|
-
let t25;
|
|
1906
|
-
$[69] !== boxProps || $[70] !== children ? (t25 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children }), $[69] = boxProps, $[70] = children, $[71] = t25) : t25 = $[71];
|
|
1911
|
+
] }) }), $[58] = IconComponent, $[59] = IconRightComponent, $[60] = boxProps, $[61] = button, $[62] = fontSize2, $[63] = justify, $[64] = muted, $[65] = spacing, $[66] = text, $[67] = textAlign, $[68] = textWeight, $[69] = t25) : t25 = $[69];
|
|
1907
1912
|
let t26;
|
|
1908
|
-
|
|
1909
|
-
|
|
1913
|
+
$[70] !== boxProps || $[71] !== children ? (t26 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...boxProps, children }), $[70] = boxProps, $[71] = children, $[72] = t26) : t26 = $[72];
|
|
1914
|
+
let t27;
|
|
1915
|
+
return $[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 ? (t27 = /* @__PURE__ */ jsxRuntime.jsxs(StyledButton, { "data-ui": "Button", ...restProps, $mode: mode, $radius: radius, $tone: tone, "data-disabled": t21, "data-selected": t22, disabled: t23, ref, type, $width: width, children: [
|
|
1910
1916
|
t24,
|
|
1911
|
-
t25
|
|
1912
|
-
|
|
1917
|
+
t25,
|
|
1918
|
+
t26
|
|
1919
|
+
] }), $[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;
|
|
1913
1920
|
});
|
|
1914
1921
|
Button.displayName = "ForwardRef(Button)";
|
|
1915
1922
|
function cardStyle(props) {
|
|
@@ -2680,40 +2687,44 @@ const StyledGrid = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
2680
2687
|
displayName: "StyledGrid",
|
|
2681
2688
|
componentId: "sc-v8t8oz-0"
|
|
2682
2689
|
})(responsiveGridStyle), Grid = react.forwardRef(function(props, ref) {
|
|
2683
|
-
const $ = reactCompilerRuntime.c(
|
|
2684
|
-
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, restProps, rows;
|
|
2690
|
+
const $ = reactCompilerRuntime.c(44);
|
|
2691
|
+
let as, autoCols, autoFlow, autoRows, children, columns, gap, gapX, gapY, gridTemplateColumns, gridTemplateRows, restProps, rows;
|
|
2685
2692
|
$[0] !== props ? ({
|
|
2686
2693
|
as,
|
|
2687
2694
|
autoRows,
|
|
2688
2695
|
autoCols,
|
|
2689
2696
|
autoFlow,
|
|
2690
2697
|
columns,
|
|
2698
|
+
gridTemplateColumns,
|
|
2691
2699
|
gap,
|
|
2692
2700
|
gapX,
|
|
2693
2701
|
gapY,
|
|
2694
2702
|
rows,
|
|
2703
|
+
gridTemplateRows,
|
|
2695
2704
|
children,
|
|
2696
2705
|
...restProps
|
|
2697
|
-
} = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] =
|
|
2706
|
+
} = props, $[0] = props, $[1] = as, $[2] = autoCols, $[3] = autoFlow, $[4] = autoRows, $[5] = children, $[6] = columns, $[7] = gap, $[8] = gapX, $[9] = gapY, $[10] = gridTemplateColumns, $[11] = gridTemplateRows, $[12] = restProps, $[13] = rows) : (as = $[1], autoCols = $[2], autoFlow = $[3], autoRows = $[4], children = $[5], columns = $[6], gap = $[7], gapX = $[8], gapY = $[9], gridTemplateColumns = $[10], gridTemplateRows = $[11], restProps = $[12], rows = $[13]);
|
|
2698
2707
|
const t0 = typeof as == "string" ? as : void 0;
|
|
2699
2708
|
let t1;
|
|
2700
|
-
$[
|
|
2709
|
+
$[14] !== autoRows ? (t1 = _getArrayProp(autoRows), $[14] = autoRows, $[15] = t1) : t1 = $[15];
|
|
2701
2710
|
let t2;
|
|
2702
|
-
$[
|
|
2711
|
+
$[16] !== autoCols ? (t2 = _getArrayProp(autoCols), $[16] = autoCols, $[17] = t2) : t2 = $[17];
|
|
2703
2712
|
let t3;
|
|
2704
|
-
$[
|
|
2705
|
-
|
|
2706
|
-
$[18] !== columns ? (t4 = _getArrayProp(columns), $[18] = columns, $[19] = t4) : t4 = $[19];
|
|
2713
|
+
$[18] !== autoFlow ? (t3 = _getArrayProp(autoFlow), $[18] = autoFlow, $[19] = t3) : t3 = $[19];
|
|
2714
|
+
const t4 = gridTemplateColumns === void 0 ? columns : gridTemplateColumns;
|
|
2707
2715
|
let t5;
|
|
2708
|
-
$[20] !==
|
|
2716
|
+
$[20] !== t4 ? (t5 = _getArrayProp(t4), $[20] = t4, $[21] = t5) : t5 = $[21];
|
|
2709
2717
|
let t6;
|
|
2710
|
-
$[22] !==
|
|
2718
|
+
$[22] !== gap ? (t6 = _getArrayProp(gap), $[22] = gap, $[23] = t6) : t6 = $[23];
|
|
2711
2719
|
let t7;
|
|
2712
|
-
$[24] !==
|
|
2720
|
+
$[24] !== gapX ? (t7 = _getArrayProp(gapX), $[24] = gapX, $[25] = t7) : t7 = $[25];
|
|
2713
2721
|
let t8;
|
|
2714
|
-
$[26] !==
|
|
2715
|
-
|
|
2716
|
-
|
|
2722
|
+
$[26] !== gapY ? (t8 = _getArrayProp(gapY), $[26] = gapY, $[27] = t8) : t8 = $[27];
|
|
2723
|
+
const t9 = gridTemplateRows === void 0 ? rows : gridTemplateRows;
|
|
2724
|
+
let t10;
|
|
2725
|
+
$[28] !== t9 ? (t10 = _getArrayProp(t9), $[28] = t9, $[29] = t10) : t10 = $[29];
|
|
2726
|
+
let t11;
|
|
2727
|
+
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;
|
|
2717
2728
|
});
|
|
2718
2729
|
Grid.displayName = "ForwardRef(Grid)";
|
|
2719
2730
|
function headingBaseStyle(props) {
|
|
@@ -2838,22 +2849,24 @@ const StyledInline = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
2838
2849
|
displayName: "StyledInline",
|
|
2839
2850
|
componentId: "sc-1pkiy6j-0"
|
|
2840
2851
|
})(inlineBaseStyle, inlineSpaceStyle), Inline = react.forwardRef(function(props, ref) {
|
|
2841
|
-
const $ = reactCompilerRuntime.c(
|
|
2842
|
-
let as, childrenProp,
|
|
2852
|
+
const $ = reactCompilerRuntime.c(16);
|
|
2853
|
+
let as, childrenProp, deprecated_space, gap, restProps;
|
|
2843
2854
|
$[0] !== props ? ({
|
|
2844
2855
|
as,
|
|
2845
2856
|
children: childrenProp,
|
|
2846
|
-
|
|
2857
|
+
gap,
|
|
2858
|
+
space: deprecated_space,
|
|
2847
2859
|
...restProps
|
|
2848
|
-
} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] =
|
|
2860
|
+
} = props, $[0] = props, $[1] = as, $[2] = childrenProp, $[3] = deprecated_space, $[4] = gap, $[5] = restProps) : (as = $[1], childrenProp = $[2], deprecated_space = $[3], gap = $[4], restProps = $[5]);
|
|
2861
|
+
const spacing = gap === void 0 ? deprecated_space : gap;
|
|
2849
2862
|
let t0;
|
|
2850
|
-
$[
|
|
2863
|
+
$[6] !== childrenProp ? (t0 = react.Children.map(childrenProp, _temp$5), $[6] = childrenProp, $[7] = t0) : t0 = $[7];
|
|
2851
2864
|
const children = t0;
|
|
2852
2865
|
let t1;
|
|
2853
|
-
$[
|
|
2866
|
+
$[8] !== spacing ? (t1 = _getArrayProp(spacing), $[8] = spacing, $[9] = t1) : t1 = $[9];
|
|
2854
2867
|
const t2 = ref;
|
|
2855
2868
|
let t3;
|
|
2856
|
-
return $[
|
|
2869
|
+
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;
|
|
2857
2870
|
});
|
|
2858
2871
|
Inline.displayName = "ForwardRef(Inline)";
|
|
2859
2872
|
function _temp$5(child) {
|
|
@@ -4226,45 +4239,46 @@ const selectStyle = {
|
|
|
4226
4239
|
displayName: "IconBox",
|
|
4227
4240
|
componentId: "sc-5mxno7-2"
|
|
4228
4241
|
})(selectStyle.iconBox), Select = react.forwardRef(function(props, forwardedRef) {
|
|
4229
|
-
const $ = reactCompilerRuntime.c(
|
|
4230
|
-
let children, customValidity, disabled, readOnly, restProps, t0, t1, t2, t3;
|
|
4242
|
+
const $ = reactCompilerRuntime.c(38);
|
|
4243
|
+
let children, customValidity, disabled, gap, readOnly, restProps, t0, t1, t2, t3;
|
|
4231
4244
|
$[0] !== props ? ({
|
|
4232
4245
|
children,
|
|
4233
4246
|
customValidity,
|
|
4234
4247
|
disabled,
|
|
4235
4248
|
fontSize: t0,
|
|
4249
|
+
gap,
|
|
4236
4250
|
padding: t1,
|
|
4237
4251
|
radius: t2,
|
|
4238
4252
|
readOnly,
|
|
4239
4253
|
space: t3,
|
|
4240
4254
|
...restProps
|
|
4241
|
-
} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] =
|
|
4242
|
-
const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2,
|
|
4255
|
+
} = props, $[0] = props, $[1] = children, $[2] = customValidity, $[3] = disabled, $[4] = gap, $[5] = readOnly, $[6] = restProps, $[7] = t0, $[8] = t1, $[9] = t2, $[10] = t3) : (children = $[1], customValidity = $[2], disabled = $[3], gap = $[4], readOnly = $[5], restProps = $[6], t0 = $[7], t1 = $[8], t2 = $[9], t3 = $[10]);
|
|
4256
|
+
const fontSize2 = t0 === void 0 ? 2 : t0, padding = t1 === void 0 ? 3 : t1, radius = t2 === void 0 ? 2 : t2, spacing = gap === void 0 ? t3 === void 0 ? 3 : t3 : gap, ref = react.useRef(null);
|
|
4243
4257
|
let t4;
|
|
4244
|
-
$[
|
|
4258
|
+
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => ref.current, $[11] = t4) : t4 = $[11], react.useImperativeHandle(forwardedRef, t4), useCustomValidity(ref, customValidity);
|
|
4245
4259
|
const t5 = !disabled && readOnly ? "" : void 0;
|
|
4246
4260
|
let t6;
|
|
4247
|
-
$[
|
|
4261
|
+
$[12] !== fontSize2 ? (t6 = _getArrayProp(fontSize2), $[12] = fontSize2, $[13] = t6) : t6 = $[13];
|
|
4248
4262
|
let t7;
|
|
4249
|
-
$[
|
|
4263
|
+
$[14] !== padding ? (t7 = _getArrayProp(padding), $[14] = padding, $[15] = t7) : t7 = $[15];
|
|
4250
4264
|
let t8;
|
|
4251
|
-
$[
|
|
4265
|
+
$[16] !== radius ? (t8 = _getArrayProp(radius), $[16] = radius, $[17] = t8) : t8 = $[17];
|
|
4252
4266
|
let t9;
|
|
4253
|
-
$[
|
|
4267
|
+
$[18] !== spacing ? (t9 = _getArrayProp(spacing), $[18] = spacing, $[19] = t9) : t9 = $[19];
|
|
4254
4268
|
const t10 = disabled || readOnly;
|
|
4255
4269
|
let t11;
|
|
4256
|
-
$[
|
|
4270
|
+
$[20] !== children || $[21] !== restProps || $[22] !== t10 || $[23] !== t5 || $[24] !== t6 || $[25] !== t7 || $[26] !== t8 || $[27] !== t9 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(Input$3, { "data-read-only": t5, "data-ui": "Select", ...restProps, $fontSize: t6, $padding: t7, $radius: t8, $space: t9, disabled: t10, ref, children }), $[20] = children, $[21] = restProps, $[22] = t10, $[23] = t5, $[24] = t6, $[25] = t7, $[26] = t8, $[27] = t9, $[28] = t11) : t11 = $[28];
|
|
4257
4271
|
let t12;
|
|
4258
|
-
$[
|
|
4272
|
+
$[29] === Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}), $[29] = t12) : t12 = $[29];
|
|
4259
4273
|
let t13;
|
|
4260
|
-
$[
|
|
4274
|
+
$[30] !== fontSize2 ? (t13 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: t12 }), $[30] = fontSize2, $[31] = t13) : t13 = $[31];
|
|
4261
4275
|
let t14;
|
|
4262
|
-
$[
|
|
4276
|
+
$[32] !== padding || $[33] !== t13 ? (t14 = /* @__PURE__ */ jsxRuntime.jsx(IconBox, { padding, children: t13 }), $[32] = padding, $[33] = t13, $[34] = t14) : t14 = $[34];
|
|
4263
4277
|
let t15;
|
|
4264
|
-
return $[
|
|
4278
|
+
return $[35] !== t11 || $[36] !== t14 ? (t15 = /* @__PURE__ */ jsxRuntime.jsxs(StyledSelect, { "data-ui": "Select", children: [
|
|
4265
4279
|
t11,
|
|
4266
4280
|
t14
|
|
4267
|
-
] }), $[
|
|
4281
|
+
] }), $[35] = t11, $[36] = t14, $[37] = t15) : t15 = $[37], t15;
|
|
4268
4282
|
});
|
|
4269
4283
|
Select.displayName = "ForwardRef(Select)";
|
|
4270
4284
|
const BASE_STYLE = {
|
|
@@ -4293,18 +4307,19 @@ const StyledStack = /* @__PURE__ */ styledComponents.styled(Box).withConfig({
|
|
|
4293
4307
|
displayName: "StyledStack",
|
|
4294
4308
|
componentId: "sc-8dpfq2-0"
|
|
4295
4309
|
})(stackBaseStyle, responsiveStackSpaceStyle), Stack = react.forwardRef(function(props, ref) {
|
|
4296
|
-
const $ = reactCompilerRuntime.c(
|
|
4297
|
-
let as,
|
|
4310
|
+
const $ = reactCompilerRuntime.c(13);
|
|
4311
|
+
let as, deprecated_space, gap, restProps;
|
|
4298
4312
|
$[0] !== props ? ({
|
|
4299
4313
|
as,
|
|
4300
|
-
|
|
4314
|
+
gap,
|
|
4315
|
+
space: deprecated_space,
|
|
4301
4316
|
...restProps
|
|
4302
|
-
} = props, $[0] = props, $[1] = as, $[2] =
|
|
4303
|
-
const t0 = typeof as == "string" ? as : void 0;
|
|
4317
|
+
} = props, $[0] = props, $[1] = as, $[2] = deprecated_space, $[3] = gap, $[4] = restProps) : (as = $[1], deprecated_space = $[2], gap = $[3], restProps = $[4]);
|
|
4318
|
+
const spacing = gap === void 0 ? deprecated_space : gap, t0 = typeof as == "string" ? as : void 0;
|
|
4304
4319
|
let t1;
|
|
4305
|
-
$[
|
|
4320
|
+
$[5] !== spacing ? (t1 = _getArrayProp(spacing), $[5] = spacing, $[6] = t1) : t1 = $[6];
|
|
4306
4321
|
let t2;
|
|
4307
|
-
return $[
|
|
4322
|
+
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;
|
|
4308
4323
|
});
|
|
4309
4324
|
Stack.displayName = "ForwardRef(Stack)";
|
|
4310
4325
|
function switchBaseStyles() {
|
|
@@ -4605,14 +4620,15 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4605
4620
|
display: "block"
|
|
4606
4621
|
}
|
|
4607
4622
|
}), TextInput = react.forwardRef(function(props, forwardedRef) {
|
|
4608
|
-
const $ = reactCompilerRuntime.c(
|
|
4609
|
-
let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
4623
|
+
const $ = reactCompilerRuntime.c(93);
|
|
4624
|
+
let IconComponent, IconRightComponent, __unstable_disableFocusRing, clearButton, customValidity, gap, onClear, prefix, readOnly, restProps, suffix, t0, t1, t2, t3, t4, t5, t6, weight;
|
|
4610
4625
|
$[0] !== props ? ({
|
|
4611
4626
|
__unstable_disableFocusRing,
|
|
4612
4627
|
border: t0,
|
|
4613
4628
|
clearButton,
|
|
4614
4629
|
disabled: t1,
|
|
4615
4630
|
fontSize: t2,
|
|
4631
|
+
gap,
|
|
4616
4632
|
icon: IconComponent,
|
|
4617
4633
|
iconRight: IconRightComponent,
|
|
4618
4634
|
onClear,
|
|
@@ -4626,73 +4642,73 @@ const CLEAR_BUTTON_BOX_STYLE = {
|
|
|
4626
4642
|
type: t6,
|
|
4627
4643
|
weight,
|
|
4628
4644
|
...restProps
|
|
4629
|
-
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[4] = clearButton, $[5] = customValidity, $[6] =
|
|
4630
|
-
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4,
|
|
4645
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = __unstable_disableFocusRing, $[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] = weight) : (IconComponent = $[1], IconRightComponent = $[2], __unstable_disableFocusRing = $[3], clearButton = $[4], customValidity = $[5], gap = $[6], onClear = $[7], prefix = $[8], readOnly = $[9], restProps = $[10], suffix = $[11], t0 = $[12], t1 = $[13], t2 = $[14], t3 = $[15], t4 = $[16], t5 = $[17], t6 = $[18], weight = $[19]);
|
|
4646
|
+
const border2 = t0 === void 0 ? !0 : t0, disabled = t1 === void 0 ? !1 : t1, fontSizeProp = t2 === void 0 ? 2 : t2, paddingProp = t3 === void 0 ? 3 : t3, radiusProp = t4 === void 0 ? 2 : t4, deprecated_space = t5 === void 0 ? 3 : t5, type = t6 === void 0 ? "text" : t6, ref = react.useRef(null), rootTheme = useRootTheme();
|
|
4631
4647
|
let t7;
|
|
4632
|
-
$[
|
|
4648
|
+
$[20] !== fontSizeProp ? (t7 = _getArrayProp(fontSizeProp), $[20] = fontSizeProp, $[21] = t7) : t7 = $[21];
|
|
4633
4649
|
const fontSize2 = t7;
|
|
4634
4650
|
let t8;
|
|
4635
|
-
$[
|
|
4651
|
+
$[22] !== paddingProp ? (t8 = _getArrayProp(paddingProp), $[22] = paddingProp, $[23] = t8) : t8 = $[23];
|
|
4636
4652
|
const padding = t8;
|
|
4637
4653
|
let t9;
|
|
4638
|
-
$[
|
|
4639
|
-
const radius = t9;
|
|
4640
|
-
let t10;
|
|
4641
|
-
$[25] !== spaceProp ? (t10 = _getArrayProp(spaceProp), $[25] = spaceProp, $[26] = t10) : t10 = $[26];
|
|
4642
|
-
const space = t10, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
|
|
4654
|
+
$[24] !== radiusProp ? (t9 = _getArrayProp(radiusProp), $[24] = radiusProp, $[25] = t9) : t9 = $[25];
|
|
4655
|
+
const radius = t9, t10 = gap === void 0 ? deprecated_space : gap;
|
|
4643
4656
|
let t11;
|
|
4644
|
-
$[
|
|
4645
|
-
const
|
|
4657
|
+
$[26] !== t10 ? (t11 = _getArrayProp(t10), $[26] = t10, $[27] = t11) : t11 = $[27];
|
|
4658
|
+
const space = t11, $hasClearButton = !!clearButton, $hasIcon = !!IconComponent, $hasIconRight = !!IconRightComponent, $hasSuffix = !!suffix, $hasPrefix = !!prefix;
|
|
4646
4659
|
let t12;
|
|
4647
|
-
$[28]
|
|
4648
|
-
|
|
4649
|
-
}, $[28] = onClear, $[29] = t12) : t12 = $[29];
|
|
4650
|
-
const handleClearClick = t12;
|
|
4660
|
+
$[28] === Symbol.for("react.memo_cache_sentinel") ? (t12 = () => ref.current, $[28] = t12) : t12 = $[28], react.useImperativeHandle(forwardedRef, t12), useCustomValidity(ref, customValidity);
|
|
4661
|
+
const handleClearMouseDown = _temp$2;
|
|
4651
4662
|
let t13;
|
|
4652
|
-
$[
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4663
|
+
$[29] !== onClear ? (t13 = (event_0) => {
|
|
4664
|
+
event_0.preventDefault(), event_0.stopPropagation(), onClear && onClear(), ref.current?.focus();
|
|
4665
|
+
}, $[29] = onClear, $[30] = t13) : t13 = $[30];
|
|
4666
|
+
const handleClearClick = t13;
|
|
4667
|
+
let t14;
|
|
4668
|
+
$[31] !== prefix || $[32] !== radius ? (t14 = prefix && /* @__PURE__ */ jsxRuntime.jsx(Prefix, { borderTop: !0, borderLeft: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: prefix }) }), $[31] = prefix, $[32] = radius, $[33] = t14) : t14 = $[33];
|
|
4669
|
+
const prefixNode = t14, t15 = border2 ? "" : void 0;
|
|
4670
|
+
let t16;
|
|
4671
|
+
$[34] !== IconComponent || $[35] !== fontSize2 || $[36] !== padding ? (t16 = IconComponent && /* @__PURE__ */ jsxRuntime.jsx(LeftBox, { padding, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
4656
4672
|
react.isValidElement(IconComponent) && IconComponent,
|
|
4657
4673
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
4658
|
-
] }) }), $[
|
|
4659
|
-
let
|
|
4660
|
-
$[
|
|
4674
|
+
] }) }), $[34] = IconComponent, $[35] = fontSize2, $[36] = padding, $[37] = t16) : t16 = $[37];
|
|
4675
|
+
let t17;
|
|
4676
|
+
$[38] !== $hasClearButton || $[39] !== IconRightComponent || $[40] !== fontSize2 || $[41] !== padding ? (t17 = !$hasClearButton && IconRightComponent && /* @__PURE__ */ jsxRuntime.jsx(RightBox, { padding, children: /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
4661
4677
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
4662
4678
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
4663
|
-
] }) }), $[
|
|
4664
|
-
let t17;
|
|
4665
|
-
$[42] !== $hasPrefix || $[43] !== $hasSuffix || $[44] !== __unstable_disableFocusRing || $[45] !== radius || $[46] !== rootTheme.scheme || $[47] !== rootTheme.tone || $[48] !== t14 || $[49] !== t15 || $[50] !== t16 ? (t17 = /* @__PURE__ */ jsxRuntime.jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t14, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
|
|
4666
|
-
t15,
|
|
4667
|
-
t16
|
|
4668
|
-
] }), $[42] = $hasPrefix, $[43] = $hasSuffix, $[44] = __unstable_disableFocusRing, $[45] = radius, $[46] = rootTheme.scheme, $[47] = rootTheme.tone, $[48] = t14, $[49] = t15, $[50] = t16, $[51] = t17) : t17 = $[51];
|
|
4669
|
-
const presentationNode = t17;
|
|
4679
|
+
] }) }), $[38] = $hasClearButton, $[39] = IconRightComponent, $[40] = fontSize2, $[41] = padding, $[42] = t17) : t17 = $[42];
|
|
4670
4680
|
let t18;
|
|
4671
|
-
$[
|
|
4672
|
-
|
|
4681
|
+
$[43] !== $hasPrefix || $[44] !== $hasSuffix || $[45] !== __unstable_disableFocusRing || $[46] !== radius || $[47] !== rootTheme.scheme || $[48] !== rootTheme.tone || $[49] !== t15 || $[50] !== t16 || $[51] !== t17 ? (t18 = /* @__PURE__ */ jsxRuntime.jsxs(Presentation, { $hasPrefix, $unstableDisableFocusRing: __unstable_disableFocusRing, $hasSuffix, $radius: radius, $scheme: rootTheme.scheme, $tone: rootTheme.tone, "data-border": t15, "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, children: [
|
|
4682
|
+
t16,
|
|
4683
|
+
t17
|
|
4684
|
+
] }), $[43] = $hasPrefix, $[44] = $hasSuffix, $[45] = __unstable_disableFocusRing, $[46] = radius, $[47] = rootTheme.scheme, $[48] = rootTheme.tone, $[49] = t15, $[50] = t16, $[51] = t17, $[52] = t18) : t18 = $[52];
|
|
4685
|
+
const presentationNode = t18;
|
|
4673
4686
|
let t19;
|
|
4674
|
-
$[
|
|
4675
|
-
const
|
|
4687
|
+
$[53] !== padding ? (t19 = padding.map(_temp2), $[53] = padding, $[54] = t19) : t19 = $[54];
|
|
4688
|
+
const clearButtonBoxPadding = t19;
|
|
4676
4689
|
let t20;
|
|
4677
|
-
$[
|
|
4678
|
-
const
|
|
4690
|
+
$[55] !== padding ? (t20 = padding.map(_temp3), $[55] = padding, $[56] = t20) : t20 = $[56];
|
|
4691
|
+
const clearButtonPadding = t20, clearButtonProps = typeof clearButton == "object" ? clearButton : EMPTY_RECORD;
|
|
4679
4692
|
let t21;
|
|
4680
|
-
$[
|
|
4681
|
-
const
|
|
4682
|
-
let
|
|
4683
|
-
$[
|
|
4693
|
+
$[57] !== clearButton || $[58] !== clearButtonBoxPadding || $[59] !== clearButtonPadding || $[60] !== clearButtonProps || $[61] !== customValidity || $[62] !== disabled || $[63] !== fontSize2 || $[64] !== handleClearClick || $[65] !== radius || $[66] !== readOnly ? (t21 = !disabled && !readOnly && clearButton && /* @__PURE__ */ jsxRuntime.jsx(RightCard, { forwardedAs: "span", padding: clearButtonBoxPadding, style: CLEAR_BUTTON_BOX_STYLE, tone: customValidity ? "critical" : "inherit", children: /* @__PURE__ */ jsxRuntime.jsx(TextInputClearButton, { "aria-label": "Clear", "data-qa": "clear-button", fontSize: fontSize2, icon: icons.CloseIcon, mode: "bleed", padding: clearButtonPadding, radius, ...clearButtonProps, onClick: handleClearClick, onMouseDown: handleClearMouseDown }) }), $[57] = clearButton, $[58] = clearButtonBoxPadding, $[59] = clearButtonPadding, $[60] = clearButtonProps, $[61] = customValidity, $[62] = disabled, $[63] = fontSize2, $[64] = handleClearClick, $[65] = radius, $[66] = readOnly, $[67] = t21) : t21 = $[67];
|
|
4694
|
+
const clearButtonNode = t21;
|
|
4695
|
+
let t22;
|
|
4696
|
+
$[68] !== radius || $[69] !== suffix ? (t22 = suffix && /* @__PURE__ */ jsxRuntime.jsx(Suffix, { borderTop: !0, borderRight: !0, borderBottom: !0, radius, sizing: "border", tone: "inherit", children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: suffix }) }), $[68] = radius, $[69] = suffix, $[70] = t22) : t22 = $[70];
|
|
4697
|
+
const suffixNode = t22, t23 = $hasIconRight || $hasClearButton;
|
|
4684
4698
|
let t24;
|
|
4685
|
-
$[
|
|
4686
|
-
|
|
4699
|
+
$[71] !== $hasIcon || $[72] !== disabled || $[73] !== fontSize2 || $[74] !== padding || $[75] !== readOnly || $[76] !== restProps || $[77] !== rootTheme.scheme || $[78] !== rootTheme.tone || $[79] !== space || $[80] !== t23 || $[81] !== type || $[82] !== weight ? (t24 = /* @__PURE__ */ jsxRuntime.jsx(Input, { "data-as": "input", "data-scheme": rootTheme.scheme, "data-tone": rootTheme.tone, ...restProps, $fontSize: fontSize2, $iconLeft: $hasIcon, $iconRight: t23, $padding: padding, $scheme: rootTheme.scheme, $space: space, $tone: rootTheme.tone, $weight: weight, disabled, readOnly, ref, type }), $[71] = $hasIcon, $[72] = disabled, $[73] = fontSize2, $[74] = padding, $[75] = readOnly, $[76] = restProps, $[77] = rootTheme.scheme, $[78] = rootTheme.tone, $[79] = space, $[80] = t23, $[81] = type, $[82] = weight, $[83] = t24) : t24 = $[83];
|
|
4700
|
+
let t25;
|
|
4701
|
+
$[84] !== clearButtonNode || $[85] !== presentationNode || $[86] !== t24 ? (t25 = /* @__PURE__ */ jsxRuntime.jsxs(InputRoot, { children: [
|
|
4702
|
+
t24,
|
|
4687
4703
|
presentationNode,
|
|
4688
4704
|
clearButtonNode
|
|
4689
|
-
] }), $[
|
|
4690
|
-
let
|
|
4691
|
-
return $[
|
|
4705
|
+
] }), $[84] = clearButtonNode, $[85] = presentationNode, $[86] = t24, $[87] = t25) : t25 = $[87];
|
|
4706
|
+
let t26;
|
|
4707
|
+
return $[88] !== prefixNode || $[89] !== rootTheme.tone || $[90] !== suffixNode || $[91] !== t25 ? (t26 = /* @__PURE__ */ jsxRuntime.jsxs(StyledTextInput, { "data-ui": "TextInput", tone: rootTheme.tone, children: [
|
|
4692
4708
|
prefixNode,
|
|
4693
|
-
|
|
4709
|
+
t25,
|
|
4694
4710
|
suffixNode
|
|
4695
|
-
] }), $[
|
|
4711
|
+
] }), $[88] = prefixNode, $[89] = rootTheme.tone, $[90] = suffixNode, $[91] = t25, $[92] = t26) : t26 = $[92], t26;
|
|
4696
4712
|
});
|
|
4697
4713
|
TextInput.displayName = "ForwardRef(TextInput)";
|
|
4698
4714
|
function _temp$2(event) {
|
|
@@ -4705,7 +4721,7 @@ function _temp3(v_0) {
|
|
|
4705
4721
|
return v_0 === 0 || v_0 === 1 ? 0 : v_0 === 2 ? 1 : v_0 - 1;
|
|
4706
4722
|
}
|
|
4707
4723
|
function useDelayedState(initialState) {
|
|
4708
|
-
const $ = reactCompilerRuntime.c(
|
|
4724
|
+
const $ = reactCompilerRuntime.c(5), [state, setState] = react.useState(initialState), delayedAction = react.useRef(void 0);
|
|
4709
4725
|
let t0;
|
|
4710
4726
|
$[0] === Symbol.for("react.memo_cache_sentinel") ? (t0 = (nextState, delay) => {
|
|
4711
4727
|
const action = () => {
|
|
@@ -4716,8 +4732,12 @@ function useDelayedState(initialState) {
|
|
|
4716
4732
|
delayedAction.current = setTimeout(action, delay);
|
|
4717
4733
|
}, $[0] = t0) : t0 = $[0];
|
|
4718
4734
|
const onStateChange = t0;
|
|
4719
|
-
let t1;
|
|
4720
|
-
|
|
4735
|
+
let t1, t2;
|
|
4736
|
+
$[1] === Symbol.for("react.memo_cache_sentinel") ? (t1 = () => () => {
|
|
4737
|
+
delayedAction.current && clearTimeout(delayedAction.current);
|
|
4738
|
+
}, t2 = [], $[1] = t1, $[2] = t2) : (t1 = $[1], t2 = $[2]), react.useEffect(t1, t2);
|
|
4739
|
+
let t3;
|
|
4740
|
+
return $[3] !== state ? (t3 = [state, onStateChange], $[3] = state, $[4] = t3) : t3 = $[4], t3;
|
|
4721
4741
|
}
|
|
4722
4742
|
const DEFAULT_TOOLTIP_ARROW_WIDTH = 15, DEFAULT_TOOLTIP_ARROW_HEIGHT = 6, DEFAULT_TOOLTIP_ARROW_RADIUS = 2, DEFAULT_TOOLTIP_DISTANCE = 4, DEFAULT_TOOLTIP_PADDING = 4, DEFAULT_FALLBACK_PLACEMENTS = {
|
|
4723
4743
|
top: ["top-end", "top-start", "bottom", "left", "right"],
|
|
@@ -5086,34 +5106,35 @@ const StyledHotkeys = styledComponents.styled.kbd.withConfig({
|
|
|
5086
5106
|
displayName: "Key",
|
|
5087
5107
|
componentId: "sc-b37mge-1"
|
|
5088
5108
|
})`&:not([hidden]){display:block;}`, Hotkeys = react.forwardRef(function(props, ref) {
|
|
5089
|
-
const $ = reactCompilerRuntime.c(
|
|
5090
|
-
let fontSize2, keys, padding, radius, restProps, t0;
|
|
5109
|
+
const $ = reactCompilerRuntime.c(27);
|
|
5110
|
+
let fontSize2, gap, keys, padding, radius, restProps, t0;
|
|
5091
5111
|
$[0] !== props ? ({
|
|
5092
5112
|
fontSize: fontSize2,
|
|
5113
|
+
gap,
|
|
5093
5114
|
keys,
|
|
5094
5115
|
padding,
|
|
5095
5116
|
radius,
|
|
5096
5117
|
space: t0,
|
|
5097
5118
|
...restProps
|
|
5098
|
-
} = props, $[0] = props, $[1] = fontSize2, $[2] =
|
|
5099
|
-
const
|
|
5100
|
-
let t1;
|
|
5101
|
-
$[7] !== spaceProp ? (t1 = _getArrayProp(spaceProp), $[7] = spaceProp, $[8] = t1) : t1 = $[8];
|
|
5102
|
-
const space = t1;
|
|
5103
|
-
if (!keys || keys.length === 0) {
|
|
5104
|
-
let t22;
|
|
5105
|
-
return $[9] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[9] = t22) : t22 = $[9], t22;
|
|
5106
|
-
}
|
|
5119
|
+
} = props, $[0] = props, $[1] = fontSize2, $[2] = gap, $[3] = keys, $[4] = padding, $[5] = radius, $[6] = restProps, $[7] = t0) : (fontSize2 = $[1], gap = $[2], keys = $[3], padding = $[4], radius = $[5], restProps = $[6], t0 = $[7]);
|
|
5120
|
+
const t1 = gap === void 0 ? t0 === void 0 ? 0.5 : t0 : gap;
|
|
5107
5121
|
let t2;
|
|
5108
|
-
|
|
5122
|
+
$[8] !== t1 ? (t2 = _getArrayProp(t1), $[8] = t1, $[9] = t2) : t2 = $[9];
|
|
5123
|
+
const spacing = t2;
|
|
5124
|
+
if (!keys || keys.length === 0) {
|
|
5109
5125
|
let t32;
|
|
5110
|
-
|
|
5111
|
-
}
|
|
5112
|
-
t2 = $[14];
|
|
5126
|
+
return $[10] === Symbol.for("react.memo_cache_sentinel") ? (t32 = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {}), $[10] = t32) : t32 = $[10], t32;
|
|
5127
|
+
}
|
|
5113
5128
|
let t3;
|
|
5114
|
-
$[
|
|
5129
|
+
if ($[11] !== fontSize2 || $[12] !== keys || $[13] !== padding || $[14] !== radius) {
|
|
5130
|
+
let t42;
|
|
5131
|
+
$[16] !== fontSize2 || $[17] !== padding || $[18] !== radius ? (t42 = (key2, i) => /* @__PURE__ */ jsxRuntime.jsx(Key, { fontSize: fontSize2, padding, radius, children: key2 }, i), $[16] = fontSize2, $[17] = padding, $[18] = radius, $[19] = t42) : t42 = $[19], t3 = keys.map(t42), $[11] = fontSize2, $[12] = keys, $[13] = padding, $[14] = radius, $[15] = t3;
|
|
5132
|
+
} else
|
|
5133
|
+
t3 = $[15];
|
|
5115
5134
|
let t4;
|
|
5116
|
-
|
|
5135
|
+
$[20] !== spacing || $[21] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(Inline, { as: "span", gap: spacing, children: t3 }), $[20] = spacing, $[21] = t3, $[22] = t4) : t4 = $[22];
|
|
5136
|
+
let t5;
|
|
5137
|
+
return $[23] !== ref || $[24] !== restProps || $[25] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(StyledHotkeys, { "data-ui": "Hotkeys", ...restProps, ref, children: t4 }), $[23] = ref, $[24] = restProps, $[25] = t4, $[26] = t5) : t5 = $[26], t5;
|
|
5117
5138
|
});
|
|
5118
5139
|
Hotkeys.displayName = "ForwardRef(Hotkeys)";
|
|
5119
5140
|
const MenuContext = createGlobalScopedContext("@sanity/ui/context/menu", null);
|
|
@@ -5286,8 +5307,8 @@ const StyledMenu = styledComponents.styled(Box).withConfig({
|
|
|
5286
5307
|
displayName: "StyledMenu",
|
|
5287
5308
|
componentId: "sc-xt0tnv-0"
|
|
5288
5309
|
})`outline:none;overflow:auto;`, Menu = react.forwardRef(function(props, forwardedRef) {
|
|
5289
|
-
const $ = reactCompilerRuntime.c(
|
|
5290
|
-
let _shouldFocus, children, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
|
|
5310
|
+
const $ = reactCompilerRuntime.c(50);
|
|
5311
|
+
let _shouldFocus, children, gap, onClickOutside, onEscape, onItemClick, onItemSelect, onKeyDown, originElement, registerElement, restProps, t0, t1;
|
|
5291
5312
|
if ($[0] !== props) {
|
|
5292
5313
|
const {
|
|
5293
5314
|
children: t22,
|
|
@@ -5302,25 +5323,26 @@ const StyledMenu = styledComponents.styled(Box).withConfig({
|
|
|
5302
5323
|
padding: t92,
|
|
5303
5324
|
registerElement: t102,
|
|
5304
5325
|
shouldFocus: t112,
|
|
5305
|
-
|
|
5306
|
-
|
|
5326
|
+
gap: t122,
|
|
5327
|
+
space: t13,
|
|
5328
|
+
...t14
|
|
5307
5329
|
} = props;
|
|
5308
|
-
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112,
|
|
5330
|
+
children = t22, onClickOutside = t32, onEscape = t42, onItemClick = t52, onItemSelect = t62, onKeyDown = t72, originElement = t82, t0 = t92, registerElement = t102, _shouldFocus = t112, gap = t122, t1 = t13, restProps = t14, $[0] = props, $[1] = _shouldFocus, $[2] = children, $[3] = gap, $[4] = onClickOutside, $[5] = onEscape, $[6] = onItemClick, $[7] = onItemSelect, $[8] = onKeyDown, $[9] = originElement, $[10] = registerElement, $[11] = restProps, $[12] = t0, $[13] = t1;
|
|
5309
5331
|
} else
|
|
5310
|
-
_shouldFocus = $[1], children = $[2],
|
|
5311
|
-
const padding = t0 === void 0 ? 1 : t0,
|
|
5332
|
+
_shouldFocus = $[1], children = $[2], gap = $[3], onClickOutside = $[4], onEscape = $[5], onItemClick = $[6], onItemSelect = $[7], onKeyDown = $[8], originElement = $[9], registerElement = $[10], restProps = $[11], t0 = $[12], t1 = $[13];
|
|
5333
|
+
const padding = t0 === void 0 ? 1 : t0, spacing = gap === void 0 ? t1 === void 0 ? 1 : t1 : gap, shouldFocus = _shouldFocus ?? (props.focusFirst && "first" || props.focusLast && "last" || null), ref = react.useRef(null);
|
|
5312
5334
|
let t2;
|
|
5313
|
-
$[
|
|
5335
|
+
$[14] === Symbol.for("react.memo_cache_sentinel") ? (t2 = () => ref.current, $[14] = t2) : t2 = $[14], react.useImperativeHandle(forwardedRef, t2);
|
|
5314
5336
|
const {
|
|
5315
5337
|
isTopLayer
|
|
5316
5338
|
} = useLayer();
|
|
5317
5339
|
let t3;
|
|
5318
|
-
$[
|
|
5340
|
+
$[15] !== onKeyDown || $[16] !== originElement || $[17] !== shouldFocus ? (t3 = {
|
|
5319
5341
|
onKeyDown,
|
|
5320
5342
|
originElement,
|
|
5321
5343
|
shouldFocus,
|
|
5322
5344
|
rootElementRef: ref
|
|
5323
|
-
}, $[
|
|
5345
|
+
}, $[15] = onKeyDown, $[16] = originElement, $[17] = shouldFocus, $[18] = t3) : t3 = $[18];
|
|
5324
5346
|
const {
|
|
5325
5347
|
activeElement,
|
|
5326
5348
|
activeIndex,
|
|
@@ -5330,22 +5352,22 @@ const StyledMenu = styledComponents.styled(Box).withConfig({
|
|
|
5330
5352
|
mount
|
|
5331
5353
|
} = useMenuController(t3), unregisterElementRef = react.useRef(null);
|
|
5332
5354
|
let t4;
|
|
5333
|
-
$[
|
|
5355
|
+
$[19] !== registerElement ? (t4 = (el) => {
|
|
5334
5356
|
unregisterElementRef.current && (unregisterElementRef.current(), unregisterElementRef.current = null), ref.current = el, ref.current && registerElement && (unregisterElementRef.current = registerElement(ref.current));
|
|
5335
|
-
}, $[
|
|
5357
|
+
}, $[19] = registerElement, $[20] = t4) : t4 = $[20];
|
|
5336
5358
|
const handleRefChange = t4;
|
|
5337
5359
|
let t5, t6;
|
|
5338
|
-
$[
|
|
5360
|
+
$[21] !== activeIndex || $[22] !== onItemSelect ? (t5 = () => {
|
|
5339
5361
|
onItemSelect && onItemSelect(activeIndex);
|
|
5340
|
-
}, t6 = [activeIndex, onItemSelect], $[
|
|
5362
|
+
}, t6 = [activeIndex, onItemSelect], $[21] = activeIndex, $[22] = onItemSelect, $[23] = t5, $[24] = t6) : (t5 = $[23], t6 = $[24]), react.useEffect(t5, t6);
|
|
5341
5363
|
let t7;
|
|
5342
|
-
$[
|
|
5364
|
+
$[25] === Symbol.for("react.memo_cache_sentinel") ? (t7 = () => [ref.current], $[25] = t7) : t7 = $[25], useClickOutsideEvent(isTopLayer && onClickOutside, t7);
|
|
5343
5365
|
let t8;
|
|
5344
|
-
$[
|
|
5366
|
+
$[26] !== isTopLayer || $[27] !== onEscape ? (t8 = (event) => {
|
|
5345
5367
|
isTopLayer && event.key === "Escape" && (event.stopPropagation(), onEscape && onEscape());
|
|
5346
|
-
}, $[
|
|
5368
|
+
}, $[26] = isTopLayer, $[27] = onEscape, $[28] = t8) : t8 = $[28], useGlobalKeyDown(t8);
|
|
5347
5369
|
let t9;
|
|
5348
|
-
$[
|
|
5370
|
+
$[29] !== activeElement || $[30] !== handleItemMouseEnter || $[31] !== handleItemMouseLeave || $[32] !== mount || $[33] !== onClickOutside || $[34] !== onEscape || $[35] !== onItemClick || $[36] !== registerElement ? (t9 = {
|
|
5349
5371
|
version: 2,
|
|
5350
5372
|
activeElement,
|
|
5351
5373
|
mount,
|
|
@@ -5355,14 +5377,14 @@ const StyledMenu = styledComponents.styled(Box).withConfig({
|
|
|
5355
5377
|
onItemMouseEnter: handleItemMouseEnter,
|
|
5356
5378
|
onItemMouseLeave: handleItemMouseLeave,
|
|
5357
5379
|
registerElement
|
|
5358
|
-
}, $[
|
|
5380
|
+
}, $[29] = activeElement, $[30] = handleItemMouseEnter, $[31] = handleItemMouseLeave, $[32] = mount, $[33] = onClickOutside, $[34] = onEscape, $[35] = onItemClick, $[36] = registerElement, $[37] = t9) : t9 = $[37];
|
|
5359
5381
|
const value = t9;
|
|
5360
5382
|
let t10;
|
|
5361
|
-
$[
|
|
5383
|
+
$[38] !== children || $[39] !== spacing ? (t10 = /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: spacing, children }), $[38] = children, $[39] = spacing, $[40] = t10) : t10 = $[40];
|
|
5362
5384
|
let t11;
|
|
5363
|
-
$[
|
|
5385
|
+
$[41] !== handleKeyDown || $[42] !== handleRefChange || $[43] !== padding || $[44] !== restProps || $[45] !== t10 ? (t11 = /* @__PURE__ */ jsxRuntime.jsx(StyledMenu, { "data-ui": "Menu", ...restProps, onKeyDown: handleKeyDown, padding, ref: handleRefChange, role: "menu", tabIndex: -1, children: t10 }), $[41] = handleKeyDown, $[42] = handleRefChange, $[43] = padding, $[44] = restProps, $[45] = t10, $[46] = t11) : t11 = $[46];
|
|
5364
5386
|
let t12;
|
|
5365
|
-
return $[
|
|
5387
|
+
return $[47] !== t11 || $[48] !== value ? (t12 = /* @__PURE__ */ jsxRuntime.jsx(MenuContext.Provider, { value, children: t11 }), $[47] = t11, $[48] = value, $[49] = t12) : t12 = $[49], t12;
|
|
5366
5388
|
});
|
|
5367
5389
|
Menu.displayName = "ForwardRef(Menu)";
|
|
5368
5390
|
const MenuDivider = styledComponents.styled.hr.withConfig({
|
|
@@ -5484,8 +5506,8 @@ function useMenu() {
|
|
|
5484
5506
|
return value;
|
|
5485
5507
|
}
|
|
5486
5508
|
function MenuGroup(props) {
|
|
5487
|
-
const $ = reactCompilerRuntime.c(
|
|
5488
|
-
let IconComponent, children, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
5509
|
+
const $ = reactCompilerRuntime.c(82);
|
|
5510
|
+
let IconComponent, children, gap, menuProps, onClick, popover, restProps, t0, t1, t2, t3, t4, t5, text;
|
|
5489
5511
|
$[0] !== props ? ({
|
|
5490
5512
|
as: t0,
|
|
5491
5513
|
children,
|
|
@@ -5496,12 +5518,13 @@ function MenuGroup(props) {
|
|
|
5496
5518
|
padding: t2,
|
|
5497
5519
|
popover,
|
|
5498
5520
|
radius: t3,
|
|
5521
|
+
gap,
|
|
5499
5522
|
space: t4,
|
|
5500
5523
|
text,
|
|
5501
5524
|
tone: t5,
|
|
5502
5525
|
...restProps
|
|
5503
|
-
} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] =
|
|
5504
|
-
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3,
|
|
5526
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = children, $[3] = gap, $[4] = menuProps, $[5] = onClick, $[6] = popover, $[7] = restProps, $[8] = t0, $[9] = t1, $[10] = t2, $[11] = t3, $[12] = t4, $[13] = t5, $[14] = text) : (IconComponent = $[1], children = $[2], gap = $[3], menuProps = $[4], onClick = $[5], popover = $[6], restProps = $[7], t0 = $[8], t1 = $[9], t2 = $[10], t3 = $[11], t4 = $[12], t5 = $[13], text = $[14]);
|
|
5527
|
+
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, deprecated_space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, spacing = gap === void 0 ? deprecated_space : gap, menu = useMenu(), {
|
|
5505
5528
|
scheme
|
|
5506
5529
|
} = useRootTheme(), {
|
|
5507
5530
|
activeElement,
|
|
@@ -5513,88 +5536,88 @@ function MenuGroup(props) {
|
|
|
5513
5536
|
registerElement
|
|
5514
5537
|
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, [rootElement, setRootElement] = react.useState(null), [open, setOpen] = react.useState(!1), [shouldFocus, setShouldFocus] = react.useState(null), active = !!activeElement && activeElement === rootElement, [withinMenu, setWithinMenu] = react.useState(!1);
|
|
5515
5538
|
let t6;
|
|
5516
|
-
$[
|
|
5539
|
+
$[15] !== onItemMouseEnter ? (t6 = (event) => {
|
|
5517
5540
|
setWithinMenu(!1), onItemMouseEnter(event), setOpen(!0);
|
|
5518
|
-
}, $[
|
|
5541
|
+
}, $[15] = onItemMouseEnter, $[16] = t6) : t6 = $[16];
|
|
5519
5542
|
const handleMouseEnter = t6;
|
|
5520
5543
|
let t7;
|
|
5521
|
-
$[
|
|
5544
|
+
$[17] !== rootElement ? (t7 = (event_0) => {
|
|
5522
5545
|
event_0.key === "ArrowLeft" && (event_0.stopPropagation(), setOpen(!1), requestAnimationFrame(() => {
|
|
5523
5546
|
rootElement?.focus();
|
|
5524
5547
|
}));
|
|
5525
|
-
}, $[
|
|
5548
|
+
}, $[17] = rootElement, $[18] = t7) : t7 = $[18];
|
|
5526
5549
|
const handleMenuKeyDown = t7;
|
|
5527
5550
|
let t8;
|
|
5528
|
-
$[
|
|
5551
|
+
$[19] !== onClick ? (t8 = (event_1) => {
|
|
5529
5552
|
onClick?.(event_1), setShouldFocus("first"), setOpen(!0);
|
|
5530
|
-
}, $[
|
|
5553
|
+
}, $[19] = onClick, $[20] = t8) : t8 = $[20];
|
|
5531
5554
|
const handleClick = t8;
|
|
5532
5555
|
let t9;
|
|
5533
|
-
$[
|
|
5556
|
+
$[21] !== onItemClick ? (t9 = () => {
|
|
5534
5557
|
setOpen(!1), onItemClick?.();
|
|
5535
|
-
}, $[
|
|
5558
|
+
}, $[21] = onItemClick, $[22] = t9) : t9 = $[22];
|
|
5536
5559
|
const handleChildItemClick = t9;
|
|
5537
5560
|
let t10;
|
|
5538
|
-
$[
|
|
5561
|
+
$[23] === Symbol.for("react.memo_cache_sentinel") ? (t10 = () => setWithinMenu(!0), $[23] = t10) : t10 = $[23];
|
|
5539
5562
|
const handleMenuMouseEnter = t10;
|
|
5540
5563
|
let t11, t12;
|
|
5541
|
-
$[
|
|
5564
|
+
$[24] !== mount || $[25] !== rootElement ? (t11 = () => mount(rootElement), t12 = [mount, rootElement], $[24] = mount, $[25] = rootElement, $[26] = t11, $[27] = t12) : (t11 = $[26], t12 = $[27]), react.useEffect(t11, t12);
|
|
5542
5565
|
let t13, t14;
|
|
5543
|
-
$[
|
|
5566
|
+
$[28] !== active ? (t13 = () => {
|
|
5544
5567
|
active || setOpen(!1);
|
|
5545
|
-
}, t14 = [active], $[
|
|
5568
|
+
}, t14 = [active], $[28] = active, $[29] = t13, $[30] = t14) : (t13 = $[29], t14 = $[30]), react.useEffect(t13, t14);
|
|
5546
5569
|
let t15, t16;
|
|
5547
|
-
$[
|
|
5570
|
+
$[31] !== open ? (t15 = () => {
|
|
5548
5571
|
open || setWithinMenu(!1);
|
|
5549
|
-
}, t16 = [open], $[
|
|
5572
|
+
}, t16 = [open], $[31] = open, $[32] = t15, $[33] = t16) : (t15 = $[32], t16 = $[33]), react.useEffect(t15, t16);
|
|
5550
5573
|
let t17, t18;
|
|
5551
|
-
$[
|
|
5574
|
+
$[34] !== shouldFocus ? (t17 = () => {
|
|
5552
5575
|
if (!shouldFocus)
|
|
5553
5576
|
return;
|
|
5554
5577
|
const rafId = requestAnimationFrame(() => setShouldFocus(null));
|
|
5555
5578
|
return () => cancelAnimationFrame(rafId);
|
|
5556
|
-
}, t18 = [shouldFocus], $[
|
|
5579
|
+
}, t18 = [shouldFocus], $[34] = shouldFocus, $[35] = t17, $[36] = t18) : (t17 = $[35], t18 = $[36]), react.useEffect(t17, t18);
|
|
5557
5580
|
let t19;
|
|
5558
|
-
$[
|
|
5581
|
+
$[37] !== children || $[38] !== handleChildItemClick || $[39] !== handleMenuKeyDown || $[40] !== menuProps || $[41] !== onClickOutside || $[42] !== onEscape || $[43] !== registerElement || $[44] !== shouldFocus ? (t19 = /* @__PURE__ */ jsxRuntime.jsx(Menu, { ...menuProps, onClickOutside, onEscape, onItemClick: handleChildItemClick, onKeyDown: handleMenuKeyDown, onMouseEnter: handleMenuMouseEnter, registerElement, shouldFocus, children }), $[37] = children, $[38] = handleChildItemClick, $[39] = handleMenuKeyDown, $[40] = menuProps, $[41] = onClickOutside, $[42] = onEscape, $[43] = registerElement, $[44] = shouldFocus, $[45] = t19) : t19 = $[45];
|
|
5559
5582
|
const childMenu = t19;
|
|
5560
5583
|
let t20;
|
|
5561
|
-
$[
|
|
5584
|
+
$[46] === Symbol.for("react.memo_cache_sentinel") ? (t20 = (event_2) => {
|
|
5562
5585
|
const target = event_2.currentTarget;
|
|
5563
5586
|
if (document.activeElement === target && event_2.key === "ArrowRight") {
|
|
5564
5587
|
setShouldFocus("first"), setOpen(!0), setWithinMenu(!0);
|
|
5565
5588
|
return;
|
|
5566
5589
|
}
|
|
5567
|
-
}, $[
|
|
5590
|
+
}, $[46] = t20) : t20 = $[46];
|
|
5568
5591
|
const handleKeyDown = t20, t21 = as === "button" ? withinMenu : void 0, t22 = as !== "button" ? withinMenu : void 0, t23 = !withinMenu && active ? "" : void 0;
|
|
5569
5592
|
let t24;
|
|
5570
|
-
$[
|
|
5593
|
+
$[47] !== radius ? (t24 = _getArrayProp(radius), $[47] = radius, $[48] = t24) : t24 = $[48];
|
|
5571
5594
|
const t25 = as === "button" ? "button" : void 0;
|
|
5572
5595
|
let t26;
|
|
5573
|
-
$[
|
|
5596
|
+
$[49] !== IconComponent || $[50] !== fontSize2 ? (t26 = IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
5574
5597
|
react.isValidElement(IconComponent) && IconComponent,
|
|
5575
5598
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
5576
|
-
] }), $[
|
|
5599
|
+
] }), $[49] = IconComponent, $[50] = fontSize2, $[51] = t26) : t26 = $[51];
|
|
5577
5600
|
let t27;
|
|
5578
|
-
$[
|
|
5601
|
+
$[52] !== fontSize2 || $[53] !== text ? (t27 = /* @__PURE__ */ jsxRuntime.jsx(Box, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, textOverflow: "ellipsis", weight: "medium", children: text }) }), $[52] = fontSize2, $[53] = text, $[54] = t27) : t27 = $[54];
|
|
5579
5602
|
let t28;
|
|
5580
|
-
$[
|
|
5603
|
+
$[55] === Symbol.for("react.memo_cache_sentinel") ? (t28 = /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronRightIcon, {}), $[55] = t28) : t28 = $[55];
|
|
5581
5604
|
let t29;
|
|
5582
|
-
$[
|
|
5605
|
+
$[56] !== fontSize2 ? (t29 = /* @__PURE__ */ jsxRuntime.jsx(Text, { size: fontSize2, children: t28 }), $[56] = fontSize2, $[57] = t29) : t29 = $[57];
|
|
5583
5606
|
let t30;
|
|
5584
|
-
$[
|
|
5607
|
+
$[58] !== padding || $[59] !== spacing || $[60] !== t26 || $[61] !== t27 || $[62] !== t29 ? (t30 = /* @__PURE__ */ jsxRuntime.jsxs(Flex, { gap: spacing, padding, children: [
|
|
5585
5608
|
t26,
|
|
5586
5609
|
t27,
|
|
5587
5610
|
t29
|
|
5588
|
-
] }), $[
|
|
5611
|
+
] }), $[58] = padding, $[59] = spacing, $[60] = t26, $[61] = t27, $[62] = t29, $[63] = t30) : t30 = $[63];
|
|
5589
5612
|
let t31;
|
|
5590
|
-
$[
|
|
5613
|
+
$[64] !== as || $[65] !== handleClick || $[66] !== handleMouseEnter || $[67] !== restProps || $[68] !== scheme || $[69] !== t21 || $[70] !== t22 || $[71] !== t23 || $[72] !== t24 || $[73] !== t25 || $[74] !== t30 || $[75] !== tone ? (t31 = /* @__PURE__ */ jsxRuntime.jsx(Selectable, { "data-as": as, "data-ui": "MenuGroup", forwardedAs: as, ...restProps, "aria-pressed": t21, "data-pressed": t22, "data-selected": t23, $radius: t24, $tone: tone, $scheme: scheme, onClick: handleClick, onKeyDown: handleKeyDown, onMouseEnter: handleMouseEnter, ref: setRootElement, tabIndex: -1, type: t25, children: t30 }), $[64] = as, $[65] = handleClick, $[66] = handleMouseEnter, $[67] = restProps, $[68] = scheme, $[69] = t21, $[70] = t22, $[71] = t23, $[72] = t24, $[73] = t25, $[74] = t30, $[75] = tone, $[76] = t31) : t31 = $[76];
|
|
5591
5614
|
let t32;
|
|
5592
|
-
return $[
|
|
5615
|
+
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;
|
|
5593
5616
|
}
|
|
5594
5617
|
MenuGroup.displayName = "MenuGroup";
|
|
5595
5618
|
const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
5596
|
-
const $ = reactCompilerRuntime.c(
|
|
5597
|
-
let IconComponent, IconRightComponent, children, disabled, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
5619
|
+
const $ = reactCompilerRuntime.c(76);
|
|
5620
|
+
let IconComponent, IconRightComponent, children, disabled, gap, hotkeys, onClick, paddingBottom, paddingLeft, paddingRight, paddingTop, paddingX, paddingY, pressed, restProps, selectedProp, t0, t1, t2, t3, t4, t5, text;
|
|
5598
5621
|
$[0] !== props ? ({
|
|
5599
5622
|
as: t0,
|
|
5600
5623
|
children,
|
|
@@ -5614,12 +5637,13 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
5614
5637
|
pressed,
|
|
5615
5638
|
radius: t3,
|
|
5616
5639
|
selected: selectedProp,
|
|
5640
|
+
gap,
|
|
5617
5641
|
space: t4,
|
|
5618
5642
|
text,
|
|
5619
5643
|
tone: t5,
|
|
5620
5644
|
...restProps
|
|
5621
|
-
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] =
|
|
5622
|
-
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3,
|
|
5645
|
+
} = props, $[0] = props, $[1] = IconComponent, $[2] = IconRightComponent, $[3] = children, $[4] = disabled, $[5] = gap, $[6] = hotkeys, $[7] = onClick, $[8] = paddingBottom, $[9] = paddingLeft, $[10] = paddingRight, $[11] = paddingTop, $[12] = paddingX, $[13] = paddingY, $[14] = pressed, $[15] = restProps, $[16] = selectedProp, $[17] = t0, $[18] = t1, $[19] = t2, $[20] = t3, $[21] = t4, $[22] = t5, $[23] = text) : (IconComponent = $[1], IconRightComponent = $[2], children = $[3], disabled = $[4], gap = $[5], hotkeys = $[6], onClick = $[7], paddingBottom = $[8], paddingLeft = $[9], paddingRight = $[10], paddingTop = $[11], paddingX = $[12], paddingY = $[13], pressed = $[14], restProps = $[15], selectedProp = $[16], t0 = $[17], t1 = $[18], t2 = $[19], t3 = $[20], t4 = $[21], t5 = $[22], text = $[23]);
|
|
5646
|
+
const as = t0 === void 0 ? "button" : t0, fontSize2 = t1 === void 0 ? 1 : t1, padding = t2 === void 0 ? 3 : t2, radius = t3 === void 0 ? 2 : t3, deprecated_space = t4 === void 0 ? 3 : t4, tone = t5 === void 0 ? "default" : t5, spacing = gap === void 0 ? deprecated_space : gap, {
|
|
5623
5647
|
scheme
|
|
5624
5648
|
} = useRootTheme(), menu = useMenu(), {
|
|
5625
5649
|
activeElement,
|
|
@@ -5629,16 +5653,16 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
5629
5653
|
onItemMouseLeave: _onItemMouseLeave
|
|
5630
5654
|
} = menu, onItemMouseEnter = _onItemMouseEnter ?? menu.onItemMouseEnter, onItemMouseLeave = _onItemMouseLeave ?? menu.onItemMouseLeave, [rootElement, setRootElement] = react.useState(null), active = !!activeElement && activeElement === rootElement, ref = react.useRef(null);
|
|
5631
5655
|
let t6;
|
|
5632
|
-
$[
|
|
5656
|
+
$[24] === Symbol.for("react.memo_cache_sentinel") ? (t6 = () => ref.current, $[24] = t6) : t6 = $[24], react.useImperativeHandle(forwardedRef, t6);
|
|
5633
5657
|
let t7, t8;
|
|
5634
|
-
$[
|
|
5658
|
+
$[25] !== mount || $[26] !== rootElement || $[27] !== selectedProp ? (t7 = () => mount(rootElement, selectedProp), t8 = [mount, rootElement, selectedProp], $[25] = mount, $[26] = rootElement, $[27] = selectedProp, $[28] = t7, $[29] = t8) : (t7 = $[28], t8 = $[29]), react.useEffect(t7, t8);
|
|
5635
5659
|
let t9;
|
|
5636
|
-
$[
|
|
5660
|
+
$[30] !== disabled || $[31] !== onClick || $[32] !== onItemClick ? (t9 = (event) => {
|
|
5637
5661
|
disabled || (onClick && onClick(event), onItemClick && onItemClick());
|
|
5638
|
-
}, $[
|
|
5662
|
+
}, $[30] = disabled, $[31] = onClick, $[32] = onItemClick, $[33] = t9) : t9 = $[33];
|
|
5639
5663
|
const handleClick = t9;
|
|
5640
5664
|
let t10;
|
|
5641
|
-
$[
|
|
5665
|
+
$[34] !== padding || $[35] !== paddingBottom || $[36] !== paddingLeft || $[37] !== paddingRight || $[38] !== paddingTop || $[39] !== paddingX || $[40] !== paddingY ? (t10 = {
|
|
5642
5666
|
padding,
|
|
5643
5667
|
paddingX,
|
|
5644
5668
|
paddingY,
|
|
@@ -5646,23 +5670,23 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
5646
5670
|
paddingRight,
|
|
5647
5671
|
paddingBottom,
|
|
5648
5672
|
paddingLeft
|
|
5649
|
-
}, $[
|
|
5673
|
+
}, $[34] = padding, $[35] = paddingBottom, $[36] = paddingLeft, $[37] = paddingRight, $[38] = paddingTop, $[39] = paddingX, $[40] = paddingY, $[41] = t10) : t10 = $[41];
|
|
5650
5674
|
const paddingProps = t10;
|
|
5651
5675
|
let t11;
|
|
5652
|
-
$[
|
|
5676
|
+
$[42] !== fontSize2 ? (t11 = _getArrayProp(fontSize2).map(_temp), $[42] = fontSize2, $[43] = t11) : t11 = $[43];
|
|
5653
5677
|
const hotkeysFontSize = t11;
|
|
5654
5678
|
let t12;
|
|
5655
|
-
$[
|
|
5679
|
+
$[44] === Symbol.for("react.memo_cache_sentinel") ? (t12 = (el) => {
|
|
5656
5680
|
ref.current = el, setRootElement(el);
|
|
5657
|
-
}, $[
|
|
5681
|
+
}, $[44] = t12) : t12 = $[44];
|
|
5658
5682
|
const setRef = t12, t13 = as !== "button" && pressed ? "" : void 0, t14 = active ? "" : void 0, t15 = disabled ? "" : void 0;
|
|
5659
5683
|
let t16;
|
|
5660
|
-
$[
|
|
5684
|
+
$[45] !== radius ? (t16 = _getArrayProp(radius), $[45] = radius, $[46] = t16) : t16 = $[46];
|
|
5661
5685
|
let t17;
|
|
5662
|
-
$[
|
|
5686
|
+
$[47] === Symbol.for("react.memo_cache_sentinel") ? (t17 = _getArrayProp(0), $[47] = t17) : t17 = $[47];
|
|
5663
5687
|
const t18 = disabled ? "default" : tone, t19 = as === "button" ? "button" : void 0;
|
|
5664
5688
|
let t20;
|
|
5665
|
-
$[
|
|
5689
|
+
$[48] !== IconComponent || $[49] !== IconRightComponent || $[50] !== fontSize2 || $[51] !== hotkeys || $[52] !== hotkeysFontSize || $[53] !== paddingProps || $[54] !== spacing || $[55] !== text ? (t20 = (IconComponent || text || IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsxs(Flex, { as: "span", gap: spacing, align: "center", ...paddingProps, children: [
|
|
5666
5690
|
IconComponent && /* @__PURE__ */ jsxRuntime.jsxs(Text, { size: fontSize2, children: [
|
|
5667
5691
|
react.isValidElement(IconComponent) && IconComponent,
|
|
5668
5692
|
ReactIs.isValidElementType(IconComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {})
|
|
@@ -5676,14 +5700,14 @@ const MenuItem = react.forwardRef(function(props, forwardedRef) {
|
|
|
5676
5700
|
react.isValidElement(IconRightComponent) && IconRightComponent,
|
|
5677
5701
|
ReactIs.isValidElementType(IconRightComponent) && /* @__PURE__ */ jsxRuntime.jsx(IconRightComponent, {})
|
|
5678
5702
|
] })
|
|
5679
|
-
] }), $[
|
|
5703
|
+
] }), $[48] = IconComponent, $[49] = IconRightComponent, $[50] = fontSize2, $[51] = hotkeys, $[52] = hotkeysFontSize, $[53] = paddingProps, $[54] = spacing, $[55] = text, $[56] = t20) : t20 = $[56];
|
|
5680
5704
|
let t21;
|
|
5681
|
-
$[
|
|
5705
|
+
$[57] !== children || $[58] !== paddingProps ? (t21 = children && /* @__PURE__ */ jsxRuntime.jsx(Box, { as: "span", ...paddingProps, children }), $[57] = children, $[58] = paddingProps, $[59] = t21) : t21 = $[59];
|
|
5682
5706
|
let t22;
|
|
5683
|
-
return $[
|
|
5707
|
+
return $[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 ? (t22 = /* @__PURE__ */ jsxRuntime.jsxs(Selectable, { "data-ui": "MenuItem", role: "menuitem", ...restProps, "data-pressed": t13, "data-selected": t14, "data-disabled": t15, forwardedAs: as, $radius: t16, $padding: t17, $tone: t18, $scheme: scheme, disabled, onClick: handleClick, onMouseEnter: onItemMouseEnter, onMouseLeave: onItemMouseLeave, ref: setRef, tabIndex: -1, type: t19, children: [
|
|
5684
5708
|
t20,
|
|
5685
5709
|
t21
|
|
5686
|
-
] }), $[
|
|
5710
|
+
] }), $[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;
|
|
5687
5711
|
});
|
|
5688
5712
|
MenuItem.displayName = "ForwardRef(MenuItem)";
|
|
5689
5713
|
function _temp(s) {
|