@umami/react-zen 0.155.0 → 0.156.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 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,30 @@ function NavMenuGroup({
31476
31476
  ...props
31477
31477
  }) {
31478
31478
  const [minimized, setMinimized] = (0, import_react185.useState)(!!isMinimized);
31479
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(Column, { ...props, gap, className: (0, import_classnames38.default)(className, minimized && NavMenu_default.minimized), children: [
31480
- /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
31481
- Row,
31482
- {
31483
- className: NavMenu_default.item,
31484
- alignItems: "center",
31485
- justifyContent: "space-between",
31486
- onClick: () => setMinimized(!minimized),
31487
- children: [
31488
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { className: NavMenu_default.title, children: title }),
31489
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronRight, {}) })
31490
- ]
31491
- }
31492
- ),
31493
- !minimized && children
31494
- ] });
31479
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
31480
+ Column,
31481
+ {
31482
+ ...props,
31483
+ gap,
31484
+ className: (0, import_classnames38.default)(className, allowMinimize && minimized && NavMenu_default.minimized),
31485
+ children: [
31486
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
31487
+ Row,
31488
+ {
31489
+ className: NavMenu_default.item,
31490
+ alignItems: "center",
31491
+ justifyContent: "space-between",
31492
+ onClick: () => setMinimized(!minimized),
31493
+ children: [
31494
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Text, { className: NavMenu_default.title, children: title }),
31495
+ allowMinimize && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(ChevronRight, {}) })
31496
+ ]
31497
+ }
31498
+ ),
31499
+ !minimized && children
31500
+ ]
31501
+ }
31502
+ );
31495
31503
  }
31496
31504
  function NavMenuItem({ isSelected, className, children, ...props }) {
31497
31505
  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,30 @@ function NavMenuGroup({
31364
31364
  ...props
31365
31365
  }) {
31366
31366
  const [minimized, setMinimized] = useState15(!!isMinimized);
31367
- return /* @__PURE__ */ jsxs29(Column, { ...props, gap, className: (0, import_classnames38.default)(className, minimized && NavMenu_default.minimized), children: [
31368
- /* @__PURE__ */ jsxs29(
31369
- Row,
31370
- {
31371
- className: NavMenu_default.item,
31372
- alignItems: "center",
31373
- justifyContent: "space-between",
31374
- onClick: () => setMinimized(!minimized),
31375
- children: [
31376
- /* @__PURE__ */ jsx53(Text, { className: NavMenu_default.title, children: title }),
31377
- /* @__PURE__ */ jsx53(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ jsx53(ChevronRight, {}) })
31378
- ]
31379
- }
31380
- ),
31381
- !minimized && children
31382
- ] });
31367
+ return /* @__PURE__ */ jsxs29(
31368
+ Column,
31369
+ {
31370
+ ...props,
31371
+ gap,
31372
+ className: (0, import_classnames38.default)(className, allowMinimize && minimized && NavMenu_default.minimized),
31373
+ children: [
31374
+ /* @__PURE__ */ jsxs29(
31375
+ Row,
31376
+ {
31377
+ className: NavMenu_default.item,
31378
+ alignItems: "center",
31379
+ justifyContent: "space-between",
31380
+ onClick: () => setMinimized(!minimized),
31381
+ children: [
31382
+ /* @__PURE__ */ jsx53(Text, { className: NavMenu_default.title, children: title }),
31383
+ allowMinimize && /* @__PURE__ */ jsx53(Icon2, { rotate: minimized ? 0 : 90, color: "muted", children: /* @__PURE__ */ jsx53(ChevronRight, {}) })
31384
+ ]
31385
+ }
31386
+ ),
31387
+ !minimized && children
31388
+ ]
31389
+ }
31390
+ );
31383
31391
  }
31384
31392
  function NavMenuItem({ isSelected, className, children, ...props }) {
31385
31393
  const { itemBackgroundColor } = useContext6(NavMenuContext);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umami/react-zen",
3
- "version": "0.155.0",
3
+ "version": "0.156.0",
4
4
  "description": "Modern, minimalist React component library",
5
5
  "author": "Umami <hello@umami.is>",
6
6
  "license": "MIT",