@umami/react-zen 0.155.0 → 0.157.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/index.js +30 -17
- package/dist/index.mjs +30 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31468,7 +31468,7 @@ function NavMenu({
|
|
|
31468
31468
|
}
|
|
31469
31469
|
function NavMenuGroup({
|
|
31470
31470
|
title,
|
|
31471
|
-
allowMinimize,
|
|
31471
|
+
allowMinimize = true,
|
|
31472
31472
|
isMinimized,
|
|
31473
31473
|
className,
|
|
31474
31474
|
children,
|
|
@@ -31476,22 +31476,35 @@ function NavMenuGroup({
|
|
|
31476
31476
|
...props
|
|
31477
31477
|
}) {
|
|
31478
31478
|
const [minimized, setMinimized] = (0, import_react185.useState)(!!isMinimized);
|
|
31479
|
-
|
|
31480
|
-
|
|
31481
|
-
|
|
31482
|
-
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
-
|
|
31486
|
-
|
|
31487
|
-
|
|
31488
|
-
|
|
31489
|
-
|
|
31490
|
-
|
|
31491
|
-
|
|
31492
|
-
|
|
31493
|
-
|
|
31494
|
-
|
|
31479
|
+
const handleClick = () => {
|
|
31480
|
+
if (allowMinimize) {
|
|
31481
|
+
setMinimized((state) => !state);
|
|
31482
|
+
}
|
|
31483
|
+
};
|
|
31484
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
31485
|
+
Column,
|
|
31486
|
+
{
|
|
31487
|
+
...props,
|
|
31488
|
+
gap,
|
|
31489
|
+
className: (0, import_classnames38.default)(className, allowMinimize && minimized && NavMenu_default.minimized),
|
|
31490
|
+
children: [
|
|
31491
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
|
|
31492
|
+
Row,
|
|
31493
|
+
{
|
|
31494
|
+
className: NavMenu_default.item,
|
|
31495
|
+
alignItems: "center",
|
|
31496
|
+
justifyContent: "space-between",
|
|
31497
|
+
onClick: handleClick,
|
|
31498
|
+
children: [
|
|
31499
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { className: NavMenu_default.title, children: title }),
|
|
31500
|
+
allowMinimize && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronRight, {}) })
|
|
31501
|
+
]
|
|
31502
|
+
}
|
|
31503
|
+
),
|
|
31504
|
+
!minimized && children
|
|
31505
|
+
]
|
|
31506
|
+
}
|
|
31507
|
+
);
|
|
31495
31508
|
}
|
|
31496
31509
|
function NavMenuItem({ isSelected, className, children, ...props }) {
|
|
31497
31510
|
const { itemBackgroundColor } = (0, import_react185.useContext)(NavMenuContext);
|
package/dist/index.mjs
CHANGED
|
@@ -31356,7 +31356,7 @@ function NavMenu({
|
|
|
31356
31356
|
}
|
|
31357
31357
|
function NavMenuGroup({
|
|
31358
31358
|
title,
|
|
31359
|
-
allowMinimize,
|
|
31359
|
+
allowMinimize = true,
|
|
31360
31360
|
isMinimized,
|
|
31361
31361
|
className,
|
|
31362
31362
|
children,
|
|
@@ -31364,22 +31364,35 @@ function NavMenuGroup({
|
|
|
31364
31364
|
...props
|
|
31365
31365
|
}) {
|
|
31366
31366
|
const [minimized, setMinimized] = useState15(!!isMinimized);
|
|
31367
|
-
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
|
|
31371
|
-
|
|
31372
|
-
|
|
31373
|
-
|
|
31374
|
-
|
|
31375
|
-
|
|
31376
|
-
|
|
31377
|
-
|
|
31378
|
-
|
|
31379
|
-
|
|
31380
|
-
|
|
31381
|
-
|
|
31382
|
-
|
|
31367
|
+
const handleClick = () => {
|
|
31368
|
+
if (allowMinimize) {
|
|
31369
|
+
setMinimized((state) => !state);
|
|
31370
|
+
}
|
|
31371
|
+
};
|
|
31372
|
+
return /* @__PURE__ */ jsxs29(
|
|
31373
|
+
Column,
|
|
31374
|
+
{
|
|
31375
|
+
...props,
|
|
31376
|
+
gap,
|
|
31377
|
+
className: (0, import_classnames38.default)(className, allowMinimize && minimized && NavMenu_default.minimized),
|
|
31378
|
+
children: [
|
|
31379
|
+
/* @__PURE__ */ jsxs29(
|
|
31380
|
+
Row,
|
|
31381
|
+
{
|
|
31382
|
+
className: NavMenu_default.item,
|
|
31383
|
+
alignItems: "center",
|
|
31384
|
+
justifyContent: "space-between",
|
|
31385
|
+
onClick: handleClick,
|
|
31386
|
+
children: [
|
|
31387
|
+
/* @__PURE__ */ jsx53(Text, { className: NavMenu_default.title, children: title }),
|
|
31388
|
+
allowMinimize && /* @__PURE__ */ jsx53(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ jsx53(ChevronRight, {}) })
|
|
31389
|
+
]
|
|
31390
|
+
}
|
|
31391
|
+
),
|
|
31392
|
+
!minimized && children
|
|
31393
|
+
]
|
|
31394
|
+
}
|
|
31395
|
+
);
|
|
31383
31396
|
}
|
|
31384
31397
|
function NavMenuItem({ isSelected, className, children, ...props }) {
|
|
31385
31398
|
const { itemBackgroundColor } = useContext6(NavMenuContext);
|