@kubetail/ui 2.0.1 → 2.0.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 (51) hide show
  1. package/dist/elements/dialog.cjs +1 -1
  2. package/dist/elements/dialog.js +26 -26
  3. package/dist/elements/pagination.cjs +2 -0
  4. package/dist/elements/pagination.cjs.map +1 -0
  5. package/dist/elements/pagination.d.ts +13 -0
  6. package/dist/elements/pagination.js +97 -0
  7. package/dist/elements/pagination.js.map +1 -0
  8. package/dist/elements/pagination.stories.d.ts +15 -0
  9. package/dist/elements/pagination.test.d.ts +0 -0
  10. package/dist/elements/separator.cjs +2 -0
  11. package/dist/elements/separator.cjs.map +1 -0
  12. package/dist/elements/separator.d.ts +3 -0
  13. package/dist/elements/separator.js +27 -0
  14. package/dist/elements/separator.js.map +1 -0
  15. package/dist/elements/separator.stories.d.ts +15 -0
  16. package/dist/elements/separator.test.d.ts +0 -0
  17. package/dist/elements/sheet.cjs +2 -0
  18. package/dist/elements/sheet.cjs.map +1 -0
  19. package/dist/elements/sheet.d.ts +12 -0
  20. package/dist/elements/sheet.js +98 -0
  21. package/dist/elements/sheet.js.map +1 -0
  22. package/dist/elements/sheet.stories.d.ts +15 -0
  23. package/dist/elements/sheet.test.d.ts +0 -0
  24. package/dist/elements/sidebar.cjs +2 -0
  25. package/dist/elements/sidebar.cjs.map +1 -0
  26. package/dist/elements/sidebar.d.ts +68 -0
  27. package/dist/elements/sidebar.js +559 -0
  28. package/dist/elements/sidebar.js.map +1 -0
  29. package/dist/elements/sidebar.stories.d.ts +17 -0
  30. package/dist/elements/sidebar.test.d.ts +0 -0
  31. package/dist/elements/skeleton.cjs +2 -0
  32. package/dist/elements/skeleton.cjs.map +1 -0
  33. package/dist/elements/skeleton.d.ts +2 -0
  34. package/dist/elements/skeleton.js +9 -0
  35. package/dist/elements/skeleton.js.map +1 -0
  36. package/dist/elements/skeleton.stories.d.ts +15 -0
  37. package/dist/elements/skeleton.test.d.ts +0 -0
  38. package/dist/elements/tooltip.cjs +2 -0
  39. package/dist/elements/tooltip.cjs.map +1 -0
  40. package/dist/elements/tooltip.d.ts +6 -0
  41. package/dist/elements/tooltip.js +42 -0
  42. package/dist/elements/tooltip.js.map +1 -0
  43. package/dist/elements/tooltip.stories.d.ts +15 -0
  44. package/dist/elements/tooltip.test.d.ts +0 -0
  45. package/dist/hooks/use-mobile.cjs +2 -0
  46. package/dist/hooks/use-mobile.cjs.map +1 -0
  47. package/dist/hooks/use-mobile.d.ts +1 -0
  48. package/dist/hooks/use-mobile.js +15 -0
  49. package/dist/hooks/use-mobile.js.map +1 -0
  50. package/dist/index.css +19 -19
  51. package/package.json +11 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime");require("react");const d=require("@radix-ui/react-dialog"),c=require("lucide-react"),i=require("../lib/utils.cjs");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,l.get?l:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const o=g(d);function u({...t}){return a.jsx(o.Root,{"data-slot":"dialog",...t})}function f({...t}){return a.jsx(o.Trigger,{"data-slot":"dialog-trigger",...t})}function s({...t}){return a.jsx(o.Portal,{"data-slot":"dialog-portal",...t})}function m({...t}){return a.jsx(o.Close,{"data-slot":"dialog-close",...t})}function r({className:t,...e}){return a.jsx(o.Overlay,{"data-slot":"dialog-overlay",className:i.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function x({className:t,children:e,showCloseButton:n=!0,...l}){return a.jsxs(s,{"data-slot":"dialog-portal",children:[a.jsx(r,{}),a.jsxs(o.Content,{"data-slot":"dialog-content",className:i.cn("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...l,children:[e,n&&a.jsxs(o.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(c.XIcon,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function p({className:t,...e}){return a.jsx("div",{"data-slot":"dialog-header",className:i.cn("flex flex-col gap-2 text-center sm:text-left",t),...e})}function D({className:t,...e}){return a.jsx("div",{"data-slot":"dialog-footer",className:i.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}function j({className:t,...e}){return a.jsx(o.Title,{"data-slot":"dialog-title",className:i.cn("text-lg leading-none font-semibold",t),...e})}function b({className:t,...e}){return a.jsx(o.Description,{"data-slot":"dialog-description",className:i.cn("text-muted-foreground text-sm",t),...e})}exports.Dialog=u;exports.DialogClose=m;exports.DialogContent=x;exports.DialogDescription=b;exports.DialogFooter=D;exports.DialogHeader=p;exports.DialogOverlay=r;exports.DialogPortal=s;exports.DialogTitle=j;exports.DialogTrigger=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime");require("react");const d=require("@radix-ui/react-dialog"),c=require("lucide-react"),i=require("../lib/utils.cjs");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const o=g(d);function u({...t}){return a.jsx(o.Root,{"data-slot":"dialog",...t})}function f({...t}){return a.jsx(o.Trigger,{"data-slot":"dialog-trigger",...t})}function l({...t}){return a.jsx(o.Portal,{"data-slot":"dialog-portal",...t})}function m({...t}){return a.jsx(o.Close,{"data-slot":"dialog-close",...t})}function r({className:t,...e}){return a.jsx(o.Overlay,{"data-slot":"dialog-overlay",className:i.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function x({className:t,children:e,showCloseButton:n=!0,...s}){return a.jsxs(l,{"data-slot":"dialog-portal",children:[a.jsx(r,{}),a.jsxs(o.Content,{"data-slot":"dialog-content",className:i.cn("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...s,children:[e,n&&a.jsxs(o.Close,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[a.jsx(c.XIcon,{}),a.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function p({className:t,...e}){return a.jsx("div",{"data-slot":"dialog-header",className:i.cn("flex flex-col gap-2 text-center sm:text-left",t),...e})}function D({className:t,...e}){return a.jsx("div",{"data-slot":"dialog-footer",className:i.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}function j({className:t,...e}){return a.jsx(o.Title,{"data-slot":"dialog-title",className:i.cn("text-lg leading-none font-semibold",t),...e})}function b({className:t,...e}){return a.jsx(o.Description,{"data-slot":"dialog-description",className:i.cn("text-muted-foreground text-sm",t),...e})}exports.Dialog=u;exports.DialogClose=m;exports.DialogContent=x;exports.DialogDescription=b;exports.DialogFooter=D;exports.DialogHeader=p;exports.DialogOverlay=r;exports.DialogPortal=l;exports.DialogTitle=j;exports.DialogTrigger=f;
2
2
  //# sourceMappingURL=dialog.cjs.map
@@ -1,43 +1,43 @@
1
1
  import { jsx as a, jsxs as i } from "react/jsx-runtime";
2
2
  import "react";
3
- import * as e from "@radix-ui/react-dialog";
3
+ import * as o from "@radix-ui/react-dialog";
4
4
  import { XIcon as r } from "lucide-react";
5
5
  import { cn as n } from "../lib/utils.js";
6
6
  function p({ ...t }) {
7
- return /* @__PURE__ */ a(e.Root, { "data-slot": "dialog", ...t });
7
+ return /* @__PURE__ */ a(o.Root, { "data-slot": "dialog", ...t });
8
8
  }
9
9
  function x({ ...t }) {
10
- return /* @__PURE__ */ a(e.Trigger, { "data-slot": "dialog-trigger", ...t });
10
+ return /* @__PURE__ */ a(o.Trigger, { "data-slot": "dialog-trigger", ...t });
11
11
  }
12
12
  function d({ ...t }) {
13
- return /* @__PURE__ */ a(e.Portal, { "data-slot": "dialog-portal", ...t });
13
+ return /* @__PURE__ */ a(o.Portal, { "data-slot": "dialog-portal", ...t });
14
14
  }
15
15
  function v({ ...t }) {
16
- return /* @__PURE__ */ a(e.Close, { "data-slot": "dialog-close", ...t });
16
+ return /* @__PURE__ */ a(o.Close, { "data-slot": "dialog-close", ...t });
17
17
  }
18
- function g({ className: t, ...o }) {
18
+ function c({ className: t, ...e }) {
19
19
  return /* @__PURE__ */ a(
20
- e.Overlay,
20
+ o.Overlay,
21
21
  {
22
22
  "data-slot": "dialog-overlay",
23
23
  className: n(
24
24
  "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
25
25
  t
26
26
  ),
27
- ...o
27
+ ...e
28
28
  }
29
29
  );
30
30
  }
31
31
  function D({
32
32
  className: t,
33
- children: o,
33
+ children: e,
34
34
  showCloseButton: l = !0,
35
35
  ...s
36
36
  }) {
37
37
  return /* @__PURE__ */ i(d, { "data-slot": "dialog-portal", children: [
38
- /* @__PURE__ */ a(g, {}),
38
+ /* @__PURE__ */ a(c, {}),
39
39
  /* @__PURE__ */ i(
40
- e.Content,
40
+ o.Content,
41
41
  {
42
42
  "data-slot": "dialog-content",
43
43
  className: n(
@@ -46,9 +46,9 @@ function D({
46
46
  ),
47
47
  ...s,
48
48
  children: [
49
- o,
49
+ e,
50
50
  l && /* @__PURE__ */ i(
51
- e.Close,
51
+ o.Close,
52
52
  {
53
53
  "data-slot": "dialog-close",
54
54
  className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
@@ -63,43 +63,43 @@ function D({
63
63
  )
64
64
  ] });
65
65
  }
66
- function b({ className: t, ...o }) {
66
+ function h({ className: t, ...e }) {
67
67
  return /* @__PURE__ */ a(
68
68
  "div",
69
69
  {
70
70
  "data-slot": "dialog-header",
71
71
  className: n("flex flex-col gap-2 text-center sm:text-left", t),
72
- ...o
72
+ ...e
73
73
  }
74
74
  );
75
75
  }
76
- function h({ className: t, ...o }) {
76
+ function b({ className: t, ...e }) {
77
77
  return /* @__PURE__ */ a(
78
78
  "div",
79
79
  {
80
80
  "data-slot": "dialog-footer",
81
81
  className: n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", t),
82
- ...o
82
+ ...e
83
83
  }
84
84
  );
85
85
  }
86
- function y({ className: t, ...o }) {
86
+ function y({ className: t, ...e }) {
87
87
  return /* @__PURE__ */ a(
88
- e.Title,
88
+ o.Title,
89
89
  {
90
90
  "data-slot": "dialog-title",
91
91
  className: n("text-lg leading-none font-semibold", t),
92
- ...o
92
+ ...e
93
93
  }
94
94
  );
95
95
  }
96
- function N({ className: t, ...o }) {
96
+ function N({ className: t, ...e }) {
97
97
  return /* @__PURE__ */ a(
98
- e.Description,
98
+ o.Description,
99
99
  {
100
100
  "data-slot": "dialog-description",
101
101
  className: n("text-muted-foreground text-sm", t),
102
- ...o
102
+ ...e
103
103
  }
104
104
  );
105
105
  }
@@ -108,9 +108,9 @@ export {
108
108
  v as DialogClose,
109
109
  D as DialogContent,
110
110
  N as DialogDescription,
111
- h as DialogFooter,
112
- b as DialogHeader,
113
- g as DialogOverlay,
111
+ b as DialogFooter,
112
+ h as DialogHeader,
113
+ c as DialogOverlay,
114
114
  d as DialogPortal,
115
115
  y as DialogTitle,
116
116
  x as DialogTrigger
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime");require("react");const e=require("lucide-react"),t=require("../lib/utils.cjs"),c=require("./button.cjs");function u({className:n,...a}){return i.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:t.cn("mx-auto flex w-full justify-center",n),...a})}function g({className:n,...a}){return i.jsx("ul",{"data-slot":"pagination-content",className:t.cn("flex flex-row items-center gap-1",n),...a})}function p({...n}){return i.jsx("li",{"data-slot":"pagination-item",...n})}function s({className:n,isActive:a,size:o="icon",children:r,...l}){return i.jsx("a",{"aria-current":a?"page":void 0,"data-slot":"pagination-link","data-active":a,className:t.cn(c.buttonVariants({variant:a?"outline":"ghost",size:o}),n),...l,children:r})}function x({className:n,...a}){return i.jsxs(s,{"aria-label":"Go to previous page",size:"default",className:t.cn("gap-1 px-2.5 sm:pl-2.5",n),...a,children:[i.jsx(e.ChevronLeftIcon,{}),i.jsx("span",{className:"hidden sm:block",children:"Previous"})]})}function d({className:n,...a}){return i.jsxs(s,{"aria-label":"Go to next page",size:"default",className:t.cn("gap-1 px-2.5 sm:pr-2.5",n),...a,children:[i.jsx("span",{className:"hidden sm:block",children:"Next"}),i.jsx(e.ChevronRightIcon,{})]})}function m({className:n,...a}){return i.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:t.cn("flex size-9 items-center justify-center",n),...a,children:[i.jsx(e.MoreHorizontalIcon,{className:"size-4"}),i.jsx("span",{className:"sr-only",children:"More pages"})]})}exports.Pagination=u;exports.PaginationContent=g;exports.PaginationEllipsis=m;exports.PaginationItem=p;exports.PaginationLink=s;exports.PaginationNext=d;exports.PaginationPrevious=x;
2
+ //# sourceMappingURL=pagination.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.cjs","sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","jsxs","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","MoreHorizontalIcon"],"mappings":"8NAMA,SAASA,EAAW,CAAE,UAAAC,EAAW,GAAGC,GAAsC,CACxE,OACEC,EAAAA,IAAC,MAAA,CACC,KAAK,aACL,aAAW,aACX,YAAU,aACV,UAAWC,EAAAA,GAAG,qCAAsCH,CAAS,EAC5D,GAAGC,CAAA,CAAA,CAGV,CAEA,SAASG,EAAkB,CAAE,UAAAJ,EAAW,GAAGC,GAAqC,CAC9E,OAAOC,MAAC,KAAA,CAAG,YAAU,qBAAqB,UAAWC,EAAAA,GAAG,mCAAoCH,CAAS,EAAI,GAAGC,CAAA,CAAO,CACrH,CAEA,SAASI,EAAe,CAAE,GAAGJ,GAAqC,CAChE,OAAOC,EAAAA,IAAC,KAAA,CAAG,YAAU,kBAAmB,GAAGD,EAAO,CACpD,CAOA,SAASK,EAAe,CAAE,UAAAN,EAAW,SAAAO,EAAU,KAAAC,EAAO,OAAQ,SAAAC,EAAU,GAAGR,GAA8B,CACvG,OACEC,EAAAA,IAAC,IAAA,CACC,eAAcK,EAAW,OAAS,OAClC,YAAU,kBACV,cAAaA,EACb,UAAWJ,EAAAA,GACTO,iBAAe,CACb,QAASH,EAAW,UAAY,QAChC,KAAAC,CAAA,CACD,EACDR,CAAA,EAED,GAAGC,EAEH,SAAAQ,CAAA,CAAA,CAGP,CAEA,SAASE,EAAmB,CAAE,UAAAX,EAAW,GAAGC,GAAsD,CAChG,OACEW,EAAAA,KAACN,EAAA,CACC,aAAW,sBACX,KAAK,UACL,UAAWH,EAAAA,GAAG,yBAA0BH,CAAS,EAChD,GAAGC,EAEJ,SAAA,CAAAC,EAAAA,IAACW,EAAAA,gBAAA,EAAgB,EACjBX,EAAAA,IAAC,OAAA,CAAK,UAAU,kBAAkB,SAAA,UAAA,CAAQ,CAAA,CAAA,CAAA,CAGhD,CAEA,SAASY,EAAe,CAAE,UAAAd,EAAW,GAAGC,GAAsD,CAC5F,OACEW,EAAAA,KAACN,EAAA,CACC,aAAW,kBACX,KAAK,UACL,UAAWH,EAAAA,GAAG,yBAA0BH,CAAS,EAChD,GAAGC,EAEJ,SAAA,CAAAC,EAAAA,IAAC,OAAA,CAAK,UAAU,kBAAkB,SAAA,OAAI,QACrCa,EAAAA,iBAAA,CAAA,CAAiB,CAAA,CAAA,CAAA,CAGxB,CAEA,SAASC,EAAmB,CAAE,UAAAhB,EAAW,GAAGC,GAAuC,CACjF,OACEW,EAAAA,KAAC,OAAA,CACC,cAAW,GACX,YAAU,sBACV,UAAWT,EAAAA,GAAG,0CAA2CH,CAAS,EACjE,GAAGC,EAEJ,SAAA,CAAAC,EAAAA,IAACe,EAAAA,mBAAA,CAAmB,UAAU,QAAA,CAAS,EACvCf,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,YAAA,CAAU,CAAA,CAAA,CAAA,CAG1C"}
@@ -0,0 +1,13 @@
1
+ import { Button } from './button';
2
+ import * as React from 'react';
3
+ declare function Pagination({ className, ...props }: React.ComponentProps<'nav'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function PaginationContent({ className, ...props }: React.ComponentProps<'ul'>): import("react/jsx-runtime").JSX.Element;
5
+ declare function PaginationItem({ ...props }: React.ComponentProps<'li'>): import("react/jsx-runtime").JSX.Element;
6
+ type PaginationLinkProps = {
7
+ isActive?: boolean;
8
+ } & Pick<React.ComponentProps<typeof Button>, 'size'> & React.ComponentProps<'a'>;
9
+ declare function PaginationLink({ className, isActive, size, children, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
11
+ declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
12
+ declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
13
+ export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
@@ -0,0 +1,97 @@
1
+ import { jsx as i, jsxs as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { ChevronLeftIcon as c, ChevronRightIcon as p, MoreHorizontalIcon as m } from "lucide-react";
4
+ import { cn as t } from "../lib/utils.js";
5
+ import { buttonVariants as u } from "./button.js";
6
+ function N({ className: a, ...n }) {
7
+ return /* @__PURE__ */ i(
8
+ "nav",
9
+ {
10
+ role: "navigation",
11
+ "aria-label": "pagination",
12
+ "data-slot": "pagination",
13
+ className: t("mx-auto flex w-full justify-center", a),
14
+ ...n
15
+ }
16
+ );
17
+ }
18
+ function P({ className: a, ...n }) {
19
+ return /* @__PURE__ */ i("ul", { "data-slot": "pagination-content", className: t("flex flex-row items-center gap-1", a), ...n });
20
+ }
21
+ function v({ ...a }) {
22
+ return /* @__PURE__ */ i("li", { "data-slot": "pagination-item", ...a });
23
+ }
24
+ function o({ className: a, isActive: n, size: r = "icon", children: s, ...l }) {
25
+ return /* @__PURE__ */ i(
26
+ "a",
27
+ {
28
+ "aria-current": n ? "page" : void 0,
29
+ "data-slot": "pagination-link",
30
+ "data-active": n,
31
+ className: t(
32
+ u({
33
+ variant: n ? "outline" : "ghost",
34
+ size: r
35
+ }),
36
+ a
37
+ ),
38
+ ...l,
39
+ children: s
40
+ }
41
+ );
42
+ }
43
+ function b({ className: a, ...n }) {
44
+ return /* @__PURE__ */ e(
45
+ o,
46
+ {
47
+ "aria-label": "Go to previous page",
48
+ size: "default",
49
+ className: t("gap-1 px-2.5 sm:pl-2.5", a),
50
+ ...n,
51
+ children: [
52
+ /* @__PURE__ */ i(c, {}),
53
+ /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "Previous" })
54
+ ]
55
+ }
56
+ );
57
+ }
58
+ function z({ className: a, ...n }) {
59
+ return /* @__PURE__ */ e(
60
+ o,
61
+ {
62
+ "aria-label": "Go to next page",
63
+ size: "default",
64
+ className: t("gap-1 px-2.5 sm:pr-2.5", a),
65
+ ...n,
66
+ children: [
67
+ /* @__PURE__ */ i("span", { className: "hidden sm:block", children: "Next" }),
68
+ /* @__PURE__ */ i(p, {})
69
+ ]
70
+ }
71
+ );
72
+ }
73
+ function j({ className: a, ...n }) {
74
+ return /* @__PURE__ */ e(
75
+ "span",
76
+ {
77
+ "aria-hidden": !0,
78
+ "data-slot": "pagination-ellipsis",
79
+ className: t("flex size-9 items-center justify-center", a),
80
+ ...n,
81
+ children: [
82
+ /* @__PURE__ */ i(m, { className: "size-4" }),
83
+ /* @__PURE__ */ i("span", { className: "sr-only", children: "More pages" })
84
+ ]
85
+ }
86
+ );
87
+ }
88
+ export {
89
+ N as Pagination,
90
+ P as PaginationContent,
91
+ j as PaginationEllipsis,
92
+ v as PaginationItem,
93
+ o as PaginationLink,
94
+ z as PaginationNext,
95
+ b as PaginationPrevious
96
+ };
97
+ //# sourceMappingURL=pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.js","sources":["../../src/elements/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Button, buttonVariants } from '@/elements/button';\n\nfunction Pagination({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({ className, ...props }: React.ComponentProps<'ul'>) {\n return <ul data-slot=\"pagination-content\" className={cn('flex flex-row items-center gap-1', className)} {...props} />;\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, 'size'> &\n React.ComponentProps<'a'>;\n\nfunction PaginationLink({ className, isActive, size = 'icon', children, ...props }: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n }),\n className,\n )}\n {...props}\n >\n {children}\n </a>\n );\n}\n\nfunction PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pl-2.5', className)}\n {...props}\n >\n <ChevronLeftIcon />\n <span className=\"hidden sm:block\">Previous</span>\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn('gap-1 px-2.5 sm:pr-2.5', className)}\n {...props}\n >\n <span className=\"hidden sm:block\">Next</span>\n <ChevronRightIcon />\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({ className, ...props }: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n};\n"],"names":["Pagination","className","props","jsx","cn","PaginationContent","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","jsxs","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","MoreHorizontalIcon"],"mappings":";;;;;AAMA,SAASA,EAAW,EAAE,WAAAC,GAAW,GAAGC,KAAsC;AACxE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAWC,EAAG,sCAAsCH,CAAS;AAAA,MAC5D,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASG,EAAkB,EAAE,WAAAJ,GAAW,GAAGC,KAAqC;AAC9E,SAAO,gBAAAC,EAAC,MAAA,EAAG,aAAU,sBAAqB,WAAWC,EAAG,oCAAoCH,CAAS,GAAI,GAAGC,EAAA,CAAO;AACrH;AAEA,SAASI,EAAe,EAAE,GAAGJ,KAAqC;AAChE,SAAO,gBAAAC,EAAC,MAAA,EAAG,aAAU,mBAAmB,GAAGD,GAAO;AACpD;AAOA,SAASK,EAAe,EAAE,WAAAN,GAAW,UAAAO,GAAU,MAAAC,IAAO,QAAQ,UAAAC,GAAU,GAAGR,KAA8B;AACvG,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,gBAAcK,IAAW,SAAS;AAAA,MAClC,aAAU;AAAA,MACV,eAAaA;AAAA,MACb,WAAWJ;AAAA,QACTO,EAAe;AAAA,UACb,SAASH,IAAW,YAAY;AAAA,UAChC,MAAAC;AAAA,QAAA,CACD;AAAA,QACDR;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,MAEH,UAAAQ;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASE,EAAmB,EAAE,WAAAX,GAAW,GAAGC,KAAsD;AAChG,SACE,gBAAAW;AAAA,IAACN;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAWH,EAAG,0BAA0BH,CAAS;AAAA,MAChD,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAACW,GAAA,EAAgB;AAAA,QACjB,gBAAAX,EAAC,QAAA,EAAK,WAAU,mBAAkB,UAAA,WAAA,CAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhD;AAEA,SAASY,EAAe,EAAE,WAAAd,GAAW,GAAGC,KAAsD;AAC5F,SACE,gBAAAW;AAAA,IAACN;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAWH,EAAG,0BAA0BH,CAAS;AAAA,MAChD,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,mBAAkB,UAAA,QAAI;AAAA,0BACrCa,GAAA,CAAA,CAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGxB;AAEA,SAASC,EAAmB,EAAE,WAAAhB,GAAW,GAAGC,KAAuC;AACjF,SACE,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAWT,EAAG,2CAA2CH,CAAS;AAAA,MACjE,GAAGC;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAC,EAACe,GAAA,EAAmB,WAAU,SAAA,CAAS;AAAA,QACvC,gBAAAf,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,aAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;"}
@@ -0,0 +1,15 @@
1
+ import { Pagination } from './pagination';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ component: typeof Pagination;
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ export declare function BasicDemo(): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("@radix-ui/react-separator"),i=require("../lib/utils.cjs");function l(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const c=l(n);function u({className:t,orientation:r="horizontal",decorative:e=!0,...a}){return o.jsx(c.Root,{"data-slot":"separator",decorative:e,orientation:r,className:i.cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...a})}exports.Separator=u;
2
+ //# sourceMappingURL=separator.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.cjs","sources":["../../src/elements/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"names":["Separator","className","orientation","decorative","props","jsx","SeparatorPrimitive","cn"],"mappings":"odAMA,SAASA,EAAU,CACjB,UAAAC,EACA,YAAAC,EAAc,aACd,WAAAC,EAAa,GACb,GAAGC,CACL,EAAyD,CACvD,OACEC,EAAAA,IAACC,EAAmB,KAAnB,CACC,YAAU,YACV,WAAAH,EACA,YAAAD,EACA,UAAWK,EAAAA,GACT,iKACAN,CAAA,EAED,GAAGG,CAAA,CAAA,CAGV"}
@@ -0,0 +1,3 @@
1
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
2
+ declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ export { Separator };
@@ -0,0 +1,27 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import * as n from "@radix-ui/react-separator";
3
+ import { cn as e } from "../lib/utils.js";
4
+ function m({
5
+ className: t,
6
+ orientation: o = "horizontal",
7
+ decorative: r = !0,
8
+ ...a
9
+ }) {
10
+ return /* @__PURE__ */ i(
11
+ n.Root,
12
+ {
13
+ "data-slot": "separator",
14
+ decorative: r,
15
+ orientation: o,
16
+ className: e(
17
+ "bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
18
+ t
19
+ ),
20
+ ...a
21
+ }
22
+ );
23
+ }
24
+ export {
25
+ m as Separator
26
+ };
27
+ //# sourceMappingURL=separator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator.js","sources":["../../src/elements/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"names":["Separator","className","orientation","decorative","props","jsx","SeparatorPrimitive","cn"],"mappings":";;;AAMA,SAASA,EAAU;AAAA,EACjB,WAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AAAA,EACb,GAAGC;AACL,GAAyD;AACvD,SACE,gBAAAC;AAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,YAAAH;AAAA,MACA,aAAAD;AAAA,MACA,WAAWK;AAAA,QACT;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -0,0 +1,15 @@
1
+ import { Separator } from './separator';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ component: typeof Separator;
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ export declare function Demo(): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("@radix-ui/react-dialog"),l=require("lucide-react"),n=require("../lib/utils.cjs");function d(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const r=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,r.get?r:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const s=d(i);function c({...t}){return o.jsx(s.Root,{"data-slot":"sheet",...t})}function u({...t}){return o.jsx(s.Trigger,{"data-slot":"sheet-trigger",...t})}function f({...t}){return o.jsx(s.Close,{"data-slot":"sheet-close",...t})}function h({...t}){return o.jsx(s.Portal,{"data-slot":"sheet-portal",...t})}function m({className:t,...e}){return o.jsx(s.Overlay,{"data-slot":"sheet-overlay",className:n.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}function g({className:t,children:e,side:a="right",...r}){return o.jsxs(h,{children:[o.jsx(m,{}),o.jsxs(s.Content,{"data-slot":"sheet-content",className:n.cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...r,children:[e,o.jsxs(s.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[o.jsx(l.XIcon,{className:"size-4"}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function p({className:t,...e}){return o.jsx("div",{"data-slot":"sheet-header",className:n.cn("flex flex-col gap-1.5 p-4",t),...e})}function x({className:t,...e}){return o.jsx("div",{"data-slot":"sheet-footer",className:n.cn("mt-auto flex flex-col gap-2 p-4",t),...e})}function b({className:t,...e}){return o.jsx(s.Title,{"data-slot":"sheet-title",className:n.cn("text-foreground font-semibold",t),...e})}function S({className:t,...e}){return o.jsx(s.Description,{"data-slot":"sheet-description",className:n.cn("text-muted-foreground text-sm",t),...e})}exports.Sheet=c;exports.SheetClose=f;exports.SheetContent=g;exports.SheetDescription=S;exports.SheetFooter=x;exports.SheetHeader=p;exports.SheetTitle=b;exports.SheetTrigger=u;
2
+ //# sourceMappingURL=sheet.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.cjs","sources":["../../src/elements/sheet.tsx"],"sourcesContent":["'use client';\n\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\nfunction SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n side === 'right' &&\n 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n side === 'left' &&\n 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n side === 'top' &&\n 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',\n side === 'bottom' &&\n 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',\n className,\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-header\" className={cn('flex flex-col gap-1.5 p-4', className)} {...props} />;\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\nfunction SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };\n"],"names":["Sheet","props","SheetPrimitive","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","className","jsx","cn","SheetContent","children","side","jsxs","XIcon","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"mappings":"2eAOA,SAASA,EAAM,CAAE,GAAGC,GAA2D,CAC7E,aAAQC,EAAe,KAAf,CAAoB,YAAU,QAAS,GAAGD,EAAO,CAC3D,CAEA,SAASE,EAAa,CAAE,GAAGF,GAA8D,CACvF,aAAQC,EAAe,QAAf,CAAuB,YAAU,gBAAiB,GAAGD,EAAO,CACtE,CAEA,SAASG,EAAW,CAAE,GAAGH,GAA4D,CACnF,aAAQC,EAAe,MAAf,CAAqB,YAAU,cAAe,GAAGD,EAAO,CAClE,CAEA,SAASI,EAAY,CAAE,GAAGJ,GAA6D,CACrF,aAAQC,EAAe,OAAf,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASK,EAAa,CAAE,UAAAC,EAAW,GAAGN,GAA8D,CAClG,OACEO,EAAAA,IAACN,EAAe,QAAf,CACC,YAAU,gBACV,UAAWO,EAAAA,GACT,yJACAF,CAAA,EAED,GAAGN,CAAA,CAAA,CAGV,CAEA,SAASS,EAAa,CACpB,UAAAH,EACA,SAAAI,EACA,KAAAC,EAAO,QACP,GAAGX,CACL,EAEG,CACD,cACGI,EAAA,CACC,SAAA,CAAAG,EAAAA,IAACF,EAAA,EAAa,EACdO,EAAAA,KAACX,EAAe,QAAf,CACC,YAAU,gBACV,UAAWO,EAAAA,GACT,6MACAG,IAAS,SACP,mIACFA,IAAS,QACP,gIACFA,IAAS,OACP,2GACFA,IAAS,UACP,oHACFL,CAAA,EAED,GAAGN,EAEH,SAAA,CAAAU,EACDE,EAAAA,KAACX,EAAe,MAAf,CAAqB,UAAU,6OAC9B,SAAA,CAAAM,EAAAA,IAACM,EAAAA,MAAA,CAAM,UAAU,QAAA,CAAS,EAC1BN,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,OAAA,CAAK,CAAA,CAAA,CACjC,CAAA,CAAA,CAAA,CACF,EACF,CAEJ,CAEA,SAASO,EAAY,CAAE,UAAAR,EAAW,GAAGN,GAAsC,CACzE,OAAOO,MAAC,MAAA,CAAI,YAAU,eAAe,UAAWC,EAAAA,GAAG,4BAA6BF,CAAS,EAAI,GAAGN,CAAA,CAAO,CACzG,CAEA,SAASe,EAAY,CAAE,UAAAT,EAAW,GAAGN,GAAsC,CACzE,OAAOO,MAAC,MAAA,CAAI,YAAU,eAAe,UAAWC,EAAAA,GAAG,kCAAmCF,CAAS,EAAI,GAAGN,CAAA,CAAO,CAC/G,CAEA,SAASgB,EAAW,CAAE,UAAAV,EAAW,GAAGN,GAA4D,CAC9F,OACEO,EAAAA,IAACN,EAAe,MAAf,CACC,YAAU,cACV,UAAWO,EAAAA,GAAG,gCAAiCF,CAAS,EACvD,GAAGN,CAAA,CAAA,CAGV,CAEA,SAASiB,EAAiB,CAAE,UAAAX,EAAW,GAAGN,GAAkE,CAC1G,OACEO,EAAAA,IAACN,EAAe,YAAf,CACC,YAAU,oBACV,UAAWO,EAAAA,GAAG,gCAAiCF,CAAS,EACvD,GAAGN,CAAA,CAAA,CAGV"}
@@ -0,0 +1,12 @@
1
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
2
+ declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
3
+ declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): import("react/jsx-runtime").JSX.Element;
5
+ declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
6
+ side?: 'top' | 'right' | 'bottom' | 'left';
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): import("react/jsx-runtime").JSX.Element;
12
+ export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };
@@ -0,0 +1,98 @@
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import * as a from "@radix-ui/react-dialog";
3
+ import { XIcon as l } from "lucide-react";
4
+ import { cn as s } from "../lib/utils.js";
5
+ function h({ ...t }) {
6
+ return /* @__PURE__ */ e(a.Root, { "data-slot": "sheet", ...t });
7
+ }
8
+ function p({ ...t }) {
9
+ return /* @__PURE__ */ e(a.Trigger, { "data-slot": "sheet-trigger", ...t });
10
+ }
11
+ function g({ ...t }) {
12
+ return /* @__PURE__ */ e(a.Close, { "data-slot": "sheet-close", ...t });
13
+ }
14
+ function d({ ...t }) {
15
+ return /* @__PURE__ */ e(a.Portal, { "data-slot": "sheet-portal", ...t });
16
+ }
17
+ function c({ className: t, ...o }) {
18
+ return /* @__PURE__ */ e(
19
+ a.Overlay,
20
+ {
21
+ "data-slot": "sheet-overlay",
22
+ className: s(
23
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
24
+ t
25
+ ),
26
+ ...o
27
+ }
28
+ );
29
+ }
30
+ function x({
31
+ className: t,
32
+ children: o,
33
+ side: n = "right",
34
+ ...i
35
+ }) {
36
+ return /* @__PURE__ */ r(d, { children: [
37
+ /* @__PURE__ */ e(c, {}),
38
+ /* @__PURE__ */ r(
39
+ a.Content,
40
+ {
41
+ "data-slot": "sheet-content",
42
+ className: s(
43
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
44
+ n === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
45
+ n === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
46
+ n === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
47
+ n === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
48
+ t
49
+ ),
50
+ ...i,
51
+ children: [
52
+ o,
53
+ /* @__PURE__ */ r(a.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
54
+ /* @__PURE__ */ e(l, { className: "size-4" }),
55
+ /* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
56
+ ] })
57
+ ]
58
+ }
59
+ )
60
+ ] });
61
+ }
62
+ function b({ className: t, ...o }) {
63
+ return /* @__PURE__ */ e("div", { "data-slot": "sheet-header", className: s("flex flex-col gap-1.5 p-4", t), ...o });
64
+ }
65
+ function S({ className: t, ...o }) {
66
+ return /* @__PURE__ */ e("div", { "data-slot": "sheet-footer", className: s("mt-auto flex flex-col gap-2 p-4", t), ...o });
67
+ }
68
+ function y({ className: t, ...o }) {
69
+ return /* @__PURE__ */ e(
70
+ a.Title,
71
+ {
72
+ "data-slot": "sheet-title",
73
+ className: s("text-foreground font-semibold", t),
74
+ ...o
75
+ }
76
+ );
77
+ }
78
+ function N({ className: t, ...o }) {
79
+ return /* @__PURE__ */ e(
80
+ a.Description,
81
+ {
82
+ "data-slot": "sheet-description",
83
+ className: s("text-muted-foreground text-sm", t),
84
+ ...o
85
+ }
86
+ );
87
+ }
88
+ export {
89
+ h as Sheet,
90
+ g as SheetClose,
91
+ x as SheetContent,
92
+ N as SheetDescription,
93
+ S as SheetFooter,
94
+ b as SheetHeader,
95
+ y as SheetTitle,
96
+ p as SheetTrigger
97
+ };
98
+ //# sourceMappingURL=sheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheet.js","sources":["../../src/elements/sheet.tsx"],"sourcesContent":["'use client';\n\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />;\n}\n\nfunction SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />;\n}\n\nfunction SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />;\n}\n\nfunction SheetPortal({ ...props }: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />;\n}\n\nfunction SheetOverlay({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction SheetContent({\n className,\n children,\n side = 'right',\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left';\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n side === 'right' &&\n 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n side === 'left' &&\n 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n side === 'top' &&\n 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',\n side === 'bottom' &&\n 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',\n className,\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n );\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-header\" className={cn('flex flex-col gap-1.5 p-4', className)} {...props} />;\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"sheet-footer\" className={cn('mt-auto flex flex-col gap-2 p-4', className)} {...props} />;\n}\n\nfunction SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn('text-foreground font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription };\n"],"names":["Sheet","props","SheetPrimitive","SheetTrigger","SheetClose","SheetPortal","SheetOverlay","className","jsx","cn","SheetContent","children","side","jsxs","XIcon","SheetHeader","SheetFooter","SheetTitle","SheetDescription"],"mappings":";;;;AAOA,SAASA,EAAM,EAAE,GAAGC,KAA2D;AAC7E,2BAAQC,EAAe,MAAf,EAAoB,aAAU,SAAS,GAAGD,GAAO;AAC3D;AAEA,SAASE,EAAa,EAAE,GAAGF,KAA8D;AACvF,2BAAQC,EAAe,SAAf,EAAuB,aAAU,iBAAiB,GAAGD,GAAO;AACtE;AAEA,SAASG,EAAW,EAAE,GAAGH,KAA4D;AACnF,2BAAQC,EAAe,OAAf,EAAqB,aAAU,eAAe,GAAGD,GAAO;AAClE;AAEA,SAASI,EAAY,EAAE,GAAGJ,KAA6D;AACrF,2BAAQC,EAAe,QAAf,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASK,EAAa,EAAE,WAAAC,GAAW,GAAGN,KAA8D;AAClG,SACE,gBAAAO;AAAA,IAACN,EAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASS,EAAa;AAAA,EACpB,WAAAH;AAAA,EACA,UAAAI;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGX;AACL,GAEG;AACD,2BACGI,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAG,EAACF,GAAA,EAAa;AAAA,IACd,gBAAAO;AAAA,MAACX,EAAe;AAAA,MAAf;AAAA,QACC,aAAU;AAAA,QACV,WAAWO;AAAA,UACT;AAAA,UACAG,MAAS,WACP;AAAA,UACFA,MAAS,UACP;AAAA,UACFA,MAAS,SACP;AAAA,UACFA,MAAS,YACP;AAAA,UACFL;AAAA,QAAA;AAAA,QAED,GAAGN;AAAA,QAEH,UAAA;AAAA,UAAAU;AAAA,UACD,gBAAAE,EAACX,EAAe,OAAf,EAAqB,WAAU,8OAC9B,UAAA;AAAA,YAAA,gBAAAM,EAACM,GAAA,EAAM,WAAU,SAAA,CAAS;AAAA,YAC1B,gBAAAN,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,QAAA,CAAK;AAAA,UAAA,EAAA,CACjC;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;AAEA,SAASO,EAAY,EAAE,WAAAR,GAAW,GAAGN,KAAsC;AACzE,SAAO,gBAAAO,EAAC,OAAA,EAAI,aAAU,gBAAe,WAAWC,EAAG,6BAA6BF,CAAS,GAAI,GAAGN,EAAA,CAAO;AACzG;AAEA,SAASe,EAAY,EAAE,WAAAT,GAAW,GAAGN,KAAsC;AACzE,SAAO,gBAAAO,EAAC,OAAA,EAAI,aAAU,gBAAe,WAAWC,EAAG,mCAAmCF,CAAS,GAAI,GAAGN,EAAA,CAAO;AAC/G;AAEA,SAASgB,EAAW,EAAE,WAAAV,GAAW,GAAGN,KAA4D;AAC9F,SACE,gBAAAO;AAAA,IAACN,EAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,iCAAiCF,CAAS;AAAA,MACvD,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASiB,EAAiB,EAAE,WAAAX,GAAW,GAAGN,KAAkE;AAC1G,SACE,gBAAAO;AAAA,IAACN,EAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,iCAAiCF,CAAS;AAAA,MACvD,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -0,0 +1,15 @@
1
+ import { Sheet } from './sheet';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ component: typeof Sheet;
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ export declare function Demo(): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),h=require("@radix-ui/react-slot"),I=require("class-variance-authority"),z=require("lucide-react"),c=require("react"),C=require("./button.cjs"),T=require("./input.cjs"),B=require("../hooks/use-mobile.cjs"),r=require("../lib/utils.cjs"),E=require("./separator.cjs"),m=require("./sheet.cjs"),N=require("./skeleton.cjs"),j=require("./tooltip.cjs"),q="sidebar_state",A=60*60*24*7,D="16rem",O="18rem",R="3rem",G="b",_=c.createContext(null);function x(){const a=c.useContext(_);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}function H({defaultOpen:a=!0,open:e,onOpenChange:i,className:n,style:s,children:o,...f}){const l=B.useIsMobile(),[p,u]=c.useState(!1),[v,y]=c.useState(a),g=e??v,S=c.useCallback(d=>{const b=typeof d=="function"?d(g):d;i?i(b):y(b),document.cookie=`${q}=${b}; path=/; max-age=${A}`},[i,g]),w=c.useCallback(()=>l?u(d=>!d):S(d=>!d),[l,S,u]);c.useEffect(()=>{const d=b=>{b.key===G&&(b.metaKey||b.ctrlKey)&&(b.preventDefault(),w())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[w]);const M=g?"expanded":"collapsed",k=c.useMemo(()=>({state:M,open:g,setOpen:S,isMobile:l,openMobile:p,setOpenMobile:u,toggleSidebar:w}),[M,g,S,l,p,u,w]);return t.jsx(_.Provider,{value:k,children:t.jsx(j.TooltipProvider,{delayDuration:0,children:t.jsx("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":D,"--sidebar-width-icon":R,...s},className:r.cn("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",n),...f,children:o})})})}function K({side:a="left",variant:e="sidebar",collapsible:i="offcanvas",className:n,children:s,...o}){const{isMobile:f,state:l,openMobile:p,setOpenMobile:u}=x();return i==="none"?t.jsx("div",{"data-slot":"sidebar",className:r.cn("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",n),...o,children:s}):f?t.jsx(m.Sheet,{open:p,onOpenChange:u,...o,children:t.jsxs(m.SheetContent,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":O},side:a,children:[t.jsxs(m.SheetHeader,{className:"sr-only",children:[t.jsx(m.SheetTitle,{children:"Sidebar"}),t.jsx(m.SheetDescription,{children:"Displays the mobile sidebar."})]}),t.jsx("div",{className:"flex h-full w-full flex-col",children:s})]})}):t.jsxs("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":l,"data-collapsible":l==="collapsed"?i:"","data-variant":e,"data-side":a,"data-slot":"sidebar",children:[t.jsx("div",{"data-slot":"sidebar-gap",className:r.cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",e==="floating"||e==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),t.jsx("div",{"data-slot":"sidebar-container",className:r.cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",e==="floating"||e==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",n),...o,children:t.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:s})})]})}function L({className:a,onClick:e,...i}){const{toggleSidebar:n}=x();return t.jsxs(C.Button,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:r.cn("size-7",a),onClick:s=>{e==null||e(s),n()},...i,children:[t.jsx(z.PanelLeftIcon,{}),t.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function P({className:a,...e}){const{toggleSidebar:i}=x();return t.jsx("button",{type:"button","data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:r.cn("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",a),...e})}function V({className:a,...e}){return t.jsx("main",{"data-slot":"sidebar-inset",className:r.cn("bg-background relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",a),...e})}function W({className:a,...e}){return t.jsx(T.Input,{"data-slot":"sidebar-input","data-sidebar":"input",className:r.cn("bg-background h-8 w-full shadow-none",a),...e})}function F({className:a,...e}){return t.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:r.cn("flex flex-col gap-2 p-2",a),...e})}function U({className:a,...e}){return t.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:r.cn("flex flex-col gap-2 p-2",a),...e})}function X({className:a,...e}){return t.jsx(E.Separator,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:r.cn("bg-sidebar-border mx-2 w-auto",a),...e})}function Y({className:a,...e}){return t.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:r.cn("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",a),...e})}function $({className:a,...e}){return t.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:r.cn("relative flex w-full min-w-0 flex-col p-2",a),...e})}function J({className:a,asChild:e=!1,...i}){const n=e?h.Slot:"div";return t.jsx(n,{"data-slot":"sidebar-group-label","data-sidebar":"group-label",className:r.cn("text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",a),...i})}function Q({className:a,asChild:e=!1,...i}){const n=e?h.Slot:"button";return t.jsx(n,{"data-slot":"sidebar-group-action","data-sidebar":"group-action",className:r.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","group-data-[collapsible=icon]:hidden",a),...i})}function Z({className:a,...e}){return t.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:r.cn("w-full text-sm",a),...e})}function ee({className:a,...e}){return t.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:r.cn("flex w-full min-w-0 flex-col gap-1",a),...e})}function ae({className:a,...e}){return t.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:r.cn("group/menu-item relative",a),...e})}const te=I.cva("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function re({asChild:a=!1,isActive:e=!1,variant:i="default",size:n="default",tooltip:s,className:o,...f}){const l=a?h.Slot:"button",{isMobile:p,state:u}=x(),v=t.jsx(l,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":n,"data-active":e,className:r.cn(te({variant:i,size:n}),o),...f});if(!s)return v;const y=typeof s=="string"?{children:s}:s;return t.jsxs(j.Tooltip,{children:[t.jsx(j.TooltipTrigger,{asChild:!0,children:v}),t.jsx(j.TooltipContent,{side:"right",align:"center",hidden:u!=="collapsed"||p,...y})]})}function ie({className:a,asChild:e=!1,showOnHover:i=!1,...n}){const s=e?h.Slot:"button";return t.jsx(s,{"data-slot":"sidebar-menu-action","data-sidebar":"menu-action",className:r.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 md:after:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",i&&"peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",a),...n})}function ne({className:a,...e}){return t.jsx("div",{"data-slot":"sidebar-menu-badge","data-sidebar":"menu-badge",className:r.cn("text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a),...e})}function se({className:a,showIcon:e=!1,...i}){const n=c.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return t.jsxs("div",{"data-slot":"sidebar-menu-skeleton","data-sidebar":"menu-skeleton",className:r.cn("flex h-8 items-center gap-2 rounded-md px-2",a),...i,children:[e&&t.jsx(N.Skeleton,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),t.jsx(N.Skeleton,{className:"h-4 max-w-(--skeleton-width) flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":n}})]})}function de({className:a,...e}){return t.jsx("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:r.cn("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",a),...e})}function oe({className:a,...e}){return t.jsx("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:r.cn("group/menu-sub-item relative",a),...e})}function le({asChild:a=!1,size:e="md",isActive:i=!1,className:n,...s}){const o=a?h.Slot:"a";return t.jsx(o,{"data-slot":"sidebar-menu-sub-button","data-sidebar":"menu-sub-button","data-size":e,"data-active":i,className:r.cn("text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",e==="sm"&&"text-xs",e==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",n),...s})}exports.Sidebar=K;exports.SidebarContent=Y;exports.SidebarFooter=U;exports.SidebarGroup=$;exports.SidebarGroupAction=Q;exports.SidebarGroupContent=Z;exports.SidebarGroupLabel=J;exports.SidebarHeader=F;exports.SidebarInput=W;exports.SidebarInset=V;exports.SidebarMenu=ee;exports.SidebarMenuAction=ie;exports.SidebarMenuBadge=ne;exports.SidebarMenuButton=re;exports.SidebarMenuItem=ae;exports.SidebarMenuSkeleton=se;exports.SidebarMenuSub=de;exports.SidebarMenuSubButton=le;exports.SidebarMenuSubItem=oe;exports.SidebarProvider=H;exports.SidebarRail=P;exports.SidebarSeparator=X;exports.SidebarTrigger=L;exports.useSidebar=x;
2
+ //# sourceMappingURL=sidebar.cjs.map