@flowselections/core 1.0.22 → 1.0.24

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.
Files changed (134) hide show
  1. package/README.md +80 -0
  2. package/dist/auth/redirect.d.ts +33 -4
  3. package/dist/auth/redirect.d.ts.map +1 -1
  4. package/dist/auth/redirect.js +58 -7
  5. package/dist/auth/roles.d.ts +10 -0
  6. package/dist/auth/roles.d.ts.map +1 -0
  7. package/dist/auth/roles.js +11 -0
  8. package/dist/auth/useAuth.d.ts +1 -1
  9. package/dist/auth/useAuth.d.ts.map +1 -1
  10. package/dist/auth/useAuth.js +1 -1
  11. package/dist/auth/useIsSuperadmin.d.ts +19 -0
  12. package/dist/auth/useIsSuperadmin.d.ts.map +1 -0
  13. package/dist/auth/useIsSuperadmin.js +16 -0
  14. package/dist/components/instellingen/NotificationSettingsCard.js +3 -3
  15. package/dist/components/layout/AuthenticatedLayout.d.ts +19 -10
  16. package/dist/components/layout/AuthenticatedLayout.d.ts.map +1 -1
  17. package/dist/components/layout/AuthenticatedLayout.js +43 -9
  18. package/dist/components/layout/BugsDialog.js +10 -10
  19. package/dist/components/layout/HandoverPage.d.ts +5 -1
  20. package/dist/components/layout/HandoverPage.d.ts.map +1 -1
  21. package/dist/components/layout/HandoverPage.js +24 -7
  22. package/dist/components/layout/Header.js +4 -4
  23. package/dist/components/layout/InstellingenPage.d.ts +1 -1
  24. package/dist/components/layout/InstellingenPage.d.ts.map +1 -1
  25. package/dist/components/layout/InstellingenPage.js +15 -7
  26. package/dist/components/layout/LoginPage.js +7 -7
  27. package/dist/components/layout/NotificationBell.js +4 -4
  28. package/dist/components/layout/ResetWachtwoordPage.d.ts +3 -1
  29. package/dist/components/layout/ResetWachtwoordPage.d.ts.map +1 -1
  30. package/dist/components/layout/ResetWachtwoordPage.js +10 -8
  31. package/dist/components/layout/Sidebar.d.ts +31 -7
  32. package/dist/components/layout/Sidebar.d.ts.map +1 -1
  33. package/dist/components/layout/Sidebar.js +33 -11
  34. package/dist/components/ui/accordion.js +1 -1
  35. package/dist/components/ui/alert-dialog.js +2 -2
  36. package/dist/components/ui/alert.js +1 -1
  37. package/dist/components/ui/avatar.js +1 -1
  38. package/dist/components/ui/badge.js +1 -1
  39. package/dist/components/ui/breadcrumb.js +1 -1
  40. package/dist/components/ui/button.js +1 -1
  41. package/dist/components/ui/calendar.d.ts +1 -1
  42. package/dist/components/ui/calendar.d.ts.map +1 -1
  43. package/dist/components/ui/calendar.js +2 -2
  44. package/dist/components/ui/card.js +1 -1
  45. package/dist/components/ui/carousel.d.ts +2 -2
  46. package/dist/components/ui/carousel.d.ts.map +1 -1
  47. package/dist/components/ui/carousel.js +2 -2
  48. package/dist/components/ui/chart.d.ts +10 -10
  49. package/dist/components/ui/chart.js +1 -1
  50. package/dist/components/ui/checkbox.js +1 -1
  51. package/dist/components/ui/command.js +2 -2
  52. package/dist/components/ui/context-menu.js +1 -1
  53. package/dist/components/ui/dialog.js +1 -1
  54. package/dist/components/ui/drawer.js +1 -1
  55. package/dist/components/ui/dropdown-menu.js +1 -1
  56. package/dist/components/ui/form.js +2 -2
  57. package/dist/components/ui/hover-card.js +1 -1
  58. package/dist/components/ui/icon-picker.js +3 -3
  59. package/dist/components/ui/input-otp.d.ts.map +1 -1
  60. package/dist/components/ui/input-otp.js +1 -1
  61. package/dist/components/ui/input.js +1 -1
  62. package/dist/components/ui/label.js +1 -1
  63. package/dist/components/ui/menubar.js +1 -1
  64. package/dist/components/ui/navigation-menu.js +1 -1
  65. package/dist/components/ui/pagination.d.ts +1 -1
  66. package/dist/components/ui/pagination.d.ts.map +1 -1
  67. package/dist/components/ui/pagination.js +2 -2
  68. package/dist/components/ui/popover.js +1 -1
  69. package/dist/components/ui/progress.js +1 -1
  70. package/dist/components/ui/radio-group.js +1 -1
  71. package/dist/components/ui/resizable.js +1 -1
  72. package/dist/components/ui/scroll-area.js +1 -1
  73. package/dist/components/ui/select.js +1 -1
  74. package/dist/components/ui/separator.js +1 -1
  75. package/dist/components/ui/sheet.js +1 -1
  76. package/dist/components/ui/sidebar.d.ts +2 -2
  77. package/dist/components/ui/sidebar.d.ts.map +1 -1
  78. package/dist/components/ui/sidebar.js +8 -8
  79. package/dist/components/ui/skeleton.js +1 -1
  80. package/dist/components/ui/slider.js +1 -1
  81. package/dist/components/ui/switch.js +1 -1
  82. package/dist/components/ui/table.js +1 -1
  83. package/dist/components/ui/tabs.js +1 -1
  84. package/dist/components/ui/textarea.js +1 -1
  85. package/dist/components/ui/toggle-group.js +2 -2
  86. package/dist/components/ui/toggle.js +1 -1
  87. package/dist/components/ui/tooltip.js +1 -1
  88. package/dist/extensions/ShellExtensions.d.ts +14 -1
  89. package/dist/extensions/ShellExtensions.d.ts.map +1 -1
  90. package/dist/extensions/ShellExtensions.js +21 -2
  91. package/dist/hooks/useLogoSrc.d.ts +7 -0
  92. package/dist/hooks/useLogoSrc.d.ts.map +1 -0
  93. package/dist/hooks/useLogoSrc.js +29 -0
  94. package/dist/index.d.ts +53 -44
  95. package/dist/index.d.ts.map +1 -1
  96. package/dist/index.js +42 -35
  97. package/dist/permissions/resolve.d.ts +22 -0
  98. package/dist/permissions/resolve.d.ts.map +1 -0
  99. package/dist/permissions/resolve.js +76 -0
  100. package/dist/permissions/store.d.ts +38 -0
  101. package/dist/permissions/store.d.ts.map +1 -0
  102. package/dist/permissions/store.js +180 -0
  103. package/dist/permissions/useModulePermission.d.ts +52 -32
  104. package/dist/permissions/useModulePermission.d.ts.map +1 -1
  105. package/dist/permissions/useModulePermission.js +72 -104
  106. package/dist/routes/index.d.ts +50 -0
  107. package/dist/routes/index.d.ts.map +1 -0
  108. package/dist/routes/index.js +63 -0
  109. package/dist/server/handover-handler.d.ts +24 -0
  110. package/dist/server/handover-handler.d.ts.map +1 -0
  111. package/dist/server/handover-handler.js +59 -0
  112. package/dist/server/index.d.ts +4 -1
  113. package/dist/server/index.d.ts.map +1 -1
  114. package/dist/server/index.js +3 -1
  115. package/dist/server/permissions.server.d.ts +14 -8
  116. package/dist/server/permissions.server.d.ts.map +1 -1
  117. package/dist/server/permissions.server.js +46 -9
  118. package/dist/shell/ShellContext.d.ts +26 -0
  119. package/dist/shell/ShellContext.d.ts.map +1 -0
  120. package/dist/shell/ShellContext.js +14 -0
  121. package/dist/styles.css +127 -0
  122. package/dist/supabase/auth-middleware.d.ts +16 -16
  123. package/dist/supabase/auth-middleware.d.ts.map +1 -1
  124. package/dist/supabase/client.d.ts +16 -16
  125. package/dist/supabase/client.d.ts.map +1 -1
  126. package/dist/supabase/client.server.d.ts +16 -16
  127. package/dist/supabase/client.server.d.ts.map +1 -1
  128. package/dist/types/module.d.ts +39 -4
  129. package/dist/types/module.d.ts.map +1 -1
  130. package/dist/types/module.js +33 -5
  131. package/package.json +14 -5
  132. package/dist/auth/handover.functions.d.ts +0 -16
  133. package/dist/auth/handover.functions.d.ts.map +0 -1
  134. package/dist/auth/handover.functions.js +0 -23
