@flowselections/core 1.0.7 → 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":"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;AAkFD,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,YAAY,2CAkDtD"}
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(item.href);
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/core",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",