@alkimi.org/ui-kit 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-4YTBKYYK.js → chunk-45I67HWX.js} +2 -2
- package/dist/{chunk-4YTBKYYK.js.map → chunk-45I67HWX.js.map} +1 -1
- package/dist/{chunk-DJHDJF5E.mjs → chunk-C6JJOMDI.mjs} +2 -2
- package/dist/chunk-IHBEMOHH.js +3 -0
- package/dist/{chunk-HKNXZWMV.js.map → chunk-IHBEMOHH.js.map} +1 -1
- package/dist/{chunk-WKZFO6I3.js → chunk-JDEHKZJE.js} +2 -2
- package/dist/{chunk-WKZFO6I3.js.map → chunk-JDEHKZJE.js.map} +1 -1
- package/dist/{chunk-ORCCYZMU.js → chunk-N27CBV5S.js} +2 -2
- package/dist/chunk-N27CBV5S.js.map +1 -0
- package/dist/chunk-NADDRUK4.mjs +3 -0
- package/dist/chunk-NADDRUK4.mjs.map +1 -0
- package/dist/{chunk-4D3HVOPZ.mjs → chunk-S2H6HVK3.mjs} +2 -2
- package/dist/chunk-UOHFERPQ.mjs +3 -0
- package/dist/{chunk-YARQS22V.mjs.map → chunk-UOHFERPQ.mjs.map} +1 -1
- package/dist/components/button.d.mts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/combobox.mjs +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/command.mjs +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dialog.mjs +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/sidebar.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-HFPE6JXI.mjs +0 -3
- package/dist/chunk-HFPE6JXI.mjs.map +0 -1
- package/dist/chunk-HKNXZWMV.js +0 -3
- package/dist/chunk-ORCCYZMU.js.map +0 -1
- package/dist/chunk-YARQS22V.mjs +0 -3
- /package/dist/{chunk-DJHDJF5E.mjs.map → chunk-C6JJOMDI.mjs.map} +0 -0
- /package/dist/{chunk-4D3HVOPZ.mjs.map → chunk-S2H6HVK3.mjs.map} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";
|
|
2
|
-
var
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
var _chunkN27CBV5Sjs = require('./chunk-N27CBV5S.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var d = _interopRequireWildcard(_react);var _cmdk = require('cmdk');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var p=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));p.displayName=_cmdk.Command.displayName;var P=({children:e,...t})=>_jsxruntime.jsx.call(void 0, _chunkN27CBV5Sjs.a,{...t,children:_jsxruntime.jsx.call(void 0, _chunkN27CBV5Sjs.f,{className:"overflow-hidden p-0 shadow-lg",children:_jsxruntime.jsx.call(void 0, p,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),c= exports.c =d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _lucidereact.Search,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));c.displayName=_cmdk.Command.Input.displayName;var f=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));f.displayName=_cmdk.Command.List.displayName;var l=d.forwardRef((e,t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));l.displayName=_cmdk.Command.Empty.displayName;var u=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));u.displayName=_cmdk.Command.Group.displayName;var g=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "-mx-1 h-px bg-border",e),...t}));g.displayName=_cmdk.Command.Separator.displayName;var y=d.forwardRef(({className:e,...t},a)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:a,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate",e),...t}));y.displayName=_cmdk.Command.Item.displayName;var R=({className:e,...t})=>_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, "ml-auto text-xs tracking-widest text-muted-foreground",e),...t});R.displayName="CommandShortcut";exports.a = p; exports.b = P; exports.c = c; exports.d = f; exports.e = l; exports.f = u; exports.g = g; exports.h = y; exports.i = R;
|
|
3
|
+
//# sourceMappingURL=chunk-45I67HWX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-45I67HWX.js","../src/components/command.tsx"],"names":["Command","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","Search","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":"AAAA,uWAAY;AACZ,sDAA8C,sDAAwC,uECD/D,4BAEqB,2CACrB,+CASrB,IAJIA,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAGpB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,aAACC,CAAA,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,gCAAAA,2FACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CACDF,CAAAA,CAAQ,WAAA,CAAcK,aAAAA,CAAiB,WAAA,CAIvC,IAAME,CAAAA,CAAgB,CAAC,CAAE,QAAA,CAAAC,CAAAA,CAAU,GAAGN,CAAM,CAAA,CAAA,EAExCE,6BAAAA,kBAACK,CAAA,CAAQ,GAAGP,CAAAA,CACV,QAAA,CAAAE,6BAA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,CACA,GAAGC,CACL,CAAA,CAAA,EAEIE,6BAAAA,MAAC,CAAA,CACC,SAAA,CAAWE,gCAAAA,uDACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CAAA,CAGJiB,CAAAA,CAAgB,WAAA,CAAc,iBAAA,CAAA,sIAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-45I67HWX.js","sourcesContent":[null,"import * as React from \"react\"\nimport { type DialogProps } from \"@radix-ui/react-dialog\"\nimport { Command as CommandPrimitive } from \"cmdk\"\nimport { Search } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Dialog, DialogContent } from \"@/components/dialog\"\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ninterface CommandDialogProps extends DialogProps {}\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = \"CommandShortcut\"\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as i,f as n}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as i,f as n}from"./chunk-NADDRUK4.mjs";import{a as r}from"./chunk-S5TKCF6T.mjs";import*as d from"react";import{Command as o}from"cmdk";import{Search as s}from"lucide-react";import{jsx as m,jsxs as C}from"react/jsx-runtime";var p=d.forwardRef(({className:e,...t},a)=>m(o,{ref:a,className:r("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));p.displayName=o.displayName;var P=({children:e,...t})=>m(i,{...t,children:m(n,{className:"overflow-hidden p-0 shadow-lg",children:m(p,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),c=d.forwardRef(({className:e,...t},a)=>C("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[m(s,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),m(o.Input,{ref:a,className:r("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));c.displayName=o.Input.displayName;var f=d.forwardRef(({className:e,...t},a)=>m(o.List,{ref:a,className:r("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));f.displayName=o.List.displayName;var l=d.forwardRef((e,t)=>m(o.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));l.displayName=o.Empty.displayName;var u=d.forwardRef(({className:e,...t},a)=>m(o.Group,{ref:a,className:r("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));u.displayName=o.Group.displayName;var g=d.forwardRef(({className:e,...t},a)=>m(o.Separator,{ref:a,className:r("-mx-1 h-px bg-border",e),...t}));g.displayName=o.Separator.displayName;var y=d.forwardRef(({className:e,...t},a)=>m(o.Item,{ref:a,className:r("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-muted aria-selected:text-secondary-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 truncate",e),...t}));y.displayName=o.Item.displayName;var R=({className:e,...t})=>m("span",{className:r("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});R.displayName="CommandShortcut";export{p as a,P as b,c,f as d,l as e,u as f,g,y as h,R as i};
|
|
3
|
+
//# sourceMappingURL=chunk-C6JJOMDI.mjs.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
+
var _chunkB7XXLTYNjs = require('./chunk-B7XXLTYN.js');var _chunk7SOZ6MOVjs = require('./chunk-7SOZ6MOV.js');var _chunk752ERCMUjs = require('./chunk-752ERCMU.js');var _chunk5L5DM2X5js = require('./chunk-5L5DM2X5.js');var _chunkRA5BKFITjs = require('./chunk-RA5BKFIT.js');var _chunkQKOZTOYUjs = require('./chunk-QKOZTOYU.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var Q="sidebar_state",Z=3600*24*7,ee="16.75rem",V="23rem",ae="calc(3rem + 0.75rem)",te="b",j=t.createContext(null);function C(){let e=t.useContext(j);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var re=t.forwardRef(({defaultOpen:e=!0,open:a,onOpenChange:r,className:i,style:s,children:d,...u},l)=>{let[h,m]=t.useState(!1),[c,g]=t.useState(e),[S,w]=t.useState(!1),[x,N]=t.useState(e),R=_nullishCoalesce(a, () => (x)),f=t.useCallback(p=>{let v=typeof p=="function"?p(R):p;r?r(v):N(v),document.cookie=`${Q}=${v}; path=/; max-age=${Z}`},[r,R]),M=t.useCallback(()=>{f(p=>!p)},[f]),I=t.useCallback(()=>{m(p=>!p)},[m]);t.useEffect(()=>{let p=v=>{v.key===te&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),M())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[M]);let L=R?"expanded":"collapsed",U=t.useMemo(()=>({state:L,isOpen:c,setOpen:f,openMobile:h,setOpenMobile:m,toggleSidebar:M,toggleMobileSidebar:I,setIsFullyOpen:g,isAnimating:S,setIsAnimating:w}),[L,c,f,h,m,M,I,g,S,w]);return _jsxruntime.jsx.call(void 0, j.Provider,{value:U,children:_jsxruntime.jsx.call(void 0, _chunkB7XXLTYNjs.a,{delayDuration:0,children:_jsxruntime.jsx.call(void 0, "div",{style:{"--sidebar-width":ee,"--sidebar-width-icon":ae,...s},className:_chunkFUYXCJOQjs.a.call(void 0, "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),ref:l,...u,children:d})})})});re.displayName="SidebarProvider";var oe=t.forwardRef(({side:e="left",variant:a="sidebar",collapsible:r="offcanvas",className:i,children:s,...d},u)=>{let{state:l,openMobile:h,setOpenMobile:m,setIsFullyOpen:c,setIsAnimating:g}=C(),S=t.useRef(null),w=t.useRef(!0);return t.useEffect(()=>{let x=S.current;if(!x)return;if(w.current){w.current=!1,c(l==="expanded"),g(!1);return}g(!0);let N=setTimeout(()=>{c(l==="expanded"),g(!1)},300),R=f=>{f.target===x&&(f.propertyName==="left"||f.propertyName==="right"||f.propertyName==="width")&&(clearTimeout(N),c(l==="expanded"),g(!1))};return x.addEventListener("transitionend",R),()=>{x.removeEventListener("transitionend",R),clearTimeout(N)}},[l,c,g]),r==="none"?_jsxruntime.jsx.call(void 0, "aside",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:u,...d,children:s}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.a,{open:h,onOpenChange:m,children:_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.f,{"data-sidebar":"sidebar","data-mobile":"true",className:"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{width:V,maxWidth:V},side:e,children:[_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.g,{className:"sr-only",children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.i,{children:"Sidebar"}),_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.j,{children:"Displays the mobile sidebar."})]}),_jsxruntime.jsx.call(void 0, "div",{className:"flex h-full w-full flex-col",children:s})]})}),_jsxruntime.jsxs.call(void 0, "aside",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":a,"data-side":e,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),_jsxruntime.jsx.call(void 0, "div",{ref:S,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",i),...d,children:_jsxruntime.jsx.call(void 0, "div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full",children:s})})})]})]})});oe.displayName="Sidebar";var W=t.forwardRef(({className:e,onClick:a,...r},i)=>{let{toggleSidebar:s,toggleMobileSidebar:d,openMobile:u}=C();return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, _chunkQKOZTOYUjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "md:hidden bg-transparent hover:bg-transparent",e),onClick:l=>{_optionalChain([a, 'optionalCall', _2 => _2(l)]),d()},...r,children:[u?_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunkQKOZTOYUjs.a.call(void 0, {variant:"secondary",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.X,{size:16})}):_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunkQKOZTOYUjs.a.call(void 0, {variant:"outline",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.Menu,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]}),_jsxruntime.jsxs.call(void 0, _chunkQKOZTOYUjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent",e),onClick:l=>{_optionalChain([a, 'optionalCall', _3 => _3(l)]),s()},...r,children:[_jsxruntime.jsx.call(void 0, "span",{className:"rounded-full hover:bg-secondary p-2",children:_jsxruntime.jsx.call(void 0, _lucidereact.PanelLeft,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]})]})});W.displayName="SidebarTrigger";var ne=t.forwardRef(({className:e,...a},r)=>{let{toggleSidebar:i}=C();return _jsxruntime.jsx.call(void 0, "button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:_chunkFUYXCJOQjs.a.call(void 0, "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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})});ne.displayName="SidebarRail";var ie=t.memo(t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "main",{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...a})));ie.displayName="SidebarInset";var se=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, _chunkRA5BKFITjs.a,{ref:r,"data-sidebar":"input",className:_chunkFUYXCJOQjs.a.call(void 0, "h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...a}));se.displayName="SidebarInput";var de=t.forwardRef(({className:e,showTrigger:a=!1,children:r,...i},s)=>{let{state:d}=C();return _jsxruntime.jsxs.call(void 0, "div",{ref:s,"data-sidebar":"header",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full gap-2 p-2",d==="collapsed"?"justify-center items-center":"justify-between items-start",e),...i,children:[d!=="collapsed"&&_jsxruntime.jsx.call(void 0, "div",{className:"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden",children:_jsxruntime.jsx.call(void 0, "div",{className:"whitespace-nowrap",children:r})}),a&&_jsxruntime.jsx.call(void 0, W,{})]})});de.displayName="SidebarHeader";var le=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-2",e),...a}));le.displayName="SidebarFooter";var ce=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, _chunk7SOZ6MOVjs.a,{ref:r,"data-sidebar":"separator",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-2 w-auto bg-border",e),...a}));ce.displayName="SidebarSeparator";var pe=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"content",className:_chunkFUYXCJOQjs.a.call(void 0, "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2",e),...a}));pe.displayName="SidebarContent";var be=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group",className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",e),...a}));be.displayName="SidebarGroup";var ue=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"div",{ref:i,"data-sidebar":"group-label",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r}));ue.displayName="SidebarGroupLabel";var fe=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"button",{ref:i,"data-sidebar":"group-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r}));fe.displayName="SidebarGroupAction";var me=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group-content",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full text-sm",e),...a}));me.displayName="SidebarGroupContent";var ge=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full min-w-0 flex-col gap-1",e),...a}));ge.displayName="SidebarMenu";var ve=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "li",{ref:r,"data-sidebar":"menu-item",className:_chunkFUYXCJOQjs.a.call(void 0, "group/menu-item relative",e),...a}));ve.displayName="SidebarMenuItem";var he=_classvarianceauthority.cva.call(void 0, "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground",outline:"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),xe= exports.r =t.forwardRef(({asChild:e=!1,isActive:a=!1,variant:r="default",size:i="default",tooltip:s,className:d,...u},l)=>{let h=e?_reactslot.Slot:"button",{state:m}=C(),c=_jsxruntime.jsx.call(void 0, h,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":a,className:_chunkFUYXCJOQjs.a.call(void 0, he({variant:r,size:i}),d),...u});return s?(typeof s=="string"&&(s={children:s}),_jsxruntime.jsxs.call(void 0, _chunkB7XXLTYNjs.b,{children:[_jsxruntime.jsx.call(void 0, _chunkB7XXLTYNjs.c,{asChild:!0,children:c}),_jsxruntime.jsx.call(void 0, _chunkB7XXLTYNjs.d,{side:"right",align:"center",hidden:m!=="collapsed",...s})]})):c});xe.displayName="SidebarMenuButton";var Re=t.forwardRef(({className:e,asChild:a=!1,showOnHover:r=!1,...i},s)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",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-base-accent-foreground md:opacity-0",e),...i}));Re.displayName="SidebarMenuAction";var Se=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"menu-badge",className:_chunkFUYXCJOQjs.a.call(void 0, "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...a}));Se.displayName="SidebarMenuBadge";var we=t.forwardRef(({className:e,showIcon:a=!1,...r},i)=>{let s=t.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return _jsxruntime.jsxs.call(void 0, "div",{ref:i,"data-sidebar":"menu-skeleton",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[a&&_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});we.displayName="SidebarMenuSkeleton";var ye=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu-sub",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...a}));ye.displayName="SidebarMenuSub";var Ce=t.forwardRef(({...e},a)=>_jsxruntime.jsx.call(void 0, "li",{ref:a,...e}));Ce.displayName="SidebarMenuSubItem";var Ne=t.forwardRef(({asChild:e=!1,size:a="md",isActive:r,className:i,...s},d)=>_jsxruntime.jsx.call(void 0, e?_reactslot.Slot:"a",{ref:d,"data-sidebar":"menu-sub-button","data-size":a,"data-active":r,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));Ne.displayName="SidebarMenuSubButton";exports.a = C; exports.b = re; exports.c = oe; exports.d = W; exports.e = ne; exports.f = ie; exports.g = se; exports.h = de; exports.i = le; exports.j = ce; exports.k = pe; exports.l = be; exports.m = ue; exports.n = fe; exports.o = me; exports.p = ge; exports.q = ve; exports.r = xe; exports.s = Re; exports.t = Se; exports.u = we; exports.v = ye; exports.w = Ce; exports.x = Ne;
|
|
3
|
+
//# sourceMappingURL=chunk-IHBEMOHH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-HKNXZWMV.js","../src/components/sidebar.tsx"],"names":["SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","ref","openMobile","setOpenMobile","isFullyOpen","setIsFullyOpen","isAnimating","setIsAnimating","_open","_setOpen","open","setOpen","value","openState"],"mappings":"AAAA,+8BAAY;AACZ,sDAA4D,sDAAwC,sDAAoE,sDAAwC,sDAAwC,sDAA+C,sDAAwC,uECCxT,iDACF,kEACkB,2CACJ,+CAmJzB,IA9HJA,CAAAA,CAAsB,eAAA,CACtBC,CAAAA,CAAyB,IAAA,CAAU,EAAA,CAAK,CAAA,CACxCC,EAAAA,CAAgB,UAAA,CAChBC,CAAAA,CAAuB,OAAA,CACvBC,EAAAA,CAAqB,sBAAA,CACrBC,EAAAA,CAA4B,GAAA,CAe5BC,CAAAA,CAAuB,CAAA,CAAA,aAAA,CAA0C,IAAI,CAAA,CAE3E,SAASC,CAAAA,CAAAA,CAAa,CACpB,IAAMC,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAAWF,CAAc,CAAA,CAC/C,EAAA,CAAI,CAACE,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,mDAAmD,CAAA,CAGrE,OAAOA,CACT,CAEA,IAAMC,EAAAA,CAAwB,CAAA,CAAA,UAAA,CAQ5B,CACE,CACE,WAAA,CAAAC,CAAAA,CAAc,CAAA,CAAA,CACd,IAAA,CAAMC,CAAAA,CACN,YAAA,CAAcC,CAAAA,CACd,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAClD,CAACC,CAAAA,CAAaC,CAAc,CAAA,CAAU,CAAA,CAAA,QAAA,CAASX,CAAW,CAAA,CAC1D,CAACY,CAAAA,CAAaC,CAAc,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAEpD,CAACC,CAAAA,CAAOC,CAAQ,CAAA,CAAU,CAAA,CAAA,QAAA,CAASf,CAAW,CAAA,CAC9CgB,CAAAA,kBAAOf,CAAAA,SAAYa,GAAAA,CACnBG,CAAAA,CAAgB,CAAA,CAAA,WAAA,CACnBC,CAAAA,EAAmD,CAClD,IAAMC,CAAAA,CAAY,OAAOD,CAAAA,EAAU,UAAA,CAAaA,CAAAA,CAAMF,CAAI,CAAA,CAAIE,CAAAA,CAC1DhB,CAAAA,CACFA,CAAAA,CAAYiB,CAAS,CAAA,CAErBJ,CAAAA,CAASI,CAAS,CAAA,CAGpB,QAAA,CAAS,MAAA,CAAS,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-HKNXZWMV.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft, X, Menu } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { Input } from \"@/components/input\"\nimport { Separator } from \"@/components/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/sheet\"\nimport { Skeleton } from \"@/components/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16.75rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"23rem\"\nconst SIDEBAR_WIDTH_ICON = \"calc(3rem + 0.75rem)\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n isOpen: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n toggleSidebar: () => void\n toggleMobileSidebar: () => void\n setIsFullyOpen: (open: boolean) => void\n isAnimating: boolean\n setIsAnimating: (animating: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isFullyOpen, setIsFullyOpen] = React.useState(defaultOpen)\n const [isAnimating, setIsAnimating] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n const toggleSidebar = React.useCallback(() => {\n setOpen((open) => !open)\n }, [setOpen])\n\n const toggleMobileSidebar = React.useCallback(() => {\n setOpenMobile((open) => !open)\n }, [setOpenMobile])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n isOpen: isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n }),\n [\n state,\n isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n ]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst Sidebar = React.forwardRef<\n HTMLElement,\n React.ComponentProps<\"aside\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { state, openMobile, setOpenMobile, setIsFullyOpen, setIsAnimating } =\n useSidebar()\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const isFirstRenderRef = React.useRef(true)\n\n // Track when the sidebar animation completes\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!sidebar) return\n\n // On first render, set isFullyOpen immediately without waiting for animation\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false\n setIsFullyOpen(state === \"expanded\")\n return\n }\n\n // Mark as animating when state changes\n setIsAnimating(true)\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n // Only respond to transitions on the sidebar itself, not children\n if (event.target !== sidebar) return\n\n // Check if we're transitioning width, left, or right properties\n if (\n event.propertyName === \"left\" ||\n event.propertyName === \"right\" ||\n event.propertyName === \"width\"\n ) {\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }\n }\n\n sidebar.addEventListener(\"transitionend\", handleTransitionEnd)\n return () =>\n sidebar.removeEventListener(\"transitionend\", handleTransitionEnd)\n }, [state, setIsFullyOpen, setIsAnimating])\n\n if (collapsible === \"none\") {\n return (\n <aside\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </aside>\n )\n }\n\n return (\n <>\n {/* Mobile Sheet - visible only on mobile (< md) */}\n <Sheet open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n width: SIDEBAR_WIDTH_MOBILE,\n maxWidth: SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n\n {/* Desktop Sidebar - visible only on desktop (md+) */}\n <aside\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n <div\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n ref={sidebarRef}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n <div className=\"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full\">\n {children}\n </div>\n </div>\n </div>\n </aside>\n </>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar, toggleMobileSidebar, openMobile } = useSidebar()\n\n return (\n <>\n {/* Mobile trigger - visible only on mobile (< md) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"md:hidden bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleMobileSidebar()\n }}\n {...props}\n >\n {openMobile ? (\n <span\n className={cn(\n buttonVariants({ variant: \"secondary\", size: \"icon\" })\n )}\n >\n <X size={16} />\n </span>\n ) : (\n <span\n className={cn(buttonVariants({ variant: \"outline\", size: \"icon\" }))}\n >\n <Menu size={16} />\n </span>\n )}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n {/* Desktop trigger - visible only on desktop (md+) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <span className=\"rounded-full hover:bg-secondary p-2\">\n <PanelLeft size={16} />\n </span>\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n </>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.memo(\n React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex w-full flex-1 flex-col\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n }\n )\n)\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n React.ElementRef<typeof Input>,\n React.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showTrigger?: boolean\n }\n>(({ className, showTrigger = false, children, ...props }, ref) => {\n const { state } = useSidebar()\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\n \"flex w-full gap-2 p-2\",\n state === \"collapsed\"\n ? \"justify-center items-center\"\n : \"justify-between items-start\",\n className\n )}\n {...props}\n >\n {state !== \"collapsed\" && (\n <div className=\"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden\">\n <div className=\"whitespace-nowrap\">{children}</div>\n </div>\n )}\n\n {showTrigger && <SidebarTrigger />}\n </div>\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\n \"relative flex w-full min-w-0 flex-col\",\n \"group-data-[collapsible=icon]:p-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\"}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"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-base-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 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 \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-IHBEMOHH.js","../src/components/sidebar.tsx"],"names":["SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","ref","openMobile","setOpenMobile","isFullyOpen","setIsFullyOpen","isAnimating","setIsAnimating","_open","_setOpen","open","setOpen","value","openState"],"mappings":"AAAA,+8BAAY;AACZ,sDAA4D,sDAAwC,sDAAoE,sDAAwC,sDAAwC,sDAA+C,sDAAwC,uECCxT,iDACF,kEACkB,2CACJ,+CAmJzB,IA9HJA,CAAAA,CAAsB,eAAA,CACtBC,CAAAA,CAAyB,IAAA,CAAU,EAAA,CAAK,CAAA,CACxCC,EAAAA,CAAgB,UAAA,CAChBC,CAAAA,CAAuB,OAAA,CACvBC,EAAAA,CAAqB,sBAAA,CACrBC,EAAAA,CAA4B,GAAA,CAe5BC,CAAAA,CAAuB,CAAA,CAAA,aAAA,CAA0C,IAAI,CAAA,CAE3E,SAASC,CAAAA,CAAAA,CAAa,CACpB,IAAMC,CAAAA,CAAgB,CAAA,CAAA,UAAA,CAAWF,CAAc,CAAA,CAC/C,EAAA,CAAI,CAACE,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,mDAAmD,CAAA,CAGrE,OAAOA,CACT,CAEA,IAAMC,EAAAA,CAAwB,CAAA,CAAA,UAAA,CAQ5B,CACE,CACE,WAAA,CAAAC,CAAAA,CAAc,CAAA,CAAA,CACd,IAAA,CAAMC,CAAAA,CACN,YAAA,CAAcC,CAAAA,CACd,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EACG,CACH,GAAM,CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAClD,CAACC,CAAAA,CAAaC,CAAc,CAAA,CAAU,CAAA,CAAA,QAAA,CAASX,CAAW,CAAA,CAC1D,CAACY,CAAAA,CAAaC,CAAc,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAEpD,CAACC,CAAAA,CAAOC,CAAQ,CAAA,CAAU,CAAA,CAAA,QAAA,CAASf,CAAW,CAAA,CAC9CgB,CAAAA,kBAAOf,CAAAA,SAAYa,GAAAA,CACnBG,CAAAA,CAAgB,CAAA,CAAA,WAAA,CACnBC,CAAAA,EAAmD,CAClD,IAAMC,CAAAA,CAAY,OAAOD,CAAAA,EAAU,UAAA,CAAaA,CAAAA,CAAMF,CAAI,CAAA,CAAIE,CAAAA,CAC1DhB,CAAAA,CACFA,CAAAA,CAAYiB,CAAS,CAAA,CAErBJ,CAAAA,CAASI,CAAS,CAAA,CAGpB,QAAA,CAAS,MAAA,CAAS,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-IHBEMOHH.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft, X, Menu } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { Input } from \"@/components/input\"\nimport { Separator } from \"@/components/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/sheet\"\nimport { Skeleton } from \"@/components/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16.75rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"23rem\"\nconst SIDEBAR_WIDTH_ICON = \"calc(3rem + 0.75rem)\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n isOpen: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n toggleSidebar: () => void\n toggleMobileSidebar: () => void\n setIsFullyOpen: (open: boolean) => void\n isAnimating: boolean\n setIsAnimating: (animating: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isFullyOpen, setIsFullyOpen] = React.useState(defaultOpen)\n const [isAnimating, setIsAnimating] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n const toggleSidebar = React.useCallback(() => {\n setOpen((open) => !open)\n }, [setOpen])\n\n const toggleMobileSidebar = React.useCallback(() => {\n setOpenMobile((open) => !open)\n }, [setOpenMobile])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n isOpen: isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n }),\n [\n state,\n isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n ]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst Sidebar = React.forwardRef<\n HTMLElement,\n React.ComponentProps<\"aside\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { state, openMobile, setOpenMobile, setIsFullyOpen, setIsAnimating } =\n useSidebar()\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const isFirstRenderRef = React.useRef(true)\n\n // Track when the sidebar animation completes\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!sidebar) return\n\n // On first render, set isFullyOpen immediately without waiting for animation\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n return\n }\n\n // Mark as animating when state changes\n setIsAnimating(true)\n\n // Fallback timeout in case transitionend doesn't fire\n const fallbackTimeout = setTimeout(() => {\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }, 300) // Slightly longer than the 200ms transition duration\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n // Only respond to transitions on the sidebar itself, not children\n if (event.target !== sidebar) return\n\n // Check if we're transitioning width, left, or right properties\n if (\n event.propertyName === \"left\" ||\n event.propertyName === \"right\" ||\n event.propertyName === \"width\"\n ) {\n clearTimeout(fallbackTimeout)\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }\n }\n\n sidebar.addEventListener(\"transitionend\", handleTransitionEnd)\n return () => {\n sidebar.removeEventListener(\"transitionend\", handleTransitionEnd)\n clearTimeout(fallbackTimeout)\n }\n }, [state, setIsFullyOpen, setIsAnimating])\n\n if (collapsible === \"none\") {\n return (\n <aside\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </aside>\n )\n }\n\n return (\n <>\n {/* Mobile Sheet - visible only on mobile (< md) */}\n <Sheet open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n width: SIDEBAR_WIDTH_MOBILE,\n maxWidth: SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n\n {/* Desktop Sidebar - visible only on desktop (md+) */}\n <aside\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n <div\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n ref={sidebarRef}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n <div className=\"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full\">\n {children}\n </div>\n </div>\n </div>\n </aside>\n </>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar, toggleMobileSidebar, openMobile } = useSidebar()\n\n return (\n <>\n {/* Mobile trigger - visible only on mobile (< md) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"md:hidden bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleMobileSidebar()\n }}\n {...props}\n >\n {openMobile ? (\n <span\n className={cn(\n buttonVariants({ variant: \"secondary\", size: \"icon\" })\n )}\n >\n <X size={16} />\n </span>\n ) : (\n <span\n className={cn(buttonVariants({ variant: \"outline\", size: \"icon\" }))}\n >\n <Menu size={16} />\n </span>\n )}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n {/* Desktop trigger - visible only on desktop (md+) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <span className=\"rounded-full hover:bg-secondary p-2\">\n <PanelLeft size={16} />\n </span>\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n </>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.memo(\n React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex w-full flex-1 flex-col\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n }\n )\n)\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n React.ElementRef<typeof Input>,\n React.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showTrigger?: boolean\n }\n>(({ className, showTrigger = false, children, ...props }, ref) => {\n const { state } = useSidebar()\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\n \"flex w-full gap-2 p-2\",\n state === \"collapsed\"\n ? \"justify-center items-center\"\n : \"justify-between items-start\",\n className\n )}\n {...props}\n >\n {state !== \"collapsed\" && (\n <div className=\"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden\">\n <div className=\"whitespace-nowrap\">{children}</div>\n </div>\n )}\n\n {showTrigger && <SidebarTrigger />}\n </div>\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\n \"relative flex w-full min-w-0 flex-col\",\n \"group-data-[collapsible=icon]:p-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\"}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"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-base-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 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 \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
var _chunkULIOO55Ijs = require('./chunk-ULIOO55I.js');var
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
var _chunkULIOO55Ijs = require('./chunk-ULIOO55I.js');var _chunk45I67HWXjs = require('./chunk-45I67HWX.js');var _chunkQKOZTOYUjs = require('./chunk-QKOZTOYU.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var S = _interopRequireWildcard(_react);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');function J({options:l,value:i,onValueChange:k,placeholder:d="Select option...",searchPlaceholder:R="Search...",emptyMessage:D="No option found.",disabled:E=!1,className:I,error:T=!1,multiple:r=!1,values:n=[],onValuesChange:p}){let[g,u]=S.useState(!1),v=l.find(e=>e.value===i),s=l.filter(e=>n.includes(e.value)),B=e=>{if(r){let t=n.includes(e)?n.filter(m=>m!==e):[...n,e];_optionalChain([p, 'optionalCall', _ => _(t)])}else _optionalChain([k, 'optionalCall', _2 => _2(e===i?"":e)]),u(!1)},G=(e,t)=>{t.preventDefault(),t.stopPropagation();let m=n.filter(M=>M!==e);_optionalChain([p, 'optionalCall', _3 => _3(m)])},L=()=>r?s.length===0?d:s.length===1?s[0].label:`${s.length} selected`:v?v.label:d;return _jsxruntime.jsxs.call(void 0, _chunkULIOO55Ijs.a,{open:g,onOpenChange:u,children:[_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkQKOZTOYUjs.b,{variant:"outline",role:"combobox","aria-expanded":g,disabled:E,className:_chunkFUYXCJOQjs.a.call(void 0, "w-full justify-between",T&&"border-destructive-foreground focus-visible:ring-destructive-foreground",I),children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:L()}),_jsxruntime.jsx.call(void 0, _lucidereact.ChevronDown,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),_jsxruntime.jsx.call(void 0, _chunkULIOO55Ijs.c,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:_jsxruntime.jsxs.call(void 0, _chunk45I67HWXjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunk45I67HWXjs.c,{placeholder:R}),_jsxruntime.jsxs.call(void 0, _chunk45I67HWXjs.d,{children:[_jsxruntime.jsx.call(void 0, _chunk45I67HWXjs.e,{children:D}),_jsxruntime.jsxs.call(void 0, _chunk45I67HWXjs.f,{children:[r&&s.length>0&&_jsxruntime.jsx.call(void 0, "div",{className:"px-2 py-1.5",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-wrap gap-1",children:s.map(e=>_jsxruntime.jsxs.call(void 0, "div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label}),_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:t=>G(e.value,t)})]},e.value))})}),l.map(e=>{let t=r?n.includes(e.value):i===e.value;return _jsxruntime.jsxs.call(void 0, _chunk45I67HWXjs.h,{value:e.value,onSelect:B,children:[_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:_chunkFUYXCJOQjs.a.call(void 0, "mr-2 h-4 w-4",t?"opacity-100":"opacity-0")}),_jsxruntime.jsx.call(void 0, "span",{className:"truncate",children:e.label})]},e.value)})]})]})]})})]})}exports.a = J;
|
|
3
|
+
//# sourceMappingURL=chunk-JDEHKZJE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-JDEHKZJE.js","../src/components/combobox.tsx"],"names":["Combobox","options","value","onValueChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","multiple","values","onValuesChange","open","setOpen","selectedOption","option","selectedOptions","handleSelect","currentValue","newValues","v","handleRemoveValue","valueToRemove","e","getDisplayText"],"mappings":"AAAA,22BAAY;AACZ,sDAAqD,sDAA2E,sDAAwC,sDAAwC,uECDzL,2CACe,+CAoF9B,SAlDQA,CAAAA,CAAS,CACvB,OAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,kBAAA,CACd,iBAAA,CAAAC,CAAAA,CAAoB,WAAA,CACpB,YAAA,CAAAC,CAAAA,CAAe,kBAAA,CACf,QAAA,CAAAC,CAAAA,CAAW,CAAA,CAAA,CACX,SAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,CAAA,CAAA,CACR,QAAA,CAAAC,CAAAA,CAAW,CAAA,CAAA,CACX,MAAA,CAAAC,CAAAA,CAAS,CAAC,CAAA,CACV,cAAA,CAAAC,CACF,CAAA,CAAkB,CAChB,GAAM,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAEtCC,CAAAA,CAAiBd,CAAAA,CAAQ,IAAA,CAAMe,CAAAA,EAAWA,CAAAA,CAAO,KAAA,GAAUd,CAAK,CAAA,CAChEe,CAAAA,CAAkBhB,CAAAA,CAAQ,MAAA,CAAQe,CAAAA,EAAWL,CAAAA,CAAO,QAAA,CAASK,CAAAA,CAAO,KAAK,CAAC,CAAA,CAE1EE,CAAAA,CAAgBC,CAAAA,EAAyB,CAC7C,EAAA,CAAIT,CAAAA,CAAU,CACZ,IAAMU,CAAAA,CAAYT,CAAAA,CAAO,QAAA,CAASQ,CAAY,CAAA,CAC1CR,CAAAA,CAAO,MAAA,CAAQU,CAAAA,EAAMA,CAAAA,GAAMF,CAAY,CAAA,CACvC,CAAC,GAAGR,CAAAA,CAAQQ,CAAY,CAAA,iBAC5BP,CAAAA,wBAAAA,CAAiBQ,CAAS,GAC5B,CAAA,qBACEjB,CAAAA,0BAAAA,CAAgBgB,CAAAA,GAAiBjB,CAAAA,CAAQ,EAAA,CAAKiB,CAAY,GAAA,CAC1DL,CAAAA,CAAQ,CAAA,CAAK,CAEjB,CAAA,CAEMQ,CAAAA,CAAoB,CAACC,CAAAA,CAAuBC,CAAAA,CAAAA,EAAwB,CACxEA,CAAAA,CAAE,cAAA,CAAe,CAAA,CACjBA,CAAAA,CAAE,eAAA,CAAgB,CAAA,CAClB,IAAMJ,CAAAA,CAAYT,CAAAA,CAAO,MAAA,CAAQU,CAAAA,EAAMA,CAAAA,GAAME,CAAa,CAAA,iBAC1DX,CAAAA,0BAAAA,CAAiBQ,CAAS,GAC5B,CAAA,CAEMK,CAAAA,CAAiB,CAAA,CAAA,EACjBf,CAAAA,CACEO,CAAAA,CAAgB,MAAA,GAAW,CAAA,CAAUb,CAAAA,CACrCa,CAAAA,CAAgB,MAAA,GAAW,CAAA,CAAUA,CAAAA,CAAgB,CAAC,CAAA,CAAE,KAAA,CACrD,CAAA,EAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-JDEHKZJE.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Check, ChevronDown, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"@/components/button\"\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"@/components/command\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\nexport interface ComboboxOption {\n value: string\n label: string\n}\n\nexport interface ComboboxProps {\n options: ComboboxOption[]\n value?: string\n onValueChange?: (value: string) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n}\n\nexport function Combobox({\n options,\n value,\n onValueChange,\n placeholder = \"Select option...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No option found.\",\n disabled = false,\n className,\n error = false,\n multiple = false,\n values = [],\n onValuesChange,\n}: ComboboxProps) {\n const [open, setOpen] = React.useState(false)\n\n const selectedOption = options.find((option) => option.value === value)\n const selectedOptions = options.filter((option) => values.includes(option.value))\n\n const handleSelect = (currentValue: string) => {\n if (multiple) {\n const newValues = values.includes(currentValue)\n ? values.filter((v) => v !== currentValue)\n : [...values, currentValue]\n onValuesChange?.(newValues)\n } else {\n onValueChange?.(currentValue === value ? \"\" : currentValue)\n setOpen(false)\n }\n }\n\n const handleRemoveValue = (valueToRemove: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const newValues = values.filter((v) => v !== valueToRemove)\n onValuesChange?.(newValues)\n }\n\n const getDisplayText = () => {\n if (multiple) {\n if (selectedOptions.length === 0) return placeholder\n if (selectedOptions.length === 1) return selectedOptions[0].label\n return `${selectedOptions.length} selected`\n }\n return selectedOption ? selectedOption.label : placeholder\n }\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\n \"w-full justify-between\",\n error && \"border-destructive-foreground focus-visible:ring-destructive-foreground\",\n className\n )}\n >\n <span className=\"truncate\">{getDisplayText()}</span>\n <ChevronDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"p-0\"\n align=\"start\"\n style={{ width: \"var(--radix-popover-trigger-width)\" }}\n >\n <Command>\n <CommandInput placeholder={searchPlaceholder} />\n <CommandList>\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n <CommandGroup>\n {multiple && selectedOptions.length > 0 && (\n <div className=\"px-2 py-1.5\">\n <div className=\"flex flex-wrap gap-1\">\n {selectedOptions.map((option) => (\n <div\n key={option.value}\n className=\"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs\"\n >\n <span className=\"truncate\">{option.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer hover:text-destructive\"\n onClick={(e) => handleRemoveValue(option.value, e)}\n />\n </div>\n ))}\n </div>\n </div>\n )}\n {options.map((option) => {\n const isSelected = multiple\n ? values.includes(option.value)\n : value === option.value\n\n return (\n <CommandItem\n key={option.value}\n value={option.value}\n onSelect={handleSelect}\n >\n <Check\n className={cn(\n \"mr-2 h-4 w-4\",\n isSelected ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n <span className=\"truncate\">{option.label}</span>\n </CommandItem>\n )\n })}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n )\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
var _chunk3BVMHDYAjs = require('./chunk-3BVMHDYA.js');var _chunkQKOZTOYUjs = require('./chunk-QKOZTOYU.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _vaul = require('vaul');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var y=i.createContext({}),
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
var _chunk3BVMHDYAjs = require('./chunk-3BVMHDYA.js');var _chunkQKOZTOYUjs = require('./chunk-QKOZTOYU.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var i = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _vaul = require('vaul');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var y=i.createContext({}),b= exports.a =({children:a,open:o,onOpenChange:n,...s})=>{let[p,c]=i.useState(!1),g=o!==void 0,m=g?o:p,r=g?n:C=>{c(C)};return _jsxruntime.jsx.call(void 0, e.Root,{open:m,onOpenChange:r,...s,children:_jsxruntime.jsx.call(void 0, y.Provider,{value:{open:m,onOpenChange:r},children:a})})};b.displayName="Dialog";var M=e.Trigger,P= exports.c =e.Portal,L= exports.d =e.Close,R= exports.e =i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Overlay,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...o}));R.displayName=e.Overlay.displayName;var x=i.forwardRef(({className:a,children:o,showCloseButton:n=!0,closeOnOverlayClick:s=!0,...p},c)=>{let g=_chunk3BVMHDYAjs.a.call(void 0, "md"),m=i.useContext(y);return g?_jsxruntime.jsxs.call(void 0, P,{children:[_jsxruntime.jsx.call(void 0, R,{}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 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 sm:rounded-3xl overflow-auto",a),onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[o,n&&_jsxruntime.jsxs.call(void 0, e.Close,{className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _chunkQKOZTOYUjs.b,{variant:"secondary",size:"icon",children:_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-4 w-4"})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})]}):_jsxruntime.jsx.call(void 0, P,{children:_jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{open:m.open,onOpenChange:m.onOpenChange,dismissible:s,children:_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none",a),"aria-describedby":void 0,onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[_jsxruntime.jsx.call(void 0, "div",{className:"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted"}),_jsxruntime.jsx.call(void 0, "div",{children:o}),n&&_jsxruntime.jsxs.call(void 0, _chunkQKOZTOYUjs.b,{onClick:()=>_optionalChain([m, 'access', _ => _.onOpenChange, 'optionalCall', _2 => _2(!1)]),variant:"secondary",size:"icon",children:[_jsxruntime.jsx.call(void 0, _lucidereact.X,{className:"h-4 w-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})]})})})});x.displayName=e.Content.displayName;var N=({className:a,...o})=>_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col space-y-1.5 text-center sm:text-left",a),...o});N.displayName="DialogHeader";var w=({className:a,...o})=>_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...o});w.displayName="DialogFooter";var h=i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",a),...o}));h.displayName=e.Title.displayName;var T=i.forwardRef(({className:a,...o},n)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "text-sm text-muted-foreground",a),...o}));T.displayName=e.Description.displayName;exports.a = b; exports.b = M; exports.c = P; exports.d = L; exports.e = R; exports.f = x; exports.g = N; exports.h = w; exports.i = h; exports.j = T;
|
|
3
|
+
//# sourceMappingURL=chunk-N27CBV5S.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-N27CBV5S.js","../src/components/dialog.tsx"],"names":["DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","jsx","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","jsxs","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":"AAAA,22BAAY;AACZ,sDAAuC,sDAAwC,sDAAwC,uECChG,oGACU,4BACS,2CACxB,+CAgCZ,IArBAA,CAAAA,CAA6B,CAAA,CAAA,aAAA,CAAyC,CAAC,CAAC,CAAA,CAExEC,CAAAA,aAAS,CAAC,CACd,QAAA,CAAAC,CAAAA,CACA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AA,CACD6B,CAAAA,CAAkB,WAAA,CAA8B,CAAA,CAAA,WAAA,CAAY,WAAA,CAAA,qJAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-N27CBV5S.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n <div>{children}</div>\n {showCloseButton && (\n <Button\n onClick={() => context.onOpenChange?.(false)}\n variant=\"secondary\"\n size=\"icon\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 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 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as u}from"./chunk-4LR7SOCY.mjs";import{b as D}from"./chunk-2YRLGFWP.mjs";import{a as l}from"./chunk-S5TKCF6T.mjs";import*as i from"react";import*as e from"@radix-ui/react-dialog";import{Drawer as f}from"vaul";import{X as v}from"lucide-react";import{jsx as t,jsxs as d}from"react/jsx-runtime";var y=i.createContext({}),b=({children:a,open:o,onOpenChange:n,...s})=>{let[p,c]=i.useState(!1),g=o!==void 0,m=g?o:p,r=g?n:C=>{c(C)};return t(e.Root,{open:m,onOpenChange:r,...s,children:t(y.Provider,{value:{open:m,onOpenChange:r},children:a})})};b.displayName="Dialog";var M=e.Trigger,P=e.Portal,L=e.Close,R=i.forwardRef(({className:a,...o},n)=>t(e.Overlay,{ref:n,className:l("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...o}));R.displayName=e.Overlay.displayName;var x=i.forwardRef(({className:a,children:o,showCloseButton:n=!0,closeOnOverlayClick:s=!0,...p},c)=>{let g=u("md"),m=i.useContext(y);return g?d(P,{children:[t(R,{}),d(e.Content,{ref:c,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 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 sm:rounded-3xl overflow-auto",a),onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[o,n&&d(e.Close,{className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[t(D,{variant:"secondary",size:"icon",children:t(v,{className:"h-4 w-4"})}),t("span",{className:"sr-only",children:"Close"})]})]})]}):t(P,{children:t(f.Root,{open:m.open,onOpenChange:m.onOpenChange,dismissible:s,children:d(f.Portal,{children:[t(f.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),d(f.Content,{ref:c,className:l("fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none",a),"aria-describedby":void 0,onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[t("div",{className:"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted"}),t("div",{children:o}),n&&d(D,{onClick:()=>m.onOpenChange?.(!1),variant:"secondary",size:"icon",children:[t(v,{className:"h-4 w-4"}),t("span",{className:"sr-only",children:"Close"})]})]})]})})})});x.displayName=e.Content.displayName;var N=({className:a,...o})=>t("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",a),...o});N.displayName="DialogHeader";var w=({className:a,...o})=>t("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...o});w.displayName="DialogFooter";var h=i.forwardRef(({className:a,...o},n)=>t(e.Title,{ref:n,className:l("text-lg font-semibold leading-none tracking-tight",a),...o}));h.displayName=e.Title.displayName;var T=i.forwardRef(({className:a,...o},n)=>t(e.Description,{ref:n,className:l("text-sm text-muted-foreground",a),...o}));T.displayName=e.Description.displayName;export{b as a,M as b,P as c,L as d,R as e,x as f,N as g,w as h,h as i,T as j};
|
|
3
|
+
//# sourceMappingURL=chunk-NADDRUK4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n <div>{children}</div>\n {showCloseButton && (\n <Button\n onClick={() => context.onOpenChange?.(false)}\n variant=\"secondary\"\n size=\"icon\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 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 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"mappings":";2HAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,UAAUC,MAAuB,OAC1C,OAAS,KAAAC,MAAS,eAgCZ,cAAAC,EAkFY,QAAAC,MAlFZ,oBArBN,IAAMC,EAA6B,gBAAyC,CAAC,CAAC,EAExEC,EAAS,CAAC,CACd,SAAAC,EACA,KAAMC,EACN,aAAcC,EACd,GAAGC,CACL,IAAyD,CAEvD,GAAM,CAACC,EAAcC,CAAe,EAAU,WAAS,EAAK,EAEtDC,EAAeL,IAAmB,OAClCM,EAAOD,EAAeL,EAAiBG,EACvCI,EAAeF,EACjBJ,EACCO,GAAqB,CACpBJ,EAAgBI,CAAO,CACzB,EAEJ,OACEb,EAAiB,OAAhB,CAAqB,KAAMW,EAAM,aAAcC,EAAe,GAAGL,EAChE,SAAAP,EAACE,EAAqB,SAArB,CAA8B,MAAO,CAAE,KAAAS,EAAM,aAAAC,CAAa,EACxD,SAAAR,EACH,EACF,CAEJ,EACAD,EAAO,YAAc,SAErB,IAAMW,EAAgC,UAEhCC,EAA+B,SAE/BC,EAA8B,QAE9BC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,UAAhB,CACC,IAAKmB,EACL,UAAWC,EACT,+KACAF,CACF,EACC,GAAGX,EACN,CACD,EACDU,EAAc,YAA8B,UAAQ,YAEpD,IAAMI,EAAsB,aAO1B,CACE,CACE,UAAAH,EACA,SAAAd,EACA,gBAAAkB,EAAkB,GAClB,oBAAAC,EAAsB,GACtB,GAAGhB,CACL,EACAY,IACG,CACH,IAAMK,EAAYC,EAAc,IAAI,EAC9BC,EAAgB,aAAWxB,C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,CACpB,UAAAb,EACA,GAAGX,CACL,IACEP,EAAC,OACC,UAAWoB,EACT,qDACAF,CACF,EACC,GAAGX,EACN,EAEFwB,EAAa,YAAc,eAE3B,IAAMC,EAAe,CAAC,CACpB,UAAAd,EACA,GAAGX,CACL,IACEP,EAAC,OACC,UAAWoB,EACT,gEACAF,CACF,EACC,GAAGX,EACN,EAEFyB,EAAa,YAAc,eAE3B,IAAMC,EAAoB,aAGxB,CAAC,CAAE,UAAAf,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,QAAhB,CACC,IAAKmB,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGX,EACN,CACD,EACD0B,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAhB,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,cAAhB,CACC,IAAKmB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGX,EACN,CACD,EACD2B,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","DrawerPrimitive","X","jsx","jsxs","DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as b,b as C,c as h}from"./chunk-FZ3NXOFK.mjs";import{a as x,c as y,d as N,e as w,f as P,h as O}from"./chunk-
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{a as b,b as C,c as h}from"./chunk-FZ3NXOFK.mjs";import{a as x,c as y,d as N,e as w,f as P,h as O}from"./chunk-C6JJOMDI.mjs";import{b as f}from"./chunk-2YRLGFWP.mjs";import{a as c}from"./chunk-S5TKCF6T.mjs";import*as S from"react";import{Check as X,ChevronDown as $,X as j}from"lucide-react";import{jsx as o,jsxs as a}from"react/jsx-runtime";function J({options:l,value:i,onValueChange:k,placeholder:d="Select option...",searchPlaceholder:R="Search...",emptyMessage:D="No option found.",disabled:E=!1,className:I,error:T=!1,multiple:r=!1,values:n=[],onValuesChange:p}){let[g,u]=S.useState(!1),v=l.find(e=>e.value===i),s=l.filter(e=>n.includes(e.value)),B=e=>{if(r){let t=n.includes(e)?n.filter(m=>m!==e):[...n,e];p?.(t)}else k?.(e===i?"":e),u(!1)},G=(e,t)=>{t.preventDefault(),t.stopPropagation();let m=n.filter(M=>M!==e);p?.(m)},L=()=>r?s.length===0?d:s.length===1?s[0].label:`${s.length} selected`:v?v.label:d;return a(b,{open:g,onOpenChange:u,children:[o(C,{asChild:!0,children:a(f,{variant:"outline",role:"combobox","aria-expanded":g,disabled:E,className:c("w-full justify-between",T&&"border-destructive-foreground focus-visible:ring-destructive-foreground",I),children:[o("span",{className:"truncate",children:L()}),o($,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),o(h,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:a(x,{children:[o(y,{placeholder:R}),a(N,{children:[o(w,{children:D}),a(P,{children:[r&&s.length>0&&o("div",{className:"px-2 py-1.5",children:o("div",{className:"flex flex-wrap gap-1",children:s.map(e=>a("div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[o("span",{className:"truncate",children:e.label}),o(j,{className:"h-3 w-3 cursor-pointer hover:text-destructive",onClick:t=>G(e.value,t)})]},e.value))})}),l.map(e=>{let t=r?n.includes(e.value):i===e.value;return a(O,{value:e.value,onSelect:B,children:[o(X,{className:c("mr-2 h-4 w-4",t?"opacity-100":"opacity-0")}),o("span",{className:"truncate",children:e.label})]},e.value)})]})]})]})})]})}export{J as a};
|
|
3
|
+
//# sourceMappingURL=chunk-S2H6HVK3.mjs.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{a as O,b as G,c as F,d as K}from"./chunk-BB3WNO72.mjs";import{a as z}from"./chunk-YBV4CPVD.mjs";import{a as D,f as _,g as k,i as B,j as A}from"./chunk-DMHIFNXF.mjs";import{a as P}from"./chunk-CNRZOMR4.mjs";import{a as H}from"./chunk-ITTWKO7B.mjs";import{a as T,b as E}from"./chunk-2YRLGFWP.mjs";import{a as n}from"./chunk-S5TKCF6T.mjs";import*as t from"react";import{Slot as y}from"@radix-ui/react-slot";import{cva as q}from"class-variance-authority";import{PanelLeft as X,X as Y,Menu as J}from"lucide-react";import{Fragment as $,jsx as o,jsxs as b}from"react/jsx-runtime";var Q="sidebar_state",Z=3600*24*7,ee="16.75rem",V="23rem",ae="calc(3rem + 0.75rem)",te="b",j=t.createContext(null);function C(){let e=t.useContext(j);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var re=t.forwardRef(({defaultOpen:e=!0,open:a,onOpenChange:r,className:i,style:s,children:d,...u},l)=>{let[h,m]=t.useState(!1),[c,g]=t.useState(e),[S,w]=t.useState(!1),[x,N]=t.useState(e),R=a??x,f=t.useCallback(p=>{let v=typeof p=="function"?p(R):p;r?r(v):N(v),document.cookie=`${Q}=${v}; path=/; max-age=${Z}`},[r,R]),M=t.useCallback(()=>{f(p=>!p)},[f]),I=t.useCallback(()=>{m(p=>!p)},[m]);t.useEffect(()=>{let p=v=>{v.key===te&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),M())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[M]);let L=R?"expanded":"collapsed",U=t.useMemo(()=>({state:L,isOpen:c,setOpen:f,openMobile:h,setOpenMobile:m,toggleSidebar:M,toggleMobileSidebar:I,setIsFullyOpen:g,isAnimating:S,setIsAnimating:w}),[L,c,f,h,m,M,I,g,S,w]);return o(j.Provider,{value:U,children:o(O,{delayDuration:0,children:o("div",{style:{"--sidebar-width":ee,"--sidebar-width-icon":ae,...s},className:n("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),ref:l,...u,children:d})})})});re.displayName="SidebarProvider";var oe=t.forwardRef(({side:e="left",variant:a="sidebar",collapsible:r="offcanvas",className:i,children:s,...d},u)=>{let{state:l,openMobile:h,setOpenMobile:m,setIsFullyOpen:c,setIsAnimating:g}=C(),S=t.useRef(null),w=t.useRef(!0);return t.useEffect(()=>{let x=S.current;if(!x)return;if(w.current){w.current=!1,c(l==="expanded"),g(!1);return}g(!0);let N=setTimeout(()=>{c(l==="expanded"),g(!1)},300),R=f=>{f.target===x&&(f.propertyName==="left"||f.propertyName==="right"||f.propertyName==="width")&&(clearTimeout(N),c(l==="expanded"),g(!1))};return x.addEventListener("transitionend",R),()=>{x.removeEventListener("transitionend",R),clearTimeout(N)}},[l,c,g]),r==="none"?o("aside",{className:n("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:u,...d,children:s}):b($,{children:[o(D,{open:h,onOpenChange:m,children:b(_,{"data-sidebar":"sidebar","data-mobile":"true",className:"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{width:V,maxWidth:V},side:e,children:[b(k,{className:"sr-only",children:[o(B,{children:"Sidebar"}),o(A,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:s})]})}),b("aside",{ref:u,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":a,"data-side":e,children:[o("div",{className:n("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o("div",{ref:S,className:n("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",i),...d,children:o("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o("div",{className:"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full",children:s})})})]})]})});oe.displayName="Sidebar";var W=t.forwardRef(({className:e,onClick:a,...r},i)=>{let{toggleSidebar:s,toggleMobileSidebar:d,openMobile:u}=C();return b($,{children:[b(E,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("md:hidden bg-transparent hover:bg-transparent",e),onClick:l=>{a?.(l),d()},...r,children:[u?o("span",{className:n(T({variant:"secondary",size:"icon"})),children:o(Y,{size:16})}):o("span",{className:n(T({variant:"outline",size:"icon"})),children:o(J,{size:16})}),o("span",{className:"sr-only",children:"Toggle Sidebar"})]}),b(E,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent",e),onClick:l=>{a?.(l),s()},...r,children:[o("span",{className:"rounded-full hover:bg-secondary p-2",children:o(X,{size:16})}),o("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})});W.displayName="SidebarTrigger";var ne=t.forwardRef(({className:e,...a},r)=>{let{toggleSidebar:i}=C();return o("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:n("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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})});ne.displayName="SidebarRail";var ie=t.memo(t.forwardRef(({className:e,...a},r)=>o("main",{ref:r,className:n("relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...a})));ie.displayName="SidebarInset";var se=t.forwardRef(({className:e,...a},r)=>o(H,{ref:r,"data-sidebar":"input",className:n("h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...a}));se.displayName="SidebarInput";var de=t.forwardRef(({className:e,showTrigger:a=!1,children:r,...i},s)=>{let{state:d}=C();return b("div",{ref:s,"data-sidebar":"header",className:n("flex w-full gap-2 p-2",d==="collapsed"?"justify-center items-center":"justify-between items-start",e),...i,children:[d!=="collapsed"&&o("div",{className:"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden",children:o("div",{className:"whitespace-nowrap",children:r})}),a&&o(W,{})]})});de.displayName="SidebarHeader";var le=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",e),...a}));le.displayName="SidebarFooter";var ce=t.forwardRef(({className:e,...a},r)=>o(z,{ref:r,"data-sidebar":"separator",className:n("mx-2 w-auto bg-border",e),...a}));ce.displayName="SidebarSeparator";var pe=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2",e),...a}));pe.displayName="SidebarContent";var be=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",e),...a}));be.displayName="SidebarGroup";var ue=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>o(a?y:"div",{ref:i,"data-sidebar":"group-label",className:n("flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r}));ue.displayName="SidebarGroupLabel";var fe=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>o(a?y:"button",{ref:i,"data-sidebar":"group-action",className:n("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r}));fe.displayName="SidebarGroupAction";var me=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"group-content",className:n("w-full text-sm",e),...a}));me.displayName="SidebarGroupContent";var ge=t.forwardRef(({className:e,...a},r)=>o("ul",{ref:r,"data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",e),...a}));ge.displayName="SidebarMenu";var ve=t.forwardRef(({className:e,...a},r)=>o("li",{ref:r,"data-sidebar":"menu-item",className:n("group/menu-item relative",e),...a}));ve.displayName="SidebarMenuItem";var he=q("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground",outline:"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),xe=t.forwardRef(({asChild:e=!1,isActive:a=!1,variant:r="default",size:i="default",tooltip:s,className:d,...u},l)=>{let h=e?y:"button",{state:m}=C(),c=o(h,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":a,className:n(he({variant:r,size:i}),d),...u});return s?(typeof s=="string"&&(s={children:s}),b(G,{children:[o(F,{asChild:!0,children:c}),o(K,{side:"right",align:"center",hidden:m!=="collapsed",...s})]})):c});xe.displayName="SidebarMenuButton";var Re=t.forwardRef(({className:e,asChild:a=!1,showOnHover:r=!1,...i},s)=>o(a?y:"button",{ref:s,"data-sidebar":"menu-action",className:n("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",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-base-accent-foreground md:opacity-0",e),...i}));Re.displayName="SidebarMenuAction";var Se=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"menu-badge",className:n("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...a}));Se.displayName="SidebarMenuBadge";var we=t.forwardRef(({className:e,showIcon:a=!1,...r},i)=>{let s=t.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return b("div",{ref:i,"data-sidebar":"menu-skeleton",className:n("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[a&&o(P,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o(P,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});we.displayName="SidebarMenuSkeleton";var ye=t.forwardRef(({className:e,...a},r)=>o("ul",{ref:r,"data-sidebar":"menu-sub",className:n("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...a}));ye.displayName="SidebarMenuSub";var Ce=t.forwardRef(({...e},a)=>o("li",{ref:a,...e}));Ce.displayName="SidebarMenuSubItem";var Ne=t.forwardRef(({asChild:e=!1,size:a="md",isActive:r,className:i,...s},d)=>o(e?y:"a",{ref:d,"data-sidebar":"menu-sub-button","data-size":a,"data-active":r,className:n("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));Ne.displayName="SidebarMenuSubButton";export{C as a,re as b,oe as c,W as d,ne as e,ie as f,se as g,de as h,le as i,ce as j,pe as k,be as l,ue as m,fe as n,me as o,ge as p,ve as q,xe as r,Re as s,Se as t,we as u,ye as v,Ce as w,Ne as x};
|
|
3
|
+
//# sourceMappingURL=chunk-UOHFERPQ.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/sidebar.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft, X, Menu } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { Input } from \"@/components/input\"\nimport { Separator } from \"@/components/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/sheet\"\nimport { Skeleton } from \"@/components/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16.75rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"23rem\"\nconst SIDEBAR_WIDTH_ICON = \"calc(3rem + 0.75rem)\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n isOpen: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n toggleSidebar: () => void\n toggleMobileSidebar: () => void\n setIsFullyOpen: (open: boolean) => void\n isAnimating: boolean\n setIsAnimating: (animating: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isFullyOpen, setIsFullyOpen] = React.useState(defaultOpen)\n const [isAnimating, setIsAnimating] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n const toggleSidebar = React.useCallback(() => {\n setOpen((open) => !open)\n }, [setOpen])\n\n const toggleMobileSidebar = React.useCallback(() => {\n setOpenMobile((open) => !open)\n }, [setOpenMobile])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n isOpen: isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n }),\n [\n state,\n isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n ]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst Sidebar = React.forwardRef<\n HTMLElement,\n React.ComponentProps<\"aside\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { state, openMobile, setOpenMobile, setIsFullyOpen, setIsAnimating } =\n useSidebar()\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const isFirstRenderRef = React.useRef(true)\n\n // Track when the sidebar animation completes\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!sidebar) return\n\n // On first render, set isFullyOpen immediately without waiting for animation\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false\n setIsFullyOpen(state === \"expanded\")\n return\n }\n\n // Mark as animating when state changes\n setIsAnimating(true)\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n // Only respond to transitions on the sidebar itself, not children\n if (event.target !== sidebar) return\n\n // Check if we're transitioning width, left, or right properties\n if (\n event.propertyName === \"left\" ||\n event.propertyName === \"right\" ||\n event.propertyName === \"width\"\n ) {\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }\n }\n\n sidebar.addEventListener(\"transitionend\", handleTransitionEnd)\n return () =>\n sidebar.removeEventListener(\"transitionend\", handleTransitionEnd)\n }, [state, setIsFullyOpen, setIsAnimating])\n\n if (collapsible === \"none\") {\n return (\n <aside\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </aside>\n )\n }\n\n return (\n <>\n {/* Mobile Sheet - visible only on mobile (< md) */}\n <Sheet open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n width: SIDEBAR_WIDTH_MOBILE,\n maxWidth: SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n\n {/* Desktop Sidebar - visible only on desktop (md+) */}\n <aside\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n <div\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n ref={sidebarRef}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n <div className=\"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full\">\n {children}\n </div>\n </div>\n </div>\n </aside>\n </>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar, toggleMobileSidebar, openMobile } = useSidebar()\n\n return (\n <>\n {/* Mobile trigger - visible only on mobile (< md) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"md:hidden bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleMobileSidebar()\n }}\n {...props}\n >\n {openMobile ? (\n <span\n className={cn(\n buttonVariants({ variant: \"secondary\", size: \"icon\" })\n )}\n >\n <X size={16} />\n </span>\n ) : (\n <span\n className={cn(buttonVariants({ variant: \"outline\", size: \"icon\" }))}\n >\n <Menu size={16} />\n </span>\n )}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n {/* Desktop trigger - visible only on desktop (md+) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <span className=\"rounded-full hover:bg-secondary p-2\">\n <PanelLeft size={16} />\n </span>\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n </>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.memo(\n React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex w-full flex-1 flex-col\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n }\n )\n)\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n React.ElementRef<typeof Input>,\n React.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showTrigger?: boolean\n }\n>(({ className, showTrigger = false, children, ...props }, ref) => {\n const { state } = useSidebar()\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\n \"flex w-full gap-2 p-2\",\n state === \"collapsed\"\n ? \"justify-center items-center\"\n : \"justify-between items-start\",\n className\n )}\n {...props}\n >\n {state !== \"collapsed\" && (\n <div className=\"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden\">\n <div className=\"whitespace-nowrap\">{children}</div>\n </div>\n )}\n\n {showTrigger && <SidebarTrigger />}\n </div>\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\n \"relative flex w-full min-w-0 flex-col\",\n \"group-data-[collapsible=icon]:p-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\"}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"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-base-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 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 \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n"],"mappings":";uVAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAS,aAAAC,EAAW,KAAAC,EAAG,QAAAC,MAAY,eAmJzB,OAmGJ,YAAAC,EAnGI,OAAAC,EAkHE,QAAAC,MAlHF,oBA9HV,IAAMC,EAAsB,gBACtBC,EAAyB,KAAU,GAAK,EACxCC,GAAgB,WAChBC,EAAuB,QACvBC,GAAqB,uBACrBC,GAA4B,IAe5BC,EAAuB,gBAA0C,IAAI,EAE3E,SAASC,GAAa,CACpB,IAAMC,EAAgB,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,IAAKtD,EACL,eAAa,kBACb,YAAW+D,EACX,cAAaD,EACb,UAAW1C,EACT,8eACA,yFACA2C,IAAS,MAAQ,UACjBA,IAAS,MAAQ,UACjB,uCACAnE,CACF,EACC,GAAGG,EACN,CAEH,EACDgF,GAAqB,YAAc","names":["React","Slot","cva","PanelLeft","X","Menu","Fragment","jsx","jsxs","SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","ref","openMobile","setOpenMobile","isFullyOpen","setIsFullyOpen","isAnimating","setIsAnimating","_open","_setOpen","open","setOpen","value","openState","toggleSidebar","toggleMobileSidebar","handleKeyDown","event","state","contextValue","TooltipProvider","cn","Sidebar","side","variant","collapsible","sidebarRef","isFirstRenderRef","sidebar","handleTransitionEnd","Sheet","SheetContent","SheetHeader","SheetTitle","SheetDescription","SidebarTrigger","onClick","Button","buttonVariants","X","Menu","PanelLeft","SidebarRail","SidebarInset","SidebarInput","Input","SidebarHeader","showTrigger","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Slot","SidebarGroupAction","SidebarGroupContent","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","cva","SidebarMenuButton","isActive","size","tooltip","Comp","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuBadge","SidebarMenuSkeleton","showIcon","width","Skeleton","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/sidebar.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { PanelLeft, X, Menu } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button, buttonVariants } from \"@/components/button\"\nimport { Input } from \"@/components/input\"\nimport { Separator } from \"@/components/separator\"\nimport {\n Sheet,\n SheetContent,\n SheetDescription,\n SheetHeader,\n SheetTitle,\n} from \"@/components/sheet\"\nimport { Skeleton } from \"@/components/skeleton\"\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from \"@/components/tooltip\"\n\nconst SIDEBAR_COOKIE_NAME = \"sidebar_state\"\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = \"16.75rem\"\nconst SIDEBAR_WIDTH_MOBILE = \"23rem\"\nconst SIDEBAR_WIDTH_ICON = \"calc(3rem + 0.75rem)\"\nconst SIDEBAR_KEYBOARD_SHORTCUT = \"b\"\n\ntype SidebarContextProps = {\n state: \"expanded\" | \"collapsed\"\n isOpen: boolean\n setOpen: (open: boolean) => void\n openMobile: boolean\n setOpenMobile: (open: boolean) => void\n toggleSidebar: () => void\n toggleMobileSidebar: () => void\n setIsFullyOpen: (open: boolean) => void\n isAnimating: boolean\n setIsAnimating: (animating: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextProps | null>(null)\n\nfunction useSidebar() {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error(\"useSidebar must be used within a SidebarProvider.\")\n }\n\n return context\n}\n\nconst SidebarProvider = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n defaultOpen?: boolean\n open?: boolean\n onOpenChange?: (open: boolean) => void\n }\n>(\n (\n {\n defaultOpen = true,\n open: openProp,\n onOpenChange: setOpenProp,\n className,\n style,\n children,\n ...props\n },\n ref\n ) => {\n const [openMobile, setOpenMobile] = React.useState(false)\n const [isFullyOpen, setIsFullyOpen] = React.useState(defaultOpen)\n const [isAnimating, setIsAnimating] = React.useState(false)\n\n const [_open, _setOpen] = React.useState(defaultOpen)\n const open = openProp ?? _open\n const setOpen = React.useCallback(\n (value: boolean | ((value: boolean) => boolean)) => {\n const openState = typeof value === \"function\" ? value(open) : value\n if (setOpenProp) {\n setOpenProp(openState)\n } else {\n _setOpen(openState)\n }\n\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [setOpenProp, open]\n )\n\n const toggleSidebar = React.useCallback(() => {\n setOpen((open) => !open)\n }, [setOpen])\n\n const toggleMobileSidebar = React.useCallback(() => {\n setOpenMobile((open) => !open)\n }, [setOpenMobile])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (\n event.key === SIDEBAR_KEYBOARD_SHORTCUT &&\n (event.metaKey || event.ctrlKey)\n ) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n\n window.addEventListener(\"keydown\", handleKeyDown)\n return () => window.removeEventListener(\"keydown\", handleKeyDown)\n }, [toggleSidebar])\n\n const state = open ? \"expanded\" : \"collapsed\"\n\n const contextValue = React.useMemo<SidebarContextProps>(\n () => ({\n state,\n isOpen: isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n }),\n [\n state,\n isFullyOpen,\n setOpen,\n openMobile,\n setOpenMobile,\n toggleSidebar,\n toggleMobileSidebar,\n setIsFullyOpen,\n isAnimating,\n setIsAnimating,\n ]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n \"--sidebar-width\": SIDEBAR_WIDTH,\n \"--sidebar-width-icon\": SIDEBAR_WIDTH_ICON,\n ...style,\n } as React.CSSProperties\n }\n className={cn(\n \"group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = \"SidebarProvider\"\n\nconst Sidebar = React.forwardRef<\n HTMLElement,\n React.ComponentProps<\"aside\"> & {\n side?: \"left\" | \"right\"\n variant?: \"sidebar\" | \"floating\" | \"inset\"\n collapsible?: \"offcanvas\" | \"icon\" | \"none\"\n }\n>(\n (\n {\n side = \"left\",\n variant = \"sidebar\",\n collapsible = \"offcanvas\",\n className,\n children,\n ...props\n },\n ref\n ) => {\n const { state, openMobile, setOpenMobile, setIsFullyOpen, setIsAnimating } =\n useSidebar()\n const sidebarRef = React.useRef<HTMLDivElement>(null)\n const isFirstRenderRef = React.useRef(true)\n\n // Track when the sidebar animation completes\n React.useEffect(() => {\n const sidebar = sidebarRef.current\n if (!sidebar) return\n\n // On first render, set isFullyOpen immediately without waiting for animation\n if (isFirstRenderRef.current) {\n isFirstRenderRef.current = false\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n return\n }\n\n // Mark as animating when state changes\n setIsAnimating(true)\n\n // Fallback timeout in case transitionend doesn't fire\n const fallbackTimeout = setTimeout(() => {\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }, 300) // Slightly longer than the 200ms transition duration\n\n const handleTransitionEnd = (event: TransitionEvent) => {\n // Only respond to transitions on the sidebar itself, not children\n if (event.target !== sidebar) return\n\n // Check if we're transitioning width, left, or right properties\n if (\n event.propertyName === \"left\" ||\n event.propertyName === \"right\" ||\n event.propertyName === \"width\"\n ) {\n clearTimeout(fallbackTimeout)\n setIsFullyOpen(state === \"expanded\")\n setIsAnimating(false)\n }\n }\n\n sidebar.addEventListener(\"transitionend\", handleTransitionEnd)\n return () => {\n sidebar.removeEventListener(\"transitionend\", handleTransitionEnd)\n clearTimeout(fallbackTimeout)\n }\n }, [state, setIsFullyOpen, setIsAnimating])\n\n if (collapsible === \"none\") {\n return (\n <aside\n className={cn(\n \"flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground\",\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </aside>\n )\n }\n\n return (\n <>\n {/* Mobile Sheet - visible only on mobile (< md) */}\n <Sheet open={openMobile} onOpenChange={setOpenMobile}>\n <SheetContent\n data-sidebar=\"sidebar\"\n data-mobile=\"true\"\n className=\"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden\"\n style={\n {\n width: SIDEBAR_WIDTH_MOBILE,\n maxWidth: SIDEBAR_WIDTH_MOBILE,\n } as React.CSSProperties\n }\n side={side}\n >\n <SheetHeader className=\"sr-only\">\n <SheetTitle>Sidebar</SheetTitle>\n <SheetDescription>Displays the mobile sidebar.</SheetDescription>\n </SheetHeader>\n <div className=\"flex h-full w-full flex-col\">{children}</div>\n </SheetContent>\n </Sheet>\n\n {/* Desktop Sidebar - visible only on desktop (md+) */}\n <aside\n ref={ref}\n className=\"group peer hidden text-sidebar-foreground md:block\"\n data-state={state}\n data-collapsible={state === \"collapsed\" ? collapsible : \"\"}\n data-variant={variant}\n data-side={side}\n >\n <div\n className={cn(\n \"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear\",\n \"group-data-[collapsible=offcanvas]:w-0\",\n \"group-data-[side=right]:rotate-180\",\n variant === \"floating\" || variant === \"inset\"\n ? \"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\"\n )}\n />\n <div\n ref={sidebarRef}\n className={cn(\n \"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex\",\n side === \"left\"\n ? \"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]\"\n : \"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]\",\n variant === \"floating\" || variant === \"inset\"\n ? \"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]\"\n : \"group-data-[collapsible=icon]:w-(--sidebar-width-icon)\",\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n <div className=\"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full\">\n {children}\n </div>\n </div>\n </div>\n </aside>\n </>\n )\n }\n)\nSidebar.displayName = \"Sidebar\"\n\nconst SidebarTrigger = React.forwardRef<\n React.ElementRef<typeof Button>,\n React.ComponentProps<typeof Button>\n>(({ className, onClick, ...props }, ref) => {\n const { toggleSidebar, toggleMobileSidebar, openMobile } = useSidebar()\n\n return (\n <>\n {/* Mobile trigger - visible only on mobile (< md) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"md:hidden bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleMobileSidebar()\n }}\n {...props}\n >\n {openMobile ? (\n <span\n className={cn(\n buttonVariants({ variant: \"secondary\", size: \"icon\" })\n )}\n >\n <X size={16} />\n </span>\n ) : (\n <span\n className={cn(buttonVariants({ variant: \"outline\", size: \"icon\" }))}\n >\n <Menu size={16} />\n </span>\n )}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n\n {/* Desktop trigger - visible only on desktop (md+) */}\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn(\n \"hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent\",\n className\n )}\n onClick={(event) => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n <span className=\"rounded-full hover:bg-secondary p-2\">\n <PanelLeft size={16} />\n </span>\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n </>\n )\n})\nSidebarTrigger.displayName = \"SidebarTrigger\"\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\">\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n \"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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex\",\n \"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize\",\n \"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize\",\n \"group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar\",\n \"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2\",\n \"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = \"SidebarRail\"\n\nconst SidebarInset = React.memo(\n React.forwardRef<HTMLDivElement, React.ComponentProps<\"main\">>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref}\n className={cn(\n \"relative flex w-full flex-1 flex-col\",\n \"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow\",\n className\n )}\n {...props}\n />\n )\n }\n )\n)\nSidebarInset.displayName = \"SidebarInset\"\n\nconst SidebarInput = React.forwardRef<\n React.ElementRef<typeof Input>,\n React.ComponentProps<typeof Input>\n>(({ className, ...props }, ref) => {\n return (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n \"h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarInput.displayName = \"SidebarInput\"\n\nconst SidebarHeader = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showTrigger?: boolean\n }\n>(({ className, showTrigger = false, children, ...props }, ref) => {\n const { state } = useSidebar()\n\n return (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn(\n \"flex w-full gap-2 p-2\",\n state === \"collapsed\"\n ? \"justify-center items-center\"\n : \"justify-between items-start\",\n className\n )}\n {...props}\n >\n {state !== \"collapsed\" && (\n <div className=\"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden\">\n <div className=\"whitespace-nowrap\">{children}</div>\n </div>\n )}\n\n {showTrigger && <SidebarTrigger />}\n </div>\n )\n})\nSidebarHeader.displayName = \"SidebarHeader\"\n\nconst SidebarFooter = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn(\"flex flex-col gap-2 p-2\", className)}\n {...props}\n />\n )\n})\nSidebarFooter.displayName = \"SidebarFooter\"\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentProps<typeof Separator>\n>(({ className, ...props }, ref) => {\n return (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn(\"mx-2 w-auto bg-border\", className)}\n {...props}\n />\n )\n})\nSidebarSeparator.displayName = \"SidebarSeparator\"\n\nconst SidebarContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n \"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarContent.displayName = \"SidebarContent\"\n\nconst SidebarGroup = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn(\n \"relative flex w-full min-w-0 flex-col\",\n \"group-data-[collapsible=icon]:p-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroup.displayName = \"SidebarGroup\"\n\nconst SidebarGroupLabel = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"div\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n \"flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupLabel.displayName = \"SidebarGroupLabel\"\n\nconst SidebarGroupAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & { asChild?: boolean }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n \"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarGroupAction.displayName = \"SidebarGroupAction\"\n\nconst SidebarGroupContent = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn(\"w-full text-sm\", className)}\n {...props}\n />\n))\nSidebarGroupContent.displayName = \"SidebarGroupContent\"\n\nconst SidebarMenu = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn(\"flex w-full min-w-0 flex-col gap-1\", className)}\n {...props}\n />\n))\nSidebarMenu.displayName = \"SidebarMenu\"\n\nconst SidebarMenuItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn(\"group/menu-item relative\", className)}\n {...props}\n />\n))\nSidebarMenuItem.displayName = \"SidebarMenuItem\"\n\nconst sidebarMenuButtonVariants = cva(\n \"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0\",\n {\n variants: {\n variant: {\n default:\n \"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground\",\n outline:\n \"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]\",\n },\n size: {\n default: \"h-8 text-sm\",\n sm: \"h-7 text-xs\",\n lg: \"h-12 text-sm group-data-[collapsible=icon]:!p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nconst SidebarMenuButton = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | React.ComponentProps<typeof TooltipContent>\n } & VariantProps<typeof sidebarMenuButtonVariants>\n>(\n (\n {\n asChild = false,\n isActive = false,\n variant = \"default\",\n size = \"default\",\n tooltip,\n className,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...props}\n />\n )\n\n if (!tooltip) {\n return button\n }\n\n if (typeof tooltip === \"string\") {\n tooltip = {\n children: tooltip,\n }\n }\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== \"collapsed\"}\n {...tooltip}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = \"SidebarMenuButton\"\n\nconst SidebarMenuAction = React.forwardRef<\n HTMLButtonElement,\n React.ComponentProps<\"button\"> & {\n asChild?: boolean\n showOnHover?: boolean\n }\n>(({ className, asChild = false, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n \"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0\",\n \"after:absolute after:-inset-2 after:md:hidden\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n showOnHover &&\n \"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-base-accent-foreground md:opacity-0\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuAction.displayName = \"SidebarMenuAction\"\n\nconst SidebarMenuBadge = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\">\n>(({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n \"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground\",\n \"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground\",\n \"peer-data-[size=sm]/menu-button:top-1\",\n \"peer-data-[size=default]/menu-button:top-1.5\",\n \"peer-data-[size=lg]/menu-button:top-2.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuBadge.displayName = \"SidebarMenuBadge\"\n\nconst SidebarMenuSkeleton = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<\"div\"> & {\n showIcon?: boolean\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n const width = React.useMemo(() => {\n return `${Math.floor(Math.random() * 40) + 50}%`\n }, [])\n\n return (\n <div\n ref={ref}\n data-sidebar=\"menu-skeleton\"\n className={cn(\"flex h-8 items-center gap-2 rounded-md px-2\", className)}\n {...props}\n >\n {showIcon && (\n <Skeleton\n className=\"size-4 rounded-md\"\n data-sidebar=\"menu-skeleton-icon\"\n />\n )}\n <Skeleton\n className=\"h-4 max-w-[--skeleton-width] flex-1\"\n data-sidebar=\"menu-skeleton-text\"\n style={\n {\n \"--skeleton-width\": width,\n } as React.CSSProperties\n }\n />\n </div>\n )\n})\nSidebarMenuSkeleton.displayName = \"SidebarMenuSkeleton\"\n\nconst SidebarMenuSub = React.forwardRef<\n HTMLUListElement,\n React.ComponentProps<\"ul\">\n>(({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn(\n \"mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n))\nSidebarMenuSub.displayName = \"SidebarMenuSub\"\n\nconst SidebarMenuSubItem = React.forwardRef<\n HTMLLIElement,\n React.ComponentProps<\"li\">\n>(({ ...props }, ref) => <li ref={ref} {...props} />)\nSidebarMenuSubItem.displayName = \"SidebarMenuSubItem\"\n\nconst SidebarMenuSubButton = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<\"a\"> & {\n asChild?: boolean\n size?: \"sm\" | \"md\"\n isActive?: boolean\n }\n>(({ asChild = false, size = \"md\", isActive, className, ...props }, ref) => {\n const Comp = asChild ? Slot : \"a\"\n\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n data-active={isActive}\n className={cn(\n \"flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 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 \"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground\",\n size === \"sm\" && \"text-xs\",\n size === \"md\" && \"text-sm\",\n \"group-data-[collapsible=icon]:hidden\",\n className\n )}\n {...props}\n />\n )\n})\nSidebarMenuSubButton.displayName = \"SidebarMenuSubButton\"\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n}\n"],"mappings":";uVAEA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BACvC,OAAS,aAAAC,EAAW,KAAAC,EAAG,QAAAC,MAAY,eAmJzB,OA6GJ,YAAAC,EA7GI,OAAAC,EA4HE,QAAAC,MA5HF,oBA9HV,IAAMC,EAAsB,gBACtBC,EAAyB,KAAU,GAAK,EACxCC,GAAgB,WAChBC,EAAuB,QACvBC,GAAqB,uBACrBC,GAA4B,IAe5BC,EAAuB,gBAA0C,IAAI,EAE3E,SAASC,GAAa,CACpB,IAAMC,EAAgB,aAAWF,CAAc,EAC/C,GAAI,CAACE,EACH,MAAM,IAAI,MAAM,mDAAmD,EAGrE,OAAOA,CACT,CAEA,IAAMC,GAAwB,aAQ5B,CACE,CACE,YAAAC,EAAc,GACd,KAAMC,EACN,aAAcC,EACd,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,GAAM,CAACC,EAAYC,CAAa,EAAU,WAAS,EAAK,EAClD,CAACC,EAAaC,CAAc,EAAU,WAASX,CAAW,EAC1D,CAACY,EAAaC,CAAc,EAAU,WAAS,EAAK,EAEpD,CAACC,EAAOC,CAAQ,EAAU,WAASf,CAAW,EAC9CgB,EAAOf,GAAYa,EACnBG,EAAgB,cACnBC,GAAmD,CAClD,IAAMC,EAAY,OAAOD,GAAU,WAAaA,EAAMF,CAAI,EAAIE,EAC1DhB,EACFA,EAAYiB,CAAS,EAErBJ,EAASI,CAAS,EAGpB,SAAS,OAAS,GAAG7B,CAAmB,IAAI6B,CAAS,qBAAqB5B,CAAsB,EAClG,EACA,CAACW,EAAac,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AAWoB,EAAG,8CAA+CxB,CAAS,EACrE,GAAGG,EAEH,UAAA4E,GACC9F,EAACgG,EAAA,CACC,UAAU,oBACV,eAAa,qBACf,EAEFhG,EAACgG,EAAA,CACC,UAAU,sCACV,eAAa,qBACb,MACE,CACE,mBAAoBD,CACtB,EAEJ,GACF,CAEJ,CAAC,EACDF,GAAoB,YAAc,sBAElC,IAAMI,GAAuB,aAG3B,CAAC,CAAE,UAAAlF,EAAW,GAAGG,CAAM,EAAGC,IAC1BnB,EAAC,MACC,IAAKmB,EACL,eAAa,WACb,UAAWoB,EACT,iGACA,uCACAxB,CACF,EACC,GAAGG,EACN,CACD,EACD+E,GAAe,YAAc,iBAE7B,IAAMC,GAA2B,aAG/B,CAAC,CAAE,GAAGhF,CAAM,EAAGC,IAAQnB,EAAC,MAAG,IAAKmB,EAAM,GAAGD,EAAO,CAAE,EACpDgF,GAAmB,YAAc,qBAEjC,IAAMC,GAA6B,aAOjC,CAAC,CAAE,QAAA1B,EAAU,GAAO,KAAAU,EAAO,KAAM,SAAAD,EAAU,UAAAnE,EAAW,GAAGG,CAAM,EAAGC,IAIhEnB,EAHWyE,EAAUC,EAAO,IAG3B,CACC,IAAKvD,EACL,eAAa,kBACb,YAAWgE,EACX,cAAaD,EACb,UAAW3C,EACT,8eACA,yFACA4C,IAAS,MAAQ,UACjBA,IAAS,MAAQ,UACjB,uCACApE,CACF,EACC,GAAGG,EACN,CAEH,EACDiF,GAAqB,YAAc","names":["React","Slot","cva","PanelLeft","X","Menu","Fragment","jsx","jsxs","SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_MOBILE","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","useSidebar","context","SidebarProvider","defaultOpen","openProp","setOpenProp","className","style","children","props","ref","openMobile","setOpenMobile","isFullyOpen","setIsFullyOpen","isAnimating","setIsAnimating","_open","_setOpen","open","setOpen","value","openState","toggleSidebar","toggleMobileSidebar","handleKeyDown","event","state","contextValue","TooltipProvider","cn","Sidebar","side","variant","collapsible","sidebarRef","isFirstRenderRef","sidebar","fallbackTimeout","handleTransitionEnd","Sheet","SheetContent","SheetHeader","SheetTitle","SheetDescription","SidebarTrigger","onClick","Button","buttonVariants","X","Menu","PanelLeft","SidebarRail","SidebarInset","SidebarInput","Input","SidebarHeader","showTrigger","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Slot","SidebarGroupAction","SidebarGroupContent","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","cva","SidebarMenuButton","isActive","size","tooltip","Comp","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuBadge","SidebarMenuSkeleton","showIcon","width","Skeleton","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton"]}
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "
|
|
6
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
7
7
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "
|
|
6
|
+
variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
7
7
|
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
var
|
|
2
|
+
var _chunkJDEHKZJEjs = require('../chunk-JDEHKZJE.js');require('../chunk-ULIOO55I.js');require('../chunk-45I67HWX.js');require('../chunk-N27CBV5S.js');require('../chunk-3BVMHDYA.js');require('../chunk-QKOZTOYU.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.Combobox = _chunkJDEHKZJEjs.a;
|
|
3
3
|
//# sourceMappingURL=combobox.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a}from"../chunk-
|
|
2
|
+
import{a}from"../chunk-S2H6HVK3.mjs";import"../chunk-FZ3NXOFK.mjs";import"../chunk-C6JJOMDI.mjs";import"../chunk-NADDRUK4.mjs";import"../chunk-4LR7SOCY.mjs";import"../chunk-2YRLGFWP.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as Combobox};
|
|
3
3
|
//# sourceMappingURL=combobox.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
var
|
|
2
|
+
var _chunk45I67HWXjs = require('../chunk-45I67HWX.js');require('../chunk-N27CBV5S.js');require('../chunk-3BVMHDYA.js');require('../chunk-QKOZTOYU.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.Command = _chunk45I67HWXjs.a; exports.CommandDialog = _chunk45I67HWXjs.b; exports.CommandEmpty = _chunk45I67HWXjs.e; exports.CommandGroup = _chunk45I67HWXjs.f; exports.CommandInput = _chunk45I67HWXjs.c; exports.CommandItem = _chunk45I67HWXjs.h; exports.CommandList = _chunk45I67HWXjs.d; exports.CommandSeparator = _chunk45I67HWXjs.g; exports.CommandShortcut = _chunk45I67HWXjs.i;
|
|
3
3
|
//# sourceMappingURL=command.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i}from"../chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h,i}from"../chunk-C6JJOMDI.mjs";import"../chunk-NADDRUK4.mjs";import"../chunk-4LR7SOCY.mjs";import"../chunk-2YRLGFWP.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as Command,b as CommandDialog,e as CommandEmpty,f as CommandGroup,c as CommandInput,h as CommandItem,d as CommandList,g as CommandSeparator,i as CommandShortcut};
|
|
3
3
|
//# sourceMappingURL=command.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
"use client";var
|
|
2
|
+
"use client";var _chunkN27CBV5Sjs = require('../chunk-N27CBV5S.js');require('../chunk-3BVMHDYA.js');require('../chunk-QKOZTOYU.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.Dialog = _chunkN27CBV5Sjs.a; exports.DialogClose = _chunkN27CBV5Sjs.d; exports.DialogContent = _chunkN27CBV5Sjs.f; exports.DialogDescription = _chunkN27CBV5Sjs.j; exports.DialogFooter = _chunkN27CBV5Sjs.h; exports.DialogHeader = _chunkN27CBV5Sjs.g; exports.DialogOverlay = _chunkN27CBV5Sjs.e; exports.DialogPortal = _chunkN27CBV5Sjs.c; exports.DialogTitle = _chunkN27CBV5Sjs.i; exports.DialogTrigger = _chunkN27CBV5Sjs.b;
|
|
3
3
|
//# sourceMappingURL=dialog.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j}from"../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j}from"../chunk-NADDRUK4.mjs";import"../chunk-4LR7SOCY.mjs";import"../chunk-2YRLGFWP.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{a as Dialog,d as DialogClose,f as DialogContent,j as DialogDescription,h as DialogFooter,g as DialogHeader,e as DialogOverlay,c as DialogPortal,i as DialogTitle,b as DialogTrigger};
|
|
3
3
|
//# sourceMappingURL=dialog.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
"use client";var
|
|
2
|
+
"use client";var _chunkIHBEMOHHjs = require('../chunk-IHBEMOHH.js');require('../chunk-B7XXLTYN.js');require('../chunk-7SOZ6MOV.js');require('../chunk-752ERCMU.js');require('../chunk-5L5DM2X5.js');require('../chunk-RA5BKFIT.js');require('../chunk-QKOZTOYU.js');require('../chunk-FUYXCJOQ.js');require('../chunk-XYO4VLMF.js');exports.Sidebar = _chunkIHBEMOHHjs.c; exports.SidebarContent = _chunkIHBEMOHHjs.k; exports.SidebarFooter = _chunkIHBEMOHHjs.i; exports.SidebarGroup = _chunkIHBEMOHHjs.l; exports.SidebarGroupAction = _chunkIHBEMOHHjs.n; exports.SidebarGroupContent = _chunkIHBEMOHHjs.o; exports.SidebarGroupLabel = _chunkIHBEMOHHjs.m; exports.SidebarHeader = _chunkIHBEMOHHjs.h; exports.SidebarInput = _chunkIHBEMOHHjs.g; exports.SidebarInset = _chunkIHBEMOHHjs.f; exports.SidebarMenu = _chunkIHBEMOHHjs.p; exports.SidebarMenuAction = _chunkIHBEMOHHjs.s; exports.SidebarMenuBadge = _chunkIHBEMOHHjs.t; exports.SidebarMenuButton = _chunkIHBEMOHHjs.r; exports.SidebarMenuItem = _chunkIHBEMOHHjs.q; exports.SidebarMenuSkeleton = _chunkIHBEMOHHjs.u; exports.SidebarMenuSub = _chunkIHBEMOHHjs.v; exports.SidebarMenuSubButton = _chunkIHBEMOHHjs.x; exports.SidebarMenuSubItem = _chunkIHBEMOHHjs.w; exports.SidebarProvider = _chunkIHBEMOHHjs.b; exports.SidebarRail = _chunkIHBEMOHHjs.e; exports.SidebarSeparator = _chunkIHBEMOHHjs.j; exports.SidebarTrigger = _chunkIHBEMOHHjs.d; exports.useSidebar = _chunkIHBEMOHHjs.a;
|
|
3
3
|
//# sourceMappingURL=sidebar.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"../chunk-
|
|
2
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"../chunk-UOHFERPQ.mjs";import"../chunk-BB3WNO72.mjs";import"../chunk-YBV4CPVD.mjs";import"../chunk-DMHIFNXF.mjs";import"../chunk-CNRZOMR4.mjs";import"../chunk-ITTWKO7B.mjs";import"../chunk-2YRLGFWP.mjs";import"../chunk-S5TKCF6T.mjs";import"../chunk-KPAOPUY2.mjs";export{c as Sidebar,k as SidebarContent,i as SidebarFooter,l as SidebarGroup,n as SidebarGroupAction,o as SidebarGroupContent,m as SidebarGroupLabel,h as SidebarHeader,g as SidebarInput,f as SidebarInset,p as SidebarMenu,s as SidebarMenuAction,t as SidebarMenuBadge,r as SidebarMenuButton,q as SidebarMenuItem,u as SidebarMenuSkeleton,v as SidebarMenuSub,x as SidebarMenuSubButton,w as SidebarMenuSubItem,b as SidebarProvider,e as SidebarRail,j as SidebarSeparator,d as SidebarTrigger,a as useSidebar};
|
|
3
3
|
//# sourceMappingURL=sidebar.mjs.map
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";
|
|
2
|
-
var
|
|
2
|
+
var _chunkIHBEMOHHjs = require('./chunk-IHBEMOHH.js');var _chunkB7XXLTYNjs = require('./chunk-B7XXLTYN.js');var _chunk7SOZ6MOVjs = require('./chunk-7SOZ6MOV.js');var _chunk752ERCMUjs = require('./chunk-752ERCMU.js');var _chunk5L5DM2X5js = require('./chunk-5L5DM2X5.js');var _chunk2ESUPMMPjs = require('./chunk-2ESUPMMP.js');var _chunkQDJM5EVMjs = require('./chunk-QDJM5EVM.js');var _chunkMGFKSA3Mjs = require('./chunk-MGFKSA3M.js');var _chunk27WVO6KFjs = require('./chunk-27WVO6KF.js');var _chunkCT2CRYC2js = require('./chunk-CT2CRYC2.js');var _chunkRA5BKFITjs = require('./chunk-RA5BKFIT.js');var _chunkZF6PO6PJjs = require('./chunk-ZF6PO6PJ.js');var _chunkJDEHKZJEjs = require('./chunk-JDEHKZJE.js');var _chunkULIOO55Ijs = require('./chunk-ULIOO55I.js');var _chunk45I67HWXjs = require('./chunk-45I67HWX.js');var _chunkN27CBV5Sjs = require('./chunk-N27CBV5S.js');require('./chunk-3BVMHDYA.js');var _chunkS44IUVZ5js = require('./chunk-S44IUVZ5.js');var _chunkZ2GFZUBSjs = require('./chunk-Z2GFZUBS.js');var _chunkQPMDGUSQjs = require('./chunk-QPMDGUSQ.js');var _chunkQKOZTOYUjs = require('./chunk-QKOZTOYU.js');var _chunkRWCTSJUMjs = require('./chunk-RWCTSJUM.js');var _chunkEJTY2ABYjs = require('./chunk-EJTY2ABY.js');var _chunkR74QDO2Zjs = require('./chunk-R74QDO2Z.js');var _chunkBENG4LHZjs = require('./chunk-BENG4LHZ.js');var _chunk372VUZFEjs = require('./chunk-372VUZFE.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');require('./chunk-XYO4VLMF.js');exports.Button = _chunkQKOZTOYUjs.b; exports.Calendar = _chunkQPMDGUSQjs.a; exports.Combobox = _chunkJDEHKZJEjs.a; exports.Command = _chunk45I67HWXjs.a; exports.CommandDialog = _chunk45I67HWXjs.b; exports.CommandEmpty = _chunk45I67HWXjs.e; exports.CommandGroup = _chunk45I67HWXjs.f; exports.CommandInput = _chunk45I67HWXjs.c; exports.CommandItem = _chunk45I67HWXjs.h; exports.CommandList = _chunk45I67HWXjs.d; exports.CommandSeparator = _chunk45I67HWXjs.g; exports.CommandShortcut = _chunk45I67HWXjs.i; exports.DatePicker = _chunkS44IUVZ5js.a; exports.DateRangePicker = _chunkZ2GFZUBSjs.a; exports.Dialog = _chunkN27CBV5Sjs.a; exports.DialogClose = _chunkN27CBV5Sjs.d; exports.DialogContent = _chunkN27CBV5Sjs.f; exports.DialogDescription = _chunkN27CBV5Sjs.j; exports.DialogFooter = _chunkN27CBV5Sjs.h; exports.DialogHeader = _chunkN27CBV5Sjs.g; exports.DialogOverlay = _chunkN27CBV5Sjs.e; exports.DialogPortal = _chunkN27CBV5Sjs.c; exports.DialogTitle = _chunkN27CBV5Sjs.i; exports.DialogTrigger = _chunkN27CBV5Sjs.b; exports.Drawer = _chunkMGFKSA3Mjs.b; exports.DrawerBody = _chunkMGFKSA3Mjs.e; exports.DrawerFooter = _chunkMGFKSA3Mjs.f; exports.DrawerHeader = _chunkMGFKSA3Mjs.c; exports.DrawerTitle = _chunkMGFKSA3Mjs.d; exports.DropdownMenu = _chunk27WVO6KFjs.a; exports.DropdownMenuCheckboxItem = _chunk27WVO6KFjs.k; exports.DropdownMenuContent = _chunk27WVO6KFjs.i; exports.DropdownMenuGroup = _chunk27WVO6KFjs.c; exports.DropdownMenuItem = _chunk27WVO6KFjs.j; exports.DropdownMenuLabel = _chunk27WVO6KFjs.m; exports.DropdownMenuPortal = _chunk27WVO6KFjs.d; exports.DropdownMenuRadioGroup = _chunk27WVO6KFjs.f; exports.DropdownMenuRadioItem = _chunk27WVO6KFjs.l; exports.DropdownMenuSeparator = _chunk27WVO6KFjs.n; exports.DropdownMenuShortcut = _chunk27WVO6KFjs.o; exports.DropdownMenuSub = _chunk27WVO6KFjs.e; exports.DropdownMenuSubContent = _chunk27WVO6KFjs.h; exports.DropdownMenuSubTrigger = _chunk27WVO6KFjs.g; exports.DropdownMenuTrigger = _chunk27WVO6KFjs.b; exports.Field = _chunkCT2CRYC2js.a; exports.FieldDescription = _chunkCT2CRYC2js.c; exports.FieldLabel = _chunkCT2CRYC2js.b; exports.GeometricFluidGrid = _chunkRWCTSJUMjs.a; exports.GlitchLink = _chunkEJTY2ABYjs.b; exports.Input = _chunkRA5BKFITjs.a; exports.Label = _chunkZF6PO6PJjs.a; exports.PixelLoad = _chunkR74QDO2Zjs.a; exports.Popover = _chunkULIOO55Ijs.a; exports.PopoverContent = _chunkULIOO55Ijs.c; exports.PopoverTrigger = _chunkULIOO55Ijs.b; exports.Separator = _chunk7SOZ6MOVjs.a; exports.Sheet = _chunk752ERCMUjs.a; exports.SheetClose = _chunk752ERCMUjs.c; exports.SheetContent = _chunk752ERCMUjs.f; exports.SheetDescription = _chunk752ERCMUjs.j; exports.SheetFooter = _chunk752ERCMUjs.h; exports.SheetHeader = _chunk752ERCMUjs.g; exports.SheetOverlay = _chunk752ERCMUjs.e; exports.SheetPortal = _chunk752ERCMUjs.d; exports.SheetTitle = _chunk752ERCMUjs.i; exports.SheetTrigger = _chunk752ERCMUjs.b; exports.Sidebar = _chunkIHBEMOHHjs.c; exports.SidebarContent = _chunkIHBEMOHHjs.k; exports.SidebarFooter = _chunkIHBEMOHHjs.i; exports.SidebarGroup = _chunkIHBEMOHHjs.l; exports.SidebarGroupAction = _chunkIHBEMOHHjs.n; exports.SidebarGroupContent = _chunkIHBEMOHHjs.o; exports.SidebarGroupLabel = _chunkIHBEMOHHjs.m; exports.SidebarHeader = _chunkIHBEMOHHjs.h; exports.SidebarInput = _chunkIHBEMOHHjs.g; exports.SidebarInset = _chunkIHBEMOHHjs.f; exports.SidebarMenu = _chunkIHBEMOHHjs.p; exports.SidebarMenuAction = _chunkIHBEMOHHjs.s; exports.SidebarMenuBadge = _chunkIHBEMOHHjs.t; exports.SidebarMenuButton = _chunkIHBEMOHHjs.r; exports.SidebarMenuItem = _chunkIHBEMOHHjs.q; exports.SidebarMenuSkeleton = _chunkIHBEMOHHjs.u; exports.SidebarMenuSub = _chunkIHBEMOHHjs.v; exports.SidebarMenuSubButton = _chunkIHBEMOHHjs.x; exports.SidebarMenuSubItem = _chunkIHBEMOHHjs.w; exports.SidebarProvider = _chunkIHBEMOHHjs.b; exports.SidebarRail = _chunkIHBEMOHHjs.e; exports.SidebarSeparator = _chunkIHBEMOHHjs.j; exports.SidebarTrigger = _chunkIHBEMOHHjs.d; exports.Skeleton = _chunk5L5DM2X5js.a; exports.Table = _chunk2ESUPMMPjs.a; exports.TableBody = _chunk2ESUPMMPjs.c; exports.TableCaption = _chunk2ESUPMMPjs.h; exports.TableCell = _chunk2ESUPMMPjs.g; exports.TableFooter = _chunk2ESUPMMPjs.d; exports.TableHead = _chunk2ESUPMMPjs.f; exports.TableHeader = _chunk2ESUPMMPjs.b; exports.TableRow = _chunk2ESUPMMPjs.e; exports.Tabs = _chunkQDJM5EVMjs.a; exports.TabsContent = _chunkQDJM5EVMjs.d; exports.TabsList = _chunkQDJM5EVMjs.b; exports.TabsTrigger = _chunkQDJM5EVMjs.c; exports.TextDecoder = _chunkBENG4LHZjs.a; exports.Tooltip = _chunkB7XXLTYNjs.b; exports.TooltipContent = _chunkB7XXLTYNjs.d; exports.TooltipProvider = _chunkB7XXLTYNjs.a; exports.TooltipTrigger = _chunkB7XXLTYNjs.c; exports.buttonVariants = _chunkQKOZTOYUjs.a; exports.cn = _chunkFUYXCJOQjs.a; exports.getSeedColor = _chunk372VUZFEjs.b; exports.getSphericalGradient = _chunk372VUZFEjs.a; exports.useDrawer = _chunkMGFKSA3Mjs.a; exports.useSidebar = _chunkIHBEMOHHjs.a;
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{a as M,b as T,c as P,d as j,e as I,f as F,g as L,h as G,i as H,j as N,k as R,l as B,m as E,n as A,o as U,p as O,q,r as V,s as J,t as K,u as Q,v as W,w as X,x as Y}from"./chunk-
|
|
2
|
+
import{a as M,b as T,c as P,d as j,e as I,f as F,g as L,h as G,i as H,j as N,k as R,l as B,m as E,n as A,o as U,p as O,q,r as V,s as J,t as K,u as Q,v as W,w as X,x as Y}from"./chunk-UOHFERPQ.mjs";import{a as S,b as D,c as _,d as C}from"./chunk-BB3WNO72.mjs";import{a as g}from"./chunk-YBV4CPVD.mjs";import{a as w,b as v,c as h,d as u,e as m,f as b,g as f,h as x,i as y,j as k}from"./chunk-DMHIFNXF.mjs";import{a as z}from"./chunk-CNRZOMR4.mjs";import{a as _r,b as Cr,c as Mr,d as Tr,e as Pr,f as jr,g as Ir,h as Fr}from"./chunk-UDKQL3NS.mjs";import{a as e,b as o,c as i,d as n}from"./chunk-HPJEH5QX.mjs";import{a as Z,b as $,c as rr,d as ar,e as tr,f as er}from"./chunk-DDNTB3TM.mjs";import{a as pr,b as gr,c as wr,d as vr,e as hr,f as ur,g as mr,h as br,i as fr,j as xr,k as yr,l as kr,m as zr,n as Sr,o as Dr}from"./chunk-IFTA7LUP.mjs";import{a as cr,b as lr,c as dr}from"./chunk-L36V45FD.mjs";import{a as p}from"./chunk-ITTWKO7B.mjs";import{a as or}from"./chunk-GOZDJRUZ.mjs";import{a as ta}from"./chunk-S2H6HVK3.mjs";import{a as Lr,b as Gr,c as Hr}from"./chunk-FZ3NXOFK.mjs";import{a as Kr,b as Qr,c as Wr,d as Xr,e as Yr,f as Zr,g as $r,h as ra,i as aa}from"./chunk-C6JJOMDI.mjs";import{a as Nr,b as Rr,c as Br,d as Er,e as Ar,f as Ur,g as Or,h as qr,i as Vr,j as Jr}from"./chunk-NADDRUK4.mjs";import"./chunk-4LR7SOCY.mjs";import{a as nr}from"./chunk-4MRKQFSX.mjs";import{a as sr}from"./chunk-4IGQAGUJ.mjs";import{a as ir}from"./chunk-54WJMOJX.mjs";import{a,b as t}from"./chunk-2YRLGFWP.mjs";import{a as d}from"./chunk-FINC3UAQ.mjs";import{b as c}from"./chunk-AEZ5XKKG.mjs";import{a as l}from"./chunk-WF73K6X2.mjs";import{a as s}from"./chunk-EMGXHXG7.mjs";import{a as ea,b as oa}from"./chunk-4LUOGI24.mjs";import{a as r}from"./chunk-S5TKCF6T.mjs";import"./chunk-KPAOPUY2.mjs";export{t as Button,ir as Calendar,ta as Combobox,Kr as Command,Qr as CommandDialog,Yr as CommandEmpty,Zr as CommandGroup,Wr as CommandInput,ra as CommandItem,Xr as CommandList,$r as CommandSeparator,aa as CommandShortcut,nr as DatePicker,sr as DateRangePicker,Nr as Dialog,Er as DialogClose,Ur as DialogContent,Jr as DialogDescription,qr as DialogFooter,Or as DialogHeader,Ar as DialogOverlay,Br as DialogPortal,Vr as DialogTitle,Rr as DialogTrigger,$ as Drawer,tr as DrawerBody,er as DrawerFooter,rr as DrawerHeader,ar as DrawerTitle,pr as DropdownMenu,yr as DropdownMenuCheckboxItem,fr as DropdownMenuContent,wr as DropdownMenuGroup,xr as DropdownMenuItem,zr as DropdownMenuLabel,vr as DropdownMenuPortal,ur as DropdownMenuRadioGroup,kr as DropdownMenuRadioItem,Sr as DropdownMenuSeparator,Dr as DropdownMenuShortcut,hr as DropdownMenuSub,br as DropdownMenuSubContent,mr as DropdownMenuSubTrigger,gr as DropdownMenuTrigger,cr as Field,dr as FieldDescription,lr as FieldLabel,d as GeometricFluidGrid,c as GlitchLink,p as Input,or as Label,l as PixelLoad,Lr as Popover,Hr as PopoverContent,Gr as PopoverTrigger,g as Separator,w as Sheet,h as SheetClose,b as SheetContent,k as SheetDescription,x as SheetFooter,f as SheetHeader,m as SheetOverlay,u as SheetPortal,y as SheetTitle,v as SheetTrigger,P as Sidebar,R as SidebarContent,H as SidebarFooter,B as SidebarGroup,A as SidebarGroupAction,U as SidebarGroupContent,E as SidebarGroupLabel,G as SidebarHeader,L as SidebarInput,F as SidebarInset,O as SidebarMenu,J as SidebarMenuAction,K as SidebarMenuBadge,V as SidebarMenuButton,q as SidebarMenuItem,Q as SidebarMenuSkeleton,W as SidebarMenuSub,Y as SidebarMenuSubButton,X as SidebarMenuSubItem,T as SidebarProvider,I as SidebarRail,N as SidebarSeparator,j as SidebarTrigger,z as Skeleton,_r as Table,Mr as TableBody,Fr as TableCaption,Ir as TableCell,Tr as TableFooter,jr as TableHead,Cr as TableHeader,Pr as TableRow,e as Tabs,n as TabsContent,o as TabsList,i as TabsTrigger,s as TextDecoder,D as Tooltip,C as TooltipContent,S as TooltipProvider,_ as TooltipTrigger,a as buttonVariants,r as cn,oa as getSeedColor,ea as getSphericalGradient,Z as useDrawer,M as useSidebar};
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
package/dist/chunk-HFPE6JXI.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as u}from"./chunk-4LR7SOCY.mjs";import{b as D}from"./chunk-2YRLGFWP.mjs";import{a as l}from"./chunk-S5TKCF6T.mjs";import*as i from"react";import*as e from"@radix-ui/react-dialog";import{Drawer as g}from"vaul";import{X as v}from"lucide-react";import{jsx as t,jsxs as d}from"react/jsx-runtime";var y=i.createContext({}),C=({children:a,open:o,onOpenChange:n,...s})=>{let[p,c]=i.useState(!1),f=o!==void 0,m=f?o:p,r=f?n:R=>{c(R)};return t(e.Root,{open:m,onOpenChange:r,...s,children:t(y.Provider,{value:{open:m,onOpenChange:r},children:a})})};C.displayName="Dialog";var M=e.Trigger,P=e.Portal,L=e.Close,b=i.forwardRef(({className:a,...o},n)=>t(e.Overlay,{ref:n,className:l("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a),...o}));b.displayName=e.Overlay.displayName;var x=i.forwardRef(({className:a,children:o,showCloseButton:n=!0,closeOnOverlayClick:s=!0,...p},c)=>{let f=u("md"),m=i.useContext(y);return f?d(P,{children:[t(b,{}),d(e.Content,{ref:c,className:l("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 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 sm:rounded-3xl overflow-auto",a),onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[o,n&&d(e.Close,{className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[t(D,{variant:"secondary",size:"icon",children:t(v,{className:"h-4 w-4"})}),t("span",{className:"sr-only",children:"Close"})]})]})]}):t(P,{children:t(g.Root,{open:m.open,onOpenChange:m.onOpenChange,dismissible:s,children:d(g.Portal,{children:[t(g.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),d(g.Content,{ref:c,className:l("fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none",a),"aria-describedby":void 0,onPointerDownOutside:r=>{s||r.preventDefault()},onEscapeKeyDown:r=>{s||r.preventDefault()},...p,children:[t("div",{className:"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted"}),t("div",{children:o}),n&&d("button",{onClick:()=>m.onOpenChange?.(!1),className:"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none",children:[t(D,{variant:"secondary",size:"icon",children:t(v,{className:"h-4 w-4"})}),t("span",{className:"sr-only",children:"Close"})]})]})]})})})});x.displayName=e.Content.displayName;var N=({className:a,...o})=>t("div",{className:l("flex flex-col space-y-1.5 text-center sm:text-left",a),...o});N.displayName="DialogHeader";var w=({className:a,...o})=>t("div",{className:l("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",a),...o});w.displayName="DialogFooter";var h=i.forwardRef(({className:a,...o},n)=>t(e.Title,{ref:n,className:l("text-lg font-semibold leading-none tracking-tight",a),...o}));h.displayName=e.Title.displayName;var T=i.forwardRef(({className:a,...o},n)=>t(e.Description,{ref:n,className:l("text-sm text-muted-foreground",a),...o}));T.displayName=e.Description.displayName;export{C as a,M as b,P as c,L as d,b as e,x as f,N as g,w as h,h as i,T as j};
|
|
3
|
-
//# sourceMappingURL=chunk-HFPE6JXI.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n <div>{children}</div>\n {showCloseButton && (\n <button\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </button>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 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 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"],"mappings":";2HAEA,UAAYA,MAAW,QACvB,UAAYC,MAAqB,yBACjC,OAAS,UAAUC,MAAuB,OAC1C,OAAS,KAAAC,MAAS,eAgCZ,cAAAC,EAkFY,QAAAC,MAlFZ,oBArBN,IAAMC,EAA6B,gBAAyC,CAAC,CAAC,EAExEC,EAAS,CAAC,CACd,SAAAC,EACA,KAAMC,EACN,aAAcC,EACd,GAAGC,CACL,IAAyD,CAEvD,GAAM,CAACC,EAAcC,CAAe,EAAU,WAAS,EAAK,EAEtDC,EAAeL,IAAmB,OAClCM,EAAOD,EAAeL,EAAiBG,EACvCI,EAAeF,EACjBJ,EACCO,GAAqB,CACpBJ,EAAgBI,CAAO,CACzB,EAEJ,OACEb,EAAiB,OAAhB,CAAqB,KAAMW,EAAM,aAAcC,EAAe,GAAGL,EAChE,SAAAP,EAACE,EAAqB,SAArB,CAA8B,MAAO,CAAE,KAAAS,EAAM,aAAAC,CAAa,EACxD,SAAAR,EACH,EACF,CAEJ,EACAD,EAAO,YAAc,SAErB,IAAMW,EAAgC,UAEhCC,EAA+B,SAE/BC,EAA8B,QAE9BC,EAAsB,aAG1B,CAAC,CAAE,UAAAC,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,UAAhB,CACC,IAAKmB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B,GACCrB,EAAC,UACC,QAAS,IAAMyB,EAAQ,eAAe,EAAK,EAC3C,UAAU,2HAEV,UAAA1B,EAAC4B,EAAA,CAAO,QAAQ,YAAY,KAAK,OAC/B,SAAA5B,EAAC6B,EAAA,CAAE,UAAU,UAAU,EACzB,EACA7B,EAAC,QAAK,UAAU,UAAU,iBAAK,GACjC,GAEJ,GACF,EACF,EACF,CAsCN,CACF,EACAqB,EAAc,YAA8B,UAAQ,YAEpD,IAAMU,EAAe,CAAC,CACpB,UAAAb,EACA,GAAGX,CACL,IACEP,EAAC,OACC,UAAWoB,EACT,qDACAF,CACF,EACC,GAAGX,EACN,EAEFwB,EAAa,YAAc,eAE3B,IAAMC,EAAe,CAAC,CACpB,UAAAd,EACA,GAAGX,CACL,IACEP,EAAC,OACC,UAAWoB,EACT,gEACAF,CACF,EACC,GAAGX,EACN,EAEFyB,EAAa,YAAc,eAE3B,IAAMC,EAAoB,aAGxB,CAAC,CAAE,UAAAf,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,QAAhB,CACC,IAAKmB,EACL,UAAWC,EACT,oDACAF,CACF,EACC,GAAGX,EACN,CACD,EACD0B,EAAY,YAA8B,QAAM,YAEhD,IAAMC,EAA0B,aAG9B,CAAC,CAAE,UAAAhB,EAAW,GAAGX,CAAM,EAAGY,IAC1BnB,EAAiB,cAAhB,CACC,IAAKmB,EACL,UAAWC,EAAG,gCAAiCF,CAAS,EACvD,GAAGX,EACN,CACD,EACD2B,EAAkB,YAA8B,cAAY","names":["React","DialogPrimitive","DrawerPrimitive","X","jsx","jsxs","DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"]}
|
package/dist/chunk-HKNXZWMV.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
|
-
var _chunkB7XXLTYNjs = require('./chunk-B7XXLTYN.js');var _chunk7SOZ6MOVjs = require('./chunk-7SOZ6MOV.js');var _chunk752ERCMUjs = require('./chunk-752ERCMU.js');var _chunk5L5DM2X5js = require('./chunk-5L5DM2X5.js');var _chunkRA5BKFITjs = require('./chunk-RA5BKFIT.js');var _chunkQKOZTOYUjs = require('./chunk-QKOZTOYU.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var t = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var Q="sidebar_state",Z=3600*24*7,ee="16.75rem",V="23rem",ae="calc(3rem + 0.75rem)",te="b",j=t.createContext(null);function y(){let e=t.useContext(j);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var re=t.forwardRef(({defaultOpen:e=!0,open:a,onOpenChange:r,className:i,style:s,children:d,...b},l)=>{let[v,f]=t.useState(!1),[u,h]=t.useState(e),[R,S]=t.useState(!1),[x,C]=t.useState(e),m=_nullishCoalesce(a, () => (x)),N=t.useCallback(c=>{let g=typeof c=="function"?c(m):c;r?r(g):C(g),document.cookie=`${Q}=${g}; path=/; max-age=${Z}`},[r,m]),M=t.useCallback(()=>{N(c=>!c)},[N]),I=t.useCallback(()=>{f(c=>!c)},[f]);t.useEffect(()=>{let c=g=>{g.key===te&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),M())};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[M]);let L=m?"expanded":"collapsed",U=t.useMemo(()=>({state:L,isOpen:u,setOpen:N,openMobile:v,setOpenMobile:f,toggleSidebar:M,toggleMobileSidebar:I,setIsFullyOpen:h,isAnimating:R,setIsAnimating:S}),[L,u,N,v,f,M,I,h,R,S]);return _jsxruntime.jsx.call(void 0, j.Provider,{value:U,children:_jsxruntime.jsx.call(void 0, _chunkB7XXLTYNjs.a,{delayDuration:0,children:_jsxruntime.jsx.call(void 0, "div",{style:{"--sidebar-width":ee,"--sidebar-width-icon":ae,...s},className:_chunkFUYXCJOQjs.a.call(void 0, "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),ref:l,...b,children:d})})})});re.displayName="SidebarProvider";var oe=t.forwardRef(({side:e="left",variant:a="sidebar",collapsible:r="offcanvas",className:i,children:s,...d},b)=>{let{state:l,openMobile:v,setOpenMobile:f,setIsFullyOpen:u,setIsAnimating:h}=y(),R=t.useRef(null),S=t.useRef(!0);return t.useEffect(()=>{let x=R.current;if(!x)return;if(S.current){S.current=!1,u(l==="expanded");return}h(!0);let C=m=>{m.target===x&&(m.propertyName==="left"||m.propertyName==="right"||m.propertyName==="width")&&(u(l==="expanded"),h(!1))};return x.addEventListener("transitionend",C),()=>x.removeEventListener("transitionend",C)},[l,u,h]),r==="none"?_jsxruntime.jsx.call(void 0, "aside",{className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:b,...d,children:s}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.a,{open:v,onOpenChange:f,children:_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.f,{"data-sidebar":"sidebar","data-mobile":"true",className:"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{width:V,maxWidth:V},side:e,children:[_jsxruntime.jsxs.call(void 0, _chunk752ERCMUjs.g,{className:"sr-only",children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.i,{children:"Sidebar"}),_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.j,{children:"Displays the mobile sidebar."})]}),_jsxruntime.jsx.call(void 0, "div",{className:"flex h-full w-full flex-col",children:s})]})}),_jsxruntime.jsxs.call(void 0, "aside",{ref:b,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":a,"data-side":e,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),_jsxruntime.jsx.call(void 0, "div",{ref:R,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",i),...d,children:_jsxruntime.jsx.call(void 0, "div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full",children:s})})})]})]})});oe.displayName="Sidebar";var W=t.forwardRef(({className:e,onClick:a,...r},i)=>{let{toggleSidebar:s,toggleMobileSidebar:d,openMobile:b}=y();return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, _chunkQKOZTOYUjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "md:hidden bg-transparent hover:bg-transparent",e),onClick:l=>{_optionalChain([a, 'optionalCall', _2 => _2(l)]),d()},...r,children:[b?_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunkQKOZTOYUjs.a.call(void 0, {variant:"secondary",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.X,{size:16})}):_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunkQKOZTOYUjs.a.call(void 0, {variant:"outline",size:"icon"})),children:_jsxruntime.jsx.call(void 0, _lucidereact.Menu,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]}),_jsxruntime.jsxs.call(void 0, _chunkQKOZTOYUjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent",e),onClick:l=>{_optionalChain([a, 'optionalCall', _3 => _3(l)]),s()},...r,children:[_jsxruntime.jsx.call(void 0, "span",{className:"rounded-full hover:bg-secondary p-2",children:_jsxruntime.jsx.call(void 0, _lucidereact.PanelLeft,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]})]})});W.displayName="SidebarTrigger";var ne=t.forwardRef(({className:e,...a},r)=>{let{toggleSidebar:i}=y();return _jsxruntime.jsx.call(void 0, "button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:_chunkFUYXCJOQjs.a.call(void 0, "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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})});ne.displayName="SidebarRail";var ie=t.memo(t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "main",{ref:r,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...a})));ie.displayName="SidebarInset";var se=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, _chunkRA5BKFITjs.a,{ref:r,"data-sidebar":"input",className:_chunkFUYXCJOQjs.a.call(void 0, "h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...a}));se.displayName="SidebarInput";var de=t.forwardRef(({className:e,showTrigger:a=!1,children:r,...i},s)=>{let{state:d}=y();return _jsxruntime.jsxs.call(void 0, "div",{ref:s,"data-sidebar":"header",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full gap-2 p-2",d==="collapsed"?"justify-center items-center":"justify-between items-start",e),...i,children:[d!=="collapsed"&&_jsxruntime.jsx.call(void 0, "div",{className:"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden",children:_jsxruntime.jsx.call(void 0, "div",{className:"whitespace-nowrap",children:r})}),a&&_jsxruntime.jsx.call(void 0, W,{})]})});de.displayName="SidebarHeader";var le=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-2",e),...a}));le.displayName="SidebarFooter";var ce=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, _chunk7SOZ6MOVjs.a,{ref:r,"data-sidebar":"separator",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-2 w-auto bg-border",e),...a}));ce.displayName="SidebarSeparator";var pe=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"content",className:_chunkFUYXCJOQjs.a.call(void 0, "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2",e),...a}));pe.displayName="SidebarContent";var be=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group",className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",e),...a}));be.displayName="SidebarGroup";var ue=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"div",{ref:i,"data-sidebar":"group-label",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r}));ue.displayName="SidebarGroupLabel";var fe=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"button",{ref:i,"data-sidebar":"group-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r}));fe.displayName="SidebarGroupAction";var me=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"group-content",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full text-sm",e),...a}));me.displayName="SidebarGroupContent";var ge=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full min-w-0 flex-col gap-1",e),...a}));ge.displayName="SidebarMenu";var ve=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "li",{ref:r,"data-sidebar":"menu-item",className:_chunkFUYXCJOQjs.a.call(void 0, "group/menu-item relative",e),...a}));ve.displayName="SidebarMenuItem";var he=_classvarianceauthority.cva.call(void 0, "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground",outline:"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),xe= exports.r =t.forwardRef(({asChild:e=!1,isActive:a=!1,variant:r="default",size:i="default",tooltip:s,className:d,...b},l)=>{let v=e?_reactslot.Slot:"button",{state:f}=y(),u=_jsxruntime.jsx.call(void 0, v,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":a,className:_chunkFUYXCJOQjs.a.call(void 0, he({variant:r,size:i}),d),...b});return s?(typeof s=="string"&&(s={children:s}),_jsxruntime.jsxs.call(void 0, _chunkB7XXLTYNjs.b,{children:[_jsxruntime.jsx.call(void 0, _chunkB7XXLTYNjs.c,{asChild:!0,children:u}),_jsxruntime.jsx.call(void 0, _chunkB7XXLTYNjs.d,{side:"right",align:"center",hidden:f!=="collapsed",...s})]})):u});xe.displayName="SidebarMenuButton";var Re=t.forwardRef(({className:e,asChild:a=!1,showOnHover:r=!1,...i},s)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"button",{ref:s,"data-sidebar":"menu-action",className:_chunkFUYXCJOQjs.a.call(void 0, "absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",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-base-accent-foreground md:opacity-0",e),...i}));Re.displayName="SidebarMenuAction";var Se=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "div",{ref:r,"data-sidebar":"menu-badge",className:_chunkFUYXCJOQjs.a.call(void 0, "pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...a}));Se.displayName="SidebarMenuBadge";var we=t.forwardRef(({className:e,showIcon:a=!1,...r},i)=>{let s=t.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return _jsxruntime.jsxs.call(void 0, "div",{ref:i,"data-sidebar":"menu-skeleton",className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[a&&_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),_jsxruntime.jsx.call(void 0, _chunk5L5DM2X5js.a,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});we.displayName="SidebarMenuSkeleton";var ye=t.forwardRef(({className:e,...a},r)=>_jsxruntime.jsx.call(void 0, "ul",{ref:r,"data-sidebar":"menu-sub",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...a}));ye.displayName="SidebarMenuSub";var Ce=t.forwardRef(({...e},a)=>_jsxruntime.jsx.call(void 0, "li",{ref:a,...e}));Ce.displayName="SidebarMenuSubItem";var Ne=t.forwardRef(({asChild:e=!1,size:a="md",isActive:r,className:i,...s},d)=>_jsxruntime.jsx.call(void 0, e?_reactslot.Slot:"a",{ref:d,"data-sidebar":"menu-sub-button","data-size":a,"data-active":r,className:_chunkFUYXCJOQjs.a.call(void 0, "flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));Ne.displayName="SidebarMenuSubButton";exports.a = y; exports.b = re; exports.c = oe; exports.d = W; exports.e = ne; exports.f = ie; exports.g = se; exports.h = de; exports.i = le; exports.j = ce; exports.k = pe; exports.l = be; exports.m = ue; exports.n = fe; exports.o = me; exports.p = ge; exports.q = ve; exports.r = xe; exports.s = Re; exports.t = Se; exports.u = we; exports.v = ye; exports.w = Ce; exports.x = Ne;
|
|
3
|
-
//# sourceMappingURL=chunk-HKNXZWMV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ORCCYZMU.js","../src/components/dialog.tsx"],"names":["DialogContentContext","Dialog","children","controlledOpen","controlledOnOpenChange","props","internalOpen","setInternalOpen","isControlled","open","onOpenChange","newOpen","jsx","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","ref","cn","DialogContent","showCloseButton","closeOnOverlayClick","isDesktop","useMediaQuery","context","jsxs","e","Button","X","DrawerPrimitive","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":"AAAA,22BAAY;AACZ,sDAAuC,sDAAwC,sDAAwC,uECChG,oGACU,4BACS,2CACxB,+CAgCZ,IArBAA,CAAAA,CAA6B,CAAA,CAAA,aAAA,CAAyC,CAAC,CAAC,CAAA,CAExEC,CAAAA,aAAS,CAAC,CACd,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAMC,CAAAA,CACN,YAAA,CAAcC,CAAAA,CACd,GAAGC,CACL,CAAA,CAAA,EAAyD,CAEvD,GAAM,CAACC,CAAAA,CAAcC,CAAe,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,CAAA,CAAK,CAAA,CAEtDC,CAAAA,CAAeL,CAAAA,GAAmB,KAAA,CAAA,CAClCM,CAAAA,CAAOD,CAAAA,CAAeL,CAAAA,CAAiBG,CAAAA,CACvCI,CAAAA,CAAeF,CAAAA,CACjBJ,CAAAA,CACCO,CAAAA,EAAqB,CACpBJ,CAAAA,CAAgBI,CAAO,CACzB,CAAA,CAEJ,OACEC,6BAAAA,CAAiB,CAAA,IAAA,CAAhB,CAAqB,IAAA,CAAMH,CAAAA,CAAM,YAAA,CAAcC,CAAAA,CAAe,GAAGL,CAAAA,CAChE,QAAA,CAAAO,6BAAAA,CAACZ,CAAqB,QAAA,CAArB,CAA8B,KAAA,CAAO,CAAE,IAAA,CAAAS,CAAAA,CAAM,YAAA,CAAAC,CAAa,CAAA,CACxD,QAAA,CAAAR,CAAAA,CACH,CAAA,CACF,CAEJ,CAAA,CACAD,CAAAA,CAAO,WAAA,CAAc,QAAA,CAErB,IAAMY,CAAAA,CAAgC,CAAA,CAAA,OAAA,CAEhCC,CAAAA,aAA+B,CAAA,CAAA,M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AAiB,CAAA,KAAA,CAAhB,CACC,GAAA,CAAKM,CAAAA,CACL,SAAA,CAAWC,gCAAAA,mDACT,CACAF,CACF,CAAA,CACC,GAAGZ,CAAAA,CACN,CACD,CAAA,CACD4B,CAAAA,CAAY,WAAA,CAA8B,CAAA,CAAA,KAAA,CAAM,WAAA,CAEhD,IAAMC,CAAAA,CAA0B,CAAA,CAAA,UAAA,CAG9B,CAAC,CAAE,SAAA,CAAAjB,CAAAA,CAAW,GAAGZ,CAAM,CAAA,CAAGa,CAAAA,CAAAA,EAC1BN,6BAAAA,CAAiB,CAAA,WAAA,CAAhB,CACC,GAAA,CAAKM,CAAAA,CACL,SAAA,CAAWC,gCAAAA,+BAAG,CAAiCF,CAAS,CAAA,CACvD,GAAGZ,CAAAA,CACN,CACD,CAAA,CACD6B,CAAAA,CAAkB,WAAA,CAA8B,CAAA,CAAA,WAAA,CAAY,WAAA,CAAA,qJAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-ORCCYZMU.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { Drawer as DrawerPrimitive } from \"vaul\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Button } from \"./button\"\nimport { useMediaQuery } from \"@/lib/use-media-query\"\n\ninterface DialogContentContextValue {\n open?: boolean\n onOpenChange?: (open: boolean) => void\n}\n\nconst DialogContentContext = React.createContext<DialogContentContextValue>({})\n\nconst Dialog = ({\n children,\n open: controlledOpen,\n onOpenChange: controlledOnOpenChange,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) => {\n // Use internal state when Dialog is uncontrolled\n const [internalOpen, setInternalOpen] = React.useState(false)\n\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : internalOpen\n const onOpenChange = isControlled\n ? controlledOnOpenChange\n : (newOpen: boolean) => {\n setInternalOpen(newOpen)\n }\n\n return (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} {...props}>\n <DialogContentContext.Provider value={{ open, onOpenChange }}>\n {children}\n </DialogContentContext.Provider>\n </DialogPrimitive.Root>\n )\n}\nDialog.displayName = \"Dialog\"\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n closeOnOverlayClick?: boolean\n }\n>(\n (\n {\n className,\n children,\n showCloseButton = true,\n closeOnOverlayClick = true,\n ...props\n },\n ref\n ) => {\n const isDesktop = useMediaQuery(\"md\")\n const context = React.useContext(DialogContentContext)\n\n if (!isDesktop) {\n // Mobile: Render as bottom drawer\n return (\n <DialogPortal>\n <DrawerPrimitive.Root\n open={context.open}\n onOpenChange={context.onOpenChange}\n dismissible={closeOnOverlayClick}\n >\n <DrawerPrimitive.Portal>\n <DrawerPrimitive.Overlay className=\"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm\" />\n <DrawerPrimitive.Content\n ref={ref as any}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex flex-col rounded-t-3xl border border-border bg-background shadow-lg outline-none\",\n className\n )}\n aria-describedby={undefined}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n <div className=\"mx-auto mt-2 h-2 w-[100px] rounded-full bg-muted\" />\n <div>{children}</div>\n {showCloseButton && (\n <button\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </button>\n )}\n </DrawerPrimitive.Content>\n </DrawerPrimitive.Portal>\n </DrawerPrimitive.Root>\n </DialogPortal>\n )\n }\n\n // Desktop: Render as centered dialog\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-border bg-background shadow-lg duration-200 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 sm:rounded-3xl overflow-auto\",\n className\n )}\n onPointerDownOutside={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n onEscapeKeyDown={(e) => {\n if (!closeOnOverlayClick) {\n e.preventDefault()\n }\n }}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\">\n <Button variant=\"secondary\" size=\"icon\">\n <X className=\"h-4 w-4\" />\n </Button>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPortal>\n )\n }\n)\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col space-y-1.5 text-center sm:text-left\",\n className\n )}\n {...props}\n />\n)\nDialogHeader.displayName = \"DialogHeader\"\n\nconst DialogFooter = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n \"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\",\n className\n )}\n {...props}\n />\n)\nDialogFooter.displayName = \"DialogFooter\"\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\n \"text-lg font-semibold leading-none tracking-tight\",\n className\n )}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n}\n"]}
|
package/dist/chunk-YARQS22V.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{a as O,b as G,c as F,d as K}from"./chunk-BB3WNO72.mjs";import{a as z}from"./chunk-YBV4CPVD.mjs";import{a as D,f as _,g as B,i as k,j as A}from"./chunk-DMHIFNXF.mjs";import{a as P}from"./chunk-CNRZOMR4.mjs";import{a as H}from"./chunk-ITTWKO7B.mjs";import{a as T,b as E}from"./chunk-2YRLGFWP.mjs";import{a as n}from"./chunk-S5TKCF6T.mjs";import*as t from"react";import{Slot as w}from"@radix-ui/react-slot";import{cva as q}from"class-variance-authority";import{PanelLeft as X,X as Y,Menu as J}from"lucide-react";import{Fragment as $,jsx as o,jsxs as p}from"react/jsx-runtime";var Q="sidebar_state",Z=3600*24*7,ee="16.75rem",V="23rem",ae="calc(3rem + 0.75rem)",te="b",j=t.createContext(null);function y(){let e=t.useContext(j);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var re=t.forwardRef(({defaultOpen:e=!0,open:a,onOpenChange:r,className:i,style:s,children:d,...b},l)=>{let[v,f]=t.useState(!1),[u,h]=t.useState(e),[R,S]=t.useState(!1),[x,C]=t.useState(e),m=a??x,N=t.useCallback(c=>{let g=typeof c=="function"?c(m):c;r?r(g):C(g),document.cookie=`${Q}=${g}; path=/; max-age=${Z}`},[r,m]),M=t.useCallback(()=>{N(c=>!c)},[N]),I=t.useCallback(()=>{f(c=>!c)},[f]);t.useEffect(()=>{let c=g=>{g.key===te&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),M())};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[M]);let L=m?"expanded":"collapsed",U=t.useMemo(()=>({state:L,isOpen:u,setOpen:N,openMobile:v,setOpenMobile:f,toggleSidebar:M,toggleMobileSidebar:I,setIsFullyOpen:h,isAnimating:R,setIsAnimating:S}),[L,u,N,v,f,M,I,h,R,S]);return o(j.Provider,{value:U,children:o(O,{delayDuration:0,children:o("div",{style:{"--sidebar-width":ee,"--sidebar-width-icon":ae,...s},className:n("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",i),ref:l,...b,children:d})})})});re.displayName="SidebarProvider";var oe=t.forwardRef(({side:e="left",variant:a="sidebar",collapsible:r="offcanvas",className:i,children:s,...d},b)=>{let{state:l,openMobile:v,setOpenMobile:f,setIsFullyOpen:u,setIsAnimating:h}=y(),R=t.useRef(null),S=t.useRef(!0);return t.useEffect(()=>{let x=R.current;if(!x)return;if(S.current){S.current=!1,u(l==="expanded");return}h(!0);let C=m=>{m.target===x&&(m.propertyName==="left"||m.propertyName==="right"||m.propertyName==="width")&&(u(l==="expanded"),h(!1))};return x.addEventListener("transitionend",C),()=>x.removeEventListener("transitionend",C)},[l,u,h]),r==="none"?o("aside",{className:n("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",i),ref:b,...d,children:s}):p($,{children:[o(D,{open:v,onOpenChange:f,children:p(_,{"data-sidebar":"sidebar","data-mobile":"true",className:"md:hidden bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{width:V,maxWidth:V},side:e,children:[p(B,{className:"sr-only",children:[o(k,{children:"Sidebar"}),o(A,{children:"Displays the mobile sidebar."})]}),o("div",{className:"flex h-full w-full flex-col",children:s})]})}),p("aside",{ref:b,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?r:"","data-variant":a,"data-side":e,children:[o("div",{className:n("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",a==="floating"||a==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),o("div",{ref:R,className:n("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",a==="floating"||a==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",i),...d,children:o("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o("div",{className:"flex flex-col my-2.5 ml-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-full",children:s})})})]})]})});oe.displayName="Sidebar";var W=t.forwardRef(({className:e,onClick:a,...r},i)=>{let{toggleSidebar:s,toggleMobileSidebar:d,openMobile:b}=y();return p($,{children:[p(E,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("md:hidden bg-transparent hover:bg-transparent",e),onClick:l=>{a?.(l),d()},...r,children:[b?o("span",{className:n(T({variant:"secondary",size:"icon"})),children:o(Y,{size:16})}):o("span",{className:n(T({variant:"outline",size:"icon"})),children:o(J,{size:16})}),o("span",{className:"sr-only",children:"Toggle Sidebar"})]}),p(E,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:n("hidden md:flex h-7 w-7 bg-transparent hover:bg-transparent",e),onClick:l=>{a?.(l),s()},...r,children:[o("span",{className:"rounded-full hover:bg-secondary p-2",children:o(X,{size:16})}),o("span",{className:"sr-only",children:"Toggle Sidebar"})]})]})});W.displayName="SidebarTrigger";var ne=t.forwardRef(({className:e,...a},r)=>{let{toggleSidebar:i}=y();return o("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:n("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-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...a})});ne.displayName="SidebarRail";var ie=t.memo(t.forwardRef(({className:e,...a},r)=>o("main",{ref:r,className:n("relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...a})));ie.displayName="SidebarInset";var se=t.forwardRef(({className:e,...a},r)=>o(H,{ref:r,"data-sidebar":"input",className:n("h-8 w-full bg-sidebar shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...a}));se.displayName="SidebarInput";var de=t.forwardRef(({className:e,showTrigger:a=!1,children:r,...i},s)=>{let{state:d}=y();return p("div",{ref:s,"data-sidebar":"header",className:n("flex w-full gap-2 p-2",d==="collapsed"?"justify-center items-center":"justify-between items-start",e),...i,children:[d!=="collapsed"&&o("div",{className:"transition-all duration-200 w-full h-fit flex justify-between overflow-hidden",children:o("div",{className:"whitespace-nowrap",children:r})}),a&&o(W,{})]})});de.displayName="SidebarHeader";var le=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"footer",className:n("flex flex-col gap-2 p-2",e),...a}));le.displayName="SidebarFooter";var ce=t.forwardRef(({className:e,...a},r)=>o(z,{ref:r,"data-sidebar":"separator",className:n("mx-2 w-auto bg-border",e),...a}));ce.displayName="SidebarSeparator";var pe=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"content",className:n("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden p-2",e),...a}));pe.displayName="SidebarContent";var be=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"group",className:n("relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",e),...a}));be.displayName="SidebarGroup";var ue=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>o(a?w:"div",{ref:i,"data-sidebar":"group-label",className:n("flex h-8 shrink-0 items-center rounded-md text-xs font-medium text-secondary-text outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r}));ue.displayName="SidebarGroupLabel";var fe=t.forwardRef(({className:e,asChild:a=!1,...r},i)=>o(a?w:"button",{ref:i,"data-sidebar":"group-action",className:n("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r}));fe.displayName="SidebarGroupAction";var me=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"group-content",className:n("w-full text-sm",e),...a}));me.displayName="SidebarGroupContent";var ge=t.forwardRef(({className:e,...a},r)=>o("ul",{ref:r,"data-sidebar":"menu",className:n("flex w-full min-w-0 flex-col gap-1",e),...a}));ge.displayName="SidebarMenu";var ve=t.forwardRef(({className:e,...a},r)=>o("li",{ref:r,"data-sidebar":"menu-item",className:n("group/menu-item relative",e),...a}));ve.displayName="SidebarMenuItem";var he=q("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent/20 hover:text-sidebar-accent-foreground",outline:"bg-sidebar shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),xe=t.forwardRef(({asChild:e=!1,isActive:a=!1,variant:r="default",size:i="default",tooltip:s,className:d,...b},l)=>{let v=e?w:"button",{state:f}=y(),u=o(v,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":a,className:n(he({variant:r,size:i}),d),...b});return s?(typeof s=="string"&&(s={children:s}),p(G,{children:[o(F,{asChild:!0,children:u}),o(K,{side:"right",align:"center",hidden:f!=="collapsed",...s})]})):u});xe.displayName="SidebarMenuButton";var Re=t.forwardRef(({className:e,asChild:a=!1,showOnHover:r=!1,...i},s)=>o(a?w:"button",{ref:s,"data-sidebar":"menu-action",className:n("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",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-base-accent-foreground md:opacity-0",e),...i}));Re.displayName="SidebarMenuAction";var Se=t.forwardRef(({className:e,...a},r)=>o("div",{ref:r,"data-sidebar":"menu-badge",className:n("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...a}));Se.displayName="SidebarMenuBadge";var we=t.forwardRef(({className:e,showIcon:a=!1,...r},i)=>{let s=t.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return p("div",{ref:i,"data-sidebar":"menu-skeleton",className:n("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[a&&o(P,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),o(P,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":s}})]})});we.displayName="SidebarMenuSkeleton";var ye=t.forwardRef(({className:e,...a},r)=>o("ul",{ref:r,"data-sidebar":"menu-sub",className:n("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...a}));ye.displayName="SidebarMenuSub";var Ce=t.forwardRef(({...e},a)=>o("li",{ref:a,...e}));Ce.displayName="SidebarMenuSubItem";var Ne=t.forwardRef(({asChild:e=!1,size:a="md",isActive:r,className:i,...s},d)=>o(e?w:"a",{ref:d,"data-sidebar":"menu-sub-button","data-size":a,"data-active":r,className:n("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",a==="sm"&&"text-xs",a==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));Ne.displayName="SidebarMenuSubButton";export{y as a,re as b,oe as c,W as d,ne as e,ie as f,se as g,de as h,le as i,ce as j,pe as k,be as l,ue as m,fe as n,me as o,ge as p,ve as q,xe as r,Re as s,Se as t,we as u,ye as v,Ce as w,Ne as x};
|
|
3
|
-
//# sourceMappingURL=chunk-YARQS22V.mjs.map
|
|
File without changes
|
|
File without changes
|