@@ -1,14 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { useRouter } from "@tanstack/react-router";
4
- import { Button } from "../ui/button";
5
- import { Input } from "../ui/input";
6
- import { Label } from "../ui/label";
7
- import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../ui/card";
4
+ import { Button } from "../ui/button.js";
5
+ import { Input } from "../ui/input.js";
6
+ import { Label } from "../ui/label.js";
7
+ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../ui/card.js";
8
8
  import { toast } from "sonner";
9
- import { loginSchema } from "../../lib/validationSchemas";
10
- import { supabase } from "../../supabase/client";
11
- import { readRedirectParam } from "../../auth/redirect";
9
+ import { loginSchema } from "../../lib/validationSchemas.js";
10
+ import { supabase } from "../../supabase/client.js";
11
+ import { readRedirectParam } from "../../auth/redirect.js";
12
12
  export function LoginPage({ redirectTo = "/instellingen" }) {
13
13
  const router = useRouter();
14
14
  const [email, setEmail] = useState("");
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
3
  import { Bell } from "lucide-react";
4
- import { Button } from "../ui/button";
5
- import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover";
6
- import { supabase } from "../../supabase/client";
7
- import { cn } from "../../lib/utils";
4
+ import { Button } from "../ui/button.js";
5
+ import { Popover, PopoverContent, PopoverTrigger } from "../ui/popover.js";
6
+ import { supabase } from "../../supabase/client.js";
7
+ import { cn } from "../../lib/utils.js";
8
8
  export function NotificationBell() {
9
9
  const [notifications, setNotifications] = useState([]);
10
10
  const [open, setOpen] = useState(false);
@@ -1,6 +1,8 @@
1
1
  interface ResetWachtwoordPageProps {
2
2
  redirectTo: string;
3
+ /** Pad van de inlogpagina. Standaard "/login". */
4
+ loginPath?: string;
3
5
  }
4
- export declare function ResetWachtwoordPage({ redirectTo }: ResetWachtwoordPageProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function ResetWachtwoordPage({ redirectTo, loginPath }: ResetWachtwoordPageProps): import("react/jsx-runtime").JSX.Element;
5
7
  export {};
6
8
  //# sourceMappingURL=ResetWachtwoordPage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResetWachtwoordPage.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/ResetWachtwoordPage.tsx"],"names":[],"mappings":"AAQA,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,UAAU,EAAE,EAAE,wBAAwB,2CAuF3E"}
1
+ {"version":3,"file":"ResetWachtwoordPage.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/ResetWachtwoordPage.tsx"],"names":[],"mappings":"AASA,UAAU,wBAAwB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,UAAU,EAAE,SAAoB,EAAE,EAAE,wBAAwB,2CAwFjG"}
@@ -1,12 +1,14 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
- import { Button } from "../ui/button";
4
- import { Input } from "../ui/input";
5
- import { Label } from "../ui/label";
6
- import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../ui/card";
3
+ import { useRouter } from "@tanstack/react-router";
4
+ import { Button } from "../ui/button.js";
5
+ import { Input } from "../ui/input.js";
6
+ import { Label } from "../ui/label.js";
7
+ import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "../ui/card.js";
7
8
  import { toast } from "sonner";
8
- import { supabase } from "../../supabase/client";
9
- export function ResetWachtwoordPage({ redirectTo }) {
9
+ import { supabase } from "../../supabase/client.js";
10
+ export function ResetWachtwoordPage({ redirectTo, loginPath = "/login" }) {
11
+ const router = useRouter();
10
12
  const [password, setPassword] = useState("");
11
13
  const [confirmPassword, setConfirmPassword] = useState("");
12
14
  const [isLoading, setIsLoading] = useState(false);
@@ -41,11 +43,11 @@ export function ResetWachtwoordPage({ redirectTo }) {
41
43
  }
42
44
  else {
43
45
  toast.success("Wachtwoord succesvol gewijzigd!");
44
- window.location.href = redirectTo;
46
+ await router.navigate({ href: redirectTo });
45
47
  }
46
48
  };
47
49
  if (!isReady) {
48
- return (_jsx("div", { className: "min-h-screen flex items-center justify-center bg-background p-4", children: _jsxs(Card, { className: "w-full max-w-md", children: [_jsxs(CardHeader, { className: "text-center", children: [_jsx(CardTitle, { className: "text-2xl", children: "Ongeldige link" }), _jsx(CardDescription, { children: "Deze reset-link is ongeldig of verlopen. Vraag een nieuwe aan via de inlogpagina." })] }), _jsx(CardFooter, { className: "justify-center", children: _jsx(Button, { onClick: () => window.location.href = "/login", children: "Naar inlogpagina" }) })] }) }));
50
+ return (_jsx("div", { className: "min-h-screen flex items-center justify-center bg-background p-4", children: _jsxs(Card, { className: "w-full max-w-md", children: [_jsxs(CardHeader, { className: "text-center", children: [_jsx(CardTitle, { className: "text-2xl", children: "Ongeldige link" }), _jsx(CardDescription, { children: "Deze reset-link is ongeldig of verlopen. Vraag een nieuwe aan via de inlogpagina." })] }), _jsx(CardFooter, { className: "justify-center", children: _jsx(Button, { onClick: () => router.navigate({ href: loginPath }), children: "Naar inlogpagina" }) })] }) }));
49
51
  }
50
52
  return (_jsx("div", { className: "min-h-screen flex items-center justify-center bg-background p-4", children: _jsxs(Card, { className: "w-full max-w-md", children: [_jsxs(CardHeader, { className: "text-center", children: [_jsx(CardTitle, { className: "text-2xl", children: "Nieuw wachtwoord instellen" }), _jsx(CardDescription, { children: "Kies een nieuw wachtwoord voor je account" })] }), _jsxs("form", { onSubmit: handleSubmit, children: [_jsxs(CardContent, { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "password", children: "Nieuw wachtwoord" }), _jsx(Input, { id: "password", type: "password", value: password, onChange: (e) => setPassword(e.target.value), required: true, minLength: 6, maxLength: 128 })] }), _jsxs("div", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "confirmPassword", children: "Bevestig wachtwoord" }), _jsx(Input, { id: "confirmPassword", type: "password", value: confirmPassword, onChange: (e) => setConfirmPassword(e.target.value), required: true, minLength: 6, maxLength: 128 })] })] }), _jsx(CardFooter, { children: _jsx(Button, { type: "submit", className: "w-full", disabled: isLoading, children: isLoading ? "Opslaan..." : "Wachtwoord opslaan" }) })] })] }) }));
