@cryptlex/web-components 3.1.1 → 3.1.2
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.
- package/dist/components/inputs/input-otp.es.js +6 -6
- package/dist/components/inputs/input-otp.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +1 -1
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +1 -1
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +151 -159
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/tabs.es.js +20 -20
- package/dist/components/ui/tabs.es.js.map +1 -1
- package/dist/index.es.d.ts +3 -3
- package/lib/utilities.css +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import * as d from "react";
|
|
|
6
6
|
function v({
|
|
7
7
|
className: e,
|
|
8
8
|
containerClassName: r,
|
|
9
|
-
...
|
|
9
|
+
...i
|
|
10
10
|
}) {
|
|
11
11
|
return /* @__PURE__ */ t(
|
|
12
12
|
l,
|
|
@@ -16,7 +16,7 @@ function v({
|
|
|
16
16
|
r
|
|
17
17
|
),
|
|
18
18
|
className: n("disabled:cursor-not-allowed", e),
|
|
19
|
-
...
|
|
19
|
+
...i
|
|
20
20
|
}
|
|
21
21
|
);
|
|
22
22
|
}
|
|
@@ -29,18 +29,18 @@ function O({
|
|
|
29
29
|
function P({
|
|
30
30
|
index: e,
|
|
31
31
|
className: r,
|
|
32
|
-
...
|
|
32
|
+
...i
|
|
33
33
|
}) {
|
|
34
|
-
const
|
|
34
|
+
const o = d.use(p), { char: s, hasFakeCaret: a, isActive: c } = o.slots[e];
|
|
35
35
|
return /* @__PURE__ */ u(
|
|
36
36
|
"div",
|
|
37
37
|
{
|
|
38
38
|
className: n(
|
|
39
|
-
"relative flex h-input w-9 items-center justify-center border-2 border-input body
|
|
39
|
+
"relative flex h-input w-9 items-center justify-center border-2 border-input body transition-all",
|
|
40
40
|
c ? "z-10 border-2 border-primary" : "",
|
|
41
41
|
r
|
|
42
42
|
),
|
|
43
|
-
...
|
|
43
|
+
...i,
|
|
44
44
|
children: [
|
|
45
45
|
s,
|
|
46
46
|
a && /* @__PURE__ */ t("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ t("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" }) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.es.js","sources":["../../../lib/components/inputs/input-otp.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { Minus } from \"lucide-react\";\nimport * as React from \"react\";\n\nexport function InputOTP({\n\tclassName,\n\tcontainerClassName,\n\t...props\n}: React.ComponentProps<typeof OTPInput>) {\n\treturn (\n\t\t<OTPInput\n\t\t\tcontainerClassName={cn(\n\t\t\t\t\"flex items-center gap-2 has-disabled:opacity-50\",\n\t\t\t\tcontainerClassName,\n\t\t\t)}\n\t\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function InputOTPGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn <div className={cn(\"flex items-center\", className)} {...props} />;\n}\n\nexport function InputOTPSlot({\n\tindex,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\"> & { index: number }) {\n\tconst inputOTPContext = React.use(OTPInputContext);\n\tconst { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex h-input w-9 items-center justify-center border-2 border-input body
|
|
1
|
+
{"version":3,"file":"input-otp.es.js","sources":["../../../lib/components/inputs/input-otp.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { Minus } from \"lucide-react\";\nimport * as React from \"react\";\n\nexport function InputOTP({\n\tclassName,\n\tcontainerClassName,\n\t...props\n}: React.ComponentProps<typeof OTPInput>) {\n\treturn (\n\t\t<OTPInput\n\t\t\tcontainerClassName={cn(\n\t\t\t\t\"flex items-center gap-2 has-disabled:opacity-50\",\n\t\t\t\tcontainerClassName,\n\t\t\t)}\n\t\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function InputOTPGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn <div className={cn(\"flex items-center\", className)} {...props} />;\n}\n\nexport function InputOTPSlot({\n\tindex,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\"> & { index: number }) {\n\tconst inputOTPContext = React.use(OTPInputContext);\n\tconst { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex h-input w-9 items-center justify-center border-2 border-input body transition-all\",\n\t\t\t\tisActive ? \"z-10 border-2 border-primary\" : \"\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{char}\n\t\t\t{hasFakeCaret && (\n\t\t\t\t<div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t<div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport function InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div role=\"separator\" {...props}>\n\t\t\t<Minus />\n\t\t</div>\n\t);\n}\n"],"names":["InputOTP","className","containerClassName","props","jsx","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","inputOTPContext","React","OTPInputContext","char","hasFakeCaret","isActive","jsxs","InputOTPSeparator","Minus"],"mappings":";;;;;AAKO,SAASA,EAAS;AAAA,EACxB,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,GAAGC;AACJ,GAA0C;AAExC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACA,oBAAoBC;AAAA,QACnB;AAAA,QACAJ;AAAA,MACD;AAAA,MACA,WAAWI,EAAG,+BAA+BL,CAAS;AAAA,MACrD,GAAGE;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASI,EAAc;AAAA,EAC7B,WAAAN;AAAA,EACA,GAAGE;AACJ,GAAgC;AACxB,SAAA,gBAAAC,EAAC,SAAI,WAAWE,EAAG,qBAAqBL,CAAS,GAAI,GAAGE,GAAO;AACvE;AAEO,SAASK,EAAa;AAAA,EAC5B,OAAAC;AAAA,EACA,WAAAR;AAAA,EACA,GAAGE;AACJ,GAAoD;AAC7C,QAAAO,IAAkBC,EAAM,IAAIC,CAAe,GAC3C,EAAE,MAAAC,GAAM,cAAAC,GAAc,UAAAC,EAAa,IAAAL,EAAgB,MAAMD,CAAK;AAGnE,SAAA,gBAAAO;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWV;AAAA,QACV;AAAA,QACAS,IAAW,kCAAkC;AAAA,QAC7Cd;AAAA,MACD;AAAA,MACC,GAAGE;AAAA,MAEH,UAAA;AAAA,QAAAU;AAAA,QACAC,uBACC,OAAI,EAAA,WAAU,yEACd,UAAC,gBAAAV,EAAA,OAAA,EAAI,WAAU,2DAA2D,CAAA,EAC3E,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAEF;AAEF;AAEO,SAASa,EAAkB,EAAE,GAAGd,KAAsC;AAE3E,SAAA,gBAAAC,EAAC,SAAI,MAAK,aAAa,GAAGD,GACzB,UAAA,gBAAAC,EAACc,KAAM,EACR,CAAA;AAEF;"}
|
|
@@ -33,7 +33,7 @@ function P({
|
|
|
33
33
|
x,
|
|
34
34
|
{
|
|
35
35
|
className: n(
|
|
36
|
-
"z-50 min-w-32 overflow-hidden border bg-popover text-popover-foreground
|
|
36
|
+
"z-50 min-w-32 overflow-hidden border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
37
37
|
e
|
|
38
38
|
),
|
|
39
39
|
...o
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.es.js","sources":["../../../lib/components/ui/dropdown-menu.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/**\n * TODO (mudasirpandith)\n * Focus on trigger.\n * Focus on content after trigger is pressed?\n * List keyboard navigation in buttons within DropdownItems\n */\nexport function DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubTrigger\n\t\t\tclassName={cn(\n\t\t\t\t\"flex cursor-default select-none items-center px-2 py-1.5 body outline-hidden focus:bg-accent data-[state=open]:bg-accent\",\n\t\t\t\tinset && \"pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRight className=\"ml-auto size-4\" />\n\t\t</DropdownMenuPrimitive.SubTrigger>\n\t);\n}\n\nexport function DropdownMenuSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-32 overflow-hidden border bg-popover text-popover-foreground
|
|
1
|
+
{"version":3,"file":"dropdown-menu.es.js","sources":["../../../lib/components/ui/dropdown-menu.tsx"],"sourcesContent":["import { cn } from \"@/utils\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight } from \"lucide-react\";\nimport type * as React from \"react\";\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\nexport const DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nexport const DropdownMenuSub = DropdownMenuPrimitive.Sub;\nexport const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\n/**\n * TODO (mudasirpandith)\n * Focus on trigger.\n * Focus on content after trigger is pressed?\n * List keyboard navigation in buttons within DropdownItems\n */\nexport function DropdownMenuSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubTrigger\n\t\t\tclassName={cn(\n\t\t\t\t\"flex cursor-default select-none items-center px-2 py-1.5 body outline-hidden focus:bg-accent data-[state=open]:bg-accent\",\n\t\t\t\tinset && \"pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRight className=\"ml-auto size-4\" />\n\t\t</DropdownMenuPrimitive.SubTrigger>\n\t);\n}\n\nexport function DropdownMenuSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cn(\n\t\t\t\t\"z-50 min-w-32 overflow-hidden border bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function DropdownMenuContent({\n\tclassName,\n\tsideOffset = 4,\n\t...props\n}: React.CustomComponentPropsWithRef<typeof DropdownMenuPrimitive.Content>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Portal>\n\t\t\t<DropdownMenuPrimitive.Content\n\t\t\t\talign=\"start\"\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"z-50 min-w-48 max-w-2xs overflow-y-auto max-h-48 border bg-popover text-popover-foreground\",\n\t\t\t\t\t\"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</DropdownMenuPrimitive.Portal>\n\t);\n}\n\nexport function DropdownMenuItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Item className={cn(\"dropdown-item\")} {...props} />\n\t);\n}\n\nexport function DropdownMenuCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.CheckboxItem\n\t\t\tclassName={cn(\"dropdown-item\", className)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DropdownMenuPrimitive.ItemIndicator className=\"absolute right-2 size-icon\">\n\t\t\t\t<Check className=\"size-icon\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.CheckboxItem>\n\t);\n}\n\nexport function DropdownMenuRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.RadioItem\n\t\t\tclassName={cn(\"dropdown-item\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<DropdownMenuPrimitive.ItemIndicator className=\"absolute right-2 size-icon\">\n\t\t\t\t<Check className=\"size-icon\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.RadioItem>\n\t);\n}\n\nexport function DropdownMenuLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n\treturn (\n\t\t<DropdownMenuPrimitive.Label\n\t\t\tclassName={cn(\"p-2 border-b caption\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}"],"names":["DropdownMenu","DropdownMenuPrimitive.Root","DropdownMenuTrigger","DropdownMenuPrimitive.Trigger","DropdownMenuGroup","DropdownMenuPrimitive.Group","DropdownMenuPortal","DropdownMenuPrimitive.Portal","DropdownMenuSub","DropdownMenuPrimitive.Sub","DropdownMenuRadioGroup","DropdownMenuPrimitive.RadioGroup","DropdownMenuSubTrigger","className","inset","children","props","jsxs","DropdownMenuPrimitive.SubTrigger","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuPrimitive.SubContent","DropdownMenuContent","sideOffset","DropdownMenuPrimitive.Content","DropdownMenuItem","DropdownMenuPrimitive.Item","DropdownMenuCheckboxItem","checked","DropdownMenuPrimitive.CheckboxItem","DropdownMenuPrimitive.ItemIndicator","Check","DropdownMenuRadioItem","DropdownMenuPrimitive.RadioItem","DropdownMenuLabel","DropdownMenuPrimitive.Label"],"mappings":";;;;AAKO,MAAMA,IAAeC,GACfC,IAAsBC,GACtBC,IAAoBC,GACpBC,IAAqBC,GACrBC,IAAkBC,GAClBC,IAAyBC;AAQ/B,SAASC,EAAuB;AAAA,EACtC,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACJ,GAEG;AAED,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAL,KAAS;AAAA,QACTD;AAAA,MACD;AAAA,MACC,GAAGG;AAAA,MAEH,UAAA;AAAA,QAAAD;AAAA,QACD,gBAAAK,EAACC,GAAa,EAAA,WAAU,iBAAiB,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC1C;AAEF;AAEO,SAASC,EAAuB;AAAA,EACtC,WAAAT;AAAA,EACA,GAAGG;AACJ,GAAkE;AAEhE,SAAA,gBAAAI;AAAA,IAACG;AAAAA,IAAA;AAAA,MACA,WAAWJ;AAAA,QACV;AAAA,QACAN;AAAA,MACD;AAAA,MACC,GAAGG;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASQ,EAAoB;AAAA,EACnC,WAAAX;AAAA,EACA,YAAAY,IAAa;AAAA,EACb,GAAGT;AACJ,GAA4E;AAE1E,SAAA,gBAAAI,EAACb,GAAA,EACA,UAAA,gBAAAa;AAAA,IAACM;AAAAA,IAAA;AAAA,MACA,OAAM;AAAA,MACN,YAAAD;AAAA,MACA,WAAWN;AAAA,QACV;AAAA,QACA;AAAA,QACAN;AAAA,MACD;AAAA,MACC,GAAGG;AAAA,IAAA;AAAA,EAAA,GAEN;AAEF;AAEO,SAASW,EAAiB;AAAA,EAChC,WAAAd;AAAA,EACA,GA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ed z-50 gap-4 bg-background p-4
|
|
24
|
+
"fixed z-50 gap-4 bg-background p-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
25
25
|
{
|
|
26
26
|
variants: {
|
|
27
27
|
side: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.es.js","sources":["../../../lib/components/ui/sheet.tsx"],"sourcesContent":["\"use client\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\nimport { Cross } from \"lucide-react\";\n\nexport const Sheet = SheetPrimitive.Root;\nexport const SheetTrigger = SheetPrimitive.Trigger;\nexport const SheetClose = SheetPrimitive.Close;\nexport const SheetPortal = SheetPrimitive.Portal;\n\nexport function SheetOverlay({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n\treturn (\n\t\t<SheetPrimitive.Overlay\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed inset-0 z-50 bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst sheetVariants = cva(\n\t\"fixed z-50 gap-4 bg-background p-4
|
|
1
|
+
{"version":3,"file":"sheet.es.js","sources":["../../../lib/components/ui/sheet.tsx"],"sourcesContent":["\"use client\";\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\nimport { Cross } from \"lucide-react\";\n\nexport const Sheet = SheetPrimitive.Root;\nexport const SheetTrigger = SheetPrimitive.Trigger;\nexport const SheetClose = SheetPrimitive.Close;\nexport const SheetPortal = SheetPrimitive.Portal;\n\nexport function SheetOverlay({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n\treturn (\n\t\t<SheetPrimitive.Overlay\n\t\t\tclassName={cn(\n\t\t\t\t\"fixed inset-0 z-50 bg-background/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst sheetVariants = cva(\n\t\"fixed z-50 gap-4 bg-background p-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out\",\n\t{\n\t\tvariants: {\n\t\t\tside: {\n\t\t\t\ttop: \"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top\",\n\t\t\t\tbottom:\n\t\t\t\t\t\"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom\",\n\t\t\t\tleft: \"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm\",\n\t\t\t\tright:\n\t\t\t\t\t\"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ninterface SheetContentProps\n\textends React.ComponentProps<typeof SheetPrimitive.Content>,\n\tVariantProps<typeof sheetVariants> { }\n\nexport function SheetContent({\n\tside = \"right\",\n\tclassName,\n\tchildren,\n\t...props\n}: SheetContentProps) {\n\treturn (\n\t\t<SheetPortal>\n\t\t\t<SheetOverlay />\n\t\t\t<SheetPrimitive.Content\n\t\t\t\tclassName={cn(sheetVariants({ side }), className)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{/* TODO (mudasirpandith) Close button should be in document flow not absolutely positioned */}\n\t\t\t\t<SheetPrimitive.Close className=\"absolute right-4 top-4 opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-1 focus:ring-ring disabled:pointer-events-none data-[state=open]:bg-secondary\">\n\t\t\t\t\t<Cross className=\"size-icon\" />\n\t\t\t\t\t<span className=\"sr-only\">Close</span>\n\t\t\t\t</SheetPrimitive.Close>\n\t\t\t\t{children}\n\t\t\t</SheetPrimitive.Content>\n\t\t</SheetPortal>\n\t);\n}\n\nexport function SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-col space-y-2 text-center sm:text-left\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SheetTitle({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n\treturn (\n\t\t<SheetPrimitive.Title\n\t\t\tclassName={cn(\"h3 font-semibold text-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SheetDescription({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n\treturn (\n\t\t<SheetPrimitive.Description\n\t\t\tclassName={cn(\"body text-muted-foreground\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"names":["Sheet","SheetPrimitive.Root","SheetTrigger","SheetPrimitive.Trigger","SheetClose","SheetPrimitive.Close","SheetPortal","SheetPrimitive.Portal","SheetOverlay","className","props","jsx","SheetPrimitive.Overlay","cn","sheetVariants","cva","SheetContent","side","children","jsxs","SheetPrimitive.Content","Cross","SheetHeader","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GC,KAAsC;AAEhF,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWE;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASa,EAAY,EAAE,WAAAd,GAAW,GAAGC,KAAsC;AAEhF,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWE;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASc,EAAW;AAAA,EAC1B,WAAAf;AAAA,EACA,GAAGC;AACJ,GAAsD;AAEpD,SAAA,gBAAAC;AAAA,IAACc;AAAAA,IAAA;AAAA,MACA,WAAWZ,EAAG,oCAAoCJ,CAAS;AAAA,MAC1D,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASgB,EAAiB;AAAA,EAChC,WAAAjB;AAAA,EACA,GAAGC;AACJ,GAA4D;AAE1D,SAAA,gBAAAC;AAAA,IAACgB;AAAAA,IAAA;AAAA,MACA,WAAWd,EAAG,8BAA8BJ,CAAS;AAAA,MACpD,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;"}
|
|
@@ -1,57 +1,57 @@
|
|
|
1
1
|
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import { Root as x } from "../../node_modules/.pnpm/@radix-ui_react-slot@1.2.3_@types_react@19.1.0_react@19.1.0/node_modules/@radix-ui/react-slot/dist/index.es.js";
|
|
3
|
-
import { Menu as
|
|
4
|
-
import * as
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Separator as
|
|
7
|
-
import { Sheet as
|
|
8
|
-
import { Skeleton as
|
|
3
|
+
import { Menu as z, ChevronLeft as I, ChevronRight as T } from "lucide-react";
|
|
4
|
+
import * as s from "react";
|
|
5
|
+
import { Button as D } from "./button.es.js";
|
|
6
|
+
import { Separator as B } from "./separator.es.js";
|
|
7
|
+
import { Sheet as E, SheetContent as R, SheetHeader as _, SheetTitle as A, SheetDescription as H } from "./sheet.es.js";
|
|
8
|
+
import { Skeleton as N } from "./skeleton.es.js";
|
|
9
9
|
import { TooltipProvider as j, Tooltip as L, TooltipTrigger as G, TooltipContent as K } from "./tooltip.es.js";
|
|
10
10
|
import { useIsMobile as O } from "../../hooks/use-mobile.es.js";
|
|
11
11
|
import { cn as i } from "../../utils/index.es.js";
|
|
12
|
-
const W = "16rem", q = "18rem", F = "3rem", U = "b",
|
|
12
|
+
const W = "16rem", q = "18rem", F = "3rem", U = "b", y = s.createContext(null);
|
|
13
13
|
function w() {
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
14
|
+
const e = s.use(y);
|
|
15
|
+
if (!e)
|
|
16
16
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
17
|
-
return
|
|
17
|
+
return e;
|
|
18
18
|
}
|
|
19
19
|
function te({
|
|
20
|
-
defaultOpen:
|
|
21
|
-
open:
|
|
20
|
+
defaultOpen: e = !0,
|
|
21
|
+
open: a,
|
|
22
22
|
onOpenChange: r,
|
|
23
23
|
className: n,
|
|
24
24
|
style: o,
|
|
25
|
-
children:
|
|
26
|
-
...
|
|
25
|
+
children: l,
|
|
26
|
+
...c
|
|
27
27
|
}) {
|
|
28
|
-
const
|
|
28
|
+
const u = O(), [b, m] = s.useState(!1), [M, C] = s.useState(e), f = a ?? M, g = s.useCallback(
|
|
29
29
|
(d) => {
|
|
30
30
|
if (r)
|
|
31
|
-
return r == null ? void 0 : r(typeof d == "function" ? d(
|
|
31
|
+
return r == null ? void 0 : r(typeof d == "function" ? d(f) : d);
|
|
32
32
|
C(d);
|
|
33
33
|
},
|
|
34
|
-
[r,
|
|
35
|
-
), h =
|
|
36
|
-
|
|
34
|
+
[r, f]
|
|
35
|
+
), h = s.useCallback(() => u ? m((d) => !d) : g((d) => !d), [u, g, m]);
|
|
36
|
+
s.useEffect(() => {
|
|
37
37
|
const d = (v) => {
|
|
38
38
|
v.key === U && (v.metaKey || v.ctrlKey) && (v.preventDefault(), h());
|
|
39
39
|
};
|
|
40
40
|
return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
41
41
|
}, [h]);
|
|
42
|
-
const S =
|
|
42
|
+
const S = f ? "expanded" : "collapsed", k = s.useMemo(
|
|
43
43
|
() => ({
|
|
44
44
|
state: S,
|
|
45
|
-
open:
|
|
46
|
-
setOpen:
|
|
47
|
-
isMobile:
|
|
45
|
+
open: f,
|
|
46
|
+
setOpen: g,
|
|
47
|
+
isMobile: u,
|
|
48
48
|
openMobile: b,
|
|
49
|
-
setOpenMobile:
|
|
49
|
+
setOpenMobile: m,
|
|
50
50
|
toggleSidebar: h
|
|
51
51
|
}),
|
|
52
|
-
[S,
|
|
52
|
+
[S, f, g, u, b, m, h]
|
|
53
53
|
);
|
|
54
|
-
return /* @__PURE__ */ t(
|
|
54
|
+
return /* @__PURE__ */ t(y, { value: k, children: /* @__PURE__ */ t(j, { delayDuration: 0, children: /* @__PURE__ */ t(
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
57
|
style: {
|
|
@@ -63,32 +63,31 @@ function te({
|
|
|
63
63
|
"group/sidebar-wrapper flex w-full has-data-[variant=inset]:bg-sidebar",
|
|
64
64
|
n
|
|
65
65
|
),
|
|
66
|
-
...
|
|
67
|
-
children:
|
|
66
|
+
...c,
|
|
67
|
+
children: l
|
|
68
68
|
}
|
|
69
69
|
) }) });
|
|
70
70
|
}
|
|
71
71
|
function re({
|
|
72
|
-
side: a = "left",
|
|
73
72
|
variant: e = "sidebar",
|
|
74
|
-
collapsible:
|
|
75
|
-
className:
|
|
76
|
-
children:
|
|
77
|
-
...
|
|
73
|
+
collapsible: a = "offcanvas",
|
|
74
|
+
className: r,
|
|
75
|
+
children: n,
|
|
76
|
+
...o
|
|
78
77
|
}) {
|
|
79
|
-
const { isMobile:
|
|
80
|
-
return
|
|
78
|
+
const { isMobile: l, state: c, openMobile: u, setOpenMobile: b } = w();
|
|
79
|
+
return a === "none" ? /* @__PURE__ */ t(
|
|
81
80
|
"div",
|
|
82
81
|
{
|
|
83
82
|
className: i(
|
|
84
83
|
"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",
|
|
85
|
-
|
|
84
|
+
r
|
|
86
85
|
),
|
|
87
|
-
...
|
|
88
|
-
children:
|
|
86
|
+
...o,
|
|
87
|
+
children: n
|
|
89
88
|
}
|
|
90
|
-
) :
|
|
91
|
-
|
|
89
|
+
) : l ? /* @__PURE__ */ t(E, { open: u, onOpenChange: b, ...o, children: /* @__PURE__ */ p(
|
|
90
|
+
R,
|
|
92
91
|
{
|
|
93
92
|
"data-sidebar": "sidebar",
|
|
94
93
|
"data-mobile": "true",
|
|
@@ -96,23 +95,21 @@ function re({
|
|
|
96
95
|
style: {
|
|
97
96
|
"--sidebar-width": q
|
|
98
97
|
},
|
|
99
|
-
side: a,
|
|
100
98
|
children: [
|
|
101
|
-
/* @__PURE__ */ p(
|
|
99
|
+
/* @__PURE__ */ p(_, { children: [
|
|
102
100
|
/* @__PURE__ */ t(A, {}),
|
|
103
101
|
/* @__PURE__ */ t(H, {})
|
|
104
102
|
] }),
|
|
105
|
-
/* @__PURE__ */ t("div", { className: "flex h-full w-full flex-col", children:
|
|
103
|
+
/* @__PURE__ */ t("div", { className: "flex h-full w-full flex-col", children: n })
|
|
106
104
|
]
|
|
107
105
|
}
|
|
108
106
|
) }) : /* @__PURE__ */ p(
|
|
109
107
|
"div",
|
|
110
108
|
{
|
|
111
109
|
className: "group peer hidden md:block text-sidebar-foreground",
|
|
112
|
-
"data-state":
|
|
113
|
-
"data-collapsible":
|
|
110
|
+
"data-state": c,
|
|
111
|
+
"data-collapsible": c === "collapsed" ? a : "",
|
|
114
112
|
"data-variant": e,
|
|
115
|
-
"data-side": a,
|
|
116
113
|
children: [
|
|
117
114
|
/* @__PURE__ */ t(
|
|
118
115
|
"div",
|
|
@@ -120,7 +117,6 @@ function re({
|
|
|
120
117
|
className: i(
|
|
121
118
|
"duration-200 relative w-(--sidebar-width) bg-transparent transition-[width] ease-linear",
|
|
122
119
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
123
|
-
"group-data-[side=right]:rotate-180",
|
|
124
120
|
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
125
121
|
)
|
|
126
122
|
}
|
|
@@ -129,19 +125,19 @@ function re({
|
|
|
129
125
|
"div",
|
|
130
126
|
{
|
|
131
127
|
className: i(
|
|
132
|
-
"duration-200
|
|
133
|
-
|
|
128
|
+
"duration-200 absolute z-10 hidden w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex",
|
|
129
|
+
"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]",
|
|
134
130
|
// Adjust the padding for floating and inset variants.
|
|
135
|
-
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)
|
|
136
|
-
|
|
131
|
+
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) border-r",
|
|
132
|
+
r
|
|
137
133
|
),
|
|
138
|
-
...
|
|
134
|
+
...o,
|
|
139
135
|
children: /* @__PURE__ */ t(
|
|
140
136
|
"div",
|
|
141
137
|
{
|
|
142
138
|
"data-sidebar": "sidebar",
|
|
143
|
-
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border
|
|
144
|
-
children:
|
|
139
|
+
className: "flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border",
|
|
140
|
+
children: n
|
|
145
141
|
}
|
|
146
142
|
)
|
|
147
143
|
}
|
|
@@ -151,31 +147,28 @@ function re({
|
|
|
151
147
|
);
|
|
152
148
|
}
|
|
153
149
|
function ie({
|
|
154
|
-
className:
|
|
155
|
-
onClick:
|
|
150
|
+
className: e,
|
|
151
|
+
onClick: a,
|
|
156
152
|
...r
|
|
157
153
|
}) {
|
|
158
|
-
const { toggleSidebar: n, open: o, isMobile:
|
|
159
|
-
return /* @__PURE__ */
|
|
160
|
-
|
|
154
|
+
const { toggleSidebar: n, open: o, isMobile: l } = w();
|
|
155
|
+
return /* @__PURE__ */ t(
|
|
156
|
+
D,
|
|
161
157
|
{
|
|
162
158
|
"data-sidebar": "trigger",
|
|
163
159
|
variant: "ghost",
|
|
164
|
-
size: "
|
|
165
|
-
onClick: (
|
|
166
|
-
|
|
160
|
+
size: "icon",
|
|
161
|
+
onClick: (c) => {
|
|
162
|
+
a == null || a(c), n();
|
|
167
163
|
},
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
s ? /* @__PURE__ */ t(k, {}) : o ? /* @__PURE__ */ t(T, {}) : /* @__PURE__ */ t(I, {}),
|
|
171
|
-
/* @__PURE__ */ t("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
172
|
-
]
|
|
164
|
+
icon: () => l ? z : o ? I : T,
|
|
165
|
+
...r
|
|
173
166
|
}
|
|
174
167
|
);
|
|
175
168
|
}
|
|
176
169
|
function ne({
|
|
177
|
-
className:
|
|
178
|
-
...
|
|
170
|
+
className: e,
|
|
171
|
+
...a
|
|
179
172
|
}) {
|
|
180
173
|
const { toggleSidebar: r } = w();
|
|
181
174
|
return /* @__PURE__ */ t(
|
|
@@ -187,76 +180,75 @@ function ne({
|
|
|
187
180
|
onClick: r,
|
|
188
181
|
title: "Toggle Sidebar",
|
|
189
182
|
className: i(
|
|
190
|
-
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border
|
|
191
|
-
"
|
|
192
|
-
"
|
|
183
|
+
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border -right-4 sm:flex",
|
|
184
|
+
"cursor-w-resize",
|
|
185
|
+
"group-data-[state=collapsed]:cursor-e-resize",
|
|
193
186
|
"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar",
|
|
194
|
-
"[[data-
|
|
195
|
-
|
|
196
|
-
a
|
|
187
|
+
"[[data-collapsible=offcanvas]_&]:-right-2",
|
|
188
|
+
e
|
|
197
189
|
),
|
|
198
|
-
...
|
|
190
|
+
...a
|
|
199
191
|
}
|
|
200
192
|
);
|
|
201
193
|
}
|
|
202
194
|
function oe({
|
|
203
|
-
className:
|
|
204
|
-
...
|
|
195
|
+
className: e,
|
|
196
|
+
...a
|
|
205
197
|
}) {
|
|
206
198
|
return /* @__PURE__ */ t(
|
|
207
199
|
"main",
|
|
208
200
|
{
|
|
209
201
|
className: i(
|
|
210
202
|
"relative flex flex-1 flex-col bg-background",
|
|
211
|
-
"peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0
|
|
212
|
-
|
|
203
|
+
"peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0",
|
|
204
|
+
e
|
|
213
205
|
),
|
|
214
|
-
...
|
|
206
|
+
...a
|
|
215
207
|
}
|
|
216
208
|
);
|
|
217
209
|
}
|
|
218
210
|
function de({
|
|
219
|
-
className:
|
|
220
|
-
...
|
|
211
|
+
className: e,
|
|
212
|
+
...a
|
|
221
213
|
}) {
|
|
222
214
|
return /* @__PURE__ */ t(
|
|
223
215
|
"div",
|
|
224
216
|
{
|
|
225
217
|
"data-sidebar": "header",
|
|
226
|
-
className: i("flex flex-col gap-2 p-2",
|
|
227
|
-
...
|
|
218
|
+
className: i("flex flex-col gap-2 p-2", e),
|
|
219
|
+
...a
|
|
228
220
|
}
|
|
229
221
|
);
|
|
230
222
|
}
|
|
231
223
|
function se({
|
|
232
|
-
className:
|
|
233
|
-
...
|
|
224
|
+
className: e,
|
|
225
|
+
...a
|
|
234
226
|
}) {
|
|
235
227
|
return /* @__PURE__ */ t(
|
|
236
228
|
"div",
|
|
237
229
|
{
|
|
238
230
|
"data-sidebar": "footer",
|
|
239
|
-
className: i("flex flex-col gap-2 p-2",
|
|
240
|
-
...
|
|
231
|
+
className: i("flex flex-col gap-2 p-2", e),
|
|
232
|
+
...a
|
|
241
233
|
}
|
|
242
234
|
);
|
|
243
235
|
}
|
|
244
236
|
function le({
|
|
245
|
-
className:
|
|
246
|
-
...
|
|
237
|
+
className: e,
|
|
238
|
+
...a
|
|
247
239
|
}) {
|
|
248
240
|
return /* @__PURE__ */ t(
|
|
249
|
-
|
|
241
|
+
B,
|
|
250
242
|
{
|
|
251
243
|
"data-sidebar": "separator",
|
|
252
|
-
className: i("mx-2 w-auto bg-sidebar-border",
|
|
253
|
-
...
|
|
244
|
+
className: i("mx-2 w-auto bg-sidebar-border", e),
|
|
245
|
+
...a
|
|
254
246
|
}
|
|
255
247
|
);
|
|
256
248
|
}
|
|
257
249
|
function ce({
|
|
258
|
-
className:
|
|
259
|
-
...
|
|
250
|
+
className: e,
|
|
251
|
+
...a
|
|
260
252
|
}) {
|
|
261
253
|
return /* @__PURE__ */ t(
|
|
262
254
|
"div",
|
|
@@ -264,25 +256,25 @@ function ce({
|
|
|
264
256
|
"data-sidebar": "content",
|
|
265
257
|
className: i(
|
|
266
258
|
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
267
|
-
|
|
259
|
+
e
|
|
268
260
|
),
|
|
269
|
-
...
|
|
261
|
+
...a
|
|
270
262
|
}
|
|
271
263
|
);
|
|
272
264
|
}
|
|
273
|
-
function ue({ className:
|
|
265
|
+
function ue({ className: e, ...a }) {
|
|
274
266
|
return /* @__PURE__ */ t(
|
|
275
267
|
"div",
|
|
276
268
|
{
|
|
277
269
|
"data-sidebar": "group",
|
|
278
|
-
className: i("relative flex w-full min-w-0 flex-col p-2",
|
|
279
|
-
...
|
|
270
|
+
className: i("relative flex w-full min-w-0 flex-col p-2", e),
|
|
271
|
+
...a
|
|
280
272
|
}
|
|
281
273
|
);
|
|
282
274
|
}
|
|
283
275
|
function be({
|
|
284
|
-
className:
|
|
285
|
-
...
|
|
276
|
+
className: e,
|
|
277
|
+
...a
|
|
286
278
|
}) {
|
|
287
279
|
return /* @__PURE__ */ t(
|
|
288
280
|
"div",
|
|
@@ -291,19 +283,19 @@ function be({
|
|
|
291
283
|
className: i(
|
|
292
284
|
"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 caption font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
293
285
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
294
|
-
|
|
286
|
+
e
|
|
295
287
|
),
|
|
296
|
-
...
|
|
288
|
+
...a
|
|
297
289
|
}
|
|
298
290
|
);
|
|
299
291
|
}
|
|
300
292
|
function fe({
|
|
301
|
-
className:
|
|
302
|
-
asChild:
|
|
293
|
+
className: e,
|
|
294
|
+
asChild: a = !1,
|
|
303
295
|
...r
|
|
304
296
|
}) {
|
|
305
297
|
return /* @__PURE__ */ t(
|
|
306
|
-
|
|
298
|
+
a ? x : "button",
|
|
307
299
|
{
|
|
308
300
|
"data-sidebar": "group-action",
|
|
309
301
|
className: i(
|
|
@@ -311,60 +303,60 @@ function fe({
|
|
|
311
303
|
// Increases the hit area of the button on mobile.
|
|
312
304
|
"after:absolute after:-inset-2 md:after:hidden",
|
|
313
305
|
"group-data-[collapsible=icon]:hidden",
|
|
314
|
-
|
|
306
|
+
e
|
|
315
307
|
),
|
|
316
308
|
...r
|
|
317
309
|
}
|
|
318
310
|
);
|
|
319
311
|
}
|
|
320
312
|
function pe({
|
|
321
|
-
className:
|
|
322
|
-
...
|
|
313
|
+
className: e,
|
|
314
|
+
...a
|
|
323
315
|
}) {
|
|
324
316
|
return /* @__PURE__ */ t(
|
|
325
317
|
"div",
|
|
326
318
|
{
|
|
327
319
|
"data-sidebar": "group-content",
|
|
328
|
-
className: i("w-full body",
|
|
329
|
-
...
|
|
320
|
+
className: i("w-full body", e),
|
|
321
|
+
...a
|
|
330
322
|
}
|
|
331
323
|
);
|
|
332
324
|
}
|
|
333
|
-
function
|
|
325
|
+
function me({ className: e, ...a }) {
|
|
334
326
|
return /* @__PURE__ */ t(
|
|
335
327
|
"ul",
|
|
336
328
|
{
|
|
337
329
|
"data-sidebar": "menu",
|
|
338
|
-
className: i("flex w-full min-w-0 flex-col",
|
|
339
|
-
...
|
|
330
|
+
className: i("flex w-full min-w-0 flex-col", e),
|
|
331
|
+
...a
|
|
340
332
|
}
|
|
341
333
|
);
|
|
342
334
|
}
|
|
343
|
-
function
|
|
344
|
-
className:
|
|
345
|
-
...
|
|
335
|
+
function ge({
|
|
336
|
+
className: e,
|
|
337
|
+
...a
|
|
346
338
|
}) {
|
|
347
339
|
return /* @__PURE__ */ t(
|
|
348
340
|
"li",
|
|
349
341
|
{
|
|
350
342
|
"data-sidebar": "menu-item",
|
|
351
|
-
className: i("group/menu-item relative",
|
|
352
|
-
...
|
|
343
|
+
className: i("group/menu-item relative", e),
|
|
344
|
+
...a
|
|
353
345
|
}
|
|
354
346
|
);
|
|
355
347
|
}
|
|
356
348
|
function he({
|
|
357
|
-
asChild:
|
|
358
|
-
isActive:
|
|
349
|
+
asChild: e = !1,
|
|
350
|
+
isActive: a = !1,
|
|
359
351
|
tooltip: r,
|
|
360
352
|
className: n,
|
|
361
353
|
...o
|
|
362
354
|
}) {
|
|
363
|
-
const
|
|
364
|
-
|
|
355
|
+
const l = e ? x : "button", { isMobile: c, state: u } = w(), b = /* @__PURE__ */ t(
|
|
356
|
+
l,
|
|
365
357
|
{
|
|
366
358
|
"data-sidebar": "menu-button",
|
|
367
|
-
"data-active":
|
|
359
|
+
"data-active": a,
|
|
368
360
|
className: i("peer/menu-button btn h-input flex w-full items-center gap-2 overflow-hidden p-2 text-left body hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none 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", n),
|
|
369
361
|
...o
|
|
370
362
|
}
|
|
@@ -378,20 +370,20 @@ function he({
|
|
|
378
370
|
{
|
|
379
371
|
side: "right",
|
|
380
372
|
align: "center",
|
|
381
|
-
hidden:
|
|
373
|
+
hidden: u !== "collapsed" || c,
|
|
382
374
|
...r
|
|
383
375
|
}
|
|
384
376
|
)
|
|
385
377
|
] })) : b;
|
|
386
378
|
}
|
|
387
379
|
function ve({
|
|
388
|
-
className:
|
|
389
|
-
asChild:
|
|
380
|
+
className: e,
|
|
381
|
+
asChild: a = !1,
|
|
390
382
|
showOnHover: r = !1,
|
|
391
383
|
...n
|
|
392
384
|
}) {
|
|
393
385
|
return /* @__PURE__ */ t(
|
|
394
|
-
|
|
386
|
+
a ? x : "button",
|
|
395
387
|
{
|
|
396
388
|
"data-sidebar": "menu-action",
|
|
397
389
|
className: i(
|
|
@@ -403,15 +395,15 @@ function ve({
|
|
|
403
395
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
404
396
|
"group-data-[collapsible=icon]:hidden",
|
|
405
397
|
r && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",
|
|
406
|
-
|
|
398
|
+
e
|
|
407
399
|
),
|
|
408
400
|
...n
|
|
409
401
|
}
|
|
410
402
|
);
|
|
411
403
|
}
|
|
412
404
|
function xe({
|
|
413
|
-
className:
|
|
414
|
-
...
|
|
405
|
+
className: e,
|
|
406
|
+
...a
|
|
415
407
|
}) {
|
|
416
408
|
return /* @__PURE__ */ t(
|
|
417
409
|
"div",
|
|
@@ -424,34 +416,34 @@ function xe({
|
|
|
424
416
|
"peer-data-[size=default]/menu-button:top-1.5",
|
|
425
417
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
426
418
|
"group-data-[collapsible=icon]:hidden",
|
|
427
|
-
|
|
419
|
+
e
|
|
428
420
|
),
|
|
429
|
-
...
|
|
421
|
+
...a
|
|
430
422
|
}
|
|
431
423
|
);
|
|
432
424
|
}
|
|
433
425
|
function we({
|
|
434
|
-
className:
|
|
435
|
-
showIcon:
|
|
426
|
+
className: e,
|
|
427
|
+
showIcon: a = !1,
|
|
436
428
|
...r
|
|
437
429
|
}) {
|
|
438
|
-
const n =
|
|
430
|
+
const n = s.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
439
431
|
return /* @__PURE__ */ p(
|
|
440
432
|
"div",
|
|
441
433
|
{
|
|
442
434
|
"data-sidebar": "menu-skeleton",
|
|
443
|
-
className: i("rounded-md h-8 flex gap-2 px-2 items-center",
|
|
435
|
+
className: i("rounded-md h-8 flex gap-2 px-2 items-center", e),
|
|
444
436
|
...r,
|
|
445
437
|
children: [
|
|
446
|
-
|
|
447
|
-
|
|
438
|
+
a && /* @__PURE__ */ t(
|
|
439
|
+
N,
|
|
448
440
|
{
|
|
449
441
|
className: "size-4 rounded-md",
|
|
450
442
|
"data-sidebar": "menu-skeleton-icon"
|
|
451
443
|
}
|
|
452
444
|
),
|
|
453
445
|
/* @__PURE__ */ t(
|
|
454
|
-
|
|
446
|
+
N,
|
|
455
447
|
{
|
|
456
448
|
className: "h-4 flex-1 max-w-(--skeleton-width)",
|
|
457
449
|
"data-sidebar": "menu-skeleton-text",
|
|
@@ -465,8 +457,8 @@ function we({
|
|
|
465
457
|
);
|
|
466
458
|
}
|
|
467
459
|
function Se({
|
|
468
|
-
className:
|
|
469
|
-
...
|
|
460
|
+
className: e,
|
|
461
|
+
...a
|
|
470
462
|
}) {
|
|
471
463
|
return /* @__PURE__ */ t(
|
|
472
464
|
"ul",
|
|
@@ -475,33 +467,33 @@ function Se({
|
|
|
475
467
|
className: i(
|
|
476
468
|
"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5",
|
|
477
469
|
"group-data-[collapsible=icon]:hidden",
|
|
478
|
-
|
|
470
|
+
e
|
|
479
471
|
),
|
|
480
|
-
...
|
|
472
|
+
...a
|
|
481
473
|
}
|
|
482
474
|
);
|
|
483
475
|
}
|
|
484
|
-
function
|
|
485
|
-
return /* @__PURE__ */ t("li", { ...
|
|
476
|
+
function Ne({ ...e }) {
|
|
477
|
+
return /* @__PURE__ */ t("li", { ...e });
|
|
486
478
|
}
|
|
487
|
-
function
|
|
488
|
-
asChild:
|
|
489
|
-
size:
|
|
479
|
+
function ye({
|
|
480
|
+
asChild: e = !1,
|
|
481
|
+
size: a = "md",
|
|
490
482
|
isActive: r,
|
|
491
483
|
className: n,
|
|
492
484
|
...o
|
|
493
485
|
}) {
|
|
494
486
|
return /* @__PURE__ */ t(
|
|
495
|
-
|
|
487
|
+
e ? x : "a",
|
|
496
488
|
{
|
|
497
489
|
"data-sidebar": "menu-sub-button",
|
|
498
|
-
"data-size":
|
|
490
|
+
"data-size": a,
|
|
499
491
|
"data-active": r,
|
|
500
492
|
className: i(
|
|
501
493
|
"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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 [&>svg]:text-sidebar-accent-foreground",
|
|
502
494
|
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
503
|
-
|
|
504
|
-
|
|
495
|
+
a === "sm" && "text-caption",
|
|
496
|
+
a === "md" && "body",
|
|
505
497
|
"group-data-[collapsible=icon]:hidden",
|
|
506
498
|
n
|
|
507
499
|
),
|
|
@@ -519,15 +511,15 @@ export {
|
|
|
519
511
|
be as SidebarGroupLabel,
|
|
520
512
|
de as SidebarHeader,
|
|
521
513
|
oe as SidebarInset,
|
|
522
|
-
|
|
514
|
+
me as SidebarMenu,
|
|
523
515
|
ve as SidebarMenuAction,
|
|
524
516
|
xe as SidebarMenuBadge,
|
|
525
517
|
he as SidebarMenuButton,
|
|
526
|
-
|
|
518
|
+
ge as SidebarMenuItem,
|
|
527
519
|
we as SidebarMenuSkeleton,
|
|
528
520
|
Se as SidebarMenuSub,
|
|
529
|
-
|
|
530
|
-
|
|
521
|
+
ye as SidebarMenuSubButton,
|
|
522
|
+
Ne as SidebarMenuSubItem,
|
|
531
523
|
te as SidebarProvider,
|
|
532
524
|
ne as SidebarRail,
|
|
533
525
|
le as SidebarSeparator,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.es.js","sources":["../../../lib/components/ui/sidebar.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronLeft, ChevronRight, Menu } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Separator } from \"@/components/ui/separator\";\nimport {\n\tSheet,\n\tSheetContent,\n\tSheetDescription,\n\tSheetHeader,\n\tSheetTitle,\n} from \"@/components/ui/sheet\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { useIsMobile } from \"@/hooks/use-mobile\";\nimport { cn } from \"@/utils\";\n\n// TODO migrate sizes to tailwind\nconst SIDEBAR_WIDTH = \"16rem\";\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\";\nconst SIDEBAR_WIDTH_ICON = \"3rem\";\n\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\";\n\ntype SidebarContext = {\n\tstate: \"expanded\" | \"collapsed\";\n\topen: boolean;\n\tsetOpen: (open: boolean) => void;\n\topenMobile: boolean;\n\tsetOpenMobile: (open: boolean) => void;\n\tisMobile: boolean;\n\ttoggleSidebar: () => void;\n};\n\nconst SidebarContext = React.createContext<SidebarContext | null>(null);\n\nexport function useSidebar() {\n\tconst context = React.use(SidebarContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSidebar must be used within a SidebarProvider.\");\n\t}\n\n\treturn context;\n}\n\nexport function SidebarProvider({\n\tdefaultOpen = true,\n\topen: openProp,\n\tonOpenChange: setOpenProp,\n\tclassName,\n\tstyle,\n\tchildren,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tdefaultOpen?: boolean;\n\topen?: boolean;\n\tonOpenChange?: (o: boolean) => void;\n}) {\n\tconst isMobile = useIsMobile();\n\tconst [openMobile, setOpenMobile] = React.useState(false);\n\n\t// This is the internal state of the sidebar.\n\t// We use openProp and setOpenProp for control from outside the component.\n\tconst [_open, _setOpen] = React.useState(defaultOpen);\n\tconst open = openProp ?? _open;\n\tconst setOpen = React.useCallback(\n\t\t(value: boolean | ((value: boolean) => boolean)) => {\n\t\t\tif (setOpenProp) {\n\t\t\t\treturn setOpenProp?.(typeof value === \"function\" ? value(open) : value);\n\t\t\t}\n\n\t\t\t_setOpen(value);\n\n\t\t\t// TODO persistent sidebar state without cookies\n\t\t\t// This sets the cookie to keep the sidebar state.\n\t\t\t// document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n\t\t},\n\t\t[setOpenProp, open],\n\t);\n\n\t// Helper to toggle the sidebar.\n\tconst toggleSidebar = React.useCallback(() => {\n\t\treturn isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);\n\t}, [isMobile, setOpen, setOpenMobile]);\n\n\t// Adds a keyboard shortcut to toggle the sidebar.\n\tReact.useEffect(() => {\n\t\tconst handleKeyDown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n\t\t\t\t(event.metaKey || event.ctrlKey)\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttoggleSidebar();\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => window.removeEventListener(\"keydown\", handleKeyDown);\n\t}, [toggleSidebar]);\n\n\t// We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n\t// This makes it easier to style the sidebar with Tailwind classes.\n\tconst state = open ? \"expanded\" : \"collapsed\";\n\n\tconst contextValue = React.useMemo<SidebarContext>(\n\t\t() => ({\n\t\t\tstate,\n\t\t\topen,\n\t\t\tsetOpen,\n\t\t\tisMobile,\n\t\t\topenMobile,\n\t\t\tsetOpenMobile,\n\t\t\ttoggleSidebar,\n\t\t}),\n\t\t[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],\n\t);\n\n\treturn (\n\t\t<SidebarContext value={contextValue}>\n\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t<div\n\t\t\t\t\tstyle={\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH,\n\t\t\t\t\t\t\t\"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"group/sidebar-wrapper flex w-full has-data-[variant=inset]:bg-sidebar\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</TooltipProvider>\n\t\t</SidebarContext>\n\t);\n};\n\nexport function Sidebar({\n\tside = \"left\",\n\tvariant = \"sidebar\",\n\tcollapsible = \"offcanvas\",\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tside?: \"left\" | \"right\";\n\tvariant?: \"sidebar\" | \"floating\" | \"inset\";\n\tcollapsible?: \"offcanvas\" | \"none\";\n}) {\n\tconst { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n\tif (collapsible === \"none\") {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (isMobile) {\n\t\treturn (\n\t\t\t<Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n\t\t\t\t<SheetContent\n\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\tdata-mobile=\"true\"\n\t\t\t\t\tclassName=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n\t\t\t\t\tstyle={\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t}\n\t\t\t\t\tside={side}\n\t\t\t\t>\n\t\t\t\t\t<SheetHeader>\n\t\t\t\t\t\t<SheetTitle />\n\t\t\t\t\t\t<SheetDescription />\n\t\t\t\t\t</SheetHeader>\n\t\t\t\t\t<div className=\"flex h-full w-full flex-col\">{children}</div>\n\t\t\t\t</SheetContent>\n\t\t\t</Sheet>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"group peer hidden md:block text-sidebar-foreground\"\n\t\t\tdata-state={state}\n\t\t\tdata-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n\t\t\tdata-variant={variant}\n\t\t\tdata-side={side}\n\t\t>\n\t\t\t{/* This is what handles the sidebar gap on desktop */}\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"duration-200 relative w-(--sidebar-width) bg-transparent transition-[width] ease-linear\",\n\t\t\t\t\t\"group-data-[collapsible=offcanvas]:w-0\",\n\t\t\t\t\t\"group-data-[side=right]:rotate-180\",\n\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n\t\t\t\t)}\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"duration-200 fixed inset-y-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex\",\n\t\t\t\t\tside === \"left\"\n\t\t\t\t\t\t? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n\t\t\t\t\t\t: \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n\t\t\t\t\t// Adjust the padding for floating and inset variants.\n\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\tclassName=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow-sm\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport function SidebarTrigger({\n\tclassName,\n\tonClick,\n\t...props\n}: React.ComponentProps<typeof Button>) {\n\tconst { toggleSidebar, open, isMobile } = useSidebar();\n\n\treturn (\n\t\t<Button\n\t\t\tdata-sidebar=\"trigger\"\n\t\t\tvariant=\"ghost\"\n\t\t\tsize=\"sm\"\n\t\t\tonClick={(event) => {\n\t\t\t\tonClick?.(event);\n\t\t\t\ttoggleSidebar();\n\t\t\t}}\n\t\t\t{...props}\n\t\t>\n\t\t\t{isMobile ? <Menu /> : open ? <ChevronLeft /> : <ChevronRight />}\n\t\t\t<span className=\"sr-only\">Toggle Sidebar</span>\n\t\t</Button>\n\t);\n};\n\nexport function SidebarRail({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"button\">) {\n\tconst { toggleSidebar } = useSidebar();\n\n\treturn (\n\t\t<button\n\t\t\tdata-sidebar=\"rail\"\n\t\t\taria-label=\"Toggle Sidebar\"\n\t\t\ttabIndex={-1}\n\t\t\tonClick={toggleSidebar}\n\t\t\ttitle=\"Toggle Sidebar\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n\t\t\t\t\"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n\t\t\t\t\"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n\t\t\t\t\"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar\",\n\t\t\t\t\"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n\t\t\t\t\"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarInset({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"main\">) {\n\treturn (\n\t\t<main\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex flex-1 flex-col bg-background\",\n\t\t\t\t\"peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:shadow-sm\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarHeader({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarFooter({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"footer\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof Separator>) {\n\treturn (\n\t\t<Separator\n\t\t\tdata-sidebar=\"separator\"\n\t\t\tclassName={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"group\"\n\t\t\tclassName={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarGroupLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"group-label\"\n\t\t\tclassName={cn(\n\t\t\t\t\"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 caption font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t\"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarGroupAction({\n\tclassName,\n\tasChild = false,\n\t...props\n}: React.ComponentProps<\"button\"> & {\n\tasChild?: boolean;\n}) {\n\tconst Comp = asChild ? Slot : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-sidebar=\"group-action\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t// Increases the hit area of the button on mobile.\n\t\t\t\t\"after:absolute after:-inset-2 md:after:hidden\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\n\nexport function SidebarGroupContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"group-content\"\n\t\t\tclassName={cn(\"w-full body\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tdata-sidebar=\"menu\"\n\t\t\tclassName={cn(\"flex w-full min-w-0 flex-col\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function SidebarMenuItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tdata-sidebar=\"menu-item\"\n\t\t\tclassName={cn(\"group/menu-item relative\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SidebarMenuButton({\n\tasChild = false,\n\tisActive = false,\n\ttooltip,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"button\"> & {\n\tisActive?: boolean;\n\tasChild?: boolean;\n\ttooltip?: string | React.ComponentProps<typeof TooltipContent>;\n}) {\n\tconst Comp = asChild ? Slot : \"button\";\n\tconst { isMobile, state } = useSidebar();\n\n\tconst button = (\n\t\t<Comp\n\t\t\tdata-sidebar=\"menu-button\"\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\"peer/menu-button btn h-input flex w-full items-center gap-2 overflow-hidden p-2 text-left body hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none 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\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n\n\tif (!tooltip) {\n\t\treturn button;\n\t}\n\n\tif (typeof tooltip === \"string\") {\n\t\ttooltip = {\n\t\t\tchildren: tooltip,\n\t\t};\n\t}\n\n\treturn (\n\t\t<Tooltip>\n\t\t\t<TooltipTrigger asChild>{button}</TooltipTrigger>\n\t\t\t<TooltipContent\n\t\t\t\tside=\"right\"\n\t\t\t\talign=\"center\"\n\t\t\t\thidden={state !== \"collapsed\" || isMobile}\n\t\t\t\t{...tooltip}\n\t\t\t/>\n\t\t</Tooltip>\n\t);\n};\n\nexport function SidebarMenuAction({\n\tclassName,\n\tasChild = false,\n\tshowOnHover = false,\n\t...props\n}: React.ComponentProps<\"button\"> & {\n\tasChild?: boolean;\n\tshowOnHover?: boolean;\n}) {\n\tconst Comp = asChild ? Slot : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-sidebar=\"menu-action\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t// Increases the hit area of the button on mobile.\n\t\t\t\t\"after:absolute after:-inset-2 md:after:hidden\",\n\t\t\t\t\"peer-data-[size=sm]/menu-button:top-1\",\n\t\t\t\t\"peer-data-[size=default]/menu-button:top-1.5\",\n\t\t\t\t\"peer-data-[size=lg]/menu-button:top-2.5\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tshowOnHover &&\n\t\t\t\t\"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\n\nexport function SidebarMenuBadge({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"menu-badge\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-caption font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none\",\n\t\t\t\t\"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n\t\t\t\t\"peer-data-[size=sm]/menu-button:top-1\",\n\t\t\t\t\"peer-data-[size=default]/menu-button:top-1.5\",\n\t\t\t\t\"peer-data-[size=lg]/menu-button:top-2.5\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function SidebarMenuSkeleton({\n\tclassName,\n\tshowIcon = false,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tshowIcon?: boolean;\n}) {\n\t// Random width between 50 to 90%.\n\tconst width = React.useMemo(() => {\n\t\treturn `${Math.floor(Math.random() * 40) + 50}%`;\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"menu-skeleton\"\n\t\t\tclassName={cn(\"rounded-md h-8 flex gap-2 px-2 items-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{showIcon && (\n\t\t\t\t<Skeleton\n\t\t\t\t\tclassName=\"size-4 rounded-md\"\n\t\t\t\t\tdata-sidebar=\"menu-skeleton-icon\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<Skeleton\n\t\t\t\tclassName=\"h-4 flex-1 max-w-(--skeleton-width)\"\n\t\t\t\tdata-sidebar=\"menu-skeleton-text\"\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--skeleton-width\": width,\n\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\n\nexport function SidebarMenuSub({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tdata-sidebar=\"menu-sub\"\n\t\t\tclassName={cn(\n\t\t\t\t\"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SidebarMenuSubItem({ ...props }: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li {...props} />\n\t);\n}\n\n\nexport function SidebarMenuSubButton({\n\tasChild = false,\n\tsize = \"md\",\n\tisActive,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"a\"> & {\n\tasChild?: boolean;\n\tsize: \"sm\" | \"md\";\n\tisActive: boolean;\n}) {\n\tconst Comp = asChild ? Slot : \"a\";\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-sidebar=\"menu-sub-button\"\n\t\t\tdata-size={size}\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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 [&>svg]:text-sidebar-accent-foreground\",\n\t\t\t\t\"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n\t\t\t\tsize === \"sm\" && \"text-caption\",\n\t\t\t\tsize === \"md\" && \"body\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n"],"names":["SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","React","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","_open","_setOpen","open","setOpen","value","toggleSidebar","handleKeyDown","event","state","contextValue","jsx","TooltipProvider","cn","Sidebar","side","variant","collapsible","Sheet","jsxs","SheetContent","SheetHeader","SheetTitle","SheetDescription","SidebarTrigger","onClick","Button","Menu","ChevronLeft","ChevronRight","SidebarRail","SidebarInset","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","SidebarGroupAction","asChild","Slot","SidebarGroupContent","SidebarMenu","SidebarMenuItem","SidebarMenuButton","isActive","tooltip","Comp","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuBadge","SidebarMenuSkeleton","showIcon","width","Skeleton","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton","size"],"mappings":";;;;;;;;;;;AAwBA,MAAMA,IAAgB,SAChBC,IAAuB,SACvBC,IAAqB,QAErBC,IAA4B,KAY5BC,IAAiBC,EAAM,cAAqC,IAAI;AAE/D,SAASC,IAAa;AACtB,QAAAC,IAAUF,EAAM,IAAID,CAAc;AACxC,MAAI,CAACG;AACE,UAAA,IAAI,MAAM,mDAAmD;AAG7D,SAAAA;AACR;AAEO,SAASC,GAAgB;AAAA,EAC/B,aAAAC,IAAc;AAAA,EACd,MAAMC;AAAA,EACN,cAAcC;AAAA,EACd,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,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A,YACV,gBAAa;AAAA,YACb,OACC;AAAA,cACC,oBAAoBD;AAAA,YAAA;AAAA,UACrB;AAAA,QAAA;AAAA,MAEF;AAAA,IAAA;AAAA,EACD;AAEF;AAGO,SAASE,GAAe;AAAA,EAC9B,WAAAnE;AAAA,EACA,GAAGG;AACJ,GAA+B;AAE7B,SAAA,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,gBAAa;AAAA,MACb,WAAWE;AAAA,QACV;AAAA,QACA;AAAA,QACApB;AAAA,MACD;AAAA,MACC,GAAGG;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASiE,GAAmB,EAAE,GAAGjE,KAAqC;AAE3E,SAAA,gBAAAe,EAAC,MAAI,EAAA,GAAGf,EAAO,CAAA;AAEjB;AAGO,SAASkE,GAAqB;AAAA,EACpC,SAAAtB,IAAU;AAAA,EACV,MAAAuB,IAAO;AAAA,EACP,UAAAjB;AAAA,EACA,WAAArD;AAAA,EACA,GAAGG;AACJ,GAIG;AAID,SAAA,gBAAAe;AAAA,IAHY6B,IAAUC,IAAO;AAAA,IAG5B;AAAA,MACA,gBAAa;AAAA,MACb,aAAWsB;AAAA,MACX,eAAajB;AAAA,MACb,WAAWjC;AAAA,QACV;AAAA,QACA;AAAA,QACAkD,MAAS,QAAQ;AAAA,QACjBA,MAAS,QAAQ;AAAA,QACjB;AAAA,QACAtE;AAAA,MACD;AAAA,MACC,GAAGG;AAAA,IAAA;AAAA,EACL;AAEF;"}
|
|
1
|
+
{"version":3,"file":"sidebar.es.js","sources":["../../../lib/components/ui/sidebar.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { ChevronLeft, ChevronRight, Menu } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { Button } from \"@/components/ui/button\";\nimport { Separator } from \"@/components/ui/separator\";\nimport {\n\tSheet,\n\tSheetContent,\n\tSheetDescription,\n\tSheetHeader,\n\tSheetTitle,\n} from \"@/components/ui/sheet\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from \"@/components/ui/tooltip\";\nimport { useIsMobile } from \"@/hooks/use-mobile\";\nimport { cn } from \"@/utils\";\n\n// TODO migrate sizes to tailwind\nconst SIDEBAR_WIDTH = \"16rem\";\nconst SIDEBAR_WIDTH_MOBILE = \"18rem\";\nconst SIDEBAR_WIDTH_ICON = \"3rem\";\n\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\";\n\ntype SidebarContext = {\n\tstate: \"expanded\" | \"collapsed\";\n\topen: boolean;\n\tsetOpen: (open: boolean) => void;\n\topenMobile: boolean;\n\tsetOpenMobile: (open: boolean) => void;\n\tisMobile: boolean;\n\ttoggleSidebar: () => void;\n};\n\nconst SidebarContext = React.createContext<SidebarContext | null>(null);\n\nexport function useSidebar() {\n\tconst context = React.use(SidebarContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSidebar must be used within a SidebarProvider.\");\n\t}\n\n\treturn context;\n}\n\nexport function SidebarProvider({\n\tdefaultOpen = true,\n\topen: openProp,\n\tonOpenChange: setOpenProp,\n\tclassName,\n\tstyle,\n\tchildren,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tdefaultOpen?: boolean;\n\topen?: boolean;\n\tonOpenChange?: (o: boolean) => void;\n}) {\n\tconst isMobile = useIsMobile();\n\tconst [openMobile, setOpenMobile] = React.useState(false);\n\n\t// This is the internal state of the sidebar.\n\t// We use openProp and setOpenProp for control from outside the component.\n\tconst [_open, _setOpen] = React.useState(defaultOpen);\n\tconst open = openProp ?? _open;\n\tconst setOpen = React.useCallback(\n\t\t(value: boolean | ((value: boolean) => boolean)) => {\n\t\t\tif (setOpenProp) {\n\t\t\t\treturn setOpenProp?.(typeof value === \"function\" ? value(open) : value);\n\t\t\t}\n\n\t\t\t_setOpen(value);\n\n\t\t\t// TODO persistent sidebar state without cookies\n\t\t\t// This sets the cookie to keep the sidebar state.\n\t\t\t// document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;\n\t\t},\n\t\t[setOpenProp, open],\n\t);\n\n\t// Helper to toggle the sidebar.\n\tconst toggleSidebar = React.useCallback(() => {\n\t\treturn isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);\n\t}, [isMobile, setOpen, setOpenMobile]);\n\n\t// Adds a keyboard shortcut to toggle the sidebar.\n\tReact.useEffect(() => {\n\t\tconst handleKeyDown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n\t\t\t\t(event.metaKey || event.ctrlKey)\n\t\t\t) {\n\t\t\t\tevent.preventDefault();\n\t\t\t\ttoggleSidebar();\n\t\t\t}\n\t\t};\n\n\t\twindow.addEventListener(\"keydown\", handleKeyDown);\n\t\treturn () => window.removeEventListener(\"keydown\", handleKeyDown);\n\t}, [toggleSidebar]);\n\n\t// We add a state so that we can do data-state=\"expanded\" or \"collapsed\".\n\t// This makes it easier to style the sidebar with Tailwind classes.\n\tconst state = open ? \"expanded\" : \"collapsed\";\n\n\tconst contextValue = React.useMemo<SidebarContext>(\n\t\t() => ({\n\t\t\tstate,\n\t\t\topen,\n\t\t\tsetOpen,\n\t\t\tisMobile,\n\t\t\topenMobile,\n\t\t\tsetOpenMobile,\n\t\t\ttoggleSidebar,\n\t\t}),\n\t\t[state, open, setOpen, isMobile, openMobile, setOpenMobile, toggleSidebar],\n\t);\n\n\treturn (\n\t\t<SidebarContext value={contextValue}>\n\t\t\t<TooltipProvider delayDuration={0}>\n\t\t\t\t<div\n\t\t\t\t\tstyle={\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH,\n\t\t\t\t\t\t\t\"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n\t\t\t\t\t\t\t...style,\n\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"group/sidebar-wrapper flex w-full has-data-[variant=inset]:bg-sidebar\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</TooltipProvider>\n\t\t</SidebarContext>\n\t);\n};\n\n/** Always set a height on this element */\nexport function Sidebar({\n\tvariant = \"sidebar\",\n\tcollapsible = \"offcanvas\",\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tvariant?: \"sidebar\" | \"floating\" | \"inset\";\n\tcollapsible?: \"offcanvas\" | \"icon\" | \"none\";\n}) {\n\tconst { isMobile, state, openMobile, setOpenMobile } = useSidebar();\n\n\tif (collapsible === \"none\") {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t);\n\t}\n\n\tif (isMobile) {\n\t\treturn (\n\t\t\t<Sheet open={openMobile} onOpenChange={setOpenMobile} {...props}>\n\t\t\t\t<SheetContent\n\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\tdata-mobile=\"true\"\n\t\t\t\t\tclassName=\"w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n\t\t\t\t\tstyle={\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"--sidebar-width\": SIDEBAR_WIDTH_MOBILE,\n\t\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t<SheetHeader>\n\t\t\t\t\t\t<SheetTitle />\n\t\t\t\t\t\t<SheetDescription />\n\t\t\t\t\t</SheetHeader>\n\t\t\t\t\t<div className=\"flex h-full w-full flex-col\">{children}</div>\n\t\t\t\t</SheetContent>\n\t\t\t</Sheet>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName=\"group peer hidden md:block text-sidebar-foreground\"\n\t\t\tdata-state={state}\n\t\t\tdata-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n\t\t\tdata-variant={variant}\n\t\t>\n\t\t\t{/* This is what handles the sidebar gap on desktop */}\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"duration-200 relative w-(--sidebar-width) bg-transparent transition-[width] ease-linear\",\n\t\t\t\t\t\"group-data-[collapsible=offcanvas]:w-0\",\n\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n\t\t\t\t)}\n\t\t\t/>\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"duration-200 absolute z-10 hidden w-(--sidebar-width) transition-[left,right,width] ease-linear md:flex\",\n\t\t\t\t\t\"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\",\n\t\t\t\t\t// Adjust the padding for floating and inset variants.\n\t\t\t\t\tvariant === \"floating\" || variant === \"inset\"\n\t\t\t\t\t\t? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n\t\t\t\t\t\t: \"group-data-[collapsible=icon]:w-(--sidebar-width-icon) border-r\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tdata-sidebar=\"sidebar\"\n\t\t\t\t\tclassName=\"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border\"\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport function SidebarTrigger({\n\tclassName,\n\tonClick,\n\t...props\n}: React.ComponentProps<typeof Button>) {\n\tconst { toggleSidebar, open, isMobile } = useSidebar();\n\n\treturn (\n\t\t<Button\n\t\t\tdata-sidebar=\"trigger\"\n\t\t\tvariant=\"ghost\"\n\t\t\tsize=\"icon\"\n\t\t\tonClick={(event) => {\n\t\t\t\tonClick?.(event);\n\t\t\t\ttoggleSidebar();\n\t\t\t}}\n\t\t\ticon={() => isMobile ? Menu : open ? ChevronLeft : ChevronRight}\n\t\t\t{...props}\n\t\t></Button>\n\t);\n};\n\nexport function SidebarRail({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"button\">) {\n\tconst { toggleSidebar } = useSidebar();\n\n\treturn (\n\t\t<button\n\t\t\tdata-sidebar=\"rail\"\n\t\t\taria-label=\"Toggle Sidebar\"\n\t\t\ttabIndex={-1}\n\t\t\tonClick={toggleSidebar}\n\t\t\ttitle=\"Toggle Sidebar\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border -right-4 sm:flex\",\n\t\t\t\t\"cursor-w-resize\",\n\t\t\t\t\"group-data-[state=collapsed]:cursor-e-resize\",\n\t\t\t\t\"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar\",\n\t\t\t\t\"[[data-collapsible=offcanvas]_&]:-right-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarInset({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"main\">) {\n\treturn (\n\t\t<main\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex flex-1 flex-col bg-background\",\n\t\t\t\t\"peer-data-[variant=inset]:min-h-[calc(100svh-(--spacing(4)))] md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:ml-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarHeader({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"header\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarFooter({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"footer\"\n\t\t\tclassName={cn(\"flex flex-col gap-2 p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof Separator>) {\n\treturn (\n\t\t<Separator\n\t\t\tdata-sidebar=\"separator\"\n\t\t\tclassName={cn(\"mx-2 w-auto bg-sidebar-border\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"group\"\n\t\t\tclassName={cn(\"relative flex w-full min-w-0 flex-col p-2\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarGroupLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"group-label\"\n\t\t\tclassName={cn(\n\t\t\t\t\"duration-200 flex h-8 shrink-0 items-center rounded-md px-2 caption font-medium text-sidebar-foreground/70 outline-hidden ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t\"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\nexport function SidebarGroupAction({\n\tclassName,\n\tasChild = false,\n\t...props\n}: React.ComponentProps<\"button\"> & {\n\tasChild?: boolean;\n}) {\n\tconst Comp = asChild ? Slot : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-sidebar=\"group-action\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t// Increases the hit area of the button on mobile.\n\t\t\t\t\"after:absolute after:-inset-2 md:after:hidden\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\n\nexport function SidebarGroupContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"group-content\"\n\t\t\tclassName={cn(\"w-full body\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function SidebarMenu({ className, ...props }: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tdata-sidebar=\"menu\"\n\t\t\tclassName={cn(\"flex w-full min-w-0 flex-col\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function SidebarMenuItem({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li\n\t\t\tdata-sidebar=\"menu-item\"\n\t\t\tclassName={cn(\"group/menu-item relative\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SidebarMenuButton({\n\tasChild = false,\n\tisActive = false,\n\ttooltip,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"button\"> & {\n\tisActive?: boolean;\n\tasChild?: boolean;\n\ttooltip?: string | React.ComponentProps<typeof TooltipContent>;\n}) {\n\tconst Comp = asChild ? Slot : \"button\";\n\tconst { isMobile, state } = useSidebar();\n\n\tconst button = (\n\t\t<Comp\n\t\t\tdata-sidebar=\"menu-button\"\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\"peer/menu-button btn h-input flex w-full items-center gap-2 overflow-hidden p-2 text-left body hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none 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\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n\n\tif (!tooltip) {\n\t\treturn button;\n\t}\n\n\tif (typeof tooltip === \"string\") {\n\t\ttooltip = {\n\t\t\tchildren: tooltip,\n\t\t};\n\t}\n\n\treturn (\n\t\t<Tooltip>\n\t\t\t<TooltipTrigger asChild>{button}</TooltipTrigger>\n\t\t\t<TooltipContent\n\t\t\t\tside=\"right\"\n\t\t\t\talign=\"center\"\n\t\t\t\thidden={state !== \"collapsed\" || isMobile}\n\t\t\t\t{...tooltip}\n\t\t\t/>\n\t\t</Tooltip>\n\t);\n};\n\nexport function SidebarMenuAction({\n\tclassName,\n\tasChild = false,\n\tshowOnHover = false,\n\t...props\n}: React.ComponentProps<\"button\"> & {\n\tasChild?: boolean;\n\tshowOnHover?: boolean;\n}) {\n\tconst Comp = asChild ? Slot : \"button\";\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-sidebar=\"menu-action\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-hidden ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n\t\t\t\t// Increases the hit area of the button on mobile.\n\t\t\t\t\"after:absolute after:-inset-2 md:after:hidden\",\n\t\t\t\t\"peer-data-[size=sm]/menu-button:top-1\",\n\t\t\t\t\"peer-data-[size=default]/menu-button:top-1.5\",\n\t\t\t\t\"peer-data-[size=lg]/menu-button:top-2.5\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tshowOnHover &&\n\t\t\t\t\"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n\n\nexport function SidebarMenuBadge({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"menu-badge\"\n\t\t\tclassName={cn(\n\t\t\t\t\"absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-caption font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none\",\n\t\t\t\t\"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n\t\t\t\t\"peer-data-[size=sm]/menu-button:top-1\",\n\t\t\t\t\"peer-data-[size=default]/menu-button:top-1.5\",\n\t\t\t\t\"peer-data-[size=lg]/menu-button:top-2.5\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\n\nexport function SidebarMenuSkeleton({\n\tclassName,\n\tshowIcon = false,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tshowIcon?: boolean;\n}) {\n\t// Random width between 50 to 90%.\n\tconst width = React.useMemo(() => {\n\t\treturn `${Math.floor(Math.random() * 40) + 50}%`;\n\t}, []);\n\n\treturn (\n\t\t<div\n\t\t\tdata-sidebar=\"menu-skeleton\"\n\t\t\tclassName={cn(\"rounded-md h-8 flex gap-2 px-2 items-center\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{showIcon && (\n\t\t\t\t<Skeleton\n\t\t\t\t\tclassName=\"size-4 rounded-md\"\n\t\t\t\t\tdata-sidebar=\"menu-skeleton-icon\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t<Skeleton\n\t\t\t\tclassName=\"h-4 flex-1 max-w-(--skeleton-width)\"\n\t\t\t\tdata-sidebar=\"menu-skeleton-text\"\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t\"--skeleton-width\": width,\n\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t}\n\t\t\t/>\n\t\t</div>\n\t);\n};\n\n\nexport function SidebarMenuSub({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"ul\">) {\n\treturn (\n\t\t<ul\n\t\t\tdata-sidebar=\"menu-sub\"\n\t\t\tclassName={cn(\n\t\t\t\t\"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function SidebarMenuSubItem({ ...props }: React.ComponentProps<\"li\">) {\n\treturn (\n\t\t<li {...props} />\n\t);\n}\n\n\nexport function SidebarMenuSubButton({\n\tasChild = false,\n\tsize = \"md\",\n\tisActive,\n\tclassName,\n\t...props\n}: React.ComponentProps<\"a\"> & {\n\tasChild?: boolean;\n\tsize: \"sm\" | \"md\";\n\tisActive: boolean;\n}) {\n\tconst Comp = asChild ? Slot : \"a\";\n\n\treturn (\n\t\t<Comp\n\t\t\tdata-sidebar=\"menu-sub-button\"\n\t\t\tdata-size={size}\n\t\t\tdata-active={isActive}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-1 active:bg-sidebar-accent active:text-sidebar-accent-foreground 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 [&>svg]:text-sidebar-accent-foreground\",\n\t\t\t\t\"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n\t\t\t\tsize === \"sm\" && \"text-caption\",\n\t\t\t\tsize === \"md\" && \"body\",\n\t\t\t\t\"group-data-[collapsible=icon]:hidden\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\n"],"names":["SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","React","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","isMobile","useIsMobile","openMobile","setOpenMobile","_open","_setOpen","open","setOpen","value","toggleSidebar","handleKeyDown","event","state","contextValue","jsx","TooltipProvider","cn","Sidebar","variant","collapsible","Sheet","jsxs","SheetContent","SheetHeader","SheetTitle","SheetDescription","SidebarTrigger","onClick","Button","Menu","ChevronLeft","ChevronRight","SidebarRail","SidebarInset","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","SidebarGroupAction","asChild","Slot","SidebarGroupContent","SidebarMenu","SidebarMenuItem","SidebarMenuButton","isActive","tooltip","Comp","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuBadge","SidebarMenuSkeleton","showIcon","width","Skeleton","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton","size"],"mappings":";;;;;;;;;;;AAwBA,MAAMA,IAAgB,SAChBC,IAAuB,SACvBC,IAAqB,QAErBC,IAA4B,KAY5BC,IAAiBC,EAAM,cAAqC,IAAI;AAE/D,SAASC,IAAa;AACtB,QAAAC,IAAUF,EAAM,IAAID,CAAc;AACxC,MAAI,CAACG;AACE,UAAA,IAAI,MAAM,mDAAmD;AAG7D,SAAAA;AACR;AAEO,SAASC,GAAgB;AAAA,EAC/B,aAAAC,IAAc;AAAA,EACd,MAAMC;AAAA,EACN,cAAcC;AAAA,EACd,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACJ,GAIG;AACF,QAAMC,IAAWC,EAAY,GACvB,CAACC,GAAYC,CAAa,IAAId,EAAM,SAAS,EAAK,GAIlD,CAACe,GAAOC,CAAQ,IAAIhB,EAAM,SAASI,CAAW,GAC9Ca,IAAOZ,KAAYU,GACnBG,IAAUlB,EAAM;AAAA,IACrB,CAACmB,MAAmD;AACnD,UAAIb;AACH,eAAOA,KAAA,gBAAAA,EAAc,OAAOa,KAAU,aAAaA,EAAMF,CAAI,IAAIE;AAGlE,MAAAH,EAASG,CAAK;AAAA,IAKf;AAAA,IACA,CAACb,GAAaW,CAAI;AAAA,EACnB,GAGMG,IAAgBpB,EAAM,YAAY,MAChCW,IAAWG,EAAc,CAACG,MAAS,CAACA,CAAI,IAAIC,EAAQ,CAACD,MAAS,CAACA,CAAI,GACxE,CAACN,GAAUO,GAASJ,CAAa,CAAC;AAG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AQ;AAAA,QACjBA,MAAS,QAAQ;AAAA,QACjB;AAAA,QACArE;AAAA,MACD;AAAA,MACC,GAAGG;AAAA,IAAA;AAAA,EACL;AAEF;"}
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Root as o, List as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Root as o, List as r, Trigger as s, Content as a } from "../../node_modules/.pnpm/@radix-ui_react-tabs@1.1.12_@types_react-dom@19.1.0_@types_react@19.1.0_react-dom@19.1.0_react@19.1.0/node_modules/@radix-ui/react-tabs/dist/index.es.js";
|
|
3
3
|
import { cn as n } from "../../utils/index.es.js";
|
|
4
|
-
const
|
|
5
|
-
function
|
|
4
|
+
const g = o;
|
|
5
|
+
function b({
|
|
6
6
|
className: e,
|
|
7
|
-
...
|
|
7
|
+
...i
|
|
8
8
|
}) {
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
|
|
9
|
+
return /* @__PURE__ */ t(
|
|
10
|
+
r,
|
|
11
11
|
{
|
|
12
12
|
className: n(
|
|
13
13
|
"inline-flex h-9 items-center justify-center bg-background p-1 text-muted-foreground",
|
|
14
14
|
e
|
|
15
15
|
),
|
|
16
|
-
...
|
|
16
|
+
...i
|
|
17
17
|
}
|
|
18
18
|
);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function d({
|
|
21
21
|
className: e,
|
|
22
|
-
...
|
|
22
|
+
...i
|
|
23
23
|
}) {
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
24
|
+
return /* @__PURE__ */ t(
|
|
25
|
+
s,
|
|
26
26
|
{
|
|
27
27
|
className: n(
|
|
28
|
-
"inline-flex items-center justify-center whitespace-nowrap px-3 py-1 body font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground
|
|
28
|
+
"inline-flex items-center justify-center whitespace-nowrap px-3 py-1 body font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground",
|
|
29
29
|
e
|
|
30
30
|
),
|
|
31
|
-
...
|
|
31
|
+
...i
|
|
32
32
|
}
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
function l({
|
|
36
36
|
className: e,
|
|
37
|
-
...
|
|
37
|
+
...i
|
|
38
38
|
}) {
|
|
39
|
-
return /* @__PURE__ */
|
|
39
|
+
return /* @__PURE__ */ t(
|
|
40
40
|
a,
|
|
41
41
|
{
|
|
42
42
|
className: n(
|
|
43
43
|
"mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
|
|
44
44
|
e
|
|
45
45
|
),
|
|
46
|
-
...
|
|
46
|
+
...i
|
|
47
47
|
}
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
g as Tabs,
|
|
52
52
|
l as TabsContent,
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
b as TabsList,
|
|
54
|
+
d as TabsTrigger
|
|
55
55
|
};
|
|
56
56
|
//# sourceMappingURL=tabs.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.es.js","sources":["../../../lib/components/ui/tabs.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport function TabsList({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n\treturn (\n\t\t<TabsPrimitive.List\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex h-9 items-center justify-center bg-background p-1 text-muted-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function TabsTrigger({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n\treturn (\n\t\t<TabsPrimitive.Trigger\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex items-center justify-center whitespace-nowrap px-3 py-1 body font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground
|
|
1
|
+
{"version":3,"file":"tabs.es.js","sources":["../../../lib/components/ui/tabs.tsx"],"sourcesContent":["import * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nexport const Tabs = TabsPrimitive.Root;\n\nexport function TabsList({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n\treturn (\n\t\t<TabsPrimitive.List\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex h-9 items-center justify-center bg-background p-1 text-muted-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport function TabsTrigger({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n\treturn (\n\t\t<TabsPrimitive.Trigger\n\t\t\tclassName={cn(\n\t\t\t\t\"inline-flex items-center justify-center whitespace-nowrap px-3 py-1 body font-medium ring-offset-background transition-all focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n};\n\nexport function TabsContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n\treturn (\n\t\t<TabsPrimitive.Content\n\t\t\tclassName={cn(\n\t\t\t\t\"mt-2 ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}"],"names":["Tabs","TabsPrimitive.Root","TabsList","className","props","jsx","TabsPrimitive.List","cn","TabsTrigger","TabsPrimitive.Trigger","TabsContent","TabsPrimitive.Content"],"mappings":";;;AAKO,MAAMA,IAAOC;AAEb,SAASC,EAAS;AAAA,EACxB,WAAAC;AAAA,EACA,GAAGC;AACJ,GAAoD;AAElD,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACA,WAAWC;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASI,EAAY;AAAA,EAC3B,WAAAL;AAAA,EACA,GAAGC;AACJ,GAAuD;AAErD,SAAA,gBAAAC;AAAA,IAACI;AAAAA,IAAA;AAAA,MACA,WAAWF;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;AAEO,SAASM,EAAY;AAAA,EAC3B,WAAAP;AAAA,EACA,GAAGC;AACJ,GAAuD;AAErD,SAAA,gBAAAC;AAAA,IAACM;AAAAA,IAAA;AAAA,MACA,WAAWJ;AAAA,QACV;AAAA,QACAJ;AAAA,MACD;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EACL;AAEF;"}
|
package/dist/index.es.d.ts
CHANGED
|
@@ -499,10 +499,10 @@ declare const sheetVariants: (props?: ({
|
|
|
499
499
|
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
500
500
|
} & ClassProp) | undefined) => string;
|
|
501
501
|
|
|
502
|
-
|
|
503
|
-
|
|
502
|
+
/** Always set a height on this element */
|
|
503
|
+
export declare function Sidebar({ variant, collapsible, className, children, ...props }: React_2.ComponentProps<"div"> & {
|
|
504
504
|
variant?: "sidebar" | "floating" | "inset";
|
|
505
|
-
collapsible?: "offcanvas" | "none";
|
|
505
|
+
collapsible?: "offcanvas" | "icon" | "none";
|
|
506
506
|
}): JSX.Element;
|
|
507
507
|
|
|
508
508
|
export declare function SidebarContent({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
|
package/lib/utilities.css
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
|
|
42
42
|
/* A base set of classes for elements that can be clicked */
|
|
43
43
|
@utility btn {
|
|
44
|
-
@apply cursor-pointer ring-offset-background
|
|
44
|
+
@apply cursor-pointer ring-offset-background focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring leading-none no-underline whitespace-nowrap select-none disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50;
|
|
45
45
|
}
|
|
46
46
|
@utility btn-primary {
|
|
47
47
|
@apply bg-primary text-primary-foreground hover:bg-primary/80 focus:bg-primary/80;
|