@cryptlex/web-components 1.3.1 → 1.3.3

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 (66) hide show
  1. package/dist/components/data-table/column-picker.es.js +81 -0
  2. package/dist/components/data-table/column-picker.es.js.map +1 -0
  3. package/dist/components/data-table/data-table.es.js +197 -0
  4. package/dist/components/data-table/data-table.es.js.map +1 -0
  5. package/dist/components/data-table/page-size.es.js +23 -0
  6. package/dist/components/data-table/page-size.es.js.map +1 -0
  7. package/dist/components/data-table/paginator.es.js +63 -0
  8. package/dist/components/data-table/paginator.es.js.map +1 -0
  9. package/dist/components/data-table/table-actions.es.js +82 -0
  10. package/dist/components/data-table/table-actions.es.js.map +1 -0
  11. package/dist/components/data-table/table-commons.es.js +55 -0
  12. package/dist/components/data-table/table-commons.es.js.map +1 -0
  13. package/dist/components/data-table/table-content.es.js +46 -0
  14. package/dist/components/data-table/table-content.es.js.map +1 -0
  15. package/dist/components/data-table/table-utils/constants.es.js +274 -0
  16. package/dist/components/data-table/table-utils/constants.es.js.map +1 -0
  17. package/dist/components/data-table/table-utils/createTableFetchFn.es.js +25 -0
  18. package/dist/components/data-table/table-utils/createTableFetchFn.es.js.map +1 -0
  19. package/dist/components/data-table/table-utils/date.es.js +12 -0
  20. package/dist/components/data-table/table-utils/date.es.js.map +1 -0
  21. package/dist/components/data-table/table-utils/fetch.es.js +40 -0
  22. package/dist/components/data-table/table-utils/fetch.es.js.map +1 -0
  23. package/dist/components/data-table/table-utils/link-display.es.js +21 -0
  24. package/dist/components/data-table/table-utils/link-display.es.js.map +1 -0
  25. package/dist/components/data-table/table-utils/string.es.js +19 -0
  26. package/dist/components/data-table/table-utils/string.es.js.map +1 -0
  27. package/dist/components/data-table/table-utils/types.es.js +5 -0
  28. package/dist/components/data-table/table-utils/types.es.js.map +1 -0
  29. package/dist/components/info-card/info-card.es.js +74 -0
  30. package/dist/components/info-card/info-card.es.js.map +1 -0
  31. package/dist/components/sidebar/app-layout.es.js +86 -0
  32. package/dist/components/sidebar/app-layout.es.js.map +1 -0
  33. package/dist/components/sidebar/nav-main.es.js +76 -0
  34. package/dist/components/sidebar/nav-main.es.js.map +1 -0
  35. package/dist/components/sidebar/sidebar.es.js +10 -0
  36. package/dist/components/sidebar/sidebar.es.js.map +1 -0
  37. package/dist/components/static-data-table/data-table.es.js +30 -0
  38. package/dist/components/static-data-table/data-table.es.js.map +1 -0
  39. package/dist/components/ui/button.es.js +18 -28
  40. package/dist/components/ui/button.es.js.map +1 -1
  41. package/dist/components/ui/calendar.es.js +51 -53
  42. package/dist/components/ui/calendar.es.js.map +1 -1
  43. package/dist/components/ui/drawer.es.js +13 -12
  44. package/dist/components/ui/drawer.es.js.map +1 -1
  45. package/dist/components/ui/dynamic-input.es.js +141 -0
  46. package/dist/components/ui/dynamic-input.es.js.map +1 -0
  47. package/dist/components/ui/input-otp.es.js +16 -16
  48. package/dist/components/ui/input-otp.es.js.map +1 -1
  49. package/dist/components/ui/mutli-select.es.js +197 -0
  50. package/dist/components/ui/mutli-select.es.js.map +1 -0
  51. package/dist/components/ui/search-input.es.js +41 -0
  52. package/dist/components/ui/search-input.es.js.map +1 -0
  53. package/dist/components/ui/sheet.es.js +11 -37
  54. package/dist/components/ui/sheet.es.js.map +1 -1
  55. package/dist/components/ui/sidebar.es.js +286 -264
  56. package/dist/components/ui/sidebar.es.js.map +1 -1
  57. package/dist/components/ui/table-page-layout.es.js +14 -0
  58. package/dist/components/ui/table-page-layout.es.js.map +1 -0
  59. package/dist/components/ui/table.es.js +62 -54
  60. package/dist/components/ui/table.es.js.map +1 -1
  61. package/dist/index.es.d.ts +305 -14
  62. package/dist/index.es.js +264 -208
  63. package/dist/index.es.js.map +1 -1
  64. package/dist/utils/index.es.js +13 -8
  65. package/dist/utils/index.es.js.map +1 -1
  66. package/package.json +10 -3