51
53
  }
@@ -1,19 +1,43 @@
1
- import type { AuthContext } from "../../auth/useAuth";
1
+ import type { AuthContext } from "../../auth/useAuth.js";
2
2
  import type { FlowModule } from "../../types/module.js";
3
3
  export interface SidebarProps {
4
4
  auth: AuthContext;
5
5
  modules: FlowModule[];
6
6
  /**
7
- * Identificeert de shell (bijv. "floriday-voorraad"). De core gebruikt hem
8
- * niet voor logica; hij komt als data-attribuut op de zijbalk, zodat
9
- * extensies en shells per-shell zijbalkvolgorde of styling kunnen koppelen.
7
+ * Identificeert de shell (bijv. "floriday-voorraad"). Komt als data-attribuut
8
+ * op de zijbalk, zodat extensies en shells per-shell volgorde of styling
9
+ * kunnen koppelen.
10
10
  */
11
11
  shellId?: string;
12
+ /**
13
+ * Sinds 1.0.23. Rechtenfilter vóór de extensie-transforms. Standaard `false`
14
+ * bij losse `<Sidebar>` (gedrag 1.0.22); AuthenticatedLayout zet hem aan.
15
+ * Zichtbaarheid, geen beveiliging.
16
+ */
17
+ permissions?: boolean;
18
+ /** Sinds 1.0.23. Logopad; anders `logo` uit /huisstijl.json, anders /logo.png. */
19
+ logoSrc?: string;
20
+ /** Sinds 1.0.23. Instellingen tonen (standaard true). Uitloggen is nooit te verbergen. */
21
+ showSettings?: boolean;
22
+ /**
23
+ * Sinds 1.0.23. Al berekende lijst (AuthenticatedLayout geeft die door);
24
+ * de Sidebar slaat dan zijn eigen pipeline over.
25
+ */
26
+ visibleModules?: FlowModule[];
27
+ /** Sinds 1.0.23. Toon een skeleton i.p.v. de lijst (eerste laden rechten). */
28
+ loading?: boolean;
12
29
  }
