@alkimi.org/ui-kit 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/chunk-3FBDNJG5.js +3 -0
  2. package/dist/chunk-3FBDNJG5.js.map +1 -0
  3. package/dist/chunk-527KMCOG.js +3 -0
  4. package/dist/chunk-527KMCOG.js.map +1 -0
  5. package/dist/{chunk-WIQVLJ4E.js → chunk-5D66A4ZC.js} +2 -2
  6. package/dist/{chunk-WIQVLJ4E.js.map → chunk-5D66A4ZC.js.map} +1 -1
  7. package/dist/chunk-5X26XR44.js +3 -0
  8. package/dist/chunk-5X26XR44.js.map +1 -0
  9. package/dist/{chunk-MO2LRV57.js → chunk-65YNHKNP.js} +2 -2
  10. package/dist/{chunk-MO2LRV57.js.map → chunk-65YNHKNP.js.map} +1 -1
  11. package/dist/{chunk-XNNZN4OY.mjs → chunk-7APORI4E.mjs} +2 -2
  12. package/dist/{chunk-7FX23JBQ.mjs → chunk-AL2CF5GT.mjs} +2 -2
  13. package/dist/{chunk-BWPUNSDD.js → chunk-ANKLITGS.js} +2 -2
  14. package/dist/{chunk-BWPUNSDD.js.map → chunk-ANKLITGS.js.map} +1 -1
  15. package/dist/chunk-C7GTPYMH.mjs +3 -0
  16. package/dist/chunk-C7GTPYMH.mjs.map +1 -0
  17. package/dist/{chunk-WPUW2XFI.js → chunk-CP7BC57S.js} +2 -2
  18. package/dist/{chunk-WPUW2XFI.js.map → chunk-CP7BC57S.js.map} +1 -1
  19. package/dist/chunk-G7EYYKWS.js +3 -0
  20. package/dist/chunk-G7EYYKWS.js.map +1 -0
  21. package/dist/{chunk-HKLR7AH3.js → chunk-GVSERRZX.js} +2 -2
  22. package/dist/{chunk-HKLR7AH3.js.map → chunk-GVSERRZX.js.map} +1 -1
  23. package/dist/chunk-HRYHWWL4.mjs +3 -0
  24. package/dist/chunk-HRYHWWL4.mjs.map +1 -0
  25. package/dist/chunk-IXP2VV7S.mjs +3 -0
  26. package/dist/chunk-IXP2VV7S.mjs.map +1 -0
  27. package/dist/chunk-KGNX6UST.mjs +3 -0
  28. package/dist/chunk-KGNX6UST.mjs.map +1 -0
  29. package/dist/chunk-LCKRYIEJ.js +3 -0
  30. package/dist/chunk-LCKRYIEJ.js.map +1 -0
  31. package/dist/{chunk-JKSXSLVB.mjs → chunk-NGEWZBAJ.mjs} +2 -2
  32. package/dist/{chunk-7T4BNCXL.js → chunk-OXMHA73F.js} +2 -2
  33. package/dist/chunk-OXMHA73F.js.map +1 -0
  34. package/dist/{chunk-25PBXFF5.js → chunk-QMGLM2OR.js} +2 -2
  35. package/dist/chunk-QMGLM2OR.js.map +1 -0
  36. package/dist/chunk-RGSVOR7N.mjs +3 -0
  37. package/dist/chunk-RGSVOR7N.mjs.map +1 -0
  38. package/dist/{chunk-TUQM7P2C.js → chunk-RTGC7LPL.js} +2 -2
  39. package/dist/{chunk-TUQM7P2C.js.map → chunk-RTGC7LPL.js.map} +1 -1
  40. package/dist/chunk-S2TENS3V.mjs +3 -0
  41. package/dist/chunk-S2TENS3V.mjs.map +1 -0
  42. package/dist/{chunk-RJKKQWP2.js → chunk-SBL3PCZC.js} +2 -2
  43. package/dist/{chunk-RJKKQWP2.js.map → chunk-SBL3PCZC.js.map} +1 -1
  44. package/dist/{chunk-FR56YJGL.mjs → chunk-TAMQA7LM.mjs} +2 -2
  45. package/dist/{chunk-FR56YJGL.mjs.map → chunk-TAMQA7LM.mjs.map} +1 -1
  46. package/dist/{chunk-TLWWS45Z.mjs → chunk-U6XL5TKL.mjs} +2 -2
  47. package/dist/{chunk-WBCFLFLW.mjs → chunk-VDRRSPND.mjs} +2 -2
  48. package/dist/chunk-VMOF3XI2.mjs +3 -0
  49. package/dist/chunk-VMOF3XI2.mjs.map +1 -0
  50. package/dist/chunk-XFLIVHNV.mjs +3 -0
  51. package/dist/chunk-XFLIVHNV.mjs.map +1 -0
  52. package/dist/{chunk-RFYGH7BH.mjs → chunk-YENXK5HF.mjs} +2 -2
  53. package/dist/chunk-YENXK5HF.mjs.map +1 -0
  54. package/dist/chunk-ZDWAY77K.js +3 -0
  55. package/dist/{chunk-2S3AGBKQ.js.map → chunk-ZDWAY77K.js.map} +1 -1
  56. package/dist/components/TextDecoder.d.mts +1 -0
  57. package/dist/components/TextDecoder.d.ts +1 -0
  58. package/dist/components/TextDecoder.js +1 -1
  59. package/dist/components/TextDecoder.mjs +1 -1
  60. package/dist/components/button.d.mts +1 -1
  61. package/dist/components/button.d.ts +1 -1
  62. package/dist/components/button.js +1 -1
  63. package/dist/components/button.mjs +1 -1
  64. package/dist/components/calendar.js +1 -1
  65. package/dist/components/calendar.mjs +1 -1
  66. package/dist/components/card.d.mts +1 -0
  67. package/dist/components/card.d.ts +1 -0
  68. package/dist/components/card.js +1 -1
  69. package/dist/components/card.js.map +1 -1
  70. package/dist/components/card.mjs +1 -1
  71. package/dist/components/card.mjs.map +1 -1
  72. package/dist/components/checkbox.js +1 -1
  73. package/dist/components/checkbox.mjs +1 -1
  74. package/dist/components/combobox.d.mts +8 -3
  75. package/dist/components/combobox.d.ts +8 -3
  76. package/dist/components/combobox.js +1 -1
  77. package/dist/components/combobox.mjs +1 -1
  78. package/dist/components/command.js +1 -1
  79. package/dist/components/command.mjs +1 -1
  80. package/dist/components/date-picker.js +1 -1
  81. package/dist/components/date-picker.mjs +1 -1
  82. package/dist/components/date-range-picker.js +1 -1
  83. package/dist/components/date-range-picker.mjs +1 -1
  84. package/dist/components/dialog.js +1 -1
  85. package/dist/components/dialog.mjs +1 -1
  86. package/dist/components/drawer.js +1 -1
  87. package/dist/components/drawer.mjs +1 -1
  88. package/dist/components/file-upload.js +1 -1
  89. package/dist/components/file-upload.mjs +1 -1
  90. package/dist/components/sidebar.js +1 -1
  91. package/dist/components/sidebar.mjs +1 -1
  92. package/dist/components/table.d.mts +2 -1
  93. package/dist/components/table.d.ts +2 -1
  94. package/dist/components/table.js +1 -1
  95. package/dist/components/table.mjs +1 -1
  96. package/dist/components/tabs.js +1 -1
  97. package/dist/components/tabs.mjs +1 -1
  98. package/dist/components/tree-select.d.mts +26 -0
  99. package/dist/components/tree-select.d.ts +26 -0
  100. package/dist/components/tree-select.js +3 -0
  101. package/dist/components/tree-select.js.map +1 -0
  102. package/dist/components/tree-select.mjs +3 -0
  103. package/dist/components/tree-select.mjs.map +1 -0
  104. package/dist/index.css +1 -1
  105. package/dist/index.css.map +1 -1
  106. package/dist/index.d.mts +2 -1
  107. package/dist/index.d.ts +2 -1
  108. package/dist/index.js +1 -1
  109. package/dist/index.js.map +1 -1
  110. package/dist/index.mjs +1 -1
  111. package/dist/styles.css +1 -1
  112. package/dist/styles.css.map +1 -1
  113. package/package.json +1 -1
  114. package/dist/chunk-24H4O2Z5.js +0 -3
  115. package/dist/chunk-24H4O2Z5.js.map +0 -1
  116. package/dist/chunk-25PBXFF5.js.map +0 -1
  117. package/dist/chunk-2S3AGBKQ.js +0 -3
  118. package/dist/chunk-7T4BNCXL.js.map +0 -1
  119. package/dist/chunk-A7NIT2PJ.mjs +0 -3
  120. package/dist/chunk-A7NIT2PJ.mjs.map +0 -1
  121. package/dist/chunk-BENG4LHZ.js +0 -3
  122. package/dist/chunk-BENG4LHZ.js.map +0 -1
  123. package/dist/chunk-CDWSOB6B.mjs +0 -3
  124. package/dist/chunk-CDWSOB6B.mjs.map +0 -1
  125. package/dist/chunk-EMGXHXG7.mjs +0 -3
  126. package/dist/chunk-EMGXHXG7.mjs.map +0 -1
  127. package/dist/chunk-ERWX5WSB.js +0 -3
  128. package/dist/chunk-ERWX5WSB.js.map +0 -1
  129. package/dist/chunk-KPMYIU6M.mjs +0 -3
  130. package/dist/chunk-KPMYIU6M.mjs.map +0 -1
  131. package/dist/chunk-M3DW2W2P.js +0 -3
  132. package/dist/chunk-M3DW2W2P.js.map +0 -1
  133. package/dist/chunk-MPAY33XW.mjs +0 -3
  134. package/dist/chunk-MPAY33XW.mjs.map +0 -1
  135. package/dist/chunk-RFYGH7BH.mjs.map +0 -1
  136. package/dist/chunk-TF36SKHU.mjs +0 -3
  137. package/dist/chunk-TF36SKHU.mjs.map +0 -1
  138. package/dist/chunk-W65OWFZY.mjs +0 -3
  139. package/dist/chunk-W65OWFZY.mjs.map +0 -1
  140. /package/dist/{chunk-XNNZN4OY.mjs.map → chunk-7APORI4E.mjs.map} +0 -0
  141. /package/dist/{chunk-7FX23JBQ.mjs.map → chunk-AL2CF5GT.mjs.map} +0 -0
  142. /package/dist/{chunk-JKSXSLVB.mjs.map → chunk-NGEWZBAJ.mjs.map} +0 -0
  143. /package/dist/{chunk-TLWWS45Z.mjs.map → chunk-U6XL5TKL.mjs.map} +0 -0
  144. /package/dist/{chunk-WBCFLFLW.mjs.map → chunk-VDRRSPND.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-WPUW2XFI.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,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.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 {showCloseButton && (\n <Button\n variant=\"secondary\"\n size=\"icon\"\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n )}\n <div>{children}</div>\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 asChild>\n <Button\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\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"]}
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-CP7BC57S.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,Y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AA,CAAA,EACEO,6BAAAA,KAAC,CAAA,CACC,SAAA,CAAWO,gCAAAA,+DACT,CACAF,CACF,CAAA,CACC,GAAGZ,CAAAA,CACN,CAAA,CAEF2B,CAAAA,CAAa,WAAA,CAAc,cAAA,CAE3B,IAAMC,CAAAA,CAAoB,CAAA,CAAA,UAAA,CAGxB,CAAC,CAAE,SAAA,CAAAhB,CAAAA,CAAW,GAAGZ,CAAM,CAAA,CAAGa,CAAAA,CAAAA,EAC1BN,6BAAAA,CAAiB,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-CP7BC57S.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 {showCloseButton && (\n <Button\n variant=\"secondary\"\n size=\"icon\"\n onClick={() => context.onOpenChange?.(false)}\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\n )}\n <div>{children}</div>\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 asChild>\n <Button\n variant=\"secondary\"\n size=\"icon\"\n className=\"absolute right-4 top-4 rounded-full transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none\"\n >\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </Button>\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-left md:text-center\",\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 strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }"use client";
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var _react2 = _interopRequireDefault(_react);var _jsxruntime = require('react/jsx-runtime');var j="!<>-_\\/[]{}\u2014=+*^?#________",D=e=>e[Math.floor(Math.random()*e.length)],M=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(Array.isArray(e))return e.map(M).join("");if(_react2.default.isValidElement(e)){let a=e.props;return(a.text||"")+(a.label||"")+(a.title||"")+M(a.children)}return""},R=(e,a,l)=>{if(typeof e=="string"||typeof e=="number"){let f=String(e),c=[];for(let p=0;p<f.length;p++)c.push(_jsxruntime.jsx.call(void 0, _react2.default.Fragment,{children:a[l.current]||""},`char-${l.current}`)),l.current++;return c}if(Array.isArray(e))return e.map((f,c)=>_jsxruntime.jsx.call(void 0, _react2.default.Fragment,{children:R(f,a,l)},`arr-${c}-${l.current}`));if(_react2.default.isValidElement(e)){let f=e.props,c={};return f.children&&(c.children=R(f.children,a,l)),_react2.default.cloneElement(e,c)}return e},L=({children:e,className:a,duration:l=40,symbols:f=j,delay:c=0,isLoading:p=!1})=>{let[C,T]=_react.useState.call(void 0, null),[I,y]=_react.useState.call(void 0, !1),A=_react.useRef.call(void 0, null),d=_react.useRef.call(void 0, 0),N=_react.useRef.call(void 0, []),t=_react.useRef.call(void 0, null),x=_react.useRef.call(void 0, !1),m=_react.useMemo.call(void 0, ()=>M(e),[e]),_=()=>{let r=[];for(let u=0;u<m.length;u++){let n=m[u],o=Math.floor(Math.random()*(l*.5)),s=o+Math.floor(Math.random()*(l*.5));r.push({to:n,start:o,end:s})}N.current=r,d.current=0,y(!1)},g=_react.useRef.call(void 0, []),k=()=>{let r=[];g.current.length!==m.length&&(g.current=new Array(m.length).fill(void 0));for(let n=0;n<m.length;n++){let o=m[n];o===" "?r.push(" "):((!g.current[n]||Math.random()<.28)&&(g.current[n]=D(f)),r.push(_jsxruntime.jsxs.call(void 0, "span",{className:"relative inline-block",children:[_jsxruntime.jsx.call(void 0, "span",{className:"invisible select-none","aria-hidden":"true",children:o}),_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none",children:g.current[n]})]},n)))}T(R(e,r,{current:0})),t.current=requestAnimationFrame(k)},F=()=>{let r=0,u=[];for(let o=0;o<N.current.length;o++){let s=N.current[o];d.current>=s.end?(r++,u.push(s.to)):(d.current>=s.start&&(!s.char||Math.random()<.28)&&(s.char=D(f)),u.push(_jsxruntime.jsxs.call(void 0, "span",{className:"relative inline-block",children:[_jsxruntime.jsx.call(void 0, "span",{className:"invisible select-none","aria-hidden":"true",children:s.to===" "?"\xA0":s.to}),d.current>=s.start&&_jsxruntime.jsx.call(void 0, "span",{className:"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none",children:s.char})]},o)))}T(R(e,u,{current:0})),r===N.current.length?y(!0):(d.current++,t.current=requestAnimationFrame(F))},S=_react.useRef.call(void 0, !1);return _react.useEffect.call(void 0, ()=>{if(p)return S.current=!0,x.current=!0,y(!1),t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(k),()=>{t.current&&cancelAnimationFrame(t.current)};if(S.current)return S.current=!1,_(),t.current=requestAnimationFrame(F),()=>{t.current&&cancelAnimationFrame(t.current)}},[p,m]),_react.useEffect.call(void 0, ()=>{if(p)return;let r=new IntersectionObserver(u=>{if(u[0].isIntersecting&&!x.current){x.current=!0;let n=setTimeout(()=>{_(),t.current=requestAnimationFrame(F)},c);return()=>clearTimeout(n)}},{threshold:.1});return A.current&&r.observe(A.current),()=>{r.disconnect(),t.current&&cancelAnimationFrame(t.current)}},[m,c,p]),_jsxruntime.jsx.call(void 0, "span",{ref:A,className:_chunkFUYXCJOQjs.a.call(void 0, "inline-block whitespace-pre-wrap",a),children:I?e:C})};function O(e){return _jsxruntime.jsx.call(void 0, _react.Suspense,{fallback:_jsxruntime.jsx.call(void 0, "span",{className:"invisible",children:e.children}),children:_jsxruntime.jsx.call(void 0, L,{...e})})}exports.a = O;
3
+ //# sourceMappingURL=chunk-G7EYYKWS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-G7EYYKWS.js","../src/components/TextDecoder.tsx"],"names":["SYMBOLS","randomChar","symbols","extractText","node","React","props","injectScrambledText","scrambledChars","indexObj","text","result","i","jsx"],"mappings":"AAAA,qLAAY;AACZ,sDAAuC,4ECQhC,+CAgCC,IA9BFA,CAAAA,CAAU,kCAAA,CAEVC,CAAAA,CAAcC,CAAAA,EAClBA,CAAAA,CAAQ,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,CAAA,CAAIA,CAAAA,CAAQ,MAAM,CAAC,CAAA,CAE9CC,CAAAA,CAAeC,CAAAA,EAA4B,CAC/C,EAAA,CAAI,OAAOA,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,OAAO,MAAA,CAAOA,CAAI,CAAA,CAC5E,EAAA,CAAI,KAAA,CAAM,OAAA,CAAQA,CAAI,CAAA,CAAG,OAAOA,CAAAA,CAAK,GAAA,CAAID,CAAW,CAAA,CAAE,IAAA,CAAK,EAAE,CAAA,CAC7D,EAAA,CAAIE,eAAAA,CAAM,cAAA,CAAeD,CAAI,CAAA,CAAG,CAC9B,IAAME,CAAAA,CAAQF,CAAAA,CAAK,KAAA,CACnB,MAAA,CACGE,CAAAA,CAAM,IAAA,EAAQ,EAAA,CAAA,CAAA,CACdA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAAA,CACfA,CAAAA,CAAM,KAAA,EAAS,EAAA,CAAA,CAChBH,CAAAA,CAAYG,CAAAA,CAAM,QAAQ,CAE9B,CACA,MAAO,EACT,CAAA,CAEMC,CAAAA,CAAsB,CAC1BH,CAAAA,CACAI,CAAAA,CACAC,CAAAA,CAAAA,EACc,CACd,EAAA,CAAI,OAAOL,CAAAA,EAAS,QAAA,EAAY,OAAOA,CAAAA,EAAS,QAAA,CAAU,CACxD,IAAMM,CAAAA,CAAO,MAAA,CAAON,CAAI,CAAA,CAClBO,CAAAA,CAAiC,CAAC,CAAA,CACxC,GAAA,CAAA,IAASC,CAAAA,CAAI,CAAA,CAAGA,CAAAA,CAAIF,CAAAA,CAAK,MAAA,CAAQE,CAAAA,EAAAA,CAC/BD,CAAAA,CAAO,IAAA,CACLE,6BAAAA,eAACR,CAAM,QAAA,CAAN,CACE,QAAA,CAAAG,CAAAA,CAAeC,CAAAA,CAAS,OAAO,CAAA,EAAK,EAAA,CAAA,CADlB,CAAA,KAAA,EAAQA,CAAAA,CAAS,OAAO,CAAA,CAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-G7EYYKWS.js","sourcesContent":[null,"\"use client\"\nimport { cn } from \"@/lib/utils\"\nimport React, {\n useState,\n useEffect,\n useMemo,\n useRef,\n Suspense,\n ReactNode,\n} from \"react\"\n\nconst SYMBOLS = \"!<>-_\\\\/[]{}—=+*^?#________\"\n\nconst randomChar = (symbols: string) =>\n symbols[Math.floor(Math.random() * symbols.length)]\n\nconst extractText = (node: ReactNode): string => {\n if (typeof node === \"string\" || typeof node === \"number\") return String(node)\n if (Array.isArray(node)) return node.map(extractText).join(\"\")\n if (React.isValidElement(node)) {\n const props = node.props as any\n return (\n (props.text || \"\") +\n (props.label || \"\") +\n (props.title || \"\") +\n extractText(props.children)\n )\n }\n return \"\"\n}\n\nconst injectScrambledText = (\n node: ReactNode,\n scrambledChars: (string | ReactNode)[],\n indexObj: { current: number }\n): ReactNode => {\n if (typeof node === \"string\" || typeof node === \"number\") {\n const text = String(node)\n const result: (string | ReactNode)[] = []\n for (let i = 0; i < text.length; i++) {\n result.push(\n <React.Fragment key={`char-${indexObj.current}`}>\n {scrambledChars[indexObj.current] || \"\"}\n </React.Fragment>\n )\n indexObj.current++\n }\n return result\n }\n\n if (Array.isArray(node)) {\n return node.map((child, idx) => (\n <React.Fragment key={`arr-${idx}-${indexObj.current}`}>\n {injectScrambledText(child, scrambledChars, indexObj)}\n </React.Fragment>\n ))\n }\n\n if (React.isValidElement(node)) {\n const props = node.props as any\n const newProps: any = {}\n\n if (props.children) {\n newProps.children = injectScrambledText(\n props.children,\n scrambledChars,\n indexObj\n )\n }\n return React.cloneElement(node, newProps)\n }\n return node\n}\n\nexport interface TextDecoderProps {\n children: ReactNode\n className?: string\n duration?: number\n symbols?: string\n delay?: number\n isLoading?: boolean\n}\n\nconst TextDecoder = ({\n children,\n className,\n duration = 40,\n symbols = SYMBOLS,\n delay = 0,\n isLoading = false,\n}: TextDecoderProps) => {\n const [outputNodes, setOutputNodes] = useState<ReactNode>(null)\n const [isComplete, setIsComplete] = useState(false)\n const elementRef = useRef<HTMLSpanElement>(null)\n const frameRef = useRef(0)\n const queueRef = useRef<\n { to: string; start: number; end: number; char?: string }[]\n >([])\n const rafRef = useRef<number | null>(null)\n const hasAnimatedRef = useRef(false)\n\n const fullText = useMemo(() => extractText(children), [children])\n\n const setupQueue = () => {\n const newQueue = []\n for (let i = 0; i < fullText.length; i++) {\n const to = fullText[i]\n const start = Math.floor(Math.random() * (duration * 0.5))\n const end = start + Math.floor(Math.random() * (duration * 0.5))\n newQueue.push({ to, start, end })\n }\n queueRef.current = newQueue\n frameRef.current = 0\n setIsComplete(false)\n }\n\n const loadingCharsRef = useRef<(string | undefined)[]>([])\n\n const updateLoading = () => {\n const currentScrambledChars: (string | ReactNode)[] = []\n\n if (loadingCharsRef.current.length !== fullText.length) {\n loadingCharsRef.current = new Array(fullText.length).fill(undefined)\n }\n\n for (let i = 0; i < fullText.length; i++) {\n const char = fullText[i]\n\n if (char === \" \") {\n currentScrambledChars.push(\" \")\n } else {\n if (!loadingCharsRef.current[i] || Math.random() < 0.28) {\n loadingCharsRef.current[i] = randomChar(symbols)\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {char}\n </span>\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {loadingCharsRef.current[i]}\n </span>\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n rafRef.current = requestAnimationFrame(updateLoading)\n }\n\n const update = () => {\n let complete = 0\n const currentScrambledChars: (string | ReactNode)[] = []\n\n for (let i = 0; i < queueRef.current.length; i++) {\n const item = queueRef.current[i]\n\n if (frameRef.current >= item.end) {\n complete++\n currentScrambledChars.push(item.to)\n } else {\n if (frameRef.current >= item.start) {\n if (!item.char || Math.random() < 0.28) {\n item.char = randomChar(symbols)\n }\n }\n\n currentScrambledChars.push(\n <span key={i} className=\"relative inline-block\">\n <span className=\"invisible select-none\" aria-hidden=\"true\">\n {item.to === \" \" ? \"\\u00A0\" : item.to}\n </span>\n {frameRef.current >= item.start && (\n <span className=\"absolute inset-0 flex items-center justify-center opacity-50 font-mono leading-none\">\n {item.char}\n </span>\n )}\n </span>\n )\n }\n }\n\n const indexObj = { current: 0 }\n setOutputNodes(\n injectScrambledText(children, currentScrambledChars, indexObj)\n )\n\n if (complete === queueRef.current.length) {\n setIsComplete(true)\n } else {\n frameRef.current++\n rafRef.current = requestAnimationFrame(update)\n }\n }\n\n const wasLoadingRef = useRef(false)\n\n useEffect(() => {\n if (isLoading) {\n wasLoadingRef.current = true\n hasAnimatedRef.current = true\n setIsComplete(false)\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n rafRef.current = requestAnimationFrame(updateLoading)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n\n if (wasLoadingRef.current) {\n wasLoadingRef.current = false\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n return () => {\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }\n }, [isLoading, fullText])\n\n useEffect(() => {\n if (isLoading) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && !hasAnimatedRef.current) {\n hasAnimatedRef.current = true\n const timeoutId = setTimeout(() => {\n setupQueue()\n rafRef.current = requestAnimationFrame(update)\n }, delay)\n return () => clearTimeout(timeoutId)\n }\n },\n { threshold: 0.1 }\n )\n\n if (elementRef.current) observer.observe(elementRef.current)\n\n return () => {\n observer.disconnect()\n if (rafRef.current) cancelAnimationFrame(rafRef.current)\n }\n }, [fullText, delay, isLoading])\n\n return (\n <span\n ref={elementRef}\n className={cn(\"inline-block whitespace-pre-wrap\", className)}\n >\n {isComplete ? children : outputNodes}\n </span>\n )\n}\n\nexport default function SuspenseDecodedText(props: TextDecoderProps) {\n return (\n <Suspense fallback={<span className=\"invisible\">{props.children}</span>}>\n <TextDecoder {...props} />\n </Suspense>\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; } }"use client";
2
- var _chunkWPUW2XFIjs = require('./chunk-WPUW2XFI.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, _chunkWPUW2XFIjs.a,{...t,children:_jsxruntime.jsx.call(void 0, _chunkWPUW2XFIjs.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-HKLR7AH3.js.map
2
+ var _chunkCP7BC57Sjs = require('./chunk-CP7BC57S.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, _chunkCP7BC57Sjs.a,{...t,children:_jsxruntime.jsx.call(void 0, _chunkCP7BC57Sjs.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-GVSERRZX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-HKLR7AH3.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,C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,CAAA,CAEDgB,CAAAA,CAAY,WAAA,CAAcb,aAAAA,CAAiB,IAAA,CAAK,WAAA,CAEhD,IAAMc,CAAAA,CAAkB,CAAC,CACvB,SAAA,CAAAlB,CAAAA,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-HKLR7AH3.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
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-GVSERRZX.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,CA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CAAU,WAAA,CAE1D,IAAMa,CAAAA,CAAoB,CAAA,CAAA,UAAA,CAGxB,CAAC,CAAE,SAAA,CAAAjB,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,aAACC,CAAiB,IAAA,CAAjB,CACC,GAAA,CAAKF,CAAAA,CACL,SAAA,CAAWG,gCAAAA,oPACT,CACAL,CACF,CAAA,CACC,GAAGC,CAAAA,CACN,CACD,CAAA,CAEDgB,CAAAA,CAAY,WAAA,CAAcb,aAAAA,CAAiB,IAAA,CAAK,WAAA,CAEhD,IAAMc,CAAAA,CAAkB,CAAC,CACvB,SAAA,CAAAlB,CAAAA,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-GVSERRZX.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"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as n}from"./chunk-S5TKCF6T.mjs";import*as o from"react";import{Slot as l}from"@radix-ui/react-slot";import{cva as p}from"class-variance-authority";import{jsx as a,jsxs as b}from"react/jsx-runtime";var m=p("inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary-accent text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive hover:bg-destructive/90",outline:"border border-input hover:bg-base-accent text-primary-accent",secondary:"bg-muted text-primary-accent hover:bg-muted/20",ghost:"hover:bg-base-accent text-primary-accent",link:"text-primary-accent underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 text-sm",sm:"h-8 text-xs px-3 py-2",lg:"h-10 px-8 py-2 text-sm",icon:"h-9 w-9",none:""}},defaultVariants:{variant:"default",size:"default"}}),f=o.forwardRef(({className:i,variant:s,size:c,asChild:d=!1,loading:e=!1,icon:r,...t},u)=>b(d?l:"button",{className:n(m({variant:s,size:c,className:i})),ref:u,disabled:e||t.disabled,...t,children:[e&&a("div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent"}),!e&&r&&a("span",{className:"mr-2",children:r}),t.children]}));f.displayName="Button";export{m as a,f as b};
3
+ //# sourceMappingURL=chunk-HRYHWWL4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/button.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary-accent text-primary-foreground hover:bg-primary/90\",\n destructive: \"bg-destructive hover:bg-destructive/90\",\n outline: \"border border-input hover:bg-base-accent text-primary-accent\",\n secondary: \"bg-muted text-primary-accent hover:bg-muted/20\",\n ghost: \"hover:bg-base-accent text-primary-accent\",\n link: \"text-primary-accent underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-sm\",\n sm: \"h-8 text-xs px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-sm\",\n icon: \"h-9 w-9\",\n none: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n icon,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || props.disabled}\n {...props}\n >\n {loading && (\n <div className=\"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent\" />\n )}\n {!loading && icon && <span className=\"mr-2\">{icon}</span>}\n {props.children}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\n"],"mappings":";yCAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BAwDjC,OAOI,OAAAC,EAPJ,QAAAC,MAAA,oBApDN,IAAMC,EAAiBC,EACrB,gTACA,CACE,SAAU,CACR,QAAS,CACP,QACE,gEACF,YAAa,yCACb,QAAS,+DACT,UAAW,iDACX,MAAO,2CACP,KAAM,wDACR,EACA,KAAM,CACJ,QAAS,wBACT,GAAI,wBACJ,GAAI,yBACJ,KAAM,UACN,KAAM,EACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAWMC,EAAe,aACnB,CACE,CACE,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,KAAAC,EACA,GAAGC,CACL,EACAC,IAIEX,EAFWO,EAAUK,EAAO,SAE3B,CACC,UAAWC,EAAGZ,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKO,EACL,SAAUH,GAAWE,EAAM,SAC1B,GAAGA,EAEH,UAAAF,GACCT,EAAC,OAAI,UAAU,+FAA+F,EAE/G,CAACS,GAAWC,GAAQV,EAAC,QAAK,UAAU,OAAQ,SAAAU,EAAK,EACjDC,EAAM,UACT,CAGN,EACAP,EAAO,YAAc","names":["React","Slot","cva","jsx","jsxs","buttonVariants","cva","Button","className","variant","size","asChild","loading","icon","props","ref","Slot","cn"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as z}from"./chunk-KGNX6UST.mjs";import{a as j,b as U,c as X}from"./chunk-FZ3NXOFK.mjs";import{a as E}from"./chunk-S5TKCF6T.mjs";import*as i from"react";import{Check as ne,ChevronDown as G,ChevronRight as ae,Search as se,X as ce}from"lucide-react";import{Fragment as ie,jsx as o,jsxs as x}from"react/jsx-runtime";function M(e){let n=[e.value];if(e.children)for(let a of e.children)n.push(...M(a));return n}function $(e,n){if(!e.children||e.children.length===0)return n.has(e.value)?"checked":"unchecked";let a=M(e),r=a.filter(l=>n.has(l)).length;return r===0?"unchecked":r===a.length?"checked":"indeterminate"}function J(e,n){let a=n.toLowerCase().trim();if(!a)return e;let r=[];for(let l of e){let f=l.label.toLowerCase().includes(a);if(l.children&&l.children.length>0){let h=J(l.children,n);f?r.push(l):h&&h.length>0&&r.push({...l,children:h})}else f&&r.push(l)}return r.length>0?r:null}function le(e,n){let a=n.toLowerCase().trim(),r=new Set;function l(f){let h=!1;for(let g of f){let w=g.label.toLowerCase().includes(a),S=!1;g.children&&(S=l(g.children)),(w||S)&&(r.add(g.value),h=!0)}return h}return l(e),r}function N(e,n){for(let a of e){if(a.value===n)return a;if(a.children){let r=N(a.children,n);if(r)return r}}}function Q(e){let n=new Set;for(let a of e)if(a.children&&a.children.length>0){n.add(a.value);for(let r of Q(a.children))n.add(r)}return n}function oe(e,n){if(!n)return e;let a=n.toLowerCase().trim();if(!a)return e;let r=e.toLowerCase().indexOf(a);return r===-1?e:x(ie,{children:[e.slice(0,r),o("span",{className:"font-semibold underline",children:e.slice(r,r+a.length)}),e.slice(r+a.length)]})}function W({node:e,depth:n,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S}){let V=e.children&&e.children.length>0,y=l.has(e.value),b=a?$(e,r):r.has(e.value)?"checked":"unchecked",A=n*20;return x("div",{role:"treeitem","aria-expanded":V?y:void 0,"aria-selected":b==="checked",children:[x("div",{className:E("relative flex items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm cursor-pointer select-none outline-none","hover:bg-muted",b==="checked"&&!a&&"bg-muted"),style:{paddingLeft:`${8+A}px`},onClick:()=>g(e),onFocus:()=>w(e.value),"data-tree-value":e.value,tabIndex:f===e.value?0:-1,children:[V?o("button",{type:"button",className:"h-4 w-4 shrink-0 flex items-center justify-center rounded-sm hover:bg-secondary",onClick:m=>{m.stopPropagation(),h(e.value)},"aria-label":y?`Collapse ${e.label}`:`Expand ${e.label}`,tabIndex:-1,children:y?o(G,{className:"h-3.5 w-3.5"}):o(ae,{className:"h-3.5 w-3.5"})}):o("span",{className:"h-4 w-4 shrink-0"}),a?o(z,{checked:b==="checked"?!0:b==="indeterminate"?"indeterminate":!1,onCheckedChange:()=>g(e),onClick:m=>m.stopPropagation(),className:"shrink-0","aria-label":e.label}):o(ne,{className:E("h-4 w-4 shrink-0",b==="checked"?"opacity-100":"opacity-0")}),o("span",{className:"truncate",children:oe(e.label,S)})]}),V&&y&&o("div",{role:"group",children:e.children.map(m=>o(W,{node:m,depth:n+1,multiple:a,selectedSet:r,expandedValues:l,focusedValue:f,onToggleExpand:h,onSelect:g,onFocus:w,searchTerm:S},m.value))})]})}function ge({nodes:e,value:n,onValueChange:a,multiple:r=!1,values:l=[],onValuesChange:f,placeholder:h="Select...",searchPlaceholder:g="Search...",emptyMessage:w="No results found.",disabled:S=!1,className:V,error:y=!1,defaultExpandedValues:b,expandAll:A=!1}){let[m,B]=i.useState(!1),[v,K]=i.useState(""),[p,k]=i.useState(null),[D,L]=i.useState(()=>A?Q(e):b?new Set(b):new Set),P=i.useRef(null),I=i.useRef(null),C=i.useMemo(()=>new Set(r?l:n?[n]:[]),[r,l,n]),F=i.useMemo(()=>v?J(e,v):e,[e,v]);i.useEffect(()=>{if(v){P.current||(P.current=new Set(D));let t=le(e,v);L(t)}else P.current&&(L(P.current),P.current=null)},[v,e]);let Y=i.useCallback(t=>{B(t),t||(K(""),k(null))},[]),T=i.useCallback(t=>{L(s=>{let d=new Set(s);return d.has(t)?d.delete(t):d.add(t),d})},[]),H=i.useCallback(t=>{if(r){let s=M(t),d=$(t,C),c;if(d==="checked"){let u=new Set(s);c=l.filter(R=>!u.has(R))}else{let u=s.filter(R=>!C.has(R));c=[...l,...u]}f?.(c)}else{if(t.children&&t.children.length>0){T(t.value);return}let d=t.value===n?"":t.value;a?.(d),B(!1)}},[r,l,n,C,f,a,T]),Z=i.useCallback((t,s)=>{s.preventDefault(),s.stopPropagation();let d=N(e,t);if(d){let c=new Set(M(d)),u=l.filter(R=>!c.has(R));f?.(u)}},[e,l,f]),q=i.useMemo(()=>{if(!r)return[];let t=[];function s(d){for(let c of d){let u=$(c,C);u==="checked"?t.push(c.value):u==="indeterminate"&&c.children&&s(c.children)}}return s(e),t},[e,C,r]),O=i.useCallback(()=>I.current?Array.from(I.current.querySelectorAll("[data-tree-value]")):[],[]),_=i.useCallback(t=>{let s=O(),d=s.findIndex(c=>c.dataset.treeValue===p);switch(t.key){case"ArrowDown":{t.preventDefault();let c=Math.min(d+1,s.length-1),u=s[c]?.dataset.treeValue;u&&(k(u),s[c]?.focus());break}case"ArrowUp":{t.preventDefault();let c=Math.max(d-1,0),u=s[c]?.dataset.treeValue;u&&(k(u),s[c]?.focus());break}case"ArrowRight":{if(t.preventDefault(),p){let c=N(e,p);if(c?.children?.length)if(!D.has(p))T(p);else{let u=c.children[0].value;k(u),requestAnimationFrame(()=>{O().find(re=>re.dataset.treeValue===u)?.focus()})}}break}case"ArrowLeft":{t.preventDefault(),p&&D.has(p)&&T(p);break}case"Enter":case" ":{if(t.preventDefault(),p){let c=N(e,p);c&&H(c)}break}case"Home":{t.preventDefault();let c=s[0]?.dataset.treeValue;c&&(k(c),s[0]?.focus());break}case"End":{t.preventDefault();let c=s[s.length-1]?.dataset.treeValue;c&&(k(c),s[s.length-1]?.focus());break}}},[p,e,D,O,T,H]),ee=()=>r?l.length===0?h:l.length===1?N(e,l[0])?.label??l[0]:`${l.length} selected`:n?N(e,n)?.label??n:h,te=()=>{if(!r||q.length===0)return null;let t=q.map(s=>N(e,s)).filter(Boolean);return o("div",{className:"max-h-[100px] overflow-y-auto px-2 py-1.5 border-b border-border",children:o("div",{className:"flex flex-wrap gap-1",children:t.map(s=>x("div",{className:"inline-flex items-center gap-1 rounded-md bg-secondary px-2 py-0.5 text-xs",children:[o("span",{className:"truncate max-w-[120px]",children:s.label}),o(ce,{className:"h-3 w-3 cursor-pointer shrink-0",onClick:d=>Z(s.value,d),"aria-label":`Remove ${s.label}`})]},s.value))})})};return x(j,{open:m,onOpenChange:Y,children:[o(U,{asChild:!0,children:x("button",{type:"button",role:"combobox","aria-expanded":m,"aria-haspopup":"tree",disabled:S,className:E("cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",!n&&!l.length&&"text-secondary-text",y&&"border-destructive-foreground focus-visible:ring-destructive-foreground",V),children:[o("span",{className:"truncate",children:ee()}),o(G,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),x(X,{className:"p-0",align:"start",style:{width:"var(--radix-popover-trigger-width)"},children:[x("div",{className:"flex items-center border-b px-3",children:[o(se,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),o("input",{value:v,onChange:t=>K(t.target.value),placeholder:g,className:"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","aria-label":"Search tree"})]}),te(),o("div",{className:"max-h-[300px] overflow-y-auto",children:F&&F.length>0?o("div",{ref:I,role:"tree","aria-label":"Options",className:"p-1",onKeyDown:_,children:F.map(t=>o(W,{node:t,depth:0,multiple:r,selectedSet:C,expandedValues:D,focusedValue:p,onToggleExpand:T,onSelect:H,onFocus:k,searchTerm:v},t.value))}):o("div",{className:"py-6 text-center text-sm text-muted-foreground",children:w})})]})]})}export{ge as a};
3
+ //# sourceMappingURL=chunk-IXP2VV7S.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/tree-select.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Check, ChevronDown, ChevronRight, Search, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\nimport { Checkbox } from \"@/components/checkbox\"\nimport { Popover, PopoverContent, PopoverTrigger } from \"@/components/popover\"\n\n// --- Public types ---\n\nexport interface TreeSelectNode {\n value: string\n label: string\n children?: TreeSelectNode[]\n}\n\nexport interface TreeSelectProps {\n nodes: TreeSelectNode[]\n value?: string\n onValueChange?: (value: string) => void\n multiple?: boolean\n values?: string[]\n onValuesChange?: (values: string[]) => void\n placeholder?: string\n searchPlaceholder?: string\n emptyMessage?: string\n disabled?: boolean\n className?: string\n error?: boolean\n defaultExpandedValues?: string[]\n expandAll?: boolean\n}\n\n// --- Internal types ---\n\ntype CheckState = \"checked\" | \"indeterminate\" | \"unchecked\"\n\n// --- Utility functions ---\n\nfunction getAllDescendantValues(node: TreeSelectNode): string[] {\n const values: string[] = [node.value]\n if (node.children) {\n for (const child of node.children) {\n values.push(...getAllDescendantValues(child))\n }\n }\n return values\n}\n\nfunction getCheckState(\n node: TreeSelectNode,\n selectedSet: Set<string>\n): CheckState {\n if (!node.children || node.children.length === 0) {\n return selectedSet.has(node.value) ? \"checked\" : \"unchecked\"\n }\n\n const descendants = getAllDescendantValues(node)\n const selectedCount = descendants.filter((v) => selectedSet.has(v)).length\n\n if (selectedCount === 0) return \"unchecked\"\n if (selectedCount === descendants.length) return \"checked\"\n return \"indeterminate\"\n}\n\nfunction filterTree(\n nodes: TreeSelectNode[],\n searchTerm: string\n): TreeSelectNode[] | null {\n const term = searchTerm.toLowerCase().trim()\n if (!term) return nodes\n\n const result: TreeSelectNode[] = []\n\n for (const node of nodes) {\n const labelMatches = node.label.toLowerCase().includes(term)\n\n if (node.children && node.children.length > 0) {\n const filteredChildren = filterTree(node.children, searchTerm)\n\n if (labelMatches) {\n result.push(node)\n } else if (filteredChildren && filteredChildren.length > 0) {\n result.push({ ...node, children: filteredChildren })\n }\n } else if (labelMatches) {\n result.push(node)\n }\n }\n\n return result.length > 0 ? result : null\n}\n\nfunction getValuesOfMatchingNodes(\n nodes: TreeSelectNode[],\n searchTerm: string\n): Set<string> {\n const term = searchTerm.toLowerCase().trim()\n const result = new Set<string>()\n\n function walk(nodeList: TreeSelectNode[]): boolean {\n let hasMatch = false\n for (const node of nodeList) {\n const labelMatches = node.label.toLowerCase().includes(term)\n let childHasMatch = false\n\n if (node.children) {\n childHasMatch = walk(node.children)\n }\n\n if (labelMatches || childHasMatch) {\n result.add(node.value)\n hasMatch = true\n }\n }\n return hasMatch\n }\n\n walk(nodes)\n return result\n}\n\nfunction findNodeByValue(\n nodes: TreeSelectNode[],\n value: string\n): TreeSelectNode | undefined {\n for (const node of nodes) {\n if (node.value === value) return node\n if (node.children) {\n const found = findNodeByValue(node.children, value)\n if (found) return found\n }\n }\n return undefined\n}\n\nfunction collectAllBranchValues(nodes: TreeSelectNode[]): Set<string> {\n const result = new Set<string>()\n for (const node of nodes) {\n if (node.children && node.children.length > 0) {\n result.add(node.value)\n for (const v of collectAllBranchValues(node.children)) {\n result.add(v)\n }\n }\n }\n return result\n}\n\nfunction renderHighlightedLabel(\n label: string,\n searchTerm: string\n): React.ReactNode {\n if (!searchTerm) return label\n\n const term = searchTerm.toLowerCase().trim()\n if (!term) return label\n\n const index = label.toLowerCase().indexOf(term)\n if (index === -1) return label\n\n return (\n <>\n {label.slice(0, index)}\n <span className=\"font-semibold underline\">\n {label.slice(index, index + term.length)}\n </span>\n {label.slice(index + term.length)}\n </>\n )\n}\n\n// --- TreeNodeItem (internal) ---\n\ninterface TreeNodeItemProps {\n node: TreeSelectNode\n depth: number\n multiple: boolean\n selectedSet: Set<string>\n expandedValues: Set<string>\n focusedValue: string | null\n onToggleExpand: (value: string) => void\n onSelect: (node: TreeSelectNode) => void\n onFocus: (value: string) => void\n searchTerm: string\n}\n\nfunction TreeNodeItem({\n node,\n depth,\n multiple,\n selectedSet,\n expandedValues,\n focusedValue,\n onToggleExpand,\n onSelect,\n onFocus,\n searchTerm,\n}: TreeNodeItemProps) {\n const hasChildren = node.children && node.children.length > 0\n const isExpanded = expandedValues.has(node.value)\n const checkState = multiple\n ? getCheckState(node, selectedSet)\n : selectedSet.has(node.value)\n ? \"checked\"\n : \"unchecked\"\n\n const indentPx = depth * 20\n\n return (\n <div\n role=\"treeitem\"\n aria-expanded={hasChildren ? isExpanded : undefined}\n aria-selected={checkState === \"checked\"}\n >\n <div\n className={cn(\n \"relative flex items-center gap-2 rounded-sm px-2 py-1.5 my-0.5 text-sm cursor-pointer select-none outline-none\",\n \"hover:bg-muted\",\n checkState === \"checked\" && !multiple && \"bg-muted\"\n // This adds a focus ring when the node is focused, but it's not needed for the tree-select component.\n // focusedValue === node.value && \"z-10 ring-2 ring-ring\"\n )}\n style={{ paddingLeft: `${8 + indentPx}px` }}\n onClick={() => onSelect(node)}\n onFocus={() => onFocus(node.value)}\n data-tree-value={node.value}\n tabIndex={focusedValue === node.value ? 0 : -1}\n >\n {hasChildren ? (\n <button\n type=\"button\"\n className=\"h-4 w-4 shrink-0 flex items-center justify-center rounded-sm hover:bg-secondary\"\n onClick={(e) => {\n e.stopPropagation()\n onToggleExpand(node.value)\n }}\n aria-label={\n isExpanded ? `Collapse ${node.label}` : `Expand ${node.label}`\n }\n tabIndex={-1}\n >\n {isExpanded ? (\n <ChevronDown className=\"h-3.5 w-3.5\" />\n ) : (\n <ChevronRight className=\"h-3.5 w-3.5\" />\n )}\n </button>\n ) : (\n <span className=\"h-4 w-4 shrink-0\" />\n )}\n\n {multiple ? (\n <Checkbox\n checked={\n checkState === \"checked\"\n ? true\n : checkState === \"indeterminate\"\n ? \"indeterminate\"\n : false\n }\n onCheckedChange={() => onSelect(node)}\n onClick={(e) => e.stopPropagation()}\n className=\"shrink-0\"\n aria-label={node.label}\n />\n ) : (\n <Check\n className={cn(\n \"h-4 w-4 shrink-0\",\n checkState === \"checked\" ? \"opacity-100\" : \"opacity-0\"\n )}\n />\n )}\n\n <span className=\"truncate\">\n {renderHighlightedLabel(node.label, searchTerm)}\n </span>\n </div>\n\n {hasChildren && isExpanded && (\n <div role=\"group\">\n {node.children!.map((child) => (\n <TreeNodeItem\n key={child.value}\n node={child}\n depth={depth + 1}\n multiple={multiple}\n selectedSet={selectedSet}\n expandedValues={expandedValues}\n focusedValue={focusedValue}\n onToggleExpand={onToggleExpand}\n onSelect={onSelect}\n onFocus={onFocus}\n searchTerm={searchTerm}\n />\n ))}\n </div>\n )}\n </div>\n )\n}\n\n// --- TreeSelect (main component) ---\n\nexport function TreeSelect({\n nodes,\n value,\n onValueChange,\n multiple = false,\n values = [],\n onValuesChange,\n placeholder = \"Select...\",\n searchPlaceholder = \"Search...\",\n emptyMessage = \"No results found.\",\n disabled = false,\n className,\n error = false,\n defaultExpandedValues,\n expandAll = false,\n}: TreeSelectProps) {\n const [open, setOpen] = React.useState(false)\n const [searchTerm, setSearchTerm] = React.useState(\"\")\n const [focusedValue, setFocusedValue] = React.useState<string | null>(null)\n const [expandedValues, setExpandedValues] = React.useState<Set<string>>(\n () => {\n if (expandAll) return collectAllBranchValues(nodes)\n if (defaultExpandedValues) return new Set(defaultExpandedValues)\n return new Set<string>()\n }\n )\n\n const preSearchExpandedRef = React.useRef<Set<string> | null>(null)\n const treeRef = React.useRef<HTMLDivElement>(null)\n\n const selectedSet = React.useMemo(\n () => new Set(multiple ? values : value ? [value] : []),\n [multiple, values, value]\n )\n\n const filteredNodes = React.useMemo(\n () => (searchTerm ? filterTree(nodes, searchTerm) : nodes),\n [nodes, searchTerm]\n )\n\n // Auto-expand matching ancestors during search\n React.useEffect(() => {\n if (searchTerm) {\n if (!preSearchExpandedRef.current) {\n preSearchExpandedRef.current = new Set(expandedValues)\n }\n const matchingAncestors = getValuesOfMatchingNodes(nodes, searchTerm)\n setExpandedValues(matchingAncestors)\n } else if (preSearchExpandedRef.current) {\n setExpandedValues(preSearchExpandedRef.current)\n preSearchExpandedRef.current = null\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [searchTerm, nodes])\n\n const handleOpenChange = React.useCallback((isOpen: boolean) => {\n setOpen(isOpen)\n if (!isOpen) {\n setSearchTerm(\"\")\n setFocusedValue(null)\n }\n }, [])\n\n const handleToggleExpand = React.useCallback((nodeValue: string) => {\n setExpandedValues((prev) => {\n const next = new Set(prev)\n if (next.has(nodeValue)) {\n next.delete(nodeValue)\n } else {\n next.add(nodeValue)\n }\n return next\n })\n }, [])\n\n const handleSelect = React.useCallback(\n (node: TreeSelectNode) => {\n if (multiple) {\n const allDescendants = getAllDescendantValues(node)\n const currentState = getCheckState(node, selectedSet)\n\n let newValues: string[]\n if (currentState === \"checked\") {\n const toRemove = new Set(allDescendants)\n newValues = values.filter((v) => !toRemove.has(v))\n } else {\n const toAdd = allDescendants.filter((v) => !selectedSet.has(v))\n newValues = [...values, ...toAdd]\n }\n onValuesChange?.(newValues)\n } else {\n // Single-select: clicking a parent toggles expand instead of selecting\n const hasChildren = node.children && node.children.length > 0\n if (hasChildren) {\n handleToggleExpand(node.value)\n return\n }\n const newValue = node.value === value ? \"\" : node.value\n onValueChange?.(newValue)\n setOpen(false)\n }\n },\n [\n multiple,\n values,\n value,\n selectedSet,\n onValuesChange,\n onValueChange,\n handleToggleExpand,\n ]\n )\n\n const handleRemoveChip = React.useCallback(\n (chipValue: string, e: React.MouseEvent) => {\n e.preventDefault()\n e.stopPropagation()\n const node = findNodeByValue(nodes, chipValue)\n if (node) {\n const toRemove = new Set(getAllDescendantValues(node))\n const newValues = values.filter((v) => !toRemove.has(v))\n onValuesChange?.(newValues)\n }\n },\n [nodes, values, onValuesChange]\n )\n\n // Smart chips: minimal set representing the selection\n const chipValues = React.useMemo(() => {\n if (!multiple) return []\n\n const chips: string[] = []\n\n function walk(nodeList: TreeSelectNode[]) {\n for (const node of nodeList) {\n const state = getCheckState(node, selectedSet)\n if (state === \"checked\") {\n chips.push(node.value)\n } else if (state === \"indeterminate\" && node.children) {\n walk(node.children)\n }\n }\n }\n\n walk(nodes)\n return chips\n }, [nodes, selectedSet, multiple])\n\n // Keyboard navigation\n const getVisibleNodes = React.useCallback((): HTMLElement[] => {\n if (!treeRef.current) return []\n return Array.from(treeRef.current.querySelectorAll(\"[data-tree-value]\"))\n }, [])\n\n const handleTreeKeyDown = React.useCallback(\n (e: React.KeyboardEvent) => {\n const visibleNodes = getVisibleNodes()\n const currentIndex = visibleNodes.findIndex(\n (el) => el.dataset.treeValue === focusedValue\n )\n\n switch (e.key) {\n case \"ArrowDown\": {\n e.preventDefault()\n const nextIndex = Math.min(currentIndex + 1, visibleNodes.length - 1)\n const nextValue = visibleNodes[nextIndex]?.dataset.treeValue\n if (nextValue) {\n setFocusedValue(nextValue)\n visibleNodes[nextIndex]?.focus()\n }\n break\n }\n case \"ArrowUp\": {\n e.preventDefault()\n const prevIndex = Math.max(currentIndex - 1, 0)\n const prevValue = visibleNodes[prevIndex]?.dataset.treeValue\n if (prevValue) {\n setFocusedValue(prevValue)\n visibleNodes[prevIndex]?.focus()\n }\n break\n }\n case \"ArrowRight\": {\n e.preventDefault()\n if (focusedValue) {\n const node = findNodeByValue(nodes, focusedValue)\n if (node?.children?.length) {\n if (!expandedValues.has(focusedValue)) {\n handleToggleExpand(focusedValue)\n } else {\n const firstChildValue = node.children[0].value\n setFocusedValue(firstChildValue)\n requestAnimationFrame(() => {\n const els = getVisibleNodes()\n const el = els.find(\n (n) => n.dataset.treeValue === firstChildValue\n )\n el?.focus()\n })\n }\n }\n }\n break\n }\n case \"ArrowLeft\": {\n e.preventDefault()\n if (focusedValue && expandedValues.has(focusedValue)) {\n handleToggleExpand(focusedValue)\n }\n break\n }\n case \"Enter\":\n case \" \": {\n e.preventDefault()\n if (focusedValue) {\n const node = findNodeByValue(nodes, focusedValue)\n if (node) handleSelect(node)\n }\n break\n }\n case \"Home\": {\n e.preventDefault()\n const firstValue = visibleNodes[0]?.dataset.treeValue\n if (firstValue) {\n setFocusedValue(firstValue)\n visibleNodes[0]?.focus()\n }\n break\n }\n case \"End\": {\n e.preventDefault()\n const lastValue =\n visibleNodes[visibleNodes.length - 1]?.dataset.treeValue\n if (lastValue) {\n setFocusedValue(lastValue)\n visibleNodes[visibleNodes.length - 1]?.focus()\n }\n break\n }\n }\n },\n [\n focusedValue,\n nodes,\n expandedValues,\n getVisibleNodes,\n handleToggleExpand,\n handleSelect,\n ]\n )\n\n const getDisplayText = () => {\n if (multiple) {\n if (values.length === 0) return placeholder\n if (values.length === 1) {\n const node = findNodeByValue(nodes, values[0])\n return node?.label ?? values[0]\n }\n return `${values.length} selected`\n }\n if (value) {\n const node = findNodeByValue(nodes, value)\n return node?.label ?? value\n }\n return placeholder\n }\n\n const renderSelectedChips = () => {\n if (!multiple || chipValues.length === 0) return null\n\n const chipNodes = chipValues\n .map((v) => findNodeByValue(nodes, v))\n .filter(Boolean) as TreeSelectNode[]\n\n return (\n <div className=\"max-h-[100px] overflow-y-auto px-2 py-1.5 border-b border-border\">\n <div className=\"flex flex-wrap gap-1\">\n {chipNodes.map((node) => (\n <div\n key={node.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 max-w-[120px]\">{node.label}</span>\n <X\n className=\"h-3 w-3 cursor-pointer shrink-0\"\n onClick={(e) => handleRemoveChip(node.value, e)}\n aria-label={`Remove ${node.label}`}\n />\n </div>\n ))}\n </div>\n </div>\n )\n }\n\n return (\n <Popover open={open} onOpenChange={handleOpenChange}>\n <PopoverTrigger asChild>\n <button\n type=\"button\"\n role=\"combobox\"\n aria-expanded={open}\n aria-haspopup=\"tree\"\n disabled={disabled}\n className={cn(\n \"cursor-pointer flex my-2 h-9 w-full items-center justify-between rounded-3xl border border-border bg-background hover:bg-secondary px-4 py-2 text-sm text-primary-accent ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n !value && !values.length && \"text-secondary-text\",\n error &&\n \"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 <div className=\"flex items-center border-b px-3\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <input\n value={searchTerm}\n onChange={(e) => setSearchTerm(e.target.value)}\n placeholder={searchPlaceholder}\n className=\"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 aria-label=\"Search tree\"\n />\n </div>\n\n {renderSelectedChips()}\n\n <div className=\"max-h-[300px] overflow-y-auto\">\n {filteredNodes && filteredNodes.length > 0 ? (\n <div\n ref={treeRef}\n role=\"tree\"\n aria-label=\"Options\"\n className=\"p-1\"\n onKeyDown={handleTreeKeyDown}\n >\n {filteredNodes.map((node) => (\n <TreeNodeItem\n key={node.value}\n node={node}\n depth={0}\n multiple={multiple}\n selectedSet={selectedSet}\n expandedValues={expandedValues}\n focusedValue={focusedValue}\n onToggleExpand={handleToggleExpand}\n onSelect={handleSelect}\n onFocus={setFocusedValue}\n searchTerm={searchTerm}\n />\n ))}\n </div>\n ) : (\n <div className=\"py-6 text-center text-sm text-muted-foreground\">\n {emptyMessage}\n </div>\n )}\n </div>\n </PopoverContent>\n </Popover>\n )\n}\n"],"mappings":";yIAEA,UAAYA,MAAW,QACvB,OAAS,SAAAC,GAAO,eAAAC,EAAa,gBAAAC,GAAc,UAAAC,GAAQ,KAAAC,OAAS,eAgKxD,mBAAAC,GAEE,OAAAC,EAFF,QAAAC,MAAA,oBA3HJ,SAASC,EAAuBC,EAAgC,CAC9D,IAAMC,EAAmB,CAACD,EAAK,KAAK,EACpC,GAAIA,EAAK,SACP,QAAWE,KAASF,EAAK,SACvBC,EAAO,KAAK,GAAGF,EAAuBG,CAAK,CAAC,EAGhD,OAAOD,CACT,CAEA,SAASE,EACPH,EACAI,EACY,CACZ,GAAI,CAACJ,EAAK,UAAYA,EAAK,SAAS,SAAW,EAC7C,OAAOI,EAAY,IAAIJ,EAAK,KAAK,EAAI,UAAY,YAGnD,IAAMK,EAAcN,EAAuBC,CAAI,EACzCM,EAAgBD,EAAY,OAAQE,GAAMH,EAAY,IAAIG,CAAC,CAAC,EAAE,OAEpE,OAAID,IAAkB,EAAU,YAC5BA,IAAkBD,EAAY,OAAe,UAC1C,eACT,CAEA,SAASG,EACPC,EACAC,EACyB,CACzB,IAAMC,EAAOD,EAAW,YAAY,EAAE,KAAK,EAC3C,GAAI,CAACC,EAAM,OAAOF,EAElB,IAAMG,EA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,iDACZ,SAAAqD,EACH,EAEJ,GACF,GACF,CAEJ","names":["React","Check","ChevronDown","ChevronRight","Search","X","Fragment","jsx","jsxs","getAllDescendantValues","node","values","child","getCheckState","selectedSet","descendants","selectedCount","v","filterTree","nodes","searchTerm","term","result","labelMatches","filteredChildren","getValuesOfMatchingNodes","walk","nodeList","hasMatch","childHasMatch","findNodeByValue","value","found","collectAllBranchValues","renderHighlightedLabel","label","index","TreeNodeItem","depth","multiple","expandedValues","focusedValue","onToggleExpand","onSelect","onFocus","hasChildren","isExpanded","checkState","indentPx","cn","e","ChevronDown","ChevronRight","Checkbox","Check","TreeSelect","onValueChange","onValuesChange","placeholder","searchPlaceholder","emptyMessage","disabled","className","error","defaultExpandedValues","expandAll","open","setOpen","setSearchTerm","setFocusedValue","setExpandedValues","preSearchExpandedRef","treeRef","filteredNodes","matchingAncestors","handleOpenChange","isOpen","handleToggleExpand","nodeValue","prev","next","handleSelect","allDescendants","currentState","newValues","toRemove","toAdd","newValue","handleRemoveChip","chipValue","chipValues","chips","state","getVisibleNodes","handleTreeKeyDown","visibleNodes","currentIndex","el","nextIndex","nextValue","prevIndex","prevValue","firstChildValue","n","firstValue","lastValue","getDisplayText","renderSelectedChips","chipNodes","X","Popover","PopoverTrigger","PopoverContent","Search"]}
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import{a as t}from"./chunk-S5TKCF6T.mjs";import*as o from"react";import*as e from"@radix-ui/react-checkbox";import{Check as n,Minus as d}from"lucide-react";import{jsx as i,jsxs as m}from"react/jsx-runtime";var s=o.forwardRef(({className:a,...r},c)=>i(e.Root,{ref:c,className:t("group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground",a),...r,children:m(e.Indicator,{className:t("flex items-center justify-center text-current"),children:[i(n,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),i(d,{className:"h-4 w-4 hidden group-data-[state=indeterminate]:block"})]})}));s.displayName=e.Root.displayName;export{s as a};
3
+ //# sourceMappingURL=chunk-KGNX6UST.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/checkbox.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check, Minus } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4 group-data-[state=indeterminate]:hidden\" />\n <Minus className=\"h-4 w-4 hidden group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"],"mappings":";yCAEA,UAAYA,MAAW,QACvB,UAAYC,MAAuB,2BACnC,OAAS,SAAAC,EAAO,SAAAC,MAAa,eAgBzB,OAGE,OAAAC,EAHF,QAAAC,MAAA,oBAZJ,IAAMC,EAAiB,aAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BL,EAAmB,OAAlB,CACC,IAAKK,EACL,UAAWC,EACT,6eACAH,CACF,EACC,GAAGC,EAEJ,SAAAH,EAAmB,YAAlB,CACC,UAAWK,EAAG,+CAA+C,EAE7D,UAAAN,EAACO,EAAA,CAAM,UAAU,kDAAkD,EACnEP,EAACQ,EAAA,CAAM,UAAU,wDAAwD,GAC3E,EACF,CACD,EACDN,EAAS,YAAgC,OAAK","names":["React","CheckboxPrimitive","Check","Minus","jsx","jsxs","Checkbox","className","props","ref","cn","Check","Minus"]}
@@ -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; } }"use client";
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reactcheckbox = require('@radix-ui/react-checkbox'); var e = _interopRequireWildcard(_reactcheckbox);var _lucidereact = require('lucide-react');var _jsxruntime = require('react/jsx-runtime');var s=o.forwardRef(({className:a,...r},c)=>_jsxruntime.jsx.call(void 0, e.Root,{ref:c,className:_chunkFUYXCJOQjs.a.call(void 0, "group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground",a),...r,children:_jsxruntime.jsxs.call(void 0, e.Indicator,{className:_chunkFUYXCJOQjs.a.call(void 0, "flex items-center justify-center text-current"),children:[_jsxruntime.jsx.call(void 0, _lucidereact.Check,{className:"h-4 w-4 group-data-[state=indeterminate]:hidden"}),_jsxruntime.jsx.call(void 0, _lucidereact.Minus,{className:"h-4 w-4 hidden group-data-[state=indeterminate]:block"})]})}));s.displayName=e.Root.displayName;exports.a = s;
3
+ //# sourceMappingURL=chunk-LCKRYIEJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LCKRYIEJ.js","../src/components/checkbox.tsx"],"names":["Checkbox","className","props","ref","jsx","cn","jsxs","Check","Minus"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECChB,0GACY,2CACN,+CAgBzB,IAZEA,CAAAA,CAAiB,CAAA,CAAA,UAAA,CAGrB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAC1BC,6BAAAA,CAAmB,CAAA,IAAA,CAAlB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,gCAAAA,4eACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CAEJ,QAAA,CAAAI,8BAAAA,CAAmB,CAAA,SAAA,CAAlB,CACC,SAAA,CAAWD,gCAAAA,+CAAkD,CAAA,CAE7D,QAAA,CAAA,CAAAD,6BAAAA,kBAACG,CAAA,CAAM,SAAA,CAAU,iDAAA,CAAkD,CAAA,CACnEH,6BAAAA,kBAACI,CAAA,CAAM,SAAA,CAAU,uDAAA,CAAwD,CAAA,CAAA,CAC3E,CAAA,CACF,CACD,CAAA,CACDR,CAAAA,CAAS,WAAA,CAAgC,CAAA,CAAA,IAAA,CAAK,WAAA,CAAA,cAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-LCKRYIEJ.js","sourcesContent":[null,"\"use client\"\n\nimport * as React from \"react\"\nimport * as CheckboxPrimitive from \"@radix-ui/react-checkbox\"\nimport { Check, Minus } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst Checkbox = React.forwardRef<\n React.ElementRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n \"group peer h-4 w-4 bg-background shrink-0 rounded-xs border border-accent-muted ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-accent data-[state=checked]:border-accent data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-accent data-[state=indeterminate]:border-accent data-[state=indeterminate]:text-primary-foreground\",\n className\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn(\"flex items-center justify-center text-current\")}\n >\n <Check className=\"h-4 w-4 group-data-[state=indeterminate]:hidden\" />\n <Minus className=\"h-4 w-4 hidden group-data-[state=indeterminate]:block\" />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n))\nCheckbox.displayName = CheckboxPrimitive.Root.displayName\n\nexport { Checkbox }\n"]}
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import{a as f}from"./chunk-5TVDBV74.mjs";import{a as p}from"./chunk-4LR7SOCY.mjs";import{b as w}from"./chunk-W65OWFZY.mjs";import{a as i}from"./chunk-S5TKCF6T.mjs";import*as a from"react";import{X as x}from"lucide-react";import{Drawer as l}from"vaul";import{jsx as r,jsxs as d}from"react/jsx-runtime";var R="24rem",v=a.createContext(null);function h(){let e=a.useContext(v);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var y=a.forwardRef(({isOpen:e,onClose:o,width:t=R,children:s,...n},c)=>{let u=a.useRef(null),m=p("lg"),b=a.useMemo(()=>({isOpen:e,onClose:o,width:t}),[e,o,t]);return d(v.Provider,{value:b,children:[!m&&r(l.Root,{open:e,onOpenChange:D=>{D||o()},direction:"left",children:d(l.Portal,{children:[r(l.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),d(l.Content,{className:"fixed inset-y-0 left-0 z-50 flex h-full w-[85vw] max-w-md flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[r(l.Title,{className:"sr-only",children:"Drawer"}),s]})]})}),m&&d("div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...n,children:[r("div",{className:i("relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?t:"0"}}),r("div",{ref:u,className:i("fixed right-0 z-40 transition-[right,width,top,height] duration-200 ease-linear flex","top-(--sidebar-top,0px) h-[calc(100svh-var(--sidebar-top,0px))]",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":t,width:t},children:r("div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:r("div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-[calc(100%-1.25rem)] shadow",children:s})})})]})]})});y.displayName="Drawer";var C=a.forwardRef(({className:e,showCloseButton:o=!0,children:t,...s},n)=>{let{onClose:c}=h();return d("div",{ref:n,"data-drawer":"header",className:i("flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...s,children:[r("div",{className:"flex-1",children:t}),o&&d(w,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[r(x,{size:16}),r("span",{className:"sr-only",children:"Close drawer"})]})]})});C.displayName="DrawerHeader";var N=a.forwardRef(({className:e,...o},t)=>r("h2",{ref:t,className:i("text-lg font-semibold text-primary-accent",e),...o}));N.displayName="DrawerTitle";var g=a.forwardRef(({className:e,children:o,...t},s)=>r(f,{className:"flex-1",ref:s,children:r("div",{"data-drawer":"body",className:i("p-4",e),...t,children:o})}));g.displayName="DrawerBody";var P=a.forwardRef(({className:e,...o},t)=>r("div",{ref:t,"data-drawer":"footer",className:i("flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));P.displayName="DrawerFooter";export{h as a,y as b,C as c,N as d,g as e,P as f};
3
- //# sourceMappingURL=chunk-JKSXSLVB.mjs.map
2
+ import{a as f}from"./chunk-5TVDBV74.mjs";import{a as p}from"./chunk-4LR7SOCY.mjs";import{b as w}from"./chunk-HRYHWWL4.mjs";import{a as i}from"./chunk-S5TKCF6T.mjs";import*as a from"react";import{X as x}from"lucide-react";import{Drawer as l}from"vaul";import{jsx as r,jsxs as d}from"react/jsx-runtime";var R="24rem",v=a.createContext(null);function h(){let e=a.useContext(v);if(!e)throw new Error("useDrawer must be used within a Drawer component.");return e}var y=a.forwardRef(({isOpen:e,onClose:o,width:t=R,children:s,...n},c)=>{let u=a.useRef(null),m=p("lg"),b=a.useMemo(()=>({isOpen:e,onClose:o,width:t}),[e,o,t]);return d(v.Provider,{value:b,children:[!m&&r(l.Root,{open:e,onOpenChange:D=>{D||o()},direction:"left",children:d(l.Portal,{children:[r(l.Overlay,{className:"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm"}),d(l.Content,{className:"fixed inset-y-0 left-0 z-50 flex h-full w-[85vw] max-w-md flex-col bg-sidebar border-r border-sidebar-border text-primary-accent shadow-lg outline-none","aria-describedby":void 0,children:[r(l.Title,{className:"sr-only",children:"Drawer"}),s]})]})}),m&&d("div",{ref:c,className:"group/drawer peer","data-state":e?"open":"closed",...n,children:[r("div",{className:i("relative bg-sidebar transition-[width] duration-200 ease-linear",e?"":"w-0"),style:{width:e?t:"0"}}),r("div",{ref:u,className:i("fixed right-0 z-40 transition-[right,width,top,height] duration-200 ease-linear flex","top-(--sidebar-top,0px) h-[calc(100svh-var(--sidebar-top,0px))]",e?"right-0":"right-[calc(var(--drawer-width)*-1)]"),style:{"--drawer-width":t,width:t},children:r("div",{"data-drawer":"drawer",className:"flex h-full w-full flex-col",children:r("div",{className:"flex flex-col my-2.5 mr-2.5 rounded-2xl border bg-sidebar border-sidebar-border h-[calc(100%-1.25rem)] shadow",children:s})})})]})]})});y.displayName="Drawer";var C=a.forwardRef(({className:e,showCloseButton:o=!0,children:t,...s},n)=>{let{onClose:c}=h();return d("div",{ref:n,"data-drawer":"header",className:i("flex w-full items-start justify-between gap-2 p-4 border-b border-sidebar-border",e),...s,children:[r("div",{className:"flex-1",children:t}),o&&d(w,{variant:"secondary",size:"icon",onClick:c,className:"h-8 w-8 shrink-0 rounded-full",children:[r(x,{size:16}),r("span",{className:"sr-only",children:"Close drawer"})]})]})});C.displayName="DrawerHeader";var N=a.forwardRef(({className:e,...o},t)=>r("h2",{ref:t,className:i("text-lg font-semibold text-primary-accent",e),...o}));N.displayName="DrawerTitle";var g=a.forwardRef(({className:e,children:o,...t},s)=>r(f,{className:"flex-1",ref:s,children:r("div",{"data-drawer":"body",className:i("p-4",e),...t,children:o})}));g.displayName="DrawerBody";var P=a.forwardRef(({className:e,...o},t)=>r("div",{ref:t,"data-drawer":"footer",className:i("flex flex-col gap-2 p-4 border-t border-sidebar-border",e),...o}));P.displayName="DrawerFooter";export{h as a,y as b,C as c,N as d,g as e,P as f};
3
+ //# sourceMappingURL=chunk-NGEWZBAJ.mjs.map
@@ -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 _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _jsxruntime = require('react/jsx-runtime');var m=_classvarianceauthority.cva.call(void 0, "inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary-accent text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive hover:bg-destructive/90",outline:"border border-input hover:bg-base-accent text-primary-accent",secondary:"bg-muted text-primary-accent hover:bg-muted/20",ghost:"hover:bg-base-accent text-primary-accent",link:"text-primary-accent underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 text-sm",sm:"h-8 text-xs px-3 py-2",lg:"h-10 px-8 py-2 text-sm",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),f= exports.b =o.forwardRef(({className:i,variant:s,size:c,asChild:d=!1,loading:e=!1,icon:r,...t},u)=>_jsxruntime.jsxs.call(void 0, d?_reactslot.Slot:"button",{className:_chunkFUYXCJOQjs.a.call(void 0, m({variant:s,size:c,className:i})),ref:u,disabled:e||t.disabled,...t,children:[e&&_jsxruntime.jsx.call(void 0, "div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent"}),!e&&r&&_jsxruntime.jsx.call(void 0, "span",{className:"mr-2",children:r}),t.children]}));f.displayName="Button";exports.a = m; exports.b = f;
3
- //# sourceMappingURL=chunk-7T4BNCXL.js.map
2
+ var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reactslot = require('@radix-ui/react-slot');var _classvarianceauthority = require('class-variance-authority');var _jsxruntime = require('react/jsx-runtime');var m=_classvarianceauthority.cva.call(void 0, "inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary-accent text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive hover:bg-destructive/90",outline:"border border-input hover:bg-base-accent text-primary-accent",secondary:"bg-muted text-primary-accent hover:bg-muted/20",ghost:"hover:bg-base-accent text-primary-accent",link:"text-primary-accent underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 text-sm",sm:"h-8 text-xs px-3 py-2",lg:"h-10 px-8 py-2 text-sm",icon:"h-9 w-9",none:""}},defaultVariants:{variant:"default",size:"default"}}),f= exports.b =o.forwardRef(({className:i,variant:s,size:c,asChild:d=!1,loading:e=!1,icon:r,...t},u)=>_jsxruntime.jsxs.call(void 0, d?_reactslot.Slot:"button",{className:_chunkFUYXCJOQjs.a.call(void 0, m({variant:s,size:c,className:i})),ref:u,disabled:e||t.disabled,...t,children:[e&&_jsxruntime.jsx.call(void 0, "div",{className:"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent"}),!e&&r&&_jsxruntime.jsx.call(void 0, "span",{className:"mr-2",children:r}),t.children]}));f.displayName="Button";exports.a = m; exports.b = f;
3
+ //# sourceMappingURL=chunk-OXMHA73F.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-OXMHA73F.js","../src/components/button.tsx"],"names":["buttonVariants","cva","Button","className","variant","size","asChild","loading","icon","props","ref","jsxs","Slot","cn","jsx"],"mappings":"AAAA,uWAAY;AACZ,sDAAuC,uECDhB,iDACF,kEACkB,+CAwDjC,IApDAA,CAAAA,CAAiBC,yCAAAA,+SACrB,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CACE,+DAAA,CACF,WAAA,CAAa,wCAAA,CACb,OAAA,CAAS,8DAAA,CACT,SAAA,CAAW,gDAAA,CACX,KAAA,CAAO,0CAAA,CACP,IAAA,CAAM,wDACR,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,uBAAA,CACT,EAAA,CAAI,uBAAA,CACJ,EAAA,CAAI,wBAAA,CACJ,IAAA,CAAM,SAAA,CACN,IAAA,CAAM,EACR,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SAAA,CACT,IAAA,CAAM,SACR,CACF,CACF,CAAA,CAWMC,CAAAA,aAAe,CAAA,CAAA,UAAA,CACnB,CACE,CACE,SAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,OAAA,CAAAC,CAAAA,CAAU,CAAA,CAAA,CACV,IAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EAIEC,8BAAAA,CAFWL,CAAUM,eAAAA,CAAO,QAAA,CAE3B,CACC,SAAA,CAAWC,gCAAAA,CAAGb,CAAe,CAAE,OAAA,CAAAI,CAAAA,CAAS,IAAA,CAAAC,CAAAA,CAAM,SAAA,CAAAF,CAAU,CAAC,CAAC,CAAA,CAC1D,GAAA,CAAKO,CAAAA,CACL,QAAA,CAAUH,CAAAA,EAAWE,CAAAA,CAAM,QAAA,CAC1B,GAAGA,CAAAA,CAEH,QAAA,CAAA,CAAAF,CAAAA,EACCO,6BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,8FAAA,CAA+F,CAAA,CAE/G,CAACP,CAAAA,EAAWC,CAAAA,EAAQM,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,MAAA,CAAQ,QAAA,CAAAN,CAAAA,CAAK,CAAA,CACjDC,CAAAA,CAAM,QAAA,CAAA,CACT,CAGN,CAAA,CACAP,CAAAA,CAAO,WAAA,CAAc,QAAA,CAAA,6BAAA","file":"/Users/admin/Desktop/PROJECTS/alkimi-ui-kit/dist/chunk-OXMHA73F.js","sourcesContent":[null,"import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n \"inline-flex items-center cursor-pointer justify-center whitespace-nowrap rounded-4xl font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 active:opacity-50 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default:\n \"bg-primary-accent text-primary-foreground hover:bg-primary/90\",\n destructive: \"bg-destructive hover:bg-destructive/90\",\n outline: \"border border-input hover:bg-base-accent text-primary-accent\",\n secondary: \"bg-muted text-primary-accent hover:bg-muted/20\",\n ghost: \"hover:bg-base-accent text-primary-accent\",\n link: \"text-primary-accent underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-9 px-4 py-2 text-sm\",\n sm: \"h-8 text-xs px-3 py-2\",\n lg: \"h-10 px-8 py-2 text-sm\",\n icon: \"h-9 w-9\",\n none: \"\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean\n loading?: boolean\n icon?: React.ReactNode\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant,\n size,\n asChild = false,\n loading = false,\n icon,\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : \"button\"\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n disabled={loading || props.disabled}\n {...props}\n >\n {loading && (\n <div className=\"mr-2 h-4 w-4 animate-spin rounded-full border border-primary-foreground border-t-transparent\" />\n )}\n {!loading && icon && <span className=\"mr-2\">{icon}</span>}\n {props.children}\n </Comp>\n )\n }\n)\nButton.displayName = \"Button\"\n\nexport { Button, buttonVariants }\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 _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 _chunkRRAIGAHUjs = require('./chunk-RRAIGAHU.js');var _chunk7SOZ6MOVjs = require('./chunk-7SOZ6MOV.js');var _chunk752ERCMUjs = require('./chunk-752ERCMU.js');var _chunk5L5DM2X5js = require('./chunk-5L5DM2X5.js');var _chunkK4GMCVHOjs = require('./chunk-K4GMCVHO.js');var _chunk7T4BNCXLjs = require('./chunk-7T4BNCXL.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var e = _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 ce="sidebar_state",pe=3600*24*7,ue="16.75rem",ee="23rem",be="calc(3rem + 0.75rem)",fe="b",ae=e.createContext(null),te=e.createContext(!1);function E(){let a=e.useContext(ae);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var me=e.forwardRef(({defaultOpen:a=!0,open:t,onOpenChange:n,className:i,style:s,children:c,...p},l)=>{let[R,g]=e.useState(!1),[f,v]=e.useState(a),[w,y]=e.useState(!1),[P,x]=e.useState(a),S=_nullishCoalesce(t, () => (P)),h=e.useCallback(d=>{let u=typeof d=="function"?d(S):d;n?n(u):x(u),document.cookie=`${ce}=${u}; path=/; max-age=${pe}`},[n,S]),m=e.useCallback(()=>{h(d=>!d)},[h]),_=e.useCallback(()=>{g(d=>!d)},[g]);e.useEffect(()=>{let d=u=>{u.key===fe&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),m())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[m]);let k=S?"expanded":"collapsed",[H,A]=e.useState(0),O=e.useRef(null),B=e.useRef([]),F=e.Children.toArray(c),C=F.filter(d=>e.isValidElement(d)&&_optionalChain([d, 'access', _2 => _2.type, 'optionalAccess', _3 => _3.displayName])==="SidebarBanner"),ne=F.filter(d=>!e.isValidElement(d)||_optionalChain([d, 'access', _4 => _4.type, 'optionalAccess', _5 => _5.displayName])!=="SidebarBanner");C.length>0&&(B.current=C);let N=C.length>0,M=!N&&B.current.length>0,G=N||M,oe=e.useMemo(()=>({state:k,isOpen:f,setOpen:h,openMobile:R,setOpenMobile:g,toggleSidebar:m,toggleMobileSidebar:_,setIsFullyOpen:v,isAnimating:w,setIsAnimating:y,isBannerClosing:M}),[k,f,h,R,g,m,_,v,w,y,M]);return e.useEffect(()=>{let d=O.current;if(!d){A(0);return}let u=()=>{A(d.offsetHeight)};u();let V=new ResizeObserver(u);return V.observe(d),()=>V.disconnect()},[C.length]),_jsxruntime.jsx.call(void 0, ae.Provider,{value:oe,children:_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.a,{delayDuration:0,children:_jsxruntime.jsx.call(void 0, "div",{style:{"--sidebar-width":ue,"--sidebar-width-icon":be,"--sidebar-top":N?`${H}px`:"0px",...s},className:_chunkFUYXCJOQjs.a.call(void 0, "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",G&&"flex-col",i),ref:l,...p,children:G?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "div",{className:"relative overflow-hidden transition-[height] duration-200 ease-linear",style:{height:M?"0px":H>0?`${H}px`:"auto"},children:_jsxruntime.jsx.call(void 0, "div",{ref:O,className:"fixed top-0 left-0 right-0 z-20 w-full transition-transform duration-200 ease-linear data-[state=closed]:-translate-y-full","data-state":N?"open":"closed",onTransitionEnd:()=>{M&&(B.current=[])},children:N?C:B.current})}),_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-1",children:ne})]}):c})})})});me.displayName="SidebarProvider";var ge=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"banner",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full",a),...t}));ge.displayName="SidebarBanner";var ve=e.forwardRef(({side:a="left",variant:t="sidebar",collapsible:n="offcanvas",className:i,children:s,...c},p)=>{let{state:l,openMobile:R,setOpenMobile:g,setIsFullyOpen:f,setIsAnimating:v,isBannerClosing:w}=E(),y=e.useRef(null),P=e.useRef(!0);return e.useEffect(()=>{let x=y.current;if(!x)return;if(P.current){P.current=!1,f(l==="expanded"),v(!1);return}v(!0);let S=setTimeout(()=>{f(l==="expanded"),v(!1)},300),h=m=>{m.target===x&&(m.propertyName==="left"||m.propertyName==="right"||m.propertyName==="width")&&(clearTimeout(S),f(l==="expanded"),v(!1))};return x.addEventListener("transitionend",h),()=>{x.removeEventListener("transitionend",h),clearTimeout(S)}},[l,f,v]),n==="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:p,...c,children:s}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.a,{open:R,onOpenChange:g,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:ee,maxWidth:ee},side:a,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, te.Provider,{value:!0,children:_jsxruntime.jsx.call(void 0, "div",{className:"flex h-full w-full flex-col",children:s})})]})}),_jsxruntime.jsxs.call(void 0, "aside",{ref:p,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "w-(--sidebar-width) transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0",t==="floating"||t==="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:y,"data-banner-closing":w,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",w&&"transition-[left,right,width,top,height]","top-(--sidebar-top) h-[calc(100svh-var(--sidebar-top))]",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="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),...c,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 flex-1 min-h-0",children:s})})})]})]})});ve.displayName="Sidebar";var re=e.forwardRef(({className:a,onClick:t,...n},i)=>{let{toggleSidebar:s,toggleMobileSidebar:c,openMobile:p}=E();return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, _chunk7T4BNCXLjs.b,{"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "md:hidden bg-transparent hover:bg-transparent",a),onClick:l=>{_optionalChain([t, 'optionalCall', _6 => _6(l)]),c()},...n,children:[p?_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunk7T4BNCXLjs.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, _chunk7T4BNCXLjs.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, _chunk7T4BNCXLjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "hidden md:inline-flex h-7 w-7",a),onClick:l=>{_optionalChain([t, 'optionalCall', _7 => _7(l)]),s()},...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"rounded-full p-2",children:_jsxruntime.jsx.call(void 0, _lucidereact.PanelLeft,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]})]})});re.displayName="SidebarTrigger";var he=e.forwardRef(({className:a,...t},n)=>{let{toggleSidebar:i}=E();return _jsxruntime.jsx.call(void 0, "button",{ref:n,"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",a),...t})});he.displayName="SidebarRail";var Re=e.memo(e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "main",{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex min-w-0 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",a),...t})));Re.displayName="SidebarInset";var xe=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, _chunkK4GMCVHOjs.a,{ref:n,"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",a),...t}));xe.displayName="SidebarInput";var Se=e.forwardRef(({className:a,showTrigger:t=!1,children:n,...i},s)=>{let{state:c}=E(),p=e.useContext(te),l=c==="collapsed"&&!p;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 items-center",l?"justify-center items-center":"justify-between items-start",a),...i,children:[!l&&_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:n})}),t&&_jsxruntime.jsx.call(void 0, re,{})]})});Se.displayName="SidebarHeader";var we=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-2",a),...t}));we.displayName="SidebarFooter";var ye=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, _chunk7SOZ6MOVjs.a,{ref:n,"data-sidebar":"separator",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-2 w-auto bg-border",a),...t}));ye.displayName="SidebarSeparator";var Ce=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"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",a),...t}));Ce.displayName="SidebarContent";var Ne=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"group",className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",a),...t}));Ne.displayName="SidebarGroup";var Me=e.forwardRef(({className:a,asChild:t=!1,...n},i)=>_jsxruntime.jsx.call(void 0, t?_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",a),...n}));Me.displayName="SidebarGroupLabel";var Te=e.forwardRef(({className:a,asChild:t=!1,...n},i)=>_jsxruntime.jsx.call(void 0, t?_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",a),...n}));Te.displayName="SidebarGroupAction";var Ee=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"group-content",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full text-sm",a),...t}));Ee.displayName="SidebarGroupContent";var Pe=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "ul",{ref:n,"data-sidebar":"menu",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full min-w-0 flex-col gap-1",a),...t}));Pe.displayName="SidebarMenu";var Be=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "li",{ref:n,"data-sidebar":"menu-item",className:_chunkFUYXCJOQjs.a.call(void 0, "group/menu-item relative",a),...t}));Be.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_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_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"}}),Le= exports.s =e.forwardRef(({asChild:a=!1,isActive:t=!1,variant:n="default",size:i="default",tooltip:s,className:c,...p},l)=>{let R=a?_reactslot.Slot:"button",{state:g}=E(),f=_jsxruntime.jsx.call(void 0, R,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:_chunkFUYXCJOQjs.a.call(void 0, He({variant:n,size:i}),c),...p});return s?(typeof s=="string"&&(s={children:s}),_jsxruntime.jsxs.call(void 0, _chunkRRAIGAHUjs.b,{children:[_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.c,{asChild:!0,children:f}),_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.d,{side:"right",align:"center",hidden:g!=="collapsed",...s})]})):f});Le.displayName="SidebarMenuButton";var Ie=e.forwardRef(({className:a,asChild:t=!1,showOnHover:n=!1,...i},s)=>_jsxruntime.jsx.call(void 0, t?_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",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",a),...i}));Ie.displayName="SidebarMenuAction";var ze=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"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",a),...t}));ze.displayName="SidebarMenuBadge";var De=e.forwardRef(({className:a,showIcon:t=!1,...n},i)=>{let s=e.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",a),...n,children:[t&&_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}})]})});De.displayName="SidebarMenuSkeleton";var _e=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "ul",{ref:n,"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",a),...t}));_e.displayName="SidebarMenuSub";var ke=e.forwardRef(({...a},t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...a}));ke.displayName="SidebarMenuSubItem";var Ae=e.forwardRef(({asChild:a=!1,size:t="md",isActive:n,className:i,...s},c)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"a",{ref:c,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,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",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));Ae.displayName="SidebarMenuSubButton";exports.a = E; exports.b = me; exports.c = ge; exports.d = ve; exports.e = re; exports.f = he; exports.g = Re; exports.h = xe; exports.i = Se; exports.j = we; exports.k = ye; exports.l = Ce; exports.m = Ne; exports.n = Me; exports.o = Te; exports.p = Ee; exports.q = Pe; exports.r = Be; exports.s = Le; exports.t = Ie; exports.u = ze; exports.v = De; exports.w = _e; exports.x = ke; exports.y = Ae;
3
- //# sourceMappingURL=chunk-25PBXFF5.js.map
2
+ var _chunkRRAIGAHUjs = require('./chunk-RRAIGAHU.js');var _chunk7SOZ6MOVjs = require('./chunk-7SOZ6MOV.js');var _chunk752ERCMUjs = require('./chunk-752ERCMU.js');var _chunk5L5DM2X5js = require('./chunk-5L5DM2X5.js');var _chunkK4GMCVHOjs = require('./chunk-K4GMCVHO.js');var _chunkOXMHA73Fjs = require('./chunk-OXMHA73F.js');var _chunkFUYXCJOQjs = require('./chunk-FUYXCJOQ.js');var _react = require('react'); var e = _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 ce="sidebar_state",pe=3600*24*7,ue="16.75rem",ee="23rem",be="calc(3rem + 0.75rem)",fe="b",ae=e.createContext(null),te=e.createContext(!1);function E(){let a=e.useContext(ae);if(!a)throw new Error("useSidebar must be used within a SidebarProvider.");return a}var me=e.forwardRef(({defaultOpen:a=!0,open:t,onOpenChange:n,className:i,style:s,children:c,...p},l)=>{let[R,g]=e.useState(!1),[f,v]=e.useState(a),[w,y]=e.useState(!1),[P,x]=e.useState(a),S=_nullishCoalesce(t, () => (P)),h=e.useCallback(d=>{let u=typeof d=="function"?d(S):d;n?n(u):x(u),document.cookie=`${ce}=${u}; path=/; max-age=${pe}`},[n,S]),m=e.useCallback(()=>{h(d=>!d)},[h]),_=e.useCallback(()=>{g(d=>!d)},[g]);e.useEffect(()=>{let d=u=>{u.key===fe&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),m())};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[m]);let k=S?"expanded":"collapsed",[H,A]=e.useState(0),O=e.useRef(null),B=e.useRef([]),F=e.Children.toArray(c),C=F.filter(d=>e.isValidElement(d)&&_optionalChain([d, 'access', _2 => _2.type, 'optionalAccess', _3 => _3.displayName])==="SidebarBanner"),ne=F.filter(d=>!e.isValidElement(d)||_optionalChain([d, 'access', _4 => _4.type, 'optionalAccess', _5 => _5.displayName])!=="SidebarBanner");C.length>0&&(B.current=C);let N=C.length>0,M=!N&&B.current.length>0,G=N||M,oe=e.useMemo(()=>({state:k,isOpen:f,setOpen:h,openMobile:R,setOpenMobile:g,toggleSidebar:m,toggleMobileSidebar:_,setIsFullyOpen:v,isAnimating:w,setIsAnimating:y,isBannerClosing:M}),[k,f,h,R,g,m,_,v,w,y,M]);return e.useEffect(()=>{let d=O.current;if(!d){A(0);return}let u=()=>{A(d.offsetHeight)};u();let V=new ResizeObserver(u);return V.observe(d),()=>V.disconnect()},[C.length]),_jsxruntime.jsx.call(void 0, ae.Provider,{value:oe,children:_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.a,{delayDuration:0,children:_jsxruntime.jsx.call(void 0, "div",{style:{"--sidebar-width":ue,"--sidebar-width-icon":be,"--sidebar-top":N?`${H}px`:"0px",...s},className:_chunkFUYXCJOQjs.a.call(void 0, "group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",G&&"flex-col",i),ref:l,...p,children:G?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, "div",{className:"relative overflow-hidden transition-[height] duration-200 ease-linear",style:{height:M?"0px":H>0?`${H}px`:"auto"},children:_jsxruntime.jsx.call(void 0, "div",{ref:O,className:"fixed top-0 left-0 right-0 z-20 w-full transition-transform duration-200 ease-linear data-[state=closed]:-translate-y-full","data-state":N?"open":"closed",onTransitionEnd:()=>{M&&(B.current=[])},children:N?C:B.current})}),_jsxruntime.jsx.call(void 0, "div",{className:"flex flex-1",children:ne})]}):c})})})});me.displayName="SidebarProvider";var ge=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"banner",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full",a),...t}));ge.displayName="SidebarBanner";var ve=e.forwardRef(({side:a="left",variant:t="sidebar",collapsible:n="offcanvas",className:i,children:s,...c},p)=>{let{state:l,openMobile:R,setOpenMobile:g,setIsFullyOpen:f,setIsAnimating:v,isBannerClosing:w}=E(),y=e.useRef(null),P=e.useRef(!0);return e.useEffect(()=>{let x=y.current;if(!x)return;if(P.current){P.current=!1,f(l==="expanded"),v(!1);return}v(!0);let S=setTimeout(()=>{f(l==="expanded"),v(!1)},300),h=m=>{m.target===x&&(m.propertyName==="left"||m.propertyName==="right"||m.propertyName==="width")&&(clearTimeout(S),f(l==="expanded"),v(!1))};return x.addEventListener("transitionend",h),()=>{x.removeEventListener("transitionend",h),clearTimeout(S)}},[l,f,v]),n==="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:p,...c,children:s}):_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk752ERCMUjs.a,{open:R,onOpenChange:g,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:ee,maxWidth:ee},side:a,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, te.Provider,{value:!0,children:_jsxruntime.jsx.call(void 0, "div",{className:"flex h-full w-full flex-col",children:s})})]})}),_jsxruntime.jsxs.call(void 0, "aside",{ref:p,className:"group peer hidden text-sidebar-foreground md:block","data-state":l,"data-collapsible":l==="collapsed"?n:"","data-variant":t,"data-side":a,children:[_jsxruntime.jsx.call(void 0, "div",{className:_chunkFUYXCJOQjs.a.call(void 0, "w-(--sidebar-width) transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0",t==="floating"||t==="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:y,"data-banner-closing":w,className:_chunkFUYXCJOQjs.a.call(void 0, "fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",w&&"transition-[left,right,width,top,height]","top-(--sidebar-top) h-[calc(100svh-var(--sidebar-top))]",a==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="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),...c,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 flex-1 min-h-0",children:s})})})]})]})});ve.displayName="Sidebar";var re=e.forwardRef(({className:a,onClick:t,...n},i)=>{let{toggleSidebar:s,toggleMobileSidebar:c,openMobile:p}=E();return _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsxs.call(void 0, _chunkOXMHA73Fjs.b,{"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "md:hidden bg-transparent hover:bg-transparent",a),onClick:l=>{_optionalChain([t, 'optionalCall', _6 => _6(l)]),c()},...n,children:[p?_jsxruntime.jsx.call(void 0, "span",{className:_chunkFUYXCJOQjs.a.call(void 0, _chunkOXMHA73Fjs.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, _chunkOXMHA73Fjs.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, _chunkOXMHA73Fjs.b,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:_chunkFUYXCJOQjs.a.call(void 0, "hidden md:inline-flex h-7 w-7",a),onClick:l=>{_optionalChain([t, 'optionalCall', _7 => _7(l)]),s()},...n,children:[_jsxruntime.jsx.call(void 0, "span",{className:"rounded-full p-2",children:_jsxruntime.jsx.call(void 0, _lucidereact.PanelLeft,{size:16})}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Toggle Sidebar"})]})]})});re.displayName="SidebarTrigger";var he=e.forwardRef(({className:a,...t},n)=>{let{toggleSidebar:i}=E();return _jsxruntime.jsx.call(void 0, "button",{ref:n,"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",a),...t})});he.displayName="SidebarRail";var Re=e.memo(e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "main",{ref:n,className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex min-w-0 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",a),...t})));Re.displayName="SidebarInset";var xe=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, _chunkK4GMCVHOjs.a,{ref:n,"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",a),...t}));xe.displayName="SidebarInput";var Se=e.forwardRef(({className:a,showTrigger:t=!1,children:n,...i},s)=>{let{state:c}=E(),p=e.useContext(te),l=c==="collapsed"&&!p;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 items-center",l?"justify-center items-center":"justify-between items-start",a),...i,children:[!l&&_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:n})}),t&&_jsxruntime.jsx.call(void 0, re,{})]})});Se.displayName="SidebarHeader";var we=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"footer",className:_chunkFUYXCJOQjs.a.call(void 0, "flex flex-col gap-2 p-2",a),...t}));we.displayName="SidebarFooter";var ye=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, _chunk7SOZ6MOVjs.a,{ref:n,"data-sidebar":"separator",className:_chunkFUYXCJOQjs.a.call(void 0, "mx-2 w-auto bg-border",a),...t}));ye.displayName="SidebarSeparator";var Ce=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"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",a),...t}));Ce.displayName="SidebarContent";var Ne=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"group",className:_chunkFUYXCJOQjs.a.call(void 0, "relative flex w-full min-w-0 flex-col","group-data-[collapsible=icon]:p-0",a),...t}));Ne.displayName="SidebarGroup";var Me=e.forwardRef(({className:a,asChild:t=!1,...n},i)=>_jsxruntime.jsx.call(void 0, t?_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",a),...n}));Me.displayName="SidebarGroupLabel";var Te=e.forwardRef(({className:a,asChild:t=!1,...n},i)=>_jsxruntime.jsx.call(void 0, t?_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",a),...n}));Te.displayName="SidebarGroupAction";var Ee=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"data-sidebar":"group-content",className:_chunkFUYXCJOQjs.a.call(void 0, "w-full text-sm",a),...t}));Ee.displayName="SidebarGroupContent";var Pe=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "ul",{ref:n,"data-sidebar":"menu",className:_chunkFUYXCJOQjs.a.call(void 0, "flex w-full min-w-0 flex-col gap-1",a),...t}));Pe.displayName="SidebarMenu";var Be=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "li",{ref:n,"data-sidebar":"menu-item",className:_chunkFUYXCJOQjs.a.call(void 0, "group/menu-item relative",a),...t}));Be.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:"",outline:"bg-sidebar shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_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"}}),Le= exports.s =e.forwardRef(({asChild:a=!1,isActive:t=!1,variant:n="default",size:i="default",tooltip:s,className:c,...p},l)=>{let R=a?_reactslot.Slot:"button",{state:g}=E(),f=_jsxruntime.jsx.call(void 0, R,{ref:l,"data-sidebar":"menu-button","data-size":i,"data-active":t,className:_chunkFUYXCJOQjs.a.call(void 0, He({variant:n,size:i}),c),...p});return s?(typeof s=="string"&&(s={children:s}),_jsxruntime.jsxs.call(void 0, _chunkRRAIGAHUjs.b,{children:[_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.c,{asChild:!0,children:f}),_jsxruntime.jsx.call(void 0, _chunkRRAIGAHUjs.d,{side:"right",align:"center",hidden:g!=="collapsed",...s})]})):f});Le.displayName="SidebarMenuButton";var Ie=e.forwardRef(({className:a,asChild:t=!1,showOnHover:n=!1,...i},s)=>_jsxruntime.jsx.call(void 0, t?_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",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",a),...i}));Ie.displayName="SidebarMenuAction";var ze=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "div",{ref:n,"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",a),...t}));ze.displayName="SidebarMenuBadge";var De=e.forwardRef(({className:a,showIcon:t=!1,...n},i)=>{let s=e.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",a),...n,children:[t&&_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}})]})});De.displayName="SidebarMenuSkeleton";var _e=e.forwardRef(({className:a,...t},n)=>_jsxruntime.jsx.call(void 0, "ul",{ref:n,"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",a),...t}));_e.displayName="SidebarMenuSub";var ke=e.forwardRef(({...a},t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...a}));ke.displayName="SidebarMenuSubItem";var Ae=e.forwardRef(({asChild:a=!1,size:t="md",isActive:n,className:i,...s},c)=>_jsxruntime.jsx.call(void 0, a?_reactslot.Slot:"a",{ref:c,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,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",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...s}));Ae.displayName="SidebarMenuSubButton";exports.a = E; exports.b = me; exports.c = ge; exports.d = ve; exports.e = re; exports.f = he; exports.g = Re; exports.h = xe; exports.i = Se; exports.j = we; exports.k = ye; exports.l = Ce; exports.m = Ne; exports.n = Me; exports.o = Te; exports.p = Ee; exports.q = Pe; exports.r = Be; exports.s = Le; exports.t = Ie; exports.u = ze; exports.v = De; exports.w = _e; exports.x = ke; exports.y = Ae;
3
+ //# sourceMappingURL=chunk-QMGLM2OR.js.map