@@ -0,0 +1,86 @@
1
+ import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
+ import { SideBar as p } from "./sidebar.es.js";
3
+ import { SidebarProvider as l, SidebarTrigger as c } from "../ui/sidebar.es.js";
4
+ import "../ui/accordion.es.js";
5
+ import { Avatar as a, AvatarImage as n, AvatarFallback as d } from "../ui/avatar.es.js";
6
+ import "../ui/badge.es.js";
7
+ import "../ui/breadcrumb.es.js";
8
+ import { Button as s } from "../ui/button.es.js";
9
+ import "../ui/calendar.es.js";
10
+ import "../ui/card.es.js";
11
+ import "../ui/chart.es.js";
12
+ import "../ui/checkbox.es.js";
13
+ import "@radix-ui/react-collapsible";
14
+ import "../ui/command.es.js";
15
+ import "../ui/dialog.es.js";
16
+ import "../ui/drawer.es.js";
17
+ import { DropdownMenu as h, DropdownMenuTrigger as f, DropdownMenuContent as g, DropdownMenuItem as v } from "../ui/dropdown-menu.es.js";
18
+ import "../ui/form.es.js";
19
+ import "../ui/input.es.js";
20
+ import "../ui/input-otp.es.js";
21
+ import "../ui/label.es.js";
22
+ import { logout as x } from "../../utils/index.es.js";
23
+ import { LogOut as N } from "lucide-react";
24
+ import "../ui/mutli-select.es.js";
25
+ import "../ui/navigation-menu.es.js";
26
+ import "../ui/pagination.es.js";
27
+ import "../ui/password-input.es.js";
28
+ import "../ui/popover.es.js";
29
+ import "../ui/radio-group.es.js";
30
+ import "react";
31
+ import "../ui/select.es.js";
32
+ import "../ui/separator.es.js";
33
+ import "../ui/sheet.es.js";
34
+ import "sonner";
35
+ import "../ui/table.es.js";
36
+ import "../ui/tabs.es.js";
37
+ import "../ui/tooltip.es.js";
38
+ import "@tanstack/react-query";
39
+ import "cmdk";
40
+ import "use-debounce";
41
+ import { Outlet as w } from "@tanstack/react-router";
42
+ function lr({ data: e, user: o }) {
43
+ var i, m;
44
+ return /* @__PURE__ */ t("div", { className: "h-screen", children: [
45
+ /* @__PURE__ */ t(l, { children: [
46
+ /* @__PURE__ */ r(p, { data: e }),
47
+ /* @__PURE__ */ t("div", { className: "flex flex-col h-screen w-full overflow-auto", children: [
48
+ /* @__PURE__ */ t("header", { className: "h-[7vh] sticky top-0 bg-card flex items-center justify-between p-4 pl-0 border-b z-10", children: [
49
+ /* @__PURE__ */ t("div", { className: "flex gap-1 items-center", children: [
50
+ /* @__PURE__ */ r(c, {}),
51
+ /* @__PURE__ */ r(
52
+ "img",
53
+ {
54
+ src: "https://assets.cryptlex.com/images/logos/cryptlex-logo.svg",
55
+ alt: "logo",
56
+ className: "m-0"
57
+ }
58
+ )
59
+ ] }),
60
+ /* @__PURE__ */ t(h, { children: [
61
+ /* @__PURE__ */ r(f, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "cursor-pointer", children: /* @__PURE__ */ t(a, { className: "justify-center items-center", children: [
62
+ /* @__PURE__ */ r(
63
+ n,
64
+ {
65
+ src: (o == null ? void 0 : o.logoUrl) ?? "https://app.dev.cryptlex.com/favicon.ico",
66
+ alt: "icon"
67
+ }
68
+ ),
69
+ /* @__PURE__ */ t(d, { className: "uppercase", children: [
70
+ (i = o == null ? void 0 : o.firstName) == null ? void 0 : i.charAt(0),
71
+ (m = o == null ? void 0 : o.lastName) == null ? void 0 : m.charAt(0)
72
+ ] })
73
+ ] }) }) }),
74
+ /* @__PURE__ */ r(g, { children: /* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(s, { icon: N, onClick: () => x(), children: "Log Out" }) }) })
75
+ ] })
76
+ ] }),
77
+ /* @__PURE__ */ r("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ r(w, {}) })
78
+ ] })
79
+ ] }),
80
+ " "
81
+ ] });
82
+ }
83
+ export {
84
+ lr as AppLayout
85
+ };
86
+ //# sourceMappingURL=app-layout.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-layout.es.js","sources":["../../../lib/components/sidebar/app-layout.tsx"],"sourcesContent":["import type { NavItem } from '@/components/sidebar/nav-main';\nimport { SideBar } from '@/components/sidebar/sidebar';\nimport { SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar';\nimport {\n Avatar,\n AvatarFallback,\n AvatarImage,\n Button,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n logout,\n} from '@/index';\nimport { Outlet } from '@tanstack/react-router';\nimport { LogOut } from 'lucide-react';\n\nexport interface AppLayoutProps {\n data: NavItem[]; // Navigation items\n user?: {\n firstName?: string;\n lastName?: string;\n logoUrl?: string;\n }; // Optional user information\n}\n\nexport function AppLayout({ data, user }: AppLayoutProps) {\n return (\n <div className=\"h-screen\">\n <SidebarProvider>\n {/* Sidebar */}\n <SideBar data={data} />\n\n {/* Main Content */}\n <div className=\"flex flex-col h-screen w-full overflow-auto\">\n {/* Header */}\n <header className=\"h-[7vh] sticky top-0 bg-card flex items-center justify-between p-4 pl-0 border-b z-10\">\n {/* Sidebar Trigger */}\n <div className=\"flex gap-1 items-center\">\n <SidebarTrigger />\n {/* //TODO: Will be replaced with dynamic url */}\n <img\n src=\"https://assets.cryptlex.com/images/logos/cryptlex-logo.svg\"\n alt=\"logo\"\n className=\"m-0\"\n />\n </div>\n\n {/* User Dropdown */}\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <div className=\"cursor-pointer\">\n {/* //TODO: Image url to be replaced by the dynamic url from /account/config */}\n <Avatar className=\"justify-center items-center\">\n <AvatarImage\n src={user?.logoUrl ?? 'https://app.dev.cryptlex.com/favicon.ico'}\n alt=\"icon\"\n />\n <AvatarFallback className=\"uppercase\">\n {user?.firstName?.charAt(0)}\n {user?.lastName?.charAt(0)}\n </AvatarFallback>\n </Avatar>\n </div>\n </DropdownMenuTrigger>\n\n <DropdownMenuContent>\n <DropdownMenuItem>\n <Button icon={LogOut} onClick={() => logout()}>\n Log Out\n </Button>\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </header>\n\n {/* Scrollable Content */}\n <div className=\"flex-1 overflow-auto p-4\">\n <Outlet />\n </div>\n </div>\n </SidebarProvider>{' '}\n </div>\n );\n}\n"],"names":["AppLayout","data","user","jsxs","SidebarProvider","jsx","SideBar","SidebarTrigger","DropdownMenu","DropdownMenuTrigger","Avatar","AvatarImage","AvatarFallback","_a","_b","DropdownMenuContent","DropdownMenuItem","Button","LogOut","logout","Outlet"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BO,SAASA,GAAU,EAAE,MAAAC,GAAM,MAAAC,KAAwB;;AAEtD,SAAA,gBAAAC,EAAC,OAAI,EAAA,WAAU,YACb,UAAA;AAAA,IAAA,gBAAAA,EAACC,GAEC,EAAA,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAQ,MAAAL,GAAY;AAAA,MAGrB,gBAAAE,EAAC,OAAI,EAAA,WAAU,+CAEb,UAAA;AAAA,QAAC,gBAAAA,EAAA,UAAA,EAAO,WAAU,0FAEhB,UAAA;AAAA,UAAC,gBAAAA,EAAA,OAAA,EAAI,WAAU,2BACb,UAAA;AAAA,YAAA,gBAAAE,EAACE,GAAe,EAAA;AAAA,YAEhB,gBAAAF;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,KAAI;AAAA,gBACJ,KAAI;AAAA,gBACJ,WAAU;AAAA,cAAA;AAAA,YAAA;AAAA,UACZ,GACF;AAAA,4BAGCG,GACC,EAAA,UAAA;AAAA,YAAC,gBAAAH,EAAAI,GAAA,EAAoB,SAAO,IAC1B,UAAC,gBAAAJ,EAAA,OAAA,EAAI,WAAU,kBAEb,UAAA,gBAAAF,EAACO,GAAO,EAAA,WAAU,gCAChB,UAAA;AAAA,cAAA,gBAAAL;AAAA,gBAACM;AAAA,gBAAA;AAAA,kBACC,MAAKT,KAAA,gBAAAA,EAAM,YAAW;AAAA,kBACtB,KAAI;AAAA,gBAAA;AAAA,cACN;AAAA,cACA,gBAAAC,EAACS,GAAe,EAAA,WAAU,aACvB,UAAA;AAAA,iBAAMC,IAAAX,KAAA,gBAAAA,EAAA,cAAA,gBAAAW,EAAW,OAAO;AAAA,iBACxBC,IAAAZ,KAAA,gBAAAA,EAAM,aAAN,gBAAAY,EAAgB,OAAO;AAAA,cAAC,EAC3B,CAAA;AAAA,YAAA,EACF,CAAA,EACF,CAAA,GACF;AAAA,YAEC,gBAAAT,EAAAU,GAAA,EACC,UAAC,gBAAAV,EAAAW,GAAA,EACC,4BAACC,GAAO,EAAA,MAAMC,GAAQ,SAAS,MAAMC,EAAA,GAAU,UAAA,UAAA,CAE/C,GACF,EACF,CAAA;AAAA,UAAA,EACF,CAAA;AAAA,QAAA,GACF;AAAA,0BAGC,OAAI,EAAA,WAAU,4BACb,UAAA,gBAAAd,EAACe,KAAO,EACV,CAAA;AAAA,MAAA,EACF,CAAA;AAAA,IAAA,GACF;AAAA,IAAmB;AAAA,EAAA,GACrB;AAEJ;"}
@@ -0,0 +1,76 @@
1
+ import { jsx as l, jsxs as r } from "react/jsx-runtime";
2
+ import { Collapsible as u, CollapsibleTrigger as b, CollapsibleContent as p } from "../ui/collapsible.es.js";
3
+ import { useSidebar as g, SidebarGroup as S, SidebarMenu as f, SidebarMenuItem as o, SidebarMenuButton as i, SidebarMenuSub as C, SidebarMenuSubItem as m, SidebarMenuSubButton as N } from "../ui/sidebar.es.js";
4
+ import { Link as t } from "@tanstack/react-router";
5
+ import { ChevronRight as v } from "lucide-react";
6
+ import { useState as M } from "react";
7
+ function T({ items: c }) {
8
+ const { setOpen: d } = g(), [a, s] = M(null), h = (e) => {
9
+ s((n) => n === e ? null : e);
10
+ };
11
+ return /* @__PURE__ */ l(S, { children: /* @__PURE__ */ l(f, { children: c.map(
12
+ (e) => e.chidren && e.chidren.length > 0 ? /* @__PURE__ */ l(
13
+ u,
14
+ {
15
+ asChild: !0,
16
+ open: a === e.label,
17
+ className: "group/collapsible",
18
+ children: /* @__PURE__ */ r(o, { children: [
19
+ /* @__PURE__ */ l(b, { asChild: !0, children: /* @__PURE__ */ r(
20
+ i,
21
+ {
22
+ tooltip: e.label,
23
+ onClick: () => {
24
+ d(!0), h(e.label);
25
+ },
26
+ className: "hover:bg-neutral-5",
27
+ children: [
28
+ e.icon && /* @__PURE__ */ l(e.icon, {}),
29
+ /* @__PURE__ */ l("span", { children: e.label }),
30
+ /* @__PURE__ */ l(
31
+ v,
32
+ {
33
+ className: `ml-auto transition-transform duration-200 ${a === e.label ? "rotate-90" : ""}`
34
+ }
35
+ )
36
+ ]
37
+ }
38
+ ) }),
39
+ /* @__PURE__ */ l(p, { children: /* @__PURE__ */ l(C, { children: e.chidren.map((n) => /* @__PURE__ */ l(m, { children: /* @__PURE__ */ l(N, { asChild: !0, children: /* @__PURE__ */ r(
40
+ t,
41
+ {
42
+ activeProps: {
43
+ className: "bg-neutral-4 font-bold"
44
+ },
45
+ className: "text-neutral-10 no-underline hover:bg-neutral-5",
46
+ to: n.path,
47
+ children: [
48
+ n.icon && /* @__PURE__ */ l(n.icon, {}),
49
+ /* @__PURE__ */ l("span", { children: n.label })
50
+ ]
51
+ }
52
+ ) }) }, n.label)) }) })
53
+ ] })
54
+ },
55
+ e.label
56
+ ) : /* @__PURE__ */ l(o, { children: /* @__PURE__ */ l(i, { asChild: !0, tooltip: e.label, children: /* @__PURE__ */ r(
57
+ t,
58
+ {
59
+ activeProps: {
60
+ className: "bg-neutral-4 font-bold"
61
+ // Add active styling here
62
+ },
63
+ className: "no-underline text-neutral-10 flex items-center hover:bg-neutral-5",
64
+ to: e.path,
65
+ children: [
66
+ e.icon && /* @__PURE__ */ l(e.icon, {}),
67
+ /* @__PURE__ */ l("span", { children: e.label })
68
+ ]
69
+ }
70
+ ) }) }, e.label)
71
+ ) }) });
72
+ }
73
+ export {
74
+ T as NavMain
75
+ };
76
+ //# sourceMappingURL=nav-main.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nav-main.es.js","sources":["../../../lib/components/sidebar/nav-main.tsx"],"sourcesContent":["import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible';\nimport {\n SidebarGroup,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n useSidebar,\n} from '@/components/ui/sidebar';\nimport { Link } from '@tanstack/react-router';\nimport { ChevronRight, type LucideIcon } from 'lucide-react';\nimport { useState } from 'react';\n\nexport type NavItem = {\n path: string;\n label: string;\n display: boolean;\n icon: LucideIcon;\n chidren?: { path: string; label: string; icon: LucideIcon; display: boolean }[];\n};\n\nexport function NavMain({ items }: { items: NavItem[] }) {\n const { setOpen } = useSidebar();\n const [openItem, setOpenItem] = useState<string | null>(null); // Tracks the currently open item\n\n const handleToggle = (title: string) => {\n setOpenItem((prev) => (prev === title ? null : title)); // Toggle the open state\n };\n\n return (\n <SidebarGroup>\n <SidebarMenu>\n {items.map((item) =>\n item.chidren && item.chidren.length > 0 ? (\n <Collapsible\n key={item.label}\n asChild\n open={openItem === item.label}\n className=\"group/collapsible\"\n >\n <SidebarMenuItem>\n <CollapsibleTrigger asChild>\n <SidebarMenuButton\n tooltip={item.label}\n onClick={() => {\n setOpen(true);\n handleToggle(item.label);\n }}\n className=\"hover:bg-neutral-5\"\n >\n {item.icon && <item.icon />}\n <span>{item.label}</span>\n <ChevronRight\n className={`ml-auto transition-transform duration-200 ${\n openItem === item.label ? 'rotate-90' : ''\n }`}\n />\n </SidebarMenuButton>\n </CollapsibleTrigger>\n <CollapsibleContent>\n <SidebarMenuSub>\n {item.chidren.map((subItem) => (\n <SidebarMenuSubItem key={subItem.label}>\n <SidebarMenuSubButton asChild>\n <Link\n activeProps={{\n className: 'bg-neutral-4 font-bold',\n }}\n className=\"text-neutral-10 no-underline hover:bg-neutral-5\"\n to={subItem.path}\n >\n {subItem.icon && <subItem.icon />}\n <span>{subItem.label}</span>\n </Link>\n </SidebarMenuSubButton>\n </SidebarMenuSubItem>\n ))}\n </SidebarMenuSub>\n </CollapsibleContent>\n </SidebarMenuItem>\n </Collapsible>\n ) : (\n <SidebarMenuItem key={item.label}>\n <SidebarMenuButton asChild tooltip={item.label}>\n <Link\n activeProps={{\n className: 'bg-neutral-4 font-bold', // Add active styling here\n }}\n className=\"no-underline text-neutral-10 flex items-center hover:bg-neutral-5\"\n to={item.path}\n >\n {item.icon && <item.icon />}\n <span>{item.label}</span>\n </Link>\n </SidebarMenuButton>\n </SidebarMenuItem>\n ),\n )}\n </SidebarMenu>\n </SidebarGroup>\n );\n}\n"],"names":["NavMain","items","setOpen","useSidebar","openItem","setOpenItem","useState","handleToggle","title","prev","jsx","SidebarGroup","SidebarMenu","item","Collapsible","SidebarMenuItem","CollapsibleTrigger","jsxs","SidebarMenuButton","ChevronRight","CollapsibleContent","SidebarMenuSub","subItem","SidebarMenuSubItem","SidebarMenuSubButton","Link"],"mappings":";;;;;;AAuBgB,SAAAA,EAAQ,EAAE,OAAAC,KAA+B;AACjD,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAW,GACzB,CAACC,GAAUC,CAAW,IAAIC,EAAwB,IAAI,GAEtDC,IAAe,CAACC,MAAkB;AACtC,IAAAH,EAAY,CAACI,MAAUA,MAASD,IAAQ,OAAOA,CAAM;AAAA,EACvD;AAEA,SACG,gBAAAE,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAE,GAAA,EACE,UAAMX,EAAA;AAAA,IAAI,CAACY,MACVA,EAAK,WAAWA,EAAK,QAAQ,SAAS,IACpC,gBAAAH;AAAA,MAACI;AAAA,MAAA;AAAA,QAEC,SAAO;AAAA,QACP,MAAMV,MAAaS,EAAK;AAAA,QACxB,WAAU;AAAA,QAEV,4BAACE,GACC,EAAA,UAAA;AAAA,UAAC,gBAAAL,EAAAM,GAAA,EAAmB,SAAO,IACzB,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,SAASL,EAAK;AAAA,cACd,SAAS,MAAM;AACb,gBAAAX,EAAQ,EAAI,GACZK,EAAaM,EAAK,KAAK;AAAA,cACzB;AAAA,cACA,WAAU;AAAA,cAET,UAAA;AAAA,gBAAAA,EAAK,QAAQ,gBAAAH,EAACG,EAAK,MAAL,CAAA,CAAU;AAAA,gBACzB,gBAAAH,EAAC,QAAM,EAAA,UAAAG,EAAK,MAAM,CAAA;AAAA,gBAClB,gBAAAH;AAAA,kBAACS;AAAA,kBAAA;AAAA,oBACC,WAAW,6CACTf,MAAaS,EAAK,QAAQ,cAAc,EAC1C;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA,GAEJ;AAAA,UACC,gBAAAH,EAAAU,GAAA,EACC,UAAC,gBAAAV,EAAAW,GAAA,EACE,YAAK,QAAQ,IAAI,CAACC,MAChB,gBAAAZ,EAAAa,GAAA,EACC,UAAC,gBAAAb,EAAAc,GAAA,EAAqB,SAAO,IAC3B,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,aAAa;AAAA,gBACX,WAAW;AAAA,cACb;AAAA,cACA,WAAU;AAAA,cACV,IAAIH,EAAQ;AAAA,cAEX,UAAA;AAAA,gBAAAA,EAAQ,QAAQ,gBAAAZ,EAACY,EAAQ,MAAR,CAAA,CAAa;AAAA,gBAC/B,gBAAAZ,EAAC,QAAM,EAAA,UAAAY,EAAQ,MAAM,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,aAEzB,EAZuB,GAAAA,EAAQ,KAajC,CACD,EACH,CAAA,EACF,CAAA;AAAA,QAAA,EACF,CAAA;AAAA,MAAA;AAAA,MA5CKT,EAAK;AAAA,IA6CZ,sBAECE,GACC,EAAA,UAAA,gBAAAL,EAACQ,KAAkB,SAAO,IAAC,SAASL,EAAK,OACvC,UAAA,gBAAAI;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,aAAa;AAAA,UACX,WAAW;AAAA;AAAA,QACb;AAAA,QACA,WAAU;AAAA,QACV,IAAIZ,EAAK;AAAA,QAER,UAAA;AAAA,UAAAA,EAAK,QAAQ,gBAAAH,EAACG,EAAK,MAAL,CAAA,CAAU;AAAA,UACzB,gBAAAH,EAAC,QAAM,EAAA,UAAAG,EAAK,MAAM,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEtB,EAZoB,GAAAA,EAAK,KAa3B;AAAA,KAGN,EACF,CAAA;AAEJ;"}
@@ -0,0 +1,10 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { Sidebar as e, SidebarContent as o } from "../ui/sidebar.es.js";
3
+ import { NavMain as c } from "./nav-main.es.js";
4
+ function t({ data: i, ...a }) {
5
+ return /* @__PURE__ */ r(e, { collapsible: "icon", ...a, className: "bg-card h-full", children: /* @__PURE__ */ r(o, { className: "bg-card", children: /* @__PURE__ */ r(c, { items: i }) }) });
6
+ }
7
+ export {
8
+ t as SideBar
9
+ };
10
+ //# sourceMappingURL=sidebar.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.es.js","sources":["../../../lib/components/sidebar/sidebar.tsx"],"sourcesContent":["import { Sidebar, SidebarContent } from '@/components/ui/sidebar';\nimport * as React from 'react';\nimport { type NavItem, NavMain } from './nav-main';\n\ninterface SidebarProps extends React.ComponentProps<typeof Sidebar> {\n data: NavItem[];\n}\n\nexport function SideBar({ data, ...props }: SidebarProps) {\n return (\n <Sidebar collapsible=\"icon\" {...props} className=\"bg-card h-full\">\n {/* Sidebar Content */}\n <SidebarContent className=\"bg-card\">\n <NavMain items={data} />\n </SidebarContent>\n </Sidebar>\n );\n}\n"],"names":["SideBar","data","props","Sidebar","jsx","SidebarContent","NavMain"],"mappings":";;;AAQO,SAASA,EAAQ,EAAE,MAAAC,GAAM,GAAGC,KAAuB;AACxD,2BACGC,GAAQ,EAAA,aAAY,QAAQ,GAAGD,GAAO,WAAU,kBAE/C,UAAC,gBAAAE,EAAAC,GAAA,EAAe,WAAU,WACxB,UAAA,gBAAAD,EAACE,KAAQ,OAAOL,EAAA,CAAM,EACxB,CAAA,GACF;AAEJ;"}
@@ -0,0 +1,30 @@
1
+ import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
+ import { Table as s, TableHeader as x, TableRow as p, TableCell as a, TableBody as f } from "../ui/table.es.js";
3
+ import { Badge as g } from "lucide-react";
4
+ import { getResourceDisplayName as u, getValueFromData as v } from "../data-table/table-utils/constants.es.js";
5
+ function b({ accessors: d, data: m, affectedData: t }) {
6
+ return /* @__PURE__ */ e("div", { className: "relative overflow-hidden border max-h-[50vh]", children: /* @__PURE__ */ e("div", { className: "overflow-y-auto max-h-[50vh]", children: /* @__PURE__ */ n(s, { children: [
7
+ /* @__PURE__ */ e(x, { className: "text-left align-middle uppercase sticky top-0 z-10 bg-card", children: /* @__PURE__ */ n(p, { children: [
8
+ d.map((r) => /* @__PURE__ */ e(
9
+ a,
10
+ {
11
+ className: "px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card",
12
+ children: u(String(r), "admin-portal")
13
+ },
14
+ String(r)
15
+ )),
16
+ t && /* @__PURE__ */ e(a, { className: "px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card", children: "Affected" })
17
+ ] }) }),
18
+ /* @__PURE__ */ e(f, { children: m.map((r, o) => /* @__PURE__ */ n(p, { children: [
19
+ d.map((l) => {
20
+ const c = r[l];
21
+ return Array.isArray(c) ? /* @__PURE__ */ e(a, { className: "flex gap-4", children: c.map((i, h) => /* @__PURE__ */ e(g, { children: (i == null ? void 0 : i.name) || i }, h)) }, String(l)) : /* @__PURE__ */ e(a, { children: v(r, l) }, String(l));
22
+ }),
23
+ t && /* @__PURE__ */ e(a, { children: t.includes(r) ? /* @__PURE__ */ e("span", { className: "text-success-10", children: "✔" }) : /* @__PURE__ */ e("span", { className: "text-destructive", children: "✖" }) })
24
+ ] }, o)) })
25
+ ] }) }) });
26
+ }
27
+ export {
28
+ b as StaticDataTable
29
+ };
30
+ //# sourceMappingURL=data-table.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-table.es.js","sources":["../../../lib/components/static-data-table/data-table.tsx"],"sourcesContent":["import { getResourceDisplayName, getValueFromData } from '@/components/data-table';\nimport { Table, TableBody, TableCell, TableHeader, TableRow } from '@/components/ui/table';\nimport { Badge } from 'lucide-react';\n\nexport interface StaticDataTableProps<T> {\n accessors: (keyof T)[];\n data: T[];\n affectedData?: T[];\n}\n\nexport function StaticDataTable<T>({ accessors, data, affectedData }: StaticDataTableProps<T>) {\n return (\n <div className=\"relative overflow-hidden border max-h-[50vh]\">\n <div className=\"overflow-y-auto max-h-[50vh]\">\n <Table>\n <TableHeader className=\"text-left align-middle uppercase sticky top-0 z-10 bg-card\">\n <TableRow>\n {accessors.map((accessor) => (\n <TableCell\n key={String(accessor)}\n className=\"px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card\"\n >\n {getResourceDisplayName(String(accessor), 'admin-portal')}\n </TableCell>\n ))}\n {affectedData && (\n <TableCell className=\"px-4 py-2 text-left text-sm font-medium cursor-pointer whitespace-nowrap bg-card\">\n Affected\n </TableCell>\n )}\n </TableRow>\n </TableHeader>\n <TableBody>\n {data.map((item, index) => (\n <TableRow key={index}>\n {accessors.map((accessor) => {\n const value = item[accessor];\n // Handle arrays (e.g., userGroups) with badges\n if (Array.isArray(value)) {\n return (\n <TableCell key={String(accessor)} className=\"flex gap-4\">\n {value.map((subItem, subIndex) => (\n <Badge key={subIndex}>{subItem?.name || subItem}</Badge>\n ))}\n </TableCell>\n );\n }\n // Handle other data types\n return (\n <TableCell key={String(accessor)}>{getValueFromData(item, accessor)}</TableCell>\n );\n })}\n {affectedData && (\n <TableCell>\n {affectedData.includes(item) ? (\n <span className=\"text-success-10\">✔</span>\n ) : (\n <span className=\"text-destructive\">✖</span>\n )}\n </TableCell>\n )}\n </TableRow>\n ))}\n </TableBody>\n </Table>\n </div>\n </div>\n );\n}\n"],"names":["StaticDataTable","accessors","data","affectedData","jsx","jsxs","Table","TableHeader","TableRow","accessor","TableCell","getResourceDisplayName","TableBody","item","index","value","subItem","subIndex","Badge","getValueFromData"],"mappings":";;;;AAUO,SAASA,EAAmB,EAAE,WAAAC,GAAW,MAAAC,GAAM,cAAAC,KAAyC;AAE3F,SAAA,gBAAAC,EAAC,SAAI,WAAU,gDACb,4BAAC,OAAI,EAAA,WAAU,gCACb,UAAA,gBAAAC,EAACC,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAF,EAACG,GAAY,EAAA,WAAU,8DACrB,UAAA,gBAAAF,EAACG,GACE,EAAA,UAAA;AAAA,MAAUP,EAAA,IAAI,CAACQ,MACd,gBAAAL;AAAA,QAACM;AAAA,QAAA;AAAA,UAEC,WAAU;AAAA,UAET,UAAuBC,EAAA,OAAOF,CAAQ,GAAG,cAAc;AAAA,QAAA;AAAA,QAHnD,OAAOA,CAAQ;AAAA,MAAA,CAKvB;AAAA,MACAN,KACC,gBAAAC,EAACM,GAAU,EAAA,WAAU,oFAAmF,UAExG,WAAA,CAAA;AAAA,IAAA,EAAA,CAEJ,EACF,CAAA;AAAA,IACA,gBAAAN,EAACQ,KACE,UAAKV,EAAA,IAAI,CAACW,GAAMC,wBACdN,GACE,EAAA,UAAA;AAAA,MAAUP,EAAA,IAAI,CAACQ,MAAa;AACrB,cAAAM,IAAQF,EAAKJ,CAAQ;AAEvB,eAAA,MAAM,QAAQM,CAAK,sBAElBL,GAAiC,EAAA,WAAU,cACzC,UAAMK,EAAA,IAAI,CAACC,GAASC,wBAClBC,GAAsB,EAAA,WAAAF,KAAA,gBAAAA,EAAS,SAAQA,EAA5B,GAAAC,CAAoC,CACjD,EAHa,GAAA,OAAOR,CAAQ,CAI/B,IAKF,gBAAAL,EAACM,KAAkC,UAAiBS,EAAAN,GAAMJ,CAAQ,EAAlD,GAAA,OAAOA,CAAQ,CAAqC;AAAA,MAAA,CAEvE;AAAA,MACAN,KACE,gBAAAC,EAAAM,GAAA,EACE,YAAa,SAASG,CAAI,IACxB,gBAAAT,EAAA,QAAA,EAAK,WAAU,mBAAkB,eAAC,IAEnC,gBAAAA,EAAC,UAAK,WAAU,oBAAmB,cAAC,CAAA,EAExC,CAAA;AAAA,IAAA,EAzBW,GAAAU,CA2Bf,CACD,EACH,CAAA;AAAA,EAAA,EACF,CAAA,EACF,CAAA,GACF;AAEJ;"}
@@ -1,10 +1,10 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import * as g from "react";
3
- import { Slot as v } from "@radix-ui/react-slot";
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import { Slottable as g, Slot as v } from "@radix-ui/react-slot";
4
3
  import { cva as b } from "class-variance-authority";
5
- import { cn as p } from "../../utils/index.es.js";
4
+ import * as p from "react";
5
+ import { cn as h } from "../../utils/index.es.js";
6
6
  import { Loader as x } from "./loader.es.js";
7
- const h = b(
7
+ const y = b(
8
8
  "inline-flex items-center justify-center no-underline whitespace-nowrap rounded-lg text-body font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
9
9
  {
10
10
  variants: {
@@ -20,7 +20,7 @@ const h = b(
20
20
  default: "h-10 px-4 py-2",
21
21
  sm: "h-9 rounded-md px-3",
22
22
  lg: "h-11 rounded-md px-8",
23
- icon: "h-10 w-10"
23
+ icon: "h-7 rounded-md px-2"
24
24
  }
25
25
  },
26
26
  defaultVariants: {
@@ -28,37 +28,27 @@ const h = b(
28
28
  size: "default"
29
29
  }
30
30
  }
31
- ), y = g.forwardRef(
32
- ({
33
- className: i,
34
- variant: s,
35
- size: a,
36
- loading: t,
37
- disabled: d,
38
- asChild: u = !1,
39
- icon: o,
40
- children: e,
41
- ...c
42
- }, f) => {
43
- const l = u ? v : "button", n = o;
31
+ ), w = p.forwardRef(
32
+ ({ className: i, variant: a, size: s, loading: t, disabled: d, asChild: c = !1, icon: o, children: r, ...u }, l) => {
33
+ const f = c ? v : "button", n = o;
44
34
  return /* @__PURE__ */ m(
45
- l,
35
+ f,
46
36
  {
47
- className: p(h({ variant: s, size: a, className: i })),
48
- ref: f,
37
+ className: h(y({ variant: a, size: s, className: i })),
38
+ ref: l,
49
39
  disabled: t || d,
50
- ...c,
40
+ ...u,
51
41
  children: [
52
- t ? /* @__PURE__ */ r(x, {}) : n ? /* @__PURE__ */ r(n, { className: "h-4 w-4" }) : null,
53
- e ? /* @__PURE__ */ r("div", { className: o && e ? "ml-2" : "", children: e }) : null
42
+ t ? /* @__PURE__ */ e(x, { className: "h-4 w-4" }) : n ? /* @__PURE__ */ e(n, { className: "h-4 w-4" }) : null,
43
+ /* @__PURE__ */ e(g, { children: r ? /* @__PURE__ */ e("div", { className: o && r ? "ml-2" : "", children: r }) : null })
54
44
  ]
55
45
  }
56
46
  );
57
47
  }
58
48
  );
59
- y.displayName = "Button";
49
+ w.displayName = "Button";
60
50
  export {
61
- y as Button,
62
- h as buttonVariants
51
+ w as Button,
52
+ y as buttonVariants
63
53
  };
64
54
  //# sourceMappingURL=button.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.es.js","sources":["../../../lib/components/ui/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils\"\nimport { Loader } from \"./loader\";\nimport { LucideIcon } from \"lucide-react\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center no-underline whitespace-nowrap rounded-lg text-body font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/80 hover:text-primary-foreground\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground\",\n outline:\n \"border border-input text-accent bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n loading?: boolean;\n icon?: LucideIcon;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n loading,\n disabled,\n asChild = false,\n icon,\n children,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\";\n const Icon = icon;\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || disabled}\n {...props}\n >\n {/* Shows loading when `loading:true` irrespective of icon present or not; otherwise shows button icon if present */}\n {loading ? <Loader /> : Icon ? <Icon className=\"h-4 w-4\" /> : null}\n {/* Margin left only when both icon and children (button text) are present */}\n {children ? (\n <div className={icon && children ? \"ml-2\" : \"\"}>{children}</div>\n ) : null}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\"; // Set display name for better debugging\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","loading","disabled","asChild","icon","children","props","ref","Comp","Slot","Icon","jsxs","cn","jsx","Loader"],"mappings":";;;;;;AAQA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAUMC,IAASC,EAAM;AAAA,EACnB,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,GAAGC;AAAA,KAELC,MACG;AACG,UAAAC,IAAOL,IAAUM,IAAO,UACxBC,IAAON;AAGX,WAAA,gBAAAO;AAAA,MAACH;AAAA,MAAA;AAAA,QACC,WAAWI,EAAGlB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAS;AAAA,QACA,UAAUN,KAAWC;AAAA,QACpB,GAAGI;AAAA,QAGH,UAAA;AAAA,UAAUL,IAAA,gBAAAY,EAACC,KAAO,IAAKJ,sBAAQA,GAAK,EAAA,WAAU,WAAU,IAAK;AAAA,UAE7DL,sBACE,OAAI,EAAA,WAAWD,KAAQC,IAAW,SAAS,IAAK,UAAAA,EAAA,CAAS,IACxD;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAGN;AAEAT,EAAO,cAAc;"}
1
+ {"version":3,"file":"button.es.js","sources":["../../../lib/components/ui/button.tsx"],"sourcesContent":["import { Slot, Slottable } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\nimport { LucideIcon } from 'lucide-react';\nimport { Loader } from './loader';\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center no-underline whitespace-nowrap rounded-lg text-body font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground hover:bg-primary/80 hover:text-primary-foreground',\n destructive:\n 'bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground',\n outline:\n 'border border-input text-accent bg-background hover:bg-accent hover:text-accent-foreground',\n secondary:\n 'bg-secondary text-secondary-foreground hover:text-secondary-foreground hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n },\n size: {\n default: 'h-10 px-4 py-2',\n sm: 'h-9 rounded-md px-3',\n lg: 'h-11 rounded-md px-8',\n icon: 'h-7 rounded-md px-2',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n loading?: boolean;\n icon?: LucideIcon;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n { className, variant, size, loading, disabled, asChild = false, icon, children, ...props },\n ref,\n ) => {\n const Comp = asChild ? Slot : 'button';\n const Icon = icon;\n\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || disabled}\n {...props}\n >\n {/* Shows loading when `loading:true` irrespective of icon present or not; otherwise shows button icon if present */}\n {loading ? <Loader className=\"h-4 w-4\" /> : Icon ? <Icon className=\"h-4 w-4\" /> : null}\n {/* Margin left only when both icon and children (button text) are present */}\n {/* https://www.radix-ui.com/primitives/docs/utilities/slot */}\n <Slottable>\n {children ? <div className={icon && children ? 'ml-2' : ''}>{children}</div> : null}\n </Slottable>\n </Comp>\n );\n },\n);\n\nButton.displayName = 'Button'; // Set display name for better debugging\n\nexport { Button, buttonVariants };\n"],"names":["buttonVariants","cva","Button","React","className","variant","size","loading","disabled","asChild","icon","children","props","ref","Comp","Slot","Icon","jsxs","cn","jsx","Loader","Slottable"],"mappings":";;;;;;AAQA,MAAMA,IAAiBC;AAAA,EACrB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SACE;AAAA,QACF,aACE;AAAA,QACF,SACE;AAAA,QACF,WACE;AAAA,QACF,OAAO;AAAA,QACP,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,MAAM;AAAA,MAAA;AAAA,IAEV;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ,GAUMC,IAASC,EAAM;AAAA,EACnB,CACE,EAAE,WAAAC,GAAW,SAAAC,GAAS,MAAAC,GAAM,SAAAC,GAAS,UAAAC,GAAU,SAAAC,IAAU,IAAO,MAAAC,GAAM,UAAAC,GAAU,GAAGC,EAAA,GACnFC,MACG;AACG,UAAAC,IAAOL,IAAUM,IAAO,UACxBC,IAAON;AAGX,WAAA,gBAAAO;AAAA,MAACH;AAAA,MAAA;AAAA,QACC,WAAWI,EAAGlB,EAAe,EAAE,SAAAK,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,QAC1D,KAAAS;AAAA,QACA,UAAUN,KAAWC;AAAA,QACpB,GAAGI;AAAA,QAGH,UAAA;AAAA,UAAUL,IAAA,gBAAAY,EAACC,GAAO,EAAA,WAAU,UAAU,CAAA,IAAKJ,IAAQ,gBAAAG,EAAAH,GAAA,EAAK,WAAU,UAAA,CAAU,IAAK;AAAA,UAGjF,gBAAAG,EAAAE,GAAA,EACE,UAAWV,IAAA,gBAAAQ,EAAC,OAAI,EAAA,WAAWT,KAAQC,IAAW,SAAS,IAAK,UAAAA,EAAS,CAAA,IAAS,KACjF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;AAEAT,EAAO,cAAc;"}
@@ -1,63 +1,61 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { ChevronLeftIcon as c, ChevronRightIcon as i } from "@radix-ui/react-icons";
3
- import { DayPicker as l } from "react-day-picker";
2
+ import { ChevronLeftIcon as s, ChevronRightIcon as c } from "@radix-ui/react-icons";
3
+ import { DayPicker as i } from "react-day-picker";
4
4
  import { cn as e } from "../../utils/index.es.js";
5
5
  import { buttonVariants as r } from "./button.es.js";
6
- function m({
6
+ const l = ({
7
7
  className: o,
8
8
  classNames: d,
9
9
  showOutsideDays: n = !0,
10
10
  ...t
11
- }) {
12
- return /* @__PURE__ */ a(
13
- l,
14
- {
15
- showOutsideDays: n,
16
- className: e("p-3", o),
17
- classNames: {
18
- months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
19
- month: "space-y-4",
20
- caption: "flex justify-center pt-1 relative items-center",
21
- caption_label: "text-body font-medium",
22
- nav: "space-x-1 flex items-center",
23
- nav_button: e(
24
- r({ variant: "outline" }),
25
- "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
26
- ),
27
- nav_button_previous: "absolute left-1",
28
- nav_button_next: "absolute right-1",
29
- table: "w-full border-collapse space-y-1",
30
- head_row: "flex",
31
- head_cell: "text-muted-foreground rounded-md w-8 font-normal text-caption",
32
- row: "flex w-full mt-2",
33
- cell: e(
34
- "relative p-0 text-center text-body focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
35
- t.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
36
- ),
37
- day: e(
38
- r({ variant: "ghost" }),
39
- "h-8 w-8 p-0 font-normal aria-selected:opacity-100"
40
- ),
41
- day_range_start: "day-range-start",
42
- day_range_end: "day-range-end",
43
- day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
44
- day_today: "bg-accent text-accent-foreground",
45
- day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
46
- day_disabled: "text-muted-foreground opacity-50",
47
- day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
48
- day_hidden: "invisible",
49
- ...d
50
- },
51
- components: {
52
- IconLeft: ({ ...s }) => /* @__PURE__ */ a(c, { className: "h-4 w-4" }),
53
- IconRight: ({ ...s }) => /* @__PURE__ */ a(i, { className: "h-4 w-4" })
54
- },
55
- ...t
56
- }
57
- );
58
- }
59
- m.displayName = "Calendar";
11
+ }) => /* @__PURE__ */ a(
12
+ i,
13
+ {
14
+ showOutsideDays: n,
15
+ className: e("p-3", o),
16
+ classNames: {
17
+ months: "flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",
18
+ month: "space-y-4",
19
+ caption: "flex justify-center pt-1 relative items-center",
20
+ caption_label: "text-body font-medium",
21
+ nav: "space-x-1 flex items-center",
22
+ nav_button: e(
23
+ r({ variant: "outline" }),
24
+ "h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"
25
+ ),
26
+ nav_button_previous: "absolute left-1",
27
+ nav_button_next: "absolute right-1",
28
+ table: "w-full border-collapse space-y-1",
29
+ head_row: "flex",
30
+ head_cell: "text-muted-foreground rounded-md w-8 font-normal text-caption",
31
+ row: "flex w-full mt-2",
32
+ cell: e(
33
+ "relative p-0 text-center text-body focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",
34
+ t.mode === "range" ? "[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md" : "[&:has([aria-selected])]:rounded-md"
35
+ ),
36
+ day: e(
37
+ r({ variant: "ghost" }),
38
+ "h-8 w-8 p-0 font-normal aria-selected:opacity-100"
39
+ ),
40
+ day_range_start: "day-range-start",
41
+ day_range_end: "day-range-end",
42
+ day_selected: "bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",
43
+ day_today: "bg-accent text-accent-foreground",
44
+ day_outside: "day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",
45
+ day_disabled: "text-muted-foreground opacity-50",
46
+ day_range_middle: "aria-selected:bg-accent aria-selected:text-accent-foreground",
47
+ day_hidden: "invisible",
48
+ ...d
49
+ },
50
+ components: {
51
+ IconLeft: () => /* @__PURE__ */ a(s, { className: "h-4 w-4" }),
52
+ IconRight: () => /* @__PURE__ */ a(c, { className: "h-4 w-4" })
53
+ },
54
+ ...t
55
+ }
56
+ );
57
+ l.displayName = "Calendar";
60
58
  export {
61
- m as Calendar
59
+ l as Calendar
62
60
  };
63
61
  //# sourceMappingURL=calendar.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.es.js","sources":["../../../lib/components/ui/calendar.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@radix-ui/react-icons\"\nimport { DayPicker } from \"react-day-picker\"\n\nimport { cn } from \"@/utils\"\nimport { buttonVariants } from \"@/components/ui/button\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n ...props\n}: CalendarProps) {\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\"p-3\", className)}\n classNames={{\n months: \"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0\",\n month: \"space-y-4\",\n caption: \"flex justify-center pt-1 relative items-center\",\n caption_label: \"text-body font-medium\",\n nav: \"space-x-1 flex items-center\",\n nav_button: cn(\n buttonVariants({ variant: \"outline\" }),\n \"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100\"\n ),\n nav_button_previous: \"absolute left-1\",\n nav_button_next: \"absolute right-1\",\n table: \"w-full border-collapse space-y-1\",\n head_row: \"flex\",\n head_cell:\n \"text-muted-foreground rounded-md w-8 font-normal text-caption\",\n row: \"flex w-full mt-2\",\n cell: cn(\n \"relative p-0 text-center text-body focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md\",\n props.mode === \"range\"\n ? \"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\n : \"[&:has([aria-selected])]:rounded-md\"\n ),\n day: cn(\n buttonVariants({ variant: \"ghost\" }),\n \"h-8 w-8 p-0 font-normal aria-selected:opacity-100\"\n ),\n day_range_start: \"day-range-start\",\n day_range_end: \"day-range-end\",\n day_selected:\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n day_today: \"bg-accent text-accent-foreground\",\n day_outside:\n \"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30\",\n day_disabled: \"text-muted-foreground opacity-50\",\n day_range_middle:\n \"aria-selected:bg-accent aria-selected:text-accent-foreground\",\n day_hidden: \"invisible\",\n ...classNames,\n }}\n components={{\n IconLeft: ({ ...props }) => <ChevronLeftIcon className=\"h-4 w-4\" />,\n IconRight: ({ ...props }) => <ChevronRightIcon className=\"h-4 w-4\" />,\n }}\n {...props}\n />\n )\n}\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n"],"names":["Calendar","className","classNames","showOutsideDays","props","jsx","DayPicker","cn","buttonVariants","ChevronLeftIcon","ChevronRightIcon"],"mappings":";;;;;AASA,SAASA,EAAS;AAAA,EAChB,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,GAAGC;AACL,GAAkB;AAEd,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,iBAAAH;AAAA,MACA,WAAWI,EAAG,OAAON,CAAS;AAAA,MAC9B,YAAY;AAAA,QACV,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,SAAS;AAAA,QACT,eAAe;AAAA,QACf,KAAK;AAAA,QACL,YAAYM;AAAA,UACVC,EAAe,EAAE,SAAS,WAAW;AAAA,UACrC;AAAA,QACF;AAAA,QACA,qBAAqB;AAAA,QACrB,iBAAiB;AAAA,QACjB,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WACE;AAAA,QACF,KAAK;AAAA,QACL,MAAMD;AAAA,UACJ;AAAA,UACAH,EAAM,SAAS,UACX,yKACA;AAAA,QACN;AAAA,QACA,KAAKG;AAAA,UACHC,EAAe,EAAE,SAAS,SAAS;AAAA,UACnC;AAAA,QACF;AAAA,QACA,iBAAiB;AAAA,QACjB,eAAe;AAAA,QACf,cACE;AAAA,QACF,WAAW;AAAA,QACX,aACE;AAAA,QACF,cAAc;AAAA,QACd,kBACE;AAAA,QACF,YAAY;AAAA,QACZ,GAAGN;AAAA,MACL;AAAA,MACA,YAAY;AAAA,QACV,UAAU,CAAC,EAAE,GAAGE,EAAY,MAAA,gBAAAC,EAACI,GAAgB,EAAA,WAAU,WAAU;AAAA,QACjE,WAAW,CAAC,EAAE,GAAGL,EAAY,MAAA,gBAAAC,EAACK,GAAiB,EAAA,WAAU,UAAU,CAAA;AAAA,MACrE;AAAA,MACC,GAAGN;AAAA,IAAA;AAAA,EACN;AAEJ;AACAJ,EAAS,cAAc;"}
1
+ {"version":3,"file":"calendar.es.js","sources":["../../../lib/components/ui/calendar.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { ChevronLeftIcon, ChevronRightIcon } from \"@radix-ui/react-icons\"\nimport { DayPicker } from \"react-day-picker\"\n\nimport { cn } from \"@/utils\"\nimport { buttonVariants } from \"@/components/ui/button\"\n\nexport type CalendarProps = React.ComponentProps<typeof DayPicker>\n\nconst Calendar: React.FC<CalendarProps> = ({\n className,\n classNames,\n showOutsideDays = true,\n ...props\n}) => {\n return (\n <DayPicker\n showOutsideDays={showOutsideDays}\n className={cn(\"p-3\", className)}\n classNames={{\n months: \"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0\",\n month: \"space-y-4\",\n caption: \"flex justify-center pt-1 relative items-center\",\n caption_label: \"text-body font-medium\",\n nav: \"space-x-1 flex items-center\",\n nav_button: cn(\n buttonVariants({ variant: \"outline\" }),\n \"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100\"\n ),\n nav_button_previous: \"absolute left-1\",\n nav_button_next: \"absolute right-1\",\n table: \"w-full border-collapse space-y-1\",\n head_row: \"flex\",\n head_cell:\n \"text-muted-foreground rounded-md w-8 font-normal text-caption\",\n row: \"flex w-full mt-2\",\n cell: cn(\n \"relative p-0 text-center text-body focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md\",\n props.mode === \"range\"\n ? \"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\n : \"[&:has([aria-selected])]:rounded-md\"\n ),\n day: cn(\n buttonVariants({ variant: \"ghost\" }),\n \"h-8 w-8 p-0 font-normal aria-selected:opacity-100\"\n ),\n day_range_start: \"day-range-start\",\n day_range_end: \"day-range-end\",\n day_selected:\n \"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground\",\n day_today: \"bg-accent text-accent-foreground\",\n day_outside:\n \"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30\",\n day_disabled: \"text-muted-foreground opacity-50\",\n day_range_middle:\n \"aria-selected:bg-accent aria-selected:text-accent-foreground\",\n day_hidden: \"invisible\",\n ...classNames,\n }}\n components={{\n IconLeft: () => <ChevronLeftIcon className='h-4 w-4' />,\n IconRight: () => <ChevronRightIcon className='h-4 w-4' />,\n }}\n {...props}\n />\n );\n};\nCalendar.displayName = \"Calendar\"\n\nexport { Calendar }\n"],"names":["Calendar","className","classNames","showOutsideDays","props","jsx","DayPicker","cn","buttonVariants","ChevronLeftIcon","ChevronRightIcon"],"mappings":";;;;;AASA,MAAMA,IAAoC,CAAC;AAAA,EACzC,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC,IAAkB;AAAA,EAClB,GAAGC;AACL,MAEI,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,iBAAAH;AAAA,IACA,WAAWI,EAAG,OAAON,CAAS;AAAA,IAC9B,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,OAAO;AAAA,MACP,SAAS;AAAA,MACT,eAAe;AAAA,MACf,KAAK;AAAA,MACL,YAAYM;AAAA,QACVC,EAAe,EAAE,SAAS,WAAW;AAAA,QACrC;AAAA,MACF;AAAA,MACA,qBAAqB;AAAA,MACrB,iBAAiB;AAAA,MACjB,OAAO;AAAA,MACP,UAAU;AAAA,MACV,WACE;AAAA,MACF,KAAK;AAAA,MACL,MAAMD;AAAA,QACJ;AAAA,QACAH,EAAM,SAAS,UACX,yKACA;AAAA,MACN;AAAA,MACA,KAAKG;AAAA,QACHC,EAAe,EAAE,SAAS,SAAS;AAAA,QACnC;AAAA,MACF;AAAA,MACA,iBAAiB;AAAA,MACjB,eAAe;AAAA,MACf,cACE;AAAA,MACF,WAAW;AAAA,MACX,aACE;AAAA,MACF,cAAc;AAAA,MACd,kBACE;AAAA,MACF,YAAY;AAAA,MACZ,GAAGN;AAAA,IACL;AAAA,IACA,YAAY;AAAA,MACV,UAAU,MAAO,gBAAAG,EAAAI,GAAA,EAAgB,WAAU,UAAU,CAAA;AAAA,MACrD,WAAW,MAAO,gBAAAJ,EAAAK,GAAA,EAAiB,WAAU,UAAU,CAAA;AAAA,IACzD;AAAA,IACC,GAAGN;AAAA,EAAA;AACN;AAGJJ,EAAS,cAAc;"}
@@ -2,7 +2,7 @@ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import { Drawer as a } from "vaul";
4
4
  import { cn as s } from "../../utils/index.es.js";
5
- const n = ({
5
+ const c = ({
6
6
  shouldScaleBackground: e = !0,
7
7
  ...r
8
8
  }) => /* @__PURE__ */ t(
@@ -12,8 +12,8 @@ const n = ({
12
12
  ...r
13
13
  }
14
14
  );
15
- n.displayName = "Drawer";
16
- const u = a.Trigger, c = a.Portal, b = a.Close, d = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
15
+ c.displayName = "Drawer";
16
+ const u = a.Trigger, n = a.Portal, b = a.Close, d = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
17
17
  a.Overlay,
18
18
  {
19
19
  ref: o,
@@ -22,12 +22,13 @@ const u = a.Trigger, c = a.Portal, b = a.Close, d = l.forwardRef(({ className: e
22
22
  }
23
23
  ));
24
24
  d.displayName = a.Overlay.displayName;
25
- const p = l.forwardRef(({ className: e, children: r, ...o }, m) => /* @__PURE__ */ i(c, { children: [
25
+ const p = l.forwardRef(({ className: e, children: r, ...o }, m) => /* @__PURE__ */ i(n, { children: [
26
26
  /* @__PURE__ */ t(d, {}),
27
27
  /* @__PURE__ */ i(
28
28
  a.Content,
29
29
  {
30
30
  ref: m,
31
+ style: { userSelect: "text" },
31
32
  className: s(
32
33
  "fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",
33
34
  e
@@ -63,7 +64,7 @@ const w = ({
63
64
  }
64
65
  );
65
66
  w.displayName = "DrawerFooter";
66
- const D = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
67
+ const x = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
67
68
  a.Title,
68
69
  {
69
70
  ref: o,
@@ -74,8 +75,8 @@ const D = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
74
75
  ...r
75
76
  }
76
77
  ));
77
- D.displayName = a.Title.displayName;
78
- const x = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
78
+ x.displayName = a.Title.displayName;
79
+ const D = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
79
80
  a.Description,
80
81
  {
81
82
  ref: o,
@@ -83,17 +84,17 @@ const x = l.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
83
84
  ...r
84
85
  }
85
86
  ));
86
- x.displayName = a.Description.displayName;
87
+ D.displayName = a.Description.displayName;
87
88
  export {
88
- n as Drawer,
89
+ c as Drawer,
89
90
  b as DrawerClose,
90
91
  p as DrawerContent,
91
- x as DrawerDescription,
92
+ D as DrawerDescription,
92
93
  w as DrawerFooter,
93
94
  f as DrawerHeader,
94
95
  d as DrawerOverlay,
95
- c as DrawerPortal,
96
- D as DrawerTitle,
96
+ n as DrawerPortal,
97
+ x as DrawerTitle,
97
98
  u as DrawerTrigger
98
99
  };
99
100
  //# sourceMappingURL=drawer.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.es.js","sources":["../../../lib/components/ui/drawer.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/utils\"\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n)\nDrawer.displayName = \"Drawer\"\n\nconst DrawerTrigger = DrawerPrimitive.Trigger\n\nconst DrawerPortal = DrawerPrimitive.Portal\n\nconst DrawerClose = DrawerPrimitive.Close\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n))\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background\",\n className\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n))\nDrawerContent.displayName = \"DrawerContent\"\n\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n)\nDrawerHeader.displayName = \"DrawerHeader\"\n\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n)\nDrawerFooter.displayName = \"DrawerFooter\"\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-heading-3\",\n className\n )}\n {...props}\n />\n))\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-body text-muted-foreground\", className)}\n {...props}\n />\n))\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"],"names":["Drawer","shouldScaleBackground","props","jsx","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","React","className","ref","cn","DrawerContent","children","jsxs","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;AAKA,MAAMA,IAAS,CAAC;AAAA,EACd,uBAAAC,IAAwB;AAAA,EACxB,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,uBAAAH;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAO,cAAc;AAErB,MAAMK,IAAgBD,EAAgB,SAEhCE,IAAeF,EAAgB,QAE/BG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAM,GAAGS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC,EAAG,kCAAkCF,CAAS;AAAA,IACxD,GAAGR;AAAA,EAAA;AACN,CACD;AACDM,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMS,IAAgBJ,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,UAAAI,GAAU,GAAGZ,EAAM,GAAGS,MACpC,gBAAAI,EAACT,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAH,EAACK,GAAc,EAAA;AAAA,EACf,gBAAAO;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAO;AAAA,MACA,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MACF;AAAA,MACC,GAAGR;AAAA,MAEJ,UAAA;AAAA,QAAC,gBAAAC,EAAA,OAAA,EAAI,WAAU,mDAAmD,CAAA;AAAA,QACjEW;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AACH,GACF,CACD;AACDD,EAAc,cAAc;AAE5B,MAAMG,IAAe,CAAC;AAAA,EACpB,WAAAN;AAAA,EACA,GAAGR;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWS,EAAG,6CAA6CF,CAAS;AAAA,IACnE,GAAGR;AAAA,EAAA;AACN;AAEFc,EAAa,cAAc;AAE3B,MAAMC,IAAe,CAAC;AAAA,EACpB,WAAAP;AAAA,EACA,GAAGR;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWS,EAAG,mCAAmCF,CAAS;AAAA,IACzD,GAAGR;AAAA,EAAA;AACN;AAEFe,EAAa,cAAc;AAErB,MAAAC,IAAcT,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAM,GAAGS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IACF;AAAA,IACC,GAAGR;AAAA,EAAA;AACN,CACD;AACDgB,EAAY,cAAcd,EAAgB,MAAM;AAE1C,MAAAe,IAAoBV,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAM,GAAGS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC,EAAG,mCAAmCF,CAAS;AAAA,IACzD,GAAGR;AAAA,EAAA;AACN,CACD;AACDiB,EAAkB,cAAcf,EAAgB,YAAY;"}
1
+ {"version":3,"file":"drawer.es.js","sources":["../../../lib/components/ui/drawer.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\n\nimport { cn } from \"@/utils\"\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root\n shouldScaleBackground={shouldScaleBackground}\n {...props}\n />\n)\nDrawer.displayName = \"Drawer\"\n\nconst DrawerTrigger = DrawerPrimitive.Trigger\n\nconst DrawerPortal: React.FC<\n React.ComponentProps<typeof DrawerPrimitive.Portal>\n> = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close\n\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n))\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n style={{ userSelect: \"text\" }}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background\",\n className,\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n))\nDrawerContent.displayName = \"DrawerContent\"\n\nconst DrawerHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)}\n {...props}\n />\n)\nDrawerHeader.displayName = \"DrawerHeader\"\n\nconst DrawerFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n)\nDrawerFooter.displayName = \"DrawerFooter\"\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\n \"text-heading-3\",\n className\n )}\n {...props}\n />\n))\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-body text-muted-foreground\", className)}\n {...props}\n />\n))\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"],"names":["Drawer","shouldScaleBackground","props","jsx","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","React","className","ref","cn","DrawerContent","children","jsxs","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":";;;;AAKA,MAAMA,IAAS,CAAC;AAAA,EACd,uBAAAC,IAAwB;AAAA,EACxB,GAAGC;AACL,MACE,gBAAAC;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,uBAAAH;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAEFF,EAAO,cAAc;AAErB,MAAMK,IAAgBD,EAAgB,SAEhCE,IAEFF,EAAgB,QAEdG,IAAcH,EAAgB,OAE9BI,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAM,GAAGS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC,EAAG,kCAAkCF,CAAS;AAAA,IACxD,GAAGR;AAAA,EAAA;AACN,CACD;AACDM,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,MAAMS,IAAgBJ,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,UAAAI,GAAU,GAAGZ,EAAM,GAAGS,MACpC,gBAAAI,EAACT,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAH,EAACK,GAAc,EAAA;AAAA,EACf,gBAAAO;AAAA,IAACX,EAAgB;AAAA,IAAhB;AAAA,MACC,KAAAO;AAAA,MACA,OAAO,EAAE,YAAY,OAAO;AAAA,MAC5B,WAAWC;AAAA,QACT;AAAA,QACAF;AAAA,MACF;AAAA,MACC,GAAGR;AAAA,MAEJ,UAAA;AAAA,QAAC,gBAAAC,EAAA,OAAA,EAAI,WAAU,mDAAmD,CAAA;AAAA,QACjEW;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AACH,GACF,CACD;AACDD,EAAc,cAAc;AAE5B,MAAMG,IAAe,CAAC;AAAA,EACpB,WAAAN;AAAA,EACA,GAAGR;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWS,EAAG,6CAA6CF,CAAS;AAAA,IACnE,GAAGR;AAAA,EAAA;AACN;AAEFc,EAAa,cAAc;AAE3B,MAAMC,IAAe,CAAC;AAAA,EACpB,WAAAP;AAAA,EACA,GAAGR;AACL,MACE,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWS,EAAG,mCAAmCF,CAAS;AAAA,IACzD,GAAGR;AAAA,EAAA;AACN;AAEFe,EAAa,cAAc;AAErB,MAAAC,IAAcT,EAAM,WAGxB,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAM,GAAGS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC;AAAA,MACT;AAAA,MACAF;AAAA,IACF;AAAA,IACC,GAAGR;AAAA,EAAA;AACN,CACD;AACDgB,EAAY,cAAcd,EAAgB,MAAM;AAE1C,MAAAe,IAAoBV,EAAM,WAG9B,CAAC,EAAE,WAAAC,GAAW,GAAGR,EAAM,GAAGS,MAC1B,gBAAAR;AAAA,EAACC,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAO;AAAA,IACA,WAAWC,EAAG,mCAAmCF,CAAS;AAAA,IACzD,GAAGR;AAAA,EAAA;AACN,CACD;AACDiB,EAAkB,cAAcf,EAAgB,YAAY;"}