13
30
  /**
14
- * Desktop (md+): vaste zijbalk links, w-64 — ongewijzigd t.o.v. eerdere versies.
31
+ * Sinds 1.0.23. Pipeline: eerst rechten, dan extensie-transforms (ordening).
32
+ * Zichtbaarheid, geen beveiliging.
33
+ */
34
+ export declare function useSidebarModules(modules: FlowModule[], permissions: boolean): {
35
+ visibleModules: FlowModule[];
36
+ loading: boolean;
37
+ };
38
+ /**
39
+ * Desktop (md+): vaste zijbalk links, w-64.
15
40
  * Mobiel (<md): vaste topbalk (h-14) met menuknop die de zijbalk als Sheet opent.
16
- * Shells die AuthenticatedLayout gebruiken krijgen de juiste content-offset.
17
41
  */
18
- export declare function Sidebar({ auth, modules, shellId }: SidebarProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare function Sidebar({ auth, modules, shellId, permissions, logoSrc, showSettings, visibleModules, loading, }: SidebarProps): import("react/jsx-runtime").JSX.Element;
19
43
  //# sourceMappingURL=Sidebar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/Sidebar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAMjE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AA6ID;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,YAAY,2CA8C/D"}
1
+ {"version":3,"file":"Sidebar.d.ts","sourceRoot":"","sources":["../../../src/core/components/layout/Sidebar.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,UAAU,EAAW,MAAM,uBAAuB,CAAC;AAOjE,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,cAAc,CAAC,EAAE,UAAU,EAAE,CAAC;IAC9B,8EAA8E;IAC9E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,WAAW,EAAE,OAAO;;;EAI5E;AAmKD;;;GAGG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,OAAO,EACP,OAAO,EACP,WAAmB,EACnB,OAAO,EACP,YAAmB,EACnB,cAAc,EACd,OAAO,GACR,EAAE,YAAY,2CA2Dd"}
@@ -2,9 +2,21 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useEffect, useState } from "react";
3
3
  import { Link, useLocation } from "@tanstack/react-router";
4
4
  import { Settings, LogOut, ChevronDown, Menu } from "lucide-react";
5
- import { Sheet, SheetContent, SheetTitle } from "../ui/sheet";
6
- import { cn } from "../../lib/utils";
7
- import { useModuleListTransform } from "../../extensions/ShellExtensions.js";
5
+ import { Sheet, SheetContent, SheetTitle } from "../ui/sheet.js";
6
+ import { Skeleton } from "../ui/skeleton.js";
7
+ import { cn } from "../../lib/utils.js";
8
+ import { useFooterItems, useModuleListTransform } from "../../extensions/ShellExtensions.js";
9
+ import { usePermissionFilteredModules } from "../../permissions/useModulePermission.js";
10
+ import { useLogoSrc } from "../../hooks/useLogoSrc.js";
11
+ /**
12
+ * Sinds 1.0.23. Pipeline: eerst rechten, dan extensie-transforms (ordening).
13
+ * Zichtbaarheid, geen beveiliging.
14
+ */
15
+ export function useSidebarModules(modules, permissions) {
16
+ const filtered = usePermissionFilteredModules(modules, permissions);
17
+ const visible = useModuleListTransform(filtered.modules);
18
+ return { visibleModules: visible, loading: filtered.loading };
19
+ }
8
20
  // ─── Single flat nav link ─────────────────────────────────────────────────────
9
21
  function SidebarLink({ item, pathname, indent = false, onNavigate, }) {
10
22
  const isActive = pathname === item.href;
@@ -21,29 +33,39 @@ function SidebarGroup({ item, pathname, onNavigate, }) {
21
33
  : "text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"), children: [_jsx(item.icon, { className: "h-5 w-5" }), _jsx("span", { className: "flex-1 text-left", children: item.label }), _jsx(ChevronDown, { className: cn("h-4 w-4 transition-transform", open && "rotate-180") })] }), open && (_jsx("div", { className: "ml-3 space-y-1", children: item.children.map((child) => (_jsx(SidebarLink, { item: child, pathname: pathname, indent: true, onNavigate: onNavigate }, child.href))) }))] }));
22
34
  }
23
35
  // ─── Shared content (desktop aside + mobile sheet) ────────────────────────────
