@flowselections/core 1.0.0 → 1.0.1

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":"Header.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/Header.tsx"],"names":[],"mappings":"AAOA,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAsB5C"}
1
+ {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/Header.tsx"],"names":[],"mappings":"AAOA,UAAU,WAAW;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CAwC5C"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useState } from "react";
2
+ import { useState, useEffect } from "react";
3
3
  import { Bug, Search } from "lucide-react";
4
4
  import { Input } from "../ui/input";
5
5
  import { Button } from "../ui/button";
@@ -7,5 +7,24 @@ import { BugsDialog } from "./BugsDialog";
7
7
  import { NotificationBell } from "./NotificationBell";
8
8
  export function Header({ title }) {
9
9
  const [bugsDialogOpen, setBugsDialogOpen] = useState(false);
10
+ useEffect(() => {
11
+ fetch("/huisstijl.json")
12
+ .then((res) => {
13
+ if (!res.ok)
14
+ return;
15
+ return res.json();
16
+ })
17
+ .then((stijl) => {
18
+ if (!stijl)
19
+ return;
20
+ const root = document.documentElement;
21
+ Object.entries(stijl).forEach(([key, value]) => {
22
+ root.style.setProperty(`--${key}`, value);
23
+ });
24
+ })
25
+ .catch(() => {
26
+ // huisstijl.json bestaat niet of is ongeldig — geen actie
27
+ });
28
+ }, []);
10
29
  return (_jsxs(_Fragment, { children: [_jsxs("header", { className: "sticky top-0 z-30 flex h-16 items-center justify-between border-b border-border bg-card px-6", children: [_jsx("h1", { className: "text-xl font-semibold text-foreground", children: title }), _jsxs("div", { className: "flex items-center gap-4", children: [_jsxs("div", { className: "relative hidden md:block", children: [_jsx(Search, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }), _jsx(Input, { placeholder: "Zoeken...", className: "w-64 pl-9" })] }), _jsxs(Button, { variant: "outline", size: "sm", onClick: () => setBugsDialogOpen(true), children: [_jsx(Bug, { className: "mr-2 h-4 w-4" }), "Bugs melden"] }), _jsx(NotificationBell, {})] })] }), _jsx(BugsDialog, { open: bugsDialogOpen, onOpenChange: setBugsDialogOpen })] }));
11
30
  }
@@ -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;AAK9D,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,2CA8CtD"}
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"}
@@ -3,7 +3,6 @@ import { useState } from "react";
3
3
  import { Link, useLocation } from "@tanstack/react-router";
4
4
  import { Settings, LogOut, ChevronDown } from "lucide-react";
5
5
  import { cn } from "../../lib/utils";
6
- const logo = ""; // TODO: shell levert eigen logo
7
6
  // ─── Single flat nav link ─────────────────────────────────────────────────────
8
7
  function SidebarLink({ item, pathname, indent = false, }) {
9
8
  const isActive = item.href === "/"
@@ -28,5 +27,5 @@ export function Sidebar({ auth, modules }) {
28
27
  const handleSignOut = async () => {
29
28
  await auth.signOut();
30
29
  };
31
- return (_jsx("aside", { className: "fixed left-0 top-0 z-40 h-screen w-64 bg-sidebar", children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "flex h-20 items-center justify-center border-b border-sidebar-border px-4", children: _jsx("img", { src: logo, alt: "Logo", className: "h-24 w-auto", loading: "eager" }) }), _jsx("nav", { className: "flex-1 space-y-1 px-3 py-4 overflow-y-auto sidebar-scroll", children: modules.map((mod) => mod.nav.children?.length ? (_jsx(SidebarGroup, { item: mod.nav, pathname: pathname }, mod.id)) : (_jsx(SidebarLink, { item: mod.nav, pathname: pathname }, mod.id))) }), _jsxs("div", { className: "border-t border-sidebar-border px-3 py-4", children: [_jsx(SidebarLink, { item: { label: "Instellingen", href: "/instellingen", icon: Settings }, pathname: pathname }), _jsxs("button", { onClick: handleSignOut, className: "flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-accent-foreground mt-1 cursor-pointer", children: [_jsx(LogOut, { className: "h-5 w-5" }), "Uitloggen"] })] })] }) }));
30
+ return (_jsx("aside", { className: "fixed left-0 top-0 z-40 h-screen w-64 bg-sidebar", children: _jsxs("div", { className: "flex h-full flex-col", children: [_jsx("div", { className: "flex h-20 items-center justify-center border-b border-sidebar-border px-4", children: _jsx("img", { src: "/logo.png", alt: "Logo", className: "h-8 w-auto object-contain" }) }), _jsx("nav", { className: "flex-1 space-y-1 px-3 py-4 overflow-y-auto sidebar-scroll", children: modules.map((mod) => mod.nav.children?.length ? (_jsx(SidebarGroup, { item: mod.nav, pathname: pathname }, mod.id)) : (_jsx(SidebarLink, { item: mod.nav, pathname: pathname }, mod.id))) }), _jsxs("div", { className: "border-t border-sidebar-border px-3 py-4", children: [_jsx(SidebarLink, { item: { label: "Instellingen", href: "/instellingen", icon: Settings }, pathname: pathname }), _jsxs("button", { onClick: handleSignOut, className: "flex w-full items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition-colors text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-accent-foreground mt-1 cursor-pointer", children: [_jsx(LogOut, { className: "h-5 w-5" }), "Uitloggen"] })] })] }) }));
32
31
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/core",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "type": "module",