@yenio-pld/blocks 1.2.0-rc.23 → 1.2.0-rc.25
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.cjs +54 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +54 -33
- package/dist/index.js.map +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/package.json +1 -1
- package/src/theme.css +29 -5
package/dist/index.cjs
CHANGED
|
@@ -365,6 +365,54 @@ function AppNavItems({
|
|
|
365
365
|
) }, `${group.label}:${item.href}`);
|
|
366
366
|
}) });
|
|
367
367
|
}
|
|
368
|
+
function CollapsibleNavGroup({
|
|
369
|
+
group,
|
|
370
|
+
renderLink,
|
|
371
|
+
setOpenMobile
|
|
372
|
+
}) {
|
|
373
|
+
const anyActive = group.items.some((item) => item.active === true);
|
|
374
|
+
const [open, setOpen] = React6.useState(() => group.defaultOpen ?? anyActive);
|
|
375
|
+
const wasActive = React6.useRef(anyActive);
|
|
376
|
+
React6.useEffect(() => {
|
|
377
|
+
if (anyActive && !wasActive.current) setOpen(true);
|
|
378
|
+
wasActive.current = anyActive;
|
|
379
|
+
}, [anyActive]);
|
|
380
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
381
|
+
collapsible_js.Collapsible,
|
|
382
|
+
{
|
|
383
|
+
open,
|
|
384
|
+
onOpenChange: setOpen,
|
|
385
|
+
className: "group/collapsible",
|
|
386
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(sidebar_js.SidebarGroup, { children: [
|
|
387
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
388
|
+
sidebar_js.SidebarGroupLabel,
|
|
389
|
+
{
|
|
390
|
+
render: /* @__PURE__ */ jsxRuntime.jsx(collapsible_js.CollapsibleTrigger, { className: "flex w-full items-center gap-1" }),
|
|
391
|
+
children: [
|
|
392
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children: group.label }),
|
|
393
|
+
group.badge !== void 0 && group.badge !== "" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-md bg-sidebar-accent px-1.5 text-[0.65rem] font-medium tabular-nums text-sidebar-accent-foreground", children: group.badge }) : null,
|
|
394
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
395
|
+
lucideReact.ChevronDown,
|
|
396
|
+
{
|
|
397
|
+
"aria-hidden": "true",
|
|
398
|
+
className: "size-3.5 shrink-0 transition-transform group-data-[panel-open]/collapsible:rotate-180"
|
|
399
|
+
}
|
|
400
|
+
)
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
),
|
|
404
|
+
/* @__PURE__ */ jsxRuntime.jsx(collapsible_js.CollapsibleContent, { children: /* @__PURE__ */ jsxRuntime.jsx(sidebar_js.SidebarGroupContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
405
|
+
AppNavItems,
|
|
406
|
+
{
|
|
407
|
+
group,
|
|
408
|
+
renderLink,
|
|
409
|
+
setOpenMobile
|
|
410
|
+
}
|
|
411
|
+
) }) })
|
|
412
|
+
] })
|
|
413
|
+
}
|
|
414
|
+
);
|
|
415
|
+
}
|
|
368
416
|
function AppNav({
|
|
369
417
|
nav,
|
|
370
418
|
navLabel,
|
|
@@ -385,39 +433,12 @@ function AppNav({
|
|
|
385
433
|
) })
|
|
386
434
|
] }, group.label);
|
|
387
435
|
}
|
|
388
|
-
const anyActive = group.items.some((item) => item.active === true);
|
|
389
436
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
390
|
-
|
|
437
|
+
CollapsibleNavGroup,
|
|
391
438
|
{
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
396
|
-
sidebar_js.SidebarGroupLabel,
|
|
397
|
-
{
|
|
398
|
-
render: /* @__PURE__ */ jsxRuntime.jsx(collapsible_js.CollapsibleTrigger, { className: "flex w-full items-center gap-1" }),
|
|
399
|
-
children: [
|
|
400
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 truncate text-left", children: group.label }),
|
|
401
|
-
group.badge !== void 0 && group.badge !== "" ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-md bg-sidebar-accent px-1.5 text-[0.65rem] font-medium tabular-nums text-sidebar-accent-foreground", children: group.badge }) : null,
|
|
402
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
403
|
-
lucideReact.ChevronDown,
|
|
404
|
-
{
|
|
405
|
-
"aria-hidden": "true",
|
|
406
|
-
className: "size-3.5 shrink-0 transition-transform group-data-[panel-open]/collapsible:rotate-180"
|
|
407
|
-
}
|
|
408
|
-
)
|
|
409
|
-
]
|
|
410
|
-
}
|
|
411
|
-
),
|
|
412
|
-
/* @__PURE__ */ jsxRuntime.jsx(collapsible_js.CollapsibleContent, { children: /* @__PURE__ */ jsxRuntime.jsx(sidebar_js.SidebarGroupContent, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
413
|
-
AppNavItems,
|
|
414
|
-
{
|
|
415
|
-
group,
|
|
416
|
-
renderLink,
|
|
417
|
-
setOpenMobile
|
|
418
|
-
}
|
|
419
|
-
) }) })
|
|
420
|
-
] })
|
|
439
|
+
group,
|
|
440
|
+
renderLink,
|
|
441
|
+
setOpenMobile
|
|
421
442
|
},
|
|
422
443
|
group.label
|
|
423
444
|
);
|
|
@@ -7326,7 +7347,7 @@ function SectionCard({
|
|
|
7326
7347
|
),
|
|
7327
7348
|
badge
|
|
7328
7349
|
] }),
|
|
7329
|
-
description ? /* @__PURE__ */ jsxRuntime.jsx(card_js.CardDescription, { children: description }) : null
|
|
7350
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx(card_js.CardDescription, { className: "text-pretty", children: description }) : null
|
|
7330
7351
|
] }),
|
|
7331
7352
|
headerAction ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: headerAction }) : null
|
|
7332
7353
|
] }),
|
|
@@ -7471,7 +7492,7 @@ function SettingRow({
|
|
|
7471
7492
|
children: label
|
|
7472
7493
|
}
|
|
7473
7494
|
),
|
|
7474
|
-
description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description }) : null
|
|
7495
|
+
description ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-pretty text-sm text-muted-foreground", children: description }) : null
|
|
7475
7496
|
] }),
|
|
7476
7497
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 sm:text-right", children: control })
|
|
7477
7498
|
]
|