24
- function SidebarContent({ auth, modules, pathname, onNavigate, }) {
25
- // Zonder ShellExtensionsProvider komt de lijst ongewijzigd terug (code-volgorde).
26
- const visibleModules = useModuleListTransform(modules);
36
+ function SidebarContent({ auth, visibleModules, loading, logoSrc, showSettings, pathname, onNavigate, }) {
27
37
  const handleSignOut = async () => {
28
38
  onNavigate?.();
29
39
  await auth.signOut();
30
40
  };
31
- return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsx("div", { className: "flex shrink-0 items-center justify-center px-12 py-0 border-b border-sidebar-border", children: _jsx("img", { src: "/logo.png", alt: "Logo", className: "max-h-24 w-auto max-w-full object-contain" }) }), _jsx("nav", { className: "min-h-0 flex-1 space-y-1 px-3 py-4 overflow-y-auto sidebar-scroll", children: visibleModules.map((mod) => mod.nav.children?.length ? (_jsx(SidebarGroup, { item: mod.nav, pathname: pathname, onNavigate: onNavigate }, mod.id)) : (_jsx(SidebarLink, { item: mod.nav, pathname: pathname, onNavigate: onNavigate }, mod.id))) }), _jsxs("div", { className: "shrink-0 border-t border-sidebar-border px-3 py-4", children: [_jsx(SidebarLink, { item: { label: "Instellingen", href: "/instellingen", icon: Settings }, pathname: pathname, onNavigate: onNavigate }), _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"] })] })] }));
41
+ return (_jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [_jsx("div", { className: "flex shrink-0 items-center justify-center px-12 py-0 border-b border-sidebar-border", children: _jsx("img", { src: logoSrc, alt: "Logo", className: "max-h-24 w-auto max-w-full object-contain" }) }), _jsx("nav", { className: "min-h-0 flex-1 space-y-1 px-3 py-4 overflow-y-auto sidebar-scroll", "aria-busy": loading || undefined, children: loading ? (_jsx("div", { "data-testid": "sidebar-skeleton", className: "space-y-2", children: [0, 1, 2, 3].map((i) => (_jsx(Skeleton, { className: "h-9 w-full bg-sidebar-accent" }, i))) })) : (visibleModules.map((mod) => mod.nav.children?.length ? (_jsx(SidebarGroup, { item: mod.nav, pathname: pathname, onNavigate: onNavigate }, mod.id)) : (_jsx(SidebarLink, { item: mod.nav, pathname: pathname, onNavigate: onNavigate }, mod.id)))) }), _jsxs("div", { className: "shrink-0 border-t border-sidebar-border px-3 py-4", children: [showSettings && (_jsx(SidebarLink, { item: { label: "Instellingen", href: "/instellingen", icon: Settings }, pathname: pathname, onNavigate: onNavigate })), _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
42
  }
33
43
  // ─── Main Sidebar ─────────────────────────────────────────────────────────────
34
44
  /**
35
- * Desktop (md+): vaste zijbalk links, w-64 — ongewijzigd t.o.v. eerdere versies.
45
+ * Desktop (md+): vaste zijbalk links, w-64.
36
46
  * Mobiel (<md): vaste topbalk (h-14) met menuknop die de zijbalk als Sheet opent.
37
- * Shells die AuthenticatedLayout gebruiken krijgen de juiste content-offset.
38
47
  */
39
- export function Sidebar({ auth, modules, shellId }) {
48
+ export function Sidebar({ auth, modules, shellId, permissions = false, logoSrc, showSettings = true, visibleModules, loading, }) {
40
49
  const location = useLocation();
41
50
  const pathname = location.pathname;
42
51
  const [mobileOpen, setMobileOpen] = useState(false);
52
+ const own = useSidebarModules(modules, permissions);
53
+ const list = visibleModules ?? own.visibleModules;
54
+ const isLoading = loading ?? (visibleModules ? false : own.loading);
55
+ const footer = useFooterItems({ settings: showSettings });
56
+ const logo = useLogoSrc(logoSrc);
43
57
  // Sluit het mobiele menu bij elke routewijziging.
44
58
  useEffect(() => {
45
59
  setMobileOpen(false);
46
60
  }, [pathname]);
47
61
  const close = () => setMobileOpen(false);
48
- return (_jsxs(_Fragment, { children: [_jsx("aside", { "data-shell": shellId, className: "fixed left-0 top-0 z-40 hidden h-screen h-dvh w-64 bg-sidebar md:block", children: _jsx(SidebarContent, { auth: auth, modules: modules, pathname: pathname }) }), _jsxs("div", { className: "fixed inset-x-0 top-0 z-40 flex h-14 items-center gap-3 border-b border-sidebar-border bg-sidebar px-3 md:hidden", children: [_jsx("button", { type: "button", onClick: () => setMobileOpen(true), "aria-label": "Menu openen", className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-accent-foreground", children: _jsx(Menu, { className: "h-5 w-5" }) }), _jsx("img", { src: "/logo.png", alt: "Logo", className: "h-8 w-auto max-w-[10rem] object-contain" })] }), _jsx(Sheet, { open: mobileOpen, onOpenChange: setMobileOpen, children: _jsxs(SheetContent, { side: "left", "data-shell": shellId, className: "w-64 max-w-[85vw] border-sidebar-border bg-sidebar p-0 md:hidden", children: [_jsx(SheetTitle, { className: "sr-only", children: "Navigatie" }), _jsx(SidebarContent, { auth: auth, modules: modules, pathname: pathname, onNavigate: close })] }) })] }));
62
+ const contentProps = {
63
+ auth,
64
+ visibleModules: list,
65
+ loading: isLoading,
66
+ logoSrc: logo,
67
+ showSettings: footer.settings,
68
+ pathname,
69
+ };
70
+ return (_jsxs(_Fragment, { children: [_jsx("aside", { "data-shell": shellId, className: "fixed left-0 top-0 z-40 hidden h-screen h-dvh w-64 bg-sidebar md:block", children: _jsx(SidebarContent, { ...contentProps }) }), _jsxs("div", { className: "fixed inset-x-0 top-0 z-40 flex h-14 items-center gap-3 border-b border-sidebar-border bg-sidebar px-3 md:hidden", children: [_jsx("button", { type: "button", onClick: () => setMobileOpen(true), "aria-label": "Menu openen", className: "flex h-10 w-10 shrink-0 items-center justify-center rounded-lg text-sidebar-muted hover:bg-sidebar-accent hover:text-sidebar-accent-foreground", children: _jsx(Menu, { className: "h-5 w-5" }) }), _jsx("img", { src: logo, alt: "Logo", className: "h-8 w-auto max-w-[10rem] object-contain" })] }), _jsx(Sheet, { open: mobileOpen, onOpenChange: setMobileOpen, children: _jsxs(SheetContent, { side: "left", "data-shell": shellId, className: "w-64 max-w-[85vw] border-sidebar-border bg-sidebar p-0 md:hidden", children: [_jsx(SheetTitle, { className: "sr-only", children: "Navigatie" }), _jsx(SidebarContent, { ...contentProps, onNavigate: close })] }) })] }));
49
71
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
4
4
  import { ChevronDown } from "lucide-react";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  const Accordion = AccordionPrimitive.Root;
7
7
  const AccordionItem = React.forwardRef(({ className, ...props }, ref) => (_jsx(AccordionPrimitive.Item, { ref: ref, className: cn("border-b", className), ...props })));
8
8
  AccordionItem.displayName = "AccordionItem";
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
- import { cn } from "../../lib/utils";
5
- import { buttonVariants } from "./button";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { buttonVariants } from "./button.js";
6
6
  const AlertDialog = AlertDialogPrimitive.Root;
7
7
  const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
8
8
  const AlertDialogPortal = AlertDialogPrimitive.Portal;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { cva } from "class-variance-authority";
4
- import { cn } from "../../lib/utils";
4
+ import { cn } from "../../lib/utils.js";
5
5
  const alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", {
6
6
  variants: {
7
7
  variant: {
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  const Avatar = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Root, { ref: ref, className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className), ...props })));
7
7
  Avatar.displayName = AvatarPrimitive.Root.displayName;
8
8
  const AvatarImage = React.forwardRef(({ className, ...props }, ref) => (_jsx(AvatarPrimitive.Image, { ref: ref, className: cn("aspect-square h-full w-full", className), ...props })));
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
- import { cn } from "../../lib/utils";
3
+ import { cn } from "../../lib/utils.js";
4
4
  const badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
5
5
  variants: {
6
6
  variant: {
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
  import { ChevronRight, MoreHorizontal } from "lucide-react";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  const Breadcrumb = React.forwardRef(({ ...props }, ref) => _jsx("nav", { ref: ref, "aria-label": "breadcrumb", ...props }));
7
7
  Breadcrumb.displayName = "Breadcrumb";
8
8
  const BreadcrumbList = React.forwardRef(({ className, ...props }, ref) => (_jsx("ol", { ref: ref, className: cn("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5", className), ...props })));
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
  import { cva } from "class-variance-authority";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
7
7
  variants: {
8
8
  variant: {
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { DayButton, DayPicker } from "react-day-picker";
3
- import { Button } from "./button";
3
+ import { Button } from "./button.js";
4
4
  declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
5
5
  buttonVariant?: React.ComponentProps<typeof Button>["variant"];
6
6
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/core/components/ui/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAwB,MAAM,kBAAkB,CAAA;AAG7E,OAAO,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAA;AAEjD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAuB,EACvB,aAAuB,EACvB,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;CAC/D,2CAoJA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CA+BxC;AAED,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/core/components/ui/calendar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAwB,MAAM,kBAAkB,CAAA;AAG7E,OAAO,EAAE,MAAM,EAAkB,MAAM,aAAa,CAAA;AAEpD,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAuB,EACvB,aAAuB,EACvB,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAA;CAC/D,2CAoJA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CA+BxC;AAED,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAA"}
@@ -3,8 +3,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, } from "lucide-react";
5
5
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
6
- import { cn } from "../../lib/utils";
7
- import { Button, buttonVariants } from "./button";
6
+ import { cn } from "../../lib/utils.js";
7
+ import { Button, buttonVariants } from "./button.js";
8
8
  function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, ...props }) {
9
9
  const defaultClassNames = getDefaultClassNames();
10
10
  return (_jsx(DayPicker, { showOutsideDays: showOutsideDays, className: cn("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent", String.raw `rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw `rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className), captionLayout: captionLayout, formatters: {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { cn } from "../../lib/utils";
3
+ import { cn } from "../../lib/utils.js";
4
4
  const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("rounded-xl border bg-card text-card-foreground shadow", className), ...props })));
5
5
  Card.displayName = "Card";
6
6
  const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })));
@@ -13,7 +13,7 @@ type CarouselProps = {
13
13
  declare const Carousel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & CarouselProps & React.RefAttributes<HTMLDivElement>>;
14
14
  declare const CarouselContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
15
15
  declare const CarouselItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
16
- declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
- declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("./button").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
16
+ declare const CarouselPrevious: React.ForwardRefExoticComponent<Omit<import("./button.js").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
17
+ declare const CarouselNext: React.ForwardRefExoticComponent<Omit<import("./button.js").ButtonProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
18
  export { type CarouselApi, Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext, };
19
19
  //# sourceMappingURL=carousel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/core/components/ui/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAA;AAM7B,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;AAC1C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;CACpC,CAAA;AAuBD,QAAA,MAAM,QAAQ,6HAyGb,CAAA;AAGD,QAAA,MAAM,eAAe,6GAmBnB,CAAA;AAGF,QAAA,MAAM,YAAY,6GAmBhB,CAAA;AAGF,QAAA,MAAM,gBAAgB,gKA0BpB,CAAA;AAGF,QAAA,MAAM,YAAY,gKA0BhB,CAAA;AAGF,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,GACb,CAAA"}
1
+ {"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../../src/core/components/ui/carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,gBAAgB,EAAE,EACvB,KAAK,oBAAoB,EAC1B,MAAM,sBAAsB,CAAA;AAM7B,KAAK,WAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;AAC1C,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAChE,KAAK,eAAe,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAC/C,KAAK,cAAc,GAAG,qBAAqB,CAAC,CAAC,CAAC,CAAA;AAE9C,KAAK,aAAa,GAAG;IACnB,IAAI,CAAC,EAAE,eAAe,CAAA;IACtB,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAA;IACvC,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAA;CACpC,CAAA;AAuBD,QAAA,MAAM,QAAQ,6HAyGb,CAAA;AAGD,QAAA,MAAM,eAAe,6GAmBnB,CAAA;AAGF,QAAA,MAAM,YAAY,6GAmBhB,CAAA;AAGF,QAAA,MAAM,gBAAgB,mKA0BpB,CAAA;AAGF,QAAA,MAAM,YAAY,mKA0BhB,CAAA;AAGF,OAAO,EACL,KAAK,WAAW,EAChB,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,YAAY,GACb,CAAA"}
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import useEmblaCarousel from "embla-carousel-react";
4
4
  import { ArrowLeft, ArrowRight } from "lucide-react";
5
- import { cn } from "../../lib/utils";
6
- import { Button } from "./button";
5
+ import { cn } from "../../lib/utils.js";
6
+ import { Button } from "./button.js";
7
7
  const CarouselContext = React.createContext(null);
8
8
  function useCarousel() {
9
9
  const context = React.useContext(CarouselContext);
@@ -25,27 +25,27 @@ declare const ChartStyle: ({ id, config }: {
25
25
  config: ChartConfig;
26
26
  }) => import("react/jsx-runtime").JSX.Element | null;
27
27
  declare const ChartTooltip: typeof RechartsPrimitive.Tooltip;
28
- declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType> & {
28
+ declare const ChartTooltipContent: React.ForwardRefExoticComponent<Omit<RechartsPrimitive.DefaultTooltipContentProps<import("recharts/types/component/DefaultTooltipContent.js").ValueType, import("recharts/types/component/DefaultTooltipContent.js").NameType> & {
29
29
  accessibilityLayer?: boolean;
30
30
  active?: boolean | undefined;
31
31
  includeHidden?: boolean | undefined;
32
- allowEscapeViewBox?: import("recharts/types/util/types").AllowInDimension;
33
- animationDuration?: import("recharts/types/util/types").AnimationDuration;
34
- animationEasing?: import("recharts/types/util/types").AnimationTiming;
35
- content?: import("recharts/types/component/Tooltip").ContentType<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType> | undefined;
36
- coordinate?: Partial<import("recharts/types/util/types").Coordinate>;
32
+ allowEscapeViewBox?: import("recharts/types/util/types.js").AllowInDimension;
33
+ animationDuration?: import("recharts/types/util/types.js").AnimationDuration;
34
+ animationEasing?: import("recharts/types/util/types.js").AnimationTiming;
35
+ content?: import("recharts/types/component/Tooltip.js").ContentType<import("recharts/types/component/DefaultTooltipContent.js").ValueType, import("recharts/types/component/DefaultTooltipContent.js").NameType> | undefined;
36
+ coordinate?: Partial<import("recharts/types/util/types.js").Coordinate>;
37
37
  cursor?: boolean | React.ReactElement | React.SVGProps<SVGElement>;
38
38
  filterNull?: boolean;
39
39
  defaultIndex?: number;
40
40
  isAnimationActive?: boolean;
41
41
  offset?: number;
42
- payloadUniqBy?: import("recharts/types/util/payload/getUniqPayload").UniqueOption<import("recharts/types/component/DefaultTooltipContent").Payload<import("recharts/types/component/DefaultTooltipContent").ValueType, import("recharts/types/component/DefaultTooltipContent").NameType>> | undefined;
43
- position?: Partial<import("recharts/types/util/types").Coordinate>;
44
- reverseDirection?: import("recharts/types/util/types").AllowInDimension;
42
+ payloadUniqBy?: import("recharts/types/util/payload/getUniqPayload.js").UniqueOption<import("recharts/types/component/DefaultTooltipContent.js").Payload<import("recharts/types/component/DefaultTooltipContent.js").ValueType, import("recharts/types/component/DefaultTooltipContent.js").NameType>> | undefined;
43
+ position?: Partial<import("recharts/types/util/types.js").Coordinate>;
44
+ reverseDirection?: import("recharts/types/util/types.js").AllowInDimension;
45
45
  shared?: boolean;
46
46
  trigger?: "hover" | "click";
47
47
  useTranslate3d?: boolean;
48
- viewBox?: import("recharts/types/util/types").CartesianViewBox;
48
+ viewBox?: import("recharts/types/util/types.js").CartesianViewBox;
49
49
  wrapperStyle?: React.CSSProperties;
50
50
  } & React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
51
51
  hideLabel?: boolean;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as RechartsPrimitive from "recharts";
4
- import { cn } from "../../lib/utils";
4
+ import { cn } from "../../lib/utils.js";
5
5
  // Format: { THEME_NAME: CSS_SELECTOR }
6
6
  const THEMES = { light: "", dark: ".dark" };
7
7
  const ChartContext = React.createContext(null);
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
4
4
  import { Check } from "lucide-react";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  const Checkbox = React.forwardRef(({ className, ...props }, ref) => (_jsx(CheckboxPrimitive.Root, { ref: ref, className: cn("grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { className: cn("grid place-content-center text-current"), children: _jsx(Check, { className: "h-4 w-4" }) }) })));
7
7
  Checkbox.displayName = CheckboxPrimitive.Root.displayName;
8
8
  export { Checkbox };
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import { Command as CommandPrimitive } from "cmdk";
5
5
  import { Search } from "lucide-react";
6
- import { cn } from "../../lib/utils";
7
- import { Dialog, DialogContent } from "./dialog";
6
+ import { cn } from "../../lib/utils.js";
7
+ import { Dialog, DialogContent } from "./dialog.js";
8
8
  const Command = React.forwardRef(({ className, ...props }, ref) => (_jsx(CommandPrimitive, { ref: ref, className: cn("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", className), ...props })));
9
9
  Command.displayName = CommandPrimitive.displayName;
10
10
  const CommandDialog = ({ children, ...props }) => {
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as ContextMenuPrimitive from "@radix-ui/react-context-menu";
4
4
  import { Check, ChevronRight, Circle } from "lucide-react";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  const ContextMenu = ContextMenuPrimitive.Root;
7
7
  const ContextMenuTrigger = ContextMenuPrimitive.Trigger;
8
8
  const ContextMenuGroup = ContextMenuPrimitive.Group;
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import * as DialogPrimitive from "@radix-ui/react-dialog";
5
5
  import { X } from "lucide-react";
6
- import { cn } from "../../lib/utils";
6
+ import { cn } from "../../lib/utils.js";
7
7
  const Dialog = DialogPrimitive.Root;
8
8
  const DialogTrigger = DialogPrimitive.Trigger;
9
9
  const DialogPortal = DialogPrimitive.Portal;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { Drawer as DrawerPrimitive } from "vaul";
4
- import { cn } from "../../lib/utils";
4
+ import { cn } from "../../lib/utils.js";
5
5
  const Drawer = ({ shouldScaleBackground = true, ...props }) => (_jsx(DrawerPrimitive.Root, { shouldScaleBackground: shouldScaleBackground, ...props }));
6
6
  Drawer.displayName = "Drawer";
7
7
  const DrawerTrigger = DrawerPrimitive.Trigger;
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
5
5
  import { Check, ChevronRight, Circle } from "lucide-react";
6
- import { cn } from "../../lib/utils";
6
+ import { cn } from "../../lib/utils.js";
7
7
  const DropdownMenu = DropdownMenuPrimitive.Root;
8
8
  const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
9
9
  const DropdownMenuGroup = DropdownMenuPrimitive.Group;
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { Slot } from "@radix-ui/react-slot";
4
4
  import { Controller, FormProvider, useFormContext, } from "react-hook-form";
5
- import { cn } from "../../lib/utils";
6
- import { Label } from "./label";
5
+ import { cn } from "../../lib/utils.js";
6
+ import { Label } from "./label.js";
7
7
  const Form = FormProvider;
8
8
  const FormFieldContext = React.createContext(null);
9
9
  const FormField = ({ ...props }) => {
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
4
- import { cn } from "../../lib/utils";
4
+ import { cn } from "../../lib/utils.js";
5
5
  const HoverCard = HoverCardPrimitive.Root;
6
6
  const HoverCardTrigger = HoverCardPrimitive.Trigger;
7
7
  const HoverCardContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (_jsx(HoverCardPrimitive.Content, { ref: ref, align: align, sideOffset: sideOffset, className: cn("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-(--radix-hover-card-content-transform-origin)", className), ...props })));
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { Leaf, Box, Flower, Flower2, TreePine, TreeDeciduous, Sprout, Apple, Cherry, Grape, Carrot, Bean, Package, PackageOpen, Truck, ShoppingCart, ShoppingBag, Warehouse, Store, Tag, Tags, Layers, Droplets, Sun, CloudRain, Thermometer, Wind, Scissors, Shovel, Hammer, Wrench, Palette, Heart, Star, CircleDot, Square, Triangle, Wheat, Clover, Trees, Mountain, Globe, } from "lucide-react";
4
- import { cn } from "../../lib/utils";
5
- import { Popover, PopoverContent, PopoverTrigger } from "./popover";
6
- import { Button } from "./button";
4
+ import { cn } from "../../lib/utils.js";
5
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
6
+ import { Button } from "./button.js";
7
7
  export const ICON_MAP = {
8
8
  leaf: Leaf,
9
9
  box: Box,
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/core/components/ui/input-otp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,QAAA,MAAM,QAAQ;;;;;kBAUuC,GAAG;;;;;;;;;;;;;kBAAH,GAAG;;;;;;;;2FAGtD,CAAA;AAGF,QAAA,MAAM,aAAa,mKAKjB,CAAA;AAGF,QAAA,MAAM,YAAY;WAEiC,MAAM;wCAuBvD,CAAA;AAGF,QAAA,MAAM,iBAAiB,mKAOrB,CAAA;AAGF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../../src/core/components/ui/input-otp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,QAAA,MAAM,QAAQ;;;;;kBAUoC,GAAG;;;;;;;;;;;;;kBAAH,GAAG;;;;;;;;2FAGnD,CAAA;AAGF,QAAA,MAAM,aAAa,mKAKjB,CAAA;AAGF,QAAA,MAAM,YAAY;WAEiC,MAAM;wCAuBvD,CAAA;AAGF,QAAA,MAAM,iBAAiB,mKAOrB,CAAA;AAGF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import { OTPInput, OTPInputContext } from "input-otp";
4
4
  import { Minus } from "lucide-react";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  const InputOTP = React.forwardRef(({ className, containerClassName, ...props }, ref) => (_jsx(OTPInput, { ref: ref, containerClassName: cn("flex items-center gap-2 has-[:disabled]:opacity-50", containerClassName), className: cn("disabled:cursor-not-allowed", className), ...props })));
7
7
  InputOTP.displayName = "InputOTP";
8
8
  const InputOTPGroup = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex items-center", className), ...props })));
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { cn } from "../../lib/utils";
3
+ import { cn } from "../../lib/utils.js";
4
4
  const Input = React.forwardRef(({ className, type, ...props }, ref) => {
5
5
  return (_jsx("input", { type: type, className: cn("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className), ref: ref, ...props }));
6
6
  });
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import * as LabelPrimitive from "@radix-ui/react-label";
5
5
  import { cva } from "class-variance-authority";
6
- import { cn } from "../../lib/utils";
6
+ import { cn } from "../../lib/utils.js";
7
7
  const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
8
8
  const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn(labelVariants(), className), ...props })));
9
9
  Label.displayName = LabelPrimitive.Root.displayName;
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import * as MenubarPrimitive from "@radix-ui/react-menubar";
4
4
  import { Check, ChevronRight, Circle } from "lucide-react";
5
- import { cn } from "../../lib/utils";
5
+ import { cn } from "../../lib/utils.js";
6
6
  function MenubarMenu({ ...props }) {
7
7
  return _jsx(MenubarPrimitive.Menu, { ...props });
8
8
  }
@@ -3,7 +3,7 @@ import * as React from "react";
3
3
  import * as NavigationMenuPrimitive from "@radix-ui/react-navigation-menu";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { ChevronDown } from "lucide-react";
6
- import { cn } from "../../lib/utils";
6
+ import { cn } from "../../lib/utils.js";
7
7
  const NavigationMenu = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(NavigationMenuPrimitive.Root, { ref: ref, className: cn("relative z-10 flex max-w-max flex-1 items-center justify-center", className), ...props, children: [children, _jsx(NavigationMenuViewport, {})] })));
8
8
  NavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName;
9
9
  const NavigationMenuList = React.forwardRef(({ className, ...props }, ref) => (_jsx(NavigationMenuPrimitive.List, { ref: ref, className: cn("group flex flex-1 list-none items-center justify-center space-x-1", className), ...props })));