@flowselections/core 1.0.6 → 1.0.8
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstellingenPage.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/InstellingenPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"InstellingenPage.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/InstellingenPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAgB,MAAM,oBAAoB,CAAC;AAqInE,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,UAAU,EAAE,CAAA;CAAE,2CAWtE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
-
import { Header } from "./Header";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
import { useState } from "react";
|
|
4
3
|
import { Button } from "../ui/button";
|
|
5
4
|
import { Input } from "../ui/input";
|
|
@@ -75,5 +74,5 @@ const coreCards = [
|
|
|
75
74
|
export function InstellingenPage({ modules }) {
|
|
76
75
|
const moduleCards = modules.flatMap((m) => m.settingsCards);
|
|
77
76
|
const allCards = [...coreCards, ...moduleCards].sort((a, b) => a.order - b.order);
|
|
78
|
-
return (
|
|
77
|
+
return (_jsx("main", { className: "p-6", children: _jsx("div", { className: "grid gap-6 lg:grid-cols-2", children: allCards.map((card, i) => _jsx(card.component, {}, i)) }) }));
|
|
79
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/Sidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,oBAAoB,CAAC;AAI9D,UAAU,YAAY;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;
|
|
1
|
+
{"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/Sidebar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,oBAAoB,CAAC;AAI9D,UAAU,YAAY;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAoFD,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,YAAY,2CAkDtD"}
|
|
@@ -7,14 +7,14 @@ import { cn } from "../../lib/utils";
|
|
|
7
7
|
function SidebarLink({ item, pathname, indent = false, }) {
|
|
8
8
|
const isActive = item.href === "/"
|
|
9
9
|
? pathname === "/"
|
|
10
|
-
: pathname.startsWith(item.href);
|
|
10
|
+
: pathname === item.href || pathname.startsWith(item.href + "/");
|
|
11
11
|
return (_jsxs(Link, { to: item.href, className: cn("flex items-center gap-3 rounded-lg px-3 text-sm font-medium transition-colors", indent ? "py-2" : "py-2.5", isActive
|
|
12
12
|
? "bg-sidebar-accent text-sidebar-accent-foreground"
|
|
13
13
|
: "text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"), children: [_jsx(item.icon, { className: cn(indent ? "h-4 w-4" : "h-5 w-5") }), item.label] }));
|
|
14
14
|
}
|
|
15
15
|
// ─── Collapsible group (for modules with children) ────────────────────────────
|
|
16
16
|
function SidebarGroup({ item, pathname, }) {
|
|
17
|
-
const groupActive = pathname.startsWith(
|
|
17
|
+
const groupActive = item.children?.some((child) => pathname === child.href || pathname.startsWith(child.href + "/")) ?? false;
|
|
18
18
|
const [open, setOpen] = useState(groupActive);
|
|
19
19
|
return (_jsxs(_Fragment, { children: [_jsxs("button", { onClick: () => setOpen(!open), className: cn("flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors cursor-pointer", groupActive
|
|
20
20
|
? "text-sidebar-accent-foreground"
|